Cycles 4D Environment Object

The cyEnvironment object is what Blender calls the World environment. It provides the facility for adding backgrounds and emitting light to light the scene, usually by using a Background material with an HDR image.

When you create a cyEnvironment object, a Background material is also created and applied to the object. This material will contain an Environment Texture node and you can add an HDRI image to that to generate light in the scene.

In the preferences, you can specify a default HDRI file to load into the texture node. When you first use Cycles 4D, this setting is empty, so it is recommended that you supply a default file in the preferences so there is at least some light when the scene is rendered. You can easily change the HDR used once the cyEnvironment is created.

Interface

There are two tabs in the cyEnvironment interface:

  1. Object tab
  2. HDRI tab

Parameters

Object tab

Ambient Occlusion

This is a way to get some quick ambient occlusion (AO) into a scene without having to add AO nodes to all the materials. Consider this scene, lit by one light with shadows turned off (only so the effect is more easily demonstrated):

In the left-hand pane, AO is turned off in the cyEnvironment. In the middle pane AO is turned on and Distance increased to 50. The scene has actually got brighter - the opposite of what AO is supposed to do. This is because Cycles adds the result of the AO pass to the rest of the image. It has to do that because Cycles cannot multiply two shaders together.

However, you don't use the cyEnvironment AO like this. First an ambient occlusion pass is rendered (to do that, go to the Render Elements tab in the Cycles 4D render settings, and under Core Elements turn on Ambient Occlusion). When the scene is rendered in the picture viewer, switching to the Layer tab and selecting Multipass, the AO pass is visible (in the right-hand pane above).

That AO pass is then composited with the first image in Photoshop or some other image compositor, setting the AO pass to multiply. This is the result:

So that is a fast way to add AO to all scene objects very quickly. If you prefer to use nodes in your materials then you should leave this switch unchecked.

Ambient Occlusion

Turn this switch on to enable scene-wide AO, as described above. Note that you do NOT have to turn this on to enable material-based AO.

Factor

This is simply the strength of the ambient occlusion effect. It ranges from 0 (no AO) to 1 (maximum AO).

Distance

This is the maximum distance between two objects where ambient occlusion will take place. The smaller this value is, the closer objects have to be to see any AO. In the example scene above, leaving this at the default value of 1 would result in virtually no AO.

Mist Pass

These options are only used if the Mist switch is checked in the Render Elements tab of the Cycles 4D render settings. For details of how to generate a mist pass, see the page How To: Generate a Mist Pass.

Start

The distance from the camera where the mist starts to affect objects in the scene.

Depth

The mist is at maximum effect at this depth from the starting distance. In other words, if Start is 500 and Depth is 1000, the maximum mist effect is seen at a distance of 1500.

Falloff

These options control how rapidly the mist effect develops from the Start to the Depth distance. The default is Quadratic; Linear will fall off faster and Inverse Quadratic faster still.

These options have no effect on the background. The background is assumed to be at an infinite distance so the mist always has the maximum effect at that distance. A mist in the real world will cause light to be diffused so the light will appear to be brighter in the mist, and therefore the background will be obscured by the mist and also be made brighter.

Ray Visibility

This section allows you to turn off certain rays for the cyEnvironment object. It's important to realise that you are not turning off these rays for the whole scene but specifically for the environment object. See this example for the effects:

In this scene there are three spheres with a glossy, glass, and diffuse material applied to them from left to right. The scene is lit only by the cyEnvironment object; there are no other lights.

When camera rays are turned off, the background is no longer visible but it still appears in reflections and refractions, and still lights the scene. If diffuse rays are disabled, the background is visible but no longer contributes to direct lighting; there is still indirect lighting from light bouncing off or transmitted through the various objects.

If glossy rays are turned off, the background does not appear in reflections. Note that it is visible in the sphere with the glass material, because those are transmitted rays, not glossy rays. If the transmission rays are disabled, the background appears in reflections but not when refracted. Finally, turning off volume rays has no effect in this scene because the cyEnvironment object does not have a volume shader applied to it.

How to show the background without adding light from it

The problem with using a cyEnvironment object is that by default it will add light to the scene. Suppose you want to see the background without adding light? This is very easy. Just uncheck all the switches in the ray visibility section apart from camera rays. Then the camera will see the background but the background will not contribute to the scene lighting.

Surface

These options affect how the texture is sampled to light the scene. Most of the time you can leave these options at their defaults.

Multiple Importance Sampling

In general, leave this switch enabled if you are using an image map or a texture applied to the environment object, as it results in less noisy images for the same number of samples.

Map Resolution

This is the size of the map used when sampling the background texture. If you increase the size of the map, the image may render a little slower but clearing noise will be faster.

Volume

These three options do the same for the cyEnvironment object as they do in the material settings. Please refer to those settings for more information.

HDRI tab

Using this tab makes it easy to assign an HDR image to the cyEnvironment object.

HDR

This is the image to use. You can select and load the file in the usual way.

What happens if you already have a Background material on the object which uses a different HDRI? The rule is as follows:

  1. If the cyEnviroment object has an HDRI in this link and you change the HDRI in the Environment Texture node, this link field is cleared
  2. If you have an Environment Texture node with an HDRI in it and you add an HDRI to this link field, the file in the node is changed to the one in this link field

In other words, you can only have one HDRI working on this object at any time.

Brightness

Increasing this value will increase the degree of illumination from the HDR image.

Gamma

You can use this control to adjust the gamma of the image.

Hue, Saturation and Value

These are the standard parameters for altering the colour and saturation of the image.

Open HDRI...

Clicking this button will open a dialog box showing smaller version of all HDRI files in a collection. The dialog might look something like this:

The collection location is specified in the Cycles 4D preferences. The 'Collection' menu will show all first-level sub-folders in the collection folder, like so:

Of course, how many folders you see here will depend on your system.

If you click this button and no HDRI files are found in the collection folder, you will be invited to download and install our own starter pack of HDRI files for use with Cycles 4D. This is entirely optional and is not required.

You can change the size of the preview images using the 'Size' menu.