kube Posted September 22, 2023 Share Posted September 22, 2023 (edited) Hey, I have 2 Flipsources and want to change the color if they get close to each other. I´ve tried splitting the two sources and using a MOPs Object Falloff in a Sopsolver, so i they get close to each other a Mask should be created. It´s quite buggy and doesn´t quite work. The marked areas should get masked, the HIP Files attached. Does anyone know a fast way, perhaps a FLIP node i´m missing out? Interacting_Flipsource.hipnc Edited September 22, 2023 by kube Quote Link to comment Share on other sites More sharing options...
Librarian Posted September 23, 2023 Share Posted September 23, 2023 (edited) @kube Can you use mix by those color to make some mask (Color) Just made after group i your SOP Solver in wrangle this and when they intersect you get mix value . vector @P; vector @Cd; float maxdist = chf("maxdist"); int npts[] = nearpoints(0, @P, maxdist); if (len(npts) > 1) { vector out = {0, 0, 0}; foreach(int npt; npts) { vector nptrgb = point(0, "Cd", npt); out += nptrgb; } // Update Color @Cd = out / len(npts); } Edited September 23, 2023 by Librarian 2 Quote Link to comment Share on other sites More sharing options...
kube Posted September 24, 2023 Author Share Posted September 24, 2023 23 hours ago, Librarian said: @kube Can you use mix by those color to make some mask (Color) Just made after group i your SOP Solver in wrangle this and when they intersect you get mix value . vector @P; vector @Cd; float maxdist = chf("maxdist"); int npts[] = nearpoints(0, @P, maxdist); if (len(npts) > 1) { vector out = {0, 0, 0}; foreach(int npt; npts) { vector nptrgb = point(0, "Cd", npt); out += nptrgb; } // Update Color @Cd = out / len(npts); } Hey Tesan, I just masked out the color, worked out perfectly thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.