darkknight8 Posted August 28, 2018 Share Posted August 28, 2018 I have a scene which imports multiple meshes. One group of mesh is known as the character mesh for my character (this contains a root and few children) and a hat mesh (that contains a root and one child). The first import always imports as expected, but the second import seems to merge materials and textures with my previous import. The 1st image below shows the regular hat with texture. Now importing after the character causes the material and texture to seemingly merge, which is shown by the 2nd image below. The third image shows me importing the hat first this time, then importing the character second...the 3rd image is the result. His hair now has material of the hat. So my question is, when you import meshes, are they suppose to automatically share materials? If so, how do I prevent this from happening? Quote Link to comment Share on other sites More sharing options...
Guest Posted August 28, 2018 Share Posted August 28, 2018 The system will always create new material but will reuse texture as much as possible. So I suppose your two scenes has textures with same name Quote Link to comment Share on other sites More sharing options...
darkknight8 Posted August 28, 2018 Author Share Posted August 28, 2018 I looked at the console material properties of the meshes and under the albedoTexture name, it has "hair_baseColor.jpg" for the hair, and "hat1_baseColor.jpg" for the hat, is that creating a conflict? The only thing that I noticed that is really similar is that the url both point to "data:/assets/image0", is this possibly the issue? Quote Link to comment Share on other sites More sharing options...
Guest Posted August 28, 2018 Share Posted August 28, 2018 This should not be a problem unless they are identical (not the case here). Can you replace your meshes by boxes but keep the textures and create a playground? If this is a bug I will fix it immediatly Quote Link to comment Share on other sites More sharing options...
Guest Posted August 28, 2018 Share Posted August 28, 2018 Also which format are you using? gltf? Quote Link to comment Share on other sites More sharing options...
darkknight8 Posted August 28, 2018 Author Share Posted August 28, 2018 Yep, I am using gltf/glb file format. So I am not sure if I can reproduce it in the playground using box meshes because this issue only seems to happen after importing a 2nd mesh into the scene rather than creating a mesh. I noticed that the url the character meshes tend to be "data:/assets/image0", then increases by 1 per texture imported for that group, so the second texture in the group would be ""data:/assets/image1", etc., but when you import a second mesh, the url for the albedoTexture is reset to "data:/assets/image0". It might be a complete coincidence, but the hair texture on my character and my hat both point to the url "data:/assets/image0". I have attached some screenshots below to show what I mean. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 28, 2018 Share Posted August 28, 2018 That should not be a problem, I will need to get the files to help further Quote Link to comment Share on other sites More sharing options...
darkknight8 Posted August 28, 2018 Author Share Posted August 28, 2018 Update: The issue seems to only occur when you use local files, because when I hosted the file on a CDN or you have the files in a different directory (for example, have character in the /character directory and hat in a /hat directory), the issue is resolved, so maybe this is a bug somewhere when importing from the same directory @Deltakosh? Screenshot below: Quote Link to comment Share on other sites More sharing options...
Guest Posted August 29, 2018 Share Posted August 29, 2018 Yes! We found the issue yesterday evening actually Thanks for pointing it to us Next nightly will have the fix Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.