No, unfortunately it works with jpgs but doesn’t work with .basic
gotcha, ill see what I can do.
@Escobar it looks like all the loaders in babylon (dds, ktx, env) all work off a single file with multiple images. jpg/png are the exception. Would it be okay if I require your images be packed into a single file? Ill try to make an example on how to do this.
Similar discussion happened for ktx here: KTX texture problem
Thank you for all your hard work @trevordev !
I compiled your changes, but unfortunately, it doesn’t seem to work for me, so I will have to wait until @Deltakosh compiles this release preview so I can check those changes out. With the version i compiled the loader is loading forever and if I bypass the loader then this happens.
I tried that
var textureSource = new BABYLON.CubeTexture(“noga_0000.basis”, scene);
BJS - [09:17:53]: Texture loader does not support cascades.
Used file (6 faces on a single file) noga_0000.zip (1.5 MB)
Yep create cube in texture loader not done yet, working on this now. Ill make sure your file works after my next PR.
Thank you so much Trevor! Anyway I can adapt myself to any other suggested compression way this time the order was nX pZ pX nZ pY nY acording to something I’ve read on other topic.
From my testing px nx py ny pz nz will work best when mapping to babylon’s face index so my change will likely support that.
eg. basisu.exe -file skybox_px.png skybox_nx.png skybox_py.png skybox_ny.png skybox_pz.png skybox_nz.png
This PR should get it to work: loading cube data in basis loader by TrevorDev · Pull Request #6487 · BabylonJS/Babylon.js · GitHub
This playground shows it working once its merged: https://playground.babylonjs.com#NLLVD8#3
Here is px nx py ny pz nz format noga_0000.zip (1.5 MB)
Just tried it, looks like it works
Nice, is there any way to get notified when that gets deployed into preview?
@Deltakosh might be able to tell you when the next preview will be released
In a couple of hours
It worked with
var textureSource =new BABYLON.CubeTexture(“noga_0000.basis”, scene, null, true,null,undefined,undefined,undefined,true);
but unfortunatly it looks pretty weird (banding) but I’m not sure if it is related to babylon or the fileformat itself
Seems related to the file format here
Can you guys still load the Babylon.js Playground
Mine is stuck forever
You are right it seems to introduce weird banding artifacts in cubemaps.
You can test it by yourself just compressing / decompressing one cubemap.
hopefully the last fix needed is here basis: only remove event handler if it matches the actionId by TrevorDev · Pull Request #6499 · BabylonJS/Babylon.js · GitHub
Huge thanks for working this out @trevordev, both the loader and mipmaps are working correctly now.
Hopefully we will have more advances in regards to .basis format quality options and encoding speed soon as well.