# Is real-time Collision detection possible?

#1

Hi,
I wanted to know if real time-collision detection is possible in Maya? Real-time in the sense when the user is playing around with the objects in the scene. Thanks!

#2

I dont know, but I would like to know. So I will keep an eye on this thread

#3

If you are talking about simulations like an object dropping on, crashing into, and bouncing off another object I dont think and see how that could be possible by interactively transforming it.

There is the Interactive Playback that is very useful with things like dynamic hair curves where you can move curves around and they will react to your movement as if holding flexible tubes in real life including self and with other objects collision with certain success but nothing will stop your move tool manipulator while doing this.

If when you say collisions, you are not talking about simulation but constraints, then yes, the objects can be constrained by setting limitation to certain aspects of their motions and then you can not transform them interactively beyond those.

edit:

What could be really useful is a constrain capabilities feature like selecting one object then others and telling Maya to constrain the transformations and geometry space of the first object beyond the space occupied by the other objects. I can see how challenging and processor intensive this could be for things like moving a single leaf in a huge tree with a lot of branches and leafs, but most of the time we need to move simple things like cubes which shapes are equal to thir bounding boxes, and this at least to me, seems to be possible if they decide to implement it.

#4

The real-time collision detection that I am talking about is collision detection when the user is working with the objects in the scene. For example suppose the user selects an object ‘A’ and using the move tool tries to reposition the object by moving it in some perticular direction. Now let there be another object ‘B’ that comes in the way. Normal observation would be that surface of ‘A’ penetrates the surface of ‘B’ with out any restriction. Now, is there a way by which Maya can get to know when the object A came in contact with the object B and at what point?

I did a little research over the net reading about collision detection. Many articles state that real-time collision detection is a trade-off between smoothless (frame rate) and accuracy. Infact accurate collision detection in real time is very difficult. The collision detection that we see in games or simulations is a crude and inaccurate implementation. For collision detection the program has to frequently (probably once in every CPU cycle) check for occurance of collision and the calculations involved in every confirmation is huge and hence an accurate collision detection cant be real-time.

So I think the probability of realtime collision detection in Maya is nearly zero. But still if anyone thinks its possible or is already implemented, I’de like to know.

#5

Im sure that there is no such thing in Maya, and I wouldnt call what you described a collision since this suggests some more complex reaction like bouncing and deforming than a simple constraint when 2 objects get in contact.
What you want is auto constraint detection which is pretty much what I described at the end of my previous message.

Anyway, taking into account the enormous computation it would take for anything more complex than a simple cube, the current alternative to this with using snapping which is excellent in Maya and require just a few more clicks, may turn out to be not only more efficient but also faster than such a feature if they ever bother to implement.

#6

I got to try exactly this at a Maya event in Virginia. There was a haptic input device that looked like a wacom pen attached to a long arm. It gave you resistance when painting on a model- you could feel the surface as you moved around it.

The big thing was they had a demo set up with a robot walking up stairs. As they were mapping out the animation of the feet stepping up the stairs, you could feel when a foot hit the surface of the stair. It was amazing, but I still found it a little weird because you had to move the pen in 3d. It’s hard to unlearn decades of 2d mouse movement muscle memory.

The collision detection was amazing, though. It is exactly what you were talking about.

http://www.sensable.com/haptic-phantom-omni.htm

#7

Venkman, Ive read about this device before but din’t manage to figure out what it does, even after your description it is hard to imagine how this works and what it is useful for. As for painting Im not sure how much feeling the touch will make it more efficient in addition to simply seeing the result. Im also curious as to what you mean when you say you could feel when a foot hit the surface and how does this translate in precise positioning of 3D geometry, I’m curious for example how does this work with moving components and how about other transformations like scaling and deformers. Also how do you navigate a camera while using this device - do you have to reach for a mouse?

#8

Imagine sculpting in zBrush, and being able to feel the surface as you paint it. The device worked with it’s own voxel based modeling tool, but it is hard to explain. If you were pushing into the surface of a model to make details and wrinkles, the device actually gives you resistance and you are pushing in. Kind of like real sclupting. If you move it around lightly, it will accurately trace the 3d surface. It senses everything about the pen- it’s position in 3d space and the rotation and pressure you put on it.

Sorry, I meant painting geometry. I’m not sure it was more efficient for me, but the guy giving the demo was pretty darn good, sclupting a troll out of a sphere right in front of the audience.

Let me elaborate. There was a bipedal robot with totall rigged legs in IK. You grab the foot and position where you want it to go, right? Well imagine that when draggin the foot down, that your input device would stop movement whenthe foot you were dragging hit a surface like a stair or floor. The pen itself wouldn’t let you push the foot through the floor, because of the hit detection. You could accurately slide the foot around the floor or another object like a ball, without going through it, all in 3d because of the resistance.

My greater point was not about the 3d device per se, but that the company making it had special drivers for Maya that included superb hit detection.

The demo was not as deep as you may have wanted- it was limited to the sculpting and rigged character. The questions might be better answered by the makers of the 3d device.

But the 3d input device did act like a mouse, so all you had to do was hit control click the proper button on the pen to rotate, pan, zoom, etc, just like with a mouse. The people who used it were very talented, so perhaps they were just that darn good.

#9

Thank you for sharing your experience Venkman, sounds very interesting. If I have a chance Ill try it. It is interesting that they have a student price of about \$900 which is somehow acceptable if it makes modeling easier, but otherwise it is about \$2000 which is pretty steep for just an input device.

#10

Yeah, \$2000 is a copy of Maya complete. D’oh!

#11

This might be of interest to you http://www.engadget.com/2007/01/09/novint-falcon-crazay-mouse-gets-a-price-release-date/

#12

Nima PhysX for Maya plug-in does real-time interactive physics in the Maya viewport and it’s free! It’s very easy to use and very fast. For interactive physics, simply select interactive playback from it’s own PhysX menu, then you can move inactive objects in the viewport and all collisions and physics will happen in real-time (did I mention it’s fast!? ).

#13

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.