Conversation
|
Are you aware of the recently merged to assign texture channels arbitrarily pr |
|
The pattern can be done for uv channels (texcoords) #99676 |
You would like to have the ability to remap UV coordinates for every kind of texture, right? I can look into what is done in that PR. |
|
@fire I looked into the linked PR and thought about your comment. I think implementing UV channel remapping is quite orthogonal to this PR. As it stands right now, the GLTF importer does not correctly import the UV channel of the occlusion map. This should be fixed for textures where the StandartMaterial3D supports using the secondary UV channel. (It can be argued that his PR should also support the correct import of the UV channel of emission textures). Adding the ability to remap the UV channel would be a neat additional feature, but I would argue that is a new feature and not a fix to the default import behavior. Remapping would need to have the options { Did I miss something here? |
|
My point is that in gltf tex coordinate 1 is arbitrarily assigned to uv2 but theres 0 to 7 tex coordinates. So I wanted a second opinion how to resolve this. |
|
Thanks for elaborating.
It's not arbitrary, though. godot/modules/gltf/gltf_document.cpp Lines 3373 to 3378 in 45fc515 Perhaps if the UV channels 2 - 7 are encountered, though, a warning or error should be emitted, as this cannot be correctly imported. |
|
I'm assuming this is related to #96748 |
|
@BlueCube3310 yes, that PR looks like a more complete version of my changes. |
When the
occlusionTexturein a GLTF document uses atexCoordindex other than0theFLAG_AO_ON_UV2should be enabled. This allows using the second set of UV coordinates for occlusion textures.