Page 1 of 1
Better autonormals
Posted: Wed Jan 14, 2009 2:49 pm
by kattle87
better autonormals... avoid it with hi-poly meshes. (More than 1000 vertexes)

Posted: Wed Jan 14, 2009 3:03 pm
by VilleK
Haha, that's a nice trick of copying all vertexes to an array for processing and then copying it back. Looks great. Maybe we should even exchange the built-in autonormal algorithm to yours?
Posted: Wed Jan 14, 2009 6:04 pm
by kattle87
First of all, I tryied this with the scripting features just to test if it worked. Now I think we should do something like avoid confronting EVERY vertex (which is O(n^2) and becomes complex for say 2-3000 vertexes) so I will look at the main code to see what we can get.
BTW: the idea of using an average of the normals in a vertex is quite "simple" and was proposed also by Kjell some time ago... I will look at the sources tomorrow or the day after. I promise

Posted: Wed Jan 14, 2009 6:19 pm
by VilleK
Ok, now I understand how it works. I also understand why you hit the ten-million instructions guard

. Yes it's always a trade-off between speed and correctness. We certainly want to avoid O(n^2) complexity. If you come up with anything in the main code, let us know.