I have a rock I've created and I am trying to set up a point group to add moss to the upwards facing sides of it, but only on parts of the rock where there's no geometry directly above/close to it. I have a group "Keep by Normals" set up and blasted everything else to keep those upwards facing surfaces. I then have a point wrangle with the following code:
Unfortunately this deletes ALL points except for several random ones. It even removes points on the very top of the rock. I've tried the same code on a simple setup with two spheres and it works as expected.
Would appreciate the help, I'm familiar with C from college but still learning Vex. I've attached some screens and the hip file (although the rock in the screens I roughed out in Blender and haven't included the .obj but it the rock gen setup works with a cube) Also there's a geo node with the wrangle working correctly on two spheres. Any help much appreciated!
You could try to solve this problem with another approach. Colorize the top and bottom differently, then transfer the color from the bottom to nearby tops. This leaves parts of the top exposed. Use vex to detect the exposed color and create a new group you transfer back to the original mesh.
Enivob You could try to solve this problem with another approach. Colorize the top and bottom differently, then transfer the color from the bottom to nearby tops. This leaves parts of the top exposed. Use vex to detect the exposed color and create a new group you transfer back to the original mesh.
Interesting, thank you, I'll check it out. Sometimes is easy to get so focused on making one solution work it's hard to remember there are other options.
When doing intersections like Nick said, you have to consider where you are shooting the rays from and whether to push them outside the surface so you can hit the prim itself or whether to sink the ray a bit inside to shoot it from the inside, and sometimes doing the latter but reversing the direction, etc.
Thank you everyone. I suspected there was a technical aspect of the Intersect function that I was missing. I'll probably use the mossy areas for a CopyToPoints and add a lot more detail but for now this is a good milestone.