Skip to content

Obq_Atmosphere

Andrew Hazelden edited this page Nov 25, 2016 · 2 revisions

Class

Material

Output

Color RGBA

Synopsis

A shader made for planetary atmosphere, but can also be used as a simple ray marcher.

Warning: This shader was created before Arnold went volume, so I suggest you go with the volume_collector.

Synopsis image

Fig.1 : A planet's atmosphere.

Usage

This is a surface shader (surface port of a material), not a volume shader. You have to put an Arnold Parameter property on the shaded object and uncheck "Opaque".

Usage image

Fig.2 : A cube in fractal smoky sphere.


Volume

Diffuse Color [colorKd]

The diffuse color of media.

Enable 3D color texture [use3dKd]

Enables the evaluation of a 3D texture and not just the surface texture for diffuse color.

Absorption Coefficient [absorption]

The absorption coefficient of the media.

Enable 3D absorption function [use3dAbsorption]

Enables the evaluation of a 3D texture and not just the surface texture for absorption.

Asymmetry [asymmetry]

Asymmetry of the phase function, negative value correspond to back-scattering, 0 is isotropic and positive correspond to forward-scattering.


Radius Falloff

This option was designed for spherical objects like planets. Samples closer to the edge of the sphere absorb less.

Mode [radiusFalloffMode]

The different modes and ways to get center :

Don't use Radius Falloff : should be selected for simple ray marching mode.
Get center from object matrix : use the matrix of the object to find center.
Get center from object center vector : use the object center vector in the "Geo" tab as center coordinates.

Note: In order for the matrix mode to work, you must use the user option preserve_scene_data true.

Start [falloffStart]

Radius ratio at which the falloff start.

Speed [falloffExponent]

Exponent that modifies the rate of the falloff.


Silhouette Falloff

Enable [useBiasGainDot]

Enables a silhouette falloff similar to an incidence camera/surface node.

Bias [biasDot]

Controls the contrast. Values below 0.5 create larger dark areas, values above 0.5 create larger light areas.

Gain [gainDot]

Controls the brightness of the effect.


Geometric Information

Object center [objectCenter]

Center of the sphere. Used for "Get center from object center vector" radius falloff mode.


Ray Marching

Size [stepSize]

Size of each steps in the ray marching process in units. It is important to scale the steps based on the scale of the scene. The bigger the steps, the faster the render.

Jitter ratio [stepJitter]

Random step size ratio modification to prevent artifacts.

Enable maximum ray length [useMaximumRayLength]

Enables a maximum ray length after which the march stops and return accumulated color.

Maximum ray length [maximumRayLength]

Maximum ray length.


Final Opacity Modification (Bias-Gain)

Enable [useBiasGain]

Enables a bias and gain operation on the final opacity.

Bias [bias]

Controls the contrast. Values below 0.5 create larger dark areas, values above 0.5 create larger light areas.

Gain [gain]


Advanced Options

Non-opaque hit compensation [compensateForCloudOpacity]

When a non-opaque object is hit during the ray marching process, a compensation must be done :

Never : don't compensate.
By dropping max opacity : the maximum opacity is lowered by that object's opacity.
By raising total opacity : raises the accumulated opacity so far by that object's opacity [default].

Color/Opactiy compensation [divideColorByOpacity]

Because there will be a double alpha multiplication effect if left as-is for values lower than 1, a compensation must be done, a sort of unpremult operation.

Never : don't compensate.
Before Bias-Gain : unpremult before bias and gain operations [default].
After Bias-Gain : unpremult after bias and gain operations.

Enable for reflection/glossy and refraction rays [secondaryTypesToo]

The ray marching will also occur for reflection and refraction rays and not only camera rays.

Clone this wiki locally