Halo 2 Rendering

This is where the Admins will put tutorials submitted by users.
Post Reply
User avatar
Darco




Conceptionist

Posts: 1299
Joined: Sun Apr 16, 2006 12:03 pm

Halo 2 Rendering

Post by Darco »

Due to the amount of questions ive received on aim i am making this. If you have questions about this, do not IM or pm me asking them, post the questions here.

What you will need.
Entity Ultimate Edition V1.6
ADI v2.0.1
(Halo 2)Model Extractor Library. (Updated Jan 23rd, 2005)
3d Studio Max.
Cubemaps posted by Veegie and Aequitas

Something to extract the alpha channels.
Photoshop
Gimp

1; Extracting the model.
Open up ADI, and load mainmenu.map
Go to the model tag [mode] and find objects\characters\masterchief\masterchief
Then click the house icon and export the chief in obj format. Close ADI as it is not longer needed.
Image

2; Importing into Max.
Open up 3d Studio Max, and click file -> import.
Now search for where you exported the masterchief model and import numbers 16-19.
Image
Image
Make sure these are your settings before you import, because if you have normals checked max can crash.
Press F9 and you should get something similar to this.
Image
You'll notice the holes and that the masterchief has no materials/textures.

3; Getting the model ready for materials.
Open up the Material Editor (M by default) and pick 3 slots you want to use for the materials. Name them Armor, Visor, and Emblem.
Next, select all the parts of the armor, and apply the Armor shader to them.
Image
Now do the same for the visor and the Emblem.
Image
Now, to fix the "holes" we need to weld the verts. But first, we need to attach all the parts of the mesh. For the sake of the tutorial, i am not going to use the emblems. So ill delete them, but ill show you how to make a basic material for them at the end.
Go ahead and select one part of the mesh, then right click and click attach. Now, left click all the parts of the mesh until every part has been attached. When you go to attach the visor, check Match IDs to Material.
Image
Now that all the pieces are attached, we can weld the verts.
Under the edit mesh modifier, select vertices and proceed to select all the vertices of the masterchief model. Now scroll down in the modifier until you see weld. Enter .001 and press Selected.
Image
Image

Next, select all the faces and click unify.
Image
Image
Now its time to get the textures.

4; Exporting the textures.
Use Entity to export all the necessary textures.
You will need:
Objects\Characters\Masterchief\bitmaps\Masterchief
Objects\Characters\Masterchief\bitmaps\Masterchief_bump
Objects\Characters\Masterchief\bitmaps\Masterchief_cc
Objects\bitmaps\detail_maps\metal_dirty
*Note, for the detail map, whatever you do do not export as dds. The alpha channel messes it up in max.
I find it easiest to export as .bmp but thats up to you. You at least need to export them in a format that handles alpha channels.
The button to export bitmaps in entity is in the top right hand corner, its a blue circle with a white plus on it. Click it, then click Save Bitmap.
Image

5; Getting the textures set up in Photoshop.
Now, open up all the textures you just exported in photoshop, gimp, or any program that handles alpha channels.
For the main diffuse map, go to channels and click the alpha channel. Now press Control + A, Control + C, Control + N, Enter, Control + V. Now save as masterchief_alpha in any format you wish. (name it whatever you want) This is the specular map for the masterchief.
Image
Now, open up masterchief_cc. This is the color change map, it is responsible for masking off the areas that you want to add color to, and keep the areas that you don't want to add color to the way they should be.
This part is a bit tricky if you haven't ever done it before. You need to select both the green and red channel and make new bitmaps out of them using the same technique that you did to create the specular map for the masterchief. Once you have them separated, you need to make sure that the areas you copied are white and the backgrounds are black.
Image
If you dont get it right the first time, try again changing the levels if needed. Once you have both the secondary (green channel) and the primary (red channel) then we can go back to entity and max and start setting up the materials.

