Req: smoothing groups

Announcements, requests and support regarding the Blender Indigo export script
Post Reply
2 posts • Page 1 of 1
roberto
Posts: 4
Joined: Wed Aug 09, 2006 7:16 pm
Location: Italy

Req: smoothing groups

Post by roberto » Wed Aug 09, 2006 7:47 pm

Hello,
when an object is set to SMOOTH all the faces are smoothed even if you set Auto Smooth in the Mesh tab of the Object page.

Is it possible to export the mesh normals according to this flag?

[hint: maybe the Mesh.MEdge.crease property could be useful? I don't know how it works but it seems related to the angle between two faces along an edge]

TIA
Roberto

roberto
Posts: 4
Joined: Wed Aug 09, 2006 7:16 pm
Location: Italy

Post by roberto » Thu Aug 10, 2006 12:51 am

Thank you for you answer.

IMHO the XML format already support this function. It is "only" a matter of defining the normals of the vertices.
Looking at the script code I've found it checks the face.smooth value to choose between the face normal (for unsmoothed faces) and the vertex normal (for smoothed faces).

I think the script could be modified to check the angle between adiacent faces and if it is greater than a given angle (the autosmooth angle), it should not use neither the face nor the vertex normal. Instead it should generate a new one interpolating the normals of the two faces.

The only problem with this approach is that each vertex of a face is linked to two edges so the script should check two couples of faces and, eventually interpolate three normals.

Unfortunatly I don't know neither Python nor Blender Api so I cannot implement it by myself.

For the moment I'll try your solution splitting the mesh based on the smoothing group. I would expecially check if this solution affects somehow the image when using transparent materials or not.


Roberto

Post Reply
2 posts • Page 1 of 1

Who is online

Users browsing this forum: No registered users and 36 guests