dbawel Posted August 24, 2015 Share Posted August 24, 2015 Hello to all the rouges out there, I have a scene with a GUI (interface) that uses 28 textures on babylon plane objects. I'm using bGUI for the interface, however, this appears to have nothing to do with bGUI as I've observed this behavior in previous scenes without any interface or GUI. The problem is that once I reached approximately 10+ textures (in this case), I began to notice that about 10 percent of the time any one of the textures (chosen at random) weren't loading, and the scene was displaying black on the plane mesh - appearing as though the texture didn't load into memory. I had to refresh (sometimes more than once) to load all textures. This only occurs for a single texture everytime it occurs, and my largest texture resolution is 300px X 300px. I am using a dynamic texture and painting on an object through the canvas - if this provides any additional useful information. However, in increasing the number of textures, this problem increased slightly - until I reached 28 textures, when the problem wouldn't resolve even with repeated refresh. It is always one texture, and no more. I also removed a texture and it's associated code, and the problem persists every time. I've tried adding texture.update(); and textureComplete = true; but perhaps I'm not using these correctly or in the best location in my script. I welcome any suggestions, and thank everyone in advance for reading this post. Cheers, DB Quote Link to comment Share on other sites More sharing options...
dbawel Posted August 24, 2015 Author Share Posted August 24, 2015 OK, I don't have any REAL answer, however, I did find that the problem is with the very last texture I load in my script. This is not always the texture which doesn't load and of couse displays black - but it is the very last texture I load in sequence in my script which doesn't load 99% of the time when this problem arrises. My current solution? I added a small texture which I don't require at all for my scene to load as the last texture in my script and into memory. Now all my textures load 100% of the time - except for the last one in my script which I don't need and am using as a dummy fix until I or someone else finds the problem. Crazy, huh? EDIT: actually, it still doesn't load 100% of the time, but perhaps 98% of the time now. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted August 28, 2015 Share Posted August 28, 2015 Hi DB! I built a playground to try to see the issue that you see. I was successful at building the playground, but I failed to reproduce the symptom. http://playground.babylonjs.com/#18ORWK Quote I am using a dynamic texture and painting on an object through the canvas - if this provides any additional useful information. Well, yes it does. That might be where the problem is. Can you adjust my playground to "simulate" that? All in all, do anything to that playground scene (and re-save many times if wanted)... that you can think-up... to try to "repro". Maybe we load the textures into dynamicTexture 2d buffer and THEN use each dynamic texture as the mat.diffuseTexture? How can we make this playground... simulate YOUR situation? Can we? I'll give it more thought, but, according to current trends, when I think about things, they get worse. Out of curiosity, what version of BJS are you using? Any other pertinent info that you might have... do tell. thx. DB... did you mean rogue? I'm no rouge. (last I tested). I think the French invented "rouge", so there's lots of experts nearby. And one can only wonder what the slang of that word... means in France. Milktoast? hah! I like it, though. I will accuse my chat buddy in Kentucky... of being "a rouge", and see how he reacts. I hope he understands which cheeks get the red coloring. :x [A wink to DK for the underscored 'r'. 'repo' is for git, 'repro' is for playgrounds, ya silly rouge.] hehe Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 28, 2015 Share Posted August 28, 2015 Rouge means "Red" in french Quote Link to comment Share on other sites More sharing options...
Dad72 Posted August 28, 2015 Share Posted August 28, 2015 In French we say, I am 'green'.like Hulk when he is all green Quote Link to comment Share on other sites More sharing options...
Wingnut Posted August 31, 2015 Share Posted August 31, 2015 Hope we didn't ruin the thread, DB. Any progress? I'm a huge fan of French toast... but it's still a bit of a hassle to make it, quickly. I bought a used French toaster on Ebay... but I didn't get the machine that I had hoped-for. Is French toast called French toast... in France? Same situation with French fries. I suppose there is French French toast and French French fries, eh? weird. "I'll have some French American fries, and some American French fries, please." Dad72 1 Quote Link to comment Share on other sites More sharing options...
dbawel Posted September 1, 2015 Author Share Posted September 1, 2015 I meant to type rogue, but rouge works as well - specifically baton rouge, which means "red stick." Actually, I'm not sure what I meant to say with this at all. I just thought I'd avoid saying the standard "Hey Guys", or "Hi", or "Hello Babylonians", etc. I'll have to come up with something better for future posts. Anyway, I haven't been able to reproduce this in the playground either, so perhaps it's due to the extensions I'm using, the dynamic textures, or any of the various functions I've built for my app. I'll continue to try and find scenes where this happens, and as soon as I find a second one, then I should have more info as to why the last texture in my script won't load. But for now, with the "dummy" texture listed as the last to load in the script, all other textures load correctly. Hell, it could even be a timing issue with our server. Hopefully, it isn't a bug, but we'll only know as time passes and more apps are built. And I'm going to continue to add fetures to this app, so perhaps this might become more of an issue as I add more functions. I'll certainly let the forum know if I see anything further. But for now, I'm happy to have a solution - even if it isn't the most elegant, or even really a solution, but more of a "trick." And Wingnut, humor is always welcome. Cheers, DB GameMonetize and Wingnut 2 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.