Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined values in mesh UVs #92

Closed
spelufo opened this issue Jun 11, 2024 · 1 comment
Closed

Undefined values in mesh UVs #92

spelufo opened this issue Jun 11, 2024 · 1 comment

Comments

@spelufo
Copy link
Contributor

spelufo commented Jun 11, 2024

The uvs are not being loaded properly. Some are not set, I'm seeing undefined values.

 $ grep vt turn_04_h1.obj | head
vt 0.146651 0.103684
vt 0.146657 0.103619
vt 0.146246 0.103636
vt 0.146662 0.103554
vt 0.146251 0.103571
vt 0.145839 0.103589
vt 0.110130 0.082705
vt 0.110381 0.082274
vt 0.109725 0.082440
vt 0.110632 0.081843

 $ ./dev.sh 
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.10.4 (2024-06-04)
 _/ |\__'_|_|_|\__'_|  |  
|__/                   |

julia> using MeshIO, FileIO

julia> load("turn_04_h1.obj").uv[1:10]
10-element Vector{GeometryBasics.Vec{2, Float32}}:
 [0.146651, 0.103684]
 [0.146657, 0.103619]
 [0.0, 0.0]
 [0.146662, 0.103554]
 [0.146251, 0.103571]
 [0.145839, 0.103589]
 [0.11013, 0.082705]
 [0.110381, 0.082274]
 [0.0, 0.0]
 [0.110632, 0.081843]

julia> load("turn_04_h1.obj").uv[1:10]
10-element Vector{GeometryBasics.Vec{2, Float32}}:
 [0.146651, 0.103684]
 [0.146657, 0.103619]
 [4.0f-45, 6.0f-45]
 [0.146662, 0.103554]
 [0.146251, 0.103571]
 [0.145839, 0.103589]
 [0.11013, 0.082705]
 [0.110381, 0.082274]
 [1.3f-44, 1.4f-44]
 [0.110632, 0.081843]

julia> load("turn_04_h1.obj", uvtype=Vec2f).uv[1:10]
10-element Vector{Vec{2, Float32}}:
 [0.146651, 0.103684]
 [0.146657, 0.103619]
 [-3.2827938f15, 3.3897f-41]
 [0.146662, 0.103554]
 [0.146251, 0.103571]
 [0.145839, 0.103589]
 [0.11013, 0.082705]
 [0.110381, 0.082274]
 [1.3f-44, 1.4f-44]
 [0.110632, 0.081843]
@ffreyer
Copy link
Collaborator

ffreyer commented Nov 19, 2024

This was likely fixed in #93

@ffreyer ffreyer closed this as completed Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants