Page 1 of 1

Some Questions about Optimization ( SOLVED )

Posted: Thu Nov 10, 2005 12:45 am
by r3i
If i make a mesh invisible calling setVisible( false ), memory will free or not?

And if I've 2 object with the same textures, if I remove only one, i will lose the texture on the other?

Posted: Thu Nov 10, 2005 12:53 am
by genesisrage
1. i dont think it will free up any memory, because its still "there" just not visible (not positive though)

2. i dont see why it would, if you set the textures as a pointer, then removing the pointer itself would get rid of the texture

Posted: Thu Nov 10, 2005 1:00 am
by r3i
ok for the first: so is only a mode to display or not.
but for the 2 point, i would call driver->removeTexture( name );

Posted: Thu Nov 10, 2005 1:10 am
by genesisrage
1. it may free some graphic memory because its not rendering it, but the object itself is still loaded into memory whether its shown or not.
Removes a texture from the texture cache and deletes it, freeing lot of memory.
this is from the API Docs, but it does also state that any pointers to the texture may not work.

Posted: Thu Nov 10, 2005 1:17 am
by r3i
Thank you genesis!
I've a great problem: I0ve an huge model with many textures,
I'm triyg to spend the less memory I can

thank you for your explanation.
Now I'll try to use some effect inorder to make my texture smaller than now...some kind as maketexture planar

Posted: Thu Nov 10, 2005 1:24 am
by genesisrage
i havent tried with this engine but i know with others i have used you are able to have multiple objects that use the same mesh info. so if you model has 15 parts that are identicle it would only need to load it once into memory.

not for sure how to do that in this engine, but i would bet that it is possible.

Posted: Thu Nov 10, 2005 1:59 am
by r3i
Yeah: it's so.
But I've 35 textures of 2.Mb for once all different.
I'm triyng to remove some parts of the model that camera doesn't see for having more stability

Posted: Thu Nov 10, 2005 5:29 pm
by pfo
r3i: Did you try using the OCT Tree scene node? It will break a big mesh up into smaller nodes and render them selectively, it's faster at rendering larger meshes (like quake maps)

Good idea

Posted: Thu Nov 10, 2005 7:22 pm
by r3i
Done but the scene have many polys and huge textures.
Octtreee reduce my time of loading the scene but i spend many resources for drawing the model!