Wavefront .obj WITH materials .mtl

This could be related to some weird formatting in your obj. I’m guessing you are on windows?

that’s correct

Would is be possible to share that obj/mtl privately with me to see what could be the issue?

Everything is working… I found out what I was doing wrong… when using tab completion in the cmd prompt, I was specifying the .mtl instead of .obj

Glad it is working and it was an easy fix…

Dear Jourdain
I have finished the exchange from .obj and the assumed file .mtl. And also there is no error when I compile the script. Finally I got the .pvsm file, but how should I open it in paraview. I check that paraview can not be open the .pvsm type. How should I do this ?
Regards.
Feng

.pvsm are state file which means that you need to do “Load state” rather than “Load dataset”.

Thanks for your reply. I tried to load state with my .pvsm file. There is no visualization in the paraview. Can I send you my file? I am confused.
Regards.
Feng

Do you also have a bunch of vtp and images on the side of your state file?

example3.rar (1.4 MB)
There are files which I used. First I run the command /patch/to/…/pvpython obj-mtl-importer.py /patch/to…/1.obj and I got a new file 1-pv-state.pvsm and I load state in paraview with it(all files in this compressed file). But there is just nothing in paraviewer…
Regards


%E5%9B%BE%E7%89%87

nothing in the window…

Dear Sebastien
I have deal with it. I load state and then view it in the database window. And I got the result which include image and obj mesh.
Thanks a lot
Regards~~
Feng

1 Like

Hi, can you explain how do you show the rendering. I followed all the step, have my state loaded with several objects in the pipeline but nothin is showed.
Thanks
Reynlado

You may want to open a new topic to explain your own issue.

I believe this topic is referring to the same problem described in https://gitlab.kitware.com/paraview/paraview/issues/19240

The issue was resolved prior to the ParaView 5.7.0 release.

Thank you for sharing the converter program.
But, I am struggling in find how to transform the loaded objects. When I apply the transform filter to the loaded objects, the texture of the objects disappeared. For examples, 1.5 scale in z direction and x, y movings.
Is there an way to transform object in obj-mtl-importer.py?

Thank you.

When you apply a transform filter you actually create a new dataset with a new representation on which the texture is not defined. So you can either load the same texture on that new representation or simply transform the representation itself. That way the rest of the settings remain unchanged.

To adjust the transform on the representation, just write “transform” in the search box of the property panel of ParaView and fill the various parameters that you want to adjust inside the “Display” section.

Thank you for informing me the search box. It works!

Hello,

I managed to run the script on my .obj mesh however I lost the coordinates of the scene. Is it somehow possible to maintain the orginal coordinates of the OBJ file?

I’m not sure to follow the question.