godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.09k stars 21.18k forks source link

Mark built-in resources as embedded in the engine in the editor's Video RAM panel #64183

Open CristianoSimao opened 2 years ago

CristianoSimao commented 2 years ago

Godot version

3.5

System information

Linux Fedora 35 - CPU AMD Ryzen 3 2200 G - GLES2

Issue description

test2

I am testing and creating various simple projects to benchmark the Godot Engine. I created a blank project with only 1 node no script, no images, nothing. And testing this blank project I see a dark window... ok perfect. But in the Video Ram section I see various textures with diferent sizes consuming 1,77MB of RAM. What I can do to eliminate this textures? Where I can find them?

Even if you export the csv file the path is blank. If this section is to show the resources consuming RAM, some explanation about this various files need by show in the editor or documentation.

1,77MB for mobile development is a large value. This can not stay without information.

Steps to reproduce

1- Create a blank project. 2- Add a node 3- Press run button 4- See the Video Ram section in the editor

Minimal reproduction project

Test Blank.zip

Calinou commented 2 years ago

I believe these are embedded textures used for font rendering (default project font) and default project theme icons. This is why they don't have assigned paths – they're embedded within the export template binary.

I suggest displaying some string like (embedded in engine binary) instead of an empty path in this case. I don't think we can set a resource name for those built-in resources though. The alternative is to hide those built-in resources entirely (since they represent a very small portion of the total memory usage). However, this may hide engine bugs, so I'd prefer not.

1,77MB for mobile development is a large value. This can not stay without information.

No, it's not a large value, even for mobile development :slightly_smiling_face:

While mobile GPUs don't have dedicated memory (and have to rely on shared system memory), any mobile game out there uses far more than 2 MB of video RAM – even simple 2D games.

Even desktop games in the early 2000s typically required 32 MB of video memory to run correctly, if not more.

CristianoSimao commented 2 years ago

I need optmize my game to run in low hardware specs, I will try do my best to use RAM efficiently, and I need informations from where this textures are comming and why. About old hardware, yes they have more than 10MB of RAM, but the speed is slow, and for a game trying run with 60FPS then 1MB of data for every frame can make all the difference.

CristianoSimao commented 2 years ago

This is some type of bug. I deleted the environment file and created a new, then the large image 1024x512 disappeared. test3 Very good. But I think this need a revision in the code in the environment, because he can not consume memory if nothing is used.

Calinou commented 2 years ago

This is some type of bug. I deleted the environment file and created a new, then the large image 1024x512 disappeared.

This is not a bug – the 1024×512 image is the default ProceduralSkyMaterial. If you create a new Environment resource, there is no sky assigned. Therefore, no sky texture is procedurally created.

Generating the sky texture only if a Camera node is present could help improve startup times of 2D projects, but it can also suffer from visible glitching on the first rendered frames (due to the radiance map not being fully generated when the project starts).

CristianoSimao commented 2 years ago

But if I click in Mode "Keep" no Sky should be utilized, and if is not utilized he need disappear from RAM and resource file. And he only disappear if I delete the file.