![Page 1: Real Time Simulation of Game Character Clothing€¦ · Thesis Presentation Master of Science, Computer Animation and Visual Effects ANITHA RAJAGOPALAN August 19, 2013 . Motivation:](https://reader033.vdocuments.us/reader033/viewer/2022050308/5f708355e0b4dd1775182958/html5/thumbnails/1.jpg)
Real Time Simulation of Game Character Clothing
Thesis Presentation
Master of Science, Computer Animation and Visual Effects
ANITHA RAJAGOPALAN
August 19, 2013
![Page 2: Real Time Simulation of Game Character Clothing€¦ · Thesis Presentation Master of Science, Computer Animation and Visual Effects ANITHA RAJAGOPALAN August 19, 2013 . Motivation:](https://reader033.vdocuments.us/reader033/viewer/2022050308/5f708355e0b4dd1775182958/html5/thumbnails/2.jpg)
Motivation:
Real time cloth simulation solutions for games provided by middleware such as
PhysX cloth by NVIDIA, Havok Cloth from Havok, Shrouds from Cloak works.
Two components:
1. Run-time – Provide data for rendering cloth, cloth Simulation in actual
game environment, asset deserialization and LOD system
2. Cloth authoring – specify cloth behaviour, parameters, free motion
restrictions on cloth using Plug-ins for 3DS Max and Maya and clothing tool
application.
![Page 3: Real Time Simulation of Game Character Clothing€¦ · Thesis Presentation Master of Science, Computer Animation and Visual Effects ANITHA RAJAGOPALAN August 19, 2013 . Motivation:](https://reader033.vdocuments.us/reader033/viewer/2022050308/5f708355e0b4dd1775182958/html5/thumbnails/3.jpg)
PhysX Clothing: Pipeline
\
Into the game
Cloth Authoring: Plug-in for 3DSMax
Assets imported into UDK (Unreal)
Cloth Authoring: Rendered and
tested in 3DS Max
Packaged
into a game
Game assets
Preview
within Max
![Page 4: Real Time Simulation of Game Character Clothing€¦ · Thesis Presentation Master of Science, Computer Animation and Visual Effects ANITHA RAJAGOPALAN August 19, 2013 . Motivation:](https://reader033.vdocuments.us/reader033/viewer/2022050308/5f708355e0b4dd1775182958/html5/thumbnails/4.jpg)
Project Pipeline
Maya Cloth Authoring –
Maya Python Commands
Real time simulation of cloth in
standalone application – C++ &
OpenGl
Make
Cloth
Generate Collision
Capsules
Make Attachment
points
Export Settings
ASSIMP Importer
Real Time Simulation ( PBD)+
Collisions + Rendering(glsl
Shaders)
![Page 5: Real Time Simulation of Game Character Clothing€¦ · Thesis Presentation Master of Science, Computer Animation and Visual Effects ANITHA RAJAGOPALAN August 19, 2013 . Motivation:](https://reader033.vdocuments.us/reader033/viewer/2022050308/5f708355e0b4dd1775182958/html5/thumbnails/5.jpg)
Standalone Application:
PBD Cloth Solver:
Based on the “Position Based Dynamics”, 2007.
Ideal for real-time game simulations – Used in ApeX Clothing middleware
Modifies the positions directly rather than deriving them from forces and
velocities during the simulation
Concept: Calculates an estimated position first and projects it to correct position
based on the input constraints.
Cloth model: Stretching and Bending – “A Triangle bending constraint model for
position based dynamics”, 2010.
![Page 6: Real Time Simulation of Game Character Clothing€¦ · Thesis Presentation Master of Science, Computer Animation and Visual Effects ANITHA RAJAGOPALAN August 19, 2013 . Motivation:](https://reader033.vdocuments.us/reader033/viewer/2022050308/5f708355e0b4dd1775182958/html5/thumbnails/6.jpg)
Collisions
Collisions are created as constraints in PBD
These are dynamic constraints that change in every time step unlike the stretch
and bending constraints.
Three main collisions:
o Plane collision – collision with floor to keep the cloth from falling infinitely.
o Capsule collision – collision volume used in games, the game character will
be made of capsule collision volumes.
o Self - collision – point triangle collision. Spatial Partitioning required.
![Page 7: Real Time Simulation of Game Character Clothing€¦ · Thesis Presentation Master of Science, Computer Animation and Visual Effects ANITHA RAJAGOPALAN August 19, 2013 . Motivation:](https://reader033.vdocuments.us/reader033/viewer/2022050308/5f708355e0b4dd1775182958/html5/thumbnails/7.jpg)
Spatial Partitioning:
Spatial Hashing is used – “Optimized Spatial Hashing for Collision Detection of
Deformable Objects”,2003.
Required for optimizing self - collision checks.
Hash table update optimization – based on time stamp
![Page 8: Real Time Simulation of Game Character Clothing€¦ · Thesis Presentation Master of Science, Computer Animation and Visual Effects ANITHA RAJAGOPALAN August 19, 2013 . Motivation:](https://reader033.vdocuments.us/reader033/viewer/2022050308/5f708355e0b4dd1775182958/html5/thumbnails/8.jpg)
Maya Cloth Authoring
Generate Capsules
Make Cloth
Make Attachment Points
Attach to Capsule
CAPS_DATA COUNT 0 CAPSULE 0
NAME joint1_ClColliCyl RADIUS 1.0 TOTAL_FRAMES 1 FRAME 0
POS_A 1.0 1.0 1.0 POS_B 1.0 1.0 1.0
FRAME 1 POS_A 1.0 1.0 1.0 POS_B 1.0 1.0 1.0 . .
CLOTH_MESH COUNT 0 MESH 0
NAME solid1_MyPBDCloth IS_ATTACHED 1 POS 0 1.0 1.0 1.0 CAPSULE 7 POS 1 1.0 1.0 1.0
![Page 9: Real Time Simulation of Game Character Clothing€¦ · Thesis Presentation Master of Science, Computer Animation and Visual Effects ANITHA RAJAGOPALAN August 19, 2013 . Motivation:](https://reader033.vdocuments.us/reader033/viewer/2022050308/5f708355e0b4dd1775182958/html5/thumbnails/9.jpg)
Managing the FPS
Crucial for the project as 3 types of frame rates are dealt with during the
simulation
o Render FPS of the system Hardware running the sim
o Simulation FPS
o Animation FPS
Simulation should run at same FPS irrespective of variations in above three FPS
Fixing the time step of simulation – set to worst frame time of the simulation
Simulation FPS should be higher that Animation FPS for good cloth response
![Page 10: Real Time Simulation of Game Character Clothing€¦ · Thesis Presentation Master of Science, Computer Animation and Visual Effects ANITHA RAJAGOPALAN August 19, 2013 . Motivation:](https://reader033.vdocuments.us/reader033/viewer/2022050308/5f708355e0b4dd1775182958/html5/thumbnails/10.jpg)
Application User Interface
Havok Cloth asset viewer
Application User Interface developed
![Page 11: Real Time Simulation of Game Character Clothing€¦ · Thesis Presentation Master of Science, Computer Animation and Visual Effects ANITHA RAJAGOPALAN August 19, 2013 . Motivation:](https://reader033.vdocuments.us/reader033/viewer/2022050308/5f708355e0b4dd1775182958/html5/thumbnails/11.jpg)
Application User Interface
![Page 12: Real Time Simulation of Game Character Clothing€¦ · Thesis Presentation Master of Science, Computer Animation and Visual Effects ANITHA RAJAGOPALAN August 19, 2013 . Motivation:](https://reader033.vdocuments.us/reader033/viewer/2022050308/5f708355e0b4dd1775182958/html5/thumbnails/12.jpg)
Application User Interface
![Page 13: Real Time Simulation of Game Character Clothing€¦ · Thesis Presentation Master of Science, Computer Animation and Visual Effects ANITHA RAJAGOPALAN August 19, 2013 . Motivation:](https://reader033.vdocuments.us/reader033/viewer/2022050308/5f708355e0b4dd1775182958/html5/thumbnails/13.jpg)
Final Results
Performance dependent on number of particles, number of constraints, self-
collision ON or OFF
Count Self-collision Frame Rate Image
Particles: 2750 Constraints: 17446
YES Sim: 12 fps (Anim: nil)
Particles: 1148 Constraints: 6956
YES Sim: 29 fps (Anim: 48 fps)
![Page 14: Real Time Simulation of Game Character Clothing€¦ · Thesis Presentation Master of Science, Computer Animation and Visual Effects ANITHA RAJAGOPALAN August 19, 2013 . Motivation:](https://reader033.vdocuments.us/reader033/viewer/2022050308/5f708355e0b4dd1775182958/html5/thumbnails/14.jpg)
Particles: 1218 Constraints: 7629
NO Sim: >30 fps (Anim: 6 fps – 24 fps of this anim has fast movements)
Particles: 1246 Constraints: 7809
YES Sim: 30 fps (Anim: 24 fps)
![Page 15: Real Time Simulation of Game Character Clothing€¦ · Thesis Presentation Master of Science, Computer Animation and Visual Effects ANITHA RAJAGOPALAN August 19, 2013 . Motivation:](https://reader033.vdocuments.us/reader033/viewer/2022050308/5f708355e0b4dd1775182958/html5/thumbnails/15.jpg)
Future Work
Maya Authoring – complete plugin rather than a Maya command tool-set as
developed by ApeX cloth
Improve efficiency of PBD solver using Hierarchical PBD
Handle stretchy cloth- “LRA method”, 2012
Textures to cloth
Multi-threaded architecture
Extend to other PBD simulations
![Page 16: Real Time Simulation of Game Character Clothing€¦ · Thesis Presentation Master of Science, Computer Animation and Visual Effects ANITHA RAJAGOPALAN August 19, 2013 . Motivation:](https://reader033.vdocuments.us/reader033/viewer/2022050308/5f708355e0b4dd1775182958/html5/thumbnails/16.jpg)
Thank You!!
Questions??