sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Camera - FOV = H unchecked

    Scheduled Pinned Locked Moved Developers' Forum
    6 Posts 4 Posters 518 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      tomasz
      last edited by tomasz

      I have found a model that has a camera that somehow has FOV calculated in non standard way.
      When investigated deeper using Sketchup.send_action(10624) I realized that the FOV=H is unchecked, which is not default way SU calculates FOV.
      Can we somehow set the checkbox back to default state? Can we read the value(s) from the 'Camera' window?

      I have fund out that when I manually, in the Ruby Console, set 'active_view.aspect_ratio' to value != 0 and then Sketchup.active_model.active_view.camera.aspect_ratio=0.0
      the Fov = H is being restored to default state.

      Unfortunately I have hard time doing it from Ruby, even when:

      					Sketchup.active_model.active_view.camera.aspect_ratio=1.5
      					Sketchup.active_model.active_view.invalidate
      					Sketchup.active_model.active_view.camera.aspect_ratio=0
      

      Author of [Thea Render for SketchUp](http://www.thearender.com/sketchup)

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        I noticed the same problem some time ago. There is no way of know if SU calculates the FOV vertically or horizontally.
        I think that when you set the aspect ratio to be larger than the viewport aspect ratio it jumps from V to H. But I have no idea if it's actually the case. Nor have I found if one can detect if the toggle is done manually via that debug window.

        And I was in fact looking at the same problem yesterday - but got no further.

        Thomas Thomassen β€” SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

        1 Reply Last reply Reply Quote 0
        • Chris FullmerC Offline
          Chris Fullmer
          last edited by

          I've also been digging around in this arena recently, but I had not noticed that some models could be altered and saved to use horizontal FOV.... πŸ˜’ That could mess things up.

          Lately you've been tan, suspicious for the winter.
          All my Plugins I've written

          1 Reply Last reply Reply Quote 0
          • JD HillJ Offline
            JD Hill
            last edited by

            Ruby just nees more methods wrapped. On the C++ SDK's ISkpCamera, you have:

            
            virtual HRESULT STDMETHODCALLTYPE 
                get_FieldOfViewIsHeight(/*[out]*/ BOOL *pVal) = 0;
            
            

            Developer - Bella Render

            1 Reply Last reply Reply Quote 0
            • Chris FullmerC Offline
              Chris Fullmer
              last edited by

              That would be a great request. I know just the people to contact πŸ€“

              Lately you've been tan, suspicious for the winter.
              All my Plugins I've written

              1 Reply Last reply Reply Quote 0
              • thomthomT Offline
                thomthom
                last edited by

                Also throw in a mention of the camera shifting that occur at times when using camera.aspect_ratio...

                Thomas Thomassen β€” SketchUp Monkey & Coding addict
                List of my plugins and link to the CookieWare fund

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Buy SketchPlus
                Buy SUbD
                Buy WrapR
                Buy eBook
                Buy Modelur
                Buy Vertex Tools
                Buy SketchCuisine
                Buy FormFonts

                Advertisement