Page 1 of 2 12 LastLast
Results 1 to 15 of 23

Thread: Stickysurface screwing up stupidly

  1. #1
    Studio Animator DonJMyers's Avatar
    Join Date
    Aug 2003
    Location
    Los Angeles, CA
    Posts
    575

    Stickysurface screwing up stupidly

    The motion modifiers sticky and stickysurface are supposed to let you animate a bug crawling over an apple (aka in an arc). The bug has sticky applied and the apple has stickysurface applied. If the apple doesn't move it works great and is interactive. But the apple in my animation is being held and moved around.

    Now the bug pops and boings and has difficulty keeping up with the apple's fast motion. Yet if I toggle the motion modifier on and off the bug snaps to exactly where it is supposed to be.

    I think this is because these motion plugins are old and the rest of lw doesn't really talk to them well.

    I can't believe this motion modifier was added in LW 9.x and I never used it!

    Help help what to do? Any suggestions?

    Using the raycast node won't work because that is for plopping things on an axis. This is a perfect sphere. Perhaps I could parent the bug to a null in the center of the sphere and move the bug by rotating the center null, but that is awkward.

  2. #2
    Goes bump in the night RebelHill's Avatar
    Join Date
    Nov 2003
    Location
    jersey
    Posts
    5,771
    raycast can work... you just get the vector from the sticker to the sticky (sticky pos - sticker pos) and cast along that vector. As for the update thing... its probs just one of those interactivity bugs... turn on studio live (itll slow down ur scene interactivity but make everything interactive)... Else, once ur done and want to lock it all down... use the motion baker on my animation toolbox.
    LSR Surface and Rendering Tuts.
    RHiggit Rigging and Animation Tools
    RHA Animation Tutorials
    RHR Rigging Tutorials
    RHN Nodal Tutorials
    YT Vids Tuts for all

  3. #3
    Studio Animator DonJMyers's Avatar
    Join Date
    Aug 2003
    Location
    Los Angeles, CA
    Posts
    575

    Hmmm

    Those are good ideas. Unfortunately turning on virtual studio did not help at all so I tried the raycast node. I am "nodally naive" but I figured out how to do what you say. A screenshot of the nodes is attached.

    But now the bug may stick to the surface of the sphere but I can't move it around to animate it. It is stuck at the ten o'clock position on the sphere. Aaargh!

    I'm a LW wiz but some of the newer features like raycasting nodally I'm not up to speed with.Attachment 132848Attachment 132849

  4. #4
    Studio Animator DonJMyers's Avatar
    Join Date
    Aug 2003
    Location
    Los Angeles, CA
    Posts
    575
    Uncoupling the "rotation" output lets me move the bug around but I still can't keyframe it properly. Moving from one keyframe to the other across the surface results in the bug flying off the sphere completely which is not supposed to happen.

  5. #5
    Registered User
    Join Date
    Jan 2005
    Location
    Colorado Springs
    Posts
    1,795
    Here's an example scene that has a "lady bug" wandering a "golden delicious apple". You're very close to the right node setup.

    To have the bug's orientation match the surface of the apple at the hit point, you need to use a "helper node" provided with the 11.6 content called ConvertHitNormaltoHPB, where HPB is Heading, Pitch and Bank. Second, to correctly calculate the Ray Direction, you need to subtract the position of the bug from the position of the target geometry. Here's the nodal setup I used:

    Click image for larger version. 

