Search code examples
python3dtexturesvtktrimesh

Visualizing 3d models with textures


I have a textured 3d model which has an obj file , mtl file and a png image for textures . I can visualize them without textures using trimesh and vtkplotter as :

//trimesh//
m = trimesh.load("3dmodel.obj")

//vtkplotter//
m = load("3dmodel.obj")

But they display the 3d models as plain meshes . I want to see them along with textures .

Can anyone please help me View the 3d models along with textures . Any small help would be greatly helpful .


Solution

  • You can try the following:

    from vedo import load
    
    # https://free3d.com/3d-model/091_aya-3dsmax-2020-189298.html
    mesh = load("091_W_Aya_100K.obj").texture("tex/091_W_Aya_2K_01.jpg")
    mesh.lighting('glossy') # change lighting (press k interactively)
    
    mesh.show()
    

    enter image description here