• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

INZANE´S Step by Step Tutorial

yo ho ho

Freebooter
Storm Modder
Firstly, I want to thank Inzane for this.

INZANE'S step-by-step tutorial: "How to get your ship in-game properly, using Maya"

Before you begin, you have to scale the ship correctly. You must export a ship from the game and load it into Maya. Then, scale your ship to the size of the imported game ship.
If you don't, your ship will be huge and as big as the world map. This is where you start to get it in game. I will guide you to the next step.

The next step is to split the main model into separate model files:
  • The hull is simply "[shipname].gm";
  • The masts, from bow to stern, are: "[shipname]_mast1.gm", "[shipname]_mast2.gm"... etc;
  • The horizontal yards are, in ascending height on the mast: "[shipname]_rey_a#.gm", "[shipname]_rey_b#.gm"... etc, where # is the number of the mast to which the yard is attached. It is important to note that the lowest yard on each mast must be 'rey_a#', as the game recognises these as the sails to strike in the 'Battle Sails' state. Usually, 'rey_c#' is the topmost yard, but ships with more yards can also go up to 'rey_d#'. Also, spankers or lateen rudder sails are usually named 'rey_aX', where X is the number of the mast closest to the stern.
  • Any extra parts which must be attached to the model can be called anything in the format: "[shipname]_[anything].gm".
The next step it to create a path model.
The path model is a one-sided mesh of the parts of the deck which the player can walk around in 1st Person mode at sea. Its polygons are inverted so it is invisible in-game.
Without this, the game will crash when you try to enter 1st Person sailing. Also, make sure it has a texture mapped to it, just like a normal model, or it won't convert to GM format.

We will now move onto adding the first set of locators, and then do a test convert to check the ship in-game.
We also figure out some of Maya's functions, but it may take a few tries to get the model to work correctly.

Step 1
Got to the create tab and click: "Create a locator". This will be named 'locator1'. Place this locator where you want the ship's waterline without cargo and other excess weight.
This because the ship, when loaded with cargo, will settle deeper into the water. Cool and realistic. ;)

Step 2
First go to your General tab. Click the 'Hypergraph' sub-tab. This will open a new screen where you will see your new locator and your mesh.
Now we have to make two more locators, but this time one named "Path". Move this locator to line up with the deck. Name the other locator "Camera", and place it where you want the player to see from during 1st Person mode.
Note this position is where the camera starts off in-game, and the player can move it around the path model freely. They also should show up in your hypergraph sub-tab.
Take note in the 'General' tab there are four sub-tab icons of blue squares and balls. If you look at them, they are 'Group, Ungroup, Parent and Unparent'. We will be using them in Step 3.

Step 3a
You should at this point have your 'Hypergraph' open. We should see all the new locators you have created so far.
In hypergraph, click the 'Path' locator so it becomes highlighted yellow, and then click the 'Group' icon. Now it should have created a white box that says 'Group1'.
Right click it and rename it to 'Geometry'.
Now you have to click the names in the following order (and only in this order, or it will screw everything up!)
Hold down your 'shift' key and select: Camera, Geometry and your 3d model, and then locator1. All these should be highlighted yellow.
Now, click the sub-tab "Parent". Everything should now be connected in a tree, and should show up connected in the reverse order that you clicked them. Locator1, 3d model, Geometry-->path, Camera.

Step 3b

Open your path model, and make a new locator named 'locator1'. Line it up as close to the model as you can, dead centre, and open the Hypergraph window.
Click, holding shift again, in this order: 3d model, then locator1. Both should be yellow; now hit sub-tab 'Parent'. It should have locator1 on top and 3d model on the bottom. Save the file.

Step 4
Now we shall convert the model as a test. Open the plug-in and save as a GM file. This may take a few minutes. Also, convert your path model to GM. If it converts, that's a good sign.
Next, convert all the textures to TGA.TX if you haven't already done so. Put them in RESOURCE/Textures/Ships. Next, make a new folder for the ship, called "[shipname]". This MUST match the ship name used for all the individual model files.
Now we are going to do a quick test. Open your ship model in GM Viewer. If it loads and looks good with the textures, check to see if the locators are there. Then, we are in good shape.

We should be able to do a test in-game, if all has gone well so far. The quickest method of getting the ship coded in is to copy the stats of a similar existing ship in 'ships_init.c', and replace the necessary lines specific to your ship.
Once finished, start the game and you should know right away if something is wrong. The game will crash if the conversion was not entirely successful, or is the coding wasn't done correctly. If not, then things are going well.
If your ship looks too big/small relative to ships of a similar size, re-size the model in Maya and re-convert it again. Make sure the locators stay where they should be, though.

