比較バージョン

キー

  • この行は追加されました。
  • この行は削除されました。
  • 書式設定が変更されました。

...

 

 

Volume rendering is a critical part of any Houdini pipeline and RenderMan continues to add features and improvements. The PxrVolume material is designed to produce fast and accurate results using single or multi-scatter effects.

You can simply reference VDB files or allow the conversion to happen to VDB in-render when tuning in Houdini. (The takeaway being that it must be in OpenVDB form to be ingested by RenderMan.)

 

...

Houdini may export volumes at an unexpected framerate than what RenderMan expects. Note the documentation hint below:

...

ボリュームレンダリングは、あらゆるHoudiniパイプラインの重要な部分であり、RenderManは機能と改良を加え続けています。 PxrVolumeマテリアルは、シングルまたはマルチスキャッタエフェクトを使用して、素早く正確な結果を生成するように設計されています。

Houdiniでチューニングする場合は、単純にVDBファイルを参照するか、変換がレンダリング内で実行されるようにすることができます。(RenderManに取り込むためにはOpenVDB形式である必要があります)

...

 

Houdiniでは、RenderManが想定しているフレームレートとは異なるフレームレートでボリュームをエクスポートすることがあります。以下のドキュメントのヒントに注意してください。


速度ベクトル値は、フレーム全体に対する相対値であることが期待されます。1秒あたりの単位で測定されたベロシティデータを扱う場合、正しい画像のために1秒あたりのフレーム数(例:1/24.0)でデータをスケールする必要がある場合があります。

 

PxrVolume is a material that can be used to render volumetric effects which can vary wildly in complexity, including:

  • Constant fog (a constant homogeneous volume with single scattering);

  • Smoke (a heterogeneous volume where single scattering suffices);

  • Fire (a heterogeneous volume with emissive properties);

  • Clouds (a heterogeneous volume where multiple scattering is usually required)

PxrVolume is intended to be a basic material that takes as input a small number of volumetric properties. Modeling of complicated volume properties should either be handled by upstream nodes, or baked into a volumetric file format such as OpenVDB by a simulation tool.

Users of PxrVolume should be aware of the difference between homogeneous volumes and heterogeneous volumes: homogenous volumes have a constant density and color, whereas heterogeneous volumes have varying density and/or color. Heterogeneous volumes are typically much slower (and noisier) to render than homogeneous volumes.

PxrVolume is a dedicated volume shader, optimized for dealing with "pure" volumes. It cannot deal with any surface effects such as refraction or reflection at a boundary between two different types of media, so you cannot use PxrVolume to render things like murky glass or water surfaces. If you are looking for shader that can do surface effects, along with a limited amount of volumetric effects, take a look at the single scattering parameters of PxrSurface.

...

PxrVolumeは、以下のような複雑なボリューメトリックエフェクトのレンダリングに使用できるマテリアルです。

  • 霧(単一の散乱を持つ一様なボリューム)

  • 煙(単一の散乱で十分な不均一なボリューム)

  • 火(放射性の特性を持つ不均一なボリューム)

  • 雲(通常、多重散乱を必要とする不均一なボリューム)

PxrVolumeは、基本的なマテリアルとして、少量のボリュームプロパティを入力として受け取る目的としています。複雑なボリュームプロパティのモデリングは、上流のノードで処理するか、シミュレーションツールでOpenVDBなどのボリュームファイル形式に焼き付ける必要があります。

PxrVolumeのユーザーは、一様ボリュームと不均一ボリュームの違いに注意する必要があります。一様ボリュームは密度と色が一定であるのに対し、不均一ボリュームは密度や色が変化します。不均一ボリュームは、一様ボリュームに比べて、一般的にレンダリングに時間がかかります(ノイズも多くなります)。

 

PxrVolumeは、「純粋な」ボリュームを扱うために最適化された、専用のボリュームシェーダです。PxrVolumeは、異なる種類の媒質の境界での屈折や反射などのサーフェイス効果を扱うことができないため、濁ったガラスや水面などのレンダリングには使用できません。

サーフェス効果と限られたボリューム効果を同時に処理できるシェーダを探している場合は、PxrSurfaceのシングルスキャッタリングパラメータを参照してください。

Basic Workflows

Constant fog

...

Fog effects that are constant (i.e. involving a homogeneous volume) can be easily modelled using just PxrVolume parameters, without any input connections. This provides the most efficient rendering.

For any fog effects that enclose the camera or envelop light sources, we require that PxrVolume be attached to a RiVolume object. Otherwise, PxrVolume can be attached to any closed piece of geometry in order to create simple effects such as a shaped region.

