PDA

View Full Version : Assign Random Color (Non-Instanced)



devin
09-11-2013, 09:02 AM
Hi,

Is there any way to apply random colors to multiple meshes in a layer in the same way that you can use the Fixed Random Output of Instance Info and a Gradient Node to apply it to instances? I know that this method uses Instance ID's but was hoping that some other method, plug-in, etc. exists for normal layers/meshes.

Thanks,
Devin

Sensei
09-11-2013, 12:38 PM
You can extract Layer index using Extended Item Info from TrueArt's Node Library
Here is video
https://www.youtube.com/watch?v=QJHSPseh8hU

jeric_synergy
09-11-2013, 12:42 PM
Hi,
Is there any way to apply random colors to multiple meshes in a layer in the same way that you can use the Fixed Random Output of Instance Info and a Gradient Node to apply it to instances?
Devin
??? When you say "multiple meshes in a layer", do you mean multiple contiguous meshes? Please expand.

Sensei, does your solution work in one layer?

Sensei
09-11-2013, 12:46 PM
Right, apparently devin meant disconnected parts in single layer, not multiple layers.
So he needs to assign them different weight map value and done.
Like in this video tutorial
https://www.youtube.com/watch?v=T1DvdkvvfAo

devin
09-11-2013, 12:46 PM
??? When you say "multiple meshes in a layer", do you mean multiple contiguous meshes? Please expand.

Separate meshes all in one layer. In this case, it would be individual rocks. I wouldn't be opposed to breaking them into separate layers either. I gave instancing a shot but I need more control of the rock spacing and layout than instancing offers.

jeric_synergy
09-11-2013, 12:47 PM
Could a PART index be used instead of w.maps?

devin
09-11-2013, 12:52 PM
Thanks for the links and solutions! I took the manual (ugh) approach but will check these out asap.

dpont
09-11-2013, 02:57 PM
Could a PART index be used instead of w.maps?

Indeed, for surfacing,
Part Move node has an output for that.

Denis.

jeric_synergy
09-11-2013, 03:03 PM
Devin, let us know if you use Denis' approach.
++++
Here's a sample image using Denis' approach. This is ONE layer, ONE surface. As he says, DPKit Part Move has a useful index output for this.

BUT, the node "Part Info", also a part of DPKit, has an index output that does NOT work for this. Why is that? Shouldn't that be the same index?

PartMove>>Gradient>>Surface. Wallagh!

117059

devin
09-11-2013, 09:34 PM
This is awesome but I'm unable to get a color randomly applied to each individual object. I feel like I may be missing something in the gradient such as applying the proper input value. Do I have to assign parts in modeler or is that unrelated? (sorry if this is a stupid question)

I'm totally missing something. Once again, thanks for the help!

dpont
09-11-2013, 11:56 PM
This is awesome but I'm unable to get a color randomly applied to each individual object. I feel like I may be missing something in the gradient such as applying the proper input value. Do I have to assign parts in modeler or is that unrelated? (sorry if this is a stupid question)

I'm totally missing something. Once again, thanks for the help!

In Part Move node, unconnected pieces of mesh are automatically detected.

If you set your gradient between 0 and 1,
Multiply Part index by 0.1 for 10 parts
by 0.01 for 100 parts etc..


btw, Part Info node has empty output as standalone node
it get its index from the Part Move
so it must be connected to this node,
it is usefull in displacement context
for programming separately Motion, Rotation etc before
their connection in Part Move,
Part Move Delta input has been modified recently,
with MDD Cache node it is possible to set a different time
per part, or a different shift level in Shifter,
using the Part Info node.

Denis.

jeric_synergy
09-12-2013, 01:47 AM
This is awesome but I'm unable to get a color randomly applied to each individual object.
Could you be more precise? In which way IS color being applied? (Why not post an image??????????)

First guess: set your gradient POST to REPEAT.

117068

++++++++++++++++++++++

......

btw, Part Info node has empty output as standalone node
it get its index from the Part Move
so he must be connected to this node,
it is usefull in displacement context
for programming separately Motion, Rotation etc ...........
Denis.

(We're discussing the same thing in 2 diff. threads....) I didn't understand that at all, sorry. :(