Jump to content


BhavanaFibo

How to fix the axis for clones

Recommended Posts

BhavanaFibo    0

Hello C4D Café community

Simply put:

in C4D

I’d like to go from 1 cube on frame 1 to 1,000 cubes on frame 120.

I’d like to control the exact position and orientation for the growth of my cloned hoard.

 

I’m trying to start with a single cube, (for illustrative purposes, let’s size it at 10cm)

Not just in a specific location, I can certainly do this, but to lock it into this exact FIXED location during the entire animation from  (set axis, x,y,z perhaps, 0, 0, 0) – I don’t know how to accomplish this.

 

I want to increase from 1 cube to 1,000, 10 layers of 10x10
procedurally animated.

The attached gif, (ROUGHLY sketched to help illustrate my goal) shows cube 1, upper left corner of quadrant, then cube 2, placed directly to the right, along the X axis, etc. then I hand animated the first 'quadrant' of 25, 5x5 (it is the upper-left quadrant, then the next 25 cubes in quadrant 2, then 3 then 4 to show the completion of the first whole level, then level 2.

My question: how in the hell do I do this using the c4d tools.

I totally know how to get from 1 to 1,000, but I do NOT know if I should be using:

- the 'cloner"?

- 'thinking particles',

- 'arrange objects, duplicate', etc?

-formula, COFFEE, python???

Final note, I’m certainly not asking any of you to CREATE this build for me, merely point me in the right direction.  I have spent many hours on cinversity and most major youtube/vimeo channels, plus read the MAXON manual – so I am keen to help myself, but I am stuck and need to ask for help.

The original cube keeps moving all over the place as the clone grid/honeycomb array generates from the middle out; I know there must be a way to anchor the first cube and then control the axis along which my little cloner can get busy.

Also, how to fix the first cube into a precise location, so it DOES NOT MOVE as the animation proceeds, so that each new clone or instance, is precisely to the right or below or above that FIXED point (x,y,z.)?

Make sense?

Thanks in advance.

Grid-array-fixed-axis.gif

Share this post


Link to post
Share on other sites

DeCarlo    68

I achieved something very similar by having a single User Data field simultaneously control the count, size, and position of a grid array cloner using XPresso. So if you want your clones to be 50cm apart, each time you add a clone, you must increase the size of the cloner by 50cm and shift the position 25cm - thus keeping the original cloner in the exact same place.

Your example included some growth that wouldn't work with this method (e.g. row 1 expands, but not 2-5). If you need that much control, I would just fake it - animate those extra boxes as a separate object for those few frames of the animation, then promptly turn them off when you fill through them with the main cloner.

  • Like 1

Share this post


Link to post
Share on other sites
westbam    71

This is what effectors are for. You make your 10x10x10 grid, with the cloner, and apply a MoGraph -> Effector -> Plain effector. (make sure it is applied in the tab Effector of the cloner!)

 

Now,  you need to give the Plain effector a Fallof, for example a box and you move the Plain Effector, you can see the Cubes only react where the box of the fallof is. (Tab Fallof -> Shape)

 

In the Parameter tab, instead of Position, you want scale, and a -1 scale, with uniform enabled, and absolute enabled will make the Cubes disappear.

 

Than in the Fallof Tab you set the Fallof to 0%, so you don't see that animation/growing effect. (or keep it if you like it)  And since you want your cubes to grow and not shrink, you need to toggle the Invert fallof.

 

Now you just animate the position of the Plain Effector and you are done.

  • Like 1

Share this post


Link to post
Share on other sites
BhavanaFibo    0
  • Topic Author
  • DeCarlo and westbam,

     

    a few things: DeCarlo—thank you, Mister Westbam—dank je.

     

    In Order, DeCarlo, I am excited by the prospect of using XPresso to solve this problem as it seems like a perfect, programmatic problem.  I'm experimenting but currently know too little to even get close to my desired outcome. Any pointers? 

    As far as your observation regarding rows 2-5, cubes 6-25, I think you're right, I finally punted and decided that would be the most time-efficient, but I'm bummed that I cannot do something like: create a plane, assign location coordinates to each width & height segment and then place a cube at each 'address' in a sequntial manner.

     

    For Mister Westbam's comments: thank you for directing me to the plain effector, I am experimenting with it right now.  If I can get it to work for rows 2-5 and then quadrants 2-4, I will both: rejoice and then totally high-five you here on the forum and then 'like' everyone of your YouTube Channel vids. ;)

    Share this post


    Link to post
    Share on other sites
    DeCarlo    68
    18 minutes ago, BhavanaFibo said:

    I'm experimenting but currently know too little to even get close to my desired outcome. Any pointers? 

    XPresso is pretty straightforward once you learn the basics. Below is how I add rows to my corn field, keeping row 1 fixed against my road. 

     

    On the left is my null object with the User Data fields I am using to control the cloner object, which is on the right. The Data Field "Depth" is the same as the count on the cloner (number of rows). Size determines how far apart the clones are, so I just multiply the "Depth" by 50 to make the cloner stretch 50cm for every clone I add. To keep row 1 fixed, I have to shift the position of the cloner 25cm for every row I add, so I use a formula like (value1 - 1) * 25. 

    If you're REALLY new to XPresso, just drag and drop the objects onto the XPresso editor to add them as a node. Use the blue and red squares at the top of each to select inputs and outputs. Just drag outputs to inputs to connect them. Right click on empty space to add the various types of calculation nodes.  Note that some controls (like writing out a formula) appear in the attribute manager when you click the node.

    xpresso.jpg

    Share this post


    Link to post
    Share on other sites
    BhavanaFibo    0
  • Topic Author
  • Cool, The NAB C4D Live presentation is going on now, I'll try this right away, afterwards. 

     

    Additionally, thanks for taking your time to think through and share—I appreciate it.

    Share this post


    Link to post
    Share on other sites
    BhavanaFibo    0
  • Topic Author
  • DeCarlo and Mister Westbam,

     

    While I'm still keenly interested to get my arms around Xpresso as a solve for this design challenge as it seems perfectly suited, I was able to get the cloner/plain effector to do the job, even if with a bit of brute force.

     

    C'est la vie.,

     

    Thanks again.

    Share this post


    Link to post
    Share on other sites
    DeCarlo    68
    9 hours ago, BhavanaFibo said:

    I was able to get the cloner/plain effector

    Yeah, that sounded like a better solution. I'll have to take a look at it at some point myself.

    Share this post


    Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×