forked from windystrife/UnrealEngine_NVIDIAGameWorks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFLEXUe4_FluidSurfaceRendering.html
322 lines (307 loc) · 20.2 KB
/
FLEXUe4_FluidSurfaceRendering.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="IE=Edge"/>
<title>Fluid Rendering — Flex Artist Tools 1.0 documentation</title>
<link rel="stylesheet" href="_static/flex.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/breathe.css" type="text/css" />
<link rel="stylesheet" href="_static/application.css" type="text/css" />
<link rel="stylesheet" href="_static/styleguide.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/bootstrap.js"></script>
<script type="text/javascript" src="_static/jquery.cookie.js"></script>
<script type="text/javascript" src="_static/jquery.storageapi.js"></script>
<link rel="top" title="Flex Artist Tools 1.0 documentation" href="index.html" />
<link rel="next" title="Local Space Simulation" href="FLEXUe4_LocalSpace.html" />
<link rel="prev" title="Counting and Draining" href="FLEXUe4_DrainsAndCounting.html" />
</head>
<body>
<nav class="navbar navbar-inverse navbar-default">
<div class="row">
<div class="navbar-brand">
<img class="logo" src="_static/developerzone_gameworks_logo.png" alt="Logo"/>
</div>
<div id="searchbox" style="display: none; float:right; padding-top:4px; padding-right:4px">
<form class="search form-inline" action="search.html" method="get">
<div class="form-group">
<input type="text" name="q" class="form-control" />
<input type="submit" value="Search" class="btn btn-primary" />
</div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</nav>
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
<li><a href="index.html">Flex Artist Tools 1.0 documentation</a></li>
</ul>
</div>
</div>
<div class="row">
<div class="col-md-3 bs-sidenav" style="white-space: nowrap; overflow: auto;">
<div class="bs-sidebar">
<div id="sidebar_toc">
<h4>Table Of Contents</h4>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="FLEXUe4_Intro.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="FLEXUe4_Intro.html#prerequisites">Prerequisites</a></li>
<li class="toctree-l1"><a class="reference internal" href="FLEXUe4_Phases.html">Particles</a><ul>
<li class="toctree-l2"><a class="reference internal" href="FLEXUe4_Phases.html#radius">Radius</a></li>
<li class="toctree-l2"><a class="reference internal" href="FLEXUe4_Phases.html#phases">Phases</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="FLEXUe4_Containers.html">Containers</a><ul>
<li class="toctree-l2"><a class="reference internal" href="FLEXUe4_Containers.html#flex-container">Flex Container</a><ul>
<li class="toctree-l3"><a class="reference internal" href="FLEXUe4_Containers.html#simulation">Simulation</a></li>
<li class="toctree-l3"><a class="reference internal" href="FLEXUe4_Containers.html#collision">Collision</a></li>
<li class="toctree-l3"><a class="reference internal" href="FLEXUe4_Containers.html#cloth">Cloth</a></li>
<li class="toctree-l3"><a class="reference internal" href="FLEXUe4_Containers.html#fluid">Fluid</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="FLEXUe4_Assets.html">Assets</a><ul>
<li class="toctree-l2"><a class="reference internal" href="FLEXUe4_Assets.html#soft-bodies">Soft Bodies</a><ul>
<li class="toctree-l3"><a class="reference internal" href="FLEXUe4_Assets.html#flex-soft-asset">Flex Soft Asset</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="FLEXUe4_Assets.html#cloth">Cloth</a><ul>
<li class="toctree-l3"><a class="reference internal" href="FLEXUe4_Assets.html#flex-cloth-asset">Flex Cloth Asset</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="FLEXUe4_Assets.html#rigids">Rigids</a><ul>
<li class="toctree-l3"><a class="reference internal" href="FLEXUe4_Assets.html#flex-solid-asset">Flex Solid Asset</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="FLEXUe4_Actors.html">Actors</a></li>
<li class="toctree-l1"><a class="reference internal" href="FLEXUe4_Particles.html">Emitters</a><ul>
<li class="toctree-l2"><a class="reference internal" href="FLEXUe4_Particles.html#particle-emitter">Particle Emitter</a></li>
<li class="toctree-l2"><a class="reference internal" href="FLEXUe4_Particles.html#particle-modules">Particle Modules</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="FLEXUe4_Ropes.html">Ropes</a></li>
<li class="toctree-l1"><a class="reference internal" href="FLEXUe4_Forces.html">Forces</a><ul>
<li class="toctree-l2"><a class="reference internal" href="FLEXUe4_Forces.html#radial-force-component">Radial Force Component</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="FLEXUe4_DrainsAndCounting.html">Counting and Draining</a><ul>
<li class="toctree-l2"><a class="reference internal" href="FLEXUe4_DrainsAndCounting.html#creating-a-drain">Creating a Drain</a></li>
<li class="toctree-l2"><a class="reference internal" href="FLEXUe4_DrainsAndCounting.html#counting-particles">Counting Particles</a></li>
</ul>
</li>
<li class="toctree-l1 current"><a class="current reference internal" href="">Fluid Rendering</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#creating-a-flex-fluid-surface">Creating a Flex Fluid Surface</a></li>
<li class="toctree-l2"><a class="reference internal" href="#fluid-surface-properties">Fluid Surface Properties</a></li>
<li class="toctree-l2"><a class="reference internal" href="#emitter-settings">Emitter Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="#surface-material">Surface Material</a></li>
<li class="toctree-l2"><a class="reference internal" href="#container">Container</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="FLEXUe4_LocalSpace.html">Local Space Simulation</a></li>
<li class="toctree-l1"><a class="reference internal" href="FLEXUe4_Debug.html">Debug Commands</a><ul>
<li class="toctree-l2"><a class="reference internal" href="FLEXUe4_Debug.html#console-commands">Console Commands</a></li>
<li class="toctree-l2"><a class="reference internal" href="FLEXUe4_Debug.html#stats">Stats</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="releasenotes.html">Release Notes</a><ul>
<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#what-s-new">What’s New</a></li>
<li class="toctree-l2"><a class="reference internal" href="releasenotes.html#known-limitations">Known Limitations</a></li>
</ul>
</li>
</ul>
</div>
<h4>Previous topic</h4>
<p class="topless"><a href="FLEXUe4_DrainsAndCounting.html"
title="previous chapter">Counting and Draining</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="FLEXUe4_LocalSpace.html"
title="next chapter">Local Space Simulation</a></p>
<div id="searchbox" style="display: none">
<h4>Quick search</h4>
<form class="search form-inline" action="search.html" method="get">
<div class="form-group">
<input type="text" name="q" class="form-control" />
<input type="submit" value="Search" class="btn btn-primary" />
</div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="document col-md-8">
<div class="body">
<div class="section" id="fluid-rendering">
<span id="flexue4-fluidsurfacerendering"></span><h1>Fluid Rendering<a class="headerlink" href="#fluid-rendering" title="Permalink to this headline">¶</a></h1>
<p>Flex fluid particles can be rendered with a screen space technique. The surface rendering is configured using Flex Fluid Surface templates. The fluid surface template can then be assigned to emitters to render the corresponding particles with the surface technique. The look of the surface depends on:</p>
<ol class="arabic simple">
<li><a class="reference internal" href="#label-create-fluid-surface"><em>Creating a Flex Fluid Surface</em></a></li>
<li><a class="reference internal" href="#label-fluid-surface-properties"><em>Fluid Surface Properties</em></a></li>
<li><a class="reference internal" href="#label-emitter"><em>Emitter Settings</em></a></li>
<li><a class="reference internal" href="#label-material"><em>Surface Material</em></a></li>
<li><a class="reference internal" href="#label-container"><em>Container</em></a></li>
</ol>
<div class="float-center container">
<a class="reference internal image-reference" href="_images/fluidsurface.jpg"><img alt="_images/fluidsurface.jpg" src="_images/fluidsurface.jpg" style="width: 400px;" /></a>
</div>
<div class="section" id="creating-a-flex-fluid-surface">
<span id="label-create-fluid-surface"></span><h2>Creating a Flex Fluid Surface<a class="headerlink" href="#creating-a-flex-fluid-surface" title="Permalink to this headline">¶</a></h2>
<p>To create a fluid surface template, right-click in the Content Browser, and choose Create Advanced Asset->Physics->FlexFluidSurface.</p>
<div class="float-center container">
<a class="reference internal image-reference" href="_images/NewFluidSurface.jpg"><img alt="_images/NewFluidSurface.jpg" src="_images/NewFluidSurface.jpg" style="width: 400px;" /></a>
</div>
</div>
<div class="section" id="fluid-surface-properties">
<span id="label-fluid-surface-properties"></span><h2>Fluid Surface Properties<a class="headerlink" href="#fluid-surface-properties" title="Permalink to this headline">¶</a></h2>
<p>Give your container an appropriate name, e.g.: FlexFluidSurface, and double click to open it’s property sheet.</p>
<div class="float-center container">
<a class="reference internal image-reference" href="_images/fluidsurfacetemplate.jpg"><img alt="_images/fluidsurfacetemplate.jpg" src="_images/fluidsurfacetemplate.jpg" style="width: 400px;" /></a>
</div>
<ul class="simple">
<li><strong>Smoothing Radius</strong> Radius for smoothing the surface. Higher values result in a smoother surface.</li>
<li><strong>Max Radial Samples</strong> This parameter controls how many neighboring pixels in each direction are taken into account for the screen space smoothing operation. It limits how large the smoothing filter defined through the</li>
<li><strong>Smoothing Radiu</strong> can become in screen space. Large values can have an impact on performance.</li>
<li><strong>Depth Edge Falloff</strong> The depth edge falloff controls smoothing across inner silhouettes. If the depth separation between particles exceeds the size of the particles, smoothing should be turned off to avoid blending between foreground and background. The depth edge falloff controls how much smoothing is tuned down based on the depth separation. A value of 0.0 disables all smoothing.</li>
<li><strong>Thickness Particle Scale</strong> Translucent surfaces look more convincing if the background becomes less visible where the liquid is thicker. The screen space surface technique provides a thickness value to the material used to render the surface to achieve such an effect. The thickness value is computed using an additive blend between the particles rendered as spheres. The size of the spheres is controlled by this parameter.</li>
<li><strong>Depth Particle Scale</strong> The size of the emitted particles influences the distance of the rendered surface to the particles. Larger particle sizes result in a surface that makes the liquid appear to have more volume. The Depth Particle Scale controls the particle sizes influencing the shape of the surface.</li>
<li><strong>Receive Shadows</strong> Controls whether the surface receives shadows from static level geometry. In the current implementation, dynamic shadows are always cast onto the surface.</li>
<li><strong>Material</strong> The material that is used to shade the fluid surface.</li>
</ul>
</div>
<div class="section" id="emitter-settings">
<span id="label-emitter"></span><h2>Emitter Settings<a class="headerlink" href="#emitter-settings" title="Permalink to this headline">¶</a></h2>
<p>An emitter can be configured for surface rendering inside the particle system editor. See Particles for a description of how to configure an emitters for Flex. To make a Particle Emitter use surface rendering, open up Cascade, select the Particle Emitter and scroll to the bottom of the Details tab.</p>
<div class="float-center container">
<a class="reference internal image-reference" href="_images/fluidsurfaceEmitter.jpg"><img alt="_images/fluidsurfaceEmitter.jpg" src="_images/fluidsurfaceEmitter.jpg" style="width: 400px;" /></a>
</div>
<p>The following emitter and particle system settings have an impact on the look of the fluid surface:</p>
<p><strong>Particle System Template</strong></p>
<ul class="simple">
<li><strong>Materia</strong> The Blend Mode of the referenced Material used for particle rendering should be set to Masked.</li>
<li><strong>Particle Scale</strong> Particle sizes should be tuned to get a good overlap of particles during the simulation.</li>
</ul>
<p><strong>Particle System Actor Details</strong></p>
<ul class="simple">
<li><strong>Cast Shadow</strong> Enables shadows on static and dynamic level geometry and onto the surface itself.</li>
<li><strong>Visible</strong> Should be set.</li>
<li><strong>Render in Main Pass</strong> Should NOT be set. Otherwise particles are rendered inside the surface.</li>
</ul>
<div class="float-center container">
<img alt="_images/FluidSurfaceEmitterSettings.jpg" src="_images/FluidSurfaceEmitterSettings.jpg" />
</div>
</div>
<div class="section" id="surface-material">
<span id="label-material"></span><h2>Surface Material<a class="headerlink" href="#surface-material" title="Permalink to this headline">¶</a></h2>
<p>The material referenced in the Flex Fluid Surface template is used to shade the surface. The surface rendering only supports a restricted material feature set. The Flex Project contains example materials that can be used as a reference.</p>
<ul class="simple">
<li>Material Blend Mode: should either be set to Translucent or Masked</li>
<li>A special material expression FlexFluidSurface Thickness can be used to read the thickness of the liquid volume at a given screen location</li>
</ul>
<div class="float-center container">
<a class="reference internal image-reference" href="_images/FluidSurfaceMaterial.jpg"><img alt="_images/FluidSurfaceMaterial.jpg" src="_images/FluidSurfaceMaterial.jpg" style="width: 600px;" /></a>
</div>
</div>
<div class="section" id="container">
<span id="label-container"></span><h2>Container<a class="headerlink" href="#container" title="Permalink to this headline">¶</a></h2>
<p>The main parameter that need to be adjusted in the Flex Container for surface rendering are shown here:</p>
<div class="float-center container">
<a class="reference internal image-reference" href="_images/FluidSurfaceContainer.jpg"><img alt="_images/FluidSurfaceContainer.jpg" src="_images/FluidSurfaceContainer.jpg" style="width: 400px;" /></a>
</div>
<ul class="simple">
<li><strong>Fluid</strong> Fluid surface rendering is mostly suitable for liquids. However, it’s not mandatory to enable the Fluid flag for surface rendering.</li>
<li><strong>Anisotropy Scale</strong> If this parameter is set to larger than 0.0 the Flex simulation generates per particle information that can be used to improve the fluid surface rendering. The anisotropy information is used to render oriented ellipsoids instead of spheres which makes the surface look much smoother. Setting this higher allow the ellipsoids to stretch more. A value around 1.0 works usually well. The overall particle scale can be adjusted using the emitter particle size or with the Depth Particle Scale in the Flex Fluid Surface template.</li>
<li><strong>Anisotropy Min</strong> Defines how thin a particle can become. It makes sense to limit the thickness for example to avoid shadowing artefact which can appear for very thin objects. A value around 0.1 works usually well.</li>
<li><strong>Anisotropy Max</strong> Defines how thick a particle can become. It can look weird if ellipsoids stretch too much as the geometric shape can be become very obvious. A value around 1.0 works usually well.</li>
<li><strong>Position Smoothing</strong> The look of the surface can be improved further by enabling smoothing of the particle positions. Values larger than 0.0 enable the particle smoothing.</li>
</ul>
<p>Additionally it might be useful to adjust the <em>Rest Distance of the Flex Container</em> to achieve more visual surface details. The <strong>Collision Distance</strong> can be used to reduce the visual gap between the particle surface and the level geometry.</p>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="col-md-1"></div>
</div>
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
<li><a href="index.html">Flex Artist Tools 1.0 documentation</a></li>
</ul>
</div>
</div>
<footer>
<div class="footer-boilerplate">
<div class="row">
<div class="boilerplate">
Copyright © 2014-2016, NVIDIA Corporation | <a href="http://www.nvidia.com/object/about-nvidia.html" onclick="s_objectID="http://www.nvidia.com/object/about-nvidia.html_1";return this.s_oc?this.s_oc(e):true">About NVIDIA </a> | <a href="http://www.nvidia.com/object/legal_info.html" onclick="s_objectID="http://www.nvidia.com/object/legal_info.html_1";return this.s_oc?this.s_oc(e):true">Legal Information </a> | <a href="http://www.nvidia.com/object/privacy_policy.html" onclick="s_objectID="http://www.nvidia.com/object/privacy_policy.html_1";return this.s_oc?this.s_oc(e):true">Privacy Policy </a>
</div>
</div>
</div>
</div>
</footer>
<script>
var treestatename = 'GWDocsTreeState';
var protocol = location.href.split('/')[0].toLowerCase();
var storage;
if (protocol.substring(0,4) == 'http') {
storage = $.cookieStorage;
storage.setPath('/');
} else {
storage = $.localStorage;
}
if (storage.isEmpty(treestatename)) {
storage.set(treestatename, {});
}
var treestate = storage.get(treestatename);
$.each($("#sidebar_toc ul li"), toc_walker);
function toc_walker(key, value) {
var handleSpan = $("<span></span>")
.addClass("toc_handle").prependTo(value);
handleSpan.attr("id", $(value).closest("div").attr("id") + "." + key);
if($(value).has("ul li").size() > 0) {
var id = handleSpan.attr("id");
if (!(id in treestate)) {
treestate[id] = false;
}
handleSpan.addClass("toc_expanded").click(function() {
$(this).toggleClass("toc_expanded toc_collapsed").siblings("ul").toggle();
treestate[$(this).attr('id')] = $(this).hasClass('toc_expanded');
storage.set(treestatename, treestate);
});
if(!($(this).hasClass('current') || treestate[id])) {
handleSpan.click();
}
if($(this).hasClass('current')) {
treestate[handleSpan.attr('id')] = handleSpan.hasClass('toc_expanded');
storage.set(treestatename, treestate);
}
}
}
</script>
</body>
</html>