Sign in to follow this  
george7378

Getting normal maps from Blender to D3D

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this