Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Corona Goodies - User Contributions => Topic started by: racoonart on 2014-02-28, 13:32:13

Title: Corona A6: Save all VFB channels
Post by: racoonart on 2014-02-28, 13:32:13
Since I hate saving each channel (Beauty + render elements) one by one I made a little script that does it all in one go. I know it will be implemented in the Framebuffer sooner or later but anyways. Each renderelement saved by hand is one too much :-D

How to use:
Just run the Script and a standard image file saving dialog will appear where you can choose a path + filename and adjust image format settings. Be aware though that all gamma settings (only possible up to max2013 anyways) will be ignored, these are handled by the Script.
Should be working with all file formats.
I've tested the script in 2012 and 2014. Since 2014+ is handling gamma automatically I've added a "legacy" mode for 2013 and below, please test it if all passes are correctly saved with different settings.
If you want to use the Script as a macroscript just remove the "--" of the first two lines.

Works with daily builds / A6 only (after 1st of March 2014)

changelog:
v0.03
- changed the file dialog to a standard bitmap save dialog where image format settings can be adjusted
v0.02
- Alpha issue has been fixed
- gamma issues in max versions prior 2014 have been fixed
Title: Re: Save all VFB channels
Post by: AdamHotovy on 2014-02-28, 13:38:48
haha. You cannot imagine how many times I was writing Ondrej to put that button into frame buffer and it was always shifted for later . Thanks for this great script!
ah.
Title: Re: Save all VFB channels
Post by: racoonart on 2014-02-28, 13:45:48
And I was annoying him all the time with my request for maxscript vfb methods so I could do it myself :D
Title: Re: Save all VFB channels
Post by: MPVIS on 2014-02-28, 13:57:10
Wow thanks DeadClown, that was one of the things I really missed in coronas VFB. Good job
Title: Re: Save all VFB channels
Post by: kahein on 2014-02-28, 14:48:26
great !!
thanks
Title: Re: Save all VFB channels
Post by: racoonart on 2014-02-28, 16:05:43
I just noticed that the alpha channel is not returned linearly with this maxscript method. I reported it and hopefully it's fixed soon :-/ So better not use it until a fixed build is out.
Title: Re: Save all VFB channels
Post by: racoonart on 2014-03-01, 13:23:49
Ok, Alpha issue is fixed in the daily builds starting today (1st of March, 2014). You will also have to re-download the latest script version.
I've also fixed a problem with max versions prior to 2014: Channels in non-linear image formats like png, tif etc were saved with gamma 1.0; I've added an automatic legacy mode which should handle that for all image formats except exr and hdr. Further tests would be appreciated ;)
Title: Re: Save all VFB channels
Post by: racoonart on 2014-03-01, 18:55:59
I have changed the file dialog to a standard bitmap save dialog where image format settings can be adjusted. Hopefully this was the last change on the script ;-)
Title: Re: Save all VFB channels
Post by: Caue Rodrigues on 2014-03-05, 20:51:43
thx a lot man!!
Title: Re: Save all VFB channels
Post by: Chakib on 2014-03-05, 22:43:59
Very useful i was waiting for a button to do this, thanks a lot Deadlown !
Title: Re: Save all VFB channels
Post by: Chakib on 2014-03-12, 02:04:35
I tried the v0.03 with Max 2014 ( autogamma ) and the gamma isn't correct after saving ( dark ), in Max 2013 it works ok since i can adjust it !

Same thing with v0.02 in Max 2014.

I'm using the  A6 RC1.
Title: Re: Save all VFB channels
Post by: racoonart on 2014-03-12, 10:16:16
Are you using it in a scene which was not made in max 2014? Some old scene from 2012 or 2013 maybe? I didn't test it but internally old scenes will still use the old "manual" gamma in- and output settings - for compatibility reasons. Could you make a test with a "fresh" scene?

In 2013 it shouldn't make any difference if you change anything in the gamma settings in the bitmap saving dialog (it's not wired ;) ). I'm doing it automatically via script in versions prior to max 2014.
Title: Re: Save all VFB channels
Post by: Chakib on 2014-03-12, 16:29:24
No bro it's all done in max 2014 ( my haagendazs project in wip section ), but i'll try a new other scene and let you know.
Title: Re: Save all VFB channels
Post by: Chakib on 2014-03-12, 17:52:36
Ok here is a fresh very simple teapot scene in max 2014 using the v0.03

Same issue.

Title: Re: Save all VFB channels
Post by: racoonart on 2014-03-12, 18:14:24
Very weird. Happens with all file formats or just a particular one? (jpg, exr, png)
Title: Re: Save all VFB channels
Post by: Chakib on 2014-03-12, 18:43:25
Very weird. Happens with all file formats or just a particular one? (jpg, exr, png)

