Issue when creating textures

Hi,

I don’t understand what happens when i’m creating a material linked to a texture. All seems to be at the right place but the texture is not created.

If I look at the inspector and I click on the url field of the jpg and go out, it works…

Here’s a video cap :

2024-11-17_20h01_41

Can you tell me where’s the issue ?

Thanks,

Boris

After looking a little bit further, it seems that it happens only when my material is cloned

If it can help you…

Just a guess, textures is cloned when cloning the material, and the cloned texture failed to get ready for some reason. If not limited, I think the cloned material use the origin texture should work.

Thanks for your answer, but unfortunately it cannot work in my case.

I clone the texture because i need to change its UV values so I need another material with another texture.

It’s hard to say, because it works in the playground (Babylon.js Playground). Do you have an error in the browser console? Can you try using an absolute url instead of a relative url? Can you also try to use a simpler file name, maybe characters like “{” make it fail for some reasons…

It works perfectly with an absolute URL, so I assume it’s a bug because it should also work with a relative one…

Let’s cc @RaananW, maybe that’s something related to the configuration of your project (doing “…/XXX” may mean you are going outside the base directory defined for your project and could cause problems?).

Trying to follow up, let me know if I got this correctly - When creating a texture with a relative URL (i.e. the texture is on the same server that the HTML is hosted from), the texture is working correctly, until it is cloned. After cloning the material that is holding the texture, the new texture doesn’t work anymore. But if setting the URL to the relative URL again (which is what the inspector is doing) it works again.

Can I ask - is there a 404 in the console? is there some request that is being sent, or is nothing happening when cloning the texture? as if no URL was set?

@Evgeni_Popov I tried with “{” characters and it works with an absolute URL, not with a relative one.

@RaananW, You got the problem perfectly. There are no 404 error in the console, the link in the URL field is right but it works as if there was no link to the png picture. When I click in the URL field and click outside without writing anything, it changes the link and refresh the texture well. I think it should do it before…