If depth attenuation is the only effect that is required, the Diffuse Color can be set to black: light is not scattered by the volume, it is only absorbed, and Density is the only parameter that is important. Otherwise, the diffuse color needs to be set to the color of the fog.

 

Smoke

...

For heterogeneous media like smoke, the typical approach is to bake the properties of the smoke into a file like an OpenVDB file. The OpenVDB file would contain a small number of properties including the density, the velocity (if using motion blur), and possibly the albedo. The OpenVDB should be attached to a RiVolume and read using the impl_openvdb plugin. The name of the density property of the OpenVDB file is then used directly with the PxrVolume Density Float PrimVar parameter.

Smoke tends to have a very low albedo, so a dark color is used for the Diffuse Color parameter. (If the color is baked into the OpenVDB file, a PxrPrimVar node can be used to extract the color property from therein.) Because of this low albedo, there is usually very low amounts of light that have scattered multiple times in the volume, so Multiple Scattering can be left turned off, and Samples can be increased beyond 1 to provide faster rendering.

Since smoke is typically isotropic, the Anisotropy settings can be left at their default. The Equiangular weight can be left as is if it is expected that there are light sources near to, or within the volume, or set to 0.0 if no light sources are expected to be anywhere close to the volume.

...

 

 

Clouds

...

Clouds are very difficult volumes to render, because the aggregate behavior of water droplets and their interaction with light is a complicated phenomenon. Unlike smoke, the light that reaches the eye from a cloud has typically bounced inside the cloud tens or hundreds of times. On top of that, the scattering behavior (the way light bounces inside the cloud) is very complicated, as it involves both forward scattering and backwards scattering, with multiple peaks for both.

A typical approach to modeling the cloud itself is to bake the density of the cloud into a file like an OpenVDB file, and the name of the density property of the OpenVDB file would then used directly with the PxrVolume Density Float PrimVar parameter. Clouds typically reflect all light, so a simple Diffuse Color of (1, 1, 1) is sufficient. In order to capture the complicated light behavior of the cloud itself, Multiple Scattering is required, along with setting a Primary and Secondary Anisotropy. The settings for anisotropy below reflect a physics based approximation to the complicated scattering behavior of real clouds. Because multiple scattering is used, the samples parameter is unused and can be set to 1. Finally, if there are no light sources inside the clouds themselves, Equiangular weight can be set to 0.0 as equiangular sampling would provide no benefit. (On the other hand, in the case of stormy weather where lights might be placed inside the clouds to simulate lightning flashes, equiangular sampling might prove beneficial.)

Note that scattering in the volume is controlled by the Max Path Length parameter in the chosen integrator and not the individual diffuse and specular trace depths. You can find more information on this under the section below called Multiple Scattering.

 

 

...

 

Advanced Workflows

Crepuscular Beams

...

Crepuscular beams (sometimes called "God rays") is simply the result of light scattering in a volume. When this light is isolated into beams (for example, the few rays of sunlight that escape through a forest canopy) the contrast between the parts of the volume that scatter light and the rest of the volume leads to a striking effect.

In order to efficiently render crepuscular beams, it is important to try to maximize the effect of direct lighting - i.e. maximize the volume that can directly trace a path to a light source. If the volume must trace a path to a light source indirectly by going through another surface or material, the convergence of the beams may be very slow and unacceptably noisy. In the image above, the stained glass window on the right is modelled as "thin glass": instead of relying on a secondary material bounce to refract through the glass, shadow rays from the volume that trace towards the light source are unimpeded (do not refract), and rely only on the shadow tinting behavior of the stained glass material. The "thin" parameter of PxrSurface (located under the glass parameters) allows one to achieve exactly this optimization.

 

Performance Suggestions

Density is the most critical property of a volume. It is a measure of both how much light is absorbed and scattered by the volume. Volume integration may require many billions of density evaluations over the course of a single render, so it is important to ensure that the renderer can evaluate the density as quickly as possible. This is where baking a complicated signal to a volumetric file format such as OpenVDB can be useful, as it means the renderer can simply look up the value from the data. For best performance, we highly recommend using the PrimVar density parameters if at all possible, rather than using an input connection, even if that input connection is just a single PxrPrimVar node.

