# How to create mesh out of STL object and apply material

**URL:** <https://forum.babylonjs.com/t/how-to-create-mesh-out-of-stl-object-and-apply-material/32368>\
**Category:** Questions\
**Created:** [July 21, 2022, 10:31am UTC](https://forum.babylonjs.com/t/how-to-create-mesh-out-of-stl-object-and-apply-material/32368 "2022-07-21T10:31:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aradwan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/aradwan/32/25813_2.png) [@aradwan](https://forum.babylonjs.com/u/aradwan)\
**Post date:** [July 21, 2022, 10:31am UTC](https://forum.babylonjs.com/t/how-to-create-mesh-out-of-stl-object-and-apply-material/32368/1 "2022-07-21T10:31:24Z")

</div>

I am trying to apply a different color to a STL model I am loading into Babylon.JS.

The material is not applying and I assume because I have to convert to a Babylon Mesh object first. Here is my code below:

> **[Babylon.js Playground](https://playground.babylonjs.com/#DQSNE7%234)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [July 21, 2022, 11:24am UTC](https://forum.babylonjs.com/t/how-to-create-mesh-out-of-stl-object-and-apply-material/32368/2 "2022-07-21T11:24:57Z")

</div>

Hello and welcome to the Babylon community!

Your code has a syntax error 🙂

 ![aaaaaa](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/4/0/409b16d16a0f52f5ad4f898769c388da8282039d.png)
