Sign in to follow this  

terrain lighting

This topic is 4166 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have my terrain loaded into an ID3DXMesh, and I use D3DXComputeNormals, but you can really see the triangles due to interpolation errors. It is not noticable with a texture, but is this normal? http://img359.imageshack.us/img359/4204/lighting0es7.jpg It gets worse the noisier the terrain is: http://img53.imageshack.us/img53/7311/lighting6qf.jpg By the way I am using fixed function D3D vertex lighting.

Share this post


Link to post
Share on other sites
Anyone can see that you are using vertex lighting and that is the problem. It is absolutely normal. Your vertex normals are interpolated along the edges of the triangles, the results are good but not the best. If you want best results, you must implement per pixel lighting using shaders. You cannot get better results than this using the fixed graphics pipeline.

Share this post


Link to post
Share on other sites
Quote:
Original post by meeshoo
If you want best results, you must implement per pixel lighting using shaders. You cannot get better results than this using the fixed graphics pipeline.


This is not quite true. You CAN use per pixel lighting (aka normal mapping or dot3 bumpmapping) in the fixed function pipeline. This is an example for object-space normal mapping. You can also use it for terrain. It's quite easy to implement and runs even on a GF2.

Lutz

Share this post


Link to post
Share on other sites

This topic is 4166 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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