1. 程式人生 > >PhoenixFD插件流體模擬——UI布局【Rendering】詳解

PhoenixFD插件流體模擬——UI布局【Rendering】詳解

幾何圖形 ces percent down vertex little mbed generated vector

Liquid Rendering

流體渲染

本文主要講解Rendering折疊欄中的內容。原文地址:https://docs.chaosgroup.com/display/PHX3MAX/Liquid+Rendering 技術分享圖片

主要內容

  • Overview 綜述
  • Actions 基本操作
  • Parameters 參數
    • Ocean
      • Example: Ocean Subdivs
    • Mesh smooth
    • Motion blur
    • Displacement

綜述


The rendering process in Phoenix FD is separated from the simulation, but for ease of operation is performed by the same object that performs the simulation.

在Phoenix FD中渲染過程與仿真是分離的,但是為了操作方便,渲染過程由執行仿真的同一對象執行。

However, this is only true for the grid‘s content, not for the particles contained in the cache file.但是,這只適用於網格的內容,而不適用於緩存文件中包含的粒子。

If you want to render the secondary effect particles (foam, splashes, or drag particles), create a Particle Shader object and connect it to the simulator.

如果你想渲染二級效果粒子(泡沫,飛濺,或拖拽粒子),創建一個粒子著色器對象並將其連接到模擬器。

!If you want to render the particle content of the Simulator (e.g. foam, splashes, or drag particles), create a Particle Shader | PHXFoam object and add the simulator to it.

如果你想渲染模擬器的粒子內容(如泡沫,飛濺,或拖拽粒子),創建一個粒子著色器| PHXFoam對象,並將模擬器添加到其中。

Phoenix FD is able to operate in multiple rendering modes that can be divided into two main branches: volumetrics and surfaces.

The volumetric modes are used for fire and smoke.

3ds Max materials can‘t be used to shade volumetrics, so their shading is described in the Fire and Smoke color rollouts.

The liquid surface of a PhoenixFD simulation is generated from the Liquid Particles.

The particles are converted into a mesh and shaded by the material assigned to the simulator object.

This section contains the controls for this meshing process.

Advanced control over the shading is provided with the PhoenixFDTexture which can be used to drive the properties of a V-Ray material applied to a liquid surface.

For Volumetric rendering, Phoenix FD provides you with the ability to drive the color and opacity of Fire / Smoke simulations through any of the supported channels (such as Smoke, Speed, RGB, etc.), as long as they are present in the cache files.

UI Path: ||Select Liquid Simulator | LiquidSim object|| > Modify panel > Rendering rollout

基本操作


Render Presets... – Opens a menu for loading and saving different presets.打開用於加載和保存不同預置的菜單。

The following options are available:

  • Load from File...
  • Save to File...
  • Default .aur Render Settings
  • Fire/Smoke .aur Fast Render
  • Fire/Smoke from FumeFX
  • Fire/Smoke .vdb from Houdini
  • Liquid .vdb from Houdini
  • Fire/Smoke .vdb from Maya Fluids
  • Fire
  • Fuel Fire
  • Gasoline Explosion
  • Explosion
  • Large Smoke
  • Candle
  • Clouds
  • Cold Smoke

參數


技術分享圖片

Mode | rendMode – Specifies the method for visualizing the grid content.指定可視化網格內容的方法。

Volumetric – Visualizes the content as a standard 3ds Max atmospheric.將內容可視化為標準的3ds Max大氣。

This method is used mostly for fire and smoke.適用於火和煙的模擬。

Volumetric Geometry – This method requires V-Ray.需要V-Ray渲染器。

Used to export deep images and render elements such as normals, velocity, multi matte, etc.用於導出深度圖像,渲染法線、速度、多啞光等元素。

It produces the same result as the Volumetric option by using procedural geometry made up from multiple transparent layers.它使用由多個透明層組成的過程幾何體生成與體選項相同的結果。

Note that the Approximate and Approximate+Shadows options for the Scattering parameter in the Smoke color window are not supported in this mode.

註意,在此模式下不支持煙霧顏色窗口中散射參數的近似和近似+陰影選項。

Volumetric Heat Haze – This method requires V-Ray.需要V-Ray

Produces the same result as the Volumetric option, but adds a heat haze effect when used with the Heathaze parameter.生成與容積選項相同的結果,但是在與Heathaze參數一起使用時添加了熱霧效果。

Isosurface – This method requires V-Ray.需要V-Ray

