Texture transform GLTF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am trying to write a GLTF exporter in our application.
I am able to export all meshes with proper details.
In case of texture, the transformation details (like scale, offset and rotation), i am not getting the proper details.
I am using KHR_texture_transform extension to achieve that and I am using the formula which was given to export from Blender to GLTF.
offset = mapping_transform.get('offset', [0, 0])
rotation = mapping_transform.get('rotation', 0)
scale = mapping_transform.get('scale', [1, 1])
return {
'offset': [
offset[0] - scale[1] * sin(rotation),
1 - offset[1] - scale[1] * cos(rotation),
],
'rotation': rotation,
'scale': [scale[0], scale[1]],
}
But when i tried to export from Max 2024, its giving different values.
Does anyone knows about the formula which they are using to export with texture transform ?
Regards,
Gopinath.