Jump to content
  • Advertisement
Sign in to follow this  
george7378

Getting normal maps from Blender to D3D

This topic is 2077 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everyone,

 

I'd like to try and implement some normal mapping in my game, and since I have created and textured all my models (exported as .x files) in Blender, I figured that there might be a way to apply normal maps to a mesh in Blender itself, and then export the model fully normal mapped and ready for use. Is this possible, or is this a bit too easy to be true? Also, what tutorials would you recommend to implement bump mapping/normal mapping in D3D itself? I've found a few scattered around, but most of them are just code snippets in forum posts.

 

Thanks!

Share this post


Link to post
Share on other sites
Advertisement

As there are many different ways to access D3D (9.0c I assume) functionality, can you elaborate on which language you would be using. As far as I am aware the .x format only allows one texture / uv map per mesh, which rules out incorporating normal or bump maps into the file. If it was me, I'd go with a different format such as obj or fbx as they are far more geared towards this sort of thing.
 

Aimee

Share this post


Link to post
Share on other sites

Hey - yeah, I'm using 9.0c with C++ (VS 2012). I have been wondering about whether or not it's possible to use more than one texture stage state with .x files, and now I can see that my question is answered! I suppose there's no easy 'default' way to load in things like .obj or ,3ds files using DX? Ah well, I'll see what I can do!

Share this post


Link to post
Share on other sites

Well if it helps, OBJ is actually a really easy format to parse yourself, though there are many implementations around anyway. And FBX although not so easy to parse, can be loaded with Autodesk's own provided sdk which a quick Google will get you where you need to go. On the flip side when it comes to c++ maybe it might be more useful to find an engine that provides the functionality you are looking for out of the box (after all the developers have taken the time so you don't have too) maybe something like irrlicht: http://irrlicht.sourceforge.net/

 

All the best.

 

Aimee

Share this post


Link to post
Share on other sites

Hi - yeah, after looking around it seems like I'd have to use some sort of 3rd party parser. I guess I could write a shader which, assuming that the normal map is the same as the texture in terms of coordinates, would do a per-pixel calculation of the light by looking at the normal map on a per-texel basis...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!