Color-Tex-Map as Particle-Group Goals

Discussions about SOFTIMAGEs© Interactive Creative Environment©
Frank1000
Posts: 349
Joined: 16 Oct 2011, 12:13
Skype: the2he

Color-Tex-Map as Particle-Group Goals

Post by Frank1000 » 27 Dec 2013, 14:48

hi, have followed this tutorial to find the goal on a texture to where particles go. Now i wanted to define multiple particle-groups (ID) and tell them to each use a specific color on the tex.
My idea is to put up filters and assign particle-groups to them.
Any tips around if that’s a possible approach or how to basically tackle it ?

Image


Image

i've got this, but not sure how to create a tree with multiple filters and how to define the particle-groups and assign them correctly
Image

So in the end i wanted to some particles go to the red color, some go to blue and some to black.

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 07:44

Re: Color-Tex-Map as Particle-Group Goals

Post by Bullit » 27 Dec 2013, 15:43

Well the particle will get the different colors of the texture map that is below them, is there any other reason you want different groups?

http://softimage.wiki.softimage.com/xsi ... eColor.htm

Edit: if use a move towards goal it has an execute node that makes possible to input a texture map>set particle color>execute in range

Frank1000
Posts: 349
Joined: 16 Oct 2011, 12:13
Skype: the2he

Re: Color-Tex-Map as Particle-Group Goals

Post by Frank1000 » 27 Dec 2013, 20:53

ok thx. My goal finally is to seperate different crowdFX actors into groups and have the specific groups go and stay to their respective color on the floor.
i have checked the link and have some questions about it,

A) Why do i need to define the “Goal Texture Map” again (in the result of the tutorial (attached) it’s done that way).

B) Do i need to join the different selected RGB nodes into one Join-Node ? Where do I need to stick it in the “Move Towards Goal Node” its yellow ? Do all need to be converted to scalar first ?
Image

C) As far as i understand the Goal_Object receives the texture map that later is used for the pointcloud. is that correct for this case as well ?
Image

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 07:44

Re: Color-Tex-Map as Particle-Group Goals

Post by Bullit » 28 Dec 2013, 00:00

I am not sure i understand what you are after.

If the texture map is applied to your goal object you just need to input what i said above:

get texture map > set particle color> moving towards goal, then when particles are near or when they touch the object - depends options you choose - they get color from texture map automatically, at least i remember that way.

Frank1000
Posts: 349
Joined: 16 Oct 2011, 12:13
Skype: the2he

Re: Color-Tex-Map as Particle-Group Goals

Post by Frank1000 » 28 Dec 2013, 00:28

ok thx, regarding my case i wanted to use the texture of the goal_object to designate different areas, separated by the colors of the texture. As a test i wanted to create different particle-groups, that then are assigned to the specific areas. Lets say particle-group-1 should all go to the red areas on the goal_object, another particle-group-2 should go to the black areas, etc.. The particles should not receive the color of the goal_object, they should only arrive to their designated areas.
Image

For that reason i was thinking of creating the color-filters and particle-groups and assign them accordingly. As of my so far thinking, instead of using the Color-to-RGBA node for the Goal_Object, there probably must be the color-filters or how ever to call them. meant is to define the goal-color and assign an ID to this goal color, so I can create particle-groups with their own IDs and assign 1 particle group to use 1 color-filter to understand where on the Goal_Object to go to.

When playing with the texture and changing it from one image file to the other, i thought that may be the place where I have to setup the filters.
Right now i can't find back in which compound it was, is there a way to search in which compound the image exists as a node ? Putting the image name in the usual search on the top wouldn't bring results.

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 07:44

Re: Color-Tex-Map as Particle-Group Goals

Post by Bullit » 28 Dec 2013, 00:36

No much time now, but a texture map doesn't need to represent color of the goal object. It is and has the flexibility to be used for other proposes than giving color.

You can also make objects/nulls that will give color to particles.
Last edited by Bullit on 28 Dec 2013, 01:17, edited 1 time in total.

Frank1000
Posts: 349
Joined: 16 Oct 2011, 12:13
Skype: the2he

Re: Color-Tex-Map as Particle-Group Goals

Post by Frank1000 » 28 Dec 2013, 00:58

i'm not looking to give colors to particles. what i try to achieve is to send defined particles to the red area and other defined particles to the black area etc.

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 19:11
Location: Zagreb, Croatia

Re: Color-Tex-Map as Particle-Group Goals

Post by Mathaeus » 28 Dec 2013, 10:19

Frank1000 wrote:ok thx, regarding my case i wanted to use the texture of the goal_object to designate different areas, separated by the colors of the texture. As a test i wanted to create different particle-groups, that then are assigned to the specific areas. Lets say particle-group-1 should all go to the red areas on the goal_object, another particle-group-2 should go to the black areas, etc.. The particles should not receive the color of the goal_object, they should only arrive to their designated areas.


For that reason i was thinking of creating the color-filters and particle-groups and assign them accordingly. As of my so far thinking, instead of using the Color-to-RGBA node for the Goal_Object, there probably must be the color-filters or how ever to call them. meant is to define the goal-color and assign an ID to this goal color, so I can create particle-groups with their own IDs and assign 1 particle group to use 1 color-filter to understand where on the Goal_Object to go to.

