Announcement

Collapse
No announcement yet.

Calculate Z-Depth Script

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

  • Calculate Z-Depth Script

    All,

    Here's a script that will calculate the z depth from selected objects. At this point, the z depth values cannot be directly set through scripting, so this just prints the minimum and maximum depth values to the command line. From there you can past those into the z depth parameters.

    Link to Download:
    http://www.box.net/shared/a4qjw9b40s

    Using Scripts within Rhino:
    http://en.wiki.mcneel.com/default.as...riptSetup.html

    Latest version here:
    http://asgvis.com/index.php?option=c...0.msg30548#new
    Damien Alomar<br />Generally Cool Dude

  • #2
    Re: Calculate Z-Depth Script

    cheers!

    works very well, thanks for posting
    You can contact StudioGijs for 3D visualization and 3D modeling related services and on-site training.

    Comment


    • #3
      Re: Calculate Z-Depth Script

      Hey someone noticed ;D...No problem
      Damien Alomar<br />Generally Cool Dude

      Comment


      • #4
        Re: Calculate Z-Depth Script

        Good job Damien!

        I will still get on my soap box and say that Rhino will give you a Z buffer map if you just ask for it. ;D If there was a way that you could just pop that into your VFB Channel you'd be home free in about 20 minutes worth of coding. The Rhino SDK also exposes the Z Buffer so that you can trace it to match your AA level as well as your render size.

        type ShowZbuffer in your viewport. It's all there, ripe for the picking. I know you guys like to keep things portable, but... this one seems to simple.



        Comment


        • #5
          Re: Calculate Z-Depth Script

          Their called frustrums, and yes they are available within the SDK. I've never said that we can't add this directly within vfr...ultimately, you guys needed the tool, we didn't add it in the last service release, so heres the script. The only added flexibility that this scripts allow is to take into account certain objects...I believe the viewing frustrums that Rhino uses for the display pipeline will take into account all objects that are in view regardless of whether you really care about them or not...either way, this will most likely be in the next full release.
          Damien Alomar<br />Generally Cool Dude

          Comment


          • #6
            Re: Calculate Z-Depth Script

            I dont care what Joe says about you Damien, you're the man. :-*


            ;D

            I'll see Joe saturday and give him a hard time. ;D

            The million dollar question though is really this.

            are you a dark to light man or a light to dark man?

            Comment


            • #7
              Re: Calculate Z-Depth Script

              Yea, I have fun in Chicago...do me a huge favor and write down what Joe says...I'll put it on a shirt and wear it to the office ;D I wish I could be there, but since I just got back from Barcelona at the beginning of last week, I guess I've got my travel's worth ;D

              Originally posted by Travis
              The million dollar question though is really this.
              are you a dark to light man or a light to dark man?
              I'm not really sure exactly what that means (so sorry if the following answer is completely off base), but ultimately, I think we have a lot to do. We need to sit down and get this stuff done...you guys have expressed your wishes, there have been great discussions about them, but its time to get them done. There have been a number of reasons why they haven't happened up until this point, but thats all done and in the past. Now its knocking stuff off the wishlist, working out the kinks in it so you guys can do what you guys do best...make jaw dropping images with V-Ray

              Does that answer your question enough???
              Damien Alomar<br />Generally Cool Dude

              Comment


              • #8
                Re: Calculate Z-Depth Script

                lol I was referring to your choice for ZDepth. Some applications use Black as the foreground and others use White as the foreground. Vray allows for both.

                Me personally I am used to standard height fields of RGB 255 being the foreground or highest elevation in the relief.

                Seeing Joe and Corey was great this weekend, although in the chaos of the event I think I got to spend a total of 15 minutes with them. It was great to see them!

                Comment


                • #9
                  Re: Calculate Z-Depth Script

                  That makes a whole lot more sense now, and I was way off :-[

                  I'm actually a dark to light man and I'll tell you why. As with almost all values in V-Ray, what you see on the screen is not the complete story. Just like colors going beyond white, the Z-Depth will do the same. The good thing is that it will also do the same for black colors as well, going into negative values. When looking at it that way, zdepth settings don't even matter cause the values are there no matter what. Here enters the issue...there isn't a format that will accept negative numbers for colors. Therefore, all of the values beyond white will be retained when you saved, but the values that are negative (below black) will all be thrown out. So, if you set the black point as the closest point, then you'll get all information you need.
                  Damien Alomar<br />Generally Cool Dude

                  Comment


                  • #10
                    Re: Calculate Z-Depth Script

                    ahh the 255+ makes sense to me now and I can see that logic. At the same time though, I think to myself. How far away from the camera would you have to be before you busted the 256 range? And being that its mostly useful for DOF and some other post effects I can't see it making that much of a difference. My brain is having a hard time with that one. It seems more suitable for the actual engine itself and its own internal calculations for the distances between objects. I dunno, i just click buttons

                    Comment


                    • #11
                      Re: Calculate Z-Depth Script

                      If all you do is click buttons, then you are the luckiest clicker in the world. There's something good going on in that head of yours, so give yourself some more credit ;D
                      Damien Alomar<br />Generally Cool Dude

                      Comment


                      • #12
                        Re: Calculate Z-Depth Script

                        heh, I like to call it the brute force software learning technique. If you click enough buttons in the right random order eventually you'll make something decent happen lol.

                        Comment


                        • #13
                          Re: Calculate Z-Depth Script

                          i read all this, but still can't figure out how to use the Zdepth channel in post-production. is there any work flow posted in the forum?
                          www.leobonilla.com

                          Comment


                          • #14
                            Re: Calculate Z-Depth Script

                            Originally posted by leobonilla1985
                            i read all this, but still can't figure out how to use the Zdepth channel in post-production. is there any work flow posted in the forum?
                            My advice - get DOF pro plugin for Photoshop. Dof Pro have a slot for Zdepth files.

                            Comment

                            Working...
                            X