real time simulation of game character clothing€¦ · thesis presentation master of science,...

Post on 25-Jul-2020

3 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Real Time Simulation of Game Character Clothing

Thesis Presentation

Master of Science, Computer Animation and Visual Effects

ANITHA RAJAGOPALAN

August 19, 2013

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.

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

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)

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.

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.

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

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

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

Application User Interface

Havok Cloth asset viewer

Application User Interface developed

Application User Interface

Application User Interface

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)

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)

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

Thank You!!

Questions??

top related