Simulation and 3D Graphics - PowerPoint PPT Presentation

Simulation and 3d graphics
1 / 43

  • Uploaded on
  • Presentation posted in: General

Jeffrey Heer Berkeley Institute of Design Computer Science Division University of California, Berkeley Simulation and 3D Graphics. IS146: Foundations of New Media. Lecture Overview. Review of Last Time Today Simulation Engines

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

Download Presentation

Simulation and 3D Graphics

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

Simulation and 3d graphics

Jeffrey Heer

Berkeley Institute of Design

Computer Science Division

University of California, Berkeley

Simulation and 3D Graphics


Foundations of New Media

Lecture overview

Lecture Overview

  • Review of Last Time

  • Today

    • Simulation Engines

    • 3D Graphics

  • Preview of Next Time

    • Prof. Greg Niemeyer from Art Practice

Lecture overview1

Lecture Overview

  • Review of Last Time

  • Today

    • Simulation Engines

    • 3D Graphics

  • Preview of Next Time

    • Prof. Greg Niemeyer from Art Practice

Lecture overview2

Lecture Overview

  • Review of Last Time

  • Today

    • Simulation Engines

    • 3D Graphics

  • Preview of Next Time

    • Prof. Greg Niemeyer from Art Practice

What is simulation

What is simulation?

  • A simulation is a procedural representation of aspects of “reality”

What is simulation1

What is simulation?

  • A simulation can be defined as “an operating representation of central features of reality.” This definition again identifies two central features that must both exist before an exercise can reasonably be described as a simulation. First, it must represent an actual situation of some sort--either a situation drawn directly from real life, or an imaginary situation that conceivably could be drawn from real life (invasion by extraterrestrial beings, for example). Second, it must be operational, i.e., must constitute an on-going process-- a criterion that effectively excludes from the class of simulations static analogues such as photographs, maps, graphs, and circuit diagrams, but includes working models of all types.

What is simulation2

What is simulation?

  • A set of entities or phenomena of interest, boiled down to essential characteristics of representation (e.g., shape, position, etc)

  • A set of procedures or rules for how the state of these entities evolves.

  • In programming terms: data structures + procedural abstractions acting on them.

  • Simulations are far from perfect - they leave out information on purpose!

Designing simulations

Designing Simulations

  • Given a phenomena to simulate, the problem is to decide what are its parts, how these parts can be represented with numerical values, and what the relationships are that let these parts affect one another…

  • Making a simulation is a process of abstracting--of selecting which entities and which properties from a complex real phenomena to use in the simulation program. For example, to simulate a bouncing ball, the ball’s position is important but its melting point probably isn’t. Any model has limitations, and is not a complete representation of reality.

  • Key points: Abstract, Numerical, Limited

Game of life simulation

Game of Life Simulation

  • The Game of Life was devised by the British mathematician John Conway in 1970. It made its first public appearance in the October 1970 issue of Scientific American

  • Simulated cells living and dying - perhaps the most classic example of simulation

  • Simple rules give rise to complex behavior

    • emergent phenomena

    • “the often hidden relationship between the formal structure of a game and the experience of that structure through play” (my italics)

Game of life simulation1

Game of Life Simulation

  • DEMO


Game of life simulation2

Game of Life Simulation

  • Represented entities

    • “Living” cells arranged on a grid

  • Simulation procedure

    • Populated grid slot:

      • 1 or fewer neighbors: die (loneliness, starvation)

      • 4 or more neighbors: die (overpopulation)

      • 2-3 neighbors: live

    • Empty grid slot:

      • 3 neighbors: new cell (reproduction)

Game of life simulation3

Game of Life Simulation

Block Boat Blinker Toad Glider LWSS

“Still Lifes” “Oscillators” “Spaceships”

Diehard (130) Acorn (5206)


Gosper Glider Gun


Game of life simulation4

