Color particles by custom values
#1
Not sure if this is already possible....Can we have a way of coloring particles based on certain values in the flow? Like velocity or particle age etc.
  Reply
#2
Right now there's no way to change the regular particle display (ticks, dots, etc) with color values, but you can definitely set color values on the particle geometry with whatever data you'd like. You can do this with a Mapping operator (in Continuous timing mode), set to assign mapping values from custom data channels (either float or vector). Then you can assign whatever data to those channels that you want (using a script or Custom Properties operator) and use either a Vertex Color diffuse map or something else like a Gradient Map to interpolate between the assigned values on your particle geometry.

The reason I don't have a way to change the colors of the particle display (ticks, dots, etc) is that those are purely GPU objects and I don't want users to be confused as to why colors assigned to particles don't reflect their renders (because those particle colorings wouldn't be able to directly translate to geometry color without using the method described above).

I'll try to include some examples of how to do the color mentioned above in the example files at some point...it's very simple.
  Reply
#3
(04-03-2019, 02:31 PM)tyFlow Wrote: Right now there's no way to change the regular particle display (ticks, dots, etc) with color values, but you can definitely set color values on the particle geometry with whatever data you'd like. You can do this with a Mapping operator (in Continuous timing mode), set to assign mapping values from custom data channels (either float or vector). Then you can assign whatever data to those channels that you want (using a script or Custom Properties operator) and use either a Vertex Color diffuse map or something else like a Gradient Map to interpolate between the assigned values on your particle geometry.

The reason I don't have a way to change the colors of the particle display (ticks, dots, etc) is that those are purely GPU objects and I don't want users to be confused as to why colors assigned to particles don't reflect their renders (because those particle colorings wouldn't be able to directly translate to geometry color without using the method described above).

I'll try to include some examples of how to do the color mentioned above in the example files at some point...it's very simple.

thanks man, I already got the general idea from the UVW gradient example filem forgot to update the post here.

But speaking of particle colors...
Thats actually something that has been bothering me...Apparently, as soon as you assign a material, you can´t see diferent events colored differently anymore, like in Pflow.
That was actually quite handy for a number of reasons:
1. You can see where your particles are in the flow to check for problems.
2. You can have different wirecolors in the render element for different parts of the flow.

Any chance this could be brought back?
  Reply
#4
you just assign the multi - material to the Tyflow Object and add material ID operator to the event ..
  Reply
#5
When I send events to the GPU I do indeed check if the flow has a material and use that as an override over the color choice of the display operator.

I might make a checkbox so you can disable that behavior...but if I made it default behavior I'd no doubt get 1000 users asking why they can't see their material in the view Smile
  Reply
#6
Well, I usually switch display modes to change between material color and object color, so as long as you don't do that, you'd still see the material, once it's assigned. All you'd need to change is, that you don't have a object color override on the whole flow and it would still get the wire color from the separate events. 
Right now I'd have to assign separate subobject materials with separate mat Id's for each event, if I wanna have a separate mask for them in the render elements, even if they are all using the same overall material. 

Example:
A a workaround for the missing explicit normals, I was thinking to just render the flow twice: once with the unfractured object, once with the flow. 
I'd render the flow with separate events and gave the flow where the fragments get activated a different display color. 
In comp I could now create a mask using the wire color of the activated chunks. 
Haven't really tried that, but that would explain the need as an example.
  Reply


Forum Jump: