Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Baby 3D Plugin for Construct 2

Make 3D games in Construct 2 powered by Babylon.js · By Pixel Rebirth

RAM & VRAM LOD unloading

A topic by rrg687hg created Mar 31, 2026 Views: 119 Replies: 3
Viewing posts 1 to 2

hi pixel rebirth. i would like to know, i create a lod system for textures. when i use the action "set mesh texture" for a mesh, does the old texture get unloaded from the pc memory?

Developer

There are actually quite a few issues with texture management I have to admit, so you are correct to question this.

While materials should already be disposed of properly in most circumstances, I was ignorant so far to the texture situation itself.

Improvements are planned for an upcoming update where materials automatically get rid of their textures. But this will unfortunately not address "Set mesh texture". 

Proper texture management in the future (before 1.0) will have the aim to dispose of any texture in memory that is not currently used by any object and also probably provide shared textures for non-instanced objects.

Speaking more generally I don't know if it's the best approach to load/dispose the texture every time for a supposed LOD change. What kind of objects/behaviors are you trying to apply a level of detail system to like this? And are you using large textures?

I don't know what textures are considered large, but I can send you the capx of the project if that makes it clearer what I mean. If you decide to view the project, I should mention that I have only applied this method to a container. https://uploadnow.io/f/GmrzbmD

Developer

In a scene like this or even a significantly bigger one it doesn't matter much if you switch to lower resolution texture manually.

Are you running into any issues like low performance or what's the reason for wanting to apply some kind of LOD system here?