Jump to content

Crunch compression and Pixi


colourclash
 Share

Recommended Posts

@ivan.popelyshev
 

pix.texture  manually  control basetextures when update or delete with dds?

 

and this is different issue

normally dxt compression file is big than png or jpg  so it need to compress by zip or something 

if not, loading time is more delayed.. this is so critical  

light game  is maybe no problems and it will not be needing texture compression ...

 

but if game is heavy .. hmm  if use compressed texture like dxt , it have to consider one more compression like 'zip' to reduce loading time..

 

ToT....  ..Complexing


 

 

 

 

Link to comment
Share on other sites

Quote

2. You can configure gzip on your web-server, so it will cache gzipped dds files , both nginx and lighttpd can do that

oh. really?

does it automatically create gzipped dds on web-server and gzipped dds transferred between client and server?   

Link to comment
Share on other sites

Yeah, you need PVR for iOS: https://community.imgtec.com/developers/powervr/tools/pvrtextool/

If you want to use pre-gzipped file with nginx: http://nginx.org/en/docs/http/ngx_http_gzip_static_module.html ,

but you can also enable dynamic gzipping : http://nginx.org/ru/docs/http/ngx_http_gzip_module.html

dont forget to add "image/dds" to mime-types.conf 

 

Link to comment
Share on other sites

12 hours ago, GBear said:

is there using only dxt1 format with webgl?

or etc1.. on android?

ios look like to be using PVRTC..

Let http://webglstats.com/ be you guide perhaps?

 

 

On 10/02/2016 at 8:49 PM, ivan.popelyshev said:

dont forget to add "image/dds" to mime-types.conf 

also as per https://msdn.microsoft.com/en-us/library/windows/desktop/dn424129(v=vs.85).aspx I believe the "correct" mimetype name to be "image/vnd-ms.dds" for dds texture files ;)

Link to comment
Share on other sites

  • 3 weeks later...

hi. 

if i use etc1 i will be need mask image.. 

and this case drawcall is up... because pixi.js is called flush()  if sprite has mask

hmm..

 

png and etc1  which format is good to reduce memory?

 

Link to comment
Share on other sites

@ivan.popelyshev hi ivan ^^/

let's work together .. ^^...

 

and this is different issue

can i get texture by r, g, b channel on same basetexture of png?

 

becuase i will use bitmapfont and i wanna add many language like korean, japanese, chinese.,english.. russian...

english, russian...is no problems because that has litte words..

but korean, japaness, chines is not... 

so i will add all words on separated channel 

 

 

 

Link to comment
Share on other sites

@ivan.popelyshev hi ivan.. 

i'm using loader.. but a little different using.

my atlas is zipped because reducing capacity. 

so zipped atlas loaded first   and read atlas manually, and load basetexture

Quote

Effect_AnimLoader.prototype.createAtlas = function(atlas_src) {
   var spine = PIXI.spine.SpineRuntime;

   var base_path  = this.data_path ;
   if(__isMobile){
      var atlas = new PIXI.spine.SpineRuntime.Atlas(atlas_src, 'data/packed', null, 0.5);
   }else {
      //var atlas    = new spine.Atlas(atlas_src, base_path, null, null, 'effect.dds');
      var atlas  = new spine.Atlas(atlas_src, base_path, null, null);
   }


   // create base textures
   for (var i in atlas.pages) {
      var page = atlas.pages;
      atlas.updateUVs(page);
      var baseTexture = page.rendererObject;
      //baseTexture.mipmap = false;
      if (baseTexture.hasLoaded) {
         __main.renderer.updateTexture(baseTexture);
      } else {
         baseTexture.once('error', function () {
            console.log('error');
         }, baseTexture);
         baseTexture.once('update', function () {
            __main.renderer.updateTexture(this);
         }, baseTexture);
      }
   }
   var regions = atlas.regions;
   for (var i in regions) {
      var region = regions;

      var texture = createTextureByRegion(region);

      //var texture_name = 'data/image/' + region.name + '.png';
      var texture_name = region.name;
      PIXI.Texture.addTextureToCache(texture, texture_name);
   }


   return atlas;
};

hmm.. --? 

where can i change?


and second question

how do you think about under issue

  1. which format is good between png(8bit by tinyPNG) and etc1+mask
       - png is very very small but i don't know how bad than compressed textures on gpu about performance or memory
         compressed textures is bigger than png so download time is long.. this is big issue..
         so i'm wondering about which format is good...  

        I need two thing T-T (performance and download time) 

                    
        do you know how much frame is up by texturecompressing by tested spine?

 


     

           
  
     

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...