Skip to main content
added 87 characters in body; edited title
Source Link
Robin Betts
  • 78k
  • 9
  • 79
  • 194

How to create a camera-space 2D bounding box in Geometry Nodes?

I've been trying to create a 2D bounding box. On this website I've found multiple threads about how to do this with code, but not how to do this with Geometry Nodes. Here's an example of what I imagine this would look like. In my case this would be more like a plane slicing through the source mesh or being in front of it.:

enter image description here

So far I've been able to figure out that I will need the x and y axis, relative to the camera viewpoint. The "Attribute Statistic" node also seems necessary to get the minimum and maximum positions on camera's x and y axis.

I also tried a couple things with the "Bounding Box" node, but I can't make it face in the direction of the camera without it no longer fitting the source object. If this was possible, I could simply take the frontal plane. That this plane would appear slightly larger because of perspective is not an issue in my case.

Any help is appreciated!

How to create a 2D bounding box in Geometry Nodes?

I've been trying to create a 2D bounding box. On this website I've found multiple threads about how to do this with code, but not how to do this with Geometry Nodes. Here's an example of what I imagine this would look like. In my case this would be more like a plane slicing through the source mesh or being in front of it.

So far I've been able to figure out that I will need the x and y axis, relative to the camera viewpoint. The "Attribute Statistic" node also seems necessary to get the minimum and maximum positions on camera's x and y axis.

I also tried a couple things with the "Bounding Box" node, but I can't make it face in the direction of the camera without it no longer fitting the source object. If this was possible, I could simply take the frontal plane. That this plane would appear slightly larger because of perspective is not an issue in my case.

Any help is appreciated!

How to create a camera-space 2D bounding box in Geometry Nodes?

I've been trying to create a 2D bounding box. On this website I've found multiple threads about how to do this with code, but not how to do this with Geometry Nodes. Here's an example of what I imagine this would look like. In my case this would be more like a plane slicing through the source mesh or being in front of it:

enter image description here

So far I've been able to figure out that I will need the x and y axis, relative to the camera viewpoint. The "Attribute Statistic" node also seems necessary to get the minimum and maximum positions on camera's x and y axis.

I also tried a couple things with the "Bounding Box" node, but I can't make it face in the direction of the camera without it no longer fitting the source object. If this was possible, I could simply take the frontal plane. That this plane would appear slightly larger because of perspective is not an issue in my case.

Any help is appreciated!

Source Link

How to create a 2D bounding box in Geometry Nodes?

I've been trying to create a 2D bounding box. On this website I've found multiple threads about how to do this with code, but not how to do this with Geometry Nodes. Here's an example of what I imagine this would look like. In my case this would be more like a plane slicing through the source mesh or being in front of it.

So far I've been able to figure out that I will need the x and y axis, relative to the camera viewpoint. The "Attribute Statistic" node also seems necessary to get the minimum and maximum positions on camera's x and y axis.

I also tried a couple things with the "Bounding Box" node, but I can't make it face in the direction of the camera without it no longer fitting the source object. If this was possible, I could simply take the frontal plane. That this plane would appear slightly larger because of perspective is not an issue in my case.

Any help is appreciated!