Search the Community
Showing results for tags 'compressed'.
Found 3 results
Hey guys and girls, we are trying to get WebGL Compressed Textures to work with the texture trim/crop, but get strange effects: Problems in WebGL: DDS form a horizontally and vertically repeating pattern PVR form a horizontally repeating pattern Not compressed PNGs have the pixels touching the right and bottom border drag on With CanvasRenderer the PNG gets displayed exactly the way we expected it For our compressed texture conversion we: Take our base image, usually PNG with lots of empty transparent space, and trim off the empty parts to each side Save the trim x, y start position and the original width and height of the full texture Save the width and height of the trimmed image as crop Add a padding to make our texture a Power of Two size (or square for PVR) Any idea what we could try to fight those problems? See the attached example replicating the errors: compressed_texture_padding.7z
gryff posted a topic in Questions & AnswersI've been following this issue on and off - mainly through @JCPalmer's posts on various threads. There is also a tutorial on the BJS documentation site (written by JCP?) That tutorial gives a little bit of code to let the .babylon engine know that compressed textures are available: var available = ['-astc.ktx', '-dxt.ktx', '-pvrtc.ktx', '-etc2.ktx', '-etc1.ktx']; var formatUsed = engine.setTextureFormatToUse(available); But I have a couple of questions: 1. The BJS Blender Exporter will take the textures I have used in Blender (.png or .jpg usually) and the .babylon file created will include those pngs and jpgs. So will those two lines of automatically use a .ktx version instead - over-riding the .babylon file? 2. " The texture must be encoded with the Y-axis flipped ". Flipped so that is where the X axis was ie, 90 degrees, or mirrored on the Y axis? 3. Is the device being used automatically detected so that a low level compression format (etc1)will be used on certain processors but a higher level format (astc) be used where appropriate? I've done some tests on compression with a simple tiling png texture (570kb) and compressed it using the Mali Compression Tool and the results are impressive - a .ktx file size of 129kb (etc1) cheers, gryff
hi everyone. i'm developing 2d MMORPG. and image using jpg or png but this is slow and need more memory so it give many problems on mobile by overflowed memory so i'm consider to use texture compress.. but this is not easy because our game need supporting mobile (ios, android) DXT: supported by all desktop devices and some Android devices PVR: supported by all iOS devices and some Android devices ETC1: supported by most Android devices so i need auto-generater. anybody know this? like this https://blog.playcanvas.com/webgl-texture-compression-made-easy/ thx everybody