When playing with the texture and changing it from one image file to the other, i thought that may be the place where I have to setup the filters.
Right now i can't find back in which compound it was, is there a way to search in which compound the image exists as a node ? Putting the image name in the usual search on the top wouldn't bring results.
Could you just split this mesh into multiple meshes, then just assign different goals. I think it should be easier - also it seems there's already the straight border between areas.

Anyway, if you want to do weighting ( of any kind ) by color. Firstly you'll want some simpler RGB/HSV/HLS criteria. Let's say, variance only along 'hue' of HSV space. That is, red, green, blue or anything between, regardless of saturation or brightness value - but not plain gray (or white or black) in same mix. Then you'll be able to convert the color to HSV space, by plugging the 'hue' output into function curve. In case the green color represent the maximum weight, your fCurve will have maximum at 0.333 ( that's green position in "hue"), gradually falling to zero, around that 0.333 (let's say it will be zero at 0.133 and 0.533, or something like that). It's 0.666 for blue, and so on.

Combining the monochrome and saturated colors, as you did in your pic, requires additional, more complex criteria.

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 07:44

Re: Color-Tex-Map as Particle-Group Goals

Post by Bullit » 28 Dec 2013, 12:01

What about goal by clusters?

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 19:11
Location: Zagreb, Croatia

Re: Color-Tex-Map as Particle-Group Goals

Post by Mathaeus » 28 Dec 2013, 12:44

Bullit wrote:What about goal by clusters?
Should be fine, too. Anyway, jut to add a bit of nit picking here. I have impression that ICE works somehow better if you have "stupid" setup. For example of "stupid", it seems to work better with two 'get closest location' node assigned to different task, instead of passing an array through one 'get closest location' and separating the result later.
So, in case of let's say, less than ten groups, there's good chance to get the best from multiple goal nodes, each filtered only by searchers, not by targets. Something like 'if' node after each goal node.

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 07:44

Re: Color-Tex-Map as Particle-Group Goals

Post by Bullit » 28 Dec 2013, 13:12

Well i was struggling and unable to setup a goal by cluster at least after spending almost 1 hour in it. One of my recurring problems with ICE: context and badly conceived nodes.

The logic building of a node called move towards goal is to have the granularity to choose what kind goal the user wants.
ICE was supposed about to be about granularity...

Frank1000
Posts: 349
Joined: 16 Oct 2011, 12:13
Skype: the2he

Re: Color-Tex-Map as Particle-Group Goals

Post by Frank1000 » 28 Dec 2013, 15:44

ok yes, HSV is one value instead of multiple values. I have changed the texture to have non-colors.
Then you'll be able to convert the color to HSV space, by plugging the 'hue' output into function curve.
Does this mean to connect it in the ice-tree like this ?

Other question is, now that the rgb values are converted to HSV values, do i define the wanted Goal-HSV-values in the "Set Data" node or do i use another node ?

Image

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 19:11
Location: Zagreb, Croatia

Re: Color-Tex-Map as Particle-Group Goals

Post by Mathaeus » 28 Dec 2013, 17:47

Frank1000 wrote:ok yes, HSV is one value instead of multiple values. I have changed the texture to have non-colors.
Then you'll be able to convert the color to HSV space, by plugging the 'hue' output into function curve.
Does this mean to connect it in the ice-tree like this ?

Other question is, now that the rgb values are converted to HSV values, do i define the wanted Goal-HSV-values in the "Set Data" node or do i use another node ?
Well, before any answer. Mentioned tutorial does not create groups, it just filters the goal location, for everything. At this stage, everything is simple. However if you want to differentiate the particles into groups, you'll be running into something more complex than just mapping the one attribute to another. At least some chain of "if" nodes ( if hue is higher than my value, positive, if not, another chain...). or, 'select case" node (multiply the scalar attribute by number of desired attributes, in order to be able to get integers, round it and plug this into 'condition").
Anyway, in ICE tree on goal object, I think you'll want to set multiple attributes, something like Goal_Location_A, Goal_location_B, so on - very well differentiated ( how to to this, it's your part of job). Then, in ICE tree on point cloud, assign the Goal Location attribute, using multiple "get geometry sample", each of "get geometry sample", filtered by another attribute from goal object. AND new chain of "if" nodes (or "select case"), to filter the self.goalLocation, on particles.
Long story short, if multiple meshes for goals is allowed option, I'll go with this, instead of texture map.

Frank1000
Posts: 349
Joined: 16 Oct 2011, 12:13
Skype: the2he

Re: Color-Tex-Map as Particle-Group Goals

Post by Frank1000 » 28 Dec 2013, 18:35

ok i go step by step with it. The first thing would be to define the HSV values (magenta=300, red=0, yellow=60) to distinguish different areas on the image. I'm continuously reading the ICE manual but not yet discovered, do i need to add another node where i can input these HSV values ? As far as i understood so far, these are attributes that are stored in the "Set Data" node, but where do i input the actual desired values ?

Image

or this way ?:
Image

in the manual "Setting Custom Attributes" it says
You can use custom attributes to store any type of value, including locations.
Is that the right way to go for this case ?

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 07:44

Re: Color-Tex-Map as Particle-Group Goals

Post by Bullit » 28 Dec 2013, 19:35

See if this color goal nodes from Fabrizio help you: https://www.si-community.com/forum/v ... 05&start=0