Physically Based Animation and Modeling

Slides:



Advertisements
Similar presentations
Request Dispatching for Cheap Energy Prices in Cloud Data Centers
Advertisements

SpringerLink Training Kit
Luminosity measurements at Hadron Colliders
From Word Embeddings To Document Distances
Choosing a Dental Plan Student Name
Virtual Environments and Computer Graphics
Chương 1: CÁC PHƯƠNG THỨC GIAO DỊCH TRÊN THỊ TRƯỜNG THẾ GIỚI
THỰC TIỄN KINH DOANH TRONG CỘNG ĐỒNG KINH TẾ ASEAN –
D. Phát triển thương hiệu
NHỮNG VẤN ĐỀ NỔI BẬT CỦA NỀN KINH TẾ VIỆT NAM GIAI ĐOẠN
Điều trị chống huyết khối trong tai biến mạch máu não
BÖnh Parkinson PGS.TS.BS NGUYỄN TRỌNG HƯNG BỆNH VIỆN LÃO KHOA TRUNG ƯƠNG TRƯỜNG ĐẠI HỌC Y HÀ NỘI Bác Ninh 2013.
Nasal Cannula X particulate mask
Evolving Architecture for Beyond the Standard Model
HF NOISE FILTERS PERFORMANCE
Electronics for Pedestrians – Passive Components –
Parameterization of Tabulated BRDFs Ian Mallett (me), Cem Yuksel
L-Systems and Affine Transformations
CMSC423: Bioinformatic Algorithms, Databases and Tools
Some aspect concerning the LMDZ dynamical core and its use
Bayesian Confidence Limits and Intervals
实习总结 (Internship Summary)
Current State of Japanese Economy under Negative Interest Rate and Proposed Remedies Naoyuki Yoshino Dean Asian Development Bank Institute Professor Emeritus,
Front End Electronics for SOI Monolithic Pixel Sensor
Face Recognition Monday, February 1, 2016.
Solving Rubik's Cube By: Etai Nativ.
CS284 Paper Presentation Arpad Kovacs
انتقال حرارت 2 خانم خسرویار.
Summer Student Program First results
Theoretical Results on Neutrinos
HERMESでのHard Exclusive生成過程による 核子内クォーク全角運動量についての研究
Wavelet Coherence & Cross-Wavelet Transform
yaSpMV: Yet Another SpMV Framework on GPUs
Creating Synthetic Microdata for Higher Educational Use in Japan: Reproduction of Distribution Type based on the Descriptive Statistics Kiyomi Shirakawa.
MOCLA02 Design of a Compact L-­band Transverse Deflecting Cavity with Arbitrary Polarizations for the SACLA Injector Sep. 14th, 2015 H. Maesaka, T. Asaka,
Hui Wang†*, Canturk Isci‡, Lavanya Subramanian*,
Fuel cell development program for electric vehicle
Overview of TST-2 Experiment
Optomechanics with atoms
داده کاوی سئوالات نمونه
Inter-system biases estimation in multi-GNSS relative positioning with GPS and Galileo Cecile Deprez and Rene Warnant University of Liege, Belgium  
ლექცია 4 - ფული და ინფლაცია
10. predavanje Novac i financijski sustav
Wissenschaftliche Aussprache zur Dissertation
FLUORECENCE MICROSCOPY SUPERRESOLUTION BLINK MICROSCOPY ON THE BASIS OF ENGINEERED DARK STATES* *Christian Steinhauer, Carsten Forthmann, Jan Vogelsang,
Particle acceleration during the gamma-ray flares of the Crab Nebular
Interpretations of the Derivative Gottfried Wilhelm Leibniz
Advisor: Chiuyuan Chen Student: Shao-Chun Lin
Widow Rockfish Assessment
SiW-ECAL Beam Test 2015 Kick-Off meeting
On Robust Neighbor Discovery in Mobile Wireless Networks
Chapter 6 并发:死锁和饥饿 Operating Systems: Internals and Design Principles
You NEED your book!!! Frequency Distribution
Y V =0 a V =V0 x b b V =0 z
Fairness-oriented Scheduling Support for Multicore Systems
Climate-Energy-Policy Interaction
Hui Wang†*, Canturk Isci‡, Lavanya Subramanian*,
Ch48 Statistics by Chtan FYHSKulai
The ABCD matrix for parabolic reflectors and its application to astigmatism free four-mirror cavities.
Measure Twice and Cut Once: Robust Dynamic Voltage Scaling for FPGAs
Online Learning: An Introduction
Factor Based Index of Systemic Stress (FISS)
What is Chemistry? Chemistry is: the study of matter & the changes it undergoes Composition Structure Properties Energy changes.
THE BERRY PHASE OF A BOGOLIUBOV QUASIPARTICLE IN AN ABRIKOSOV VORTEX*
Quantum-classical transition in optical twin beams and experimental applications to quantum metrology Ivano Ruo-Berchera Frascati.
The Toroidal Sporadic Source: Understanding Temporal Variations
FW 3.4: More Circle Practice
ارائه یک روش حل مبتنی بر استراتژی های تکاملی گروه بندی برای حل مسئله بسته بندی اقلام در ظروف
Decision Procedures Christoph M. Wintersteiger 9/11/2017 3:14 PM
Limits on Anomalous WWγ and WWZ Couplings from DØ
Presentation transcript:

Physically Based Animation and Modeling CSE 3541 Matt Boggus

Overview Newton’s three laws of physics Integrating acceleration to find position Particle Systems Common forces in physically based animation

Mass and Momentum Associate a mass with an object. We assume that the mass is constant Define a vector quantity called momentum (p), which is the product of mass and velocity

Newton’s First Law A body in motion will remain in motion A body at rest will remain at rest, unless acted upon by some force Without a force acting on it, a moving object travels in a straight line

Newton’s Second Law Newton’s Second Law says: This relates the kinematic quantity of acceleration to the physical quantity of force (Kinematics – the branch of mechanics concerned with the motion of objects without reference to the forces that cause the motion) Force = change in momentum over time = mass * acceleration

Newton’s Third Law Newton’s Third Law says that any force that body A applies to body B will be met by an equal and opposite force from B to A Every action has an equal and opposite reaction Do we really want this for games and animation?

Integration Given acceleration, compute velocity & position by integrating over time

Physics review, equations for: Zero acceleration Constant acceleration No acceleration Constant acceleration f a m Similarly, you’d need a different equation to handle cases where acceleration is linear, quadratic, or some other higher order. a v’ v vave

Pseudocode for motion within an animation loop (Euler method) To update an object at point x with velocity v: a = (sum all forces acting on x) / m [ ∑vectors scalar: m ] v = v + a * dt [ vectors: v, a scalar: dt ] x = x + v * dt [ vectors: x, v scalar: dt ]

Pseudocode for motion within an animation loop (Euler 2) To update an object at point x with velocity v: a = (sum all forces acting on x) / m [ ∑vectors scalar: m ] endv = v + a * dt [vectors: endv, v, a scalar: dt] x = x + 𝑒𝑛𝑑𝑣+𝑣 2 ∗dt [vectors: x, endv, v scalars: 2, dt] v = endv [vectors: endv, v]

See spreadsheet example Comparison of methods See spreadsheet example

Particle Systems Star Trek 2 – genesis sequence (1982) More examples A collection of a large number of point-like elements Model “fuzzy” or “fluid” things Fire, explosions, smoke, water, sparks, leaves, clouds, fog, snow, dust, galaxies, special effects Model strands Fur, hair, grass Star Trek 2 – genesis sequence (1982) The making of the scene More examples Show star trek example, others for reference

Particle Example source Collides with environment but not other particles Particle’s midlife with modified color and shading Particle’s demise, based on constrained and randomized life span source Particle’s birth: constrained and time with initial color and shading (also randomized)

Particle system implementation Update Steps for each particle if dead, reallocate and assign new attributes animate particle, modify attributes render particles Use constrained randomization to vary “new” particles

Constrained randomization example 1 particleX = x particleY = y particleX = x + random(-1,1) particleY = y + random(-1,1)

Constrained randomization example 2 particleX = x + random(-1,1) particleY = y + random(-1,1) if (sqrt( (particleX-x)2 + (particleY-y)2 ) ) > 1, re-randomize

