Simulation Acceleration Techniques Kelly Ward Comp 259 – Spring 2002 March 20, 2002 March 20, 2002 Simulation Acceleration Techniques.
Download ReportTranscript Simulation Acceleration Techniques Kelly Ward Comp 259 – Spring 2002 March 20, 2002 March 20, 2002 Simulation Acceleration Techniques.
Simulation Acceleration Techniques Kelly Ward Comp 259 – Spring 2002 March 20, 2002 March 20, 2002 Simulation Acceleration Techniques Simulation Acceleration Real-time performance can be necessary for many applications Virtual Reality Video Games Complexity of animation environment can make it too time consuming to animate in real-time March 20, 2002 Simulation Acceleration Techniques Simulation Acceleration Represent a certain animation at different resolutions, or level of detail, depending on a number of criteria Placement in scene with respect to viewer In field of view Distance from viewer Importance to scene Motion March 20, 2002 Simulation Acceleration Techniques Dynamics Culling “View-dependent culling of dynamic systems in virtual environments” S. Chenney and D. Forsyth. In Proc. of ACM Symposium on Interactive 3D Graphics, 1997. In a virtual environment, cull objects that have no effect on the view while maintaining consistency of the environment March 20, 2002 Simulation Acceleration Techniques Dynamics Culling Consistency Determine state object should be in when back in view Completeness Objects may come back into view on their own March 20, 2002 Simulation Acceleration Techniques Conditioning Influence of initial conditions Strong Accurate predictions can be made, have to integrate system as if it were in view Medium Qualitative predictions can be made, apply techniques that best match the properties of the system Weak Difficult for viewer to make prediction, but still has general knowledge of system – use general behavior of system and choose new state consistent with model March 20, 2002 Simulation Acceleration Techniques Bumper Cars Simulate cars driving around ellipse Try to avoid walls and other cars Results in perturbed motion around ellipse Model three different views Static view Walkthrough view Random view March 20, 2002 Simulation Acceleration Techniques Bumper Cars - Dynamics Integrates standard rigid body equations Steering wheel angle Speed Friction from wheels and surface Intervals over which to change drive parameter Collisions detected using OBBTrees March 20, 2002 Simulation Acceleration Techniques Bumper Cars Motion is not predictable by viewer Actions (collision response, avoidance, random noise) make perturbations uncertain to initial conditions Viewer will be able to detect average effect of perturbations over time March 20, 2002 Simulation Acceleration Techniques Bumper Cars Solution: Capture distribution of spatial effect of the temporal mean of perturbations Sample spatial effect and apply to constant elliptic motion expressed as explicit function of time March 20, 2002 Simulation Acceleration Techniques Analysis March 20, 2002 Simulation Acceleration Techniques Real-time Animation “Simulation Levels of Detail for Real-time Animation” Deborah Carlson and Jessica Hodgins. In Graphics Interface’97, pages 1–8, June 1997. Simulate group of legged creatures using levels of detail to reduce computation cost March 20, 2002 Simulation Acceleration Techniques Real-time Animation Build a virtual world where group of legged creatures have to escape a giant puck If creature collides with something, creature may recover balance or fall down Two measures of success of LODs for environment Outcome of the game must be relatively unchanged Viewer’s perception of motion must be the same March 20, 2002 Simulation Acceleration Techniques Representation of Creatures Three levels of detail Rigid-body dynamics – Finest detail Hybrid kinematics/dynamics Point-mass simulation – Coarsest detail March 20, 2002 Simulation Acceleration Techniques Representation of Creatures Rigid-body dynamics Simulation with three bodies and four degrees of freedom Control flight duration, body attitude (roll, pitch, yaw), and forward and sideways velocity March 20, 2002 Simulation Acceleration Techniques Representation of Creatures Hybrid kinematic/dynamic model Simple dynamic model for motion of body Computes motion of leg kinematically Position of body on playing field computed using point-mass model Height, roll, pitch of body computed using a table lookup and interpolation March 20, 2002 Simulation Acceleration Techniques Choosing Representation Dynamic behavior of creature Area of influence around each creature and object – where interactions are likely Creature intersects another area use highest LOD March 20, 2002 Simulation Acceleration Techniques Choosing Representation Importance of creature to viewer Out of view: Use lowest LOD In view but far away: Use middle LOD In view and close to viewer: Use highest LOD March 20, 2002 Simulation Acceleration Techniques Transitions Desire smooth blending of motion Allow switch only during a particular part of flight phase during running cycle Cyclic motion allows for this technique March 20, 2002 Simulation Acceleration Techniques Analysis Effect of Camera Range March 20, 2002 Effect of Puck Area of Influence Simulation Acceleration Techniques Animating Prairies “Animating Prairies in Real-Time” Frank Perbet and Marie-Paule Cani I3D, 2001 Use level of detail to accelerate the animation and rendering of the blades of grass on a prairie March 20, 2002 Simulation Acceleration Techniques Animating Prairies Simulations: Wind blowing through the grass A walker moving through the scene Due to so many blades of grass in one scene, too time-consuming to animate and render in real-time March 20, 2002 Simulation Acceleration Techniques Grass Representation Three basic representations of grass 3D geometry – Finest detail Volumetric textures 2D textures – Coarsest detail Choose representation based on distance to viewer Need to transition smoothly between different representations March 20, 2002 Simulation Acceleration Techniques 3D Geometry Representation Most convincing representation – Used for grass closest to viewer Blades are represented as a chain of linesegment primitives March 20, 2002 Simulation Acceleration Techniques 3D Geometry Representation Effect of wind - each 3D blade of grass is sent Direction of wind Index – indicates bend of grass Different kinds of grass have different stiffness and bending properties March 20, 2002 Simulation Acceleration Techniques Volumetric Textures Referred to as 2.5D representation Polygon strip mapped with a semi-transparent texture Used at mid-distance from viewer Strip is never shown to be parallel to viewer March 20, 2002 Simulation Acceleration Techniques Volumetric Textures Effect of wind – similar to 3D geometry representation Use layers of vertical polygon strips to allow animation Similar motion to 3D geometry allows easier transitioning between the two March 20, 2002 Simulation Acceleration Techniques 2D Textures 2D texture is mapped on the terrain Represents grass at a distance from the viewer Textures generated by computing 2D images of 3D blades Wind not simulated March 20, 2002 Simulation Acceleration Techniques Choosing Representation Tile terrain into squares referred to as “patches of grass” Patches that are out of the field of view are culled since they will not appear Representation chosen based on distance to viewer March 20, 2002 Simulation Acceleration Techniques Transitions Seamless transitions between representations desired to alleviate disturbance to viewer Difficulty going from 3D to 2.5D to 2D and back again Different physical representation Different motion modeling from wind March 20, 2002 Simulation Acceleration Techniques Transitions - 3D to 2.5D Cannot just switch or fade in-fade out Blades not likely to be in exact same positions Apply morphing technique Each representation uses same number of blades – 3D geometry maps to position on texture March 20, 2002 Simulation Acceleration Techniques Transitions - 2.5D to 2D Since 2D representation is used at a distance, can dissolve between the two representations Poor results on silhouettes (outline of hills) 2.5D representation progressively grows (or ungrows) from the ground 2D texture progressively disappears (or appears) Discrepancies not as distracting to viewer March 20, 2002 Simulation Acceleration Techniques Results March 20, 2002 Simulation Acceleration Techniques Hair Simulation Three representations used for hair Individual Strand Groupings – Finest detail Clusters Patches – Coarsest detail March 20, 2002 Simulation Acceleration Techniques Transitions Patch to Cluster to Strand groupings Same basic skeleton model – controls motion 1 patch to 3 clusters Interpolate values of new cluster skeletons Similar technique for reverse Switch based on criteria Distance from viewer Forces acting on hair Occlusion of hair March 20, 2002 Simulation Acceleration Techniques Hair Simulation Front View March 20, 2002 Back View Simulation Acceleration Techniques References D. Carlson and J. Hodgins. Simulation Levels of Detail for Real-Time Animation. In Proc. of Graphics Interface 1997, 1997. S. Chenney and D. Forsyth. View-dependent culling of dynamic systems in virtual environments. In Proc. of ACM Symposium on Interactive 3D Graphics, 1997. D. O’Brien, S. Fisher, and M. Lin. Automatic simplification of particle system dynamics. Computer Animation 2001. F. Perbet and M. Cani. Animating Prairies in Real-Time. Proceedings on 2001 Symposium on Interactive 3D graphics, March 2001. March 20, 2002 Simulation Acceleration Techniques