View Full Version : Need suggestions on Interactive Plants
Hi everybody, I am currently working on my thesis project where a character is coming out of the bushes, and the plants need to move according to the character's movements. So far the plants are paint effects converted to polys. I don't know which is the most effective and efficient way to do this. Does anyone have suggestions on this particular matter? Thanks a lot!
|
|
frothlord
05-28-2006, 10:51 PM
I had done some tests with something like this. It's not very amazing, and does have its limitations.
Basically you set up your object, and apply an active rigid body to it (dynamics). Then apply a hinge constraint and reposition it to the base/stem of your bush or flower or whatever. After that, apply a spring constraint and leave it where it is.
The idea is to have it sway from side to side with the hinge constraint , and snap back with the spring constraint. If you use a nail constraint your bush will not come to its original position - it will however be able to sway up and down. The hinge is only side to side, or only up and down. I tried 2 hinges for each but things got funky. I even tried appling a hinge TO a hinge, and it wouldnt let me.
I guess you could do something where your bush is parented to a dummy object, and that dummy object has a hinge for up/down sway, but I havent tried it, and I dont know if it will work off hand.
Anyways, If you create a dummy object (which can be hidden and just used for collision by the way), and apply a passive rigid body to it, it will push your bush out of the way. You can test this by keying the object before and after the bush object, then hit play.
As is, the bush or whatever will spin in circles, and never want to come to a stop. I had to fiddle with the damping, friction, and mass of the object, as well as the power of the spring constraint. I managed to get it to come to a rest (though, its still not perfect, i was just exploring options - I'm not really a dynamics guy).
Here's the example (http://home.comcast.net/%7Efrothlord/fernPB.mov) I've come up with. I can supply the file if youre interested. If you're looking for something more in depth, where each leaf moves for example, you're going to have a lot of work to do I think.
Good luck with it!
HTH
Thanks for the Tip! Dynamics seem to be a great solution for this. I will give it a try. Your sample movie and instructions was most helpful!
de_tomato
05-29-2006, 04:39 AM
Just a wild suggestion. Probly it could be done with the hair system if yr plants doesnt have too much of a branches.
Duncan
05-29-2006, 04:45 PM
If you converted to poly with history, then you could use the pfx modifier objects to push and pull on the branches. Select a stroke then do pfx->CreateModifier. The modifier is initially set up to make lines fatter. Make the lineWidthScale = 1 so it has no effect then make "force" a positive value to push on banches. You could create several of these and parent them to your character so that the hands and arms repel the branches.
For more control you could create hair curves with collisions, then use these as wire deformers. Or one can use the hair curves as pfx control curves(you need some curveFollow or attract on the brush). Another route would be to assign the pfx brush to the hair system, then play with the brush values to get the right orientation. Done this way, each hair is a stroke path, so one would use pathFollow on the brush instead of curveFollow.
Duncan
CGTalk Moderation
05-29-2006, 04:45 PM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.