Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] General Discussion => Topic started by: NicolasC on 2017-12-07, 08:31:26

Title: Render Elements output
Post by: NicolasC on 2017-12-07, 08:31:26
Hello :)

Since we use PSDManager to gather elements for our renderings, we'd like to avoid the global REs output that generates a bunch of useless files for us. Is there a way to prevent REs output in separated files ? we just want them to be generated in the VFB, written in the PSD file generated by PSDManager, but nothing more ... any idea, please ?

Thank you.
Title: Re: Render Elements output
Post by: maru on 2017-12-07, 11:09:06
Right now you can save to CXR from the vfb or render setup, or use a script for this: https://corona-renderer.com/wiki/maxscript

We are looking for a good solution how this could be improved.
Title: Re: Render Elements output
Post by: NicolasC on 2017-12-07, 11:24:11
Hello Maru,

Thanks for the link, but I can't see anything useful about REs ... apart saveAllElements with a string - does that mean that providing an empty string will do the trick ?
However, saving to .CXR will be fine for us I guess, thank you for the reminder :)

Regards.
Title: Re: Render Elements output
Post by: maru on 2017-12-07, 13:13:56
What I meant was the following maxscript command, that can be run at render end:
dumpVfb -  Saves the current VFB contents to given file so it can be resumed later using loadAndResume

It's basically the same thing as "save cxr" button.

The full command would be coronaRenderer.CoronaFp.dumpVfb cxrFilename[string]
Title: Re: Render Elements output
Post by: NicolasC on 2017-12-08, 15:34:59
Maru,

I'm sorry to insist, but I've just tried using .CXR as output file, and REs are still generated in addition to the main rendering ... what a mess with 10 cameras :P
Title: Re: Render Elements output
Post by: maru on 2017-12-08, 17:37:26
What I meant was actually clicking the "save cxr" button, or using the script, without having any output path specified. Nothing else will work. (right now)
Title: Re: Render Elements output
Post by: NicolasC on 2017-12-08, 21:05:32
Oh ok, I misunderstood then ... let's hope there soon will be a solution, because it's not practical at all for now.

Thanks again.
Title: Re: Render Elements output
Post by: Daniel Schmidt on 2018-01-03, 17:45:10
Can't you use the .xxx file format for the render elements output? It is part of psd-manager since forever. It is designed exactly to avoid output of extra files that are not needed, e.g. if everything is already stored in a PSD/PSB file.

Daniel
Title: Re: Render Elements output
Post by: NicolasC on 2018-01-04, 09:52:28
Can't you use the .xxx file format for the render elements output? It is part of psd-manager since forever. It is designed exactly to avoid output of extra files that are not needed, e.g. if everything is already stored in a PSD/PSB file.

Daniel

Hi Dan - and Happy New Year :)

Hopefully you're there, I had totatlly forgotten this solution !! I'll give it a try today :)

Thanks !
Title: Re: Render Elements output
Post by: NicolasC on 2018-01-04, 17:26:03
Daniel,
I've just tested, it works like a charm, thanks A LOT for the reminder !
A little prerender script to set all the REs' output to .xxx and here we go :) still waiting for a proper solution out-of-the-box for a future Corona release, but that does the job perfectly for now.

Cheers.
Title: Re: Render Elements output
Post by: iancamarillo on 2018-01-04, 22:29:38
Hi Maru,
I still haven't figured out how to save the crx without saving each element as a crx too - is this still the latest or am I doing something wrong? Thanks!
Title: Re: Render Elements output
Post by: maru on 2018-01-05, 09:53:25
My previous message is still actual.
We are looking for a good way to solve this.
Title: Re: Render Elements output
Post by: 3dboomerang on 2018-01-10, 12:27:24
@NicolasC:
"Daniel,
I've just tested, it works like a charm, thanks A LOT for the reminder !
A little prerender script to set all the REs' output to .xxx and here we go :) still waiting for a proper solution out-of-the-box for a future Corona release, but that does the job perfectly for now."


Can you please tell me what to do, step by step, so I can achieve the same? I'm going manic, I have to click all the seperate RE each time I want to send a camera out to RebusFarm, it's driving me mental. Houres and houres of wasted time...


Regards;

Ethan
Title: Re: Render Elements output
Post by: NicolasC on 2018-01-10, 12:31:47
Hello Ethan,

No need to write big and bold to hope an answer :)
Here you go, just run this piece of code, it will fix REs output for you:

re = maxOps.GetCurRenderElementMgr()
for i = 0 to re.NumRenderElements()  do re.SetRenderElementFilename i ".xxx"


I guess the .xxx output comes with PSDManager though ... if you don't have PSDM, I guess you can simply replace ".xxx" by "".
Title: Re: Render Elements output
Post by: NicolasC on 2018-01-17, 09:55:52
Does it work like you want, 3dboomerang ?
Title: Re: Render Elements output
Post by: 3dboomerang on 2018-02-01, 09:16:56
sorry i didnt have time atm, it was urgent in the previous project, I ended up staying awake through the night managing the render elements, 20 RE for 10 CAMS, was so much fun...

i'll check this asap, right now i really dont have the time - grts
Title: Re: Render Elements output
Post by: Daniel Schmidt on 2018-02-23, 09:23:52
You can even use the psd-manager trial (http://www.cebas.com/psdmanager) for this purpose. The xxx format plugin is free to use.
NicolasC your loop actually runs too far, it should stop at (re.NumRenderElements() - 1).

Daniel Schmidt - psd-manager Developer
Title: Re: Render Elements output
Post by: NicolasC on 2018-02-23, 09:56:14

NicolasC your loop actually runs too far, it should stop at (re.NumRenderElements() - 1).


Hi Dan :)

Sorry I don't follow you on that point ?
Title: Re: Render Elements output
Post by: Daniel Schmidt on 2018-02-24, 05:09:06
Sorry I don't follow you on that point ?
If you have just 1 render element you will call re.SetRenderElementFilename 2 times for example. No harm done here since SetRenderElementFilename seems to check the bounds, but if someone modifies/reuses the code then it could cause problems. This would be the fixed version:

re = maxOps.GetCurRenderElementMgr()
for i = 0 to re.NumRenderElements()-1  do re.SetRenderElementFilename i ".xxx"

Title: Re: Render Elements output
Post by: 3dboomerang on 2018-03-25, 15:25:14
yeah... using this script

http://www.scriptspot.com/3ds-max/scripts/render-elements-to-folders

would like to see it automated though