Maya KHR texture transform


I’m trying to expose the offset of my UV’s using the KHR texture transform. I haven’t had any luck exporting this with the Maya exporter to gltf, is there any documentation of how this should work with gltf?

Hi @mbucherre,

Can you post an example? I assumed that we handled UV translation/rotation/scale via the texture transform extension when enabled in the exporter settings:

I’ll try to update the docs to reflect this, but we use the place 2d Texture node attached to the texture you use. these values are converted and exported as the KHR_texture_transform extension:

Note: We use the Repeat UV attribute for scale, Offset for translation and RotateFrame for rotation

I believe I’m doing the same thing but I’m not seeing anything that references KHR or Offset with the gltf file. Here’s the gltf file I ended with (651.5 KB)

Thanks, but the glTF isn’t very useful for this. can you send me your source scene?

Sure thing (721.2 KB)

I think I figured out what was wrong. When I export with the default UV values the KHR_texture_transform extension doesn’t appear.

When I add any value to offset or rotation I start to see the parameters for

“extensions”: {
“KHR_texture_transform”: {
“offset”: [0.2, 0.0],
“rotation”: 6.28318548,
“scale”: [1.0, 1.0],
“texCoord”: 0

1 Like

Ok, that’s expected behavior. We don’t want to serialize any default values in the glTF to keep filesize down. Glad you figured it out :slight_smile:

1 Like