Announcement

Collapse
No announcement yet.

Z-Depth once again

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

  • Z-Depth once again

    Hello,

    for the first time we are trying to use the z-depth via Render Elements in the Render Globals. I've already read a lot of posts regarding DOF with VRay, but still we have not found the best solution I guess. Perhaps someone would be so kind and give us some tips+tricks.

    We using Maya 2011 with VRay 1.5SP1 (NB from 05th July) and the Lenscare-Plugin from Frischluft. Our current animation project is using a physical camera and the focus is changing during animation. It is a product visualisation, the scene is relative small and there are several macro shots where the camera is only 7 cm from the product. In the opening shot of the most scenes the camera is 50 cm away from the product.

    Okay, enought details I hope. So here are my questions:

    1. Did you guys and girls use the standard z-depth render element or an ExtraTex with a Falloff map? And what settings do you use for the falloff map?

    2. Or do you use a separate render pass for the z-depth map? And what material do you use for that? Read that a separate render pass has the advantage that you can set the Image sampler to Fixed rate.

    3. For the z-depth RE: What does the option "Use depth from camera" do? Is this the focus? Or the clipping planes?

    4. And how do I determine the "Depth black and white settings"? I read that when you use e.g. Lenscares you should set the black and white to your scene scale. But what if the camera is 50 cm away at start and 5 cm near the object at the end?

    5. We render out EXR (16bit) and encounter no problem so far with Lenscares. Any known problems?

    6. We disabled Filtering and Depth Clamp. Correct?

    7. Anyone manage to render a z-Depth map where the foreground and the background is blurred and only a small area in the middle is sharp?

    Any other tips and tricks aside from render at double resolution

    Many thanks in advanced and sorry for the long post.
    Lars

  • #2
    I'm not quite clear on your description, as it sounds like you are rendering with DOF, and outputting a zDepth pass for post tweaks. That sounds odd, but maybe I'm misunderstanding.
    1. Standard zdepth pass. We sometimes invert the black and white, as most filters expect white for front and black for back.
    2. No
    3. Use Depth from camera uses the clipping plane settings in the maya camera. It is very helpful to visualize this in the viewport by going to Display>Rendering>CameraLightManipulator>ClippingP lanes
    4. Jujst make sure your scene is encompassed by the clipping planes. If a camera moves in, it will clip parts of your scene, but they aren't visible. It works naturally, and as your object moves closer it will fall out of focus, unless you animate a focus pull
    5. That should be fine
    6. I'll have to test that, but we have used filtering and clamp ON and it has worked for us just fine.
    7. Here's where I'm confused. Why would I want to render a blurred zDepth pass. That would be technically useless, tho it can be handy for special use cases to post blur your depth pass for one reason or another.

    Andrew

    Comment


    • #3
      Hi Andrew,

      thanks for your fast reply and sorry for the confusing.

      No, we don't render with DOF. This was misleading from my side. DOF will be done as post effect in AFX.

      4. Okay, that's great. The focus pull can be done in AFX with Lenscare, or?
      6. We'll do some more test also. Read that Filtering will AA the depth map and that should be avoided.
      7. Sorry, what I mean is that you render out a z-depth map which let you do this macro effect (blurred foreground, small sharp area and a blurred background) in post. We did not managed to get this effect in post like on the following image:

      Click image for larger version

Name:	seq_100906.jpg
Views:	1
Size:	40.8 KB
ID:	843335

      Another problem that I guess can't be solved via post DOF is when an object in the foreground is strongly out of focus and you get those super blurry areas that cover the other part of the image (like on the image).

      We do some testing. But many thanks for your tips!
      Lars

      Comment


      • #4
        Hm, just to make sure I get it: When we set the "Depth from camera" option and our clipping planes encompasse the whole scenes, we get an z-depth map which is e.g. black where the near clipping plane is and white where the far clipping plane ist - with a gradient in between. With Lenscare you can now determine which grey level should be the focus plane - everything else should get blurred. Right?

        Problem is that if the camera is near by the product to get a macro shot and you also see in the background e.g. a wall, the gradient gets stretched over a long distance and though make it impossible to get the foreground of the product blurred, leave a small area in the middle sharp and the end of the product is again blurred. Difficult to describe.

        More tests are unfortunately needed.

        Comment


        • #5
          You will have to change your focus in AFX. Not too sure about the plugin you are using but it should be possible.
          Another way might be to apply a black to white ramp to everything in your scene. Then place the ramp to have you object with let say a mid grey, the camera movement will be independent of the ramp position (which will be static). This way, you object will always be in focus (it will always have the same focus value). However you will have to animate your blur level based on the camera movement.
          Portfolio: http://www.cgifocus.co.uk

          Comment


          • #6
            Cool,

            4. Yes, you'll animate your focus pull completely in post.
            6. I have used filtering, and it has worked fine.
            7. You should be able to get this effect, tho it won't work well in an extreme case. In any extreme DOF, there will be limitations to using a single zDepth

            In general, when you need to do something as extreme as you are attempting, You should separate your elements into layers. That way, the FG can be handled separately from the BG. Either that or render DOF in-camera. Same issues arise for super-blurry FG parts. They should be on their own layer so the BG revealed can be seen.

            Comment


            • #7
              it will be very very difficult to get that look in post. The best way would probably to split out your beauty passes into a few layers so that you can control the DOF on each. I'd still use frischluft and your depth passes on each layer to get a nice falloff, but when the subject is very sharp and the background is far out of focus you will always have strange halos due to not having the information behind your subject.

              Rendering a FG and BG beauty may help.

              B

              Comment


              • #8
                Thanks a lot guys. We will go the layer way for objects in the FG.

                The Lenscare plugin does a pretty good job during our tests.

                One more question: We always render out vrscene-files out of Maya and use a batch file to render out several scenes with vray standalone over the night. As you can't specify the RenderLayer in the command line, can we just select the RenderLayer in Maya and write out a vrscene?

                And why isn't there an VRayObjectID Render Element in VRay for Maya like in the Max version? This would be quite handy? Or is it there?

                Thanks again.

                Comment


                • #9
                  Originally posted by seq View Post
                  One more question: We always render out vrscene-files out of Maya and use a batch file to render out several scenes with vray standalone over the night. As you can't specify the RenderLayer in the command line, can we just select the RenderLayer in Maya and write out a vrscene?
                  Yep, you can do that. Only the selected layer will be exported to the .vrscene file.

                  And why isn't there an VRayObjectID Render Element in VRay for Maya like in the Max version? This would be quite handy? Or is it there?
                  There isn't one as I was not sure how useful it will be; it can be added of course and I'll make a note for it.

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

                  Comment


                  • #10
                    Thanks Vlado for your comment.

                    That would be great if you can add this to your to-do-list. It would be very useful for us if we can easily isolate different objects via a Render Element.

                    Comment


                    • #11
                      objects in maya don't have object id's, but you can apply a vrayObjectProperties node, where you can assign one. Then use the multimatte element to grab those IDs. Just make sure use material is off. Isn't that what you need?

                      Comment


                      • #12
                        Isn't an objectID a little bit different, as it gives you just an integer of the object (Which looks like a color, of course)? The result is the same, of course, a matte.
                        And I actually never used an objectID pass, just RGB mattes, because i never managed to get a really good working objectID pass (with using coverage passes and stuff). But i'm no compositing artist and if anyone wants to share his experience with that, he's more than welcome, of course

                        Comment


                        • #13
                          Sorry for the late reply. We had a deadline today and we are lacking some sleep...

                          David Johnson (http://www.djx.com.au/blog/) made a MEL-script for creating mattes using vray. Seems very useful. Uses the Multi Matte Render Element. Haven't used it yet, but will do this in the next days.

                          Comment

                          Working...
                          X