Jump to content

Archived

This topic is now archived and is closed to further replies.

Vilandra

Can Mograph Turn A Wheel While Driving Objects Along A Spline?

Recommended Posts

  • Topic Author
  • This is a tough one, and im stuck on the math.

    Ive got some objects that are being driven along a spline (spline is closed) using mograph cloner object, and im using the "offset" attribute to move the objects along the spline. I have some wheels that are positioned along the bends of the spline and they need to be turning to give the impression that they are turning at the correct speed. Kinda like a conveyor belt.

    I already know how to set it up if the wheel was to be moving along a spline, however the wheels in my scene are stationary, and are only going to be rotating. What I would like to do is rotate the 4 wheels with the mograph cloner object "offset" setting. But they will have to speed up and slow down according to the how fast the mograph offset is going. In other words, if the offset is slow, the wheels will have to meet that speed, and if the offset is sped up, the wheels will speed up as well.

    I dont have enough knowledge of xpresso to figure this out, so if anyone knows how this can be done, I would appreciate the help. I know the "offset" can be added to a cloner object node in the xpresso editor, so im fairly confident this can be done.

    I hope this makes sense.

    Thanks

    Share this post


    Link to post
    Share on other sites

    Hi Vilandra. I presume this for the Tank Tread poser you set with the Roller Piston.

    The basic maths would be:

    • The ratio~ Main Wheel Circumference: Tread Spline Length = Rotation Multiplier.

    • The other wheels would be simple Circumference ratios to the Main Wheel.

    It might(?) be easier to use the Main Wheel Rotation to drive the MoGraph Offset value, rather than MoG -> Drive Wheel.

    I'd need to check the linking from XPresso into MoGraph first.

    For the rotation control, I strongly recommend the 'MJR Rotator' expression from XPresso24.com.

    It is the best controller I have come across which overcomes the rotation reversal when keyframing variations in speed rotation.

    Cheers, Alan.

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • Yes, its for the tank tread. With some help from Cactus Dan, we got the spline problem solved. I just forgot that contraints could be used along with some aiming.

    I have the length of the spline, and I have the diameter of the wheels, and ive made a few attempts to get it to work, but I think my approach was wrong, because I was following along the lines of 3DKiwi's wheel rotation tutorial.

    I'll check out xpresso24 as mentioned.

    Share this post


    Link to post
    Share on other sites

    I'm setting up a test rig just now using your original layout image. It should be simple to alter if there are any changes.

    I'll post it later when I've rigged the basic XPresso.

    Don't try figuring this from the geometry of the wheels, you need to use proxy splines for the wheels.

    Both for a bit of control and ease of calculation.

    Cheers, Alan.

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • Im glad you said that, because I was going to try to figure it out based on wheel geometry.

    Share this post


    Link to post
    Share on other sites

    I knew you were going to try it that way, that's why I said it. laugh.gif

    Back later. Alan.

    Share this post


    Link to post
    Share on other sites

    Here's stage one with the wheel rotations set up to rotate in sync.

    I need to rehash the maths for the MoG Offset input.

    The basic idea works but I need a bit more to control everything properly.

    The Rotator scale needs restricting as it is turbo-charging the drive up to mega-warp speed.

    See if you can follow the XPresso workings from the Rotator output through to the wheels.

    Ignore the MoG part for now.

    Cheers, Alan.

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • Wow. After looking over that file and the xpresso setup, I think ive jumped into something way over my head. mf_bookread.gif

    I played around with it some, but it looks like im definitely going to need to further my xpresso knowledge on this one.

    These tracks are going to be on a small robot, so I was hoping for 1 master controller for forward and reverse and let mograph and xpresso do the wheels and treads. Im still going to play around with it more though. At least I didnt try to do this using geometry.

    Share this post


    Link to post
    Share on other sites

    laugh.gif It's not really that hard, once you get an idea of the basics and how to link things.

    You don't just start plonking nodes down and linking them up.

    Break things into sections first to get the info input for one step at a time. Point the output to another node to control something else. From then on it is a case of developing the bridges required to get to a final output.

    With something like your tread wheels, it is simply a case of duplication after setting up a relationship betwen them.

    Now that they are rotating in sync, I need to use what info is there to make a connection to the MoGraph Offset.

    Once I've sorted the MoGraph part, I'll add a commented version with the paths so you can understand and follow the process.

    Best thing to do is start pulling apart any samples you come across and break them down into component parts to see how they work.

    Cheers, Alan.

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • I think the biggest issue is that I am uncertain as to what each node does, and how it can be used in conjunction with another node to produce a different result. I'll definitely look at the file more and see if I can break it down to see whats its doing.

    Thanks for helping out. I search around for mograph/xpresso linking, but there wasnt much on this subject. Base80.com had a few things, but nothing like this.

    Share this post


    Link to post
    Share on other sites

    Here you go. I've simplified the main MJR Rotator (slightly) and added remarks to my little contribution.

    You should be able to follow the parts which are simple duplications for each wheel.

    The actual nodes work in the same way for each with the wheel sizes being the only variable.

    Each section of the XPresso has the working with a Remark added.

    The XPresso tag has the Forward ~ Reverse speed slider. Just re-keyframe to suit your own timeline.

    You could simply use this sample as you would with a rigged character.

    IE. Use the wheel splines as 'control splines'. Simply child your wheels under the relevant spline, as I've done with the cylinders.

    Ask if you need any further explanation of the XPresso. :signthankspin:

    Cheers, Alan.

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • Thanks Al. I'll take a look at it and see if I can replicate it.. or better yet, im assuming I can just use the file and just replace your objects with the ones from my rig, right?

    Either way, ill go through it and read your remarks. If I have any more questions, ill ask. :signthankspin:

    Share this post


    Link to post
    Share on other sites
    Guest
    This topic is now closed to further replies.

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×
    ×
    • Create New...