COMP30019 Graphics and Interaction Particle Systems Adrian Pearce - - PowerPoint PPT Presentation

comp30019 graphics and interaction particle systems
SMART_READER_LITE
LIVE PREVIEW

COMP30019 Graphics and Interaction Particle Systems Adrian Pearce - - PowerPoint PPT Presentation

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System COMP30019 Graphics and Interaction Particle Systems Adrian Pearce Department of Computer Science and Software Engineering University of Melbourne The


slide-1
SLIDE 1

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System

COMP30019 Graphics and Interaction Particle Systems

Adrian Pearce

Department of Computer Science and Software Engineering University of Melbourne

The University of Melbourne

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionParticle Systems

slide-2
SLIDE 2

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System

Lecture outline

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionParticle Systems

slide-3
SLIDE 3

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System

Aim: understand particle systems Reading:

◮ Particle Systems (Wikipedia) https:

//en.wikipedia.org/wiki/Particle_system

◮ Unity3D Particle system tutorials:

https://www.youtube.com/watch?v=2aobHHSQgjY

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionParticle Systems

slide-4
SLIDE 4

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System

Particle Systems

Particle systems can be used to mode amporphous objects, such as

◮ Fire, ◮ Smoke, ◮ Water, ◮ Clouds, ◮ etc.

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionParticle Systems

slide-5
SLIDE 5

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System

Particle Systems

A particle system used to simulate a fire, created in 3dengfx—created by creating particles and introducing secondary light sources (at point of fire)

Example (from Koldora): https://www.youtube.com/watch?v=mMHcnyZMp-c Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionParticle Systems

slide-6
SLIDE 6

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System

Particle Systems

A particle system used to simulate a bomb explosion, created in particleIllusion.

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionParticle Systems

slide-7
SLIDE 7

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System

Particle creation

Discrete set of small particles, can have

◮ Mass (for dynamic model) ◮ Position ◮ Velocity ◮ Shape ◮ Lifetime

Examples of different parameters by : https://www.youtube.com/watch?v=heW3vn1hP2E Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionParticle Systems

slide-8
SLIDE 8

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System

Particle creation

◮ Particles can be created using a normal probability

distribution.

◮ They can be given an initial velocity and a lifetime ◮ Depending on the simulation their movement can be

determined by a dynamic model.

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionParticle Systems

slide-9
SLIDE 9

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System

Particle creation: water (example)

◮ New particles created at each frame (number created can be

normally distributed)

◮ Each particle has initial downward velocity (again, normally

distributed)—here, each successive frame each particle is acted

  • n by either force and ‘wind’ Image from http://www.iamag.co

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionParticle Systems

slide-10
SLIDE 10

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System

Particle dynamics

Newtonian particles f = ma (where f and a are vectors) a = dv dt = d2x d2t Given f find the change in position x so we need to integrate. However using frame intervals we can use a simple approximation: vt+1 = at∆t + vt xt+1 = vt∆t + xt

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionParticle Systems

slide-11
SLIDE 11

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System

Computation & Geometry Shaders

DirectX 11 Pipeline

DirectX 11 Pipeline: http: //www.3dgep.com/introduction-to-directx-11/

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionParticle Systems

slide-12
SLIDE 12

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System

Geometry Shaders

◮ The primary use of the geometry shader (introduced in

DirectX10) is used for creating new primitives from existing

  • nes

◮ It is most useful for use with particles systems and sprite

rendering

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionParticle Systems

slide-13
SLIDE 13

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System

Primitives

◮ The geometry shader takes a whole primitive as input ◮ If primitive is set to ‘points’ then geometry shader only

accepts a single vertex, while for ‘lines’ and ‘triangles’ it accepts 2 or 3 vertices respectively Primitive construction in geometry shader: The geometry shader uses vertex data of the input primitive’s to create new vertices which form new primitives.

Newly created vertices are output as a vertex stream, continuing through the pipeline—Figure from https://takinginitiative.wordpress.com/2011/01/

12/directx10-tutorial-9-the-geometry-shader/ Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionParticle Systems

slide-14
SLIDE 14

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System

Types of Particle Systems

Particle simulations can be achived in two ways:

◮ Sprite (2D) particle systems ◮ Voxel (3D) particle systems

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionParticle Systems

slide-15
SLIDE 15

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System

Sprites

A sprite is a textured quad. Sprite dimensions and position are usually controlled by two sets of values,

◮ the anchor point position and ◮ the sprite dimensions.

The anchor point (a) is used to position the sprite, while dimension (b) relates to width and height. https://en.wikipedia.org/

wiki/Sprite_(computer_graphics)

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionParticle Systems

slide-16
SLIDE 16

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System

Sprites

Sprites from Commodore 64 game (from Wikipedia)

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionParticle Systems

slide-17
SLIDE 17

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System

Sprites

Atari sprites from www.vg-resource.com Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionParticle Systems

slide-18
SLIDE 18

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System

Aside: AI Planning playing Atari

IW and 2BFS (AI Planning techniques) playing Atari: https://www.youtube.com/watch?v=P-603qPMkSg& list=PLXpQcXUQ_CwenUazUivhXyYvjuS6KQOI0

  • Dr. Nir Lipovetzky—works in our AI and Autonomy Lab &

teaches COMP90054 AI Planning for Autonomy in our Department See http://agentlab.cis.unimelb.edu.au/ for more details.

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionParticle Systems

slide-19
SLIDE 19

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System

Voxels

Voxels are essentially 3D pixels https://en.wikipedia.org/wiki/Voxel

Image from www.pointclouds.org Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionParticle Systems

slide-20
SLIDE 20

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System

Voxels

Image from www.creativecrash.com Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionParticle Systems

slide-21
SLIDE 21

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System

Voxels

Voxels are quite widely used in cinema—since online performance is less of an issue (can be computationally challenging!) Image from solidangle.com

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionParticle Systems

slide-22
SLIDE 22

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System

Voxels

10 Million particles https://www.youtube.com/watch?v=qaZIj6DUV8M Virtual Dancer: Hair, turblence and more: https://www.youtube.com/watch?v=miWXtX46QAY Source: Cinema4D

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionParticle Systems

slide-23
SLIDE 23

Introduction Particle creation Geometry Shaders Sprites Voxels Unity3D Particle System

Unity3D Particle system (since version 3.5)

View Unity3D Particle system tutorials: https://www.youtube.com/watch?v=2aobHHSQgjY

Adrian Pearce University of Melbourne COMP30019 Graphics and InteractionParticle Systems