PDA

View Full Version : Stick this down your throat



patrickkelly
10-28-2010, 05:46 PM
OK wavers, I got a tough one here. Watch this video and see if you can help me solve this riddle.

http://www.patrickkellystudios.com/photos/Trach/test.mp4

See the green cable, it has a "J" tip. The tip has a memory and will spring back into that shape.

At some point later in the animation, other devices will slide over the green cable and bend it this way and that.

I need to be able to shove the green cable further into the throat while maintaining the J tip while respecting the device the green cable is riding in. This is where it gets complicated.

I need to be able to deform the green cable as devices are slide over it.

This is not as simple as it might seem. Unless I am just an idiot, which is possible, but not likely.

This is a professional gig, and I have some funds to devote to R&D. The person with the best, most simple and functional solution gets $100 from the company I work for. I will share all the solutions that are submitted. A scene file would be most appreciated.

RebelHill
10-28-2010, 07:12 PM
and bones are a no go because??

Amurrell
10-28-2010, 08:08 PM
Like RH said, a bone chain would probably work best, unless you want to go through the pain of morph targets. Personally I would go with the versatility of bones.

gordonrobb
10-29-2010, 05:57 AM
I'm not quite sure I understand what you mean by this bit "I need to be able to shove the green cable further into the throat while maintaining the J tip while respecting the device the green cable is riding in. This is where it gets complicated."

If you mean that the rest of the cable will be messed about by other objects and you wnat ot keep the j bit I'm thinking bones. Have you looked at soft body dynamics and weight maps?

patrickkelly
10-29-2010, 09:53 AM
RebelHill, morphing along a bone chain works for the J tip, but its the part where the entire green cable needs to be slide in and out of the plastic cannula that is the challenge.

The green guide wire stays in the throat while the plastic canula with the orange tip, gets removed by sliding it over the green guide wire. Then a thicker, curved tube gets slid over the green guide wire. The idea is to gradually increase the size of the hole in the patients throat. At each step in the process, the doctor has to shove the green guide wire in and out to check for free movement.

Getting the J hook to work is not that much of a challenge, it's deforming the green guide wire as devices slide onto and off of it, while maintaining the J hook, that is the challenge.

patrickkelly
10-29-2010, 10:23 AM
GordonRobb, you are correct, the green guide wire remains in the throat while other devices are slid over it and into the throat. The size of the devices that ride on the green guide wire gradually increase so as to make a bigger hole for the surgeon to work with. The final device that slides over the green guide wire is rigid and shaped like the letter C. The green guide wire needs to conform to the shape of the devices that slide over it.

I tried to make the J tip as a morph target, but the morph is linear and difficult to control. Look at the green guide wire as it first gets inserted into the throat. As the wire exits the cannula, it starts to form the J hook. I don't think a morph can be controlled enough to acheive the current effect. (it's currently a bone chain, but I need a better solution for the rest of the animation)

Not sure how a weight map would be useful, can you explain your idea.

I have used Spline Shift Transform plugin, and it is a pretty good solution for the deforming of the green guide wire, but when I used that plugin, I can not get the J hook to work.

If you can create a simple scene to demonstrate your idea, that would be helpful.

RebelHill
10-29-2010, 10:54 AM
Ok...

Im still not sure exactly what the problem with just using bones is though, if the canula is initially stationary, you can just unbend/bend the jtip as required with the bones.

And if its the sliding things over the green wire, and having the shapes match properly thats the problem, then you can turn to PLGcurve bone, which will do that sorta thing a snap, or even... just forget deforming the extra slideovers altogether, and just use animated transparency to make it look as though something is sliding over.

patrickkelly
10-29-2010, 04:33 PM
Getting close. Here is a scene that almost gets it done. I can't seem to get the J hook to function. I have tried bones and morphs, but the Shift spline transform plugin overpowers the bones and the morphs. Please take a look at this simple scene and you will notice that I have used cloth FX on layer 1, not to create cloth, but just to scan the motion. On layer 2 I have applied a hard FX in an effort to parent layer 2 to layer 1 and inherit the motion.

http://www.patrickkellystudios.com/photos/Trach/Test.zip

Thanks

lertola2
10-29-2010, 10:45 PM
Here is my attempt at this. My scene is attached and you can see the preview here at this youtube link:

http://www.youtube.com/watch?v=Nzdwis_b3fg

Here is the steps to create this.

1. Create a spline curve in modeler that will be the path along which the bones will travel.

2. Make a single point polygon and rail extrude it along the curve with the uniform length option.

3. Select the points in the 2 point poly chain you just created and make a new spline curve which will have evenly spaced points.

4. Export this curve as a motion path.

5. On a new layer make your tube with your desired number of skelegons. Bring them into Layout and convert them to bones. Change the bones into joints.

6. In layout make a null and import the motion path for it.

7. Select the first bone in the chain and use the Same as item feature in the motion options to make its position conform to the null. See the attached image. The red arrows point to the things that need to be set to get same as item to work.

8. Scrub the time slider to see how many frames it takes for the null to travel one bone length.

9. Clone the null object so that you have one for each bone. In my case i had 17 bones so I made 16 clones.

10. In the scene editor select all the keyframes for each null in turn and slide them to the left the number of frames determined in step 8. When done the nulls should be spaced evenly along the path and when scrubbing should move smoothly along the path.

11. For each bone setup same as item matching one of the nulls.

12. For the first 3 bones in the chain I clicked the E button in the motion options (yellow arrow in the attached jpeg). This gives you an envelope for switching between same as item and regular keyframing.

13. For the first 3 bones I also setup same as item for the rotation and set the nulls to conform to path. This lets you animate the end by hand when you need to but also let it follow the path when needed.

14. I then baked all the frames and saved a copy of the base animation at frame -1000. Then to animate the movement of the tube back and forth I used the graph editor to copy keyframes and mirror them. To wiggle the end I enveloped the same as item curves in the graph editor.

I hope that helps.
-Joe

akademus
10-30-2010, 01:44 PM
I use to work in medical animation and I saw so many people struggling with hoses and such.

Two things I found that work the best for me are Fi's Bezier Bend (32bit only, unfortunately) and Worleys Hoser.

Its very simple setup using hose and couple of control nulls, through which the hose will travel. I like setups like these because you only need to animate couple of nulls and there you go.

I attached the preview with bezier bend.

Cheers...

erikals
11-09-2010, 06:06 PM
shift spline transform,
http://www.youtube.com/watch?v=Aozfc57R4WA

patrickkelly
11-22-2010, 10:36 AM
I appreciate all the wonderful suggestions, some took me in directions I did not know were possible. The one that eventually worked for me with the least amount of tears was the one offered by Vojislav Milanovic. I will be showing my appreciation by sending him some dead green presidents for his Christmas shopping.

Once again, thank you all for the wide variety of solutions. Like my Grand Daddy used to say: "There is more than one way to skin a pig"

And now it's back to work for me.

akademus
11-22-2010, 10:46 AM
Well, theres some beer coming my way :)

Thanks a lot!!!