As the title says. I have a surface that has texture coordinates that are advected using Genome. On the geo are particles that are taking the color of the underlying surface. The only thing is that I want to get rid of particles outside of a certain area. I anticipated this happening so I have a matching matte that is 100% black and white.
I can’t figure out how to actually do a logical test between the particle’s color values to do a selection. I wonder if anyone has ever run into this problem? At this point I’m in a typical Magma flow. Or in short, I’m trying to achieve “selection by grayscale” or like in Pflow - “Density by Grayscale”.
The Color is a Vector. You can either use a Breakout to look at one component (e.g. X which is Red), or use the Magnitude (but with white 1,1,1 the Magnitude will be > 1.0).
The Selection channel in Magma is actually Soft-Selection. So a value of 0.0 written to Selection means “no selection”, 1.0 or higher means “fully selected”, a value of 0.5 means “semi-selected”. So you can simply output the value directly into the Selection and it would do the job. Adding a Krakatoa Delete modifier to the stack would delete either non-zero selection, or, if switched to Soft-Selection mode, will delete will higher probability the particles with higher selection value.
Alternatively, you can use a Greater or Less operator to compare to a threshold, then connect its output to the Selection output. The output of a Logical comparison operator is 0 when FALSE and 1 when TRUE. You can convert that to Float, but I believe the boolean value will work in the Selection channel directly. So if you want to delete particles that have Red channel > 0.5, you can Breakout the color, compare to 0.5 using Greater operator, and output the result of the comparison to the Selection channel.
Ah, so my mistake was that I was trying to combine both of the methods you mentioned at the same time. I tried to output the texture coordinate color into a less or equal condition. After reading your explanation I realized how convoluted I made it. Sometimes the solution is way simpler than you think. Thanks again Bobo, sorry to keep you so busy today.
Alright, after giving it a second glance I still can’t figure out the problem I attached the file - it’s a max 2013 file. krakatoa_mag_by_radius.max (336 KB)
You did not tell me how you made the “cell” look - I assumed you used a Texture, but you actually measured the distance to the nearest particle in PRT Volume003. And that’s where the problem comes from - your PRT Volume003 is set to “Viewp. Spacing” of 20.28, but the (Render Time) “Spacing” was still 1.0, so at render time your “cell” calculation produced 20.28 times smaller distances…
Just copy the 20.28 into the Spacing field and uncheck the checkbox of “Viewp. Spacing” so adjusting the one will adjust both.
Your PRT Volume002 is set to 1.0 for both viewport and render, so that was never an issue.