Jump to content

Memory consumption difference between 1.11 and 1.12-beta


Kilombo
 Share

Recommended Posts

- 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

Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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  :D , 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 :)

Link to comment
Share on other sites

  • 4 weeks later...

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 :ph34r:

Link to comment
Share on other sites

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

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...