XNA Creators Club Online
Page 1 of 1 (4 items)
Sort Posts: Previous Next

How to do models with Normal/Glow/Specular/Texture maps

Last post 03-25-2008 3:31 AM by Jontti. 3 replies.
  • 03-21-2008 12:06 PM

    How to do models with Normal/Glow/Specular/Texture maps

    I really like how the models in Ship Game look.  Some parts of the object glow, some parts are more shiny, and the normal maps make the models look great.   I've studied the code enough to understand for the most part on how the four textures are being processed in the shader to get the desired effects.  Now I would like to know to create/export models like this so the normalmapprocessor (or something similar) can read in the fbx file, and properly import those 4 texture maps.   I am too busy to really get into modeling but if I get a modeler to help me with my game, I would like to be able to communicate to him how I want the models to be done.
  • 03-21-2008 12:39 PM In reply to

    Re: How to do models with Normal/Glow/Specular/Texture maps

    Typically you will create the model in a tool that supports shaders. For example, 3ds Max with the Direct3D shader material. Then you simply configure the shader and its parameters (textures, etc) in the tool, and export it. I don't know if FBX supports shaders, but the kW X-port .X exporter does, and the COLLADA exporter does.

    Jon Watte, Direct3D MVP kW X-port 3ds Max .X exporter kW Animation source code
  • 03-21-2008 6:06 PM In reply to

    Re: How to do models with Normal/Glow/Specular/Texture maps

    I'm more interested in the way Ship Game does it.  That way (as a programmer without access to 3ds), I can change the shaders to what I want.   From looking at the FBX files there are 4 UV channels,  one for each texture map.  The shaders in ship game then do the magic to produce the effects.
  • 03-25-2008 3:31 AM In reply to

    Re: How to do models with Normal/Glow/Specular/Texture maps

    You need to have an application that can use the right shader (The HLSL shader programmed for you application) to get a "WYSIWYG" (What you see is what you get) rendering.

    In order to use more than a just a diffuse map (Color texture) on an FBX you need to have a HLSL that calculates the effects correctly and in some way add the extra textures information in some way so your application can read it.

    If you take a look at the Normal Map Example...
    http://creators.xna.com/Headlines/developmentaspx/archive/2007/01/01/Normal-Mapping-Effect-Sample.aspx

    In that example they'll shoe you how to calculate the model to have binormals etc. to use for normal maps and if you take a closer look they have added an extra parameter in the FBX file to tell the application what normal map to use.

    Within the application you can see when and how they add the textures to the HLSL shader (*.fx file) to get a nice normal map effect on their model.

    Once you've figured this out you can simply create your own shader with Mental Mill Artist Edition or FX Composer (both are free and can be downloaded at http://developer.nvidia.com/)

    As for the UVs...
    As long as you don't have different UV layouts for each texture you just need the first and use that for all textures...

     

Page 1 of 1 (4 items) Previous Next
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG