Open ganjbakhshali opened 2 years ago
uhm that looks strange.. is there a way that you can share one of these obj files?
Hello Yes sure. Here is the link this obj file was downloaded from Alibaba 3d obj files
I'm not completely sure why that happens but depth peeling fixes it..:
from vedo import *
settings.useDepthPeeling = True
msh = Mesh("normalized_model.obj").texture("texture.png")
show(msh, axes=1)
Thank you very much for your time But unfortunately, by running your code, I hit this error:
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 152 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 111
Current serial number in output stream: 112
uhm what version of vtk do you have and your OS?
Try type:
vedo --info
here is my system info:
vedo version : 2022.0.1 https://vedo.embl.es
vtk version : 9.0.3
python version : 3.8.12 (default, Oct 12 2021, 13:49:34) [GCC 7.5.0]
python interpreter: .../python
vedo installation : /home/.../anaconda3/envs/3d/lib/python3.8/site-packages/vedo
system : Linux 5.13.0-27-generic posix x86_64
Indeed it seems like vedo 2022 broke something around mesh textures. I can load a mesh texture with the sample code above in vedo 2021.0.3 correctly, but not in vedo 2022.0.3.
Sorry - I might have overlooked the issue... What is currently going wrong with the script above? I can run it fine on ubuntu, vtk9.0.3, python 3.8, 3.9
Hi, I experience the following behaviour on MacOS and Ubuntu 18.04, python 3.8 / 3.9, vedo installed with conda:
with this code:
vedo.settings.useDepthPeeling = True
mesh = vedo.Mesh("mesh.obj", c=[90, 90, 90])
mesh.texture( "texture.jpg"))
plt = vedo.Plotter()
plt += mesh
plt.show()
vedo.io.screenshot("img.png")
plt.close()
I get the following results in vedo 2021.0.3 vs 2022.0.3
The data is free from here: sketchfab
Hi , sorry for the late reply I could not download the above from sketchfab in any supported format... so I tried a new on another one mesh but could not reproduce the issue:
import vedo
mesh = vedo.Mesh("craneo.OBJ").texture("difuso_flip_oscuro.jpg")
vedo.show(mesh).close()
on vedo 2022.3.0 | vtk 9.0.3 | python 3.9
I attach the zip here skull-downloadable.zip
Very strange, with your files it works well with both versions. I attached the same minimal example with the bunny file, the problem persists. The only difference I see is that the bunny.obj has vertex normals and the craneo.obj does not.
thanks, I can now reproduce the issue I will look into it tomorrow.
I think I've found the issue... Try the dev version:
pip install -U git+https://github.com/marcomusy/vedo.git
I'm trying to load some .obj files with their texture by vedo lib:
I added Images in StackOverflow question