Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: ladybug77 on 2024-06-10, 04:42:50

Title: Heaviest textures during rendering: RAM running low (SOLVED)
Post by: ladybug77 on 2024-06-10, 04:42:50
Hi, I always get RAM issue when rendering once I start on high res (above 4k) and I usually ignore it because so far it's been fine, scenes get rendered at the end, although sometimes I do have to restart my PC to be able to jump the GI calculating phase.. and that is my go to resolution.

This 'heaviest textures' under RAM issue has been bothering me, I'm not sure why the notification always shows multiplied/ incorrect size of bitmaps , for example this- wall01_diff here, it goes up to almost 10 times its original size, and I'm not sure why.

Does anyone have explanation for this..?  it becomes such a pain when I have a lot of vegetation items with multi sub materials.. on one scene my processors refuse to work because of these ' large textures '- I have optimized the scene and it's only less than 200mb in size..

Title: Re: Heaviest textures during rendering: RAM running low
Post by: Tom on 2024-06-10, 07:09:07
Hi,

I'm happy to help you if I can. First can you tell me what to do in order to have this "heaviest textures are" dialog box?
I've never seen it before.
Title: Re: Heaviest textures during rendering: RAM running low
Post by: ladybug77 on 2024-06-10, 07:30:11
Hi Tom,

Thanks for your reply, really appreciate it,,

I usually just ignore the log , but this time I really need to find out why things are behaving like they are.. so the RAM issue log says it saved the stats under
C:\Users\'yourusername'\AppData\Local\CoronaRenderer - textureStats.

It shows all of the textures I have on my scene, however the stats show multiplied size of bitmaps? They are 5-10 larger than the original size that I have in my library. I use an  HDRI in my scene, the original size is 167mb and it becomes 682 mb in the log, I was hoping to reduce some maps but after seeing this I'm not sure how am I supposed to reduce them , since they are all showing different numbers than what they actually are.
Title: Re: Heaviest textures during rendering: RAM running low
Post by: Tom on 2024-06-10, 08:22:45
Thanks.
I don't have such a file in C:\Users\'MyUserName'\AppData\Local\CoronaRenderer unfortunately:

Title: Re: Heaviest textures during rendering: RAM running low
Post by: pokoy on 2024-06-10, 08:54:40
PNG, JPEG, EXR and TIF all use compression to some degree, plus, HDR formats use more bits per channel than LDR formats.
For rendering, image data will be uncompressed hence a higher RAM consumption.
Title: Re: Heaviest textures during rendering: RAM running low
Post by: ladybug77 on 2024-06-10, 09:17:25
I see, thanks for the explanation, so other than adding more ram, will it help if I manually resave each bitmap to maybe 50-70% of its original size ? or is there a more effective way to optimize scenes?

Thank you!
Title: Re: Heaviest textures during rendering: RAM running low
Post by: romullus on 2024-06-10, 10:32:35
Very effective way to reduce textures RAM consumption without sacrificing their quality is to make sure that they are saved with optimal parameters, e.g. monochrome data textures are saved as greyscale, all textures that not needs higher bit depth are saved as 8 bit and so on. The downside of this is that it's very labour intensive method to go after all your textures, unless there are some automation tools that could do this task in batch. On the plus side, you only need to do this once and all your future scenes will benefit from lower RAM usage.

Reducing resolution is effective and easy to do on mass, but of course it potentially may reduce quality of your renders.

Also make sure, that out of core textures feature is enabled, as it's designed to help in low RAM situations. You need to convert all your maps to Corona bitmap for it to work though.

Thanks.
I don't have such a file in C:\Users\'MyUserName'\AppData\Local\CoronaRenderer unfortunately:

Do a quick render of any scene with textures and then go to render setup>performance>dev/experimental stuff press show memory report button and then textureStats.csv file should be created automatically.
Title: Re: Heaviest textures during rendering: RAM running low
Post by: ladybug77 on 2024-06-10, 16:08:32
Thanks for amazing tips!  I probably will try reducing the textures on my greens as they are probably not that visible, and keep textures on buildings..

Your answer also has answered my other question in mind , whether there's any optimization script that could batch minimizing them without creating autosave/ double save on local library , but that's too good to be true! 


Title: Re: Heaviest textures during rendering: RAM running low
Post by: romullus on 2024-06-10, 16:56:12
Your answer also has answered my other question in mind , whether there's any optimization script that could batch minimizing them without creating autosave/ double save on local library , but that's too good to be true!

There are such scripts/tools out there. There was several discussions about them on the forum, but since that's not something that has any interest to me i can't point you to exact place where to find them. You can try to do some forum searching, or hope that somebody who has more info, will notice this topic and guide you to the right direction.
Title: Re: Heaviest textures during rendering: RAM running low
Post by: James Vella on 2024-06-10, 17:36:34
Thanks for amazing tips!  I probably will try reducing the textures on my greens as they are probably not that visible, and keep textures on buildings..

Your answer also has answered my other question in mind , whether there's any optimization script that could batch minimizing them without creating autosave/ double save on local library , but that's too good to be true!

Pixamoon has a good one for resizing bitmaps, you can also just save them to a different directory or just add a suffix etc.

https://pixamoon.gumroad.com/l/library-track-relink?layout=profile
Title: Re: Heaviest textures during rendering: RAM running low
Post by: Tom on 2024-06-11, 04:05:06
Do a quick render of any scene with textures and then go to render setup>performance>dev/experimental stuff press show memory report button and then textureStats.csv file should be created automatically.

Thanks
Title: Re: Heaviest textures during rendering: RAM running low
Post by: Tom on 2024-06-11, 04:06:44
Another good option for mass renaming/converting maps is Kstudio Project Manager plugin: https://3d-kstudio.com/product/project-manager/

IrfanView is a free tool capable of batch resizing/converting textures as well.
Title: Re: Heaviest textures during rendering: RAM running low
Post by: ladybug77 on 2024-06-11, 04:10:28
ohh thankss! will have a look at this !
Title: Re: Heaviest textures during rendering: RAM running low
Post by: ladybug77 on 2024-06-11, 04:12:15
Thanks for all of the helps guys ! really appreciate it!
Title: Re: Heaviest textures during rendering: RAM running low (SOLVED)
Post by: Tom on 2024-06-11, 04:28:34
No worries.

To my experience I find Project Manager not super easy to deal with at first sight, but it's really powerful when you've put your hands on and know how it works. I couldn't do without it now as it does several other amazing things.

Go for IrfanView if you just want to mass resize/convert textures. It's simple and free. And remember to create some backups first as things can go wrong sometimes ;)