Page 1 of 1

Posted: Tue Jun 22, 2004 4:00 pm
by Starfleet
ok There is a reason why I have not posted this into the tutorial forum, because I will add in the steps as I get time. But with that said welcome to starfleets class of hell, take a seat and get comfortable, and ready for bad spelling and links to .mov format files at times.

Got that Good.

Ok first off were going to go over a few basic's in this step of the tutorial that if you -followed- the instructions in the RDN doco's for maya 3 you shouldn't have any problems with...

1. Have you got the RDN?
- Yes, Good because otherwise you are going to be extreamly.. stuck
- No? Bad person, Look go to the wiki site, (there is a link to it in the main tutorial thread here) and download the RDN, with out it your not going to get far at all.

2. Are you updated to Homeworld 1.1?
- Yes, Good again.. HW 1.1 Fixed a few bugs and made some of our coding life easier.
- No, Well I'd suggest an Update.

3. Have you got the recommended community tools for lua?
- Yes, Even better
- No, Oh well for a straight export there not really needed, if you want to decode lua, rot files and the like they are.

4. Have you set up photoshop, psp or what ever you use by the artpipline.doc?
- Yes, Great because You WILL need to have your Files done the same way as those PSD's say to have them done.
- No? Do it.. Don't have Photoshop? Download PSP(Paintshop Pro) it's free and it'll save you a lot of headachs.

---------
Ok with those steps done we can start moving onto the next step, getting your model ready to take into maya.

Now I do not know how you, do your modeling I'm not going to ask you how you do your modeling but for this you'll be stuck following my steps for getting something ready which is lightwave. But it works the same for 3dsmax etc so -LONG- as with max you save as a .obj or Have DEEP EXPLORATION and can convert a .3ds to .obj same goes for every other file format. (AND the format MUST SUPPORT UVW mapping)

ok with that small lecture out of the way ;) we'll move onto the model and the requirments there, for a start the mesh you are translating must be planular, what do I mean by this? That it's faces must be either tri's or quads.
The main level of detail should also be optimised as best as you can.
The textures should be done to Game format sizes otherwise you'll run into issues later.

Ok load up your mesh in your standard modeling application for me lightwave done? good.
Now having a look at the mesh it's at it's highest level of detail? yes good?

Now open photoshop and follow the Artpipeline info for making a texture, I personally use the one for doing the highest level and leave it at this.. Why? Because even if you are working at 1024x1024 or 1024x512 or what ever texture size homeworld 2 uses Directx dds textures once it's exported into a hod format and these textures all have there mipmap levels saved, so if you have a 512x512 etc texture you automatically have all the sizes below this as well 256x256, 128x128, 64x64, 32x32, etc.

Once this is done map these textures to your mesh.

Now on a new layer copy that high poly mesh and optimise it down (I use a point/vertex merge or a 3rd party program known as Rational Reducer for this)

Continue this until you have all your LOD meshes for this mesh done.

BY this stage you should have the following:
1. A mesh file or files with all the Level of Detail meshes mapped.
2. All of the Textures in PSD format as per the rdn export ready.. (I may do a texture tutorial on this later)

Now, lets get them ready for maya.

