Announcement

Collapse
No announcement yet.

Irradiance Map/Light Cache workflow for multiple cameras fly-through in VRay

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

  • Irradiance Map/Light Cache workflow for multiple cameras fly-through in VRay

    Hi every one,

    I have a 3D model sitting on a plane which I want to render through 6 different cameras (each doing a different movement around it) using Render Elements for compositing purposes later.
    I have grouped certain RenderElements in render layers for convenience.

    Previously, when rendering just one camera fly-through where the only thing moving was the camera, I successfully adopted the usual method of firstly rendering a Pre-pass every N-th frame with the following settings:

    - Primary bounces: Irradiance map
    - Secondary bounces: Light Cache

    - Irradiance map set to "Multiframe incremental"
    - Light Cache set to "Fly-through"

    Then for the final render stage, setting the "By Frame" back to 1 instead of every N-th frame:

    - Primary bounces: Irradiance map
    - Secondary bounces: Light Cache

    - Irradiance map set to "From file", whereby I would point to the previously obtained I.M.
    - Light Cache set to "From file", whereby I would point to the previously obtained L.C.


    Now the dilemma is how do I do it for multiple cameras in the scene?
    Someone suggested I firstly create another camera and capture the Irradiance Map from as many angles as possible by adding each shot to the current map.
    (if I'm grabbing via this camera, does it matter that my 6 renderable cameras in the scene have different focal lengths?)

    Whilst separately creating the IrradianceMap, do I turn off LightCache in "GI/Secondary bounces"?

    To save the various portions of the Irradiance map 360* "bubble", do I first define a directory path in its "Auto save file" as usual in "Single frame" mode and capture the first shot - then for every successive angle, switch the option from "single frame" to "Add to current map"? Is that the quivalent of merging them in the Irradiance Map Viewer?

    By reading in the Chaos Group Help (http://help.chaosgroup.com/vray/help...ams_camera.htm), I got the impression that I could even use this camera converted to "Box camera" as an alternative shortcut to save time, rather than having to manually shoot from all these different angles to create the Irradiance Map. Is that correct or is it only valid for rendering stills?
    Box - the box camera is simply 6 standard cameras placed on the sides of a box. This type of camera is excellent for generation of environment maps for cube mapping. It may be very useful for GI too - you can calculate the irradiance map with a Box camera, save it to file and you can reuse it with a Standard camera that can be pointed at any direction.

    Then for the LightCache, do I switch off the Irradiance map in "GI/Primary bounces" and save out a separate LightCache file for each renderable camera and then merge these in the Irradiance Map Viewer?
    However after reading various online sources, I'm under the impression that one cannot merge Light Caches; am I right?
    (this is also most confusing because otherwise, how could I get each camera to read its own L.C during final rendering phase?)

    Final step: render out the R file by pointing to the Irradiance Map and the LightCache files that I obtained as above?


    Could someone tell me if that is correct or illustrate a proper step-by-step workflow to render a multi-camera flythrough in Vray? Most of the info I was able to find online is fragmented to say the least.
    Thanks in advance for any help!

  • #2
    Hi,

    There is another approach to render GI flicker free animation when only the camera moves.
    Irr. map and Light cache engines have "Use Camera Path" option, which allows the user to precalculate them on one render/prepass. Then you will have six Irr. maps for each scene camera.

    The entire GI precalculation setup is:
    *) set Irr. map as primary engine > set "Use camera path" option On > save the primary GI map to a file (single frame mode)
    *) set LC as secondary engine > set "Use camera path" option On > no need to save this map, because it will be saved to the Irr. map anyway.
    *) render ("Don't render final image" must be On) the first frame

    You could do this for each animated camera in the scene. Then you can either render the final frames using the precalculated (six) IR map files or merge them to one file using our Irr map viewer and use it for all camera animations.
    Tashko Zashev | chaos.com
    Chaos Support Representative | contact us

    Comment


    • #3
      Thank you, thank you, thank you. I can't thank you enough!
      I'll try this straight away.

      So are you saying that once I've pre-calculated the 6 Irradiance Maps as you described, when it comes to the Render pass stage, I disable the secondary bounces and then either:

      a) Render one camera at a time while making each read from its own Irradiance Map "From file" every time?

      or the other alternative

      b) Merge the 6 Irradiance maps with the Ir map viewer and then batch render all 6 cameras in one go, making VRay read from that merged Irradiance map ("From file")?

      Just to have the process clear in my mind.

      P.S: Should I still leave ON "Use camera path" option when in my final render pass stage as well?
      Last edited by Zippydan; 21-07-2014, 11:46 AM.

      Comment


      • #4
        Yes, both approaches should work for most of the cases. Use camera path option will not work well for very long camera travel only.
        The second one seems to be more convenient i think, but you can try and see which one works best for you.

        P.S: Should I still leave ON "Use camera path" option when in my final render pass stage as well?
        It doesn't matter if it is On or Off when you set the Irr map more to "From file".
        Tashko Zashev | chaos.com
        Chaos Support Representative | contact us

        Comment


        • #5
          Perfect, thank you!

          The move of each camera is only approximately 90-120 degree rotations around the model or slight pans along it.
          They vary between 75-150 frames in length each.

          On that note, at final RenderPass stage, Is there a way to assign specific frame ranges for each camera before I hit BatchRender to avoid "dead frames"?
          In other words, if I set the scene's overall frame range to 150 frames to cater for all cameras, in the case of the camera animated for 75 frames only, I would be wasting valuable render time for the remaining 75 frames (at HD720) after the movement has ended.

          In such case, is setting the Start and End frames for each camera in the Render Settings and rendering one at a time the only viable solution?

          Comment


          • #6
            You are able to set animation frame range per camera in the 3DS Max Batch window. Override Preset mode could be used to set different range for specific cameras.

            Click image for larger version

