Dad72 Posted June 4, 2014 Share Posted June 4, 2014 - I do not know why, maybe it's my browser, but I find that my browser often crashes when I open my scene and it's random. This may be due to alteration of engine, but it may also be a coincidence. but before I did not have all its crashes of browser. - I also noticed that my skybox textures are sometimes mixed, it is very random. - And when I use this: ground.optimize(32);my FPS are down, if I take it off, I'm a 60 fps against 55 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 4, 2014 Share Posted June 4, 2014 ground.optimize was removed in the latest version Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 4, 2014 Share Posted June 4, 2014 ah. because it is always in the wiki. I wanted to try. https://github.com/BabylonJS/Babylon.js/wiki/Optimizing-performances-with-octrees and for the skybox that mixes textures of time has other, you have an idea of what could be the cause? It is very random it are well place the most pars of the time, but once out of five it are mix. For the crash, I will reboot my pc and see if it changes something. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 4, 2014 Share Posted June 4, 2014 I fixed the wiki Quote Link to comment Share on other sites More sharing options...
Kilombo Posted June 5, 2014 Author Share Posted June 5, 2014 I think I added mipmaps support to cubetexture. that's could be the problem. Could you try to create the cubetexture without mipmap? (latest parameter of the constructor)I checked out the constructor. But by default the cubetexture receives what I put in the constructor in the "noMipmap" variable, well the thing is. I don't use the last two parameters on the signature (function CubeTexture(rootUrl, scene, extensions, noMipmap)), I only use rootUrl and scene, the other two that I'm not putting anything what will it assume? Null ? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted June 5, 2014 Share Posted June 5, 2014 Kilo... take a look at... https://github.com/BabylonJS/Babylon.js/blob/master/Babylon/Materials/textures/babylon.cubeTexture.js Look at lines 22-24. 22: if (!extensions) {23: extensions = ["_px.jpg", "_py.jpg", "_pz.jpg", "_nx.jpg", "_ny.jpg", "_nz.jpg"];24: } Line 22 does a boolean test for extensions... so you could put an array of extension strings in that third parameter, if wanted. Or... false or 0... if you want to use the default extensions to the file names. Now lets look at the fourth parameter.... noMipmap. See line 30? 30: this._texture = scene.getEngine().createCubeTexture(rootUrl, scene, extensions, noMipmap); The fourth parameter... 'noMipmap' is used in that call to an engine function. Lets go look at that function... https://github.com/BabylonJS/Babylon.js/blob/master/Babylon/babylon.engine.js Line 1056 is where the function is, but look at lines 1086 - 1088 1086: if (!noMipmap) {1087: gl.generateMipmap(gl.TEXTURE_CUBE_MAP);1088: } A boolean test is done on that parameter, too. I didn't answers any questions about including them or not, but now you can see what happens to those values. It is quite possible that the last two parameters ARE optional. So, you see, I didn't help you at all. I just talked. hehe. Deltakosh will probably have some words about it. Hope you're well. Kilombo 1 Quote Link to comment Share on other sites More sharing options...
Kilombo Posted June 5, 2014 Author Share Posted June 5, 2014 Kilo... take a look at... https://github.com/BabylonJS/Babylon.js/blob/master/Babylon/Materials/textures/babylon.cubeTexture.js Look at lines 22-24. 22: if (!extensions) {23: extensions = ["_px.jpg", "_py.jpg", "_pz.jpg", "_nx.jpg", "_ny.jpg", "_nz.jpg"];24: } Line 22 does a boolean test for extensions... so you could put an array of extension strings in that third parameter, if wanted. Or... false or 0... if you want to use the default extensions to the file names. Now lets look at the fourth parameter.... noMipmap. See line 30? 30: this._texture = scene.getEngine().createCubeTexture(rootUrl, scene, extensions, noMipmap); The fourth parameter... 'noMipmap' is used in that call to an engine function. Lets go look at that function... https://github.com/BabylonJS/Babylon.js/blob/master/Babylon/babylon.engine.js Line 1056 is where the function is, but look at lines 1086 - 1088 1086: if (!noMipmap) {1087: gl.generateMipmap(gl.TEXTURE_CUBE_MAP);1088: } A boolean test is done on that parameter, too. I didn't answers any questions about including them or not, but now you can see what happens to those values. It is quite possible that the last two parameters ARE optional. So, you see, I didn't help you at all. I just talked. hehe. Deltakosh will probably have some words about it. Hope you're well.Nope, wrong answer Wingnut , You did answer my question, because, in line 1086 says if (!noMipmap) do generateMipmap, and thats the point, if I don't use the parameter, noMipmap will be empty or Null, so... there will be noMipmap, and by that it will generate a Mipmap texture. Now... the real question, is.... What do I put there so that it doesn't generate mipmap textures ? So, you actually helped out Wingnut 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 5, 2014 Share Posted June 5, 2014 skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("Textures/Skyboxes/1_1/space", scene, null, true); BTW please use the latest beta, Gwenael found a problem with a merge we did recently that generate textures twice larger than expected Kilombo and gwenael 2 Quote Link to comment Share on other sites More sharing options...
Kilombo Posted June 7, 2014 Author Share Posted June 7, 2014 Thanks Delta. I can finally close this "never ending" topic. Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted June 30, 2014 Share Posted June 30, 2014 If I may... I found very confusing a parameter called "noMipmap", where you should pass "false" when you currently want automatic mipmaps generation (double negation is often hard to interpret). And it's quite impossible to know if "noMipmap" means "do not generate mipmap" or "there is no mipmap inside my texture" (in DDS we can embed own mipmaps) Since for now there is no complete doc with explanation of all parameters, this kind of param should be called more clearly, like for instance "generateMipmap". Sorry to bother with this kind of consideration Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 1, 2014 Share Posted July 1, 2014 this is a by default parameter for something that is on by default that's why I chose noMipMap as parameter name: this means do not generate mipmap. But "there is no mipmap inside my texture" could also work for DDS because if you set NoMipMap for a DDS, I will not load mipmaps even if there are mipmaps into the DDS Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted July 1, 2014 Share Posted July 1, 2014 Ok, I understand. 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.