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

Custom model processor... HELP!

Last post 04-17-2008 2:28 AM by Nordic. 4 replies.
  • 04-11-2008 4:16 AM

    Custom model processor... HELP!

    I'm new to XNA so I'm not so familiar with it, but I need help with writing a custom model processor..
    I've tried some example code but they only work with the FBX it came with, and not mine.

    My FBX is a level with a bunch of textures, normal maps and specular maps. What I would like my processor to do is store the normal maps and specular maps in the mesh's effect's so that I can access them at runtime just like the diffuse maps.

    Is there a simple way of doing this?
    Is there any tutorials for this?
    Do you know how to achieve this?

    If I was unclear, please tell me.
    I appreciate any help I can get.

    Thank you for reading this.
  • 04-11-2008 11:44 AM In reply to

    Re: Custom model processor... HELP!

    The normalmapping sample on this site sounds pretty close to what you need: have you looked at that?

    It uses a string attribute from the original FBX file to decide which texture to use as the normalmap, but that could easily be changed to pull that data from somewhere else (for instance you might just use a convention based on the filename of the diffuse map, where seeing bricks.png would cause your processor to also load bricks_normalmap.png or something like that).
    XNA Framework Developer - blog - homepage
  • 04-11-2008 2:15 PM In reply to

    Re: Custom model processor... HELP!

    Answer
    The right way to do this is to export the mesh with an Effect that has all the right maps configured. Then you can ask for the EffectParameter for the various maps. I don't know if FBX actually allows you to author and capture effects like that, but I know that the .X file format and 3ds Max does.

    Jon Watte, Direct3D MVP kW X-port 3ds Max .X exporter kW Animation source code
  • 04-11-2008 2:32 PM In reply to

    Re: Custom model processor... HELP!

    FBX doesn't currently support D3D effects as materials. That's coming in the next version of the Autodesk exporters, and we'll be picking up that feature for the 3.0 framework.
    XNA Framework Developer - blog - homepage
  • 04-17-2008 2:28 AM In reply to

    Re: Custom model processor... HELP!

    Thank you jwatte.. this helps me alot. I will be looking at how to use .X in XNA. Thank you!
Page 1 of 1 (5 items) Previous Next
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG