PDA

View Full Version : How to achieve random colour per instance?


obscurity
11-06-2006, 10:48 AM
Hi all,
I am working on a piece at the moment, and need to animate a field of flowers.
I would like to apply a texture to the instanced object which then generates a new unique colour per flower.
I used to use BobTronics' ColorChanger plugin but it no longer works in my 9.6 or UB version.
Is it possible to set up such a thing?
Can't find anything in the manual.


Thanks

Steve

donelgreeko
11-06-2006, 01:06 PM
uuhh... Good question. You have one flower and made instances, right?

Short Idea: Take 10 instead of 1 flower and color them differential. So you make instances for each flower. So the field is a little bit mixed.

AdamT
11-06-2006, 01:35 PM
If you're using MoGraph, assign a Random Effector to the cloner and enable Parameter>Color>Color Mode: Effector Color No Alpha.

Ernest Burden
11-06-2006, 07:27 PM
If you're using MoGraph

If you are not...

There's an interesting technique where you make a small UV map for your flower (master) and collapse all the petal points to one small spot. Assign a colored noise, layering noises with the colors you want, and apply it in world space. That way, each flower Instance will get its color from the noise, and the distribution will be truely random.

There's probably an easier way, but what I wrote works nicely.

The reason to collapse all the points is so the color comes from just one point, otherwise you will see color fades on each flower, size depending on the scale of the noise. Now, if you wanted a slightly different color for the center, offset those points a small amount.

Ernest Burden
11-06-2006, 07:36 PM
Oh, and if you want to randomize the Instances by rotation, position, scale you need to use the axis mode. I don't know why, but it works. Axis mode, function>randomize

mogh
11-08-2006, 05:33 PM
Hi

I have the same problem here
I managed to get random color with an object in the cloner but not if this object is inside a null-object.

any solution too this ?

thanks
mogh

bobtronic
11-08-2006, 06:29 PM
I uploaded an UB version of my colorchanger shader plugin. It wont work with Intel Macs at the moment, but I will fix this asap.

http://www.bobtronic.de/plugins/

cheers,
Bob

tcastudios
11-08-2006, 07:07 PM
I uploaded an UB version of my colorchanger shader plugin. It wont work with Intel Macs at the moment, but I will fix this asap.

http://www.bobtronic.de/plugins/

cheers,
Bob

YES!
Thanks, it's a very missed shader! makes things much much simpler.

Cheers
Lennart

ooo
11-08-2006, 07:35 PM
Thanks indeed bobtronic! Very nice to have this shader up an running!
One thing I don't get: it's UB but doesn't run on IntelMac???

odo

Srek
11-09-2006, 06:16 AM
Thanks indeed bobtronic! Very nice to have this shader up an running!
One thing I don't get: it's UB but doesn't run on IntelMac???
UB is usualy a fat binary and in reality includes two different versions of a program/lib, one compiled for PPC and one for Intel CPUs. If you only include one of these parts only the respective CPU will be supported.
Cheers
Björn

bobtronic
11-09-2006, 03:05 PM
Final update for Colorchanger, it now supports Intel Macs too, an update to latest XCode version did the trick.

http://www.bobtronic.de/plugins/

cheers,
Matthias

Jorge Arango
11-09-2006, 03:47 PM
Final update for Colorchanger, it now supports Intel Macs too, an update to latest XCode version did the trick.

http://www.bobtronic.de/plugins/

cheers,
Matthias

Thanks Bobtronic, I use this all the time.


Jorge Arango

ooo
11-09-2006, 08:36 PM
thanks a lot BOB! Very much appreciated.

odo

soccerrprp
12-07-2006, 10:37 AM
If you're using MoGraph, assign a Random Effector to the cloner and enable Parameter>Color>Color Mode: Effector Color No Alpha.

AdamT,

I followed your instructions in the demo and i got not color randomization. Where do i place the color/texture? Or should it randomize color automatically?

Richard

Mylenium
12-07-2006, 02:59 PM
Hi

I have the same problem here
I managed to get random color with an object in the cloner but not if this object is inside a null-object.

any solution too this ?

thanks
mogh

No. Clones must always be at the root level of the cloner for any shading tricks to work. If you need for some reason differently colored areas on you model, you need to convert it to a single mesh and work with selections and the MoGraph shaders.

Mylenium

Mylenium
12-07-2006, 03:02 PM
AdamT,

I followed your instructions in the demo and i got not color randomization. Where do i place the color/texture? Or should it randomize color automatically?

Richard

Clones are only colored if the have no materials associated with them. If you have a material, you need to change the coloring with the MoGraph shaders. if that's not the case, check your colors on the cloner and Effector - by default they are both grey.

Mylenium

soccerrprp
12-07-2006, 04:15 PM
Got it! Now, if I want to create reflective material, do I use the shader effector? Or can I do it within the random effector?

EDIT: W/ a little trial and error, i figured it out! Too bad I don't have mograph. Oh, well, there's always colorchanger plug!:)

nycL45
12-07-2006, 06:10 PM
ColorChanger UB! Thanks Bobtronic.

rsquires
12-08-2006, 02:10 AM
First thanks Bobtronic for both UB versions of EnLighter and Color Changer, both invaluable plugins to C4D.

I thought I was doing it wrong because for a while it wouldn't work. Then I realised it was because the object I was cloning was inside a Chamfermaker modifier ( another great addition to C4D). As soon as I take this out of the mix then all is well. Can someone think of a way around this, as chamfering objects that are cloned is useful

regards

Rich

Per-Anders
12-08-2006, 02:35 AM
Clones are only colored if the have no materials associated with them. If you have a material, you need to change the coloring with the MoGraph shaders. if that's not the case, check your colors on the cloner and Effector - by default they are both grey.

Mylenium

Well not really, you can just set the color of the cloner to "Always" and it will overwrite the material on it (just as with any other obejct in Cinema).

CGTalk Moderation
12-08-2006, 02:35 AM
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.