A new version of Cineversity has been launched. This legacy site and its tutorials will remain accessible for a limited transition period

Visit the New Cineversity
   
 
Coloring each clone in a specific way
Posted: 06 April 2012 03:56 PM   [ Ignore ]  
Avatar
Total Posts:  95
Joined  2006-07-27

This should be pretty easy, but I am in a million directions right now with numerous projects and haven’t the time to fiddle.  Basically, I have a grid clone of simple planes, 256 clones to be exact, and I wish to have each one move 1 step up in luminance, so that the lower left clone is pure black (0), and the top right clone is pure white (255), which each clone in between moving up by a value of 1 so that each step is represented.

I’ve tried a material with a gradient assigned to a shader effector, and I’ve also tried a step effector, but these aren’t getting it done for me.

Thanks in advance,
-Will

 Signature 

These pretzels are making me thirsty.

Profile
 
 
Posted: 06 April 2012 07:14 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  365
Joined  2006-05-17

Hi Will,
here is a simple setup.

First create a cloner (you have)
Then set it to grid, with 16*16 clones.
Add a step effector.
Turn off all parameters.
Turn “color mode” on.
Then go to the effector tab and set the spline so that it is linear (otherwise it will not be equal divisions)
This will already drive the color of the clones.
But you can then take it a step further and create a new material with a mograph color shader and apply that to the cloner.

Profile
 
 
Posted: 06 April 2012 07:26 PM   [ Ignore ]   [ # 2 ]  
Avatar
Total Posts:  95
Joined  2006-07-27

Thanks for the reply, Patrick.  Aside from setting the spline to linear, that was what I did.  But even with that setting, what I get is a bottom to top gradient effect, so that all the clones on the bottom row are one shade, and then the next row up gets lighter, and so forth.  What I need, however, is for each clone to be a different shade, so that I’ve got the full range from 0 to 255.  Interesting that the step effector doesn’t seem to apply individual steps to clones in grid array mode, rather it seems to consider only columns.

 Signature 

These pretzels are making me thirsty.

Profile
 
 
Posted: 06 April 2012 08:42 PM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
Total Posts:  365
Joined  2006-05-17

It does apply to each individual clone.

If you set the color shader to index ratio then it will only look at each row in the grid cloner.

But right out of the box as I described it will add shading to each clone…not to each row.

The one catch that further testing reveals is that LWF changes the interpolation of the values between clones…so in LWF your darker values get crushed and the lighter values will overpower.

Disabling LWF produces better results, but seems to clip at 246/246/246 so there are at least 9 duplicate clones in there somewhere.

The interesting thing here is that to get actual 1 step values you can leave LWF enabled and then add in a ambient light set to 100%

doing so gives me the following results

File Attachments
clone_color_test_lwf_and_ambientlight.zip  (File Size: 45KB - Downloads: 221)
Profile
 
 
Posted: 06 April 2012 11:49 PM   [ Ignore ]   [ # 4 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Will,

It is practically pretty simple, you take the Formula Effector and instead of the default you put in: (id+1)/count

Then you set this to color and nothing else, then you get your prefect gradient.

The id+1 is needed as the counting starts with zero, and to get all your steps you need 1-256 instead of 0-255.

All the best

Sassi

P.S. with some math you can get even a Gamma in it. ;o)

File Attachments
CV2_r13_drs_12_MGco_01.c4d.zip  (File Size: 50KB - Downloads: 250)
 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 09 April 2012 03:29 PM   [ Ignore ]   [ # 5 ]  
Avatar
Total Posts:  95
Joined  2006-07-27

Thanks Patrick, Dr Sassi for the replies.  I like the formula effector approach, and I knew there would be a technique involving the clones’ index value that would nail it.  I’vd downloaded your file and will have a look shortly.  At that moment, I was generating graphics assets for 10 movies all at different stages, but all with the same deadline, so my concentration was split in a million directions, and I had run out of ‘fiddlin’ time.  Ultimately, the client wanted a simpler look, so I did only 3 squares, with one at 0, one at 255 and another that ramped up from 1-244 for the duration of the animation in After Effects with a Shape Layer.

Thanks Again,
- Will

 Signature 

These pretzels are making me thirsty.

Profile