This project is read-only.

Normal map questions

Jul 16, 2009 at 2:47 PM

First of all status thanks for this great engine.

I currently have loaded in models with diffuse maps on them and also a generated model with a diffuse and normal on it (from the disk in the samples).

I was wondering if there was anyway to load in on a model

A normal map (from the model if possable)
I currently have the model being loaded in and it gets the diffuse it needs from the same folder it is in.
Is there anyway to do this for normals or specs? is there anything i have to do in the engine to get these loading in onto models? is there anything my artist should do for this?

And is specularity provided by a spec map or is it just uniform etc... how can i enable it on a model.


Thanks for making such a nice engine.
Also nice work having 25 tutorials !!!

Jul 16, 2009 at 2:55 PM

Thanks :-)

Internally it looks for a texture with a name like 'bumpmap' 'normalmap' etc. So if it finds it, it should automatically import it and generate the tangent frames, etc. However, content important and editing is something I have little experience with.
Hopefully someone else can chime in, although I'm pretty sure it's come up before.

As for specular, the alpha channel of the normal map is used to modulate the specular. This doesn't allow coloured specular, as that would have blown the shader count quite a lot.

Jul 16, 2009 at 2:59 PM

Ok. The names that are checked for are:

"Bump0", "Bump", "NormalMap", "Normalmap", "Normals", "BumpMap"

It's possible it's case sensitive. I'm not 100% sure as it relies on some internal XNA code.

Jul 16, 2009 at 3:17 PM

Wow
thanks for the quick reply

Are these the total names for them

Or would it be if i had a model called "Box.x" with a diffuse called "BoxTex.jpg"

Would it look for

NormalMap
BoxNormalMap
BoxTexNormalMap

Eather way it fine just wonderd if you knew

I assume its just NormalMap with no name appended but i will try it tommorow.

Thanks again.

Jul 16, 2009 at 3:26 PM
Edited Jul 16, 2009 at 3:27 PM

Internally the model file format will name each texture in it's material, so doesn't matter what the file name is. For example, the diffuse map is always called "Texture". :-)