ARVc 5
ARVc 5
&
VIRTUAL REALITY
2º Ciclo em:
Engenharia Informática
Design e Desenvolvimento de Jogos Digitais
DI – UBI 2014/2015
PROGRAM
1
Chapter 5
! Gas
! Plants
2
Animating Natural Phenomena
Plants
! Different models:
! Particle systems
! Fractals
! L-systems
3
Plants (cont.)
Plants (cont.)
4
Plants (cont.)
Plants (cont.)
5
Plants (cont.)
Plants (cont.)
! Growth influences
! Lineage – age;
! Cellular descent – nutrients and hormones;
6
Plants (cont.)
! L-Systems
! Mathematical models of plants development by the
biologist Aristid Lindenmayer (the L in L-systems).
Plants (cont.)
! D0L-system
! Production rules: αi -> βi
" αi is a single symbol
" βi is a sequence of symbols
7
Plants (cont.)
! Example
!S # ABA Axiom S
!A# XX ABA
!B# TT XXTTXX
Plants (cont.)
! Example
! S # ABA Axiom S
! A# XX ABA
! B# TT XXTTXX
8
Plants (cont.)
! Geometric Replacement
XXTTXX
X:
T:
X
X
T
T
X
X
Plants (cont.)
! Turtle graphics
! A geometry is produced from the string by interpreting
the symbols of the string as drawing commands given to
a simple cursor called turtle.
9
Plants (cont.)
Plants (cont.)
! d=
! δ = 45º
10
Plants (cont.)
F
F
-F++F-
-F++F-
F
F
Plants (cont.)
! L-Systems
11
Plants (cont.)
! Bracketed L-Systems
! Brackets
" Push and pop states
" Multiple types of brackets
" Brackets have attachment semantics
! Example (non deterministic)
S # FAF
A # [+FBF]
A# F
B# [-FBF]
B# F
Plants (cont.)
! Bracketed L-Systems
! Push and pop states
12
Plants (cont.)
! Bracketed
L-Systems
Plants (cont.)
! Bracketed
L-Systems
Non
Deterministic Deterministic
13
Plants (cont.)
Plants (cont.)
! Stochastic L-Systems
! Assign a user-specified probability to each production so that
the probabilities assigned to productions with the same left-
hand side sum to one.
S1.0 # FAF
A0.8 # [+FBF] (left branches)
A0.2# F
B0.6# [-FBF] (right branches)
B0.4# F
14
Plants (cont.)
! Context-Sensitive L-Systems
The predecessor of A
is
T or F
S # FAT S
A > T # [+FBF] FAT
A>F#F F[+FBF]F
B # [-FAF] F[+F[-FAF]F]F
T#F F[+F[-FFF]F]F
Plants (cont.)
15
Plants (cont.)
! Parametric L-systems
! Example
S # A(0)
A(t) # A(t+0.01)
A(t): t>=1.0 # F
" The symbol A has a parameter t associated with it.
The productions create the symbol A with a parameter value 0 and
then increase the parametric value in increments of 0.01 until
reaches 1.0.
At this point the symbol turns into an F.
Plants (cont.)
! Timed L-systems
! Add two more concepts:
" A global time variable;
" Local age value.
16
Plants (cont.)
! Water
17
Animating Natural Phenomena
Water
18
Water (cont.)
Water (cont.)
19
Water (cont.)
Water (cont.)
! Blender
Wave2.mov
20
Animating Natural Phenomena
! Gas
21
Gas
! Modeling gaseous phenomena (smoke, clouds, fire) is
particularly challenging because:
! Gas has no definitive geometry;
! Its modeling, rendering and animation are often
interrelated.
Gas (cont.)
! There are three approach to modeling gas:
! Grid-based methods;
! Particle-based methods;
! Hybrid methods.
22
Gas (cont.)
! Grid-based methods
! Decomposes space into individual cells;
! The gas into and out of each cell is calculated.
" The density of gas in each cell is updated from time step to time
step.
" The density of each cell is used to determine the visibility and
illumination of the gas during rendering.
" Attributes of the gas within a cell, such as velocity, acceleration, and
density can be used to track the gas as it travels from cell to cell
Gas (cont.)
! Grid-based methods
…
" The flow out of a cell can be computed based on the cell velocity,
the size of the cell, and the cell density.
" The flow into a cell is determined by distributing the densities out of
adjacent cells.
" External forces, such as wind and obstacles, are used to modify the
acceleration of the particles within a cell.
23
Gas (cont.)
! Particle-based methods
! Particles or globs of gas are tracked as they progress
through space.
Gas (cont.)
! Particle-based methods
…
! The advantage of this technique is that it is similar to rigid
body dynamics and therefore the equations are relatively
simple and familiar.
24
Gas (cont.)
! Hybrid methods
! Some models of gas trace particles through a spatial grid.
! Particles are passed from cell to cell as they traverse the
interesting space.
! The display attributes of individual cells are determined by
the number and type of particles contained in the cell at
the time of display.
! The particles are used to carry and distributes attributes
through the grid, and then grid is used to produce the
display.
Gas (cont.)
25
Gas (cont.)
! Clouds
! Volumetric Cloud Modeling
" Cumulus clouds
" Simulated using spherical
or elliptical implicit primitives.
" …
! Particle Systems
" Commonly used to simulate the volumetric gases, such as smoke.
" The difficulty with using particle system for cloud modeling is the
massive number of particles that are necessary.
Gas (cont.)
! Fire
! It has all the complexities of
smoke and clouds and added
complexity of very active internal
processes that produce light and
motion and create rapidly varying
display attributes.
26
Gas (cont.)
! Blender
27