Skip to content

Hole in floor #245

Answered by bbohlender
ocmino asked this question in Q&A
Feb 28, 2023 · 3 comments · 1 reply
Discussion options

You must be logged in to vote

You want to render the hole using as a cylinder that only renders the inside

<mesh>
  <meshPhongMaterial side={BackSide} />
  <cylinderGeometry/>
</mesh>

and place this cylinder with the top side at 0,0,0.
Now, in are the hole is already visible but you can see it from the side, so you want to make sure its only rendered when looking into the whole.

This can be achieved by rendering a plane that has a hole cut into at the position and size of the cylinder. You can build this plane with blender for instance. Alternatively, use a stencil buffer to cut out the whole into the plane.

Once you have this plane, import it as a gltf for instance and retrieve the geometry from the gltf. Using the l…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@ThomasRutzer
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by bbohlender
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants