PDA

View Full Version : Autocalculation of normals?



fatjim
11-05-2001, 07:25 PM
Hi, I'm drawing some quake2 models with plain flat shading. I'm calculating the normals for each triangle.

It seems to me that the 3d accelerator can do this much faster than I can, though; Is there no way to have openGL or some extension autocalculate normals for just plain triangles?

-Jim

zed
11-05-2001, 10:16 PM
no, doing it yourself is the quickest way as they normals can be precalculated. btw i believe normals are included in the quake2 md2 file format

fatjim
11-05-2001, 11:01 PM
Ah, thank you. I imagine that means I'm doing something wrong somewhere then :)

dorbie
11-06-2001, 12:06 AM
Hardware would be faster if you had to do this every frame but you should calculate the normals once and store them. In addition hardware doesn't have enough information if you do anything that isn't simple flatshading, it becomes the kind of problem that hardware pipelines can't solve easily.

fatjim
11-06-2001, 12:31 AM
I've found ID's secret normal vector array and am using it now. Thanks for getting me to look past my nose :)