Aug 17

image

 

When we last left our project we had applied a phong shader to our TopHat.com model by dragging and dropping it onto the surface of the meshes that (the trunk and the brim) that make up our model) . We had verified that it looked correct by looking at the model in the tree view explorer in the mod tool..

shaderverify

Remember you have to map all of the polygons and surfaces of your model or they may not get their surface to show up later on..  and we were looking at the Direct X 9 Model.. It didn’t look like much with the shader just on it’s default settings, so lets make it more interesting..

So Next we have to change modes from “Modeling Mode” to Rendering Mode..


modeswitch

 

After that Modify will appear below and the Materials button will be under that, so click the materials button to bring up the materials manager..

image

The materials manager will look something like this if you have just the brim mesh selected..

image

If you look closely at the shader map you will notice that there are a number of “PNG” files feeding into the shader..

image

Click on the phong shader map (you can see above in blue) to bring up the properties.. this brings up the phong shader properties, we are going to select the Ambient Map and click on the New->New From File.. menu to replace the default color map for the phong shader..

ambientreplace

Next we are going to select a color map from our project..

image

I have created a file called puple_ambient_map to match the color we want our TopHat to be.. Make sure that the file is in your XNA content folder from your VS2010 Solution file (so it can be used later, NOT in the XSI FOLDER  that it defaults to).

What is this file? It’s simply a purple shaded square..

If you look at the DirectX 9 View of the camera view you will notice that the “Brim” mesh of the TopHat object that we selected now has our purple mapping..

image

Tags: