Changing color based on neighbor count and time (solved)
#4
(05-02-2019, 05:21 PM)shadowkiller Wrote: Hey, i have come across a solution that works fairly well. Instead of using 2 separate flows i have managed to get it all in one! 

I am using a multi sub material with 4 entries. The first 2 entries are the solid start colors. The next 2 entries are gradient ramps starting with its initial solid color and ending with a diff color. Each event has a particle group and a property test set to nearest neighbors. The particle group isolates the property test to only accepts input from the other event. When the condition is met it goes to a new event that changes the solid color material to the gradient ramp via the material ID operator. The second event has a custom properties set to continuous event age (frames) that is read back by the mapping operator. You can adjust the blends by adjusting the test distance and test amount via the property test operator and the length of blend on the gradient by adjusting the min/max values in the mapping operator.(normalized)

I will post the max file here so you guys can mess around with it.

P.S. I had to enable the clamping on the mapping operator or the gradient will tile. Its set to 0.01 - 0.99 on all channels.

Enjoy! Big Grin

https://imgur.com/caj2xNp
Thank you, man!

(05-02-2019, 10:36 PM)tyFlow Wrote: Glad you figued it out!

And yes the clamping is necessary due to the way max filters maps by default. It's kind of annoying, but it makes sensei if you think about it...if it didn't filter pixels at the borders of a map, you'd potentially see hard seams at areas where the tiling occurs. You can minimize the effect by disabling filtering/blurring in the render but I'm not sure if that's possible in the view.

Hello, how to find a certain number of nearest neighbors ignoring the radius? Is it possible?


Attached Files Thumbnail(s)
   
  Reply


Messages In This Thread
RE: Changing color based on neighbor count and time (solved) - by Borzacch - 08-10-2019, 03:04 PM

Forum Jump: