How to replace a texture/material within a scenegraph #2235
Unanswered
matthew-rimmer
asked this question in
Q&A
Replies: 1 comment
-
@matthew-rimmer As a quick answer: Have you looked at the It shows you that the loaded images are decoded and stored in the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
So I have a task that requires me to replace textures within a loaded GLTF file. I was kind of confused about how to go about this in luma.gl, and I was hoping to do this in luma as we already use deck.gl.
Say for this sample model from khronos, load it:
I'm not sure exactly what to do to the scenegraph to replace the texture with a different image. I see the there is a texCoord buffer in the ModelNode's model:
But I'm not sure what buffer or accessor the image is stored in?
There is some related documentation on loaders.gl that shows recreating the gltf file here, but I cannot seem to get the vertex buffer to be the right size when recreating, so I was hoping to do it after.
And if I can replace it, how do I then make the scenegraph update to reflect this?
Thankyou for any help!
Beta Was this translation helpful? Give feedback.
All reactions