3dvedo

why some textures did not load correctly in vedo library in python?


I'm trying to load some .obj files with their texture by vedo lib:

from vedo import *
from transparent import *

mesh = Mesh("3d/gol1/raw_model.obj")#load 3d model
mesh.texture("3d/gol1/texture.png")#load texture on 3d mode

plt = Plotter(offscreen=True)
plt += mesh
plt.show().screenshot("hi.png")#save as png

but in some cases, like the image below, the texture did not load correctly: the correct one: enter image description here

and we see here the result after loading texture:

loaded in vedo


Solution

  • Add the line below before laod the mesh oject:

    vedo.settings.use_depth_peeling = True