Collision deformer
Does anybody know of any good papers or websites for a real time collision deformer? Thanks.
talk.bindpose.com has been shut down on the 6th of March 2021. You can read a bit more about it here.
You are currently reading an archived copy of the latest content, with all the usernames deleted.
Does anybody know of any good papers or websites for a real time collision deformer? Thanks.
I was looking into it at one point and these are some of the resources I remember off the top of my head.
https://www.highend3d.com/maya/plugin/jlcollisiondeformer-for-maya - You can look at the source code http://oaktrust.library.tamu.edu/bitstream/handle/1969.1/155037/WANG-THESIS-2015.pdf?sequence=1
What it basically boils down to is finding intersections between meshes and then calculating how to respond to those intersections. A good thing is that a lot of game developers have struggled with this problem, so there are a lot of topics on forums around the web.
The way I've done it in the past was, finding intersections by casting a ray from the vertex along it's normal and checking how many intersections with the collider mesh there are. It works only for closed geometries. If there is an odd number of intersections that means that the current vert is inside of the collider geometry.
Then for responding, to it, I used three methods for different cases
The 3rd method had best results most of the time, but it was computationally more expensive.
Hope that helps!
Oh, and recently a colleague showed me the membrane node in Maya, which acts as a collision deformer, if you want to just have a play with something and maybe compare your results, though, im not sure how much you should trust it to be a good one.
Do you know how to get the bounding box of the input geometry in python Maya api deformer class? Or would I have to get this externally by connecting the deforming mesh's bounding box as an input attribute?
So, there's this Maya docs page about a bounding box deformer that gets it by using the MBoundingBox class and passing all the verts to it. Here it is http://help.autodesk.com/view/MAYAUL/2016/ENU/?guid=__files_GUID_10CE99A6_2C32_49E1_85ED_2E2F6782CF23_htm
The other thing you can try is getting the bounding box directly from the mesh, as
MFnMesh
inherits fromMFnDagNode
so you can use theboundingBox
function.To be honest, I would probably do it one of those two ways, but I haven't thought about getting it from the mesh as an input attribute, so it might be worth giving it a go and checking if there is any performance benefit.
Thanks for your help. :)