Announcement

Collapse
No announcement yet.

How to Generate/Use Light Cache?

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

  • How to Generate/Use Light Cache?

    Hi,

    I typically never do animation renders, just single frames. However I am starting to do animations and I am experiencing light flickering. My animation is just the camera moving for 900 frames, using Brute Force + Light Cache. As far as I can tell, there is no mention of the workflow to use in the VRay documentation on how to setup and use a pre-calculated light cache file. Seems like a major oversight. Could someone list out the steps I need to follow? So far I have pieced together:
    1. Set mode to Fly-through on GI tab.
    2. Next to mode drop list I clicked save, and gave it a filename & path.
    3. Active time segment is set to 0-900
    4. No output filename assigned to save renders since I am assuming this is not needed now.
    5. I clicked render.
    Initially the frame buffer looks to have blended all of the camera positions into one blurred image. After this pass the image starts rendering for the first frame, but the light cache file is only 1kb in size. It'll take 4 hours for the first frame to finish rendering, so at this point the need to finish rendering seems pointless since the light cache pass is finished. What did I do wrong?

    thx


  • #2
    Hmm - I render animations all the time and right now I'm just using brute force with single frame light cache. Retrace threshold is handy if you find that the light cache is "leaking" (sometimes light cache samples can have a big radius and bleed through walls - this fixes it) and them I'm upping the amount of lc samples from 1000 to 2000. I wouldn't bother saving anything out and just stick the the defaults with maybe your samples and retrace tweaked slightly.

    For camera fly throughs where it's a static scene and only the camera moving I still use irradiance map a lot. It has some limitations if you want to do a lot of tweaking in comp afterwards but it's so quick and clean that it's worth looking at - is your scene an interior or exterior?

    Comment


    • #3
      It is an interior warehouse scene with lots of overhead light fixtures plus sunlight coming in from the windows. The flicker happens on the walls.

      I am currently trying the steps I pieced together above. The docs say that when using the Fly-through mode the light map calculation stops after the first frame is rendered. In my case though the first frame takes about 4 hours to render. That's normal, but could I just cut the render short after the light calculation pass finishes and get the same light map file? The docs are really vague on how to generate these and the UI doesn't guide you in any way.

      Comment


      • #4
        Is the flicker looking blotchy or grainy?

        Comment


        • #5
          No signs of blotchy or graininess.

          Comment


          • #6
            Kinda sounds like retrace threshold then, possibly issues with the geometry like double faces? If you find a frame with flicker and do a quick render of that with a normals pass, are the walls all nice and evenly coloured in the normals or is there any weird artifacts on them? Flicker in light cache normals appears as blotches / mottling, bright sections are normally light leaks but flickering in other passes can mean things like bad geometry instead. Have you rendered any elements to go along with those frames and you might be able to track things down!

            Comment


            • #7
              No co-planar faces or anything. The flicker I am seeing is when the still image sequence is combined into a video clip. On play back you see that the walls flicker with lighter/darker shaded. Single frame renders all look fine

              Power went out on render farm yesterday afternoon until this morning and so nothing has rendered much. Maybe by Monday I'll know if pre-calculating light cache worked. You don't notice it until you get about 60 frames rendered.

              Attached is a screen cap of me scrubbing the playback in After Effects between 2 frames. See how the wall's lighting flickers back and forth between lighter and darker shading?

              And another documentation question: This page talks about a Filter Size a lot, but I see no such setting in the Light Cache settings.
              Attached Files
              Last edited by leejk; 05-06-2020, 02:24 PM.

              Comment


              • #8
                Generally, you seem on the right track when it comes to settings for a Fly-Through animation. Make sure to pre-calculate your Light Cache by choosing Fly-Through mode, render a Single frame and save your generated Light Cache data (.vrlmap). You don't need to wait for the whole frame to render - click on the 'Don't render final image' option in Global Switches Rollout.

                After saving your LC data, select Active Time Segment, make sure you will untick the Don't render final image option, and load your Light Cache data by choosing 'From file' mode.

                Some additional tweaks that could help you avoid flickering:
                If you have moving objects in the scene (apart from your moving camera), make sure to enable the Use camera path option.

                Regarding the Filter size option you were asking about - this is only available if LC Type is set to KD Tree. KD Tree is the old Light Cache implementation method, and only old light cache files may use this.
                Hash map is the default light cache type for new scenes - it is simpler and produces less flickering in animations, thus the required method in your case.

                If there are still issues with flickering:
                1) Set Retrace value to 8.0, and Light Cache Samples to 3000. Set up Single mode instead of Fly-Through and disable Use camera path. These values should be enough to compensate for all the moving objects in your scene and generate Light Cache;
                2) Best would be to use Brute force/Brute force for Primary and Secondary engines. Doing so will eliminate any discrepancies in the calculation process (at the cost of increased render times).
                Nikoleta Garkova | chaos.com

                Comment


                • #9
                  Thanks for the answers. I think I have it worked out now.

                  Comment


                  • #10
                    Please note that the recommended method is to simply use the "Animation" preset of the light cache (or 3000 subdivs/retrace 8 if you don't have the presets in your version). There should be no need to do anything else. The precalculated and fly-through modes of the light cache will be removed from future versions of V-Ray. They are not nearly as useful anymore and might actually slow down your renders significantly due to V-Ray not being able to correctly adapt to the lighting situation for each frame (adaptive lights/adaptive dome light).

                    Best regards,
                    Vlado
                    I only act like I know everything, Rogers.

                    Comment


                    • #11
                      Originally posted by vlado View Post
                      Please note that the recommended method is to simply use the "Animation" preset of the light cache (or 3000 subdivs/retrace 8 if you don't have the presets in your version). There should be no need to do anything else. The precalculated and fly-through modes of the light cache will be removed from future versions of V-Ray. They are not nearly as useful anymore and might actually slow down your renders significantly due to V-Ray not being able to correctly adapt to the lighting situation for each frame (adaptive lights/adaptive dome light).

                      Best regards,
                      Vlado
                      Interesting, about the adaptive sampling, Vlado. What you describe is how we generally have worked for years, and we keep the retrace setting as low as we can tolerate for speed (I always start with leaving it at 2.0 even for animations until I see anything objectionable).

                      How about Use Camera Path? In the past (VRay3) we have used that a few times to solve flicker issues, but of course you need more samples depending on the camera motion. If you are using the camera path it seems like pre-caching is the way to go. But will Use Camera Path without pre-caching still allow the adaptive light sampling to work well?

                      Thanks.

                      Comment


                      • #12
                        Originally posted by vlado View Post
                        Please note that the recommended method is to simply use the "Animation" preset of the light cache (or 3000 subdivs/retrace 8 if you don't have the presets in your version). There should be no need to do anything else. The precalculated and fly-through modes of the light cache will be removed from future versions of V-Ray. They are not nearly as useful anymore and might actually slow down your renders significantly due to V-Ray not being able to correctly adapt to the lighting situation for each frame (adaptive lights/adaptive dome light).

                        Best regards,
                        Vlado
                        That is helpful information and maybe should be in the documentation. Since I had no other guidance I went ahead and rendered light cache and currently am using that. The animation has been rendering for several weeks but looks good so far. I wonder now if there was an opportunity to speed it up.

                        Comment


                        • #13
                          Originally posted by vlado View Post
                          Please note that the recommended method is to simply use the "Animation" preset of the light cache (or 3000 subdivs/retrace 8 if you don't have the presets in your version). There should be no need to do anything else. The precalculated and fly-through modes of the light cache will be removed from future versions of V-Ray. They are not nearly as useful anymore and might actually slow down your renders significantly due to V-Ray not being able to correctly adapt to the lighting situation for each frame (adaptive lights/adaptive dome light).

                          Best regards,
                          Vlado
                          Is this information anywhere in Chaos documentation for fly-through animations? I can't find it anywhere. I've done the pre build for Light Cache and Irradiance map for years and it worked fast and great. Now I'm struggling just to find what the new and improved method with documentation is for just a basic Camera along a path fly-through animation. Anyone???

                          Comment


                          • #14
                            Originally posted by liddil101 View Post

                            Is this information anywhere in Chaos documentation for fly-through animations? I can't find it anywhere. I've done the pre build for Light Cache and Irradiance map for years and it worked fast and great. Now I'm struggling just to find what the new and improved method with documentation is for just a basic Camera along a path fly-through animation. Anyone???
                            Currently, the universal method that Vlado mentioned is the recommend method for every kind of animation .
                            The same info can be found under "Recommended Animation Settings" section in this article :
                            https://docs.chaosgroup.com/display/...ender+Settings

                            Personally, I still prefer to use IRMap +LC for fast renders where we can easily cut render times in half without any "noticeable" artifacts by my clients , but as discussed many times earlier it is not the recommend method anymore.
                            -------------------------------------------------------------
                            Simply, I love to put pixels together! Sounds easy right : ))
                            Sketchbook-1 /Sketchbook-2 / Behance / Facebook

                            Comment

                            Working...
                            X