Sign in to follow this  
Nairou

Drawing normal vectors (line drawing)

Recommended Posts

Nairou    430
In the process of working on my terrain and generating normals, I've decided it would really help if I were able to visually see my normals on the surface of the terrain and visually look at how they were generated and how they point. So I figured I would extend the renderer to add miniscule trangles at each terrain vertex pointing along the normal vector. This is turning out to be more difficult than I thought. Not only do they not show up, but more importantly my renderer has been slowed to a crawl. I must be going about this the wrong way. I've seen this sort of thing done in other games and demos, and it never had a dramatic effect on render speed. Is there a simple way to draw the normals of a scene, or more simply an easy way to draw thin lines within the world?

Share this post


Link to post
Share on other sites
Armadon    1091
Take a look at how the DXViewer handles rendering the lines. As bakery2k1 suggested, use a Line List. The source for DXViewer can be found in SDKDirectory\Utilities\Source\DxViewer

I hope this helps.
Take care.

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