It produces a procedural isosurface without polygons at render time using the Isosurface Level option.它在渲染時使用isosurface Level選項生成一個沒有多邊形的過程isosurface。

Compared to the Mesh mode, the result is always smooth but will take longer to render.與網格模式相比,結果總是平滑的,但渲染需要更長的時間。

Mesh –The content is converted into a standard 3ds Max mesh using the options in the Mesh Smoothing section.使用網格平滑部分中的選項將內容轉換為標準的3ds Max網格。

Ocean Mesh – The grid content is extended to a flat area, fitting the camera‘s view. In most cases, this mode is used with displacement.

網格內容被擴展到一個平坦的區域,以適應相機的視圖。在大多數情況下,這種模式用於位移。

Note that the ocean surface can be generated only when the liquid touches the sides and the bottom of the grid, which acts as a container for the liquid.

請註意,海洋表面只能在液體接觸網格的邊緣和底部時生成,網格充當液體的容器。

The detail of the mesh extension around the simulator depends on the camera resolution - for each pixel of the viewport or the rendered image, one or several polygons are generated, depending on the Ocean Subdivisions option.圍繞模擬器的網格擴展的細節取決於相機的分辨率——對於viewport或呈現的圖像的每個像素,生成一個或多個多邊形,這取決於Ocean subdivision選項。

Cap Mesh – Only the upper liquid surface is rendered.只渲染上層液體表面。

This mode can be used for swimming pools and other placid liquid surfaces.該模式可用於遊泳池及其它平靜的液體表面。

!If using a Render Cutter for a liquid pouring into a glass or otherwise contained into another refractive object, you may need to set the Mode to Isosurface.

如果使用Render Cutter將液體倒入玻璃中或以其他方式包含到另一個折射對象中,您可能需要將模式設置為Isosurface。

By default, the mode is set to Mesh which may produce artifacts in the rendered image.默認情況下,模式設置為Mesh,這可能會在呈現的圖像中產生工件。

Cutter Geom | usegizmo, gizmo – When enabled, rendering will occur only inside the selected geometric object‘s volume. 當啟用時,呈現將只發生在所選幾何對象的卷中。

Note that the Cutter Geom will not work when the render Mode is set to Volumetric Geometry.註意,當渲染模式設置為體幾何時,刀具Geom將不起作用。

Inverse Cutter | invgizmo – When enabled, rendering will occur only outside of the render cutter.當啟用時,渲染將只發生在渲染工具之外。

This is not the same as a cutter with inverted geometry because any rays that do not intersect the cutter will be shaded as well.

這與具有倒幾何形狀的刀具不一樣,因為任何不與刀具相交的光線也將被著色。

Invert Liquid Volume | solidbelow – By default, grid values above 0.5 are assumed to be liquid, and values below 0.5 are assumed empty.默認情況下,大於0.5的網格值假定為液體,小於0.5的網格值假定為空。

When enabled, the convention switches to the opposite such that values above 0.5 are assumed empty, and values below 0.5 are assumed to be liquid. 當啟用時,約定將切換到相反的位置,即假設大於0.5的值為空,而小於0.5的值為液體。

Isosurface Level | surflevel - Allows you to specify a treshold value for the generation of the liquid surface.允許您指定生成液體表面的閾值。

Grid cells below this value will be ignored.低於此值的網格單元格將被忽略。

By default, the Isosurface Level is set to 0.5 and should only be modified if there is flickering in the generated geometry.默認情況下,Isosurface級別設置為0.5,只有在生成的幾何圖形中出現閃爍時才應該修改。

Isosurface Level is used only in Isosurface, Mesh, Ocean Mesh and Cap Mesh Modes.等值面水平只適用於等值面、網格、海洋網格和帽網格模式。

!The proper value for the Isosurface Level parameter depends on the numerical range of the surface channel.等值面水平參數的取值取決於地表溝道的數值範圍。

For example, Phoenix FD liquids are kept in the range of 0 to 1.例如,Phoenix FD液體保持在0到1的範圍內。

A value of 0 means there is no liquid in a certain voxel, and a value of 1 means the cell is 100% full of liquid.值0表示在某個體素中沒有液體,值1表示細胞100%充滿液體。

Values in between indicate a certain mixture of air and liquid.中間的值表示一定的空氣和液體的混合物。

For such cache files, an Isosurface Level value of 0.5 is best for visualizing the surface between the air and liquid.對於這樣的緩存文件,等值面水平值0.5最適合顯示空氣和液體之間的表面。

