Jump to content
  • entries
  • comments
  • views

Improved (and faster) terrain normals

Sign in to follow this  


I successfully removed the blur passes, which increased the performance by a lot, and should help to avoid the seams problems in the whole terrain.

It's a bit tricky, but it now works that way:

1. I'm generating a 33 x 33 normal map.
2. I'm upsampling that normal map into the 512 x 512 texture; normals are filtered and renormalized at that step.
3. Instead of adding a scalar noise to the heightfield, i'm now adding a 3D vector noise to the normals. I'm using 6 octaves. Each having different weights. Then i'm renormalizing the final vector.

I'm also storing the heightfield in the alpha component, which means the same process is done for free for the heightfield (except the renormalization of course, since it doesn't make sense for heights).

The quality is IMO a bit better, and much faster:

Next step is to use both normal and heights to generate the diffuse color.
Sign in to follow this  

1 Comment

Recommended Comments

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
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!