1
$\begingroup$

Simply put, I am new to Geo-Nodes and wanted to try and create a grid like floor that has its Top facing faces Extruded/Moved upwards based on an intersecting second object. The height/position of the face should essentially be taken from the Top facing faces of the intersecting object.

Not sure if that makes sense, but here is an example of what I had in mind: enter image description here Essentially, the selected objects would act as 'modifying objects' and when intersecting with the grid floor it would make those grid faces that it intersects with move upwards to meet the height of those faces.

Is something like this possible?

Edit 1:
The way I see this problem is that it can be broken down into a few things.

  1. Read where the 'Modifying Object' (MO) intersects with the grid.
  2. Get the faces of those intersections.
  3. Get the Top most face (of the MO), directly above that face.
  4. Move/Extrude those faces to meet the Top most face of the MO. But honestly looking up some things online I haven't even been able to figure out how to get all the faces that are 'within' an intersecting object.

Edit 2:
I was able to at least manage to get the face selection working by 'Realizing' the instances of cubes on the grid. And then Raycast from the MO to get the wanted faces. But I have no idea how I can change the offset, to match the height of the MO's face above the individual cubes. enter image description here I found how to do the Raycast here.

Edit 3:
Thanks for the help, I managed to get it working and with some examples here: enter image description here enter image description here

$\endgroup$
0

2 Answers 2

3
$\begingroup$

Alternatively, you can keep instances if you use the raycast before 'instance on points':

enter image description here

Either there is a hit and instance a scaled cube.

Or there is not and instance a plane.


Or with no instance at all:

enter image description here

$\endgroup$
2
  • $\begingroup$ Although I like the approach, I wanted to specifically extrude in this case. Thanks for the share though! Now I also know how to deiced when to spawn what in case I need it! $\endgroup$
    – Neuffexx
    Feb 12 at 11:44
  • $\begingroup$ Was just updating as you commented... $\endgroup$
    – lemon
    Feb 12 at 11:45
2
$\begingroup$

If your faces are on the ground level, you can just extrude on Z component of hit position:

But most importantly, you should start hit ray above ground level, so that ray will emit from top on the plane, not from plane downwards.

enter image description here

$\endgroup$
1
  • $\begingroup$ Thanks that was exactly what I was looking for! $\endgroup$
    – Neuffexx
    Feb 12 at 11:43

You must log in to answer this question.

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