#Enclosing Room Volumes Procedurally?

1 messages · Page 1 of 1 (latest)

autumn forum
#

I tried this once.
I found it easier to just use the AABB of the object to determine the volume, after all, it didn't have to be THAT accurate and most rooms where square anyway.

What i did for things like L shaped rooms, was add a "volume_modifier" property that changed the volume. So an L shaped room would get a 0.75 modifier to compensate for a third of its AABB being empty.

jade wyvern
#

Thanks. What I'm not doing is to calculate the volume of a room.

But what I am doing is trying to place shapes in the editor (or via code). Then have walls, floor, and ceiling built around those shapes.

#

So at its very simplest, I'd like to place a CSG subtract object for the 'room' and wrap it in a slightly bigger union operation -- the end result is a mesh that is hollow inside. Then I'd like to punch out hallways with more subtraction operations, and wrap the hallways the same way.

#

The problem is that CSG shapes don't produce complete meshes and aren't QA'd for production use.

#

Later, I would like to wrap those subtraction objects with nicer handmade models from Blender instead of PlaneMesh and BoxShape objects