Imported caches from Houdini, on the other hand, use positive and negative values to indicate whether a voxel is inside or outside the liquid volume, so a correct "halfway" Isosurface Level value would be 0.0.

另一方面,從胡迪尼導入的緩存使用正值和負值來指示體素是在液體體積的內部還是外部,因此正確的“半”等值面水平值應該是0.0。

技術分享圖片 技術分享圖片 技術分享圖片

技術分享圖片 技術分享圖片 技術分享圖片

Ocean 海洋


技術分享圖片

Ocean Level | oceanlevel – Used with the Ocean Mesh and Cap Mesh rendering modes. 用於海洋網格和Cap網格渲染模式。

Specifies the water level as a percentage of the total grid height. 指定水位占總網格高度的百分比。

  • Ocean Level is a rendering setting which is closely related to the Initial Fill Up simulation setting in the Dynamics rollout.海平面是一個渲染設置,它與Dynamics折疊欄中的初始填充模擬設置密切相關。
  • Both should initially be set to equal values, and the Ocean level should be adjusted after the simulation is done, if needed.兩者的初始值都應該設置為相等,如果需要,在模擬完成後應該調整海平面。

This has to be done manually because the liquid surface might bounce up or down in the first few seconds until it settles.這必須手工完成,因為液體表面可能會在最初幾秒鐘反彈或下降,直到它穩定下來。

  • Depending on a whole variety of factors, the resulting surface might be a little below or a little above the Initial fill up value, and this cannot be automatically predicted.根據各種各樣的因素,最終得到的表面可能略低於或略高於初始填充值,而這是無法自動預測的。
  • The Ocean level should remain constant and should not be animated for the duration of the render sequence, otherwise the horizon would start moving up and down.海平面應該保持恒定,不應該在渲染過程中被動畫化,否則地平線會開始上下移動。

Ocean Subdivs | meshsubdiv – Used with the Ocean Mesh and Cap Mesh rendering modes.用於海洋網格和Cap網格渲染模式。

When generating the far areas of the surface, this determines how many vertices will be generated for each pixel of the image.在生成曲面的遠區域時,這決定了為圖像的每個像素生成多少個頂點。

Like with V-Ray subdivisions, the square of the parameter value is used.與V-Ray細分一樣,使用參數值的平方。

For example, if you increase the subdivisions twice, the vertices count will grow four times.例如,如果將細分增加兩倍,頂點數將增加四倍。

For more information, see the Ocean Subdiv. example below.

!Increasing the Ocean Subdivs may dramatically increase the amount of consumed RAM.增加海洋細分數量可能會顯著增加消耗的RAM數量。

Horizon Roughness | oceanhorizrough Controls the roughness of the distant ocean surface near the horizon.控制著地平線附近遙遠海洋表面的粗糙度。

Adds more detail to the waves, which is especially helpful when using a highly reflective material for the ocean surface. Increasing this value can potentially produce visible noise when rendering an animation. To counter this effect, increase the Ocean Subdivs parameter.

Off-Screen Margin (%) | oceanextramargin – The ocean is generated only in the camera view, which can lead to problems when using camera motion blur, using reflections, using refractions with Underwater Goggles enabled, or when the ocean casts shadows on objects underwater.海洋只在相機視圖中生成,這在使用相機運動模糊、反射、啟用水下護目鏡的折射或海洋對水下物體投射陰影時可能會導致問題。

This option allows you to extend the ocean further from the borders of the camera view in order to solve such issues.

The value is a percentage of the image size.

Pure Ocean | pureocean – Creates a flat ocean surface up to the Ocean Level height.

It does not need loaded caches and if there are any, it ignores their content, so no simulation details will show. Thus changing frames and generating the ocean surface is very quick. This allows you to preview the behavior of the PhoenixOceanTex when Displacement is enabled or if you want to set up your texture for the Wave force. The option is available for both preview and rendering in Ocean Mesh or Cap Mesh modes. During preview, it requires the Show Mesh option to be enabled in the Preview rollout.

Underwater Goggles | uwglasses – This option is designed to be used when the camera is placed under the water in Ocean Mesh or Cap Mesh mode.

When enabled, a few polygons are added in front of the camera, and the grid content is kept outside of the resulting mesh. The result is similar to real underwater goggles in that the field of view shrinks.

Mesh smooth 網格平滑


技術分享圖片

Smoothness | smoothmesh – Specifies the number of smoothing passes. The higher the value, the smoother the result, but the mesh will require more time to calculate.