For heterogeneous volumes using the RiVolume primitive, at the beginning of the render, PxrVolume will automatically compute density everywhere inside the volume and use this information over the course of the render to greatly speed up the density sampling. The accuracy of this computation (as well as the accuracy of deformation motion blur) is controlled by the dice attribute micropolygonlength . Setting the micropolygonlength to a low number will result in a very accurate density estimation, but may cause the initial computation to take a long time (manifesting as a slow first rendering iteration) and may also cause the renderer to use a lot of memory. Setting this value too high will lead to a less accurate density estimation, which may cause isolated pockets of very high density in the volume to be missed. For a 2K render, we recommend that a setting of 5 or more be used, unless deformation motion blur requires a lower setting. If the camera is passing through or near the volume it might be advisable to change the dicing projection from planar to world or spherical. You may lose some details near the camera but it might avoid creating lots of data near the lens.

Emissive volumes may be very slow to converge, especially if they are the only light source in the scene - it may require many hundreds or even thousands of camera samples to render a noise free image. Until volumes are supported as full light sources that can be used for direct lighting, we suggest that emissive volumes be used very sparingly.

Multiple Scattering is a very costly effect, both because it means the light is bouncing that many more times in a volume, but also because PxrVolume cannot take more samples itself (the Samples parameter is ignored), and is at the mercy of the Integrator settings. Moreover, multiple scattering may slow down the convergence of objects behind the volume. Therefore we suggest that whenever possible, multiple scattering should be avoided. For media with low albedo, multiple scattering adds very little to the final render. For some media like clouds, whose light transport involves many tens or hundreds of light bounces, unfortunately multiple scattering may be unavoidable.

When using single scattering, it is often much more cost effective to increase the number of Samples taken in the volume in order to improve the convergence, rather than increase the number of camera samples.

Equiangular sampling improves the convergence of volumes that are lit by lights that are inside or near the volume, but otherwise slows down the volume if the lights are far away. The default value of equiangular sampling (0.5) is a compromise that works acceptably across most scenes. If you know that there are no light sources near the volume, then the equiangular weight should be set to 0.0 in order to speed up the rendering. Equiangular sampling is disabled for multi-scatter volumes in versions 21.5 and later.

Equiangular sampling may cause negative values in the volume alpha with low samples. This is a side effect of how the parameter works. Two solutions would be to set the Equiangular Weight to 0.0 or allow more samples to be taken which will correctly average out to a positive number.

...

Parameters

Diffuse Color

The color of the volume. Default is white (1,1,1). Making a connection on this parameter will create a heterogeneous volume.

If you are familiar with scattering, absorption, and extinction coefficients, note that the diffuse color here is the scattering albedo, which is the scattering coefficient divided by the extinction coefficient.

  

...

Emit Color

The emissive color of the volume. This is useful for modeling effects such as phosphorescent fog or fire. Default is black (0,0,0), i.e. the volume will not emit light. The following images demonstrate an emit color setting of (1, 1, 1) and (5, 2.5, 2.5), with no other light sources in the scene.

 

...

Multiple Scattering

This parameter is used as a hint as to whether the volume should compute indirect illumination inside the volume (also known as multiple scattering, because light will scatter more than once inside the volume). If the multiple scattering parameter is set to 0, and the integrator respects this hint, PxrVolume will only perform single scattering: points inside the volume will only be lit directly by light sources. If set to 1, points inside the volume will be lit by indirect illumination as well. The first image below has multiple scattering set to 0, i.e. it is a single scatter volume. The middle image has multiple scattering turned on, with 2 bounces of light. The right image has multiple scattering turned on with 4 bounces of light.

  

...

For very dense volumes with high anisotropy, it is often the case that light will scatter many times inside the volume before reaching the eye, and multiple scattering is the only way to achieve the correct look. It is also often the only way to correctly render certain effects such as volume caustics. On the other hand, multiple scattering can be very expensive, which is why the parameter defaults to 0 (off). Moreover, when rendering homogeneous volumes, turning off multiple scattering may result in less noise for directly lit surfaces behind the volume.

Note that due the nature of their algorithm, some integrators (in particular, bidirectional path tracers such as PxrVCM) have no choice but to implement multiple scattering of volumes, and therefore will ignore this hint.

Velocity and Motion Blur

Unlike all other geometry types in RenderMan, deformation motion blurred volumes are enabled primarily using Bxdf controls. Enabling deformation motion blur with PxrVolume is straight forward: specify a value for the velocity parameter, which is vector valued. Under the hood, the renderer will automatically use the velocity vector to generate temporal varying data for all varying inputs. (This preprocessing step occurs at the beginning of the render, and will increase the time to first pixel; however, it is necessary in order to greatly increase the efficiency of rendering blurred volumes.) Depending on the data, it may also be necessary for you to expand the displacement bound attribute of the volume container in order to encompass the maximum velocity of any part of the volume; failure to do so may result in clipping artifacts.

