Better color mixing
#1
Hey everyone!

I am having some problems and i hope you guys can shed some light on it. I am trying to do something similar to the attribute transfer node in houdini to mix colors
https://www.youtube.com/watch?v=DWxcfZMsZW8


I want to mix 2 colors like this to get a third color. (subtractive mixing instead of additive. yellow+blue=green) My initial setup uses 2 emitters. Each one has a color gradient, one going from yellow to green and another from blue to green. I am controlling the mixing via a neighbor test (groups to isolate the test colors) that accumulates the values over time and then a mapping operator to renormalize the values. This does seem to work, however it has a few issues such as isolated particles not changing colors. Since the color gradients are separate there is no way to get an intermediate mix between the 2. (50% on the yellow-green grad and 50% on the blue-green grad) Also, the gradient can only go in 1 direction, from yellow to green or blue to green. Is there some way to make a gradient ramp that uses 2 axis (U and V) instead of just 1 axis? (U) I tried using a custom properties to transfer the U to the V channel but i couldnt get it to work. (prob a setup problem, incremental neighbors is a float whereas color is a vector) Can i somehow use vertex colors for this?

Also, how can i set it up so it does a weighted average based on color and adjusts accordingly? It sounds like i might need it to do a bit of math to mix the values, however i don't know any scripting. If anyone knows how to solve this i would be very keen on hearing your thoughts. Either by scripting or some flow setup. (preferably a flow setup)

P.S. Perhaps an attribute transfer operator like houdini would be useful for tyflow? (unless there is a similar way to do it that im missing?)

Thanks!
  Reply
#2
I'm going to experiment with some ideas you shared here, especially the Attribute Transfer thing. We'll see if we can get your scene going a little more intuitively in the future Smile
  Reply
#3
(02-26-2020, 12:03 AM)tyFlow Wrote: I'm going to experiment with some ideas you shared here, especially the Attribute Transfer thing. We'll see if we can get your scene going a little more intuitively in the future Smile

Great, i cant wait to see what you come up with! Big Grin
  Reply
#4
(02-26-2020, 12:03 AM)tyFlow Wrote: I'm going to experiment with some ideas you shared here, especially the Attribute Transfer thing. We'll see if we can get your scene going a little more intuitively in the future Smile

Awesome, i've seen some people posting videos lately that look like this feature has been implemented... do you mind sharing what the tyflow component is called or what the best process is for achieving this mix?
  Reply
#5
Its called property transfer, been implemented for a little while now. Smile Just toss it in your setup and particles that have differing values will blend when they come within x radius. Its works fairly well but some of the operations it used are single threaded so it can sometimes be a tad slow if you're using it with several million particles. It will run faster the lower the detection radius is though.

Im using it to mix vertex colors using the average blend mode. Not quite sure about the min/max modes though. I believe there is also a current issue with the falloff setting, i posted a thread in the bug forums about it.
  Reply
#6
Photo 
(05-02-2020, 01:04 PM)shadowkiller Wrote: Its called property transfer, been implemented for a little while now. Smile Just toss it in your setup and particles that have differing values will blend when they come within x radius. Its works fairly well but some of the operations it used are single threaded so it can sometimes be a tad slow if you're using it with several million particles. It will run faster the lower the detection radius is though.

Im using it to mix vertex colors using the average blend mode. Not quite sure about the min/max modes though. I believe there is also a current issue with the falloff setting, i posted a thread in the bug forums about it.

Awesome! Thanks for that i've been playing around with the property transfer operator but still can't quite get it to do what I want.
As you can see below when the particles hit the surface I was expecting to see a pink mix of colour on the spheres but they're still white and red.
[img]<a href=[/img][Image: Inked-Annotation-2020-05-03-141643-LI.jpg]" />

i'd love to know more about how you got the blend to work well, i've attached my project file as well if you wanted to have a look.
Thanks for your help  Cool

https://drive.google.com/open?id=10-UbKp...jkVnQG_fG1
  Reply


Forum Jump: