uv value lost
See original GitHub issuethere are some files when I export from blender. There are actually UV values that existed in that file. But when I load them from trimesh, the uvs had gone.
please see the file below:
tmp.tmp.obj:
# Blender v2.82 (sub 7) OBJ File: ''
# www.blender.org
mtllib tmp.tmp.mtl
o Cube
v 1.000000 1.000000 -1.000000
v 1.000000 -1.000000 -1.000000
v 1.000000 1.000000 1.000000
v 1.000000 -1.000000 1.000000
v -1.000000 1.000000 -1.000000
v -1.000000 -1.000000 -1.000000
v -1.000000 1.000000 1.000000
v -1.000000 -1.000000 1.000000
vt 0.625000 0.500000
vt 0.875000 0.500000
vt 0.875000 0.750000
vt 0.625000 0.750000
vt 0.375000 0.750000
vt 0.625000 1.000000
vt 0.375000 1.000000
vt 0.375000 0.000000
vt 0.625000 0.000000
vt 0.625000 0.250000
vt 0.375000 0.250000
vt 0.125000 0.500000
vt 0.375000 0.500000
vt 0.125000 0.750000
vn 0.0000 1.0000 0.0000
vn 0.0000 0.0000 1.0000
vn -1.0000 0.0000 0.0000
vn 0.0000 -1.0000 0.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
usemtl Material
s off
f 1/1/1 5/2/1 7/3/1 3/4/1
f 4/5/2 3/4/2 7/6/2 8/7/2
f 8/8/3 7/9/3 5/10/3 6/11/3
f 6/12/4 2/13/4 4/5/4 8/14/4
f 2/13/5 1/1/5 3/4/5 4/5/5
f 6/11/6 5/10/6 1/1/6 2/13/6
there are many vt values in the obj file. but if I load it like this:
m = trimesh.load('./tmp.tmp.obj')
print(m.visual.uv) ---> None
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
What's the Difference Between U‑Value and R‑Value?
U-values generally range from 0.1 (very little heat loss) to 1.0 (high heat loss). The U-value of a window is measured by the...
Read more >What is a U-value? Heat loss, thermal mass and online ...
Thermal performance is measured in terms of heat loss, and is commonly expressed in the construction industry as a U-value or R-value. U-value...
Read more >Transmission Heat Loss through Building Elements
U-value (or U-factor) is a measure of the rate of heat loss or gain through a construction of materials. The lower the U-factor,...
Read more >What is U-Value of a Building Component? - The Constructor
The U-value measures the energy lost through a square meter of the material for every degree difference in temperature.
Read more >U Value vs. R Value - ~ - Stanek Windows
Here are the differences in a nutshell: U-value (also known as U-factor) is a measure of heat transfer (heat gain or loss through...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mikedh I just confirmed that
mesh.vertices[i]
doesn’t necessarily correspond tomesh.visual.uv[i]
. In fact, #v
and #vt
are not always the same, because UV mapping is on a per-face basis, not per-vertex: https://stackoverflow.com/questions/27777349/handling-obj-files-why-is-it-possible-to-have-more-vertextextures-vt-than-ve.I believe there is a missing feature in trimesh.
mesh
should have an attribute similar tofaces
, sayfaces_vts
, that stores the texture coordinates of each vertex on each face.Hey, yeah it is converting it from a per-face to per-vertex: https://github.com/mikedh/trimesh/blob/dc8f59e58ca2313e05c5d9216d127c8b9b5bf583/trimesh/visual/texture.py#L216-L309