Jump to content

How to change textures (separately) of a mesh multiple times imported from Blender


Recommended Posts

Hi everyone,

I imported a mesh from Blender three times and I put different ID for each one and then I try to change the texture just for one mesh with:

var newMesh = scene.getMeshByID("first_id");
newMesh.material.diffuseTexture = new BABYLON.Texture("colors/blue01.jpg", scene);

But even if each mesh have a unique ID (I can see it with console.log(newMesh.id)) all the three meshes change their textures.

How can I fix it to change the texture only for one mesh separate from others?

Sorry for my english.

Thank you all.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...