How to specify output resolution to rvu

When using rvu directly, or through rad, the output resolution scales to the output device. How can I set a pixel dimension of the output device? Can this be set within rad? My output device is X11.

I would like to render landscape aspect ratio images :slight_smile: and would like to better preview what I’m doing.

There’s no standard way to set the rvu window size on startup, but you can resize the window once it opens by grabbing a corner. The aspect ratio is set by the view, and the window is resized to fit within the selected (rubber-band) rectangle while matching the view-specified aspect ratio. The view aspect can be controlled on the command line with the rvu -vh and -vv options. There may also be methods specific to your X11 window manager to tell the window to resize, but I wouldn’t know what those are.

Thanks Greg! I see - there are a variety of X11 window management tools out there I can use :slight_smile:

I would like to clarify my understanding of how setting resolutions and aspect ratios works. Can you confirm my understanding below?

In other renderers, the camera would have a sensor size in mm, a focal length in mm, and a desired picture output resolution in px, such as 1920x1080. For anti-aliasing I would set a “multiplier”, e.g. 2x to render at 2x the output resolution before scaling to the final output resolution. If I had a common sensor size of 35mm, and a focal length of 20.855688mm (yes, I specifically chose that number), are these settings in rad correct to achieve the above numbers?

# 80 degrees vh given by 2*atan(sensor_size/(2*focal_length))
# 45 degrees vv given by 80 * 1080 / 1920
render=-vh 80 -vv 45
# Set output resolution as desired resolution * 2 (for 2x antialiasing)
RESOLUTION=3840 2160
# Use pfilt to scale down the 2x antialiasing
pfilt=-x /2 -y /2

I also noticed that setting render=-x 3840 -y 2160 overrides the RESOLUTION=3840 2160 setting, but in doing so it breaks interactive rendering (rad -o x11). Is this expected behaviour?

Your calculation of 80° is correct, but you need to do something similar to get the -vv setting, i.e.:

2*atan(sensor_size*1080/1920/(2*focal_length))

which gives 50.534°. Radiance doesn’t use sensor size and focal length because it’s an artificial way to get to view angles, and doesn’t extend to work with fisheye views and the like.

As for the rad settings, typically you would specify the final resolution using the RESOLUTION variable, and rad would decide how much to oversample depending on your setting of the QUALITY variable (3x for “high”, 2x for “medium” and 1x for “low”). Also, use the “view” variable rather than “render” to control the view. Something like:

RESOLUTION= 1920 1080
view= v1 -vtv -vh 80 -vv 50.534 -vp [origin] -vd [direction]

The “v1” string above is used in the output picture name, so you can have multiple views and tell them apart. You can also specify this ID with the rad -v option on the command line and the “L” command in rvu.

Thank you Greg! You are absolutely correct and your -vv setting makes much more sense! It all seems to work smoothly now!