Show obj with mtl

Hi, there is a direct way to show obj files file using the information in the associated mtl files. I have read about transforming the data to vtks and save in state files but is a problematic to process large files in parallel.
Ospray can manage the obj and mtl files directly. Why paraview can not?

You can just open the .obj file and load the .png as textures for the object.

It is not about png. For example, I have the attached geometries4.obj file associated with geometries.mtl. What is the way to show the plane using Yellow material and the box using IndianRed with all its color, texture, and reflection maps.geometries4.obj (8.5 KB) geometries.mtl (13.1 KB)

Indeed, not supported by ParaView.


1 Like

Some improvements have been made in the scripts for ParaView that are available inside vtkjs.

We have a path that use this Python file to load the geometry and apply the representation settings without dealing with the state file.

Also the convert script should produce less geometry files when their material definition remain consistent.

Hi, thanks. This script have a function that process a json file. What I have is an obj and an mtl files. How to do?

You need to run that one first.

Hi, thanks. I see how it works. The problem is that I need to process several large obj, mtl files in parallel in the server. This scripts run in the client. have you some solution for this case?

Unfortunately, I don’t.


A followup question from not the OP. So I’ve used the “” script with “pvpython”, and that did generate a folder with a handful of .vtp files, along with the “representations.json” file. I wasn’t able to get the .pvsm to successfully load as a state file, and I don’t see where the “representations.json” file is referenced in .pvsm, but that’s neither here nor there for my current question.

My current question then is how do I make use of this “” script? The comments at the top are not clear to me. First question is: is it a “Programmable Source”, or a “Programmable Filter”. And next question is: how do I specify the folder or the .vtp files along with the .json file?


Hi, I have been struggling with the obj mtl problem for some months. I have two results:

  • Use the obj-mtl-importer in an script that load the files, apply the materials through mapping the color, transparency, etc and create an output image. It has the problem that can not be used in Paraview app directly (Only pvpython and pvbatch) and can not executed in parallel
  • Use the steps in Paraview Ospray different results with materials. In theorie it should work in Paraview but right now the color are different. Only applicable to Ospray backend.