0% found this document useful (0 votes)
2 views27 pages

ARVc 5

The document outlines a program on animation and virtual reality, focusing on techniques for animating natural phenomena such as plants, water, and gas. It details the complexities of modeling and animating plants using L-systems, as well as the challenges of representing water and gas in animation. The document also discusses various methods for simulating these elements, including grid-based and particle-based approaches.

Uploaded by

Tiago
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views27 pages

ARVc 5

The document outlines a program on animation and virtual reality, focusing on techniques for animating natural phenomena such as plants, water, and gas. It details the complexities of modeling and animating plants using L-systems, as well as the challenges of representing water and gas in animation. The document also discusses various methods for simulating these elements, including grid-based and particle-based approaches.

Uploaded by

Tiago
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

ANIMATION

&
VIRTUAL REALITY

2º Ciclo em:
Engenharia Informática
Design e Desenvolvimento de Jogos Digitais

DI – UBI 2014/2015

PROGRAM

! Computer Animation vs Traditional Animation


! Basic Techniques
! Advanced Techniques
! Modeling and Animating Articulated Models
! Animating Natural Phenomena
! Virtual Reality/Virtual Environments

1
Chapter 5

! Animating Natural Phenomena


! Plants
! Water

! Gas

Animating Natural Phenomena

! Plants

2
Animating Natural Phenomena

! Among the most difficult objects to model and


animate:
! Plants are the only ones with well-defined surface;

! The complexity of modeling them derives from their branching


structure and their growth process.

Plants

! They grow from a single source point, developing a


branching structure over time while the individual
structural elements elongate.

! Different models:
! Particle systems
! Fractals

! L-systems

3
Plants (cont.)

! The topology of a plant is characterized by a


recursive branching structure.
! Plants share with fractals the characteristics of
self-similarity under scale.

Basic branching schemes

Plants (cont.)

Branching structures of interest in two dimensions

4
Plants (cont.)

! An encoding of the branching structure of a given


plan is one of the objectives of plant modeling.

! A plant, being a living thing, is subject to changes


due to growth.

! So, we are interested in the modeling and


animation of a growth process.

Plants (cont.)

! The structural components of plants are:


! Roots – are typically not of interest when modeling the
visual aspects of plants;
! Stems – grow upward;

! Buds – are the embryonic


state of stem, leaves, and flowers;
! Leaves – are attached in a regular pattern at nodes along
the stem, and grow from buds (alternate, opposite, or
whorled);
! Flowers – grow from buds.

5
Plants (cont.)

! Branching is the production of subordinate stems from


a main stem (the axis):
! Bifurcating into two equally
growing stems (dichotomous);

! Stem grows laterally from the


main axis while the main axis
continues to grow in its original
direction (monopodial)

Plants (cont.)

! Growth influences
! Lineage – age;
! Cellular descent – nutrients and hormones;

! Tropisms – that change the direction of a plant’s growth


(e.g., phototropism – the blending of a stem toward light);
! Obstacles – collision response: temporary or permanent.

6
Plants (cont.)

! L-Systems
! Mathematical models of plants development by the
biologist Aristid Lindenmayer (the L in L-systems).

! L-systems are parallel rewriting systems.

! The simplest class of L-systems is deterministic and context


free; it is called D0L-system.

Plants (cont.)

! D0L-system
! Production rules: αi -> βi
" αi is a single symbol
" βi is a sequence of symbols

! Axiom - initial string


! Parallel rewriting rules

7
Plants (cont.)

! Example
!S # ABA Axiom S
!A# XX ABA
!B# TT XXTTXX

Production rules String sequence

Plants (cont.)

! Geometric Interpretation of L-systems


! Geometric Replacement
! Turtle graphics

! Example
! S # ABA Axiom S
! A# XX ABA
! B# TT XXTTXX

Production rules String sequence

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.)

! Turtle graphics commands


F – Move forward a distance d while drawing a line.
Its state will change from (x,y,α) to
(x+d*cos α, y+d*sin α, α)
f – Move forward a distance d without drawing a
line. Its state will change as above.
+ – Turn left by an angle δ. Its state will change
from (x,y, α) to (x,y, α + δ)
- – Turn right by an angle δ. Its state will change
from (x,y, α) to (x,y, α - δ).

