question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

there 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:open
  • Created 3 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
zachzeyuwangcommented, Jan 12, 2021

@mikedh I just confirmed that mesh.vertices[i] doesn’t necessarily correspond to mesh.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 to faces, say faces_vts, that stores the texture coordinates of each vertex on each face.

1reaction
mikedhcommented, Jan 12, 2021
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found