PnP TerrainCreator - Forum

The PnP TerrainCreator Forum
It is currently Sat Sep 23, 2017 5:39 am

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Normal maps
PostPosted: Tue Aug 04, 2009 8:17 pm 
Offline

Joined: Tue Aug 04, 2009 3:53 am
Posts: 15
Hi,

Are the normal maps which can be exported; object space or tangent space?

Thanks,


Top
 Profile  
 
 Post subject: Re: Normal maps
PostPosted: Wed Aug 05, 2009 12:07 am 
Offline
Programmierdochfix
User avatar

Joined: Tue Apr 27, 2004 12:53 pm
Posts: 891
Location: Braunschweig
Hi,

they are object space normals.


Top
 Profile  
 
 Post subject: Re: Normal maps
PostPosted: Wed Aug 05, 2009 2:11 am 
Offline

Joined: Tue Aug 04, 2009 3:53 am
Posts: 15
Thanks. I suppose this should go in the wish list section but; Can an option be added to export tangent space normal maps? The 3d engine I'm working with only supports tangent space normal mapping.


Top
 Profile  
 
 Post subject: Re: Normal maps
PostPosted: Wed Aug 05, 2009 10:45 am 
Offline
Programmierdochfix
User avatar

Joined: Tue Apr 27, 2004 12:53 pm
Posts: 891
Location: Braunschweig
I have to admit that I have never worked with tangent space normals so far. But from my understanding, tangent space normals are given in the uv-coordinate space of the normal map texture. As the texture and therefore its uv coordinates too are both mapped regularily over the terrain, the u and v coordinates are aligned with the world coordinates. Therefore in this case I think both are the same. Please correct me if I'm wrong.

Have you already tried to use the exported normal map? How does it look like? Do you have a screen shot for me? Maybe it is just a question of how to assign the components of the normal vectors to the RGB channels of the texture. This can be achieved easily within the export settings.


Top
 Profile  
 
 Post subject: Re: Normal maps
PostPosted: Thu Aug 06, 2009 9:44 am 
Offline

Joined: Tue Aug 04, 2009 3:53 am
Posts: 15
Tangent space is defined so that the X axis is pointing in the direction in which the U value increases and the Y axis in the direction in which V value increases (so aligned to the plane of the face). Z is in the direction of the face normal.

So tangent space normal maps are usually very blue, as the normal is usually a lot stronger in the Z direction than in the other two.

Image
Tangent Space

Image
Object Space

An example of the normal map exported for the demoterrain2 level is:
Image

Applying these normal maps to the world makes it look like this:
Image

When without the normal maps it looks like this:
Image


Top
 Profile  
 
 Post subject: Re: Normal maps
PostPosted: Thu Aug 06, 2009 10:28 am 
Offline
Programmierdochfix
User avatar

Joined: Tue Apr 27, 2004 12:53 pm
Posts: 891
Location: Braunschweig
Try using the following setting:

red = x
green = z
blue = y

(maybe you have to exchange red and green) red=z, green=x, blue=y


Top
 Profile  
 
 Post subject: Re: Normal maps
PostPosted: Thu Aug 06, 2009 11:10 am 
Offline

Joined: Tue Aug 04, 2009 3:53 am
Posts: 15
Okay, I tried both xzy and zxy. On the horizontal surfaces it looks fine, but on some vertical surfaces like the mountain sides it doesn't (looks dark)... though the dark side is always facing the same direction. I don't have any shadowing enabled though, so there shouldn't be such darkness.

If you look at the section called 'Transformation between world space and tangent space' on this page, there's a object to tangent space conversion explanation.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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