Adding a displacement bound to motion blurred volumes is recommended but not required in 21.5+. Currently retrieving this data automatically can be costly. If you find you have clipping, then you should add this parameter.

 

The velocity vector value is expected to be relative to the entire frame. If you are working with velocity data measured in units per second, you may need to scale the data by the number of frames per second (i.e. 1/24.0) for a correct picture.

As noted above: unlike other parameters to PxrVolume, the accuracy of deformation motion blur is directly related to and controlled by the  dice attribute  micropolygonlength . If you find that the fine detail of a motion blurred volume is lost, you may need to decrease this attribute in order to regain the detail. This will have a direct effect on render times and memory. 

Deformation motion blurred volumes do not currently work with the Density Float PrimVar or Density Color PrimVar inputs. You will need to use a PxrPrimVar node connected to either densityFloat or densityColor instead . Typically, this means that any usage of deformation motion blurred volumes with an OpenVDB file will require the use of two PxrPrimVar nodes: one connected to the velocity input, and one connected to the density input, as illustrated below:

...


一様なフォグ効果(同質のボリュームを含む)は、入力接続なしでPxrVolumeパラメータだけで簡単にモデリングできます。これにより、最も効率的なレンダリングが可能になります。


カメラを囲んだり、光源を包んだりするフォグエフェクトの場合は、PxrVolumeをRiVolumeオブジェクトにアタッチする必要があります。それ以外の場合は、PxrVolumeを任意の閉じたジオメトリにアタッチして、形作られた領域などのシンプルなエフェクトを作成できます。


深さの減衰だけが必要な場合は、Diffuse Colorを黒に設定します。光はボリュームによって散乱されず、吸収されるだけなので、重要なパラメータは密度だけです。それ以外の場合は、Diffuse Colorにフォグの色を設定する必要があります。

Smoke

...


煙のような不均一な媒質の場合、一般的なアプローチは、煙のプロパティをOpenVDBファイルのようなファイルに焼き付けることです。OpenVDBファイルには、密度、速度(モーションブラーを使用する場合)、アルベドなどの少量のプロパティが含まれています。OpenVDBはRiVolumeにアタッチして、impl_openvdbプラグインを使って読み込みます。OpenVDBファイルの密度プロパティの名前は、PxrVolume Density Float PrimVarパラメータで直接使用されます。


煙は非常に低いアルベドを持つ傾向があるため、Diffuse Colorパラメータには暗い色が使用されます。(カラーがOpenVDBファイルに焼き付けられている場合は、PxrPrimVarノードを使用してカラープロパティを抽出することができます)。この低アルベドのため、ボリューム内で複数回散乱した光の量は通常非常に少ないので、Multiple Scatteringはオフのままにしておき、Samplesを1より大きくしてレンダリングを高速化することができます。


煙は一般的に等方性媒質であるため、Anisotropyの設定はデフォルトのままで構いません。Equiangular Weightは、ボリュームの近くや内側に光源があると予想される場合はそのままに設定し、ボリュームの近くに光源がないと予想される場合は0.0に設定します。

...


Clouds

...


雲は、水滴の集合体の挙動や光との相互作用が複雑な現象であるため、レンダリングが非常に難しいボリュームです。煙とは異なり、雲から目に届く光は、通常、雲の内部で何十、何百回も跳ね返っています。その上、散乱挙動(雲の内部で光が跳ね返る様子)は、前方散乱と後方散乱の両方を含み、それぞれに複数のピークがあるため、非常に複雑です。


雲の密度を OpenVDB ファイルのようなファイルにベイクし、OpenVDB ファイルの密度プロパティの名前を PxrVolume Density Float PrimVar パラメータで直接使用するのが、雲自体をモデリングする一般的な方法です。雲は通常すべての光を反射するので、単純に Diffuse Color を (1, 1, 1) にしておけば十分です。雲自体の複雑な光の振る舞いを表現するためには、PrimaryおよびSecondary Anisotropyの設定に加えて、Multiple Scatteringが必要です。以下の異方性の設定は、実際の雲の複雑な散乱挙動に対する物理学的な近似値を反映しています。多重散乱が使用されるため、samplesパラメータは使用されず、1に設定することができます。最後に、雲自体に光源がない場合、等角サンプリングでは何のメリットもないため、Equiangular weightは0.0に設定できます。(一方で、嵐のような天候の場合、稲妻の閃光をシミュレートするために雲の中にライトが設置されている可能性があるため、等角サンプリングは有益であると考えられます)。

