finding subsurface vertices

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
SamAdam
Posts: 0
Joined: Thu Mar 04, 2004 1:28 pm
Contact:

finding subsurface vertices

Post by SamAdam »

hey all, I need to extract the vertices from blender objects with subdivision surfaces to create .obj files.

is there a direct mathematical formula I can apply, or a way to access the virtual coordinates?

z3r0_d
Posts: 289
Joined: Wed Oct 16, 2002 2:38 am
Contact:

Post by z3r0_d »

you can get the subdivided mesh

I believe nmesh.getRaw(mesh name) does it, [as opposed to object.data]

check out the apply deformation script for how it does it

jms
Posts: 33
Joined: Sat Oct 19, 2002 3:04 pm

Re: finding subsurface vertices

Post by jms »

SamAdam wrote:hey all, I need to extract the vertices from blender objects with subdivision surfaces to create .obj files.

is there a direct mathematical formula I can apply, or a way to access the virtual coordinates?
for a good obj export you can use this script :
http://jmsoler.free.fr/util/blenderfile ... odif235.py

You can get the subsurfed data calling the GetRawFromObject():
http://www.blender.org/modules/document ... FromObject
Last edited by jms on Thu Dec 02, 2004 6:39 pm, edited 1 time in total.
Zoo-3D.Blender, Ze French-Speaking Community SKB My french book about Blender.

breakin
Posts: 0
Joined: Fri Aug 22, 2003 3:33 am

Post by breakin »

Seems NMesh.GetRaw(objectName) does NOT apply subdivisionsurfaces, only returns the nmesh itself. Since subdiv-level is per nmesh and not per object there is no reason why there shouldn't be such a function, like NMesh.GetRawFromNMesh(name) or something (does all deformation that is applied to the mesh, irrelevant of the controlling object).

Quite annoying when exporting a nmesh that you need the object name for it to be exported, and then armatures are applied aswell.

ps. As a sidenote, it would be GREAT if GetRawFromObject/NMesh preserved vertex weights (for bones that is), although I believe it would give the wrong results as armature-deform is applied BEFORE subdivision in blender.

Post Reply