Is there a way of setting up an animation in rhino 6 including a camera “up-vector”/camera tilt?
Specifically I would like to do this from a C# component in GH.
In the rhinocommon documentation I can see CameraPoints and TargetPoints but some way of setting rotation around the camera axis seems to be missing.
Hi Void,
CameraUp is available: https://developer.rhino3d.com/api/RhinoCommon/html/P_Rhino_Display_RhinoViewport_CameraUp.htm
Best, Jess
Jess beat me to it, as I was making a quick camera tumbler as poc:
import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino
import math
viewport = sc.doc.Views.ActiveView.ActiveViewport
upvec = viewport.CameraUp
dirvec = viewport.CameraZ
steps = 180
step = 2*math.pi/180
for i in range(steps):
upvec.Rotate(step, dirvec)
viewport.CameraUp = upvec
rs.Redraw()
-Willem
Thanks guys.
I’m aware of CameraUp in viewport, but what I’m really after is how to set this up with the animation tools.
https://developer.rhino3d.com/api/RhinoCommon/html/Properties_T_Rhino_DocObjects_AnimationProperties.htm
Ideally it would have the option to set an array of up-vectors as well or a method similar to this:
animation.AddFrame(Point3d camPos, Point3d camTarget, Vector3d camUp)