ボリューム内の散乱は、個々のディフューズおよびスペキュラートレースの深さではなく、選択したインテグレータのMax Path Lengthパラメータによって制御されることに注意してください。この点については、下記のMultiple Scatteringの項で詳しく説明しています。


...

Advanced Workflows

Crepuscular Beams

...


クレパスキュラー・ビーム(「God Ray」と呼ばれることもある)は、単にボリューム内での光の散乱の結果である。光が光線に分離されると(例えば、森の樹冠から抜け出るわずかな太陽光)、光を散乱させるボリュームの部分と他のボリュームの部分とのコントラストが印象的な効果をもたらします。


クレパスキュラー・ビームを効率的に表現するためには、直接照明の効果を最大限に発揮させること、つまり、光源までの経路を直接たどることができるボリュームを最大限に増やすことが重要です。ボリュームが他の表面や素材を経由して間接的に光源までの経路を辿らなければならない場合、ビームの収束が非常に遅くなり、許容できないほどのノイズが発生する可能性があります。上の画像では、右側のステンドグラスの窓が「薄いガラス」としてモデル化されています。ボリュームから光源に向かって伸びる影の光線は、二次的な(屈折しない)材料の跳ね返りに頼るのではなく、ステンドグラスの材料の影の色合いの動作にのみ頼っています。PxrSurfaceの "thin "パラメータ(glassパラメータの下にある)を使用すると、まさにこの最適化を実現することができます。

Performance Suggestions


Densityは、ボリュームを表す最も重要な特性です。ボリュームでの光の吸収量と散乱量の両方を表すものです。ボリュームの統合では、1回のレンダリングで何十億回もの密度評価が必要になることがありますので、レンダラーができるだけ早くdensity(密度)を評価できるようにすることが重要です。そこで、複雑な信号をOpenVDBなどのボリュームファイル形式に変換しておくと、レンダラーがデータから値を探すだけで済むので便利です。最高のパフォーマンスを得るためには、入力接続を使用するのではなく、可能な限りPrimVar densityパラメータを使用することを強くお勧めします(入力接続が1つのPxrPrimVarノードであっても同様です)。


PxrVolume は、RiVolume プリミティブを使用した不均一ボリュームの場合、レンダリング開始時にボリューム内のあらゆる場所の密度を自動的に計算し、この情報をレンダリング中に使用して密度サンプリングを大幅に高速化します。

この計算の精度(および変形モーションブラーの精度)は、diceアトリビュートである micropolygonlength によって制御されます。


マイクロポリゴンの長さを小さく設定すると、非常に正確な密度推定が可能になりますが、最初の計算に時間がかかり(最初のレンダリングの繰り返しが遅くなります)、レンダラーが多くのメモリを使用することになります。この値を高く設定しすぎると、密度の推定精度が低くなり、ボリューム内で密度が非常に高い孤立したポケットが見落とされる可能性があります。2Kレンダリングでは、変形モーションブラーで低い設定が必要な場合を除き、5以上の設定を使用することをお勧めします。カメラがボリュームの中や近くを通過する場合は、dicing projectionを平面からワールドまたは球体に変更することをお勧めします。カメラの近くではディテールが失われるかもしれませんが、レンズの近くでは大量のデータを作らずに済むかもしれません。


Emissive Volumeは収束に非常に時間がかかる場合があり、特にシーン内の唯一の光源である場合は、ノイズのない画像をレンダリングするのに何百、何千ものカメラサンプルが必要になることがあります。ボリュームが直接照明に使用できる完全な光源としてサポートされるまでは、Emissive Volumeの使用は控えめにすることをお勧めします。


Multiple Scattering(多重散乱)は非常にコストのかかる効果です。光がボリューム内でより多くの回数跳ね返ることを意味するだけでなく、PxrVolume自身がより多くのサンプルを取ることができず(Samplesパラメータは無視されます)、Integratorの設定に翻弄されるからです。さらにMultiple Scatteringは、ボリュームの後ろにあるオブジェクトの収束を遅らせる可能性があります。そのため、可能な限りmultiple scatteringを避けることをお勧めします。アルベドが低い媒質の場合、多重散乱は最終的なレンダリングにほとんど影響しません。雲のように、光の輸送が何十、何百回もの光の跳ね返りを伴うような媒質では、残念ながら多重散乱は避けられないかもしれません。


Single Scattering(単一散乱)を使用する場合、カメラのサンプル数を増やすよりも、収束性を向上させるためにボリューム内のサンプル数を増やす方がはるかにコスト効率が良いことが多いです。


