Is a hybrid "keyframed/physics" object possible?

de3ande3an Posts: 915
edited December 1969 in Carrara Discussion

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. :coolmad:

Does anyone know of a way to accomplish this?

Comments

  • sfdex_a740e4a33csfdex_a740e4a33c Posts: 1
    edited December 1969

    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.

  • de3ande3an Posts: 915
    edited December 1969

    SFDex said:
    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.
  • brian_d75022d89bbrian_d75022d89b Posts: 0
    edited December 1969

    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

  • BurnartBurnart Posts: 0
    edited December 1969

    de3an said:

    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.

  • de3ande3an Posts: 915
    edited December 1969

    nl2012 said:
    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. >:(

    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:
  • de3ande3an Posts: 915
    edited December 1969

    Burnart said:
    de3an said:

    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.

  • de3ande3an Posts: 915
    edited December 1969

    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.

    Doc4.gif
    533 x 400 - 948K
  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited July 2012

    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. :)


    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......

    Post edited by JoeMamma2000 on
  • de3ande3an Posts: 915
    edited December 1969

    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.

  • CarltonMartinCarltonMartin Posts: 147
    edited December 1969

    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.

  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited December 1969

    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?

  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited December 1969

    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......

  • de3ande3an Posts: 915
    edited December 1969

    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:
  • de3ande3an Posts: 915
    edited December 1969

    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:
    363921889.597158_.jpg
    600 x 450 - 61K
  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    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:

  • de3ande3an Posts: 915
    edited December 1969

    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 gotta admit, I'd wouldn't want to try and build a house with it.
    But the point is that Carrara is certainly a Swiss army knife of graphics functions. It's just missinig the blade that I need.
  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited December 1969

    de3an said:
    But the point is that Carrara is certainly a Swiss army knife of graphics functions. It's just missinig the blade that I need.


    You guys are just too funny...


    You "need" the physics equivalent of a "make art" button, so that you don't have to do any work at all. Just press a button and have your robots scurry around. Just cuz it's fun.


    Sure sounds like a feature request to me.

  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    Hmmm.... I just thought of another tool... Corn cob extractor, for those hard to reach corn cobs. :roll:

  • de3ande3an Posts: 915
    edited December 1969

    de3an said:
    But the point is that Carrara is certainly a Swiss army knife of graphics functions. It's just missinig the blade that I need.


    You guys are just too funny...

    You "need" the physics equivalent of a "make art" button, so that you don't have to do any work at all. Just press a button and have your robots scurry around. Just cuz it's fun.

    Sure sounds like a feature request to me.

    Well... I guess there is one thing we can agree on. It would take a feature request to get the functionality that I'd like. And we all know how responsive DAZ is to feature requests.
    I'd rather they fix the remaining bugs first.
  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited December 1969

    de3an said:
    Well... I guess there is one thing we can agree on..


    Really? Just one? So all the input I gave you, you're completely dismissing, and agree with none of it?


    Wow. So can you give me some examples of the things I said that weren't factual or true?

  • RoguePilotRoguePilot Posts: 239
    edited July 2012

    de3an said:
    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:

    I had one of those once but the end fell off.

    Seriously though, what you are asking for is research level simulation stuff. Try googling robotics simulators and see how many university papers and experiments you need to read up on before you finally find some software designed for industrial use.

    Yes, it might be possible to write an AI plugin to do this but, come on, who want's to do that for Carrara?

    Another possibiliy that you can consider is a using a game engine. You would still need to keyframe the walk cycle but you could then build a set of behaviour rules to be handled within the engine. I've never used the Blender game engine but it might do the job. How are your programming skills?

    Post edited by RoguePilot on
  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    Joe, I didn't say you were wrong. I was responding to the sarcastic tone of the response below. Deny it all you want, but anytime anyone starts throwing around the "make art" button, there is a certain amount of implied derision. Try re-reading your statement from another perspective.


    de3an said:
    But the point is that Carrara is certainly a Swiss army knife of graphics functions. It's just missinig the blade that I need.


    You guys are just too funny...


    You "need" the physics equivalent of a "make art" button, so that you don't have to do any work at all. Just press a button and have your robots scurry around. Just cuz it's fun.


    Sure sounds like a feature request to me.


    See what I mean? Again, I'm not disagreeing with you. I also don't think it's practical, but then again I don't see what all the fuss about Genesis is about either. That doesn't mean I'm going to start throwing around sarcastic comments implying others are lazy, or being frivolous because they don't want to work with V4 or M4 because it's not shiny and new or, "just cuz it's fun".


    Just relax dude, it's only the internet.

  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited December 1969

    Joe, I didn't say you were wrong. I was responding to the sarcastic tone of the response below. .


    I'm not sure what you're responding to...


    Far as I can tell your only input to this thread was you getting offended on behalf of the OP for some reason, and making a comment implying I had a corn cob stuck up my butt because I was poking fun at the OP's feature request. I expected you'd take it personal, you did, I ignored it, and moved on.


    Yes, I was poking fun at the OP's suggestion. I didn't attack him personally with anything like a comment about him having a corn cob stuck up his butt, I poked fun at his suggestion. And an objective person, when they realize the scope of what he's suggesting, and understand the implications, as well as the reasons he cited ("just for fun"), an objective person would also step back and say "Oh, yeah, I guess it seemed like a nice idea, but really isn't practical at all, and certainly isn't something we'd want to suggest as a feature request", and laugh it off. I wasn't attacking him, or saying anything bad about him, I was merely poking fun at his suggestion and reasoning. And it was the equivalent of a "make art" button, don't you agree? I'm sorry if that phrase upsets you personally, but honestly that's not my problem. I think if you muster up all the objectivity you can I think you'll actually agree with my comments.


    However, since objectivity is in real short supply here, people get upset, and their egos get bruised, and it becomes more about personalities than issues. And others who aren't even involved in the discussion get offended on their behalf (which I'll never quite understand...) and start attacking.


    BTW, here's a suggestion for an alternate way to respond when someone spends a lot of their time generating scenes, working on your problem to find a solution, making and uploading videos, and providing some well thought out input and explanations and facts regarding your issue:


    "Hey, good point, I guess you're right. Bad idea, sounded good at first glance, but I guess it just wouldn't work out. Anyway, thanks for all your help, I sure appreciate it, and I learned a few things that I didn't know before."


    See how easy that is?

  • frank0314frank0314 Posts: 14,138
    edited December 1969

    All right guys. Lets keep it civil.

Sign In or Register to comment.