Coloring the room

How to color the room top side into BABYLON.Color3()

This is my playground demo:

As i understood from custom mesh building, I need to get correct vertices and give them the color, but i cannot understand how it works:(

This is the full buildFromPlan.

When you do this you can set options for the interior and exterior UVs and colors. Top and bottom and sides of the wall always take the exterior UVs and color.

In this PG

The code for this is on lines 75 - 79, 238, 582

More info on custom mesh and colors

You also need to know about vertex normals and flat shaded mesh

Thank you for your answer. But, for example. In case if i need to texture each wall by individual material. How can i implement this?

In which case you would need to change interiorColor and exteriorColor options from a single value to an array of values interiorColors and exteriorColors.

Of course this meant changes within the buildFromPlan code.

1 Like

You can take a look on the technique of UV mapping :grinning_face_with_smiling_eyes:
What is UV Mapping & Unwrapping? (
Map Materials to Individual Mesh Faces | Babylon.js Documentation (