GBear Posted December 8, 2015 Share Posted December 8, 2015 hi.. when i use spine, first time stopped for short time about 500ms.. it seems becuase of 'WebGLRenderer.prototype.updateTexture = function (texture)' my spine data' texture is big, it's 10 sheet textures with 2048*2048 so when i play first time.. always stopped .. how can i resolve this situation? thx Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 8, 2015 Share Posted December 8, 2015 Try enable mipmap for these texturesloader.add('testspine', 'test/myspine.json');loader.load(function(loader, resources) { var res = resources['testspine']; var spineData = res.spineData; var spineAtlas = res.spineAtlas; for (var i=0;i<spineAtlas.pages.length;i++) { spineAtlas.pages[i].rendererObject.mipmap = true; } var spine = new PIXI.spine.Spine(spineData); //...}); Quote Link to comment Share on other sites More sharing options...
Sharpleaf Posted December 8, 2015 Share Posted December 8, 2015 my spine data' texture is big, it's 10 sheet textures with 2048*2048 I gotta ask.... what in the WORLD are you making that is THAT huge?! Quote Link to comment Share on other sites More sharing options...
GBear Posted December 8, 2015 Author Share Posted December 8, 2015 hi.. ivan..i don't use default loader with spine in this case..because i wanna reduce capacity and loading time so all of spine is packed Textures loaded from atlas in loading time.. when i set mipmap i can see same situation.. it looke because of sprite..when PIXi.spine.Spine created, sprite created and then call updateTexture maybe.. ..hmm can i control this? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 8, 2015 Share Posted December 8, 2015 "when i use spine, first time stopped for short time about 500ms.." I dont understand you. Please give more details. Quote Link to comment Share on other sites More sharing options...
GBear Posted December 8, 2015 Author Share Posted December 8, 2015 hi ivan.. It's means not about spine... it will be spine with big atlas.. i'm using many spine data.. for examplefire01fire02lightning01lightning02 and they use one atlas data like thiseffect.atlaseffect1.pngeffect2.pngeffect3.pngeffect4.pngeffect5.pngeffect6.pngeffect7.pngeffect8.pngeffect9.pngeffect10.pngeffect11.pngeffect12.pngwhen i use effect at first screen looks stopped for 500ms or a little bit more..only first time.. first time stopped in WebGLRenderer.prototype.updateTexture = function (texture)'there stopped maybe..so i want to resolve this.. if don't understand. please tell me again.. i'll try to tell you with more information thx a lot . always.. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 8, 2015 Share Posted December 8, 2015 updateTexture uploads texture to videomemory. If you have 12 texture of 2048x2048 size, its 16MB per texture in videomemory, totally 196MB need to be uploaded. And all that 196MB exist in JS heap too, may be its GC issue. I dont think we can fix it now, but we're going to implement texture compression soon https://github.com/pixijs/pixi.js/issues/2200 , and I believe that it will solve the issue. Quote Link to comment Share on other sites More sharing options...
GBear Posted December 8, 2015 Author Share Posted December 8, 2015 that sounds great.. and can i call updateTexture when i want to call? normally always use that textures. so i wanna update when start.. thx.. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 8, 2015 Share Posted December 8, 2015 Yes, you can call renderer.updateTexture(effect1) after all textures will be loaded. Quote Link to comment Share on other sites More sharing options...
GBear Posted December 9, 2015 Author Share Posted December 9, 2015 .. i applied it and it's ok...thx a lot.. Quote Link to comment Share on other sites More sharing options...
xerver Posted December 9, 2015 Share Posted December 9, 2015 Uploading textures that large to the GPU takes time, a visible noticeable amount of time. No way around it. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 14, 2015 Share Posted December 14, 2015 Please consider using this thing for your project: https://github.com/pixijs/pixi-compressed-textures You have to put DDS-es near your png files, and use this version of pixi: https://github.com/ivanpopelyshev/examples/blob/master/_site/js/pixi.js I included rorated textures there too, but i didnt add Rope fix yet 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.