Horde3D

Next-Generation Graphics Engine
It is currently 04.10.2024, 16:45

All times are UTC + 1 hour




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Normal maps working?
PostPosted: 23.08.2012, 14:15 
Offline

Joined: 16.05.2009, 12:43
Posts: 207
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: Normal maps working?
PostPosted: 23.08.2012, 14:45 
Offline

Joined: 23.07.2009, 21:03
Posts: 51
Location: Germany
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>


Top
 Profile  
Reply with quote  
 Post subject: Re: Normal maps working?
PostPosted: 23.08.2012, 15:17 
Offline

Joined: 16.05.2009, 12:43
Posts: 207
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Normal maps working?
PostPosted: 23.08.2012, 20:44 
Offline

Joined: 16.05.2009, 12:43
Posts: 207
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Normal maps working?
PostPosted: 24.08.2012, 09:11 
Offline

Joined: 23.07.2009, 21:03
Posts: 51
Location: Germany
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Normal maps working?
PostPosted: 24.08.2012, 09:24 
Offline

Joined: 16.05.2009, 12:43
Posts: 207
Hmm, that is strange. I'll try with the default texture used for parallax map and see if I get the same. Thanks.


Top
 Profile  
Reply with quote  
 Post subject: Re: Normal maps working?
PostPosted: 24.08.2012, 09:52 
Offline

Joined: 16.05.2009, 12:43
Posts: 207
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!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group