PDA

View Full Version : Help with XPresso and Sphere Radius


cbowyer
03-26-2010, 06:16 PM
Hi everyone.

I'd like to set up an xpresso tag to control the radius of metaball tag. I have a metaball object containing a cloner object with a single point polygon inside that. The polygon has a metaball tag on it as well. The cloned polys are mapped to the vertex of a Platonic.

A random effector moves through the cloner object and displaces the cloned polys which is what I want but I would like to use xpresso to reduce the radius of the metaball tag the further away the cloned ploys move from the centre of the cloner object.

So I think I have to translate the vector input through range mapper and spit out a real number that can control the radius. I messed around with a setup last night but couldn't get any results.

I hope that's clear. Can anyone lend a hand?

regards
Cameron

Scott Ayers
03-27-2010, 12:12 AM
One way to do this is to use the distance node.
I'm assuming your random effector will be starting out away from the other objects then getting closer over time:

-Drag the polygon and the random effector into the xpresso editor and set their output ports to position.
-Create a distance node
-Connect the polygon and random position outputs to the distance node's input ports.
-Create a Clamp node
-Connect the output port of the distance node to the input "VALUE" port of the Clamp node
-Drag the metaball tag into the xpresso editor and add the tag's radius option to the input port side
-Connect the output from the Clamp node to that radius port of the metaball tag's node

This will set up a 1:1 relationship between the radius value compared to the distance of the polygon and the random effector to each other.
Since this is a 1:1 relationship. The radius will keep on growing as your random effector gets farther away. So the max. setting of the Clamp node is used to set a limit and stop the radius from growing beyond what you want.

-ScottA

JDP
03-27-2010, 05:15 AM
You won't be able to get hold of a metaball tag for each clone. You will have to have as many poly objects under you cloner as clones you want, so if your platonic has 20 points you will need 20 poly objects. You could then use a distance node to get the distance between the cloner and clone and remap that to the values you want. You will need a link list node to iterate through the metaball tags at the same time that you are iterating through the clones using the mograph data node.

HTH
Cheers.

JDP
03-27-2010, 02:22 PM
Some weird stuff going on here, when I first posted your reply wasn't there Scott!! I think, I could be wrong, Cameron wanted the radius to change depending on how far the clone was from the centre of the cloner. Using your solution all clones would change size at the same time and not on an individual basis.

Cheers.

cbowyer
03-27-2010, 07:57 PM
Thanks for the replies

Yes, I thought about it a bit more and realized I would need a poly object for each vertex I would be cloning. Didn't know about the distance node so I will give that a try.

regards
Cameron

CGTalk Moderation
03-27-2010, 07:57 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.