You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Download the 3DS file http://www.baument.com/restore/Models/Faucet1.zip
available at http://www.baument.com/restore/archives.html
2. Read it with lib3ds
3. In smooth normals computation part of lib3ds_mesh_calculate_vertex_normals
function of lib3ds_mesh.c, this should lead to a few incorrect normals (I say
"should" because I got this result using a pseudo-translation of lib3ds in Java
3D).
What is the expected output? What do you see instead?
Getting default normals from lib3ds_vector_normalize when length is 0 isn't a
major issue, but it would be better to keep the default normal in that case
(i.e. the normal computed before smoothing operation). After line 222 of
lib3ds_mesh.c, I would suggest to add this test:
if (lib3ds_vector_length(n) == 0) {
lib3ds_vector_copy(n, fa[3*i+j].normal);
}
(with an additional lib3ds_vector_length_squared function, you could spare a
call to sqrt here)
What version of the product are you using?
I looked to source code of version 20080909
Original issue reported on code.google.com by [email protected] on 16 Sep 2014 at 9:42
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 16 Sep 2014 at 9:42The text was updated successfully, but these errors were encountered: