NREL / bifacial_radiance

Toolkit for working with RADIANCE for the ray-trace modeling of Bifacial Photovoltaics
https://bifacial-radiance.readthedocs.io
BSD 3-Clause "New" or "Revised" License
89 stars 48 forks source link

Add scene.hdr camera angle adjustability #482

Closed etoni044 closed 2 weeks ago

etoni044 commented 11 months ago

HDR generated images of the scene from running scene.saveImage() automatically set the view angle to be from the East/West. This works well for south-facing tilted arrays, but results in images that are not particularly useful for visualizing east-west oriented arrays. For example, I am running E-W vertical systems, which result in images like the following: scene-hdr-EW-vertical_3m

It would be useful to add some simple ways to adjust the camera angle for images generated with scene.saveImage.

cdeline commented 2 weeks ago

Yes, this is already possible using scene.saveImage - the view input is passed as a parameter into saveImage, which is the name of a view file in your \views\ directory. The default value is 'side.vp'.

Custom view files can be created and saved to the \views\ directory.

Details on the syntax for .vp files is viewable in the rpict man page:

| -vtt: | Set view type to t. If t is ’v’, a perspective view is selected. | | -vp x y z: | Set the view point to x y z . This is the focal point of a perspective view or the center of a parallel projection.| |-vd xd yd zd: | Set the view direction vector to xd yd zd . The length of this vector indicates the focal distance as needed by the -pd option, described below. | |-vu xd yd zd: | Set the view up vector (vertical direction) to xd yd zd .| |-vh val: | Set the view horizontal size to val. For a perspective projection (including fisheye views), val is the horizontal field of view (in degrees). For a parallel projection, val is the view width in world coordinates.| |-vv val: | Set the view vertical size to val.|

As an example, the default text for 'side.vp' is: rvu -vtv -vp -10 1.5 3 -vd 1.581 0 -0.519234 -vu 0 0 1 -vh 45 -vv 45 -vo 0 -va 0 -vs 0 -vl 0