Equiangular sampling(等角サンプリング)は、ボリュームの内部または近くにあるライトで照らされたボリュームの収束性を向上させますが、ライトが遠くにある場合はボリュームの収束性が低下します。等角サンプリングのデフォルト値(0.5)は、ほとんどのシーンで許容範囲内で動作する妥協点です。ボリュームの近くに光源がないことがわかっている場合は、レンダリングを高速化するために等角度を0.0に設定する必要があります。バージョン21.5以降では、multiple scatteringのvolumeに対してEquiangular samplingが無効になっています。


等角サンプリングでは、サンプル数が少ない場合、ボリュームαが負の値になることがあります。これは、このパラメータの仕組みによる副作用です。解決策としては、Equiangular Weightを0.0に設定するか、より多くのサンプルを採取することで、正しく正の値に平均化することができます。


Anisotropic(非等方性)ボリュームは、サンプリングの性質上、等方性ボリュームよりも収束が遅くなる傾向があります。

Parameters

Diffuse Color


ボリュームの色です。

デフォルトは白(1,1,1)です。このパラメータで接続を行うと、不均一なボリュームが作成されます。


散乱係数、吸収係数、消衰係数に詳しい方は、ここでの拡散色は、散乱係数を消衰係数で割った散乱アルベドであることに注意してください。

...

Emit Color


ボリュームの発光色です。これは、燐光性のフォグや火のような効果をモデリングするのに便利です。デフォルトは黒(0,0,0)で、ボリュームは光を発しません。次の画像は、発光色を(1, 1, 1)と(5, 2.5, 2.5)に設定し、シーン内に他の光源がない状態を示しています。

...

Multiple Scattering


このパラメータは、ボリューム内の間接照明を計算すべきかどうかのヒントとして使用されます(光がボリューム内で複数回散乱するため、多重散乱とも呼ばれます)。多重散乱パラメータが0に設定され、インテグレータがこのヒントを尊重する場合、PxrVolumeは単一散乱のみを実行します:ボリューム内の点は光源によってのみ直接照明されます。1に設定すると、ボリューム内の点は間接照明でも照明されます。下の最初の画像は、多重散乱が0に設定されており、単一散乱ボリュームです。真ん中の画像は、多重散乱がオンになっており、光が2回跳ね返っています。右の画像は、多重散乱をオンにして、光を4回跳ね返しています。

...


異方性の高い非常に高密度なボリュームでは、光が目に届くまでにボリューム内で何度も散乱することがよくあり、正しい外観を得るには多重散乱が唯一の方法です。また、ボリュームコースティクスのような特定の効果を正しく表現する唯一の方法でもあります。一方で、多重散乱は非常にコストがかかるため、このパラメータのデフォルトは0(オフ)です。さらに、一様なボリュームをレンダリングする場合、多重散乱をオフにすると、ボリュームの背後にある直接照明されたサーフェスのノイズが少なくなることがあります。


なお、一部のインテグレーター(特にPxrVCMなどの双方向パストレーサー)では、アルゴリズムの性質上、ボリュームの多重散乱を実装せざるを得ないため、このヒントを無視します。

Velocity and Motion Blur


RenderManの他のジオメトリタイプとは異なり、変形モーションブラー付きボリュームは、主にBxdfコントロールを使って有効にします。PxrVolumeで変形モーションブラーを有効にするのは簡単で、velocityパラメータにベクトル値を指定します。PxrVolumeで変形モーションブラーを有効にするのは簡単です(この前処理はレンダリングの最初に行われるため、最初のピクセルまでの時間が長くなりますが、ぼやけたボリュームのレンダリング効率を大幅に向上させるためには必要な処理です) 。

データによっては、ボリュームコンテナのdisplacement boundアトリビュートを拡張して、ボリュームの任意の部分の最大ベロシティを包含することが必要な場合もあります。


21.5+では、モーションブラーがかかったボリュームにディスプレイスメントバウンドを追加することが推奨されていますが、必須ではありません。現在、このデータを自動的に取得するにはコストがかかります。クリッピングが発生している場合は、このパラメータを追加する必要があります。


速度ベクトルの値は、フレーム全体に対する相対値であることが期待されます。1秒単位で計測された速度データを扱う場合、正しい画像を得るためには、1秒あたりのフレーム数(例:1/24.0)でデータをスケーリングする必要があるかもしれません。


