recalculateNormals

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
ignorator
Posts: 13
Joined: Fri Sep 21, 2007 1:36 am

recalculateNormals

Post by ignorator »

does this normal smoothing work when recalculating the normals?

Code: Select all

man->recalculateNormals(mesh, true);

Code: Select all

man->recalculateNormals(mesh, false);

i can't see any difference on my test - sphere. it doesn't look smoothed.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

This depends on the mesh file format you use. Some meshes duplicate all vertices per face, so there is no smoothing possible.
ignorator
Posts: 13
Joined: Fri Sep 21, 2007 1:36 am

Post by ignorator »

so if u wanted to smooth that normals u would have to find the vertices with equal positions and sum the triangle normals they belong to?

sounds like a slow solution.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Well, some formats will be improved so we will only split in case of different texture coords or different per-vertex normals. But also this solution is not as bad as you might think, although it's usually faster to avoid the splitting as much as possible.
Post Reply