# Modify Mesh faces and UV mapping at runtime

**URL:** <https://forum.babylonjs.com/t/modify-mesh-faces-and-uv-mapping-at-runtime/55533>\
**Category:** Questions\
**Created:** [December 23, 2024, 2:07pm UTC](https://forum.babylonjs.com/t/modify-mesh-faces-and-uv-mapping-at-runtime/55533 "2024-12-23T14:07:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yrucoo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yrucoo/32/44376_2.png) [@Yrucoo](https://forum.babylonjs.com/u/Yrucoo)\
**Post date:** [December 23, 2024, 2:07pm UTC](https://forum.babylonjs.com/t/modify-mesh-faces-and-uv-mapping-at-runtime/55533/1 "2024-12-23T14:07:31Z")

</div>

Hello everyone!

Is it possible to change a Mesh and it’s UV mapping at runtime? For example what I would like to do is create a simple box, but then make sure that each side is comprised of nine regular square faces instead of a single face and then adapt the UV mapping such that those faces shows a part of a texture map containing for example different walls and windows.

I know how to create such a model and texture in Blender and import the resulting .glb file, but I was hoping there is a way to do something like this programatically.

I am new with Babylon.js and would appreciate any hints and tipps on this issue!

Thanks in advance and happy hollidays!  
Patrick

---

<div class="post-metadata">

**Author:** ![srzerbetto](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/srzerbetto/32/20941_2.png) [@srzerbetto](https://forum.babylonjs.com/u/srzerbetto)\
**Post date:** [December 23, 2024, 4:18pm UTC](https://forum.babylonjs.com/t/modify-mesh-faces-and-uv-mapping-at-runtime/55533/2 "2024-12-23T16:18:06Z")

</div>

Hello @Yrucoo , welcome to the Babylon forum!

Yes, Babylon allows you to programatically create a mesh. You can use the “VertexData” class to store position, normals, UVs and indexes of a mesh and manipulate those values as you choose.

See documentation here: [Create Custom Meshes From Scratch | Babylon.js Documentation](https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/custom/custom)

---

<div class="post-metadata">

**Author:** ![Yrucoo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yrucoo/32/44376_2.png) [@Yrucoo](https://forum.babylonjs.com/u/Yrucoo)\
**Post date:** [December 27, 2024, 2:58pm UTC](https://forum.babylonjs.com/t/modify-mesh-faces-and-uv-mapping-at-runtime/55533/3 "2024-12-27T14:58:04Z")

</div>

Hello @srzerbetto!

Thanks for the hint, yes that looks very promising!

Thanks again and best regards,  
Patrick
