# Ospray Material Library problem with mtl file

**URL:** https://discourse.vtk.org/t/ospray-material-library-problem-with-mtl-file/2558
**Category:** Support
**Created:** [February 7, 2020, 7:47am UTC](https://discourse.vtk.org/t/ospray-material-library-problem-with-mtl-file/2558 "2020-02-07T07:47:00Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![gilcu2](https://discourse.vtk.org/user_avatar/discourse.vtk.org/gilcu2/32/1108_2.png) [@gilcu2](https://discourse.vtk.org/u/gilcu2)
#### Post date: [February 7, 2020, 7:47am UTC](https://discourse.vtk.org/t/ospray-material-library-problem-with-mtl-file/2558/1 "2020-02-07T07:47:01Z")

</div>

I am using vtkOSPRayMaterialLibrary to read an mtl file but all the shaded variables for any material return (1,1,1) and these are not the values in the mtl.  
Attached source and mtl file.  
Am I doing something wrong?  
Thanks  
Note, the first mtllib.cpp has a mistake, use the second)  
Reynaldo[mtllib.cpp](https://discourse.vtk.org/uploads/short-url/4p1v3h2eXUN3Ak4L6azjHXqCIVv.cpp) (1.5 KB) [geometries.mtl](https://discourse.vtk.org/uploads/short-url/fSIzurrdYAKcKMkBMB8B4cPdSxE.mtl) (13.1 KB)[mtllib.cpp](https://discourse.vtk.org/uploads/short-url/zyQsMCYyQT0ABw4zx2bKxqXhtNi.cpp) (1.5 KB)

---

<div class="post-metadata">

### Author: ![Dave\_DeMarle](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dave_demarle/32/6_2.png) [@Dave\_DeMarle](https://discourse.vtk.org/u/Dave_DeMarle)
#### Post date: [February 7, 2020, 7:44pm UTC](https://discourse.vtk.org/t/ospray-material-library-problem-with-mtl-file/2558/2 "2020-02-07T19:44:39Z")

</div>

Probably because of this typo in the code!  
[https://gitlab.kitware.com/vtk/vtk/commit/1449e79830ac65281c9851ce4ba5cd005bcf5088?merge\_request\_iid=6439](https://gitlab.kitware.com/vtk/vtk/commit/1449e79830ac65281c9851ce4ba5cd005bcf5088?merge_request_iid=6439)  
I’ll merge this fix in with some unrelated changes I am making.

---

<div class="post-metadata">

### Author: ![gilcu2](https://discourse.vtk.org/user_avatar/discourse.vtk.org/gilcu2/32/1108_2.png) [@gilcu2](https://discourse.vtk.org/u/gilcu2)
#### Post date: [February 8, 2020, 6:34am UTC](https://discourse.vtk.org/t/ospray-material-library-problem-with-mtl-file/2558/3 "2020-02-08T06:34:35Z")

</div>

Hi Dave, good news 🙂

Thanks

Reynaldo
