8
$\begingroup$

How do you tell if verts are inside of another mesh using geometry node and store them as boolean attribute? I tried the attribute Proximity node but it returns absolute distance to object so couldn't tell if the vertex is inside or outside the other mesh. Assume both mesh are manifold.

$\endgroup$

1 Answer 1

19
$\begingroup$

Using the Ray Cast node, you can fire a ray in an arbitrary direction from each point in the modified geometry, seeking only the designated target geometry. Self and intervening objects are ignored. 'No hit' returns 0. If-and-only-if the source vertex is inside (a manifold) target, there will be a hit-point, whose normal is back-facing to the ray:

enter image description here

Thus:

enter image description here

$\endgroup$
12
  • 2
    $\begingroup$ @Chris Crikey! What the hell has 0.5 got to do with anything ? Thanks! I don't know how I missed this twice, and somehow it hasn't been shot down in 2 years? Will fix ASAP. Unless you want to go ahead, yourself. I know what it is.. it's the default in the GT node... $\endgroup$
    – Robin Betts
    Commented May 6 at 11:46
  • 1
    $\begingroup$ @Chris .. for ''Crikey' .. read: 'your favourite expletive' Thanks for the heads-up! .. done now, I hope . $\endgroup$
    – Robin Betts
    Commented May 6 at 17:27
  • 2
    $\begingroup$ @Chris "Crikey!" wäre auf Deutsch so als wenn man in Erstaunen oder auch Erschrecken "Mensch!" oder "Junge, Junge!" ruft. Apart from that everybody listen to Lawnmower Deth's 1990 album "Ooh Crikey it's... Lawnmower Deth". Sorry for the off-topic. $\endgroup$ Commented May 7 at 5:51
  • 1
    $\begingroup$ ... Nehmt euch ein Zimmer, guys ! :D $\endgroup$
    – Robin Betts
    Commented May 7 at 7:53
  • 1
    $\begingroup$ @RobinBetts: don't be jealous...just join!! :D $\endgroup$
    – Chris
    Commented May 7 at 9:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .