Rhino cameras

Hi all,
is there a way to import to Radiance cameras set on Rhino?

Thanks

Roberto

Supera i limiti: raddoppia la velocità da 10 a 20 Mega! Risparmia con Tutto Incluso: telefono + adsl 20 mega a soli 26,60 € al mese per un anno!SCONTO DI 160 EURO!http://abbonati.tiscali.it/telefono-adsl/prodotti/tc/tuttoincluso/?WT.mc_id=01fw

Hi all,
is there a way to import to Radiance cameras set on Rhino?

Hi Roberto,

The ViewportProperties command in Rhino will show you XYZ values for the current camera location and target location. The camera location XYZ values can be used directly for the -vp parameter in rpict. The -vd parameter should be derived by subtracting the camera location values from the camera target values, constructing a vector relative to the camera location.

If you're using DIVA for Rhino, this is automatically done when exporting one or multiple camera views.

Alstan

Sorry to double-post, but I almost forgot, the vh and vv horizontal and vertical angle parameters can be roughly determined based on the viewport lens length, since Rhino uses a 35mm camera. If you're always using a the same length camera lens, this only needs to be done once.

VH = 2.75*(180/pi) * atan[(36 / (2 * lenslength))]
VV = 2.75*(180/pi) * atan[(24 / (2 * lenslength))]

The 2.75 is a correction factor that I found from experience approximates the rhino viewport quite closely. Its probably also good practice to take the floor of these values.

Alstan

···

Hi all,
is there a way to import to Radiance cameras set on Rhino?

Hi Roberto,

The ViewportProperties command in Rhino will show you XYZ values for the current camera location and target location. The camera location XYZ values can be used directly for the -vp parameter in rpict. The -vd parameter should be derived by subtracting the camera location values from the camera target values, constructing a vector relative to the camera location.

If you're using DIVA for Rhino, this is automatically done when exporting one or multiple camera views.

Alstan

Hi Roberto,

The ViewportProperties command in Rhino will show you XYZ values for the
current camera location and target location. The camera location XYZ
values can be used directly for the -vp parameter in rpict. The -vd
parameter should be derived by subtracting the camera location values from
the camera target values, constructing a vector relative to the camera
location.

Sorry to double-post, but I almost forgot, the vh and vv horizontal and
vertical angle parameters can be roughly determined based on the viewport
lens length, since Rhino uses a 35mm camera. If you're always using a the
same length camera lens, this only needs to be done once.

VH = 2.75*(180/pi) * atan[(36 / (2 * lenslength))]
VV = 2.75*(180/pi) * atan[(24 / (2 * lenslength))]

The 2.75 is a correction factor that I found from experience approximates
the rhino viewport quite closely. Its probably also good practice to take
the floor of these values.

is there a way to import to Radiance cameras set on Rhino?

I messed around with this some time ago. I've put up my little Rhino script for you to try:

http://luminance.londonmet.ac.uk/pickup/ExportRadianceView.rvb.gz

I find myself hardly ever using it, but maybe it works for you, or at least, you can use it as a starting point for your own Rhino hacking.

There are three obvious bugs (or missing features) which I should mention, so you won't be disappointed:

a) The view angle you get in Radiance doesn't quite match the Rhino one. Maybe Alstan's formulae will get you closer match;

b) I have not found a way of getting the view extends for parallel views in world coordinates. Rhino seems to insist of returning them in pixels;

c) Rhino's view up vector is at 90 degrees to the view direction. This is not incorrect as such, but when you load the Radiance view file in rvu, you'll find that rotating around the z-axis (pivot or rotate commands) yields unexpected results. The fix would be to always define the view vector as 0 0 1, and ignore Rhino's values.

Hope you find the script useful. Please share any improvements you make.

Happy hacking

Axel