There are 2 or so ways you can do this. If you are using lightwave like myself and have deep exploration you can simply open Deep Exploration and convert the .lwo object straight into a .obj format (Do not use the .MA format in Deep Exploration it doesn't work for maya 3 only maya 5) or if you don't have deep exploration, you will need to export 1 .obj file for each level of detail mesh you have.

Once this is done you are ready to move onto maya and for now this is were we will leave this tutorial until I can get some visual Tutorials done.

-Rob/starfleet.

Posted: Tue Jun 22, 2004 5:50 pm
by Starfleet
Ok the rest of this is actually done, least the video part but It'll have to wait and render out while i'm at class (i don't have the paitence to wait atm for a 30minute video to render)

Posted: Wed Jun 23, 2004 7:53 am
by Redragon
SF if its okay, I'm going to stick this up on the website.

Posted: Thu Jun 24, 2004 1:35 am
by Starfleet
Yaeh that's fine.. I kinda forgot to render out the video today and yestarday *DOH!* I'll do it tomorrow.. hopefully (been busy)

Posted: Thu Jun 24, 2004 2:16 am
by Starfleet
Ok with out the video hehe and excuse me I'm at class so I can't give you exact commands, the video will show this a lot easier then I can in text. (Ie i'm doing this from memory)

1. Open Maya 3.
Got it open? Good, you should by now I would hope have the maya toolset installed for the RDN and ALSO have it working. Incase you don't know this means that you'll have to go and grab another .psd importer because the one with the RDN tools... well frankly don't work.

Anyway So long as you have the toolshelf up and no errors when you load in and all the junk in the maya setup done.. we shouldn't have a problem at all.

2. Import the Mesh/Meshes from the first part of this tutorial, in the video you'll see that it's the Galor that I recently worked on for the Star Trek: Homeworld team (who I normally refure to as the SOA group) As you can see it's come in and it may not be facing the right way, it's also unless you've adjusted your settings currently a wireframe. First off, open up the Hypergraph. For those who do not know where it is, Windows - Hypergraph.

With it open up you should see there are a few tags in there with names, these are your Mesh Nodes.. Get used to this screen, it navigates like the rest of maya (ie alt + mouse buttons to move zoom etc) because you will be using it a lot in the course of making a HW2 export mesh.

Now Select the objects and rotate them so they sit right, if your not certain HOW they should face open up the 3 Sample files and have a look at them, they show you that much really clearly.

Once you have it rotated around in the right direction, turn on smooth shading and also turn on hardware texturing..... What's that??? it's all grey??? that's fine.

The reason that it's all grey is for the most part due to the fact that an import looses the actual texture's, (some times not all ways but for this we'll assume it did) But the MATERIAL's are still there (if we where working in maya 5.0 this wouldn't be an issue at all because we could have converted to a .ma etc but then at the same time the maya 5.0 toolset doesn't like docking path's due to a few issues with the translation of a number of the relic scripts) Anyway to get back on topic... Go to Windows - Hypershader, you should see that there are a number of materials there, Lambert, a partical shader and a few pong ones as well..

It's these pong shaders we are going to be looking at so you can ignore the lambert shader.

Ok so we have these two windows up hypergraph and hypershader.. what do we do with them? At the moment just shrink down the Hypershader window, we'll get back to it in a moment.. We have a little bit of layer setup to do first.

Now, In the Video when It's posted you'll notice I already have the Layer Panel up, but this isn't standard in Maya, if you don't have it up, either search the help, read the artline.pdf (it tells you how to bring it up) or go to the UI elements section of the menu's and turn it on.

Ok so you have it up?

Good.

At the moment you'll have a single layer, it's called Default.. What we want to do is create a few more. Next to the default layer is a button that allows you to create new layers, Click on it make a new layer and call it SHIP. Nice and simple. Now create the following layers as well.

LOD1
LOD2
LOD3 (Create as many of these as you have Level of detail mesh's outside the MAXIMUM level of detail mesh this mesh will go on the SHIP layer)
Goblins (If you have any Goblins, some just use the LOD0/Shiplayer for this and in my video i did that)
CM (This one is the collision mesh layer it is VERY important and it MUST be called CM)
TEMP (This will be deleted by the end of this)

Ok now that you have the layers in hypergraph for a moment select all the Meshes, and then right click on temp, you'll notice that there is a option to assign selection to layer. Click it.

Now make certain the meshes actually moved to that layer by right clicking on it and going Hide.

The Meshes vanished?

Good.

3. Ok Now we need to start moving the layers to the positions were we want them. Unhide the Temp layer, (right click - show) and the meshes will appear.. This part is some guess work and some juggling unless you have a good eye. Select each mesh part until you find the Highest level of detail mesh and then just as we assigned all of them to temp, assign this one to the SHIP layer. Then Hide the Temp layer and check you moved the right mesh over.. If you didn't assign the mesh to the LOD layer that it -SHOULD- be on then hide that layer and bring the Temp layer back up.. Rinse and repeat until all of the meshes are assigned to layers that they should all be on.

Ok so by now this is what you should have.
- A number of layers with at least 1 called ship, 1 called LOD# (starting at 1), 1 layer called CM, Possibly 1 layer called Goblins and 1 layer called temp.
- Each layer except CM and TEMP should now contain meshes.

If this is correct then were cooking with fire and can move onto the next step.

4.
Ok Hide every layer except the ship layer... Done this? Good. Now remember the Hypershader we looked at before? Certainly you do.. ok open it up and have a look at it again, you can see that the materials are in the middle and there is a box over the side containing a lot of junk.. we don't need to worry about this for the purpose of what we are doing at the moment, so Ignore it. We need to consentrate on the materials/shaders in the black area.

Ok Move the Hypershader window over so that you can see the mesh, then on the first Phong shader right click and go to select all objects with this texture (Or something like that) in the main window you should notice that a section is now highlighted orange, this is the area that this shader would control the textures on.. Ok.. now we get into the tricker part.. but at the same time I DO have a partual tutorial up for this already *Yay* though it is a maya 5 tutorial, the way you do things is EXACTLY the same in MAYA 3.0 as it is in MAYA 5.0.

Anyway I suggest you go to http://www.star-fleet.org/tutorials/ and download the texture .rar it's a quicktime.mov file that will unzip out to about 60mb's or so.

With that there and ready for referance, go to your toolshelf and click on the icon that looks to be a circle with HW2 on it, this will create a new shader node, called if I am not wrong... HW2Shader (ohh shock horror ;) )

Ok using the way that is shown in the tutorial i just showed you, set up the shader with the ship.st shader script (IF you DO NOT HAVE THE SHADERS, THEN YOU DID NOT FOLLOW THE RDN INSTALLATION INSTRUCTIONS. - They are in the homeworld2.big file)

Now on the Diffuse option you'll see a small door looking object, what you need to do is click on this and it will bring up an option box, now click on 2d file (or something like that) and then the folder and open up the texture that was associated with that pong area we selected just before.

Got that done? Good.
Lost? Wait for the video tutorial it shows it nice and clearly ;)

Ok if you followed me this far, what you need to do now is close out any windows open except the Hypershader, Hypergraph and of course maya.. Shrink down Hypergraph and once again right click on the pong texture, tell it to select all materials for this texture and then right click on the HW2Shader and click Assign to selection.

If you did everything right, it will show up the texture now on that area.

Ok.. to save us some time, Duplicate that HW2shader (edit-duplicate or ctrl-d) now just edit the texture on each of the new shaders you make (it automatically clears the material off anyway) and then once you have done this go through and assign each shader to a section that a pong shader was on (if you have an area that uses the same texture twice but has a diffrent shader just REUSE the existing HW2 Shader it saves space and it saves time)

Ok now go to edit, and tell it to delete unused nodes.. the pong nodes should all vanish from the hypershader.

What you should have now.
- All the layers from the previous steps
- A bunch of HW2Shaders with textures
- A mesh that shows up textured
- A Lambert shader.

Ok if you have that we can continue to the next step.

5.
Delete the Temp layer... how? Right click - delete.

Got that done? Good.

Ok now, With the ship layer, right click tell it to select all in the layer then go to either edit - duplicate or press ctrl+d, it will duplicate the mesh.. now with out off clicking from it (deselecting it) right click on the CM layer and assign the selection to this layer.

Unhide the CM layer, Hide the SHIP layer you should now have the exact same model. If you do good.. if you don't wait for the video tutorial again.

Ok, now in Hypershader you need to create a new PHONG node, create - phong, then click on the black area then click up on the menu area where it has an arrow that looks like go back a step.

Ok now right click on CM and tell it to select all in layer, then right click on the new shader and assign it to it.. the mesh should go grey.. then close the hypershader.. your done with it (yay!)

Ok now we get into the REALLY fun part (yes that was said sarcastically) Which will be in the next part of this tutorial :D Yes that is right the Setting up of the Hirachy using Joints and markers.


---end of this segment-----

Ok if your wondering about the shaders here, in this section and where the attribute info comes from, go to the relic forums and into the tanis ship yards under archive dump there is a thread stickyed by me, it has a lot of info on the shader attributes here.. and believe me when I tell you there are more then you know. For the shake of this tutorial i've used just the ship.st shader but.... you would normally use a few more on larger ships at the least and this also means learning more then the RDN doco tells you.. because they ahve diffrent layers they referance then the Artpipline tells you about...

The major one is thrusters.st which is used for if you want to have two states of a texture durring movement and not moving ie: Engines bright and alive when moving, Engines off when not.
The other is Badge.st which is the badge texture.

Another note is that in this tutorial I will not be covering engine glows, sorry if you want that info feel free to ask me by msg or the like but i don't see much call for engine glows in star trek [img]tongue.gif[/img]

Nor do I cover Engine Trails, or as you may have seen I haven't covered doing badge textures, team textures etc etc etc.

If you did get confused by this remember that I'm doing it from memory, the steps are all in order but I can't see the actual 'menus' to give you the exact names at the moment.. the video tutorial will show this a lot better.

Also remember that you can contact me and I'll happly when I'm at home and not busy help you out over AIM/ICQ/MSN.

-Rob

Posted: Mon Jun 28, 2004 1:12 pm
by Starfleet
Ok sorry for the delay in the video part, it'll be up tomorrow it's rendering out now as we speak.

Posted: Tue Jun 29, 2004 4:21 am
by Starfleet
I've been promising...

http://www.star-fleet.org/tutorials/maya.rar

And I do deliever 38mb dl and a 380ish Mb Mov file. Showing everything visually.

Though you need the info above to work with it ;) or some idea of how maya works :D

Posted: Thu Jul 01, 2004 1:51 am
by Starfleet
and the last part.

------
Ok The next Step.. You asked for it and here it is.. By Now I suspect you've looked at the Tutorial in it's visual format, or at least I presume you do because It shows you everything I've been telling you. So moving along...

By Now you should have the Fully Textured Model with Homeworld 2 Shaders inside Maya, It should be on the layers it needs and you should be ready to begin the Hiirachy, if you are not this far along Go back and look over the other parts of this tutorial they explain everything up to this point.

Good.

Ok First things First, you need to change Maya here into Animation Mode, this is fairly simple, up in the left hand top corner is a drop down box, click it, move it to animation.. The Tool bar changes.. Yay..

Now you need to bring up all 4 views if you don't work in them already, press space, once over a window, it should change you into the standard 4 view look of Perspective, Top, Left, Back/Front.

Got that Far? Great, ok move your camera out to view the mesh then move up to the Skeleton Menu, in here you'll notice a few thousand little options the one your after is called the Joint Tool and you want to click the little box next to it, Why? Because we need to change some of it's default settings that's why... Unless of course you want really Funky Messed up joints that don't face how you expect them too? Nnah didn't think you wanted something like that.

Ok that brings up the Joint Tool's attribute window which has a few options all you need to worry about is that it's set as follows:

Degrees of Freedom: All Ticked
Auto Joint Orient: None
Scale Compensate: Ticked
Auto Joint Limits: Unticked
Create Ik Handle: Unticked

All the rest default.

Ok got that done? Great, your learning and I'm having to baby you less and less, Which you'll notice I'll be doing a lot less of while we move along. Close the window, and move the cursor in one of the views to the part of your ship you want to be the 'pivot' point, click and you'll notice a joint appears, great.. This will be the Root joint for the ship, Remember that because every other joint your gonna make comes off this one.

Ok Now move to the back of your ship, a little bit off the mesh and click again it will create a joint that is joined to the root mesh, this joint will be our engine nozzel joint.. A word to note if we where doing ships with engine glows and the like, the Engine Objects would all end up attached to this item.. Also you can have multipuls of them. But for the sake of this one.. Sorry guys Like I said I'm not going into that stuff.

Ok Got that joint in? Good, hit the up key on your cursor padd, it SHOULD move you back to that root joint, this is how you move up the Hirachy of joints with out having to constantly move back to the hypergraph or the like.

Now move to where you want some weapons, yeah were about to start the weapons hard pointing, in the position from the top view where you want the weapon to sit, click and it will make a joint, now Given Maya uses a 3 button mouse system I'm guessing you are as well, click the middle mouse button over that joint and you'll be able to move it around in any of the views, do So until it's roughly where you want it, now using a normal click, move the mouse to roughly where you would expect the gun to fire from in the case of star trek this will most likely be On top of the point you just selected this doesn't matter.. This joint will later become the Weapon_name_Muzzle joint, just like the one before it will become the Weapon_Name_Position joint.

Ok got the muzzle joint all lined up where you want it? Good, hit the up key and make another joint out in the general direction where that weapons 'Front' is, move it in position and remember it.. This will be the Weapon_Name_Rest joint. Finally make one pointing in the direction of which this thing will fire for the most part, generally this is a straight up or down joint. Ok got that done? You guessed it this will be the Weapon_Name_Direction joint.

Pressing up until you get back to the root joint, repeat putting in the weapons like above until your done.. Not we'll put in a nav light joint.

Nav Light joints are easy, because there single joints, created like above, so all you have to do is move the joint to where you want it and name it right and it loves you.

Ok now for a production/hardpoint system.. These are a little diffrent to a weapon but not by much, you again put in the position where you want them.. the rest joint off that joint to show where it's front is and the direction one to show where it's 'Up' is but after this you don't need the muzzle joint..

Ok Capture points, Repair Points and markers?

For these you can either make them yourselves, the first two are easy enough there just more joints and if you've worked out the lot from above you know how to do that by now.. Otherwise, you can do something that's a little bit of a cheat but works.. In the files given to us by relic you'll notice that all of these things are in them.. drag 1 of each off the root hirachy... Oops haven't told you how to do this yet have I? It's fairly simple, in the hypergraph use your middle button click drag.. off to the side.

Got that? great...

Now click on the marker you just moved off. Go to File - Export Selected Object and export it as marker.ma

Do the same for the Capture and repair joint

Open up the ship you've been working on again

go to file - import - and import the other files.

Bang now you have 1 copy of each in here, you can duplicate for more lot easier then setting them up one after another.

Now you have all these joints done and your itching to see how it looks in HW2, it looks about right to you... sorry to tell you.. your not finished yet.

But on the good side the next part is easy.

Open up the hypergraph editor, attach everything to that root joint. Got that done? Great.

Now you just have to go through and name all your joints. Remembering a few rules.

Weapons all are done as Weapon_Name_Jointtype
Harpoints etc are all Name_Jointtype
Navlights are all Navlight#
Markers are all Marker#
etc etc

Once all of these are set up right then you can save the ship.. you have been saving as a .MA right? Good..... then go to edit, delete history... we don't need that junk now.

ok now go to File Save.
Then to file - export, little box.

Up comes the export menu right?
Goodo.

The options are set as following:
File Type: hod
Export Type: Ship
Texture Options: DXT5
Otimization Options: Triangle List
Merge Vertices: Merge
Normal Mapping options: None

then click
export all.

Go to your homeworld/data/ship/shipname dir type in the name, hit save/export or what ever it is.. and watch maya work.. so long as you didn't screw anything up you'll get no errors and of course it'll not lock up etc etc etc

go check the directory... you have a all_galor.hod (in my case) sitting there?

Great, it's done go try it out in game, and No I will -not- tell you how to make a .ship and .event file to go with it.. learn this yourself or better yet.... Use the Relic Excel sheets

-Rob

----

Posted: Thu Jul 01, 2004 2:32 am
by Redragon
Excellent! I'm gonna go ahead and stick it on the site.