|
|
Thomas de Groot <tho### [at] degrootorg> wrote:
> I shouldn't be too concerned about the dots presently. As Melody also
> suggests, once you add objects to the scene, especially in the
> foreground, the dots will become invisible or at least inconspicuous.
> The foreground texture(s) also will help. All that will be needed
> additionally to help hide the triangles of course.
>
> --
> Thomas
calculate normals of each point, respective to all adjacent faces and use smooth
triangles, lines go bye bye. iterate verts and compare to each triangle face.
#macro normal_vector(A,B,C)
#local result = vcross(C-B,A-B);
result
// 1
// |
// 2__ 3 vz points at you (neg) unless reverse y like pov, then
//
// 2__ 3
// |
// 1
#end
#macro FastNorms77(sw)
// set norms based on ALL adjacent faces-lots of verts means lots of time
#local i=0;
#while (i<NumVertices)
#local nrm = <0,0,0>;
#local j = 0;
#while (j<NumFaces)
#if ((i = Face_Arr[j].x)|(i = Face_Arr[j].y)|(i = Face_Arr[j].z))
#local norm =
normal_vector(V_vec_Arr[Face_Arr[j].x],V_vec_Arr[Face_Arr[j].y],V_vec_Arr[Face_Arr[j].z]);
#local nrm = vnormalize(nrm+vnormalize(norm));
#end
#local j=j+1;
#end // Faces
#declare N_vec_Arr[i] = nrm;
#local i=i+1;
#if (sw) // Progress on/off
#if (mod(100*i/NumVertices,20)<0.1)
#debug concat("Checking Normals >
",str(int(100*i/NumVertices),5,1),"%\n")
#end
#end
#end // Verts
#end
Post a reply to this message
|
|