Digital Art Zone

 
   
1 of 2
1
Is a hybrid “keyframed/physics” object possible?
Posted: 11 July 2012 03:02 PM   [ Ignore ]
Active Member
Avatar
RankRank
Total Posts:  398
Joined  0

I would like to create a simple machine who’s repetitive motions are keyframed, then group its component parts and drop the animated group into a scene as a physics object and let it wander around on its own using physics properties.

Every time I try this I lose all of the keyframed animation. I was hoping that by creating an animation group, I could change the group properties to “physics” but still retain the internal keyframed motion. This does not seem to be the case. cool mad

Does anyone know of a way to accomplish this?

 Signature 

-Dean

DAZ Gallery: http://www.daz3d.com/gallery/#users/1922/

Profile
 
 
Posted: 11 July 2012 04:54 PM   [ Ignore ]   [ # 1 ]
New Member
Total Posts:  1
Joined  2004-07-18

Try calculating the physics motion first and then convert the motion to “explicit.”  This will convert all the physics motions to keyframes.  You can then move the keyframes as you like in your timeline, add movements before the physics-generated keyframes begin.  You can also adjust the individual keyframes.

Another possible workaround would be to keyframe what you need, then run a physics simulation on a proxy object (something super low-poly you build in the vertex modeler that approximates the shape of the actual object).  Once you have the proxy object behaving like you want, convert that motion to explicit and then parent your more complex model to the proxy, making the proxy model invisible.

I haven’t been playing with C8 much, but I’ve been doing exactly this on a current project with C5.

Hope that’s helpful.

Profile
 
 
Posted: 11 July 2012 07:34 PM   [ Ignore ]   [ # 2 ]
Active Member
Avatar
RankRank
Total Posts:  398
Joined  0
SFDex - 11 July 2012 04:54 PM

Try calculating the physics motion first and then convert the motion to “explicit.”  This will convert all the physics motions to keyframes.  You can then move the keyframes as you like in your timeline, add movements before the physics-generated keyframes begin.  You can also adjust the individual keyframes.

Another possible workaround would be to keyframe what you need, then run a physics simulation on a proxy object (something super low-poly you build in the vertex modeler that approximates the shape of the actual object).  Once you have the proxy object behaving like you want, convert that motion to explicit and then parent your more complex model to the proxy, making the proxy model invisible.

I haven’t been playing with C8 much, but I’ve been doing exactly this on a current project with C5.

Hope that’s helpful.


Thanks for the reply SFDex, but that’s not quite what I’m looking to do.
I want to create a keyframed machine that can propel itself around a scene autonomously. It’s beginning to look like Carrara is just not designed to allow this level of simulation.

Hopefully, I’m wrong and someone can point out something that I’ve overlooked.

 Signature 

-Dean

DAZ Gallery: http://www.daz3d.com/gallery/#users/1922/

Profile
 
 
Posted: 12 July 2012 05:40 AM   [ Ignore ]   [ # 3 ]
Member
Avatar
Rank
Total Posts:  35
Joined  2010-11-16

Mabey this helps

Animated your seperate obj with Modifiers
Don’t group but parent.
after that switch on the physics.

I once made a small engine like this that jump around the room while starting up, i’ll hope i can find it somewhere.)


Hope this helps

 Signature 

Proud member of the Bald Wizards Club

Profile
 
 
Posted: 12 July 2012 05:13 PM   [ Ignore ]   [ # 4 ]
New Member
Avatar
Total Posts:  14
Joined  2003-10-19
de3an - 11 July 2012 07:34 PM

I want to create a keyframed machine that can propel itself around a scene autonomously.

This makes it sound as if you want to set up “behaviours” of some kind like one of those disc shaped floor sweeping robots (Roomba?) It runs around the floor and changes direction when it encounters an obstacle. Something that you could stick into your scene and let it animate itself more or less. Is that the kind of thing you want to do?

 

That would need some kind of full scripting integration using python maybe. 1float has done some work bringing scripts into Cararra so I won’t say its impossible but it would be very tricky.  I did a search and pycarrara and 1float didn’t turn up in the new forum. You could try looking up the old forum.

Profile
 
 
Posted: 12 July 2012 07:24 PM   [ Ignore ]   [ # 5 ]
Active Member
Avatar
RankRank
Total Posts:  398
Joined  0
nl2012 - 12 July 2012 05:40 AM

Mabey this helps

Animated your seperate obj with Modifiers
Don’t group but parent.
after that switch on the physics.

I once made a small engine like this that jump around the room while starting up, i’ll hope i can find it somewhere.)


Hope this helps


Thanks. I don’t think I can get the kinds of motions that I need with Modifiers, but your idea of parenting instead of grouping seems to work to retain the keyframe animations made to the parented objects even after the base object’s motion method is changed to Physics.  LOL

However, this exposes another problem. The parented keframed objects don’t interact with other objects in the scene (such as the floor) when the physics simulation is run. mad

So it would seem that even though the base object’s motion method is Physics, the parented objects retain their keyframed motion method and thus do not detect contact with other objects. long face

 Signature 

-Dean

DAZ Gallery: http://www.daz3d.com/gallery/#users/1922/

Profile
 
 
Posted: 12 July 2012 07:34 PM   [ Ignore ]   [ # 6 ]
Active Member
Avatar
RankRank
Total Posts:  398
Joined  0
Burnart - 12 July 2012 05:13 PM
de3an - 11 July 2012 07:34 PM

I want to create a keyframed machine that can propel itself around a scene autonomously.

This makes it sound as if you want to set up “behaviours” of some kind like one of those disc shaped floor sweeping robots (Roomba?) It runs around the floor and changes direction when it encounters an obstacle. Something that you could stick into your scene and let it animate itself more or less. Is that the kind of thing you want to do?

 

That would need some kind of full scripting integration using python maybe. 1float has done some work bringing scripts into Cararra so I won’t say its impossible but it would be very tricky.  I did a search and pycarrara and 1float didn’t turn up in the new forum. You could try looking up the old forum.


Thanks Burnart.
That might provide a solution, but not being a programmer, I think it would be beyond my reach.

Additionally, since I’m using a Mac, I know that PyCarrara is, so far, is a Windows only solution. I’ve made several comments in the PyCarrara threads requesting a Mac version, but so far no joy.

 Signature 

-Dean

DAZ Gallery: http://www.daz3d.com/gallery/#users/1922/

Profile
 
 
Posted: 12 July 2012 08:16 PM   [ Ignore ]   [ # 7 ]
Active Member
Avatar
RankRank
Total Posts:  398
Joined  0

Basically, what I’m trying to do is make a machine that will walk across the floor using the Bullet Physics engine.

In the example below, the central block’s motion method is Physics.
The “legs” are parented to the central block and their motion has been keyframed.
As you can see, the central block sets happily on the floor without falling through, but the legs pass through the floor rather than push on it to propel the machine forward.

Image Attachments
Doc4.gif
 Signature 

-Dean

DAZ Gallery: http://www.daz3d.com/gallery/#users/1922/

Profile
 
 
Posted: 13 July 2012 04:57 AM   [ Ignore ]   [ # 8 ]
Power Member
Avatar
RankRankRank
Total Posts:  1108
Joined  2007-10-15

Wow, that’s a good one.


I think trying to use physics for something like that is like, well, using something more complicated for a simple task. I just can’t think of a good analogy right now.  smile


Anyway, seems to me that keyframing it, plus using some simple tools, might do the trick.


I did a real simple animation using the Track modifier or whatever it’s called, and limiting the motion of the blocks so that they wouldn’t go thru the floor (set the Z minimum distance equal to 1/2 the height of the block). Then take a cylinder, and then add a Target Helper, and place the target helper on the outside curved surface of the cylinder, and parent it to the cylinder. So when the cylinder rotates, the target follows, sitting on the curved outside of the cylinder.


Then all you have to do is track the block to the target helper, making sure you’ve constrainted the block to not go below the floor. Then animate the cylinder to rotate, and the block will follow, tracking the helper. Oh, and you’ll need to select Angles, not Quaternion, so that you can rotate over 90 degrees.


Now as the blocks hit the floor, they’ll slide back, so you’ll need to keyframe the rotating cyllinder to compensate and push it forward a bit, but that shouldn’t be a big deal.

EDIT: Not sure how to insert a youtube video with this new setup, but here’s the link:


http://youtu.be/a0u7Gf3wdWY


Now of course you can hide the rotating cylinder, and insert whatever linkages and machine bodies you want, and drive the cylinder around the scene…...

Profile
 
 
Posted: 13 July 2012 11:11 AM   [ Ignore ]   [ # 9 ]
Active Member
Avatar
RankRank
Total Posts:  398
Joined  0

Thanks Joe, that’s an interresting method for a work-around, but I’d still like to find out definitively if it can or can not be done with the Physics engine.

My example is only a very simple proof of concept. I know it would be easy to keyframe it, but if it can be done with the Physics engine then more complex machines could also be modeled, machines that would be too much of a headache to animate with keyframing alone.

My purpose in asking the question is not to find a solution for this particular task, but to explore the capabilities of Carrara. I seem to be finding that the mixing of keyframe and physics motion methods in the same animation is a weak point for Carrara.

 Signature 

-Dean

DAZ Gallery: http://www.daz3d.com/gallery/#users/1922/

Profile
 
 
Posted: 13 July 2012 01:08 PM   [ Ignore ]   [ # 10 ]
Member
Rank
Total Posts:  142
Joined  2005-05-21

My answer to what I think you’re saying if I’m grasping it correctly is, no, Carrara is not designed to be a simulation of reality—it’s designed to be an animation and graphic program in which there are limited areas of simulation, including the bullet physics and Sparrowhawke’s tracks-and-chains and wheels modifiers, but overall, I think you’re asking more than is currently available.

Profile
 
 
Posted: 13 July 2012 04:16 PM   [ Ignore ]   [ # 11 ]
Power Member
Avatar
RankRankRank
Total Posts:  1108
Joined  2007-10-15

Oh, well why didn’t you say so? If you’re just exploring, but not solving a real problem, then that’s different.


Anyway, the answer is no. That’s not what a physics simulator is designed to do. They are designed to simulate objects simply reacting to external forces like gravity and collisions. They are not designed to simulate complex machines. If they were, you’d see guys simulating walk cycles with human characters using physics. Which is what you’re really asking about, a walk cycle. Instead, they develop complex rigs, and some software has what are called “expressions” or “equations” to help you automate all that.


Now you may be able to kludge it, and someone may come up with some way to rig stuff up so that you kinda sorta get the physics and the keyframing working together, but in the end it will be a lot more work than just doing it the right way, which is keyframing it. And, by the way, that’s not a “workaround”, it’s the right and most efficient way to do it.


Though I’m not really sure what your goal is….why do you want physics involved at all? Just so the legs don’t fall thru the floor? Why bother in the first place?

Profile
 
 
Posted: 13 July 2012 06:48 PM   [ Ignore ]   [ # 12 ]
Power Member
Avatar
RankRankRank
Total Posts:  1108
Joined  2007-10-15

And BTW, I’m sure this goes without saying, but just in case I’ll say it…..


I’m sure you’re aware that you can treat this mechanical motion like any other walk cycle. Define the repeatable motion (the cycle), then package that up into an NLA clip or however you want to do it, and just repeat that as much as you want. Far faster and more efficient than running a physics simulation for all that time. Which is one reason why animators don’t really want their physics engines to do a lot of stuff that can be done quicker by keyframing.

Again, this is not a “weak point” for Carrara, or any other software that doesn’t do what you want. There are good reasons why people don’t want to do things that way. Nice idea, but in practice not real practical. It’s a bit like complaining that your hammer is really weak when it comes to sawing wood. Well, yeah, it is…...

Profile
 
 
Posted: 13 July 2012 07:21 PM   [ Ignore ]   [ # 13 ]
Active Member
Avatar
RankRank
Total Posts:  398
Joined  0
JoeMamma2000 - 13 July 2012 04:16 PM

Though I’m not really sure what your goal is


My goal is simply to have fun with Carrara.
If my proof of concept had worked, I had a vision of creating a tabletop full of windup toy robots, all waddling on their own, in different directions. Some bumping into each other, some falling down, some walking off the edge of the table, all semi-randomly controlled by physics rather than keyframes.

It’d be a hoot! LOL

 Signature 

-Dean

DAZ Gallery: http://www.daz3d.com/gallery/#users/1922/

Profile
 
 
Posted: 13 July 2012 07:25 PM   [ Ignore ]   [ # 14 ]
Active Member
Avatar
RankRank
Total Posts:  398
Joined  0
JoeMamma2000 - 13 July 2012 06:48 PM

It’s a bit like complaining that your hammer is really weak when it comes to sawing wood.


But if all you had was a hammer and you needed to shorten a 2 by 4, you’d wish that hammers had sawblades hidden in the handle. LOL

Image Attachments
363921889.597158_.jpg
 Signature 

-Dean

DAZ Gallery: http://www.daz3d.com/gallery/#users/1922/

Profile
 
 
Posted: 13 July 2012 07:42 PM   [ Ignore ]   [ # 15 ]
Addict
Avatar
RankRankRankRank
Total Posts:  6181
Joined  2006-08-27

That’s pretty cool. Totally useless, but cool. Why have a hammer that’s bad at sawing when you can add a saw to the hammer and have a hammer that’s bad at both! LOL


I have a brother that was obsessed with multi-tools. This would be the perfect gag gift! I can see the card now: The ultimate tool for the ultimate tool! LOL

 Signature 

I find it somewhat liberating not to be encumbered by accuracy.

Profile
 
 
   
1 of 2
1