Mesh to Mesh Collision Deformer

270 views
Skip to first unread message

Rishis3D

unread,
Nov 21, 2012, 12:10:35 PM11/21/12
to python_in...@googlegroups.com
Hi Guys,

I want to write my own Collision Deformer (Mesh to Mesh) .. in both Python and C++
for tat i have some quires to start up . whether i want to use Deform Function for Compute Function?

Roy Nieterau

unread,
Nov 21, 2012, 4:03:34 PM11/21/12
to python_in...@googlegroups.com
Hey Rishis3D,

Easiest way I found to start with this was by learning from a great working example.
There's a python collision deformer for Maya available on the internet which is using the Compute Function.

I actually rewrote this to C++ for learning purposes some time ago. I'm not sure if I have it laying around somewhere. ;)

Check out the video here: http://vimeo.com/13150202
And you can download the script from the link underneath the video.

Is this enough info? ;)

- Roy

Chad Vernon

unread,
Nov 21, 2012, 4:05:27 PM11/21/12
to python_in...@googlegroups.com
You shouldn't need to implement compute. You can stick with deform.  If you need access to the input mesh, you can get it with an outputhandle from the datablock.


Rishis3D

unread,
Nov 22, 2012, 1:58:13 AM11/22/12
to python_in...@googlegroups.com
Thanks for Your Reply guys,

@Roy.. im usually do the same for doing R&D what u have done.. i using jcollision deformer for my reference.. but he is using compute Function..
but as per Chad's SphereCollider Deformer Compute Function take Extra Graph Evalution.. Thats why i am asking is Question.. and ill come one by one how to Transfer That Python Plugin into C++ for my R&D

@Chad.. As i mentioned  above you have implemented a deform function for your SphereCollider Deformer..
you access the input mesh using output handle from the data block. but you implement a Accessory node to get the ColliderMatrix.
in my cash how do i get tat information for my Collider mesh


Chad Vernon

unread,
Nov 22, 2012, 2:36:14 AM11/22/12
to python_in...@googlegroups.com
You can grab the transform matrix from a geometry datahandle by calling MDataHandle::geometryTransformMatrix 

Reply all
Reply to author
Forward
0 new messages