©Anton Podvalny


Introduction


The cameras in V-Ray generally define the rays that are cast into the scene, which essentially is how the scene is projected onto the screen. V-Ray supports several camera types: Standard, Spherical, Cylindrical (point), Cylindrical (ortho), Box, Fish eye, Warped sphere, Spherical panorama and Cube 6x1. Orthographic views are supported too.

In this chapter we'll be interested into the virtual simulation of a physical camera implemented in V-Ray. Its parameters are a reproduction according to the functions of a traditional DSLR camera, film camera and digital video camera, so readers should feel familiar with their meaning. It also makes it easier to use light sources with real-world illumination (e.g. LightIES with physical units, or SunLight and TexSky). We can point out a few advantages of a virtual camera over a real one:

  • Freedom in terms of lens selection
  • Freedom in terms of movement and spatial position
  • Infinite dynamic range

In the next chapter we'll also speak about few effects, which resemble ones produced with a real physical camera:

  • Depth of Field
  • Motion Blur
  • Glares, blooms, flares


You can see in the scene bundle, the file which corresponds to the above screenshot is called Physical_Camera.vrscene. Notice the commented parameters of the camera in the included file physicalCamera_camera.vrscene.

Parameters


Here are some of the settings of the SettingsCamera plugin:

  • type - Camera type: 0 - default, 1 - spherical, 2 - cylindrical point, 3 - cylindrical ortho, 4 - box, 5 - fish-eye, 6 - warped spherical, 7 - orthogonal, 8 - pinhole, 9 - spherical panorama, 10 - cube 6x1. Here's more info about the different type:

    • Default - Allows for the current scene camera to be used (usually a pinhole camera).
    • Spherical - A camera with a spherical lens.
    • Cylindrical (point) - This camera casts all rays from the center of a cylinder. In the vertical direction the camera acts as a pinhole camera, and in the horizontal direction the camera acts as a spherical camera.
    • Cylindrical (ortho) - This camera casts all rays from the center of a cylinder. In the vertical direction the camera acts as an orthographic view, and in the horizontal direction the camera acts as a spherical camera.
    • Box - Six standard cameras placed on the sides of a box, generating a vertical cross format image. This type of camera is excellent for generation of environment maps for cube mapping. The Box camera can also be used for generating irradiance maps for GI: First you would calculate the irradiance map with a Box camera, then save it to a file and finally reuse it with a Default camera that can be pointed in any direction.
    • Fish eye - This special type of camera captures the scene as if it is a pinhole camera pointed at a 100% reflective sphere that reflects the scene back into the camera's shutter, as with using a light probe in HDRI photography. You can use the Dist and FOV settings to control which part of the sphere is captured by the camera. Note that the virtual reflective sphere has always a radius of 1.0.
    • Warped spherical (old-style) - A spherical camera with slightly different mapping formula than the Spherical camera.
    • Orthographic - A camera enabling a non-perspective view similar to the standard Orthographic view in 3ds Max.
    • Perspective - Overrides the scene camera to force it to be a pinhole camera.
    • Spherical panorama - A spherical camera with independent horizontal and vertical FOV selection that is useful for generating latlong images for spherical VR use.
    • Cube6x1 - A variant of the Box camera with the cube sides arranged in a single row. Unlike the Box camera's output, Cube6x1 does not produce an empty space in the output image and is quite useful in generating cubic VR output.
  • height - Specifies the height of the Cylindrical (ortho) camera. This setting is available only when Type is set to Cylindrical (ortho).

  • dist - Applies only to the Fish eye camera. The Fish-eye camera is simulated as a Default camera pointed to an absolutely reflective sphere (with a radius of 1.0) that reflects the scene into the camera's shutter. The Fish eye dist value contorts how far the camera is from the sphere's center (which is how much of the sphere will be captured by the camera). Note: this setting has no effect when the Auto-fit option is enabled.
  • fov - Field of view; if negative, the field of view will not be modified.
  • auto_fit - Controls the auto-fit option of a Fish eye camera. When Auto-fit is enabled, V-Ray will calculate the Fish eye dist value automatically so that the rendered image fits horizontally with the image's dimensions.
  • curve - Applies only to the Fish eye camera. This contorts the way the rendered image is warped. A value of 1.0 corresponds to a real world fish eye camera. As the value approaches 0.0, the warping is increased. As the value approaches 2.0, the warping is reduced. Note: this value controls the angle at which rays are reflected by the virtual sphere of the camera.
  • dont_affect_settings - This is here so we can suppress a SettingsCamera node from affecting the main VRayRenderer sequence and frame data
  • image_planes - Used only to force a re-export of the image plane geometry in Interactive rendering


Here's a comparison of the different camera types:


This example shows how the rays for different camera types are generated. The red arcs in the diagrams correspond to the FOV angles.


Here are some of the settings of the CameraPhysical plugin:

  • type - 0=still camera, 1=movie camera, 2=video camera. Some parameters only apply for one of these types, because of the different types of shutter mechanism. Here's more info on these types:
    • Still camera – simulates a still photo camera with a regular shutter.
    • Cinematic camera – simulates a motion-picture camera with a circular shutter.
    • Video camera – simulates a shutter-less video camera with a CCD matrix.
  • film_width - specifies the horizontal size of the film gate in millimeters. Note that this setting takes into account the system units configuration to produce the correct result. Vertical film gate size is calculated by accounting image aspect ratio (vertical film size = horizontal film size / aspect ratio).
  • focal_length – specifies the equivalent focal length of the camera lens. This setting takes into account the system units configuration to produce the correct result.
  • specify_fov - true to use explicit field of view and false to use the focal length
  • fov - To use the value set here, also set specify_fov=1. Otherwise the fov from SettingsCamera and RenderView is used. When enabled we can set the field of view directly without having to set up the film_width and focal_length.
  • zoom_factor – specifies a zoom factor. Values greater than 1.0 zoom into the image; values smaller than 1.0 zoom out. This is similar to a blow-up rendering of the image. For more information, see The Zoom Factor example below.
  • lens_shift - the vertical lens shift. Useful for simulating tilt shift effect.
  • horizontal_shift - the horizontal lens shift. Useful for simulating tilt shift effect.
  • horizontal_offset – horizontally offsets the field of view of the camera as a fraction of the current view. For example, a value of 0.5 will offset the camera one-half of the current image width to the left.
  • vertical_offset – vertically offsets the field of view of the camera as a fraction of the current view. For example, a value of 0.5 will offset the camera one-half of the current image height upwards.
  • vignetting - Note that the default value is 1.0. You may want to set to 0.0 to have a uniformly exposed frame.
  • white_balance - allows additional modification of the image output. Objects in the scene that have the specified color will appear white in the image. Note that only the color hue is taken into consideration; the brightness of the color is ignored. This color tint may be counter-intuitive. If you set it to blue, you'll get a warm image and so on.


Sampling parameters

  • f_number – determines the width of the camera aperture and, indirectly, exposure. If the Exposure option is enabled, changing the f-number will affect the image brightness.
  • shutter_speed – the shutter speed, in inverse seconds, for the still photographic camera. For example, shutter speed of 1/30 s corresponds to a value of 30 for this parameter.
  • shutter_angle – shutter angle (in degrees) for the cinematic camera.
  • shutter_offset – shutter offset (in degrees) for the cinematic camera.

Bokeh parameters

  • blades_enable - 1- enable Bokeh effects; 0- disable Bokeh effects
  • blades_num - number of blades - 0 means its disabled
  • blades_rotation - blade rotation in radians
  • center_bias - center bias
  • anisotropy - Bokeh anisotropy
  • optical_vignetting - optical vignetting ("cat's eye bokeh") amount


Distortion parameters

  • distortion_type - 0=quadratic, 1=cubic, 2=lens file from lens_file parameter; 3=texture from distortion_tex parameter
  • distortion_tex - texture for distortion
  • lens_file - LENS file with camera lens-type image distortion description


More parameters

  • latency – CCD matrix latency, in seconds, for the video camera.
  • ISO - Film speed (ISO): determines the film power (i.e. sensitivity). Smaller values make the image darker, while larger values make it brighter.
  • specify_focus - Whether to take into account the focus_distance param.
  • focus_distance - Focus distance in world units.
  • targeted - 1-specify a target distance; 0-target distance not specified
  • target_distance - the distance to the camera target for a targeted camera.
  • dof_display_threshold - display threshold for depth-of-field
  • exposure - 1- exposure color correction; 0-disable exposure color correction
  • bmpaperture_enable - Set to 1 to use the bmpaperture_tex texture.
  • bmpaperture_resolution - texture sampling resolution for the importance sampling
  • bmpaperture_tex
  • bmpaperture_affects_exposure - This will make the Bitmap Aperture's size and shape affect the exposure
  • enable_thin_lens_equation - Determine if the focus distance will affect the fov or focal length calculation due to thin lens equation
  • use_dof - Disabled by default. Set to 1 for ray-traced DoF. Note that just like in DSLRs the depth of the in-focus field depends on aperture and focus distance.
  • use_moblur - Disabled by default. Set to 1 to enable camera motion blur.

The CameraPhysical plugin is a settings plugin (singleton). It modifies the way camera rays are shot for effects like DoF (depth of field) and distortion and how they are integrated into the image - exposure. The position and orientation of the camera is still defined by RenderView.

The following parameters have linked effect: * Vignetting increases with FOV * FOV is dependent on focus distance * Extreme close-ups can make FOV visibly smaller * Close-up focus affects brightness * Film gate size affects DOF

Examples


Zoom Factor

This parameter determines the zooming (in and iut) of the final image. It doesn't move the camera forward nor backwards.

The images in this example show the effect of changing the Zoom factor. The following constant settings were used for some parameters: Exposure is on, F-Number is 8.0, Shutter speed is 60.0, Film speed (ISO) is 200.0, Vignetting is on, White balance is white.


Zoom factor = 0.5

Zoom factor = 1.0

Zoom factor = 2.0

0.5
2



Exposure Control - F-Number (F-Stop)

Note: All the images from the following examples are rendered using the VRaySun and VRaySky set with their default parameters.

The F-Number parameter controls the aperture size of the virtual camera. Lowering the F-Number value increases the aperture size and so makes the image brighter since more light enters the camera. In reverse, increasing the F-Number makes the image darker, as the aperture is closed. This parameter also determines the amount of the Depth of Field (DOF) effect. See the Depth of Field Example for more information. 

The images in this example show the effect of changing the F-Number. The following constant settings were used for some parameters: Exposure is on, Shutter speed is 60.0, Film speed (ISO) is 200, Vignetting is on, White balance is white.


F-Number = 4.0

F-Number = 5.6

F-Number = 8

4.0
8.0



Vertical Tilt (camera correction)

Using this parameter you can achieve the so called "2 point perspective". To have that done automatically, leave default value:


Exposure, Field of View and Focus Distance

The focus distance of the physical camera (as specified by either the camera target distance or the Focus distance parameter) affects the exposure of the image and the field of view for the camera, especially if the focus distance is close to the camera. This is an effect than can be observed with real-world cameras as demonstrated in the images below.

The set up is a white board with a small black rectangle and a camera in front of it. Notice how changing the focus distance produces images with different brightness even though the illumination and all other camera parameters are the same in both cases. Also notice the change in the field of view.


Vignetting

This parameter control the optical vignetting effect of real-world cameras.


Disabled
1.0



White Balance

Using the White balance color allows additional modification of the image output. Objects in the scene that have the specified color will appear white in the image. E.g. for daylight scenes this should be peach color to compensate for the color of the sun light etc.

The images in this example show the effect of changing the White balance. The following constant settings were used for some parameters: Exposure is on, F-Number is 8.0, Shutter speed is 200.0, Film speed (ISO) is 200.0, and Vignetting is off.


White balance is white (255, 255, 255)

White balance is blueish (196, 226, 255)

White balance is warmer (240, 200, 114)




Exposure Control – Shutter Speed

The Shutter speed parameter determines the exposure time for the virtual camera. The longer this time is (small shutter speed values), the brighter the image would be. In reverse - if the exposure time is shorter (high shutter speed value), the image would get darker. This parameter also affects the motion blur effect, see the Motion Blur Example.

The images in this example show the effect of changing the Shutter speed. The following constant settings were used for some parameters: Exposure is on, F-Number is 8.0, Film speed (ISO) is 200, Vignetting is on, and White balance is white.


Shutter speed is 10.0

Shutter speed is 60.0

Shutter speed is 125.0

10.0
125.0




Exposure Control - Film Speed (ISO)

The Film speed (ISO) parameter determines the sensitivity of the film and consequently the brightness of the image. If the ISO value is high (film is more sensitive to light), the image is brighter. Lower ISO values mean that the film is less sensitive and produces a darker image.

The images in this example show the effect of changing the Film speed (ISO). The following constant settings were used for some parameters: Exposure is on, Shutter speed is 60.0, F-Number is 8.0, Vignetting is on, and White balance is white.


Film speed (ISO) is 200

Film speed (ISO) is 400

Film speed (ISO) is 800

200
800


  • No labels
Was this helpful?