Horde3D
http://horde3d.org/forums/

Normal maps working?
http://horde3d.org/forums/viewtopic.php?f=1&t=1707
Page 1 of 1

Author:  zoombapup [ 23.08.2012, 14:15 ]
Post subject:  Normal maps working?

Hey all.

Having a bit of an issue and wonder if anyone else sees this.

I'm trying to get normal maps working (as opposed to parallax maps) and seem to be having issues. Just don't seem to see any difference, even though the normal map texture and the normal map part of the shader are running (I output the normal map texture as rgb to check).

I'm assuming its something I've done, but has anyone else seen this? normals not working and such?

Author:  Roland [ 23.08.2012, 14:45 ]
Post subject:  Re: Normal maps working?

Hmm, I never had problems using normal maps, besides the usual "seam-fun" :wink:
Can you provide screenshots or a model sample?

The only thing I can think of is that you may forgot to set the shader flag in the material.

Example-Material:
Code:
<Material>
    <Shader source="shaders/model.shader"/>
    <ShaderFlag name="_F01_Skinning"/>
    <ShaderFlag name="_F02_NormalMapping"/>
    <Sampler map="models/Charlie/diffuse_body_statue.jpg" name="albedoMap"/>
    <Sampler map="models/Charlie/normal_body.jpg" name="normalMap"/>
</Material>

Author:  zoombapup [ 23.08.2012, 15:17 ]
Post subject:  Re: Normal maps working?

Yeah, shader flag is set. I think the issue is that the normal map I'm using is too subtle to get any detail. Also, I forgot to use the "allowCompression=false" thing.

Author:  zoombapup [ 23.08.2012, 20:44 ]
Post subject:  Re: Normal maps working?

Hmm, there's definitely something weird going on.

Try this: add two flat planes with different textures on. Add one with parallax maps next to one without. Then add an object that casts a shadow on both. The shadow on the normal mapped (or parralax) seems to have a less defined shadow than the simple diffuse. Like the default value of the normal map has reduced the shadowing somehow.

Weird.

Author:  Roland [ 24.08.2012, 09:11 ]
Post subject:  Re: Normal maps working?

zoombapup wrote:
Try this: add two flat planes with different textures on. Add one with parallax maps next to one without. Then add an object that casts a shadow on both. The shadow on the normal mapped (or parralax) seems to have a less defined shadow than the simple diffuse.


Image

I don't notice anything in a simple scene with one light using the "ground" model from the GameEngine Tutorialscene.

Author:  zoombapup [ 24.08.2012, 09:24 ]
Post subject:  Re: Normal maps working?

Hmm, that is strange. I'll try with the default texture used for parallax map and see if I get the same. Thanks.

Author:  zoombapup [ 24.08.2012, 09:52 ]
Post subject:  Re: Normal maps working?

OK, just to follow up. It turns out that it was an error in the .dds file I was using as the normal map. Checking the engine log found that it wasn't able to read the dds header properly and wasn't loading the normal map. Presumably substituting for some default that then bent the normal in the wrong direction.

Problem solved!

And the moral of the story is: check the engine log when things look weird!

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/