Maybe you could apply the world-to-local matrix on the deformer? instead of
bringing all the points to world-space and then applying the deformation,
see if it's less computations to bring the deformations into local space. It
might not be feasible, depending on what your deformer does...

- Ofer
www.mrbroken.com


On Wed, Jan 26, 2011 at 4:37 PM, hotchpotch <[email protected]> wrote:

>  I’m creating a basic deformer using the python api (Ma\ya 2009) - 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
>
> --
> http://groups.google.com/group/python_inside_maya
>

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to