Announcement

Collapse
No announcement yet.

Units used on the DOF calculation

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

  • Units used on the DOF calculation

    Hey guys!

    I'm having some troubles with Depth of Field.

    I've read on the documentation that the focal length is always measured in milimeters and the focal distance uses the scene units.

    I've downloaded the manual's example and couldn't achieve the same effect with the unit system set to meters instead of inches. It looks like the whole DOF deal gets broken when i try to render with the model units set to meters.

    Here are some images to show what i mean:
    Inches:

    Meters:


    Inches config:

    Meters config:


    What should i do!?

    Thanks in advance! :-\

  • #2
    Re: Units used on the DOF calculation

    Internally SU always uses Inches. So no matter what unit you have set SU to display, use inches in the V-Ray dialog.
    Please mention what V-Ray and SketchUp version you are using when posting questions.

    Comment


    • #3
      Re: Units used on the DOF calculation

      Originally posted by thomthom
      Internally SU always uses Inches. So no matter what unit you have set SU to display, use inches in the V-Ray dialog.
      That is VERY nice to know, and I have been searching for that information for literally years. I always had a hunch that SU had everything in a given unit behind the scenes...now I can stop telling people that it uses scene units in SU.
      Damien Alomar<br />Generally Cool Dude

      Comment


      • #4
        Re: Units used on the DOF calculation

        Originally posted by dalomar
        Originally posted by thomthom
        Internally SU always uses Inches. So no matter what unit you have set SU to display, use inches in the V-Ray dialog.
        That is VERY nice to know, and I have been searching for that information for literally years. I always had a hunch that SU had everything in a given unit behind the scenes...now I can stop telling people that it uses scene units in SU.
        I've mentioned that a few times on this forum when you've said that. But I suppose you've not visited the threads again.
        Oh well. Now you know.

        A bit more info; SU got a Length type, which the core value is in inches, but when you call .to_s it will print the unit into the current model's unit in a print friendly manner.
        As a metric user I find it very awkward to use inches when I code, but fortunately there's more methods to simplyfy this - such as I can type 1000.mm and that'll be converted into inches.

        I'm not sure if it's new info that's been added there with the recent updates of the API manual, but more is described under the Length class API docs: http://code.google.com/intl/nb/apis/...oc/length.html
        Please mention what V-Ray and SketchUp version you are using when posting questions.

        Comment


        • #5
          Re: Units used on the DOF calculation

          Its a small subtle thing, so I guess I've just missed it. Either that or its just slipped my mind (I think about a lot of things).

          I think the "proper" approach is for geometry to be unitLESS. IOW, everything is stored as just floats in a cartesian coordinate system. If a point is @ 4,0,0 then it might be 4 inches, 4 feet, 4 meters, or 4 kilometers away from the origin, but the units are something that is applied after the fact. This is the way that Rhino does it, and I think its a much better system. I think Max does it about the same, but it defaults to unitless space rather than inches or meters. If for some reason I was going to have a geometry system that was tied to a unit, I'd at least tie it to meters...tying it to inches is just plain stupid...damn americans

          I looked through that length class and that is by far the most USELESS class I have ever seen. Its just a freaking float...that's it. About the only thing that it adds is a unit conversion, which could have easily been added to another class. Instead there's a useless data type...yeaaa, I love you sketchup
          Damien Alomar<br />Generally Cool Dude

          Comment


          • #6
            Re: Units used on the DOF calculation

            thehe

            I find Max's System unit weird. You can set any unit type as system unit. Today I experienced oddities when I tried to render an imported Revit model. The only difference was the system unit - the model got imported into the correct model size, but something made it not render the geometry unless I had the system unit in feet... go figure...
            Please mention what V-Ray and SketchUp version you are using when posting questions.

            Comment


            • #7
              Re: Units used on the DOF calculation

              Ok guys.

              I'm sure i've tested this already but i did it again to show you that it's really broken. Here's some images of what happens when i change the model units to meters and keep the focal distance in inches.




              And yes, i'm using the latest version of SU and VRfSU.

              Thanks for the fast responses!

              Comment


              • #8
                Re: Units used on the DOF calculation

                You haven't ticked the checkbox to override the focal distance.
                Please mention what V-Ray and SketchUp version you are using when posting questions.

                Comment


                • #9
                  Re: Units used on the DOF calculation

                  Oops!

                  That did the trick! Haha... thanks! ;D

                  Comment

                  Working...
                  X