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

Do you think I can get Normal Mapped stuff into XNA with only...

Last post 04-02-2008 6:49 PM by wqp. 5 replies.
  • 03-30-2008 7:35 AM

    Do you think I can get Normal Mapped stuff into XNA with only...

    I have ZBrush3.1 and Cinema 4D R8.5 (bodypaint, but not advanced render).  (also have milkshape)

    So between ZB and C4D I can make stuff okay.  But I don't really have a way to directly put normal maps on things and export as FBX.  Is there some way maybe even just to get an effect in XNA where you can specify a texture and a normal map (using same UV coordinates for both), and just get it into XNA?  Any free utilities for stitching this together (the textured object and a normal map) and spitting out an FBX?


  • 03-30-2008 2:34 PM In reply to

    Re: Do you think I can get Normal Mapped stuff into XNA with only...

    You can export just the diffuse texture and texture coordinates into FBX, and import into XNA. Then you can assign a new shader, that applies the appropriate normal and gloss map, once you've loaded the geometry. The simplest way to do this is to assign the effect and texture values after calling Load<Model>(), but a cleverer way would be to do it in a custom model processor. If you name the normal map that goes with the diffuse texture "mytexture.tga" something known, like "mytexture-normal.tga," then the content processor can automatically find and attach the normal texture.

    Or you can upgrade to 3ds Max and use the kW X-porter, which allows you to export any Direct3D shader that you can use in Max :-)

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

    Re: Do you think I can get Normal Mapped stuff into XNA with only...

    jwatte:
    a cleverer way would be to do it in a custom model processor. If you name the normal map that goes with the diffuse texture "mytexture.tga" something known, like "mytexture-normal.tga," then the content processor can automatically find and attach the normal texture.


    If you want to go this route, check out our Custom Model Effect and/or Normal mapping samples.

    Our normal mapping sample actually chooses the normal map filename using a metadata string that we defined in Maya, which is then looked up in the processor, but it would be trivial to change this to use a naming convention like Jon suggests (and probably easier to use that way).
    XNA Framework Developer - blog - homepage
  • 03-31-2008 4:26 PM In reply to

    Re: Do you think I can get Normal Mapped stuff into XNA with only...

    One chapter from a tutorial of mine deals with a custom content processor which also loads normal maps.

    You can read it here. The route I chose was an extension of the method used in the Normal Mapping Sample. The normal map may be: specified for the whole model by the user, through content processor parameter; or searched in the Texture Keys of the model, or, if all else fails, searched by using a specific format for the texture name.

  • 04-02-2008 7:56 AM In reply to

    Re: Do you think I can get Normal Mapped stuff into XNA with only...

    Thanks I will check some of this stuff out!
  • 04-02-2008 6:49 PM In reply to

    Re: Do you think I can get Normal Mapped stuff into XNA with only...

    Well I actually did get things to work somewhat based on the normal mapping sample, but nothing ever looks as good as it does in ZBrush itself, and the Zmapper options are overwhelming to say the least.  One odd I need to flip the textures vertically coming out of ZBrush (to show correctly in C4D or Blender). 

    Oh one weird thing...the FBX in the normal mapping sample I can double click on and see all the contents, but the Cinema4D FBX file will not open...there must be like an XML and a binary spec for that file format?  If I could just open the C4D generated FBX I could add my own tags etc.
Page 1 of 1 (6 items) Previous Next