Advertisement

The *.3DS File Format: A Question

Started by October 10, 2000 01:04 PM
1 comment, last by Aienthiwan 24 years, 3 months ago
Hello hello hello... This is a question for people who have parsed a 3ds file before or who are algebra & geometry freaks.. I''ve just completed (somewhat) a parser for the 3ds file format for a mesh loading module in my program. I''ve noticed that the 3ds file does not include explicit lighting normals for each face vertex, but instead they have a bit mask that contains which smoothing group a face belongs too. My question is, how exactly do I calculate vertex lighting normals based on smoothing group data? Could anyone point in the right direction? (Algo, URL, code sample?) Thanks a plenty, Aienthiwan
So you want the model to be rendered smooth and not faceted? Well, I don''t think it''s possible to make it smooth with the information the file gives you. All I could do is take the cross product of each polygon and normalize them to be used for normals. It looks bad when you use lighting, but it doesn''t look to bad when you texture it without lighting.

Hope you find your solution.
Advertisement
Actually....

It was nice and silly. If an adjacent face has the same smoothing group, then just grab the average of the 2 cross products and apply it to both faces. How embarrasing..

Aienthiwan

This topic is closed to new replies.

Advertisement