I’ve been unable to get basis textures to work with skyboxes. Tried 2 methods:
Simply using .basis images in place of my current png textures for the skybox and using CubeMaterialCreateFromImages -No errors, yet nothing shows up, as if it decided not to transcode, or failed to update the texture after transcoding maybe?
Using basis cubemap format. (With CreateFromPrefilteredData) While this worked (loaded), the images were super distorted/color issues.
Line 76 commented out, looked like an attempt to use basis as environment texture. – Anyways is there a reason #1 doesn’t work, and or know if there are issues w using basis as skybox, thus the commended out line?
Seems like it should work, but I haven’t personally tried this. Would it be possible to set up a PG using both methods? That will help debug the issue.
@bghgary well I can try at least, but having issues w skybox/PG maybe due to size (won’t load pngs either), but leaving this here as logging for night. But images are loaded in gist, pngs and basis versions. Also skyboxtest.basis is a cubemap (created w no regards to order)
This is true, I can spend time setting it up, but then I will not be spending time else where. The easier it is to set up the repro, the faster we can help with the solution.
Yes, like I said, it wasn’t working, but the source files are there, so figured I’d upload in case you had a local playground to load it in quickly. Unfortunately probably won’t be able to get to this until weekend since swamped@day job. And the method ^ used to work so not sure what happened.
Can see in first example, basis requests completing but not working (also says loading assets still, so may be related to issue)
Comment in line 36 to see the full cube basis texture artifacts. It looks slightly better than my actual skybox I’m trying to use it on, but very similar artifacts (I think this one is just darker/less dynamic overall so doesn’t look quite as bad.
Comment in line 13 to see the working PNG versions of the source images
First, the Basis texture loader in Babylon.js does not support loading a cube map with 6 individuals files. There is a flag on the loader that indicates this, but this flag is marked wrong causing the code to just do nothing instead of reporting a warning. I will fix this.
Second, it looks like the Basis file is encoded in gamma space. You can set that manually for now for the colors to be right.
Thanks! I’ll give that a try on my actual skybox but looks like the output I expected from PG. FYI basis is encoding that way by default when creating cube texture (Didn’t use any special options or anything other than -tex_type cube)