Solid geometry (not hollow)

Is there any possible way in JME3 to make geometry solid? Meaning not hollow, so that for instance when the camera frustum cuts it we see a section of the geometry instead of its interior.

If you want to, you can make an geometry in Blender with internal triangles or so, but it will decrease the performance.
I’m not sure if it would be possible to have such effect using stencil buffer, and ofc a custom shader.

For what do you need it?

I need it for the same example I mentioned. I have a workaround set up that helps me achieve the same effect, but its tedious. I was wondering if there was a way to do it natively.

Via geometry shaders it might be possible to create the required triangles on the fly,
but thats probably a lot of work to get it right.

Yes, but you haven’t said why. My stock answer would be “don’t let the camera frustum cut the object” = solved.

You misunderstood me. I do want the camera frustum to cut an object and the viewer to see a cross section of it.

Ah, then you have some complicated math ahead of you. Good luck and be sure to show us what you come up with.

I would like to see someone implement the CSG operators from Blender in jME or something with voxels (like the SOC implementation but better). Then you could make your own ninja game with katanas cutting through birthday cakes - or birth marks, depending on the violence level of that game… :chimpanzee_closedlaugh:

There is already a csg library for jme3:

I’ve tried it and it works perfectly.the problem is that CSG is quite
resource intensive, so using it in an animation for instance will drive
your FPS into the dirt.


Thanks a lot for posting this link!

There is one feature in my upcoming game that might make use of this: I wanted to have buildings with basements that could “burrow themselves into the ground” (I don’t want to see terrain inside the house when walking from the first floor down into the basement).
Initially I planned to do it differently, but now I will try to use this library or the fork first - maybe it is all I need.


Glad to help!