surgemcgee

07-17-2010, 12:41 PM

I need some help creating normal coords for complex quads.

I cannot find anything more than 0, 1, 0 for a flat quad.

How are these created?

Are all the normal coords <= 1?

giles

07-21-2010, 04:51 AM

Hi there -- I'm a bit confused, I would use "quad" to mean a flat four-vertexed polygon, made up of two triangles lying in the same plane. The normal for such a figure is the normal to the plane.

I can answer your second question: yes, the normal coords are all <= 1. Specifically, the length of the normal vector needs to be 1, so if the vector is (x, y, z) then x*x+y*y+z*z must be exactly 1. However, in practice you can dodge this by putting a bit more calculation in your shaders; there is a "normalize" function that will take a vector with a non-one length and scale it up or down appropriately.

Cheers,

Giles

Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.