Message 1 of 2
World space deformer in python API?
Not applicable
01-26-2011
05:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm creating a basic deformer using the python api - the simplest way to get it working the way I want is to convert the in mesh to world space using the local_to_world matrix supplied in the
deform method inside the geom iteration loop. This all works fine - except that it really slows down the plugin. Is there any way of getting MItGeometry's .position function to return in worldSpace? The default is in local space - and the subsequent matrix mults to and from world space seems to add an silly amount of time.
For example on a 10k vertex mesh the plugin runs at 15fps if I set it up to use localSpace - but at 10fps using worldSpace - mainly because I have to convert every point position within the iter loop to worldSpace and back - whereas if I keep things in localSpace I can cull a large proportion of position values before doing the deformation calculations.
any help gratefully received
deform method inside the geom iteration loop. This all works fine - except that it really slows down the plugin. Is there any way of getting MItGeometry's .position function to return in worldSpace? The default is in local space - and the subsequent matrix mults to and from world space seems to add an silly amount of time.
For example on a 10k vertex mesh the plugin runs at 15fps if I set it up to use localSpace - but at 10fps using worldSpace - mainly because I have to convert every point position within the iter loop to worldSpace and back - whereas if I keep things in localSpace I can cull a large proportion of position values before doing the deformation calculations.
any help gratefully received