6; Creating the materials.
First, find the masterchief shader tag [Shad] in entity. On the top of the third column, click the word tools and then click Meta Editor. Scroll all the way down in the middle column and you will see some important boxes.
Image
Under Rescources, just change the numbers to see which bitmaps are used. Of the ones listed, the ones we will use are the cc, bump, detail map, cubemap and main texture.
Under that is specularity, this is the specular level of the material in max. 1 = 100. If it were to say .4, the specular level would be 40 etc.
How you set up your shader is a matter of personal preference. For this tutorial, use the way i set up mine and then experiment later on to see how you like it best.
Go into the diffuse color slot of the material, and Create and RGBMultiply.
Image
In the first slot, add metal_dirty. Now, detail maps are very small images and thus they need to be tiled. To find out how much to tile the bitmap, go to the top of the center column of entity and click tools -> show -> show invisibles. Then select OK. You will notice that the column changes. Now scroll up until you see the box with the words Detail Tiling/Falloff Colors. The first set of numbers are 9x9, this is where you find the detail tiling of most detail maps. For some models such as the skin on marines, you must scroll down under the words Detail Tiling/Falloff Colors to find the detail amounts.
Image
Go back into max and tile metal_dirty at 9x9.
Image
Now, in the second row of the RGBMultiply, add a composite.
Give it three slots.
ImageImage
In the first slot, put the masterchief texture. This will complete the rubber.
Image
In the second slot of the Composite, create an RGBMultiply with the diffuse texture in one slot and a mask in the other. Do this for the third slot of the Composite as well.
Image
In the first mask (Second Slot of the Composite) put the primary armor cc map in the mask slot. This will mean that the second slot of the Composite controls the primary color of the masterchief. Do this to the third slot of the composite, only instead use the secondary cc map. Now that you have this set up, you're ready to get the multiplayer and campaign colors. You need to create a composite with 20 colors. Tural posted the Multiplayer colors a while back. To get the Campaign color, you need to go into the masterchief bipd tag and show the invisibles in entity. Scroll down until you find the word permutations, and multiply the first 3 numbers by 255 to get the RGB colors for the campaign color. Make an RGBTint in the first slot of the composite for the colors, and name it Campaign. Then add in the RGB colors for it.
Image
Image
Do this for the rest of the colors that Tural provided, but make sure you only check one at a time in the composite. Im using campaign for this tutorial. Copy the color composite to both the map slots of the primary and secondary areas of the masterchief armor material in max.
Image
Image

Now, onto the specular color of the material. You get the specular colors in the same way you get the diffuse colors, only you get them from where you got the detail tiling numbers. Create a falloff in the specular color slot.
Image
Now in entity, go back to where you found the detail tiling information. Scroll down to 10 and 11. Get the first three numbers of each of those, multiply them each by 255 and set them as the RGB colors off the falloff.
Image
Image
Next, set the masterchief_alpha or whatever you named it in the specular level slot.
Image
Move down to the bump slot, add a normal bump and place the masterchief_bump in the normal map slot. Set the bump level to 100.
Image
Image
Image
Finally, all that is left for the armor material is to add the reflection.
This part is very important, so make sure you follow along very carefully. Im not going to show pictures of each step.
Drag the falloff that is in the specular color slot to the reflection slot and click Copy. Click that falloff, and where it says falloff on the right about mid way of the material editor window, click it. Now click RGBMultiply and click Keep Old Map as Sub-map. In the bottom slot of the rgbmultiply, add the masterchief_alpha texture. this will keep the reflections off the rubber. Now go back to the falloff, and do the same thing to make it into an rgbmultiply. This time though, in the bottom slot add metal_dirty and tile it 9x9. (remember from earlier?)
One last time, make the falloff the first map of an RGBMultiply. This time though, for the bottom slot create a black RGBMultiply. In one slot of this blank Mutliply, add a Reflect/Refract. Now, extract the cubemaps you downloaded earlier and find the masterchief_armor cubemap. In the reflect/refract, click from file for the scource. Now move your mouse down and click up. Find masterchief_armor_up and double click it. Go back to the rgbmultiply that has one black slot, and click and drag the Reflect/Refract into that black slot. Click Instance.
Image

Since im tired (been working on this for two hours now) im going to show how do to the visor quickly. I will edit the post with how to set up an emblem material later.
For the visor, put the masterchief texture as the diffuse color.
For the specular color, get the falloff colors the same way you got the armor colors.
Specular Level = Masterchief_alpha
Bump is the same way as before.
Do the same thing with the reflection, but use the mirror_surface cubemap.
Image

Congrats, you should have just created a close to ingame looking masterchief material. There are some other tricks, but i cant tell everything.

And here is the material tree. hopefully today if im not busy i can show pictures for the visor and how to set up an emblem. but right now im on my lunch break so i cant.
Image

