Results 1 to 11 of 11

Thread: Link Repeated Motion (Morph)

  1. #1
    Member devin's Avatar
    Join Date
    Feb 2003
    Location
    Atlanta, GA
    Posts
    264

    Link Repeated Motion (Morph)

    Is there any means to link a morph to the motion of another object and have the morph repeat while the driving object is in motion? I'm not a script/expression writer so I'm looking for a script/plug/modifier.

    I have a device where one item moves axially while rotating. A second item with small teeth rides over teeth located on the first. I'm using a morph to drive the "riding" motion of the second part and want to link it to the axial or rotational movement of the first.

    Just FYI... these teeth prevent the parts from rotating in the opposite direction and also create a clicking sound as they pass over each other.

    Thanks.


    ...I'd also settle for a means to repeat a motion a set number of times. Pretty much like a post behavior but not infinite.
    Last edited by devin; 05-15-2018 at 11:14 AM.

  2. #2
    Dreamer Ztreem's Avatar
    Join Date
    Jun 2003
    Location
    Sweden
    Posts
    4,130
    The node editor is perfect for things like this. As it is a morph you want to drive, you should use the deform/displacement node editor.

  3. #3
    Dreamer Ztreem's Avatar
    Join Date
    Jun 2003
    Location
    Sweden
    Posts
    4,130
    You should also be able to do this from the graph editor as well.

  4. #4
    Member devin's Avatar
    Join Date
    Feb 2003
    Location
    Atlanta, GA
    Posts
    264
    Nodes are still something with which I need to become far more familiar. Once I move over to 2018, my hand will be forced, I guess.

    Thanks for the suggestion. I'll check it out.

  5. #5
    Dreamer Ztreem's Avatar
    Join Date
    Jun 2003
    Location
    Sweden
    Posts
    4,130
    I can post a screenshot or a scene file later of a possible setup.
    Quesrion: do you really need to use a morph? Is it deforming/ changing shape or do you just use a moroh for translating?
    Last edited by Ztreem; 05-15-2018 at 01:27 PM.

  6. #6
    Super Member Kryslin's Avatar
    Join Date
    Feb 2009
    Location
    Prescott, IA
    Posts
    1,473
    I would use nodal motion on the sliding part. You'll need an item info node, a gradient node, an add vector node, a vector to scalar node, a multiply node and a make vector node.

    Take the item info node, and set its item to the item you want to drive the sliding item. Take its rotation, and connect it to the vector scalar node. Chose which rotation(h is x, p is y, b is z)axis you want the value from. This gives you a value of 0..6.28, which is the angle of rotation in radians. You'll take that output and connect to the gradient input. Set your minimum value to 0, the max to 6.28. Your first key should be set to black(0,0,0), and your second key @ 1.0 should bet set to white(1,1,1).

    Take the color output of the gradient, and connect it to one input of the multiply node, set the other input to the distance you want the driven object to move. Take that output, connect it to the make vector node, using the input for what ever axis you want to slide the item on. Set the other inputs to 0.

    From the input node, take the objects position, and connect it to one input of the vector add node. Connect the output of the make vector node to the other. And finally, connect that output to the position input.

    Your tweaking is done at 2 places : the gradient cotrols the angle the sliding motion works in, and the multiply controls the distance it moves along an axis.

    If anyone tries this, and I forgot something, please correct it. I don't have access to my workstation( healing from back surgery), and the above is probably littered with errors...
    --------
    My Scripts for Lightwave
    Intel Core i7 960 @3.20 Ghz, 24 GB ram, EVGA 6GB GTX980Ti "Classified" driving 2 x HP LA2405.

  7. #7
    Dreamer Ztreem's Avatar
    Join Date
    Jun 2003
    Location
    Sweden
    Posts
    4,130
    Here is an example using cyclist which is a super motion modifier for linking motions together. The best part is that you link animation frames not just math motions, this way you can do very complex movements that can be driven by simple controllers.

    Not knowing exactly what you're after I did this simple setup for you to look at. I hope it helps.

    Click image for larger version. 

Name:	2018-05-15_23-39-56.gif 
Views:	28 
Size:	777.7 KB 
ID:	141717
    Attached Files Attached Files

  8. #8
    Super Member dwburman's Avatar
    Join Date
    Feb 2003
    Location
    Washington State, USA
    Posts
    2,880
    ...
    Last edited by dwburman; 05-15-2018 at 05:38 PM.
    [mr] Dana W. Burman | http://dwburman.com
    Motion Graphics for sale at Pond5 Stock Footage
    Check out my tutorials at Liberty3d.com & my YouTube channel!

  9. #9
    Super Member dwburman's Avatar
    Join Date
    Feb 2003
    Location
    Washington State, USA
    Posts
    2,880
    I thought about Cyclist too, then I saw your pic of your guess of what the OP was asking and I remembered RayCast.

    Hmm... If that's what he's after, perhaps a Ray Cast Geometry node set up could work.

    Yes. Yes it does.gear_dwburman.zip

    If he wants a recipricating motion (back and forth), then I think cyclist would work well.


    Incidently, Cyclist was missing from LW2018.1 when I tried loading Ztreem's scene. Luckily, it came back after I scanned the plugin folder.
    Last edited by dwburman; 05-15-2018 at 05:40 PM.
    [mr] Dana W. Burman | http://dwburman.com
    Motion Graphics for sale at Pond5 Stock Footage
    Check out my tutorials at Liberty3d.com & my YouTube channel!

  10. #10
    Dreamer Ztreem's Avatar
    Join Date
    Jun 2003
    Location
    Sweden
    Posts
    4,130
    I have no idea if that motion is what he wants, it’s my guess from reading his post. Raycast works as well, I chose cyclist as he said he was not that into nodes. He also asked to work with morphs and that I skipped, but should work as well with both cyclist and raycast.

  11. #11
    Member devin's Avatar
    Join Date
    Feb 2003
    Location
    Atlanta, GA
    Posts
    264
    Wow. Thanks for the posts and assistance everyone. I've had my head buried in this big project and haven't thought to check back. Evidently I forgot to subscribe to the thread as well. I really appreciate the input and look forward to exploring your suggestions.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •