Texture transform parameters (offset, rotation and scale) #3226
Replies: 3 comments 2 replies
-
Hi @fbenedetti06, for reaching out. Do you mind attaching your 3D model and a link to your project so we can debug it easier? You can use glitch for that. |
Beta Was this translation helpful? Give feedback.
-
Thank you for such a quick response. I simplified to the max this code and you can run it here: https://www.my-net.fr/github_test/test.htm Also here attached: test.zip Fred |
Beta Was this translation helpful? Give feedback.
-
After more investigation it seems that sophisticated textures use an extension called "KHR_texture_transform". I constat that model-viewer is able to provide a correct render when gltf file use this extension. Is there a way to change only texture image WITHOUT change transformation properties? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I'm a very beginner with model-viewer and 3D model. So I apologize by advance if my question is stupid!
With Blender I made a simple 3D model.
I used an external image as a texture and I changed offset, rotation and scale parameters to repeated it all over the surface (the render look like a tiled wall).
With model-viewer I would like to replace programmatically initial texture image by another.
Unfortunatly it seems that all transform parameters are lost (now the render look like a single one big tile all over the wall).
I can't find a way to restore these parameters by program nor a function to set these values.
Here the part of Gltf 3D file I identified to be desired settings to resize and repeat the tiles (generated by Blender)

Here lines of JS code I use to change programmatically the image:

Any idea?
Fred
Beta Was this translation helpful? Give feedback.
All reactions