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

Thread: driving morphs based on null direction

  1. #1

    driving morphs based on null direction

    Hello!
    I'm trying to achieve the following effect : I made a field of tentacles. At the base state, there are invisibles (stretched to 0 on the y axis)
    I setup a basic node rig where a null object is triggering an UP morph (tentacles point Up) using a gradient to set the range of influence. Nothing fancy. Now I created 3 more morphs: left. right, back . front and I'd like to find a way to have each direction rigged to match the null motion. When It goes to the left (+x), then the left morphs should fire. When going to the right, the right morphs, etc. giving the effect of the tentacles following (trying to catch) the null.
    How could I "read" the null direction and have It control the morphs (through a conditional node I guess)

    Any idea?

    Thank you!

  2. #2
    skeptic lertola2's Avatar
    Join Date
    Dec 2008
    Location
    New York City
    Posts
    1,110
    Cant you duplicate your node setup for each of your morphs? I think you should be able to do that and then add your morphs together to get the results you want.

  3. #3
    Actually, the difficulty isn't to get the morph to fire within a defined radius, It is to get them to fire according to the null motion. if the null goes from left to right, then the right morph should add to the Up morph. (following the null), same for right to left. front to back, etc.

  4. #4
    Vacant, pretty vacant pinkmouse's Avatar
    Join Date
    Aug 2003
    Location
    South Yorkshire
    Posts
    1,701
    Post a sample scene, and if I get time, I'll have a look at it later for you.
    Al
    "I conceive of nothing, in religion, science or philosophy, that is more than the proper thing to wear, for a while." Charles Fort

    My Website
    My Lightwave Tutorials

  5. #5
    Thank you pinkmouse!
    I appreciate your offer. Don't spend your night on that, I just need some suggestions or insets on how to rig the nodes to get the motion info... I'm not very confortable with nodes.

    https://drive.google.com/file/d/0Bz7...ew?usp=sharing

  6. #6
    skeptic lertola2's Avatar
    Join Date
    Dec 2008
    Location
    New York City
    Posts
    1,110
    I had a quick look at your scene. Here is how I think you should set it up: Use two dpkit item info nodes. One will give you the position of the null at the current frame and one to get the position on the previous frame. Subtract the previous from the current to get the distance moved on that frame. Split the x and z components with the split vector node and use those numbers to drive your back and right morphs. You only need two morphs because you can use negitave values for those two morps to get the same results as your front and left morphs. You can then use the vector add nodes to add the two morphs together and then add that result to your vertical morph.
    Last edited by lertola2; 02-17-2016 at 07:43 PM.

  7. #7
    Mmmh. Comparing the previous frame and actual frame position, that's smart!
    Going to test that out and let you know how It goes.
    Thank you Joe!

  8. #8
    I've tried what you advised me but I'm not sure what to do with the result of the 2 vector subtracted... How can I connect the result to a morph... I tried to add a clamp but no, It doesn't do It.
    Any further advice?

  9. #9
    skeptic lertola2's Avatar
    Join Date
    Dec 2008
    Location
    New York City
    Posts
    1,110
    I don't remember anything about your scene. If you post it again I would be happy to take a look.

  10. #10
    da what? daforum's Avatar
    Join Date
    May 2006
    Location
    Bristol, England
    Posts
    1,675
    marchemitte have a look at this old Node tutorial as it does a similar thing to what you are after.
    https://m.youtube.com/watch?v=JZJcvrJd7qM

    Hope it helps
    Montage Reel, Portfolio, PIN_01, Prime......«« go on, click on a link!

  11. #11
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    7,891
    Quote Originally Posted by marchermitte View Post
    Hello!
    I'm trying to achieve the following effect : I made a field of tentacles. At the base state, there are invisibles (stretched to 0 on the y axis)
    I setup a basic node rig where a null object is triggering an UP morph (tentacles point Up) using a gradient to set the range of influence. Nothing fancy. Now I created 3 more morphs: left. right, back . front and I'd like to find a way to have each direction rigged to match the null motion. When It goes to the left (+x), then the left morphs should fire. When going to the right, the right morphs, etc. giving the effect of the tentacles following (trying to catch) the null.
    How could I "read" the null direction and have It control the morphs (through a conditional node I guess)

    Any idea?

    Thank you!

    Math > Scalar > Sign node should give you -1 if value is smaller than 0. 0 if it's 0. And +1 if it's higher than 0.
    Then output from it you can use in Abs node to make it in 0.0 and 1.0 range.
    Check if it's -1,0, or +1 in Math > Scalar > Logic node. It'll give true, if it's one of them.

    Or try this:
    - Item Info (null), World Spot, to Vector Split (Node Library), or Vector Scalar (pick X axis), plug to Sign node.
    - add three morph maps, pick their morphs.
    - output from sign plug to Gradient. make keys -1,0,+1, and enable Show Output in each of them.
    - plug morph maps to newly created Key(1) Color, Key(2) Color and Key(3) Color
    - output from Gradient to Displacement input.
    You might need to use my nodes for Color Space Conversion from TrueArt's Node Library http://www.trueart.eu
    Last edited by Sensei; 10-29-2017 at 09:06 AM.

  12. #12
    Thank you Lertola!
    Been a long time... here is the link, the node editor is a mess, I'm trying several node networks to get It to work. One thing, with Node Spy I check the values and the X motion of the null controlling the morphs is displayed as a Z vector...

    https://1fichier.com/?5ossgor83j

    Thank you Sensei! I'm testing your advice right now.

  13. #13
    skeptic lertola2's Avatar
    Join Date
    Dec 2008
    Location
    New York City
    Posts
    1,110
    marchermitte, Could you upload your file to this forum instead? That way the file will stay available. Your site wants me to download and install flash player before it will give me the file. I don't want to do that.

  14. #14

    uploaded, removed on request.
    Attached Files Attached Files
    LW vidz   DPont donate   LightWiki   RHiggit   IKBooster   My vidz

  15. #15
    Thank you Erikals!
    Sorry for the inconvenience Lertola... I wasn't aware of the Flash thing.

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
  •