Isotropix Forums

Random Color for Non Scattered Object

General Discussion about Isotropix and CG related topics

Random Color for Non Scattered Object

Unread postby nadiasantoso » Thu Sep 19, 2019 6:09 am

Hi,

I have a flower petal that is not instanced. Because the petals are sharing the same UV, I want to give the petals random color variations using TextureRandom and TextureInstanceColor. Can we use TextureInstanceColor for non-scattered objects? I tried using it and it didn't work.

Cheers,
Nadia
Attachments
Screenshot_13.jpg
nadiasantoso
 
Posts: 30
Joined: Thu Jun 20, 2019 6:00 am

Re: Random Color for Non Scattered Object

Unread postby esmith » Thu Sep 19, 2019 4:32 pm

You wont be able to use Instance color operations on non instanced geometry. What you want is to produce a random variation on multiple pieces of geometry that share the same UV space (on top of each other to share the texture), but not the same world space (they are each in a circular pattern to make the flower shape).


Capture.JPG

Here I am mixing 2 textures. On the bottom is my "leaf" texture, and then using a fractal noise as a mix, I'm blending on another map that's being projected down in world space (vs UV space) so that it appears different on each leaf.

I've attached the example assets. Of course you can use other methods as well, but for a flower, maybe this is the simplest way. Note that I'm mixing 2 maps, but obviously, the 2nd world space map could just be a procedural of some type to create some of that random "burning" or "decay" that can happen on some leaves of a plant.

Good luck and let me know if this helps!
Attachments
RandomizingNonInstancedColor.project
(39.64 KiB) Downloaded 24 times
User avatar
esmith
 
Posts: 162
Joined: Mon May 22, 2017 4:11 pm

Re: Random Color for Non Scattered Object

Unread postby esmith » Thu Sep 19, 2019 4:40 pm

Also just for your further education, here is a simple instance color setup so you can see how it can work.

The green and black balls, are instances inside a combiner, of an actual red ball asset. But it's pulling color off a gradient to randomly make some of the red balls black, and some of the red balls green.

Capture.JPG
Attachments
RandomColorOnInstances.project
(51.52 KiB) Downloaded 24 times
User avatar
esmith
 
Posts: 162
Joined: Mon May 22, 2017 4:11 pm

Re: Random Color for Non Scattered Object

Unread postby nadiasantoso » Fri Sep 20, 2019 3:29 am

Hi,

Thank you for your reply. But actually that's not what I want to achieve. When the geometry consists of different shape nodes, I actually can use Utility node with Vertex ID as the output. When the geometry is really only one mesh, it is when I have the difficulty to produce a random color. Is there any work around for this?

Cheers,

Nadia
Attachments
colorJitter_01.jpg
I failed when trying to do the same but for 1 mesh that only contain 1 shape node.
colorJitter_02.jpg
It works when assigned to a mesh which consists of different shape nodes.
colorJitter_03.jpg
This is using Utility node with Vertex Id as the output
nadiasantoso
 
Posts: 30
Joined: Thu Jun 20, 2019 6:00 am

Re: Random Color for Non Scattered Object

Unread postby esmith » Fri Sep 20, 2019 7:03 pm

Yes that is correct, you can't use a node that's looking for instance data, on a piece of geo that itself is not instanced. The flower is one piece of geometry. The flowers that "work" are multiple pieces of geometry, so you can use object ID from the Utility to separate them.

As you can see, all 3 of these "flowers" share the same exact material. The middle flower is using Copies of the single petal Alembic shape. The right flower is using Instances of the single petal shape. This is a very important core difference in geometry types. For your weeds that this doesn't work on, take them back into Maya and run a Mesh>Seperate function on them to seperate them into different shapes. Or seperate them and simply bring in ONE object then copy it around to do your layout, and then the Object ID will work as well.
Cadpture.JPG


The method I shared in an earlier post is a way to go about adding an overall variation to the large group of objects that all share one small UV space and the same texture. That's why I want to know what your trying to accomplish visually, so I can recommend a method.

I hope all of this makes sense.
User avatar
esmith
 
Posts: 162
Joined: Mon May 22, 2017 4:11 pm

Re: Random Color for Non Scattered Object

Unread postby nadiasantoso » Mon Sep 23, 2019 3:13 am

Hi,

So the way I understand it, Clarisse can't read and separate poly island on its own?
nadiasantoso
 
Posts: 30
Joined: Thu Jun 20, 2019 6:00 am

Re: Random Color for Non Scattered Object

Unread postby dboude » Mon Sep 23, 2019 8:50 am

HI,

No, it doesn't. No poly island on mesh and no island on UV either.

Cheers ;)
Démian
Isotropix
Technical Artist - Clarisse Specialist
User avatar
dboude
 
Posts: 1252
Joined: Mon Jul 03, 2017 10:51 am

Re: Random Color for Non Scattered Object

Unread postby nadiasantoso » Wed Sep 25, 2019 4:32 am

Hi,

Now I know what I had to do. Thank you for the info!

Cheers,
Nadia
nadiasantoso
 
Posts: 30
Joined: Thu Jun 20, 2019 6:00 am


Return to General Discussion