Automatic Room Recognition and Colour Fill

This might help. I create a floor for each room separate from say a foundation slab. This always gets grouped and tagged. Then you can apply texture to that separate group. My benefit is it gives me an easy to label square footage for each room. Also I can turn that flooring tag off to speed things up by not rendering textures. You always want to use groups so the geometry doesn’t stick to things you don’t want it stuck to. I suppose you could also have a thin wall attached to the floor all grouped together, A five sided cube with little or no thickness inside each room, separate from the walls, tag each room separate and color by tag for the visual your looking for and still have natural looking textures.

Since when do cubes have 5 sides? :confused:

Of course, if you make each room a group with no space between them, you are going to get z-fighting on the surfaces that coincide. The idea I suggested has that same issue. The OP’s coloring worked because the colors were different on the front and back sides of the same face depending on which way faced into the room.

Open top.

I need to think of flood fill-like algorithm to identify sets of internal faces where the normals are pointing towards the centre of the volume, but I’m struggling

I think you may be shooting yourself in the foot by not using groups/components. If you created a template with tags and used the color by tag setting you’d be able to quickly apply tags to groups/components instead of the materials you’re using now. You could name groups/components by color (if that’s how you’re categorizing rooms).

Also, using only one face per ‘wall’ creates a lot of problems. One is that you’ll always have a back face showing in every room. You’ve ‘overcome’ that by using materials for coloring but you can’t organize and handle the model very well when you go down that path. For example, you can right click the 0046_Gold material in the materials tray and pick ‘select’ to select all of those faces easily but you always have different materials on the back sides of those faces confounded with your material selection.

In your first post you mentioned ‘extruding’ the rooms. I’m guessing that means using push-pull on the flat face for each room. Maybe you are color-coding with materials at this stage? If you apply a color material at this point, it should only be on the ‘outside’ facing faces (so the interior of the rooms is not painted… because back faces aren’t supposed to be showing). It seems you are extruding the rooms and then going inside of each room and painting each face. That seems like a lot a of extra work. But if you create a component or group out of each 2D room, then extrude to height you can triple click to select all and then apply the material with a single click (even on the ‘backside’ of the faces). Or you can apply a tag to the component/group and use color by tag. Then both the inside and outside are colored at once.

Because you don’t have walls with thickness, if you color groups/components by tag, or put materials on groups/components, you can set Components to Fade rest of model when a room is selected to avoid Z fighting or use hide group/component visibility or tag visibility. Each room will have places where it has more than one ‘wall’ (two overlapping faces). This isn’t a ‘good’ practice but at least you’ll have more control of visibility.

You also mentioned ‘exporting’ for other purposes. It might be easier to export (from the components tray) or by ‘saving as’, with groups/components.

There’s also the issue of presentation. As your second model example stands, it’s not easy to see what information you can easily present (e.g., the exterior shows back faces, interior views of a colored room aren’t very helpful). Using components/groups would make your model easier to use for presenting because you can control visibility in a number of ways and isolate/‘export’ more easily.

You could do something like the following for either materials or tags. Or you could combine both. But I think you should try take advantage of what SU can already do before looking into extensions.

1 Like

Hi @rinse04, sorry for reviving this old topic, but have you tried SketchUp space finder? It’s now in public labs on extension warehouse.

This is the result I get from a simple model without components:

Note that the spaces are added to the model as components so you could use them as floors for zones. Currently they are just 2D spaces so would need to be extruded to 3D for energy analysis

FYI You will need a SketchUp Pro or Studio subscription to use the extension.

Dan

1 Like

Working with @rinse04 via PM, I created a plugin that automatically finds room spaces in a basic massing model and colors the interior surfaces of each room distinctly. It does not allow openings such as exterior windows because they do not result in a closed space, but last I heard it was filling his needs nicely.

2 Likes