Use Liquid Particles | useprt – Enables particle-based smoothing of the mesh. It requires Liquid particles to be simulated and exported to the cache files. This method overcomes the limitations of the basic smoothing without particles, which can flicker in animation and cause small formations in the mesh to shrink.

Particle size | prtsz – Used to make the liquid thicker or thinner. Works only when Use Liquid Particles is enabled. This parameter specifies the distance from the mesh surface to the particle centers.

Motion blur 動態模糊


The Motion blur of the mesh is obtained by shifting each vertex along the velocity by the shutter time. To render your simulation with Motion Blur, you need to enable Velocity channel export from the Output tab of your simulator. Furthermore, if rendering a Liquid simulation with Foam, Splashes or Mist, you would also have to enable Velocity export for each particle system under the Output → Output Particles tab.

技術分享圖片

Multiplier | mbmult – Specifies a multiplier that affects the strength of the motion blur. This value can be a negative number.

Prevent Self Intersection | mbself – In certain cases, the shifted vertices might penetrate the opposite side of the geometry. When enabled, this option prevents such situations. The self-intersection analysis is expensive, so enable this parameter only when an intersection is obvious.

Phoenix meshes are motion blurred in a different way than regular transforming and deforming geometries. When rendering regular meshes with motion blur, the entire mesh is moved along its transformation path back and forward in time, and so each individual vertex of the mesh follows this path. However, for each rendered frame, a new Phoenix mesh must be built from the voxel grid, and so it usually has a different number of vertices than the previous and the next frame. Because of this, individual vertices can not be traced back or forward in time between frames. Instead, motion blur of fluid meshes uses the velocity of vertices which is recorded by the simulation, and moves each vertex back and forward in time along the vertex velocity. This is why the generated liquid mesh does not support frame sub-sampling for motion blur. This may cause a mis-match between the liquid and transforming/deforming objects in your scene that interact with it. The fluid mesh is generated from data at the exact rendered frame and fluid data for the preceding or following frames is not used, unlike regular deforming meshes. As a consequence, the liquid and the objects in your scene would synchronize best if those objects do not use additional geometry samples for motion blur.


Displacement 位移

Displacement is a technique intended to add detail to the simulation during the rendering. The idea of the displacement is similar to the usual geometry displacement: a texture is sampled, and the corresponding point on the mesh is shifted in a direction at a distance determined by the texture. You can plug both V-Ray and regular 3ds Max texture maps, as well as the PhoenixFD Ocean Texture.
You can use the Phoenix FD Simulator‘s Mesh Preview option to check how the attached displacement map is affecting the surface when rendering a Liquid simulation.

技術分享圖片

Displacement | displacement – Enables the displacement effect.

Map | displ2 – Specifies the map used to displace the fluid. Depending on the Type option selected, a monochrome map or a color map could be required. If a colored map is specified when a monochrome map is needed, the strength of the displacement is determined by the total intensity of the color. If a monochrome map is specified when a vector map is needed, the entire displacement will point in a single direction.

Multiplier | displmul – Specifies the displacement amount.

Vertical Fade Level | fadebylevel, displfade – Specifies a vertical zone above the Ocean Level, where the displacement will be strongest. Above this zone there will be no displacement at all, and inside this zone the displacement will gradually be reduced moving up from the ocean surface. This is needed so that the ocean displacement would be applied only near the ocean surface and not to any simulated fluid splashing high above the ocean surface. This parameter is a percentage of the grid height, just as the Ocean Level option.

Fade Above Velocity | fadebyvel, displvelfade – If the fluid velocity (in voxels/sec) in a voxel is higher than this value, there will be no displacement at all. When the velocity is lower than this value, the higher the velocity, the weaker the displacement will be. This allows you to suppress displacement for the fast moving parts of the fluid where the displacement would visibly disturb the motion in an unnatural manner, and thus you can have only the still ocean surface displaced with waves. This option requires the Grid Velocity channel to be exported to the simulation cache files from the Output rollout.

The Fade Volume feature can be used when the liquid is in contact with a geometry surface such as a shore or a ship and the displacement breaks the contact by moving the liquid mesh away from, or into the geometry.

Fade Volume | usefadeobj, fadeobj – When enabled, allows you to specify a geometry object as a fade volume. There will be no displacement inside this object and outside it the displacement will be gradually reduced at a distance specified by the Volume Fadeout Distance parameter.

Volume Fadeout Distance | displgeomfade – Specifies the distance in world units around the object where the displacement will fade out.

PhoenixFD插件流體模擬——UI布局【Rendering】詳解