Memory load of PBR Physical Surface textures
adosity last edited by
Greetings Poser users,
One of the tools I use to make or alter Poser content is Substance Painter. This 3D texturing program can export textures for use in Poser's Physical Surface Root Node; Base color, Roughness, Metallic, Normal, Height.
One of that things that's been puzzling me is the seemingly disproportional memory load this introduces. This morning I loaded up Victoria 4 with a bunch of clothing items and proceeded to add the textures exported from Substance Painter. These textures, 30 in all, are a combined 3,89 MB in size.
Yet when I compare my 'blank slate' render of Victoria 4 and the Clothing (with default material settings) I see a jump in Memory Load from 316 MB to 765 MB. In previous scenes, I had noticed that removing numerous Metallics textures when these were entirely white or entirely black - and replacing them with a simple 1.0 or 0.0 value in the Physical Surface Root Node - dropped the Memory Load by hundreds of MBs.
I'm curious if someone might be able to give me some pointers to help better understand how this works. Why is adding 4 MB of textures increasing the memory load by almost a hundred times that amount? Is this inevitable with this type of texture-based PBR rendering, is it a peculiar characteristic of Superfly? I'd be interested to learn more.
As far as I remember, internally Poser converts all textures into 32 bit tiled mipmapped EXR's - I believe this was the case for Firefly, so it is probably true for Superfly too. Therefore I don't think this has anything particularly to do with PBR texturing or Substance - the file type & size isn't relevant when Poser unpacks the file to use the data for rendering.
In addition, Firefly is able to load/unload textures from memory on a per bucket basis. Superfly has to keep everything in memory until the render completes. This is of course if I remember correctly; what the impact of this on memory load is in practical terms I don't know.
Someone please correct me if I'm wrong ;)
shvrdavid last edited by
Memory load of textures is based on dimensions.
It can be compounded by mip map settings, ie more memory is used if mip mapping is turned on.
For example: (in general)
A 4k high res texture for a figure might not take up much space on disk if it is compressed. JPG, etc.
Once loaded, the render engine has to be able to look at each individual pixel of the image, IE, not compressed.
So a single 4k image that may be a few meg saved to disk, suddenly isn't a few meg anymore....
4096 x 4096 is 16,777,216 pixels
A 32 bit image (8 bit per channel), is 16,777,216 (pixels) x 4 (channels RGBA), then /1024/1024
Which is 64 megabytes, just for the texture matrix.
That's 64 meg, with no mip mapping, for one texture.....
Add all the textures up for V4 times 4 for PBR...
Yeah, it adds up really fast....
ghostship last edited by
I have had to become a bit more efficient with use of maps in Poser. Because the cards I use are low in ram (4mb each) I reuse textures for multiple figures. I re-use hair textures for multiple hair models and use procedural shaders to use less texture maps (although at some point those take up some memory as well)
adosity last edited by
Thanks for the information on the processes that happen behind the scenes, if you will. That's interesting!
Also thanks for the suggestions on how to reduce the memory load in larger scenes, should it become an issue.
@adosity This is indeed a big issue. There are not much solutions except Ghostship suggest.
Just finished a product for the CP and use Substance painter. 100 textures created in a short time. Removing obsolete parts and reuse some of the can reduce a bit.