Name:	Capture5.JPG
Views:	1
Size:	44.0 KB
ID:	853857

            Another approach is to use a render manager to queue all jobs.
            Tashko Zashev | chaos.com
            Chaos Support Representative | contact us

            Comment


            • #7
              Unfortunately I use VRay for Maya.
              I was in fact previously looking whether I could apply some sort of override on a per-camera basis for the individual frame ranges in the Render Settings window, but there aren't any options in that sense. Unless I've missed them.

              I sometimes use RenderPal as a render manager. I suppose I could save 6 versions of the RenderPass scene, one per each renderable camera.
              Otherwise I'll have to check if RenderPal will allow me to queue several instances of the same file and at the same time define for each camera within that same scene how many frames to be rendered.
              It would be great if it did.

              Comment


              • #8
                ahh yes, it is for Maya. Backburner should also do the job.
                Tashko Zashev | chaos.com
                Chaos Support Representative | contact us

                Comment


                • #9
                  Actually there is a way to do it with Maya batch. You have to crate six layers and set overrides for the renderable camera and start/end frame. Then start Maya batch to render all layers at ones.
                  Tashko Zashev | chaos.com
                  Chaos Support Representative | contact us

                  Comment


                  • #10
                    I was starting to wonder whether, like you said, creating Render Layers and set overrides for the renderable camera's start/end frames would be the only option. However, I already have the scene subdivided into 4 RenderLayers, each grouping certain Render Elements and I think that that would mean repeating those Render Layers 6 times. I would therefore end up with 24 Render Layers, which I was concerned would result a bit confusing and not very optimized.

                    Ehm, BackBurner... I've never used it before. Might have to investigate it further.

                    Comment


                    • #11
                      Tashko,

                      I have a question about the above workflow you describe. The workflow I am familiar with is similar but a bit more complex:
                      1) render LC/LC in flythrough mode, and save the map.
                      2) render IR/LC reading the LC "from file", and with camera path on for the IR in multi-incremental mode, rendering the first and last frame.
                      3) render IR/off with IR set to "from file" and secondary GI off since the LC was baked into the saved IR map.

                      Your method is obviously simpler. The method I am using is based on tutorials made my Chaos as well. Has there been changes in how you approach rendering that have lead to the new methodology? Are there any advantages/disadvantages of the two methods?

                      Comment


                      • #12
                        Hi Sharktacos

                        The GI animation workflows may vary depending on the scene. It is always best to try and find the best one that suits your needs and give you good render results. V-Ray has a lot of tools and options that allows the user to change the existing animation workflows or setup a new one.

                        With the GI approach I have posted you can skip the point 1) from your workflow and precalculate Irr. map and LC at ones using "Use camera path" option. It is the same as using the "Flythroug" mode.
                        Tashko Zashev | chaos.com
                        Chaos Support Representative | contact us

                        Comment

                        Working...
                        X