Author Topic: I still don't understand the way corona saves files  (Read 1624 times)

2023-08-15, 08:57:53

Maybejensen

  • Active Users
  • **
  • Posts: 49
  • MaybeJensen - Denmark
    • View Profile
    • Maybejensen
I created a thread a couple of years ago, complaining about the way Corona saves final rendered images. But it still makes absolutely no sense whatsoever.
As far as I understand, we're supposed to check "Save File" in the common dialog in Render output, and find a location,  this way it will save all render elements along with what's previewed in the frame buffer.
However, after I've completed my final render, I turn off the "Save File" checkmark, and it is still saving test renders in the same location because saving is turned on in the render elements.
When I uncheck "Save file" how comeliterally doesn't do that?
Currently, when I uncheck it, it is still saving all my render elements, which often leads to overwriting final renderings.
Every other engine V-ray for example doesn't do this, and have implemented their own save file dialog.
What workflow are you all using to combat this?



MAYBEJENSEN I Working on something I  Ryzen 3950x / RTX 3080

2023-08-15, 09:15:25
Reply #1

Tom

  • Active Users
  • **
  • Posts: 335
    • View Profile
Hi,

Yes this is annoying I know. I face the same issue using Corona 10, but I didn't know other rendering engines don't produce this issue.
Actually I thought it was a 3ds Max related bug, and not Corona related, but maybe I'm wrong here I don't know.
I found a workaround for this: I use a small script that enables me to delete the path where render elements are saved so that, after completing a render with 'Save file' unchecked, render elements don't overwrite any files that have been rendered previously.

I am going to ask the developer their permission, and if they agree, I'll post the script here.

2023-08-15, 09:21:24
Reply #2

Maybejensen

  • Active Users
  • **
  • Posts: 49
  • MaybeJensen - Denmark
    • View Profile
    • Maybejensen
Hey Tom, I'm glad I'm not the only one frustrated. You can DM me the link if you'd like
Hi,

Yes this is annoying I know. I face the same issue using Corona 10, but I didn't know other rendering engines don't produce this issue.
Actually I thought it was a 3ds Max related bug, and not Corona related, but maybe I'm wrong here I don't know.
I found a workaround for this: I use a small script that enables me to delete the path where render elements are saved so that, after completing a render with 'Save file' unchecked, render elements don't overwrite any files that have been rendered previously.

I am going to ask the developer their permission, and if they agree, I'll post the script here.
MAYBEJENSEN I Working on something I  Ryzen 3950x / RTX 3080

2023-08-15, 09:26:25
Reply #3

pokoy

  • Active Users
  • **
  • Posts: 1987
    • View Profile
This is how it works in 3dsmax, always been this way, not related to Corona specifically.

2023-08-15, 09:28:47
Reply #4

Maybejensen

  • Active Users
  • **
  • Posts: 49
  • MaybeJensen - Denmark
    • View Profile
    • Maybejensen
Hey Pokoy, I'm aware. However many render engines circumvent this by creating their own save file workflow.
Maybe we could get something that resembles the one in V-ray.
This is how it works in 3dsmax, always been this way, not related to Corona specifically.
MAYBEJENSEN I Working on something I  Ryzen 3950x / RTX 3080

2023-08-15, 10:26:29
Reply #5

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9276
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Wouldn't it be better if Autodesk would fix this issue once and for all, so that every third-party renderer developer wouldn't need to re-invent the wheel? Maybe it's worth to go to Autodesk forum and tell them about that?
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2023-08-15, 13:17:39
Reply #6

James Vella

  • Active Users
  • **
  • Posts: 670
    • View Profile
V-ray for example doesn't do this, and have implemented their own save file dialog.
What workflow are you all using to combat this?

Yep, it is annoying, not sure why this still exists.

To combat this I usually run this script (attached down below, this was the wrong script), it deletes the render elements path. Wont affect anything in future since when you click 'save' it will output the render elements again. You just have to keep an eye on it since when those render element paths come back you have to delete them again (run the script) before your next render.
« Last Edit: 2023-08-18, 09:48:43 by James Vella »

2023-08-18, 09:21:23
Reply #7

Tom

  • Active Users
  • **
  • Posts: 335
    • View Profile
Hi,

I heard back from the developer, he's ok for me to post it, so here it is:


macroScript Archimi_NETTOYAGE
category:"Archimi"
    toolTip:"Nettoyage"
    buttonText:"NET"
(
    try destroyDialog ::ArchimiCLEANER catch()

    rollout ArchimiICLEANER ("Archimi CLEANER ") width:200
(
    Group ""(
    button btn_EffacerChemin "Effacer chemin de l'image de sortie " width:180 height:30
    )

    Group "Chemins RenderElements"
        (
            button btn_ELements01 "Assigner un chemin + PNG" width:180 height:30
            button btn_ELements02 "Effacer chemin existant" width:180 height:30
        )


    on btn_EffacerChemin pressed do (
    rendOutputFilename = ""
    renderSceneDialog.update()
    --messagebox "Fichier de sortie effacĂ©"
                    )

    on btn_ELements01 pressed do (
    local RE= maxOps.GetCurRenderElementMgr()
    local REcount=re.NumRenderElements()
    local thescenename=getFilenameFile maxfilename
        if REcount != 0 then (
                        thepath= try(getsavepath caption:"thetitle" initialdir:maxfilepath)catch()
                        for i=0 to REcount-1 do
                        (    local ElementName= (RE.GetRenderElement i).elementname
                            local thefile= thepath+"\"+thescenename+" - "+ElementName+".png"
                            RE.setRenderElementFilename i thefile
                        )
                    ) else
                    (    messagebox "Your RenderElements is empty :)" )
    )

    on btn_ELements02 pressed do (
    local RE= maxOps.GetCurRenderElementMgr()
    local REcount=re.NumRenderElements()
        if REcount != 0 then (
                        local thefile=""
                        for i=0 to REcount-1 do
                        (    RE.setRenderElementFilename i thefile
                        )
                ) else
                    (    messagebox "Your RenderElements is empty :)" )
    )

)
createDialog ArchimiICLEANER
)

2023-08-18, 09:22:34
Reply #8

Tom

  • Active Users
  • **
  • Posts: 335
    • View Profile
I see it's written in french but it's pretty straight forward to translate.

2023-08-18, 09:33:45
Reply #9

James Vella

  • Active Users
  • **
  • Posts: 670
    • View Profile
You can do the same thing in one line of code:

Looks like this isnt working with the latest version of Corona, Probably best to go with Toms solution. Although Tom it looks like there is something missing in that script, can you post it into a code block or attach the original .ms file?
« Last Edit: 2023-08-18, 09:49:15 by James Vella »

2023-08-18, 09:44:17
Reply #10

Tom

  • Active Users
  • **
  • Posts: 335
    • View Profile
Hi,

Sure. All I have is the .mcr file:

2023-08-18, 09:45:55
Reply #11

James Vella

  • Active Users
  • **
  • Posts: 670
    • View Profile
Thanks Tom.

Oh my bad, this actually is the script that clears the corona output paths, I was looking at the wrong file.

Code: [Select]
re = maxOps.GetCurRenderElementMgr()
for i = 0 to re.NumRenderElements()  do re.SetRenderElementFilename i ""

« Last Edit: 2023-08-18, 09:54:11 by James Vella »