Particle (partial example) class Particle { Vector3 velocity; // updates frame to frame Vector3 force; // reset and recomputed each frame GameObject particle; // updates frame to frame // holds position and mesh // other fields (variables) for mass, life, maxlife, … public: void Update(float deltaTime); // numeric integration to // update velocity and position void ApplyForce(Vector3 f) { force = force + f; } void ResetForce() { force = Vector3.zero; } // other methods for collision response, life increments, … };

Particle emitter (partial example) using System.Collections.Generic; using System.Collections; class ParticleEmitter { ArrayList Particles = new ArrayList(); // construct particle objects in Start(); public: void Update(deltaTime); // update and collision test each particle };

Particle Emitter Update() only showing physics movement code Update(float deltaTime) { foreach (Particle p in Particles) { // sum up all forces acting on p } foreach (Particle p in Particles){ p.Update(deltaTime); p.ResetForce();

Creating GameObjects for(int i = 0; i < numberOfAsteroids; i++){ GameObject aSphere = GameObject.CreatePrimitive(PrimitiveType.Sphere); aSphere.transform.parent = transform; aSphere.name = "sphere" + i.ToString(); aSphere.transform.position = new Vector3(Random.Range(-10.0f, 10.0f), Random.Range(-10.0f, 10.0f), Random.Range(-10.0f, 10.0f)); aSphere.transform.localScale = new Vector3(Random.Range(0.0f, 1.0f), Random.Range(0.0f, 1.0f), Random.Range(0.0f, 1.0f)); } Covered early, provided again here for reference

Deleting GameObjects GameObject myParticle; // …create, animate, etc. … Destroy(myParticle); Covered early, provided again here for reference Note: this affects the associated GameObject; it does not delete the variable myParticle

Lab3 Implement a particle system where each particle is a GameObject Restrictions No RigidBodies No Colliders Minimal credit if you use these for lab3

Computing forces for games and animations Types Independent of other values Gravity on earth Dependent on current object properties velocity – drag position – spring force Dependent on other objects Penalty method collision response Gravity in space

Forces – gravity Applying gravity for a scene on earth – one vector with negative y value Applying gravity for a

“Opposing” Forces Static friction Kinetic friction Viscosity for small objects No turbulence For sphere

“Opposing” Forces – can be complex Aerodynamic drag is complex and difficult to model accurately A reasonable simplification it to describe the total aerodynamic drag force on an object using: Where ρ is the density of the air (or water, mud, etc.), cd is the coefficient of drag for the object, a is the cross sectional area of the object, and e is a unit vector in the opposite direction of the velocity Included for presentation effect – don’t have time to go through details on terms here

“Opposing” Forces – made simple Force = -1 * velocity * scale typically, 0 < scale < 1

Forces – spring-damper Hooke’s Law

Animation from http://www.acs.psu.edu/drussell/Demos/SHO/damp.html Damping example Animation from http://www.acs.psu.edu/drussell/Demos/SHO/damp.html

Spring-mass-damper system f -f

Spring-mass-damper system At rest length l, the force f is zero Two objects are located at r1 and r2 [scalar displacement] [direction of displacement]

Example – Jello cube http://www.youtube.com/watch?v=b_8ci0ZW4vI Spring-mass system V3 E23 E31 V2 V1 E12 Example – Jello cube http://www.youtube.com/watch?v=b_8ci0ZW4vI

Penalty method Spring force as collision response

Additional slides

Particle Systems Lots of small particles - local rules of behavior Create ‘emergent’ element Common rules for particle motion: Do collide with the environment Do not collide with other particles Common rules for particle rendering: Do not cast shadows on other particles Might cast shadows on environment Do not reflect light - usually emit it

Spring mesh – properties for cloth Each vertex is a point mass Each edge is a spring-damper Diagonal springs for rigidity Angular springs connect every other mass point Global forces: gravity, wind Example http://www.youtube.com/watch?v=ib1vmRDs8Vw

Cloth simulation – springs, integration, and stability Cloth Sim with Euler Integrator https://www.youtube.com/watch?v=fmPqvQg8MKo Animation begins using Verlet integration Animation ends using Euler integration