Animation Question - Camera? - Grasshopper2024-03-28T12:44:16Zhttps://www.grasshopper3d.com/forum/topics/animation-question-camera?feed=yes&xn_auth=noThis is a very old thread. Yo…tag:www.grasshopper3d.com,2011-11-11:2985220:Comment:4729312011-11-11T16:34:28.579ZVicente Solerhttps://www.grasshopper3d.com/profile/VicenteSoler
<p>This is a very old thread. You can still use old code using the legacy VB.NET component.</p>
<p>The modern code to achieve the same thing is:</p>
<p><em>doc.Views.ActiveView.ActiveViewport.SetCameraLocations(x, y)</em></p>
<p>This is a very old thread. You can still use old code using the legacy VB.NET component.</p>
<p>The modern code to achieve the same thing is:</p>
<p><em>doc.Views.ActiveView.ActiveViewport.SetCameraLocations(x, y)</em></p> Hi Peter,
Have you used horst…tag:www.grasshopper3d.com,2011-11-11:2985220:Comment:4726432011-11-11T08:07:27.313ZKenneth cheunghttps://www.grasshopper3d.com/profile/CheungShiuLun
<p>Hi Peter,</p>
<p>Have you used horster before? I think that may serve what you want.</p>
<p>You can adjust the location of camera, target point & lens length from within gh. You may put a slider to evaluate the camera path to a point and set it as the camera location.</p>
<p><a href="http://www.grasshopper3d.com/group/horster-tools">http://www.grasshopper3d.com/group/horster-tools</a></p>
<p> </p>
<p>Kenneth</p>
<p> </p>
<p>Hi Peter,</p>
<p>Have you used horster before? I think that may serve what you want.</p>
<p>You can adjust the location of camera, target point & lens length from within gh. You may put a slider to evaluate the camera path to a point and set it as the camera location.</p>
<p><a href="http://www.grasshopper3d.com/group/horster-tools">http://www.grasshopper3d.com/group/horster-tools</a></p>
<p> </p>
<p>Kenneth</p>
<p> </p> vicente - does this code stil…tag:www.grasshopper3d.com,2011-11-11:2985220:Comment:4728522011-11-11T08:01:10.500Zali.khjhttps://www.grasshopper3d.com/profile/alikhj
<p>vicente - does this code still work with the latest version of grasshopper?</p>
<p> </p>
<p>i setup a componenet but nothing happens with your instructions - i've made sure perspective is active.</p>
<p> </p>
<p>please let me know!</p>
<p> </p>
<p>thanks!</p>
<p>vicente - does this code still work with the latest version of grasshopper?</p>
<p> </p>
<p>i setup a componenet but nothing happens with your instructions - i've made sure perspective is active.</p>
<p> </p>
<p>please let me know!</p>
<p> </p>
<p>thanks!</p> Well, sorry for bothering you…tag:www.grasshopper3d.com,2009-08-05:2985220:Comment:163562009-08-05T16:18:09.197ZPeter Varohttps://www.grasshopper3d.com/profile/PeterVaro
Well, sorry for bothering you again, but is there any solution for adding lights like this? (two point: one is where the light is, the other one is where it is lightning to) because I made this turntable thing, and all the lights are gone, i mean there are no shadows anymore.. My thought is that maybe the viewport "changing" makes this, so if i create a light in a VB component, it will be fine... what do you think?
Well, sorry for bothering you again, but is there any solution for adding lights like this? (two point: one is where the light is, the other one is where it is lightning to) because I made this turntable thing, and all the lights are gone, i mean there are no shadows anymore.. My thought is that maybe the viewport "changing" makes this, so if i create a light in a VB component, it will be fine... what do you think? Oh!
Thanks a lot, that was p…tag:www.grasshopper3d.com,2009-08-05:2985220:Comment:163332009-08-05T13:28:37.494ZPeter Varohttps://www.grasshopper3d.com/profile/PeterVaro
Oh!<br />
<br />
Thanks a lot, that was pretty easy, as you said. Probably you saved my life..<br />
Thx again,<br />
<br />
hecs
Oh!<br />
<br />
Thanks a lot, that was pretty easy, as you said. Probably you saved my life..<br />
Thx again,<br />
<br />
hecs It's pretty simple actually.…tag:www.grasshopper3d.com,2009-08-05:2985220:Comment:163122009-08-05T10:59:35.957ZVicente Solerhttps://www.grasshopper3d.com/profile/VicenteSoler
It's pretty simple actually. Create a vb.net component with the following code:<br />
<br />
<code>Dim viewport As MRhinoViewport = app.ActiveView.activeviewport<br />
viewport.SetTargetAndCameraLocation(x, y)</code><br />
<br />
The 'x' input is the target point, so input a point to rotate around. The 'y' input is the camera point, you can create a circle (or a fancy spline path), then connect it to a length curve component with a slider and input the resulting point to the 'y' input. Changing the slider value will rotate…
It's pretty simple actually. Create a vb.net component with the following code:<br />
<br />
<code>Dim viewport As MRhinoViewport = app.ActiveView.activeviewport<br />
viewport.SetTargetAndCameraLocation(x, y)</code><br />
<br />
The 'x' input is the target point, so input a point to rotate around. The 'y' input is the camera point, you can create a circle (or a fancy spline path), then connect it to a length curve component with a slider and input the resulting point to the 'y' input. Changing the slider value will rotate the camera around 'x'. This will change the camera/target of the active viewport, so remember have the perspective viewport as active.