Name:	BugCrawl_RayCast_NodalMotion.jpg 
Views:	59 
Size:	342.2 KB 
ID:	132851

    The second hint is that the bug's keyframed Y location should always be above any geometry in the apple. So, if your bug starts flying off the apple, try raising it's Y value. The Nodal Motion will "attach" it to the apple regardless, but apparently the RayCast node gets confused if the original location is inside the target geometry.

    Hope this helps!
    mTp

    P.S. when I download the ZIP file I uploaded, the issue with the bug's Y value being too low is inherent. So, when you unzip it and try moving the ladybug around, FIRST raise it's Y value above the apple! I think when the scene is saved and packaged, the initial Y value of the bug is captured from it's *calculated* value, which is on the side of the apple.
    Attached Files Attached Files
    Last edited by MonroePoteet; 03-10-2016 at 02:08 PM. Reason: Bug's Y position in ZIP file scene

  6. #6
    Studio Animator DonJMyers's Avatar
    Join Date
    Aug 2003
    Location
    Los Angeles, CA
    Posts
    575
    Thanks for taking the time to make that scene Monroe. It sticks the bug to the apple but, unfortunately, just moving or rotating the apple makes the bug constantly slide around. It's probably trying to line up with it's start position so this isn't going to work at all

  7. #7
    Registered User
    Join Date
    Jan 2005
    Location
    Colorado Springs
    Posts
    1,795
    Yes, that does seem to be a problem. Unfortunately, from my rudimentary experimenting the only way I found that avoids the slip-sliding when the apple moves is to:

    1) parent the bug to the apple
    2) set up the motion you want on the apple with the apple not moving
    3) step through the animation frame-by-frame, keyframing each frame with Nodal Motion enabled
    4) then disable Nodal Motion

    When doing step (3), continue to be sure the bug's Y coordinate is above the apple, modifying it if required.

    When stepping to each subsequent frame, the bug's position is updated via the nodal motion, which is then captured with the keyframe. The Motion Baker(s) don't seem to capture the bug's motion parameters *after* the Nodal Motion has been applied, although there may be some way of making them do so (I'm no expert at baking motion).

    Then, the bug's motion is keyframed relative to the apple and the apple can move or rotate and the bug will stick. If you can find a way for the Motion Baker facilities available to capture the bug's position / orientation relative to the apple after the Nodal Motion is applied, then you could use that.

    mTp
    Last edited by MonroePoteet; 03-10-2016 at 03:16 PM.

  8. #8
    Goes bump in the night RebelHill's Avatar
    Join Date
    Nov 2003
    Location
    jersey
    Posts
    5,771
    like this...

    LSR Surface and Rendering Tuts.
    RHiggit Rigging and Animation Tools
    RHA Animation Tutorials
    RHR Rigging Tutorials
    RHN Nodal Tutorials
    YT Vids Tuts for all

  9. #9
    Registered User
    Join Date
    Jan 2005
    Location
    Colorado Springs
    Posts
    1,795
    Thanks for the great tutorial. I tried the setup you describe, but still get skating on the bug when the master Null is moved away from the origin. I think it has to do with the target geometry not being exactly spherical. As well, the Motion Panel option to target the bug to the Apple doesn't work well on a non-spherical object. The ConvertHitNormalToHPB works better, IMO.

    I've attached my scene which I think is the same setup you describe, but with the LadyBug and (non-spherical) Apple. When I move the master Null away from the origin, the stick Null and LadyBug skate on the surface. If the master Null is away from the origin by any significant amount, the stick Null and LadyBug actually leap off the surface. As well, if the master Null isn't exactly at the origin, then rotating it causes the stick Null and LadyBug to skate on the surface.

    mTp
    Attached Files Attached Files

  10. #10
    Studio Animator DonJMyers's Avatar
    Join Date
    Aug 2003
    Location
    Los Angeles, CA
    Posts
    575
    Meanwhile I tried animating the bug with the sticky motion modifier and it worked because I did not move the apple. Then I baked the bug motions so I could turn off the sticky motion modifier. But when I did that it only baked the "non-sticky" part of the motion. The baking process doesn't see the sticky plugin's actions.

    I will try turning on virtual studio. Groan!

  11. #11
    Studio Animator DonJMyers's Avatar
    Join Date
    Aug 2003
    Location
    Los Angeles, CA
    Posts
    575
    I can force the movement of the bug to be baked properly only if I select the bug, which is parented to nothing, open the motion panel and click the "x" on the PARENT button. This deletes a parenting relationship but there is no parent. This seems to force LW to do a full scene evaluation. But I have to do it for every frame one at a time by hand. Arrggh!

    Could a script be written to do this?

  12. #12
    Goes bump in the night RebelHill's Avatar
    Join Date
    Nov 2003
    Location
    jersey
    Posts
    5,771
    Use the motion baker on my animation toolbox.
    LSR Surface and Rendering Tuts.
    RHiggit Rigging and Animation Tools
    RHA Animation Tutorials
    RHR Rigging Tutorials
    RHN Nodal Tutorials
    YT Vids Tuts for all

  13. #13
    Studio Animator DonJMyers's Avatar
    Join Date
    Aug 2003
    Location
    Los Angeles, CA
    Posts
    575
    In fact if I click on any of the "X"s in the motion panel the motion path is baked properly. I have played with all kinds of settings and modules and I can't seem to force the baking process into being automatic. I will have to go frame by frame and click "X" on each frame. Ouch. 7 bugs x 115 frames is too many clicks on Xs.

  14. #14
    Registered User
    Join Date
    Jan 2005
    Location
    Colorado Springs
    Posts
    1,795
    It looks like this Motion Baker:

    http://mentalfish.com/2009/09/motion-baker/

    actually works in the scenario using RayCastGeometry. Be sure to set the frame range you want to bake, and it then creates a separate keyframe for each frame of the bug's sticky walk. You still have to "freeze" the bug's motion before moving the Apple, but in my scene, it works fine.

    To be able to adjust the bug's motion, I'd recommend saving the bug's un-frozen motion keyframes as a Motion File using File=>Save=>Motion File. You can then re-load the Motion file (deleting all frozen keys in the process), adjust as required, and re-freeze the sticky bug motion.

    It might work with Sticky Motion as well, but I didn't try it.

    P.S. Forgot to mention: you still need the bug parented to the Apple for the bug's frozen motion to move with the Apple.

    mTp
    Last edited by MonroePoteet; 03-11-2016 at 04:44 PM. Reason: P.S. - parent bug to apple

  15. #15
    Goes bump in the night RebelHill's Avatar
    Join Date
    Nov 2003
    Location
    jersey
    Posts
    5,771
    Quote Originally Posted by DonJMyers View Post
    7 bugs x 115 frames is too many clicks on Xs.
    Hello... use my motionbaker... for the third time.
    LSR Surface and Rendering Tuts.
    RHiggit Rigging and Animation Tools
    RHA Animation Tutorials
    RHR Rigging Tutorials
    RHN Nodal Tutorials
    YT Vids Tuts for all

Page 1 of 2 12 LastLast

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
  •