royibernthal Posted September 8, 2016 Author Share Posted September 8, 2016 Thanks. If I understand correctly - the texture's raw data isn't cached in bjs internal caching system, is that correct? If so, would adding a cacheRaw: boolean flag to AssetsManager/addTextureTask() be possible for you? On the short run I can of course do what you suggested, but it'd be nice to see a cleaner solution implemented into bjs core. Quote Link to comment Share on other sites More sharing options...
royibernthal Posted September 11, 2016 Author Share Posted September 11, 2016 @Deltakosh Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 13, 2016 Share Posted September 13, 2016 No need to ping me First I don't check my notifications and second, I'm here almost all days So: - Yep raw data is not stored CPU side because it is only used by GPU - Saving raw data CPU side will cost a lot of memory for a not obvious advantage Quote Link to comment Share on other sites More sharing options...
royibernthal Posted September 13, 2016 Author Share Posted September 13, 2016 Sorry about that, I'll stop pinging you So assuming I got you right - the raw data of textures related to CubeTexture is only uploaded to the GPU, and it's done only once a CubeTexture object is created with those textures for the first time. Why not have an option to mark in assets manager textures with cacheRaw: boolean, that when set to true - will upload them to the GPU once they are loaded. No need to store on CPU side. It'd do the exact same job as when creating a new CubeTexture instance, just without the delay and image reload. Of course like I said, the user will be able to manually select which texture's raw data will be uploaded to the GPU once it's loaded (cacheRaw: boolean will default to false). It's possibly a minor tweak that's not worth the work from your point of view, but assuming that's not the case, what I wrote above would be more efficient in my opinion, unless I'm misunderstanding something (which is highly possible). Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 14, 2016 Share Posted September 14, 2016 I don't disagree If you want to PR this, I'll merge it with pleasure Quote Link to comment Share on other sites More sharing options...
royibernthal Posted September 14, 2016 Author Share Posted September 14, 2016 Great What does PR mean? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 14, 2016 Share Posted September 14, 2016 Pull request. The way you merge code in the Github repo Quote Link to comment Share on other sites More sharing options...
royibernthal Posted September 15, 2016 Author Share Posted September 15, 2016 Oh I see, I'm not familiar at all with the core of bjs and I have zero time to start learning it now (although I do plan on learning it eventually). Would you consider doing it? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 16, 2016 Share Posted September 16, 2016 Not immediately as I have TONS of other things on my plate But as soon as possible I will Quote Link to comment Share on other sites More sharing options...
royibernthal Posted September 16, 2016 Author Share Posted September 16, 2016 Understandable. Thank you, looking forward to it Quote Link to comment Share on other sites More sharing options...
royibernthal Posted October 21, 2016 Author Share Posted October 21, 2016 Hey, any idea if you'll be able to do it anytime this month or will it take a while more? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 21, 2016 Share Posted October 21, 2016 A while more as I have more important work to do ;( Quote Link to comment Share on other sites More sharing options...
royibernthal Posted October 21, 2016 Author Share Posted October 21, 2016 Any idea when roughly? a month? 2 months? half a year? Quote Link to comment Share on other sites More sharing options...
Nabroski Posted October 21, 2016 Share Posted October 21, 2016 Hello I kind you scroll down the topic, without reading every comment I load a tons of textures in an array, and then request them from cache, when needed Herehttps://github.com/tolkanabroski/babylonjs-tutorials/tree/master/loadingstills I use Babylon 2.0 but i works everywhere. Foolproof concept . Quote Link to comment Share on other sites More sharing options...
royibernthal Posted October 21, 2016 Author Share Posted October 21, 2016 Hey Nabroski, thanks for the reply, but... I don't think this is relevant. Nabroski 1 Quote Link to comment Share on other sites More sharing options...
Nabroski Posted October 21, 2016 Share Posted October 21, 2016 On 31.8.2016 at 11:00 PM, royibernthal said: It looks related but for some reason my problem persists. Would you be able to take a closer look at this isolated project I made for you? https://www.dropbox.com/s/fqecy3ovbujjpn5/Babylon Loading Texture Test.zip?dl=1 Hello Maybe i can help i downloaded your file, and it looks great, what is the issue ? Quote Link to comment Share on other sites More sharing options...
royibernthal Posted October 22, 2016 Author Share Posted October 22, 2016 The issue is something Deltakosh needs to change in the bjs source, nothing you can help with Thanks though I appreciate the will to help Nabroski 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted October 22, 2016 Share Posted October 22, 2016 If you don't mind me butting-in, does this apply? http://www.nullterminator.net/gltexture.html Bet so. (RAW texture loader) That stuff looks HARD! Scary. Looks like "engine" code. (Wingy's dog runs under the fridge and starts whining.) heh Quote Link to comment Share on other sites More sharing options...
royibernthal Posted October 22, 2016 Author Share Posted October 22, 2016 I don't think so, unless I'm missing something. This previous reply of mine should help you understand the issue: On 9/14/2016 at 0:20 AM, royibernthal said: the raw data of textures related to CubeTexture is only uploaded to the GPU, and it's done only once a CubeTexture object is created with those textures for the first time. Why not have an option to mark in assets manager textures with cacheRaw: boolean, that when set to true - will upload them to the GPU once they are loaded. No need to store on CPU side. It'd do the exact same job as when creating a new CubeTexture instance, just without the delay and image reload. Of course like I said, the user will be able to manually select which texture's raw data will be uploaded to the GPU once it's loaded (cacheRaw: boolean will default to false). Quote Link to comment Share on other sites More sharing options...
Wingnut Posted October 22, 2016 Share Posted October 22, 2016 ooooookay, I stand erected... errr... corrected. Quote Link to comment Share on other sites More sharing options...
royibernthal Posted October 22, 2016 Author Share Posted October 22, 2016 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 24, 2016 Share Posted October 24, 2016 I don;t know. I'm swamped with tons of things to do. And to be honest so far I do not see a huge demand for this feature (furthermore the browser itself already provides a first cache) Quote Link to comment Share on other sites More sharing options...
royibernthal Posted October 31, 2016 Author Share Posted October 31, 2016 I don't think there's ever going to be a huge demand for this future. It's just one little thing that could improve bjs, it should be noticeable to anyone preloading a game that has a sky dome or utilizes cube textures in any other way. What do you mean by first cache? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 31, 2016 Share Posted October 31, 2016 The browser itself will cache the data so if you try to load the textures twice they will be served from the local browser cache Quote Link to comment Share on other sites More sharing options...
royibernthal Posted October 31, 2016 Author Share Posted October 31, 2016 Yes, but the first load will always be problematic. 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.