I tried in playground using the inspector but you are right I want to use in in cubemaps
@Escobar This shouldnāt be too bad to add, Iāll try to do this today.
Iām having alot of difficulty connecting to playgrounds and anything hosted on the babylon server (including preview babylonjs and basis files), took awhile to check it out, but after re-encoding basis with mipmaps it does seem that there is still alot of shimmering going on with distant objects when compared to the png textures. But I canāt be the only one seeing this, so i dunno.
Iām pretty sure I am able to see the mip level change but Iāll double check this as well in case iām missing something.
Yep, my mistake, I was loading the mips but told the engine not to look at them for some reason. This will be in my PR today. Sorry for taking so long to get this working and thanks for catching my bugs.
Thank you! Btw there is any chance to store the 6 images on a single .basis texture like its done on dds and other formats?
@Escobar Yep, I think this should be possible using their tool GitHub - BinomialLLC/basis_universal: Basis Universal GPU Texture Codec and the -multifile options although I havnāt tried this my self. In Babylon when using their js transcoder I can see that the basis file can contain multiple images and each image can have multiple mip levels. Is that how you generated the file you sent me? For loading cube maps I thought the file would contain 6 images which I would use for the faces.
It was only one face, I tried loading it with
textureSource = new BABYLON.CubeTexture(cameraTextureName, scene, ["_px.basis", ā_py.basisā, ā_pz.basisā, ā_nx.basisā, ā_ny.basisā, ā_nz.basisā]);
jpgs are stored in the same folder and worked properly
@Escobar so is everything working now as you expect?
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