r3dwolf Posted November 7, 2017 Share Posted November 7, 2017 Hello, I need to load .dds and .pvr texture (not in ktx container). I succesfully load a dds (DXT1) RGB texture. For DXT5 RGBA i think there is a bug in babylon.dds.ts line 140 isCompressed: (fourCC === FOURCC_DXT1 || fourCC === FOURCC_DXT3 || FOURCC_DXT1 === FOURCC_DXT5), instead of isCompressed: (fourCC === FOURCC_DXT1 || fourCC === FOURCC_DXT3 || fourCC === FOURCC_DXT5), I changed that line and now i can load also DXT5. For PVR file I could load them correctly on iOS up to version 10.3 , with the latest version 11 no longer works. Has anyone already solved the problem? Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted November 7, 2017 Share Posted November 7, 2017 Well, for the DDS container error, you might PR the small change. What container format are you using for pvr with BJS? The DDS container code here is not being used like a container. It is hard coded to only deliver DXT textures. Not even sure you could find a DDS encoder for pvr textures due to patent issues. I seem to recall pvr having some kind of a specific container file, but you are going to have to make many changes to BABYLON.Engine class to use those, and then your scene will only work on iOS. I just checked my full scale test scene for ktx containers works fine on iOS 11. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 7, 2017 Share Posted November 7, 2017 I will fix the little typo Quote Link to comment Share on other sites More sharing options...
r3dwolf Posted November 8, 2017 Author Share Posted November 8, 2017 Hello @JCPalmer I use pvr container for pvr file. PVR in ktx container works also for me, but I have a lot of PVR file (with PVR container) and I would like to find a way to use those instead of convert all texture files. The curious thing is that, in ios version 10, my pvr textures files were properly seen. Thanks for the fix for typo @Deltakosh Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted November 8, 2017 Share Posted November 8, 2017 Do you still have the originals (.jpg or .png)? I wrote a couple of bat files to batch convert a whole directory of originals to all variants of .ktx files. See doc for usage. Someone also improved on this, converting it to a Node.js script. This is at the bottom of doc. If you do not have the originals, you might edit one of the scripts to read .pvr files instead of .jpg || .png as the input to the PVRTexTool. Quote Link to comment Share on other sites More sharing options...
r3dwolf Posted November 13, 2017 Author Share Posted November 13, 2017 Thanks @JCPalmer, I've already used those very useful scripts.At this time I will do so Quote Link to comment Share on other sites More sharing options...
r3dwolf Posted December 20, 2017 Author Share Posted December 20, 2017 The latest version of pvrtextool downloadable from the imagination site does not seem to have BC1 and BC2 as possible formats in the linux version.Has anyone generated the -dxt.ktx for BJS from linux? Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted December 20, 2017 Share Posted December 20, 2017 No, I switched from Ubuntu to win 10 just prior to adding this, not related. There is a forum where you might search / ask. My guess is that this has to do with patent problems with dxt. That patent has expired, but probably the reason. Quote Link to comment Share on other sites More sharing options...
r3dwolf Posted January 24, 2018 Author Share Posted January 24, 2018 if I wanted to add support for the pvr container, which is the best way to do it? I have already created a class similar to that for ktx (KhronosTextureContainer) that handles this type of container Quote Link to comment Share on other sites More sharing options...
r3dwolf Posted January 31, 2018 Author Share Posted January 31, 2018 I also made a try for crunch dds that seem to work. I changed the babylon core code (createTexture function in babylon.engine.ts) . @JCPalmer @DeltakoshThere is a better way? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 31, 2018 Share Posted January 31, 2018 The best way to review the change is probably to do a PR on the main repo Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.