Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: digitalomega on 2024-03-28, 01:10:04

Title: Max scripting to automate rendering
Post by: digitalomega on 2024-03-28, 01:10:04
Hello All!

I am making a script to render and save an image automatically, but I have a couple problems:
When using this  CoronaRenderer.CoronaFp.dumpVfb "D:/yourfilename.cxr" or using CoronaRenderer.CoronaFp.saveAllElements"D:/yourfilename.cxr"
I can only save as .cxr, if I try to save as .jpg I only get a 64px black bitmap.
Is there a workaround for this?

Also, when I am using the render() function inside maxscript this is resetting all the render settings of corona and the vfb, is this normal behaviour? or how can it be avoided.

Thank you in advance and happy rendering!




Title: Re: Max scripting to automate rendering
Post by: Frood on 2024-03-28, 12:52:30
Hi,

see Maxscript help (https://help.autodesk.com/view/MAXDEV/2023/ENU/?guid=GUID-9175301C-13E6-488B-ABA6-D27CD804B205): Use "max quick render" if you want the same result as pressing the render button or "render()" with all required parameters if you need more control, for example "render outputfile:@"C:\temp\test.jpg" vfb:false".

I would not use the interface functions of Corona until you really need it for something special (post processing on/off for example or "live dumps" during rendering), they also may change in v12.


Good Luck



Title: Re: Max scripting to automate rendering
Post by: maru on 2024-03-28, 16:00:49
Not sure if that helps in your case, but you can use the 3ds Max Rendering > Batch render option to render in a batch from various cameras or with different settings. You can also export your batch rendering to .bat from there.