Search the Community
Showing results for tags 'compression'.
-
So I've been looking into the new updates to Phaser CE (2.7.0+) and what has caught my eye the most is the updates to the way Phaser handles textures. It now seems to have the ability to handle texture compression formats for WebGL which is exciting! Previous to this, all the games I had worked in were just loading PNG RGBA data into the graphics card and having come from other engines that support texture compression for GPU RAM optimizations, it was definitely a feature I missed. I've branched on an old project I had in order to test this new compression system but I'm not sure how it would work with atlases. I was already using Texture Packer before to generate Texture Atlases for the game but they were just PNG atlases. I came across this Advanced Rendering Tutorial where it explains how to set up your Texture Packer project. I've gone ahead and done that but the examples only show the ability to load an image with those compression settings. Here is a doc reference to the load image function. Currently, I am using this.game.load.atlasJSONHash('key', 'texturePNGURL', 'jsonURL'); It seems the new update only supports the following two calls this.game.load.image('factory', { etc1: 'assets/factory_etc1.pkm', s3tc: 'assets/factory_dxt1.pvr', pvrtc: 'assets/factory_pvrtc.pvr', truecolor: 'assets/factory.png' }); this.game.load.texture('factory', { etc1: 'assets/factory_etc1.pkm', s3tc: 'assets/factory_dxt1.pvr', pvrtc: 'assets/factory_pvrtc.pvr', truecolor: 'assets/factory.png' }); How would I go about loading my atlases with the accompanying JSON information using the new compression system?
- 2 replies
-
- compression
- texture atlas
-
(and 1 more)
Tagged with:
-
Hi everyone, I have an issue with texture compression on iOS device : here is the problem : on my PC : on my iPad : the material : { "customType" : "BABYLON.PBRMaterial", "directIntensity" : 1, "emissiveIntensity" : 1, "environmentIntensity" : 0.9, "specularIntensity" : 1, "cameraExposure" : 1, "cameraContrast" : 2, "microSurface" : 0.5, "overloadedShadowIntensity" : 1, "overloadedShadeIntensity" : 1, "overloadedAmbientIntensity" : 0, "overloadedAlbedoIntensity" : 0, "overloadedReflectivityIntensity" : 0, "overloadedEmissiveIntensity" : 0, "overloadedAmbient" : [ 0, 0, 0 ], "overloadedAlbedo" : [ 0, 0, 0 ], "overloadedReflectivity" : [ 0, 0, 0 ], "overloadedEmissive" : [ 0, 0, 0 ], "overloadedReflection" : [ 0, 0, 0 ], "overloadedMicroSurface" : 0, "overloadedMicroSurfaceIntensity" : 0, "overloadedReflectionIntensity" : 0, "albedoTexture" : null, "ambientTexture" : null, "opacityTexture" : null, "reflectionTexture" : null, "emissiveTexture" : null, "reflectivityTexture" : null, "bumpTexture" : null, "lightmapTexture" : { "name" : "CleanedUp_BedroomLightmap-3_comp_light.png", "level" : 1, "hasAlpha" : false, "getAlphaFromRGB" : false, "coordinatesMode" : 0, "isCube" : false, "uOffset" : 0, "vOffset" : 0, "uScale" : 1.002394, "vScale" : 1.002394, "uAng" : 0, "vAng" : 0, "wAng" : 0, "wrapU" : 1, "wrapV" : 1, "coordinatesIndex" : 1, "isRenderTarget" : false, "renderTargetSize" : 0, "mirrorPlane" : null, "renderList" : null, "animations" : null, "extensions" : null }, "useLightmapAsShadowmap" : true, "refractionTexture" : null, "ambient" : [ 1, 1, 1 ], "albedo" : [ 1, 1, 1, 1 ], "reflectivity" : [ 0, 0, 0 ], "reflection" : [ 0, 0, 0 ], "emissive" : [ 0, 0, 0, 1 ], "roughness" : 1, "useRoughnessFromMetallicTextureAlpha" : false, "useRoughnessFromMetallicTextureGreen" : false, "useAlphaFromAlbedoTexture" : false, "useEmissiveAsIllumination" : true, "useMicroSurfaceFromReflectivityMapAlpha" : false, "useSpecularOverAlpha" : true, "useRadianceOverAlpha" : true, "indexOfRefraction" : 0, "invertRefractionY" : false, "emissiveFresnelParameters" : null, "opacityFresnelParameters" : null, "disableLighting" : false, "name" : "MUR", "id" : "39e75ac7-f7b5-4d06-98a0-50fb26b52378", "backFaceCulling" : true, "wireframe" : false, "alpha" : 1, "alphaMode" : 2 } the lightmap texture : I tried to compress with pvr format, to merge lightmaps with a white layer and use it as png, or jpg, and in albedo channel but nothing worked, any advices?
- 5 replies
-
- png
- compression
-
(and 1 more)
Tagged with:
-
Following my previous post now I'm trying to use compressed textures to see if that will improve the performance on ipad 2 / mini gen 1. We are using texture packer to create the textures? What are the recommended pixel format settings? I tried a few that look very bad. How can I load an atlas with the texture? The current method doesn't seem to allow loading an atlas and several textures: https://photonstorm.github.io/phaser-ce/Phaser.Loader.html#texture Thanks for the help!
-
- textures
- compression
-
(and 2 more)
Tagged with:
-
"The Chrome Media team has created Draco, an open source compression library to improve the storage and transmission of 3D graphics. Draco can be used to compress meshes and point-cloud data. It also supports compressing points, connectivity information, texture coordinates, color information, normals and any other generic attributes associated with geometry." Full article here https://opensource.googleblog.com/2017/01/introducing-draco-compression-for-3d.html
-
https://www.khronos.org/news/press/khronos-finalizes-gltf-1.0-specification A great announcement, and a couple of our local heroes getting quoted! YAY! Good stuff!
-
I have a .babylon file that's 1.171MB. If I gzip it its only 259KB. I'm wondering if there's a way to work with a gzipped .babylon file. Apparently javascript can unzip files but they remain in memory and can't be saved to disk. Is there another way to work with a compressed file?