Announcement

Collapse
No announcement yet.

baking GI and spherical harmonics?

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

  • baking GI and spherical harmonics?

    We have a pretty big scene that takes a long time to render, however only a few objects in the scene are animated. So I was thinking that it might save a lot of time to render the static environment separately from the animated characters. My question is: what would be the best method for rendering the static environment and moving camera with GI flicker free?

    a) baking textures
    b) spherical harmonics
    c) walkthrough (per-calculating the irradiance and light cache passes)

    Texture baking seems (a) the most strait forward. However I read here that the walk-through method was recommended. The difficulty is that it looks like we would need to render out every 10th frame for the IR, and since we have over 70 shots that becomes a lot of prep work. If there was a way to calulate it just once for all the shots, that would be preferable, and it seems like baking the textures and spherical harmonics would both allow this. I'm thinking that sphereical harmonics would be preferable over texture baking since it is a new fancy method. Perhaps however I am overlooking something (for instance I am wondering why walkthough was recomended over texture baking in the tutorial, and whether this SH would be any different). So any insights into the best approach here would be much appreciated!
    Last edited by sharktacos; 04-05-2012, 11:57 AM.

  • #2
    Hi,
    Separate animated objects with static objects.
    1) Static objects : render one frame with "Use camera path" enable, and save the map. You will have just 1 frame to render to have your baked GI.
    2) Moving objects : render with VRaySphereFade on all moving objects (and static objects primary visibility to off with a VRayObjectProperties ) and brute force GI (or bake your irradiance map in "Animation (prepass)", and render after with "Animation (rendering)").
    Last edited by bigbossfr; 05-05-2012, 01:22 PM.
    www.deex.info

    Comment


    • #3
      Originally posted by sharktacos View Post
      Texture baking seems (a) the most strait forward.
      Yes, it will work fine.

      However I read here that the walk-through method was recommended.
      This will work fine too. You can bake one irradiance map for all shots - in fact, you can use texture baking to compute the irradiance map over all objects in the scene.

      In any case, as bigbossfr pointed out, it will probably be best to separate the static background from the animated objects.

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

      Comment


      • #4
        Bigbossfr writes:
        1) Static objects : render one frame with "Use camera path" enable, and save the map. You will have just 1 frame to render to have your baked GI.


        In other words, I would render a single irradiance map ("Use camera path" on, mode set to single) that is saved to disc, and then applied to every shot.


        Vlado writes:
        You can bake one irradiance map for all shots


        This sounds like the same thing.


        Question 1: the manual says "If you use this option, you should not use interpolated glossy reflections/refractions in VRayMtl, as they will look odd."
        Does this mean I cannot have low gloss fresnel reflections/spec on materials? Because all of the materials of course do have reflection and spec. Does this really mean we need to use Lamberts on everything?



        Question 2: Will this work even of the camera in the next shot is looking in a different direction/has a different animation (as of course it does)? Then the camera path would not be the same...

        Comment


        • #5
          Vlado then writes:
          in fact, you can use texture baking to compute the irradiance map over all objects in the scene.


          This sounds like something different from what Bigboss is describing. The process I had envisioned here would be:
          Lighting/Shading menu: set bake to "all" and enable "Assign baked textures"


          This of course would apply baked textures including the GI onto objects. One could then render this out with no lights.



          It would not however give you just the irradiance map as you are suggesting. Can you explain how one could use texture baking to compute the irradiance map over all objects in the scene?

          Comment


          • #6
            Originally posted by sharktacos View Post
            Question 1: the manual says "If you use this option, you should not use interpolated glossy reflections/refractions in VRayMtl, as they will look odd."
            Does this mean I cannot have low gloss fresnel reflections/spec on materials? Because all of the materials of course do have reflection and spec. Does this really mean we need to use Lamberts on everything?
            You can use reflection and refraction, you can have low gloss fresnel reflections, etc etc....but you can not enable interpolation on reflection and refraction on the material.

            Originally posted by sharktacos View Post
            Question 2: Will this work even of the camera in the next shot is looking in a different direction/has a different animation (as of course it does)? Then the camera path would not be the same...
            Use the same technique but set the irradiance map to : Incremental add to current map (with Use camera path). Vray will add other irradiance map points to the current map (for static objects).
            But i am not sur about this, Vlado will confirm.
            www.deex.info

            Comment


            • #7
              Originally posted by bigbossfr View Post
              Use the same technique but set the irradiance map to : Incremental add to current map (with Use camera path). Vray will add other irradiance map points to the current map (for static objects). But i am not sur about this, Vlado will confirm.
              Since we have lots of shots, I would prefer a method that only requires pre-calculating 1 frame for everything (all shots). Needing to calculate 1 frame for every shot would be less desirable, but tolerable. Needing to incrementally calculate frames for every single shot sounds rather tedious.

              Since Vlado said "You can bake one irradiance map for all shots" I would assume that it is clear that the cameras will be different in every shot, and also that they will often be animated. So can you bake one irradiance map for all shots or not? If so, how does it work exactly since "set to camera path" would only work for that single camera path?
              Last edited by sharktacos; 06-05-2012, 05:40 PM.

              Comment


              • #8
                Originally posted by sharktacos View Post
                Vlado writes:
                You can bake one irradiance map for all shots

                This sounds like the same thing.
                Maybe, but it's not I will try to explain in more detail a bit later.

                Question 1: the manual says "If you use this option, you should not use interpolated glossy reflections/refractions in VRayMtl, as they will look odd."
                Does this mean I cannot have low gloss fresnel reflections/spec on materials? Because all of the materials of course do have reflection and spec. Does this really mean we need to use Lamberts on everything?
                No of course. If you are not using interpolated glossy reflections/refractions (and by default you are not, unless you specifically turn them on for a given material), then you can ignore this remark.

                Question 2: Will this work even of the camera in the next shot is looking in a different direction/has a different animation (as of course it does)? Then the camera path would not be the same...
                With the method that I suggested (using texture baking to compute an irradiance map), yes you can do that.

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

                Comment


                • #9
                  Originally posted by vlado View Post
                  Maybe, but it's not I will try to explain in more detail a bit later.
                  Yes, please do

                  apparenty this was supposed to be "part 2" of the texture baking tutorial since "part 1" ends by saying
                  "In the next part of the texture baking tutorial you will learn how to bake only specific elements of the rendering (e.g. only the lighting or GI)."
                  But unfortunatly there is no part 2

                  enlighten us Vlado!
                  Last edited by sharktacos; 07-05-2012, 07:18 AM.

                  Comment


                  • #10
                    Don't know if this is relevant to texture baking elements like an irradiance map, but in the Maya render settings there is a drop-down menu called "bake channel" that does not work (i.e. the menu seems to be broken/dysfunctional) even when "texture baking" is active.

                    Comment


                    • #11
                      Originally posted by sharktacos View Post
                      Don't know if this is relevant to texture baking elements like an irradiance map, but in the Maya render settings there is a drop-down menu called "bake channel" that does not work (i.e. the menu seems to be broken/dysfunctional) even when "texture baking" is active.
                      It works just fine. You need to select something so that the drop-down is filled with the UV sets of the selected object.

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

                      Comment


                      • #12
                        So, here is my mini tutorial.

                        *) Open the attached scene - it's very simple, just a few object;
                        *) Make sure the UVs of the each object are properly laid out as for texture baking (i.e. no overlapping UV polygons); there is no problem if different objects overlap in the same UV space;
                        *) Set the primary GI engine to "irradiance map" and set the mode to "Multiframe incremental" (this means that each render adds details to the map); the secondary engine can be whatever you need.
                        *) Turn on the "Don't render final image" option in the V-Ray global switches (we just need to accumulate the irradiance samples);
                        *) Go to Rendering > Lighting/Shading > Bake with V-Ray... - this will cause V-Ray to go through all objects and accumulate their irradiance samples in one map;
                        *) When the rendering is complete, save the irradiance map from the "Save" button in the V-Ray settings (or else, set the "Autosave" option of the irradiance map so that it will be saved automatically at the end of the render).

                        Now you have a single view-independent irradiance map for all objects in your scene. You can use the irradiance map viewer tool to check if everything is baked correctly.

                        *) Set the irradiance map mode to "from file" and select the saved file.
                        *) Turn off the "Don't render final image" option.

                        Now you can render any view of the scene using the cached irradiance map.

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

                        Comment


                        • #13
                          Hi,
                          I have a question : i have a scene with static objects and moving camera. Can i bake all GI in one time and one frame ? Like set the irradiance map to "simple frame" with "use camera path" enable, and the light cache to "simple frame" with "use camera path" enable also ?
                          Or it is a bad workflow ?

                          Thanks.
                          www.deex.info

                          Comment


                          • #14
                            Thanks very much for the mini tutorial Vlado.
                            We have tried this, and it seems to work great on a small scene with just a few objects, However on a larger scene with lots of objects (in our case an outdoor shot with around 50 models) the resulting IR map was very low quality. So we instead baked out each object out seperatly and combined them together with the irradiance map viewer tool. This (while a bit tedious) seems to yield good results, I did however have a question:

                            it seems that the samples (those little circles it makes) are the same regardless of object size. Consequently on a house we get small dense circles, but on the large ground plane we get large circles with big gaps in-between. Is there a way to bump up the sampling for these larger objects? It seems that this set amount of dots generated is also the reason that we were not able to get a good bake from a single go. If you could comment on the recommended workflow with large scenes like this, that would be awesome

                            Comment


                            • #15
                              Originally posted by bigbossfr View Post
                              Hi,
                              I have a question : i have a scene with static objects and moving camera. Can i bake all GI in one time and one frame ? Like set the irradiance map to "simple frame" with "use camera path" enable, and the light cache to "simple frame" with "use camera path" enable also ?
                              Or it is a bad workflow ?

                              Thanks.
                              My understanding, based on what Vlado said above, is that yes you would bake (not render) out 1 single irradiance map, but you would set it to "Multiframe incremental" rather than "simple frame".

                              Also, since the baked IR map should be view independant, I don't think it would make sense to have "use camera path" enabled. For the light cache things are different: since it would be view dependant, it would need to be saved in a prepass with "use camera path" enabled and a new one would need to be created for every camera move.
                              Last edited by sharktacos; 17-05-2012, 11:53 AM.

                              Comment

                              Working...
                              X