Step 5
We shall now add the cannon locators.
Firstly, create the locators one by one, and place them at the opening of each gun. They need to be named "_1", "_2", "_3" etc.
After you have that done, you need to create groups for each side. Select all the gun locators on the right side, group them, and name the group "cannonr".
Each side has to be done in the same way, in the format: left = cannonl, front = cannonf, back = cannonb. Make sure all the locators are facing the same direction that the cannon will fire in.
Once you have all the gun locators grouped neatly, you need to parent them to the main locator1. First, click 'cannonr' and then 'locator1', and hit 'Parent'. After that been done for all four sides, convert the mesh for another test in-game.
If you notice some weird firing in-game, make note of the sides having the problem and go back to Maya to adjust the locators' directions. Save, test again, and repeat until all guns fire in the correct direction.

Step 6

Next, we must add the mast locators.
These locators go on the hull model, and are named 'mast#', with # being the mast number. You will need to parent these locators to the 'Geometry' group which was made earlier.
You have to put them where you want the masts to be placed on the hull (mast1 is the front of the ship, followed by mast2, etc).
Next, save the file and open the 'mast1' model. The first thing to do is centre the bottom of the mesh at (0,0,0). Then, add a locator named 'mast1', and place it where the mast will meet the hull.
Parent the model to the mast1 locator, and you're done! Convert it and place it in the folder. The same thing has to be done for the rest of the masts.
Next, do another test in-game. If there are any problems, the game will crash. You may also have a problem with the direction the masts face. Go back into the Maya and rotate the locators to face forward.

Step 7
Now we need to add the yards (rey models).
Open each mast mesh in turn, and make the necessary locators for every yard on that mast. Name them "rey_a#", "rey_b#" etc.
Place them where you want them on the mast, put them in a group named 'Geometry', and parent them to the corresponding mast locator.
Now open every rey mesh individually, centre the mesh on the grid, and create a locator with the rey's exact name. Move it to where you want it, and parent the mesh to it. Save the files.

Step 8

Time to add sails to every rey model. (Again, you may have to rotate locators if placement of reys is not right.)
First open one of the rey files. Make four locators and name them 'sail1',' sail2', 'sail3' and 'sail4'. Place them as they would be at full sail, in this format (seen from the front):

sail2--------------sail1
------------------------
------------------------
------------------------
sail3--------------sail4

Group the locators and name the group "saild", then parent it to the rey locator. Note that 'saild' corresponds to normal square sails, 'sailf' is for spankers, lateens and four-sides stays, and 'sailt' is for triangular stays.

Use this format for triangular sails:

sail2
------
------------------
-----------------------
sail3--------------------sail1

Step 9
Finally, we need to add ropes, ratlines, and flags.
Making ropes is like drawing a line; you have a beginning and an end. It works like this: ropeb1------------------ropee1. Rope beginning/ends can be on the same model, or they can belong to separate models; they will still link up either way.
To add more ropes you just change the number (ropeb2---ropee2 etc), and just parent them to the main locator of their respective models.

The ratlines ('vants') are made up of 3 locators: one for the top (vant1u) and two for the bottom (vant1l and vant1r). The two bottom locators go onto the hull mesh, while the top locator goes on to the mast.
Once you have all the vants placed, you have to group them and you name the group "vants". Then, parent them to the main locator. To add more vants, just change the number, as with ropes.

Flags are added in the same way as the sails. Make four locators named "f1, f2, f3, and f4". Place them where you want, in this format:

f2-------------f1 [mast]
----------------- [mast]
----------------- [mast]
f3-------------f4 [mast]


Once done, put them in a group called "flag1" and parent it the the main locator.
Important: to get the flags to work properly with all versions of Build 14, you must make two versions of all flag locators.
One set is the 'flag' group, and the other is the 'penn' group. In 'ships_init.c', find the lines for the flags in your ship's entry, and set the pennants and ensigns there.

Convert all files once more to test in-game. If all works well, the whole process was a success! :cheers
 
Nice tutorial, I will add them to the others. Note I have corrected the first paragrahps, in grammatical and other aspects. The last part I still have to do!
 
This is the old step by step tutorial I knew I saw somewhere and could never remember what thread it was in.

Awesome job on getting this back into the annals.

Now you just need to copy this thread to the tips and tuts, sticky it and we will have exactly the info that all our shipwrights have been after. **grins**

Cap'n Drow
 
It is already in the Tutorials thread <img src="style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> I put it in the first post
 
Thanks for finding that one again. <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />
 
