smooth normals

Max2

09-08-2006 22:57:31

hi there, I was looking at the code to smooth normals and it crashed as it was written in the comment.

by loocking at the example of Physx I saw that the code should look like that
NxBuildSmoothNormals(mIndexCount/3, mVertexCount, mMeshVertices, mMeshFaces, NULL, mMeshVertices_Smoothed, true);

instead of
NxBuildSmoothNormals(mIndexCount, mVertexCount, mMeshVertices, mMeshFaces, NULL, mMeshVertices_Smoothed, true);

the first parameter was wrong

but it doesn't work anyway :( the capsule I'm using goes trought the track mesh... I tried to flip the normal too(last parameter to false, it's true.. so from flipped I got back to nonflipped normals) but still.

did anybody made it work correctly ?
Cya :D

Max2

09-08-2006 23:21:18

ok my fault, buildsmoothnormals dows not smooth the edge of a mesh, it's something that is usefull for graphics or raycasting.....

betajaen

09-08-2006 23:28:11

Thats the reason why I commented it out, it works really well with terrain though.