7; Emblems.
First of all, i wasn't planning on doing this. But since i mentioned it earlier i might as well do it because of all the people asking how to do it.
The people at High Resolution Halo, were very kind to help us out, although unintentional Im sure. Here i got an extremely awesome picture of some Halo 2 emblems. I chose to use the third from the top left for this example since it is very clean. Using photoshop, i made three textures of this.
ImageImageImage
Now, in max i make a new material and set the first slot of the diffuse as a Composite. For this particular emblem, i can either have one slot or two slots for the composite. However, I think i want to be able to have the two shapes be separate colors, so i need two slots. In each of the two slots for the composite, you will need a mask. The reason all the pictures above are in black and white, is so they can act as masks. For the mask slots in each mask, you will put the textures with only one shape that i posted above. The third one, the one with both shapes will be our opacity mask. In the map slots, creat an rgbtint and set it to whatever color you want it to be. You have just succesfully made the emblem materials :)
The only thing holding you back, is the uv map. I will post the correct .uvw later on tonight.
ImageImageImageImage

Image
ImageImage

Final Edit:
8; The Emblem UV map.
You may want to adjust the scale a bit, since i have no way of getting the actual uvw map. Right now, it is to my liking. To use this, add the uvunwrap modifier to the emblems, and click load. Then search for this file and you're done. Lastly, you may need to use a shell modifier on the emblems and adjust the outer limit to around .01. Have fun guys :)
Attachments
Emblems.zip
Enjoy.
(928 Bytes) Downloaded 48 times
Last edited by Darco on Fri Jun 01, 2007 7:30 pm, edited 7 times in total.
User avatar
Pyroman




Recreator Artisan Connoisseur Enthraller
Droplet Firestorm Blacksmith

Posts: 2451
Joined: Thu Jan 13, 2005 5:18 pm
Location: Bakersfield, CA
Contact:

Post by Pyroman »

Awesome. You helped me get my first MC rendering looking good. And now you're helping every else. Great guy!
Image
Listen to Protest the Hero.
User avatar
Tural




Conceptionist Acolyte Bloodhound Recreator
Socialist Connoisseur Droplet Scorched Earth
Grunge

Posts: 15628
Joined: Thu Jun 16, 2005 3:44 pm
Location: Lincoln, NE
Contact:

Post by Tural »

Observations:
1) Your model extractor library is old. New version pictures. When you import the meshes, you should import the ones ending with "base.5.obj"
2) The holes in the mesh should not be there. You need to uncheck the Unify box on the import window. (This could also be partially caused by the old model library) There should not be holes when importing.
3) My Max has never, ever crashed with Normals checked. I always have it checked. This is probably another problem caused by your old library.
4) BMP probably isn't the best format to extract textures to. You should simply use DDS as it won't lose quality and saves the alpha channel as well. For the detail map, simply extract to JPG if it has problems with DDS.
User avatar
GametagAeonFlux




Bloodhound Acolyte Orb Commentator
Pyre Socialist

Posts: 9320
Joined: Sun Jun 06, 2004 7:27 pm
Location: Lincoln, NE

Post by GametagAeonFlux »

Tural wrote:Observations:

2) The holes in the mesh should not be there. You need to uncheck the Unify box on the import window. (This could also be partially caused by the old model library) There should not be holes when importing.
This is true, but even in that situation, I've found using a double sided material fixes the problem just as well as your method of welding vertices.
User avatar
Darco




Conceptionist

Posts: 1299
Joined: Sun Apr 16, 2006 12:03 pm

Post by Darco »

True. On Lord Hood if you weld it gets messed up so double sided works great for him.
Image
=[
User avatar
Tural




Conceptionist Acolyte Bloodhound Recreator
Socialist Connoisseur Droplet Scorched Earth
Grunge

Posts: 15628
Joined: Thu Jun 16, 2005 3:44 pm
Location: Lincoln, NE
Contact:

Post by Tural »

Or you could just do it properly, where there aren't holes in the mesh at all...
User avatar
Veegie




Socialist Architect Coroner Golden Age
Mad Hatter Acolyte Translator New Age
ONI

Posts: 3638
Joined: Wed Nov 26, 2003 2:28 pm
Location: Redmond, WA

Post by Veegie »

Tural wrote:4) BMP probably isn't the best format to extract textures to. You should simply use DDS as it won't lose quality and saves the alpha channel as well. For the detail map, simply extract to JPG if it has problems with DDS.
.bmp retains alpha channels.
Image
Hijikata wrote:The fact you love Jesus doesn't change the fact you're a *** mental patient. It just means you're a mental patient with a great imaginary friend.
User avatar
Tural




Conceptionist Acolyte Bloodhound Recreator
Socialist Connoisseur Droplet Scorched Earth
Grunge