前述のように、PxrVolumeの他のパラメータとは異なり、変形モーションブラーの精度は、diceアトリビュートのmicropolygonlengthに直接関係し、制御されます。モーションブラーをかけたボリュームの細かいディテールが失われている場合、ディテールを取り戻すためにこのアトリビュートを減らす必要がある場合があります。これは、レンダリング時間とメモリに直接影響します。


変形モーションブラー付きボリュームは現在、Density Float PrimVar および Density Color PrimVar 入力では動作しません。代わりに、densityFloatまたはdensityColorに接続されたPxrPrimVarノードを使用する必要があります。 一般的に、OpenVDBファイルで変形モーションブラ付きーボリュームを使用する場合は、2つのPxrPrimVarノードを使用する必要があります。

...

次の画像は、このシェーダーの設定と、速度グリッドを含むOpenVDBファイルを組み合わせてレンダリングしたものです。左側の画像はブラーなしでレンダリングされ、右側の画像はベロシティ接続が適用されています。

...


Density Parameters


Density Float PrimVar


ボリュームの密度フロートをオーバーライドするジオメトリのプリミティブ変数で、デフォルトでは設定されていません。これを設定するとdensityFloat入力がオーバーライドされ、単にPxrPrimVarパターン接続を使用するよりも効率的です。


OpenVDBファイルなど、ベイクされたボリューム表現を使用するワークフローでは、Density Floatパラメータに接続された入力を使用するのではなく、このパラメータ設定を使用することを強くお勧めします。

Density Float 


ボリュームの密度は、ボリュームによって光がどのように減衰されるかを直接制御します。密度カラーがデフォルト値から変更された場合、密度フロートパラメータは密度カラーによって上書きされます。色付きの影を必要としない限り、密度カラーパラメータよりもこのパラメータを設定した方が、ボリュームのレンダリング効率が向上します。


このパラメータに入力接続を行うと、不均一なボリュームが作成されます。

密度は、消光係数(吸収係数と散乱係数の和)とも呼ばれます。

以下の画像は、左から密度0.1、0.25、2.0の場合の例です。

...

Density Color PrimVar


ボリュームのdensityColorをオーバーライドするジオメトリのプリミティブ変数で、デフォルトでは設定されていません。これを設定するとdensityColor入力がオーバーライドされ、単にPxrPrimVarパターン接続を使用するよりも効率的です。


ベイクされたボリューム表現(OpenVDBファイルなど)を使用するワークフローでは、「Density Color」パラメータに接続された入力を使用するよりも、このパラメータ設定を使用することを強くお勧めします。

Density Color


ボリュームの密度は、ボリュームによって光がどのように減衰するかを直接制御します。つまり、ボリュームがどのように影を落とすかに直接影響します。密度の色がデフォルト値から変更された場合、密度の色パラメータは密度の浮動小数点数よりも優先されます。

ボリュームからの色付きの影が必要ない場合は、density floatパラメータを設定し、density colorパラメータはそのままにしておくと、ボリュームのレンダリング効率が向上します。


このパラメータに入力接続を行うと、不均一なボリュームが作成されます。


密度は、消光係数(吸収係数と散乱係数の和)とも呼ばれます。


下の図は、左から(1.0, 0.25, 0.25)、(2.0, 0.25, 0.25)、(5.0, 0.25, 0.25)の密度の色を表しています。Rチャンネルの方がボリュームの密度が高いため、より多くの赤色光が散乱され、シアン色の寄与が残っていることに注意してください。

...


Max Density


Max Densityパラメータは、不均一なボリュームでのみ使用され、ボリュームのサンプリングに使用されるステップサイズを制御します。正しく偏りのないレンダリングを行うためには、最大密度はボリューム内で発生するどの密度よりも高くなければなりません。最大密度の値を大きくすると、ボリュームをサンプリングするために多くのステップが必要になるため、レンダリングが遅くなることがあります。最大密度を小さくしすぎると、レンダリング速度は速くなりますが、ボリューム内の密度の高い部分がアンダーサンプリングされるため、正しくない(偏った)レンダリングになります。


バージョン20.7以降、RiVolumeに限り、PxrVolumeはボリュームのサブセクションの密度境界を自動的に計算し、この情報を使用してレイ上のステップサイズを変化させます。これは、ボリュームの密度の高い部分でのみ、より多くのステップが実行されることを意味します。したがって、非常に不均質なボリュームでは、最大密度に高い値を設定しても、ボリューム全体に悪影響を及ぼすことはありません。実際には、このパラメータを非常に高い値に設定して、それ以上気にしないようにすることも可能です。


Max Densityのデフォルト値は1.0です。

Anisotropy Parameters


Primary Anisotropy


