plazadelmar Posted April 1, 2020 Share Posted April 1, 2020 How do I stick points in place to growing geometry? Currently, when the geometry is growing and the points are adding and changing point numbers so if I copy anything on to them, everything is moving around. So the final solution would be to make the scattered points stick in the same place. Quote Link to comment Share on other sites More sharing options...
toadstorm Posted April 1, 2020 Share Posted April 1, 2020 Since your target geometry has a changing point/prim count, you'll probably want to handle the points-sticking behavior as a solver, preferably inside the same solver that's handling the growth. You can use minpos() in VEX to compute the nearest point on the growing surface to each existing point and stick that way, or if you need to stick orientations as well, use xyzdist() to get the nearest primitive and primitive UV on the growing surface to each point, then use primuv() to sample P, N and up from the growing surface, move each point to the sampled P, then set N and up for each point based on the sampled values. 1 1 Quote Link to comment Share on other sites More sharing options...
plazadelmar Posted April 1, 2020 Author Share Posted April 1, 2020 29 minutes ago, toadstorm said: Since your target geometry has a changing point/prim count, you'll probably want to handle the points-sticking behavior as a solver, preferably inside the same solver that's handling the growth. You can use minpos() in VEX to compute the nearest point on the growing surface to each existing point and stick that way, or if you need to stick orientations as well, use xyzdist() to get the nearest primitive and primitive UV on the growing surface to each point, then use primuv() to sample P, N and up from the growing surface, move each point to the sampled P, then set N and up for each point based on the sampled values. I'm using this simple setup but I'm still not sure how to use the minpos function to make it work. Here is my file, I appreciate if you can push me in the right direction. growth.hiplc Quote Link to comment Share on other sites More sharing options...
toadstorm Posted April 1, 2020 Share Posted April 1, 2020 I'm not sure I understand exactly what this solver is doing. Is the end goal to have these points reveal themselves over time as that color spreads over the grid? If so, why not scatter all the points at once on the full grid, then transfer your color attribute over from the grid to the points, then delete points that don't meet the color threshold? Quote Link to comment Share on other sites More sharing options...
plazadelmar Posted April 1, 2020 Author Share Posted April 1, 2020 1 hour ago, toadstorm said: I'm not sure I understand exactly what this solver is doing. Is the end goal to have these points reveal themselves over time as that color spreads over the grid? If so, why not scatter all the points at once on the full grid, then transfer your color attribute over from the grid to the points, then delete points that don't meet the color threshold? It was just a quick setup to try your suggested solution. The real setup is driven by cost propagation and doesn't use any solvers so the principle should be the same I believe. Maybe there is a simpler solution like you have mentioned before. I probably need to find another way of applying the propagation effect. 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.