Dears, I was working on my scene this morning linked to preview.
When I came back on it just now, I got this error. I checked older version and get the same error.
It appears all my clones of class PBRMaterial are now generating this error
Checked on chrome and safari Mac.
Did you just merge something that could cause this? It was working fine 2 hours ago.
Thanks,
Having a look now, could come from the PR I did about cloning material pluginsâŚ
It seems the problem involves cube textures, but I canât reproduce:
What do you mean by âolder versionâ? Older Babylon.js versions?
If you can narrow the problem it would help a lot!
Or, are you able to provide a link (even outside the playground) that we could use to debug?
Sry, no. Just an older version of my scene to make sure I didnât mess up something with the materials.
Well, I just tried on never rig and os version and everything is fine. So it looks like itâs related only to my relic of a macpro (10.11.6). Might be hard to reproduce (unless you also have the same relic Point is I didnât make any updates nor anything so itâs kind of strange. I guess Iâm gonna try restart the system see if it changes anythingâŚ
EDIT: Huh! Just restarted the system and the problem has gone. Youâre gonna think Iâm fool, but I did clean the cache restart the browser and even launch another browser on which I never loaded the scene and got this error. Something just very persistent must have occured. Black MAC magic I suppose. Looks like itâs fine now. Sorry for the disturbance and have a great day
Iâm relieved it seems thereâs no bug
Your stacktrace looked very strange, I donât know how we could end up in AnimationRange
from DetailMapConfiguration.parse
âŚ
As I said, black MAC magic Not as if we never experienced it before. I should have double or triple-checked before posting. My bad Again, my apologies for the additional stress. I will try to be more careful before posting in the future (canât promise though )
@Evgeni_Popov You wouldnât believe it, but I have to revive this topic.
I donât know by what magic it has been working for a time yesterday, but this morning without making any changes, it bugs again
However, this time it does the same on windows and macOS and I multiple checked it all.
Better than that, I have been able to repro it in this PG.
Iâm doing the same cloning using this prefiltered cloned env texture on both a class PBRMetallic and PBRMaterial. Where the metallic or standard class has no issue, the cloning of PBRMaterial throws the error (uncomment these in PG).
I hope youâll find an explanation for it?
Sorry for the new bother.
Thanks for the repro!
In fact, itâs not a bug with plugins but with CubeTexture
serialization.
I was able to reproduce the problem with a simple PG :
The bug stems from the name
property being overwritten. In the case of CubeTexture
itâs possible to fix it, so hereâs the PR :
But for other textures, overwriting the name
property wonât work if the texture is serialized at some point. This is because, for historical reasons, name
stores the textureâs url, so putting something other than a url will fail at parsing time.
Note that CubeTexture.CreateFromPrefilteredData
and Color3.FromHexString
are static, so you shouldnât use the new
keyword with them.
Wow, thanks a lot. Looks like I learned something new from you, just once more I knew my method might not have been the most conventional but I was worried because it was working until now. Thanks also for the PR and have a great day
EDIT: Yup, confirm itâs all good. Donât know why I had that. Itâs useless anyways. Must be the remains of an old project I used as a base for my mats. I guess at least it helped me understanding a few things.
Thanks again for your efforts and support.