Sign in to follow this  
MARS_999

Normalmapped terrain and tiling normalmaps?

Recommended Posts

I am not sure about this, but need to find out if its possible?

I have a terrain mesh, and its has a single base texture over it, and I have a normalmap of the whole terrain mesh in tangent space and I normal map that, and it looks fine. Now I want to keep that lighting and match the tile Factor of my base texture and use a second normalmap and apply that to that tiled texture? Not sure if I am clear on this, and maybe it's not possible? What I need to know is what would I need to add to my normalmapped code to make that happen?

I already have both normalmaps loaded, but not sure on what the math would be...

Thanks!

Share this post


Link to post
Share on other sites
What happens on some point on terrain where it has two normals from your normalmaps? How do you want to calculate final normal (the vector you will use in lighting) for it?

Share this post


Link to post
Share on other sites
[quote name='MartinsM' timestamp='1312473458' post='4844547']
What happens on some point on terrain where it has two normals from your normalmaps? How do you want to calculate final normal (the vector you will use in lighting) for it?
[/quote]

Could you just average them?

Share this post


Link to post
Share on other sites
The term you are after is 'detail normal map'.

The normal map code addition are simple an extra texture read, plus whatever you do to unpack your normal map data, then iirc we simple added the normals together and renormalised.

The UV used for that can be generated anyway you like, it's been a while but I think we used a modulated world space position to generate our UVs, but really any scheme would do which can generate repeating numbers in a 0 -> 1 range.

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