Announcement

Collapse
No announcement yet.

Depth of Field for Vray Camera in Grasshopper

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

  • Depth of Field for Vray Camera in Grasshopper

    I can't get the camera in Vray for Grasshopper to produce any depth of field. It is enabled in the Vray settings of Rhino. The target is set correctly and there are manual values in the Exposure settings of the Vray camera. In the description for the "F-Number" input it even specifically mentions the depth of field, but no matter what values I use there is no depth of field in the rendered image. I am using the normal Vray Renderer in Grasshopper, not the "Render in Project" functionality. If I render in project it works fine, but I need to render an animation in Grasshopper.

    Compare the 2 images, one rendered in Rhino and the other in Grasshopper. Setting the Depth of Field would actually be so much easier in Grasshopper because you can set the focus point parametrically.

    If, as I suspect, depth of field is not implemented yet in Grasshopper, could I ask when this is planned for?

    Alternatively is there a way to parametrically render an animation in Rhino?
    Attached Files

  • #2
    Originally posted by seltzdesign View Post
    If, as I suspect, depth of field is not implemented yet in Grasshopper, could I ask when this is planned for?
    That's correct - DOF is not currently supported in GH.
    The tooltip for the F-Number was copied from the Asset Editor which is the only reason for DOF being mentioned.
    I'll log it as a feature request but can't give you exact estimation for when it'll make it in.

    Originally posted by seltzdesign View Post
    Alternatively is there a way to parametrically render an animation in Rhino?
    ​​​​​​​
    There are a number of ways to combine GH definition data with your Rhino project.

    You can for example try the following:
    - Setup your camera animation in GH - Timeline, Renderer and animated Camera
    - Add a V-Ray Render in Project component and connect the Renderer scene output
    - Right click on the Render in Project component and select 'Export Camera Animation'
    - Enable the 'Asset Editor / Settings/ Animation' toggle and make sure that the Animation Source is set to Grasshopper
    - Render in Rhino - the GH definition is no longer needed at this point. DOF can be enabled via the 'Asset Editor / Settings / Camera / Depth of Field' toggle

    This way you'll be using Grasshopper to setup custom parametric animation recording.

    Hope that helps,
    ​​​​​​​Konstantin


    Comment


    • #3
      Originally posted by konstantin_chaos View Post


      You can for example try the following:
      - Setup your camera animation in GH - Timeline, Renderer and animated Camera
      - Add a V-Ray Render in Project component and connect the Renderer scene output
      - Right click on the Render in Project component and select 'Export Camera Animation'
      - Enable the 'Asset Editor / Settings/ Animation' toggle and make sure that the Animation Source is set to Grasshopper
      - Render in Rhino - the GH definition is no longer needed at this point. DOF can be enabled via the 'Asset Editor / Settings / Camera / Depth of Field' toggle

      This way you'll be using Grasshopper to setup custom parametric animation recording.

      Thanks for the feedback. Shame about the DoF. Can you render a depth pass at least? But I guess all these things are what you can only set up in Rhino.

      The thing is we are not doing (only) camera animation, but the geometry changes from frame to frame. In some cases the camera will even stay the same and the geometry changes. We are basically not using it as an "animation" but a way to do batch rendering, which works fine in GH actually if you just use the frame number as your driver. We are looking to render a few hundred images as a batch operation, so unless you can somehow transfer that all to Rhino and let Rhino do the rendering like you suggest with "Render in project", then we have to rely on the actual rendering in GH.

      I can't wait to have actual parametric rendering in GH, meaning all the parameters in the Assett Manager are exposed. Otherwise there is not much point and I might as well just bake to Rhino and render there using Vray. The power comes with it being fully parametric and using GH for everything. Its getting there, but still a few things missing (DOF of course one of them!).

      Our dream would be basically having all the nodes necessary the same way Octane has EVERYTHING as nodes. Combine that with the power of GH and it would be amazing. I don't think Octane Render for Grasshopper is planned, but if it was, it would be easy to translate over to it. So for now Vray is the only option and its absolutely great. But we need more options and nodes please!

      Comment


      • #4
        What would also be great as a workaround would be to be able to somehow save a current scene in GH as a Vray scene that is ready to render. Imagine I can have a node that can save a Vray Scene from GH. Then I can have that trigger every frame of an animation and I just end up with a bunch of say .vrscene files, one for each frame of our animation/batch render.

        I don't know if it exists, but I am sure there is a way to batch render Vray scenes. So I could first create all the individual files and then have a normal Vray batch renderer or even Vray cloud render all the files. At least that's how it works for Octane. You can just save it as an Octane Scene and then there is a batch renderer that you just give a bunch of Octane files.

        Does that make sense? Basically a node in GH, that just saves a .vrscene file from all its inputs. But it would have to be proper parametric - ie. you can trigger it inside GH using a boolean input. Please don't do these silly things where you have to right-click and then select something or press a button on a component in GH. Its bad UX and not how Grasshopper should work. There was a lengthy discussion on this in the Grasshopper forum recently.

        Comment


        • #5
          Oh yeah, last point: If you ever need anyone to beta test anything in Grasshopper or give feedback, I am more than happy to. We work with Grasshopper a lot and try and push things to their limits. www.jhh.ch and www.hansen.ch

          Comment


          • #6
            Originally posted by seltzdesign View Post
            The thing is we are not doing (only) camera animation, but the geometry changes from frame to frame. In some cases the camera will even stay the same and the geometry changes. We are basically not using it as an "animation" but a way to do batch rendering, which works fine in GH actually if you just use the frame number as your driver. We are looking to render a few hundred images as a batch operation, so unless you can somehow transfer that all to Rhino and let Rhino do the rendering like you suggest with "Render in project", then we have to rely on the actual rendering in GH.
            If you install the latest available version V-Ray Next for Rhino, update 2.1 you'll notice that there is a new function in the Render in Project component - Render Animation in Rhino.
            With it you can do the following:
            - 1 Setup your object and camera animation in GH
            - 2 Add the Render in Project component
            - 3 Export the camera animation (to Rhino)
            - 4 Enable Animation in Rhino and make sure that GH is the source
            - 5 Use the Render in Project component / Render Animation in Rhino to render the batch
            This way both your camera movement, target and object animations will be rendered using the render settings in Rhino.
            I've attached an example project of the setup. Just execute steps 3 and 5 to see the scene rendered:
            ObjectAndCamAnimationInRhino.zip

            Originally posted by seltzdesign View Post
            I can't wait to have actual parametric rendering in GH, meaning all the parameters in the Assett Manager are exposed. Otherwise there is not much point and I might as well just bake to Rhino and render there using Vray. The power comes with it being fully parametric and using GH for everything. Its getting there, but still a few things missing (DOF of course one of them!).
            We can do that for sure but we waned to keep or GH integration as simple as possible.
            This plan can change though with more people sending us feedback and requests.

            Originally posted by seltzdesign View Post
            Our dream would be basically having all the nodes necessary the same way Octane has EVERYTHING as nodes. Combine that with the power of GH and it would be amazing. I don't think Octane Render for Grasshopper is planned, but if it was, it would be easy to translate over to it. So for now Vray is the only option and its absolutely great. But we need more options and nodes please!
            Everything in V-Ray is also a node in the back.
            We just show it differently in the Asset Editor.
            In that regard exposing most of the V-Ray controls in GH is not a big challenge.

            I don't know if it exists, but I am sure there is a way to batch render Vray scenes. So I could first create all the individual files and then have a normal Vray batch renderer or even Vray cloud render all the files. At least that's how it works for Octane. You can just save it as an Octane Scene and then there is a batch renderer that you just give a bunch of Octane files.
            You can use the V-Ray Batch rendering manager for that:
            https://docs.chaosgroup.com/display/...y+Batch+Render
            It can render 3dm files or vrscenes.

            Does that make sense? Basically a node in GH, that just saves a .vrscene file from all its inputs. But it would have to be proper parametric - ie. you can trigger it inside GH using a boolean input. Please don't do these silly things where you have to right-click and then select something or press a button on a component in GH. Its bad UX and not how Grasshopper should work. There was a lengthy discussion on this in the Grasshopper forum recently.
            There's the V-Ray Exporter component:
            https://docs.chaosgroup.com/display/VNFR/V-Ray+Exporter
            It's using context menu functions still.

            Oh yeah, last point: If you ever need anyone to beta test anything in Grasshopper or give feedback, I am more than happy to.
            Sure, I'll share more information once we have new things for testing.

            Regards,
            Konstantin



            Comment


            • #7
              konstantin_chaos Thanks so much for all the in-depth explanations. That really helped!

              Originally posted by konstantin_chaos View Post

              We can do that for sure but we waned to keep or GH integration as simple as possible.
              Please don't. Grasshopper is an advanced tool and you use it to do advanced things with it. In the scheme of things Vray isn't going to make it more difficult. Grasshopper has so many plugins which really unlock the power of it and I don't think any of them are "simple". Actually not having certain options you could argue you are making it more difficult. If you hit a limitation you now need to find a way around it.

              You make things simpler in Grasshopper if they are logical and have good descriptions (and so far you have really done that well!).

              If you are getting into Grasshopper you are on a path with a fairly steep learning curve. So those few options shouldn't intimidate you. Also its not like they are new things. They are settings of Vray and you need to know those anyways. Its not like Vray for Grasshopper should somehow try to make it simpler than in Rhino. It offers a unique opportunity to have Vray render things parametrically and as such should offer the same options as in Rhino.


              Comment


              • #8
                Greetings everyone!

                Yeah I agree with the original poster. If every option of the Asset Manager were available in grasshopper, it would be an amazing evolution for VfR. Being able to manage nodes for material creation, as octane, blender or 3dsMax do would make the creation of complex materials much better than the "stacking" and "globalize" methods of the Asset Manager. I think that there are some challenges of course with the communication between Vray and Grasshopper, since they are almost independent (different from the examples I just gave), but they would make VfR, and Rhino itself a much more complete solution.
                I mean, just the Timeline node opens up so many options for animation in Rhino!

                I really hope VfR5 brings more complexity for VfR!

                Leave the simplicity for the SketchUp users! (just kidding!)
                Edson Maruyama
                Architect

                Comment


                • #9
                  More Grasshopper/Vray Please! DOF Is a must.

                  Comment


                  • #10
                    konstantin_chaos Any updates? Are more/improved Grasshopper components on the roadmap?

                    Comment


                    • #11
                      Hi,

                      DoF for VfGH camera is already implemented and will be available in the following update.

                      Comment


                      • #12
                        Hi guys,

                        Update 2 was released yesterday.
                        DOF is now available in the V-Ray Camera component.

                        Let us know if you find any issues with the feature.

                        Konstantin

                        Comment


                        • #13
                          Hi,

                          also interested in this. It seems like the values are not exported with the "Export Camera Animation" from the VRay Exporter component. Could this be? Also FOV is not. Or am I missing something? With rendering out of GH from the component the values have an effect.

                          Comment


                          • #14
                            Hi wmcrmr,

                            Originally posted by wmcrmr View Post
                            Hi,
                            also interested in this. It seems like the values are not exported with the "Export Camera Animation" from the VRay Exporter component. Could this be? Also FOV is not. Or am I missing something? With rendering out of GH from the component the values have an effect.
                            What you've described is the expected behavior.
                            The only 2 things that our Rhino-side animation manager supports are Camera transformation and Sun orientation.
                            If we decide to allow more complex animated to be imported we'll have to expand this system quite a bit.

                            The fact that any animation can be rendered in Grasshopper is also not surprising.
                            The way in which this process goes is:
                            1) V-Ray sets the time
                            2) Then it evaluates the definition at the given time (no limitations on what's supported)
                            3) The frame is rendered
                            4) The process repeats...

                            The good news is we have plans to allow more things from the GH animation to be evaluated and exported.
                            This will potentially let you export complex animations as a single .vrscene file and even render the animation on the Chaos Cloud.
                            If we combine this with an update to the animation manager in Rhino, you'll also be able to send it there too.

                            Konstantin

                            Comment


                            • #15
                              Thank you, konstantin_chaos

                              Good to hear that you are working on this. Exactly for rendering in the Chaos Cloud I would need this.

                              Comment

                              Working...
                              X