Posts: 15628
Joined: Thu Jun 16, 2005 3:44 pm
Location: Lincoln, NE
Contact:

Post by Tural »

Hence I said "as well." I was saying that DDS retains it much as BMP does, and will generally have a much smaller file size while not sacrificing any quality. (Quality is a comparative reference to how Entity saves JPGs, with reduced quality)
User avatar
Darco




Conceptionist

Posts: 1299
Joined: Sun Apr 16, 2006 12:03 pm

Post by Darco »

from my experience, using .dds doesnt give a very good result in max. it could just be me, but that is the reason i use .bmp for textures.
Image
=[
User avatar
Tural




Conceptionist Acolyte Bloodhound Recreator
Socialist Connoisseur Droplet Scorched Earth
Grunge

Posts: 15628
Joined: Thu Jun 16, 2005 3:44 pm
Location: Lincoln, NE
Contact:

Post by Tural »

Probably because Max tends to default to using the alpha. You need to change the alpha source to none in the bitmap settings.
User avatar
Veegie[Temp]




Firestorm

Posts: 2849
Joined: Thu Jan 29, 2004 11:30 pm
Location: Logan
Contact:

Post by Veegie[Temp] »

That still doesn't solve all the problems.
The alpha still bleeds through the diffuse via .dds textures.
See: Prophet head bitmap.
Image
Hijikata wrote:The fact you love Jesus doesn't change the fact you're a fucking mental patient. It just means you're a mental patient with a great imaginary friend.
User avatar
Tural




Conceptionist Acolyte Bloodhound Recreator
Socialist Connoisseur Droplet Scorched Earth
Grunge

Posts: 15628
Joined: Thu Jun 16, 2005 3:44 pm
Location: Lincoln, NE
Contact:

Post by Tural »

I haven't noticed any differences between using a dds with the alpha source set to none and a plain jpg image. I'll trust your judgment though, as you probably know what you're talking about more than I do.

Personally, I just manually resave my images as JPGs. Now that I think about it though, it may be beneficial to mess with Ch2r or Entity to make it save in lossless JPG format.
User avatar
Dalto11





Posts: 68
Joined: Sun Mar 18, 2007 10:28 am

Post by Dalto11 »

Darco, this is what I've been waiting for

sorry for the double post guys, but I need some help, I can't get the visor right:
Image

I'm done for tonight but any sugesstions would help, I'm gonna check Treps MC Texture tree to see where I messed up at. I think it was in the cubemaps.
Jordan





Posts: 1167
Joined: Sun Nov 28, 2004 7:46 am
Location: Certified Masshole

Post by Jordan »

Well, I would say so too, seeing as there are no visible cubemaps on his visor. Also, your bumps look horrible. Are you sure you're using the ones extracted from Entity UE 1.6?
Maybe if Darco posted his material tree you could have a better understanding of the visor/armor shader... :P
User avatar
Darco




Conceptionist

Posts: 1299
Joined: Sun Apr 16, 2006 12:03 pm

Post by Darco »

Jordan wrote: Maybe if Darco posted his material tree you could have a better understanding of the visor/armor shader... :P
Done.
Image
=[
User avatar
Dalto11





Posts: 68
Joined: Sun Mar 18, 2007 10:28 am

Post by Dalto11 »

Jordan wrote:Are you sure you're using the ones extracted from Entity UE 1.6
I can't:
Image

seems as though it's screwed up :(
User avatar
Darco




Conceptionist

Posts: 1299
Joined: Sun Apr 16, 2006 12:03 pm

Post by Darco »

you do know, that if you have the height map you dont need the normal map right? and anyway, since you have the height map you can just convert it to a normal map.
Image
=[
Jordan





Posts: 1167
Joined: Sun Nov 28, 2004 7:46 am
Location: Certified Masshole

Post by Jordan »

Darco wrote:you do know, that if you have the height map you dont need the normal map right? and anyway, since you have the height map you can just convert it to a normal map.
What what?
User avatar
Darco




Conceptionist

Posts: 1299
Joined: Sun Apr 16, 2006 12:03 pm

Post by Darco »

umm, its a yayap thing.
Image
=[
User avatar
Dalto11





Posts: 68
Joined: Sun Mar 18, 2007 10:28 am

Post by Dalto11 »

I just convert the height map in CS3 right? Adding the height map as a additional bump alone made it look better, but I'll try what your saying. I still can't get the cube maps working, buggers are tricky :P
but this is what I have now:
Image

very little change I know, but I fixed it up to Treps Tree and such
Post Reply