Plants (cont.)

! Turtle graphics example


! S# ABA S $ axiom
! A# FF ABA
! B# TT FFTTFF
! T# -F++F- FF-F++F--F++F-FF

! d=
! δ = 45º

! Initial state (0,0,0)

10
Plants (cont.)

! Turtle graphics example


d=
δ = 45º
FF-F++F--F++F-FF
Initial state (0,0,0)

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.)

! Bracketed L-Systems - Properties


! Attributes
" Reduce size based on branching level
" Color
" line width
" line length
" …

! Track string development => growth process

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.)

! Animating Plant Growth


! There are three types of animation in plants:
" Flexible movement of structure (e.g., wind);
" Changes in topology due to growth process;
" Elongation of existing structures.

! The topological changes are captured by


L-Systems (production rules).
! Elongation can be modeled by productions of the form F
# FF (units equals!)

See video cotton3d.avi

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.

(υ0, β0) # ( (υ1,α1), (υ2, α2), … , (υn, αn) )


Terminal age Axiom: (A,0)


(A,3) # (S,0) [+(B,0)] (S,0)
Lifetime, βi-αi >0
(B,2) # (S,0)

16
Plants (cont.)

! Interacting with the Environment


! The environment can influence plant growth in many ways:

" Physical obstacles;


" Wind;
" Gravity;
" Nutrients, moisture from soil;
" Sunlight: length of day, shadows

Animating Natural Phenomena

! Water

17
Animating Natural Phenomena

! Among the most difficult objects to model and


animate:
! Water, when relatively still, has a well-defined surface;
however, it changes its shapes as it moves.
! In the case of ocean waves, features on the water’s surface
move, but the water itself does not travel.
! Besides, water can travel from one place to another (e.g.
river).

Water

! Presents a particular challenge for computer


animation because its appearance and motion take
various forms.
! Water can be modeled as a still, rigid-surface to which
ripples can be added as display attributes.
! In ocean waves, it is assumed that there is no transport of
water even though the waves travel along the surface in
forms that vary from sinusoidal to cycloidal.
! Breaking, foaming, and splashing of waves are added on
top of the model in a post processing step.

18
Water (cont.)

! Still Waters and Small-Amplitude Waves


! The simplest way to model water is merely to assign the
color blue to anything below a given height.

! A flat blue plane at the height of the water can be used to


represent the water’s surface.
" The normal vector perturbation can be used to simulate the
appearance of small amplitude waves.
" A sinusoidal function is used to modify the direction of the surface’s
normal.

Water (cont.)

Normal vector displacement versus height displacement

! See Video – dolrotate.mpg

19
Water (cont.)

! One of the assumptions used to model ocean waves


is that there in no transport of water.

! However, in many situations, such as a stream of


water running downhill, it is useful to model how
water travels from one location to another.
! The Navier-Stokes equations, which describe flow through
a volume, can be used.

Water (cont.)
! Blender

Wave2.mov

20
Animating Natural Phenomena

! Gas

Animating Natural Phenomena

! Among the most difficult objects to model and


animate:
! Gas (fire, smoke, and clouds) have no well-defined surface;
! They are inherently volumetric models, although surface-
based techniques have been applied with limited success.

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.

" The particles can be rendered individually, or


" They can be rendered as spheres of gas with a given density.

! Particles are assigned masses, and external forces can be


easily incorporated by updating particle acceleration and,
subsequently, velocities.

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.

! The disadvantage of this approach is that a large number


of particles are needed to simulate a dense gas.

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.)

! Clouds – Early approaches


! Many early approaches used semitransparent surfaces to
produce convincing images of clouds;
! Fractal synthesis of parallel plane models to produce
images of clouds seen from a distance;
! Fourier synthesis to control the transparency of large,
hollow ellipsoids;
! Overlapping spheres to define the general cloud shape +
transparency of spheres + cloud texture (Maya™)

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.

! Particle systems provide effective, yet computationally


attractive, approaches to fire.

26
Gas (cont.)
! Blender

27

You might also like