Closed Omega1975 closed 2 years ago
eames_stripes.zip is an obj already
Sorry. This is the right file EAMES_STRIPES.zip
EAMES_SCOTTISH_YELLOW.zip I recompiled the sources, now the extension of the first texture is correct but the scales and rotation of the textures in the obj file are not. Attached is the glb file and the obj file obtained from exporting with the sharpgltf library. The differences between glb and obj are visible in the attached images.
Reviewing your model, your source GLB uses materials that apply a transform to the texture, something like this:
"KHR_texture_transform": {
"scale": [
0.13846579,
0.12745348
] }
As it happens, Wavefront OBJ is a very old format and it's missing lots of modern features, one of them is texture transform.
So what you're seeing is the consequence of not being able to export all the details of a glTF material into a Wavefront material.
uvscale.zip Attached the same obj with uv scale equal to one tenth with respect to each other. Comparing the obj files you can see how the difference in scale translates into a scaling of the values of the vt lines. For eaxample
Original file --> new file vt -27.73200 0.00000 -> vt -2.77320 0.00000 vt 0.00000 -15.70900 -> vt 0.00000 -1.57090
News? this bug has it been corrected?
I am going to be busy at work for the rest of the month, so I doubt I'll be able to visit this issue soon.
Also, as I stated in my last response, this issue happens becase WaveFront is missing several features in its material structure... so this issue cannot be considered "a bug".
This doesn't mean it can't be fixed, but it's not trivial because I need to pre-transform the mesh UVs by the materials... but in this case, it would not be "fixing a bug" but a feature: "overcoming a wavefront format limitation"
Thanks for the quick reply. I am aware that "fixing" this "bug" is no small thing. I await the change. thank you.
to reproduce the problem upload the attached glb file and export it in obj format. EAMES_STRIPES.zip
this is the obj exported test.zip
S.O. Windows 11 SharpGLTF from source (github cloned 19/02/2022 )