Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Texture transform GLTF

Texture transform GLTF

tagopinath
Enthusiast Enthusiast
165 Views
0 Replies
Message 1 of 1

Texture transform GLTF

tagopinath
Enthusiast
Enthusiast

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.

0 Likes
166 Views
0 Replies
Replies (0)