How to use KHR_mesh_quantization + KHR_texture_transform to import UV #903
Replies: 2 comments
-
Hi! I think https://stackoverflow.com/questions/75946773/how-to-use-khr-mesh-quantization-khr-texture-transform-to-import-uv-with-gltf will be a better place for this question, as implementing support for rendering |
Beta Was this translation helpful? Give feedback.
0 replies
-
Ok, thanks, my problem is solved, it was just a problem of precision if float number.
…________________________________
De : Don McCurdy ***@***.***>
Envoyé : jeudi 6 avril 2023 16:11
À : donmccurdy/glTF-Transform ***@***.***>
Cc : FanJIANGIIS ***@***.***>; Manual ***@***.***>
Objet : Re: [donmccurdy/glTF-Transform] How to use KHR_mesh_quantization + KHR_texture_transform to import UV (Discussion #903)
Hi! I think https://stackoverflow.com/questions/75946773/how-to-use-khr-mesh-quantization-khr-texture-transform-to-import-uv-with-gltf will be a better place for this question, as implementing support for rendering KHR_texture_transform in a custom engine is a bit outside the scope of this project.
—
Reply to this email directly, view it on GitHub<#903 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AXKBAQCUACAMZCPNBKJOD7LW73FJVANCNFSM6AAAAAAWU5AH7I>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
donmccurdy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm working on Duck
https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/Duck/glTF-Quantized
I got UV (uv0) data as unsigned short like this
{x=3595 y=2479 }
{x=3616 y=2484 }
{x=3628 y=2479 }
...
In the json part, the transform is
"KHR_texture_transform":{
"offset":[
0.0264090002,
0.019963026
],
"scale":[
0.000233684244,
0.000234450286
]
So in order to get my float type UV, I tried
U= x * scale.x, + offset.x ;
V = y * scale.y + offset.y;
I also tried using the matrix mentioned here :
https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_texture_transform/README.md
But nothing works, any idea why? pls help
Beta Was this translation helpful? Give feedback.
All reactions