Create rooms in house

03-15-2016 05:45 PM
New Contributor III

How would I create rooms within a house?

I want to randomly split up the house into several rooms and also the interior walls need different texturing.


There is the outside:


And the inside shares the same texture and no ceiling!

I tried making a split but cannot extrude an edge upwards to make partitions:

FloorBase -->

  setupProjection(0, scope.xy,,

  set(material.normalmap, wall_norm)



  split(x) { 5: Rooms }*

Rooms -->


  comp(e) { 0: Room }

  extrude(1) Room

Room -->


I have tried to extrude and scale but get these weird issues:


0 Kudos
2 Replies
New Contributor III

Somehow I have fixed the weird issue.

I am now trying to get random bedrooms inside any given shape. I am using touches() so if a wall touches a window then window is replaced by wall. Not sure how to randomly generate partitions however.

I have this that will create 4 divisions along the y axis but for large or small this won't work:

split(y) { '0.25: RoomsFloor | 0.2: InnerWall }*

I need a way of finding the area or length and then doing an appropriate split condition.

0 Kudos
Esri Regular Contributor

The extrude operation is meant to work on faces and is not defined for edges.  If you make your walls have some thickness, then you could split out a small, thin 2D footprint for the wall and then extrude it to get the wall.

Another option would be to use offset() on each room footprint to get walls around each room.  Here, then, you would have double walls, so you would have to offset by half the wall thickness.  This option would produce double the geometry though.

To create random rooms, you could come up with heuristics using a combination of rand() to generate random numbers, p() for randomness, geometry.area to get the area of the shape, and and to get the dimensions of the shape.

0 Kudos