sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download

    How to get eye & camera position coordinates?

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    3 Posts 2 Posters 3.9k Views 2 Watching
    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.
    • novenaN Offline
      novena
      last edited by

      Hi forum!
      I'm modelling with sketchup and rendering with maxwell standalone plugin (free), I have noticed when rendering some views the rendered image does not correspond with my SU view, I moved my 3D model 100mt away from the origin point [0,0,0] and the problem was solved...
      I would like to move my saved views the same distance, found a method to create a camera in SU from scratch with eye and camera position coordinates:
      https://developers.google.com/sketchup/docs/ourdoc/camera#eye , but first need to get eye and camera position coordinates of my saved views, any ideas or suggestions on how to get eye and camera position coordinates???
      thanks
      V

      p.s. here is a screen capture, with a saved view on the viewport and the maxwell fire window showing a different rendered view.

      screen-shot01.jpg

      http://hdzarkitektur.wordpress.com/

      1 Reply Last reply Reply Quote 0
      • sdmitchS Offline
        sdmitch
        last edited by

        The camera data for any view can be retrieved by the following

        mod = Sketchup.active_model
        vue = mod.active_view
        cam = vue.camera
        puts "Camera location=#{cam.eye}" #where the camera is
        puts "Camera target=#{cam.target}" #where the camera is pointed
        puts "Camera up=#{cam.up}" #where top of the camera is facing
        
        

        Nothing is worthless, it can always be used as a bad example.

        http://sdmitch.blogspot.com/

        1 Reply Last reply Reply Quote 0
        • novenaN Offline
          novena
          last edited by

          Thanks a lot Sam!!
          will try it tonight...
          best
          V

          http://hdzarkitektur.wordpress.com/

          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