Game of Life Simulation

  • What the game of Life seems to do most eloquently is demonstrate the amazing complexity inherent in even simple systems, and how stunning order and beauty can be found in even the murkiest times of chaos.

  • After realizing that which looked like a huge throbbing mass of nothing two turns ago is now a perfectly symmetrical stable system, you will see what I mean. Also, seeing if you can create sets of life that can accomplish specific goals (travel across the screen, shoot out travelers, etc.) is a pleasant affirmation of the fact that structured organisms CAN wander out of a pile of primordial soup. (from Dan Norton,

What is simulation3

What is simulation?

  • A video game is an imaginary world: its inhabitants are nonexistent creatures that nevertheless the eye can see, and the hand can move. It is imaginary in the sense that there is no solid reality behind the picture. A bouncing ball may be faithfully simulated, but that moving blip of light has no real mass or elasticity. The ball’s position, velocity, mass, and elasticity are just numbers stored in the computer that controls the video game; and the laws of physics that govern the ball’s trajectory and it bounce are just mathematical equations stored in the computer’s program. --Warren Robinett

Physics simulation

Physics Simulation

  • How do we simulate real-world physical phenomena?

    • Realistic motion, inertia, gravity, elasticity,…

  • This is central to numerous video games, 3D worlds, flight simulators, sports simulations, military tests… and the list goes on.

Physics simulation1

Physics Simulation

  • DEMO


Simple physics simulation

Simple Physics Simulation

  • Represented entities

    • Objects

      • Mass, Position, Velocity, Force

    • Springs

      • Stretchiness, Resting Position

    • Forces

      • Gravity, Air Resistance

  • Simulation procedure

    • Objects repel each other (“anti-gravity”) based on mass and position

    • Springs push or pull based on position of end-points

    • Objects are slowed by air resistance dependent on their current velocity

Physics simulations

Physics Simulations

  • N-Body Forces

    F = G * mass1 * mass2 / distance^2

  • Spring Forces

    F = -stretchiness * distance from resting

  • Drag Forces (Viscosity, Air Resistance)

    F = resistance * velocity

  • Gravity

    F = mass * gravitational pull

3d graphics as simulation

3D Graphics as Simulation

  • Computer Images are 2D

    • (in fact, so is all retinal vision)

  • Depth cues, perspective, shading, occlusion, etc allow us to perceive images as being 3D representations

  • These images exploit our perception to simulate 3D worlds. How?

3d graphics simulations

3D Graphics Simulations

  • Represented entities

    • 3D Models of Characters and Objects

      • Combinations of shapes modeled in 3D space

      • Colors and Textures of these Shapes

    • Lighting Sources

    • Camera Position

  • Simulation procedure

    • Generate 2D Image from 3D Model

      • Perspective Projection

      • Ray-Tracing / Radiosity

Collections of shapes

Collections of Shapes

To 3d imagery

…to 3D Imagery

The 2d basics

The 2D Basics

  • Computer Image = 2D Grid (the Raster)

    • Each grid entry is a number indicating color

  • Drawing Primitives (remember LOGO?)

    • setColor, drawLine, drawRect, fillRect, drawEllipse, fillEllipse, drawCurve

  • So how to go from here to 3D?

    • Procedural Abstraction

    • Simulation

Put it in perspective

Put It In Perspective

Put it in perspective1

Put It In Perspective

3d rendering approaches

3D Rendering Approaches

  • Scan Conversion

    • 3D Model -> 2D Model -> Image

    • Transform geometry (to handle perspective)

  • Raytracing

    • Directly generate image by simulating the path of light rays through the scene

    • (but do it in reverse!)









  • Send rays to light sources to know shadow conditions

Raytracing effects

Raytracing Effects

  • Power of a general simulation

    • Reflection (let light rays continue after hitting a surface, add up colors along the way)

    • Refraction (redirect light ray’s path in response to surface)

    • Can warp the viewing surface (fisheye views, simulate vision problems)

  • Drawbacks

    • This takes computational power - good for movies or imagery, bad for real-time games.



  • Reflection



  • Refraction



  • Warped viewing surfaces

Shading languages

Shading Languages

Repeated themes

Repeated Themes

  • Game of Life, Physics, Raytracing

    • Model of “World”

      • Cells, Objects / Springs / Forces, Shapes / Lights / Textures

    • Actions/operations on that world

      • Live / Die, Physical Laws, Ray Casting / Reflection / Refraction

  • Basic rule structure gives rise to an amazingly complex space of possibilities

Games as simulation of conflict

Games as Simulation of Conflict

  • Territorial

    • Chess, Checkers, RISK, Halo, Quake

  • Economic

    • Monopoly, Magic the Gathering

  • Knowledge

    • Trivial Pursuit, Hollywood Squares

  • Other Arenas Possible

    • Social, Psychological conflict

Levels of simulation

Levels of Simulation

  • General Simulation Engine (“Simulation”)

    • A rich framework for simulating phenomena, based on generative principles.

    • Ex: A character jumping in a rich physics simulations (e.g., Halo)

  • Case-Based Simulation (“Emulation”)

    • Explicit simulation rules for handling specific cases.

    • Ex: A character jumping in Mario Bros.

  • Most games interleave the two, depending on desired levels of detail.

Immersive fallacy

Immersive Fallacy

  • The idea that the pleasure of a media experience lies in its ability to sensually transport the participant into an illusory, simulated reality.

  • Counter-Point

    • “… but the very thing that makes their activity play is that they also know they are participating within a constructed reality, and are consciously taking on artificial meanings”

    • Toolmaker’s Paradigm: remember Text1 vs Text2?

Nick reid on play

Nick Reid on Play

  • Can Computers “Play”? Can Software “Play”? Can Hardware “Play”?

  • Salen and Zimmerman make constant reference as games and play being rules in motion. Is this true? What is “motion”? Regardless of those answers, what are the effects of these ludic structures in motion? What is left behind? Is there anyway to digitally represent these “ludic artifacts”?

Nick reid on play1

Nick Reid on Play

  • “ . . . Caillois defines play by virtue of its structural identity.” (p.309)

  • This quote struck me as akward because at first I had no idea what exactly it meant. Earlier S&Z quotes various forms and definitions of types of games from Caillois, so, what the quote probably means is that the identity of the structure is what defines the type of play. When I first read it, I immediately thought about networks, and the structures of social identities, and tried to put that into play – epically paida, so my question is, how could one represent game or play structures as a “graph”?

Lecture overview3

Lecture Overview

  • Review of Last Time

  • Today

    • Simulation Engines

    • 3D Graphics

  • Preview of Next Time

    • Prof. Greg Niemeyer from Art Practice

      • Henry Jenkins. Art Form for the Digital Age, MIT Technology Review, (September/October 2000).

      • Discussion Questions: Sharmaine Lewis

  • Login