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!
 

lertola2

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

lertola2

skeptic
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:
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!
 
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?
 

Sensei

TrueArt Support
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:
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.
 

lertola2

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

lertola2

skeptic
marchermitte I did not really understand what your node setup was doing. Attached is a scene that may be along the lines of what you want. It has tentacles that reach towards a null. As the null moves the following tentacles lag behind using the Follower motion modifier. This scene uses scaling to get the tentacles to reach towards the null instead of morphs.



View attachment scale_to_null_with_weight_map.zip
scale_to_null_with_weight_map.gif
scale_to_null_with_weight_map.jpg
 
Thank you Lertola.
The use of a double null with follower is pretty smart. While this is not what I had in mind (getting the info of the null motion to fire the corresponding morph, ex: morph map "tentacles.bend_Left" when the morph goes to the left, "tentacles.bend_Right" when It goes to the right, etc.). It could work for what I had in mind. I did get more or less the result that I was looking for with polychains and dynamics but It's more like a challenge now to get that direction info translated into nodes.
Your node setup is impressive for me as I'm not a serious node user.
Thank you for your time and for the scene that I'm studying more carefully now.
 
Top Bottom