It’s somewhat the same. I know how to swap out the textures. My question is how would I directly change the texture on the material that comes with the GLB file? In the link you provided, the solution included creating a new material and assigning that to the mesh then assigning a texture to that new material. That’s the approach I’ve seen in most examples, but I haven’t seen any yet that just directly change the texture on the GLB file.
Here is a playground (https://playground.babylonjs.com/#JUKXQD#1944) that includes some models I’ve created in Blender with some textures. It’s fairly simple and should be easy to modify but I can’t seem to change the textures directly. In the code I reference the cube after importing. When I start typing out:
I don’t see anything regarding the ability to change any kind of texture, albedo or diffuse. So is this something that can’t be done directly? Do I need to create a new material, assign it to the cube, then change the texture?
To add to this, why can’t I access the diffuse texture of a material when I chain it as such?:
Here is the playground for that (I included the code snippet above)
I can access the diffuse texture just fine if I reference the material directly, but not if I reference the material through the mesh. Is there some other way I’m supposed to access this? A while back I was trying to change the uv scale of the texture and was having a hard time understanding why I couldn’t change this through the material. I had to create a texture separately then I could access it.