ボリュームが光を散乱させる方向を制御します。Primary Anisptropyパラメータは、-1から1の範囲で設定でき、デフォルトは0です。0の値は、ボリュームが等方的であることを意味します。つまり、光はすべての方向に同じ確率で散乱します。0より大きい正の値は、ボリュームが前方散乱していることを意味します。入射光が同じ方向(入射光から離れる方向)に散乱する確率が高くなります。異方性の値が0より小さい場合は、ボリュームが後方散乱していることを意味します。入射光が逆方向(入射光の方向に向かって戻る)に散乱する確率が高いことを意味します。


多くのボリューム(煙など)は一般的には等方性がありますが、この性質が更に高いものも存在します。例えば、肉や皮膚などの有機物は前方散乱特性が強い傾向にあります。


このような材料は、光が何度も跳ね返った後に等方的な挙動に収束する傾向があるため、多重散乱が発生した場合、異方性の影響はあまり受けなくなることに注意してください。


以下は、単一方向散乱ボリュームに対する-0.8、0.0、0.8の異方性の例です。

...


ここでは、多重散乱ボリュームの-0.8、0.0、0.8の異方性の例を示します。

...

Secondary Anisotropy and Lobe Blend Factor


ボリューメトリックマテリアルの中には、単一の異方性ローブでは捉えきれない散乱特性を持つものがあります。例えば、雲は非常に複雑な散乱特性を持っています。ほとんどが高度な前方散乱ですが、かなりの後方散乱成分を持っており、暗い雲に見られる”Silver Lining”の原因となっています。このようなマテリアルをレンダリングするには、ボリュームに2つ目の異方性ローブを有効にして、2つの別々のローブ間のブレンド方法を決定するBkend Factorを設定します。Blend Factorが0(デフォルト)の場合は、プライマリの異方性のみが考慮されます。Blend Factorが1の場合は、Secondary Anisotropy(二次異方性)のみが使用され、Blend Factorが0.5の場合は、各ローブが均等に考慮されることを意味します。


下の画像は左から順に、一次異方性=0.0,二次異方性=0.8の単一散乱ボリュームに対して,Lobe Blend Factorを0,0.5,1.0に設定したものです。1枚目と3枚目の画像は、基本的に単一異方性ローブを使用してレンダリングされていることに注意してください。

...


下の画像は左から順に、一次異方性=0.0,二次異方性=0.8の多重散乱ボリュームに対して,Lobe Blend Factorを0,0.5,1.0に設定したものです。1枚目と3枚目の画像は、基本的に単一異方性ローブを使用してレンダリングされていることに注意してください。

...

Sampling Parameters


Equiangular Weight


密度サンプリングではなく、等角サンプリングを使用する確率を設定します。等角サンプリングは、光源に近いボリュームの収束性を向上させますが、密度サンプリングは、密度が高い、または密度が大きく変化するボリュームを扱う場合に、より優れた手法となります。デフォルト値の0.5は、両方の手法が同等に使用され、多重重点的サンプリングと組み合わされることを意味します。ボリュームの密度が高く、光源から離れている場合は、Equiangular Weightを下げることで収束が良くなることがあります。これは、バージョン21.5以降の多重散乱ボリュームには適用されません。

Samples


この設定は、単一散乱ボリュームのサンプル品質を制御します。ボリュームのサンプル数を多くすると、レンダリング時間を犠牲にして、ボリュームの収束性が向上します。しかし、他のオブジェクトがあるシーンではトレードオフとして、画像内の他の場所でコストを増加させることなく、ボリュームがより多くのサンプルを採取し、結果を改善できる可能性があります。収束率はボリューム内でも異なりますので、少ないボリュームサンプル数でもそれなりに収束する領域もあれば、より多くの助けが必要な領域もあるということです。

Multiscatter Optimization


Multiscatter Optimization  ※パストレーサーで有効です。

Extinction Multiplier


このパラメータは多重散乱ボリュームのレンダリング時に使用されます。値は0.0以上でなければならず、デフォルトは1.0で修正の必要はありません。1.0以下の値は消光係数を減少させ、1.0以上の値は消光係数を増加させます。

Contribution Multiplier


この乗数は多重散乱ボリュームレンダリング時に使用されます。このパラメータは、多重散乱イベントの直接照明の寄与を乗算します。値は0.0以上でなければならず、デフォルトの1.0は修正の必要はありません。1.0以下の値では直接照明の寄与が小さくなり、1.0以上の値では大きくなります(これにより、ボリュームがより柔らかく、より半透明に見えることがあります)。