‘Fire’: The Procedural Method Investigation of Procedural Trees and Fire:
Procedural Fire and Procedural Trees in a Virtual World Hugh Smith Senior Software Engineer Intel Corporation Visual Computing Software Division
Agenda The Smoke Project Procedural Trees Grammar Procedural Trees Parser Configuration & seeding Procedural Fire Smart Particles Use of Heat Particles Procedural Trees & Procedural Fire Overview and Demos AVI Q&A
Screen shot from Smoke Framework Demo
6 Procedural Trees Editable Grammar and Seeded Parser allow for easy creation of an endless variety of Trees. Canopies can be added, changed, or removed for seasonal effects. Create Forests: each seed creates a different tree.
Elements of a Tree Grammar Trees have a trunk Trees have a trunk Branches Split off the trunk Branches Split off the trunk There might be multiple branches that split off at the same place. Each branch has a drop angle at the split. The main trunk might continue straight. Branches Branches They can vary in length. They can be straight, curved, or even wobble. Trees have a canopy Trees have a canopy Canopies have a general arch. They tend to be more concentrated at the ends of the branches
Concept of the Grammar ProbabilitySplitSplit Type Drop Angle Axial Bias Segment Step Length Segment DiameterWobbleTaper Level % 255Ordinary Repeat Opposed 552Ordinary Level % 53 Repeat Opposed Repeat Opposed 452Ordinary 202Ordinary Level n
Segment Diameter Heading
Two Segments Segment Step Length
Two Segments Rendered
Branches are made up of Segments This Branch has Five Segments Two End Points
Branch Collection of Branch Segments Branch Bounding Box Trees are a collection of Branches Branch Collection of Branch Segments Branch Bounding Box Branch Collection of Branch Segments Branch Bounding Box Branch Collection of Branch Segments Branch Bounding Box
1 Levels
Drop Angle Wobble Heading Axial Split
Drop Angle Wobble Heading Axial Split Levels
Canopy Drop Angle Normal 3/7 4/7 Fulcrum
Canopy Segments Create a Patch Perturb the Positions Apply the Texture
Concept of the Grammar ProbabilitySplitSplit Type Drop Angle Axial Bias Segment Step Length Segment DiameterWobbleTaper Level % 255Ordinary Repeat Opposed 552Opposed Level % 51 Repeat Opposed Repeat Opposed 452Ordinary 202Ordinary Level n Similar to an L-System or Turtle Grammar
Level 0 Probability and Split 55%15%25 % 5% 0.42 randomArg is between 0&1. The probabilities of the splitList array elements will add to 1.0; 1.0 represents 100%. if you have four levels of.25,.5,.15,&.55 respectively you have a total of 100%. the randomArg will lie somewhere in one of the four ranges. So say we have a randomArg value of.42. that means that the third split or the one with the probability of.15 will be chosen. that is is.45 and.30<.42<=.45
Tree Grammar Parser When given Grammar position Random Seed Creates a Linked List of Branches Fills Vertex Buffer Index Buffer Plant a seed and Grow a tree
Seed 1321 Seed 1492 Seed 3721 TGmr1 TGmr2 TGmr3 TGmr4 with canopy
Procedural Fire implements a believable spreading fire. Trees catch on fire spreading from branch to branch and then tree to tree. Smart Particle Systems use heat particles generated by each fire and the fire spreads procedurally. Configurable Flames and Heat particle behavior. Density, Velocity, direction, etc.
Properties of a Realistic Fire Modeling how fire Spreads Fire follows the Fuel Fire follows the Fuel The more intense the fire the more heat it produces and the faster it burns and spreads The more intense the fire the more heat it produces and the faster it burns and spreads Fire is proximity sensitive. This means that the closer a fuel source is to the fire the more likely it is to catch on fire. Fire is proximity sensitive. This means that the closer a fuel source is to the fire the more likely it is to catch on fire.
Smart Particle System Series of Particle Engines made up of two parts Fire Particles Visible, what we think of as particles Visible, what we think of as particles Heat Emitter Particles Invisible, physical in nature Invisible, physical in nature
Smart Particle System Heat Particle Intersects Bounding Box Bounding Boxes for every Branch
Collision detected and Branch becomes active
Fire Objects Any object in the scene that can be on fire Each Tree is a separate Fire Object A meteor, a house, would each be separate fire objects
Relationship between Fire Objects World Space Representation Local Space Representation
Relationship between Fire Objects Local Space to World Space Translation World Space to Local Space Translation Do Collision Check
Fire System Fire System Collision Check For each Fire Object For each Fire in all Fire Objects For each Heat Emitter Check Collision (All Non Burning branches) if collision set branch to burning state Each Tree Each Branch Contained in Each Fire Fire Object Branch List Branch::AABB Branch::EndPoints Branch::AABB Branch::EndPoints Branch::AABB Branch::EndPoints Fire Heat Emitter Fire Heat Emitter Fire Heat Emitter Fire Object Branch List Branch::AABB Branch::EndPoints Branch::AABB Branch::EndPoints Branch::AABB Branch::EndPoints Fire Heat Emitter Fire Heat Emitter Fire Heat Emitter Fire Object Branch List Branch::AABB Branch::EndPoints Branch::AABB Branch::EndPoints Branch::AABB Branch::EndPoints Fire Heat Emitter Fire Heat Emitter Fire Heat Emitter
Fire System Parameters: example for a Tree TechniqueFireLine EmitterLine FPDensity10 FPImpulse(0.0625,0.5,0.0625) FPShift(0.0,1.0,0.0) FPMaxLifeTime2 FPMinLifeTime1 FPMinSize10 FPMaxSize15 FPTimePerParticle0.025 HPImpulse(3.0,8.0,3.0 ) HPShift(0.0,6.0,0.0) HPDensity1 HPTimePerParticle0.002 HPMinLifeTime7 HPMaxLifeTime10 ShowHP0 OnFire0
Direction of Particles Impulse (0.4,1.0,0.4) Heat moves more up than sideways or down Shift (0.0,0.8,0.0) X Y Z
Particle Velocity Volume X Y Z
Trees and Fire Demo Tree Heat Particles Tree Fire Particles
Next Steps Expanding the Concept Branches burn through and fall off Textures changes when burning XML Parser for Tree Grammar Wind Tunnels and Silos Getting the Smoke Code to
Acknowledgements and Bibliography The Algorithmic Beauty of Plants Przemyslaw Prusinkiewicz Aristid Lindenmayer Real Time Design and Animation of Fractal Plants and Trees Peter E. Oppenheimer New York Institute of Technology Computer Graphics Lab Creation and Rendering of Realistic Trees Jason Weber Teletronics International, Inc. Joseph Penn Army Research Laboratory Introduction to 3D Game Programming with DirectX 9.0c: A Shader Approach Frank Luna
Q & A Thank You Demo Grove on Fire
© 2008 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.