View Full Version : colors on a mesh of vertices.
06-26-2001, 07:50 AM
I have created a mesh of vertices. I have also been able to color some reqd no. of. vertices in SMOOTH shading mode. But I want to color different vertices with different material properties , how can I do so???
06-26-2001, 08:35 AM
Simple. Just set the material properties before you set each vertex.
You're also gonna have to work with vertex normals, which can be somewhat of a difficult task at first. Basically, first you calculate the surface normal of each face (the normalized cross product of 3 vertices of the faces). Then, you average the surface normals of adjacent surfaces to get a vertex normal. However, with sharp objects, you might not want the vertex normal to be generated, so you only average the surface normals if the dot product of the normals is >= the cosine of the angle of choice.
06-29-2001, 12:42 AM
Thank you , for your contribution Its working fine after using vertex normals.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.