Announcement

Collapse
No announcement yet.

changing file name each frame during rendering animation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • changing file name each frame during rendering animation

    Hi,

    I switched to the new C4D R25.010 plus Vray-5 Update 1.3(v5.10.23) and trying to get my projects to work.
    With my last Version R21-3.7 it was possible to change the filename each frame during rendering animation.
    I worked with a quite simple XPresso setup, in which connected (from Translator tab) "VFB Image File" with my list of filenames.
    In Vray-5 I transfer this prinzip to "V-Ray Image Output".

    Click image for larger version

Name:	Screenshot 2021-11-04 122119.jpg
Views:	352
Size:	21.8 KB
ID:	1129278
    Click image for larger version

Name:	Screenshot 2021-11-04 122700.jpg
Views:	360
Size:	28.9 KB
ID:	1129279

    This Setup works when i Go to next Frame". The filename is changing like a charm. But if i hit "Render to Picture Viewer" or with VFB, each frame get the name from first frame.
    Maybe I did something wrong.


    Please can you help me? Is there something changed significant? I also opened a maxon support ticket because donĀ“t know is it a C4D issue.
    Is it possible to attach my scene file? It seems I'm not permitted to add .c4d files.


    looking forward to your answer.
    so long Christian

    inside Python Node:

    import c4d, os

    def getframe():
    frame = doc.GetTime().GetFrame(doc.GetFps())
    return frame


    def main():
    global output
    filename = ['File_RENDER-0001','File_RENDER-0002','File_RENDER-0003']
    join = os.path.join(path,filename[getframe()])
    output = join

  • #2
    Originally posted by christian_tremmel View Post
    Is it possible to attach my scene file? It seems I'm not permitted to add .c4d files.
    If the scene is very small you can zip the file and you will be able to upload it, otherwise you can use Dropbox or similar service and add the link.
    3D Scenes, Shaders and Courses for V-ray and Corona
    NEW V-Ray 5 Metal Shader Bundle (C4D/Max): https://www.3dtutorialandbeyond.com/...ders-cinema4d/
    www.3dtutorialandbeyond.com
    @3drenderandbeyond on social media @3DRnB Twitter

    Comment


    • #3
      hello sirio76,

      thx for your quick reply and helping me out with attaching the scene file.
      The File is super small. Please find it attached

      Christian
      Attached Files

      Comment


      • #4
        Works fine on my side.
        Click image for larger version

Name:	explorer_ja4FJqkwD6.png
Views:	408
Size:	6.6 KB
ID:	1129327

        Comment


        • #5
          Hello YunalZobu,

          thank you for answering so quickly. Unfortunately not. The Filenames has to be: File_RENDER-0001.0000.tif','File_RENDER-0002.0001.tif','File_RENDER-0003.0002.tif.
          The added number i'll cut after rendering. Following file names should remain:

          File_RENDER-0001.tif
          File_RENDER-0002.tif
          File_RENDER-0003.tif

          In R21 Vray 3.7 no problem but in R25 and Vray 5 seams to be difficult

          Comment


          • #6
            Oh, my bad! So this should be the desired end result, right? Click image for larger version

Name:	explorer_ko5ZSPuDjd.png
Views:	388
Size:	5.7 KB
ID:	1129400
            If that's the case, I'd just use the built-in tokens
            Code:
            import c4d, os
            
            def getframe():
            frame = doc.GetTime().GetFrame(doc.GetFps())
            return frame
            
            
            def main():
            global output
            filename = ['File_RENDER-$frame']
            join = os.path.join(path,filename[getframe()])
            output = join
            If the py script is not used for anything else in your pipeline, you could use the tokens right from the output field as well.
            Attached Files

            Comment


            • #7
              Hello YunalZobu,

              much obliged for your help. Unfortunately my description of the issue was a bit weird i guess.
              The frame token work perfect and the workaround could be to name the files with the frame token $frame and after finish rendering rename all files with a os method.

              Since yesterday I played around with tokens and search for the solution. I prepared a new test scene, showing the issue much clearer.
              If you look to the c4d output when using $camera token, the file name has been changed each frame, but if you using the Vray Output System the filename is frozen. Each frame are named with the name from first frame.

              C4D Output:

              Click image for larger version

Name:	Screenshot 2021-11-05 084758.jpg
Views:	340
Size:	7.7 KB
ID:	1129408

              Vray Output:

              Click image for larger version

Name:	Screenshot 2021-11-05 084934.jpg
Views:	338
Size:	7.8 KB
ID:	1129409

              It showed the issue much clearer, i guess.

              Maybe you can look at that again...
              Attached Files

              Comment

              Working...
              X