Yes i tried them all same issue.
Title: Re: Save all VFB channels
Post by: lmikkelb on 2014-03-12, 19:29:04
You cant manually save the tiff files with gamma 2,2 ?
Title: Re: Save all VFB channels
Post by: Chakib on 2014-03-12, 19:52:02
You cant manually save the tiff files with gamma 2,2 ?

No you can't using this script in max 2014 it's disabled
Title: Re: Save all VFB channels
Post by: racoonart on 2014-03-12, 20:33:30
No you can't using this script in max 2014 it's disabled
Unfortunately it's autodesks decision, I don't have access to it in maxscript :(
Back to the original problem: I have no idea what could be the reason. You can upload your scene here and I'll check if there's something I can find but I doubt it. Anyone else having problems in 2014?
Title: Re: Save all VFB channels
Post by: Chakib on 2014-03-13, 00:50:43
No you can't using this script in max 2014 it's disabled
Unfortunately it's autodesks decision, I don't have access to it in maxscript :(
Back to the original problem: I have no idea what could be the reason. You can upload your scene here and I'll check if there's something I can find but I doubt it. Anyone else having problems in 2014?

here is the scene :
Title: Re: Save all VFB channels
Post by: racoonart on 2014-03-13, 01:25:31
Ok, found the issue, as I have written in a post earlier, you have a different output gamma than the default max2014. You can't access it without script so I guess you're using an old maxstart.max file where the old gamma setting is still in there.
Default Output gamma is 2.2 in max 2014. Yours was at 1.0

You can test it by typing this into your maxscript listener (the pink field in the bottom left corner)
Code: [Select]
fileOutGamma
Title: Re: Save all VFB channels
Post by: Chakib on 2014-03-13, 03:17:15
Ok, found the issue, as I have written in a post earlier, you have a different output gamma than the default max2014. You can't access it without script so I guess you're using an old maxstart.max file where the old gamma setting is still in there.
Default Output gamma is 2.2 in max 2014. Yours was at 1.0

You can test it by typing this into your maxscript listener (the pink field in the bottom left corner)
Code: [Select]
fileOutGamma

Yes you're right i did change now the gamma with that script : http://www.scriptspot.com/3ds-max/scripts/gamma-settings-for-3ds-maxdesign-2014 and it's ok now thanks !
Title: Re: Save all VFB channels
Post by: racoonart on 2014-03-13, 10:10:17
Glad it works :) I will make a note or a popup window or something if people have a fileOutGamma of 2.2 so they can change it if they want.
Title: Re: Save all VFB channels
Post by: benjaminbattais on 2014-03-24, 18:59:28
Thank you very much for this script, you're the one !!!
Title: Re: Save all VFB channels
Post by: webmenchu on 2014-03-25, 19:41:22
Hi everyone i am trying corona in a project, the issue is that i need to save the render elements of a sequence, i already download the script and also did a macro to my toolbar, but when i got the sequence just the firstframe is returnt in layers not all the sequence.
Title: Re: Save all VFB channels
Post by: racoonart on 2014-03-25, 19:58:58
The Script is not intended to be used for animations (it can't be used for that actually). It just saves what is currently available in the VFB (even during rendering) but no previous or coming renderings. For sequences you will have to use the common render output path.
Title: Re: Save all VFB channels
Post by: webmenchu on 2014-03-26, 00:44:26
Hi, Deadclown, i understand the script wasn´t created to do so, but actually in the standar output path is not avaible to save separated render elements.
Title: Re: Save all VFB channels
Post by: racoonart on 2014-03-26, 10:06:33
Render Elements will be saved with the same name (as prefix) as defined in the common output path + your renderelements name. You can also override the path one by one in the render elements tab if you prefer that. It's a 3dsmax topic, not dependent on Corona - so you can just consider the max help for further information ;)
Title: Re: Save all VFB channels
Post by: SandrineC on 2015-04-02, 02:10:46
Thanks you so much ! You save my night !
Title: Re: Save all VFB channels
Post by: maru on 2015-04-02, 10:56:25
Actually this thread may be a little confusing as this option is already supported by Corona itself:
https://coronarenderer.freshdesk.com/support/solutions/articles/5000594458
Title: Re: Save all VFB channels
Post by: PROH on 2015-04-02, 13:30:33
... but not in A6 I think. Maybe there should be a separate A6 section, for those subjects still being useful for A6 but not v1.
Title: Re: Save all VFB channels
Post by: maru on 2015-04-02, 14:01:23
Oh, A6. Right.