From: <MSo...@ya...> - 2006-02-04 10:49:54
|
Hi Braden, > > The normals are not smoothed (the face is rendered with > flat color as > > it should be) but the normal vector is not normalized. > > "Not normalized"? I don't know what you mean by that. "Not normalized" > generally means that the components haven't been adjusted to > be proportional to 1. But the case here is that OpenVRML > isn't supplying OpenGL with normals because it hasn't generated them. OpenVRML creates the right normal vectors in this case. The only problem with these normal vectors is, that their length is not 1, as it should be for a normal vector. Most shaders go wild if you supply unnormalized normal vectors. If I tell OpenGL to normalize all normal vectors (that is to keep their directions but to devide them by their length) the model looks perfect. But normalizing all normal vectors is a time consuming operations, because it requires calculating a square root and a division for every normal vector. Since 99.99% of all normal vectors already have a length of 1, this would be quite a waste of computation time. Best regards, Michael -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.1/250 - Release Date: 03.02.2006 ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |