Activity › Forums › Maxon Cinema 4D › Cinema 4D Xpresso question
-
Cinema 4D Xpresso question
Posted by Mauricio Barrientos on December 14, 2021 at 6:08 pmhi
please where can i make a question using
Cinema 4D Xpresso
thansk and blessSteve Bentley replied 4 years, 4 months ago 2 Members · 3 Replies -
3 Replies
-
Mauricio Barrientos
December 19, 2021 at 5:09 pm -
Steve Bentley
December 19, 2021 at 7:29 pmThe easiest way is to use a Link List node. When put this node in your tree, you can drag objects into the Link List’s attributes panel. Then you can use that set up you have already to iterate through the objects randomly.
You input your range mapped random number into the index port on the left of the Link List node and then, out of the “link” port on the right side of the Link List node, you hook that to an object node through the Object port. This number generating the index should be an integer – it doesn’t always matter but xpresso is old so it’s finicky and I’ve seen this one thing trip people up all the time. If you are getting a float out of your range mapper just use a Calculate/FloatFunc node and choose Ceil(ing) or Floor to chop off those decimals
You can have a different link list for each group of objects (so one for different glasses and one list for different shirts), and then an object node coming out of each of those link list nodes for each article. To get a bunch of objects into the links lists in one operation, select a bunch of objects in the objects manager and then click the link list and then drag all those objects at the same time to the list, because you have clicked somewhere else to select the link list node, the objects will stay selected in the object manager. (this is easier than locking the focus of the attributes window and having to open another one.)
You can also synchronize things. So lets say a certain pair of glasses needs the hats to sit a little higher. You can store position data in nulls that are positioned correctly and stand in for the different positions of the hats. Then when you iterate down through your glasses link list, you can also iterate simultaneously down through the position null link list and pipe the matching position data from the outputted null into the position data of the chosen hat. In other words you are using the same range mapped index value for both glasses and position null lists, while another random number picks the hat.
Reply to this Discussion! Login or Sign Up