How to get eye & camera position coordinates?
-
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
Vp.s. here is a screen capture, with a saved view on the viewport and the maxwell fire window showing a different rendered view.
-
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
-
Thanks a lot Sam!!
will try it tonight...
best
V
Advertisement