Good job digging this up. there is one error that needs to be addressed. for step 4, To get the ship in game you need to have atleast 1 mast inplace or it will crash. its just annoying.

here is a list of things that won't crash the game if not added
guns
sails
reys
ropes ( having no ropes will not crash the game, it will crash if you are missing a locator when your making ropes)
path(but it will crash once you hit tab to switch to deck view)
fireplaces
smoke
 
Thanks Inzane! That's good to know! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />
 
For cannons on the Stem and Stern do you put them in the left and right cannon groups or do you call the groups cannonf - front and cannonb - back
 
Mine ship hull is finished, but do I need to name All the components together ''3D Model''? If yes, How?

and plz give me a tutorial for the textures, because I really dunno how to make the textures and that stuff xD
 
<img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" /> Materkil,

A good texturing tutorial can be found <a href="http://www.ramyhanna.com/texturing/polyTutorial/texturingTutorial01.html" target="_blank">here</a> ,it's very informative <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />

<img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
damski.
 
Thanks for help <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />
 
right now I got a simple texture just from Maya, But I also must save the texture in the right folder....
How Safe the texture and Must I safe in Recource>textures>ships?
 
Convert the texture to tga.tx with the TX Converter and place it in RESOURCE\Textures\Ships.
 
I think I'm doing something really wrong....
I got the 3D Model finished atached the first locaters (locater 1, PATH and Camera)
After that I just did a simple texture: Wood
I attached the texture wood but I don't see anything change....But if I click on: ''Render the current Frame''
Then I can see the texture.........

and by the texture of the Path file if I click on ''Render the current Frame'' I see only the texture of a part that I made myself...
and HOW do I safe the textures/materials?

plz can someone have a look at it?
The 3D Model I can't Upload so plz ask me if you Wan't to see it and maybe help me^^
Plz no comments on the Path/3D Model file like: Strange ship, and others. This is just a try out^^
 

Attachments

  • Surprise2_path.gm
    52.7 KB · Views: 403
Which Plig-In do I need to export to .gm?

I'm asking this because the game crashes and because I can't open it with TOOL
 
The Akella plug in.

i think Pieter give you the Akella Tools/Plugin.

INSTALL THE PLUGIN (Original <a href="http://forum.piratesahoy.net//index.php?showtopic=11470" target="_blank">LINK</a> ):

Plugin for Maya v4.0 and v.4.5

The plugin consists of 3 parts.
2 of them are Maya-independent: it is necessary to copy export.dll into the folder AW\.Maya4.?\.bin\SD2GeoExportMel.
It is necessary to copy mel-files into folder AW\.Maya4.?\.scripts\.others\
This part of the plugin depends on the version of Maya and if there exists a MAI 4.0 and 4.5

Copy D2GeoExport.mll into folder AW\.Maya4.?\.bin\.plugins\Exported objects:
- polygonal mesh.
The material must be assigned to the object:
-.Pyuong
-.Lamber
Incadescene is more than zero for the materials, which emit luminous energy.

Value
- energy density per unit of area.
CosPow is assigned the spread of the outgoing directions of photons relative to the standard of the vertexes of triangle.
Object must contain mapping. To each UVSet, you must be (prilinkovana?) its texture.
-.map (compulsorily?) - base texture.
-.bump (optionally) the color of the pixels of this texture will be (znakovo?) added to the color of the pixels of base texture.
- if the additional mapping is not necessary its UVSet, it is possible to use field Bump Mapping in the editor of the materials of Maya.

Additionally, mapping considers place2dTexture = transformation of the textural coordinates:
Repeat UV = tayling of textural coordinates

Offset = displacement of mapping

Rotate UV = turning of textural coordinates; all the remaining options in place2dTexture are not considered.

Locator in the scene = indication that everything which to it fastened will be unloaded into the separate file of geometry.

Other locators, that are fastened to the geometry, create separate file - the means of the formation of hierarchy.

The triangles of object have VertexColor. In Maya, it is not originally vertexColor that determines the vertex.
In this case, it is the unloaded value ARGB = of 255,127,127,127.

Color of vertex = coefficient of the diffuse component of material.

During unloading of objects with those painted vertexColor´ami object, it is necessary to triangulate before the unloading.

For unloading the geometry it is necessary to isolate the locator, to which this object is attached.

For unloading the locators without the geometry must also be isolated.

Object cannot be unloaded, if the material texture is not assigned.

Materials with two textures cannot be placed to the object with one mapping.

In the object it is not possible to combine triangles with one or two uVSet'ami.

During unloading of the geometry in parallel are created atg-files, into which are written the obtained errors and information about the exported objects.
 
Back
Top