Auto calculating normals...
Hi. Is there any function in OpenGL or otherwise to dynamically calculate normals? Im currently working on a terrain height map based engine with texturemapping using a viewing range of around 20x20 quads. Each time the position of the camera changes from one square on the heightmap to another, the normals for the new quads that just came into range need to be (re)calculated. As there can be mountains and vallies, the polygons can be facing nearly any direction when we load them off of the height map, so they need to be calculated each time a new section of the map comes into view to ensure that the lighting comes out right. I cant statically assign them normals, as the map is dynamically generated using a fractal terrain generator each time. As the resulting map is so insanely huge, I cant even calculate the normals once, and then load them in when need be because of memory concerns. Right now I have a lot of long strung out equations calculating the normals, but I was wondering if OpenGL had any facilities built into it to automatically calculate the normals. I dont really see why it wouldnt, but then again I dont really see why it would. So I figured I might as well ask. Any help on this would be greatly appreciated.
~Elig
Here''s a link
http://nate.scuzzy.net/docs/normals/
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
http://nate.scuzzy.net/docs/normals/
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/
January 14, 2002 02:21 AM
http://www.opengl.org/developers/code/mjktips/grid/
But it won''t be any faster than if you did it yourself. If you calculate your own normals, you have the ability to do some tricky stuff like normal averaging and animation.
But it won''t be any faster than if you did it yourself. If you calculate your own normals, you have the ability to do some tricky stuff like normal averaging and animation.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement