Hi devs.all!

We started using lib3ds a couple of weeks ago, and we
are already able to import 3ds model into our engine.
However some faces of the models weren't with the
correct light effect. After some debugging we found
out that the normals weren't right.
So we decided to start with a simple cube, and see if
the normals were ok. Strangely, the model had 26
points. Why 26? Next, we decided to spend some time
looking at the face list:
       0    2    3  smoothing:2
       3    1    0  smoothing:2
       4    5    7  smoothing:4
       7    6    4  smoothing:4
       8    9   10  smoothing:8
      11   12   13  smoothing:8
       1   14    7  smoothing:10
       7   15    1  smoothing:10
      16   17   18  smoothing:20
      19   20   21  smoothing:20
--->  22    0   23  smoothing:40
      24    6   25  smoothing:40
The line with an arrow seemed odd to us since the
index 0 were reused in a face with a different normal
than face [0, 2, 3] and [3, 1, 0]. In fact, that's
where the real problem lies, since
lib3ds_mesh_calculate_normals will replace index 0
with the normal of the face [22, 0, 23], losing the
correct normal for face [0, 2, 3] and [3, 1, 0].
Does anyone have faced this problem before? We have
only tried to export using 3ds max, so maybe it is a
specific 3ds max problem.
Any reply will be appreciated.
Regards!

Denis Taniguchi

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
lib3ds-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lib3ds-devel

Reply via email to