Hi,
as part of my GSoC, I like to add Cycles (memory) statistics to Blenders interface.
I will continue to refine this document this week, and give more information about what and how exactly the displayed information should look like, but I'd like to get feedback from the UI and Cycles Team about what the best place would be for such infos. Thanks!
What we have
- When running Blender with --debug-cycles, we get various information about the memory requirements. Here an excerpt of that:
I0816 22:33:13.158812 12180 device_cpu.cpp:158] Texture allocate: __tri_patch, 1,016 bytes. (1016) I0816 22:33:13.158818 12180 device_cpu.cpp:158] Texture allocate: __tri_patch_uv, 1,328 bytes. (1.30K) I0816 22:33:13.158833 12180 device_cpu.cpp:158] Texture allocate: __object_flag, 24 bytes. (24) I0816 22:33:13.185516 12176 device_cpu.cpp:158] Texture allocate: __tex_image_byte4_1024, 2,073,600 bytes. (1.98M) I0816 22:33:13.196496 12179 device_cpu.cpp:158] Texture allocate: __tex_image_byte4_1027, 1,536,000 bytes. (1.46M) I0816 22:33:13.196631 12177 device_cpu.cpp:158] Texture allocate: __tex_image_byte4_1025, 2,073,600 bytes. (1.98M)
While that is quite useful for developers, it's hidden from the user, and even if every user would have an open terminal all the time, it's still pretty technical.
- In case of a memory failure (not enough memory available e.g. on a GPU, we get an error message in the Info Header and the Image Editor, but these are pretty technical as well.
CUDA error: Out of memory in cuMemAlloc(&device_pointer, size)
What we need
We need a place inside of Blenders UI, that is easily accessible for users and that shows detailed statistics about memory usage and error messages. Now, the main question is where to put that.
We want to display several things there, e.g.
- Detailed infos about how much memory is used by different areas of the scene (Geometry, Attributes, Textures, BVH...) in a human readable format and nicely formatted.
- In case of memory failures, give suggestions about possible simplifications or allow conversion to e.g. half float format (in case of too large image textures), which might make the scene fit into memory at the cost of some precision loss etc.
Possible places for that
Properties Editor
It could be a "Statistics" panel inside the Render Tab, that contains all these infos.
Outliner
Have a new submode there, called Render Statistics. This could be used by other render engines as well (should be python accessible of course).
Info Editor, Main Area
We print operators and errors to the main area of the info editor atm (pull down the info header). This could be extended with a statistics view as well.
Alternatives
Generate a XML/HTML report instead of putting that info inside of Blenders UI. See comments below for details.