简体   繁体   中英

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 .

You can try the following:

from vtkplotter 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()

在此处输入图片说明

您可以为此使用 f3d: https ://gitlab.kitware.com/f3d/f3d/-/releases

f3d /path/to/3dmodel.obj

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM