SlideShare a Scribd company logo
1 of 32
Havok Physics Primer
Alex Kang

1

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
물리학 (Physics)

갈릴레오 갈릴레이
(1564~1642)

아이작 뉴턴
(1643~1727)

알베르트 아인슈타인
(1879~1955)

<<1687, Principia >>
3

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Physics - Kinematics
낙체의 법칙

진공에서 물체가 떨어질
경우 모든 물체가 같은
속도로 떨어짐
[1590, on Motion]

갈릴레오 갈릴레이
(1564~1642)

투사체 운동

투사체의 궤도인 포물선 운동을
수평방향의 등속 운동 과
수직방향의 가속 운동
(자유낙하운동) 으로 나누어 설명

관성의 발견

물체가 처음의 운동상태를
유지하려는 성질
4

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Physics - Dynamics
뉴턴 역학 (Newtonian Mechanics)
운동의 제1법칙 ( 관성의 법칙)

아이작 뉴턴
(1643~1727)

운동의 제2법칙 (가속도의 법칙)

운동의 제3법칙 (작용 반작용의 법칙)

[1687, Principia]

5

만유인력의 법칙

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Physics Engine
강체 (Rigid Body) 시뮬레이션
동역학 (Dynamics) 시뮬레이션
물리적인 속성들 (Physical Properties)

충돌 처리 (Collision Detection)
Constraint Systems

6

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Rigid Body Simulation
Rigid Body, 절대로 형태가 변하지 않는 단단한
물체

7

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Rigid Body Simulation
지형(Landscape)은 변하지 않음

8

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Rigid Body Simulation
단순화된 Collision geometry(Shape) 을 사용

9

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Rigid Body Simulation
속도를 위해 물리 연산이 비활성화 되기도 함
(Simulation Island)

10

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Dynamics Simulation
연속적인 이동 경로를 일정한 시간 주기로
나누어서 Collision detection 계산

Continuous
11

Discrete
Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Dynamics Simulation
실제 Motion 연산을 좀 더 단순화 해서 사용
– 공기 저항이나 바람은 경우에 따라 사용 안하기도 함

Optional

12

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Dynamics Simulation
Iterations (sub-time-steps)
– physics simulation은 화면 갱신 주기보다 자주 발생됨
– sub-steps 는 조절 가능

Accumulation of error
– 다음 step 계산시 바로 직전
Step 만을 참조 한다.
(= Full history 가 아님)

13

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Dynamics Simulation
Center of mass (COM)

14

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Physical Properties
정지 마찰계수 (Static friction)
– 정지된 상태의 물체가 미끌어지지 않도록 막는 힘
– 물체가 안정적으로 붙어 있게 해주는 주요 속성

운동 마찰계수 (Dynamic friction)
– 바닥에 붙은채 움직이는 물체에 작용하는 마찰 계수

[Friction Demo]
15

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Physical Properties
반발계수,복원력 (Restitution)
– 충돌이 발생된 후 보존되는 에너지의 양
– 0~1사이의 값, 1인 경우 충돌시 에너지를 잃지 않음

[Restitution Demo]

질량 (Mass)
– 물체를 움직이게 하는데 필요한 힘의 크기
16

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Collision Detection
물리 엔진의 핵심 코어
최적화를 위해 여러 단계를 거쳐서 처리
– Broadphase:
더 상세한 충돌 처리 단계로 넘어가기전 AABB 를 사용
해서 대부분의 오브젝트를 제거하는 과정
– Midphase:
충돌 처리를 위한 연산의 복잡도를 낮추는 과정
– Narrowphase:
실제 오브젝트 간의 Distance 계산이 이루어짐

Narrowphase 에서의 오브젝트 쌍의 개수에 의해
Performance가 결정됨
17

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Collision Detection
Broadphase
간단한 AABB 연산
을 통해 가능한 많은
오브젝트를 제거함

18

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Collision Detection
Midphase
복잡한 오브젝트를 나누기 위해 BroadPhase에 비해
무거운 연산이 필요하게됨

– Example
Landscape 전체가 아닌
통나무와 충돌 가능성이
있는 일부 삼각형 만을 선별

19

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Collision Detection
Narrowphase

최종 충돌 여부를 판정하기 위해 거리 계산을 수행

20

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Collision Detection
Rigid bodies and collision geometries(Shape)
– 빠른 충돌 연산을 위해 적절한 Shape을 사용해야 한다

21

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Collision Detection
Convex hull shapes
그래픽 메쉬를 감싸는 “shrink wrap” Shape

22

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Collision Detection
Compound shapes
– convex list shapes 의 충돌 처리를 빠르게 하기 위해
추가적인 midphase 사용
– 계층적인 트리 구조
– Sub-object의 Instances 으로 메모리 절약 가능

26

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Collision Detection
Discrete Collision Detection의 한계
– Missed collisions
"bullet-through-paper„

– Interpenetration
오브젝트가 파묻힘

[Discrete vs Continuous Demo]
27

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Collision Detection
Discrete
Penetration
acceptable.
Integrate

Continuous

=> Done.

Collide
t1

t0

No TOIs
=> Done.

Integrate
t0
28

Collide
Solve TOI
Detect Penetration
Collision
Generate TOI

Re-Integrate
Re-Collide
t1

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Collision Detection
Stable stacking

30

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Constraint Systems
연결된 rigid body 에서의 Constraint systems
–
–
–
–
–
–

31

Springs
Dashpots
Gears
Mechanical joints
Limited motion
Motorized motion

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Constraint Systems
다양하게 연결된 Constraint System 사례

[ArmConveyor Demo]
33

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Havok Physics 기초 실습

[야구의신, 네오위즈]
36

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
사전 준비
Havok Physics 2012.2.x SDK
DirectX SDK
Visual Studio
WinMerge (Optional)
Unzip Physics_Basic_Workshop.zip to
{Havok SDK}DemoDemosPhysicsWorkshop

37

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Workshop 1
hkpBoxShape 인스턴스를 공유하는
벽면(hkpRigidBody)을 만들어서 좌,우를 막는다

38

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Workshop 2
hkpSphereShape으로 야구공(hkpRigidBody)을
만든다

39

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
Workshop 3
물리엔진에서 제공하는 동역학(Dynamics)
시뮬레이션이 아닌 Kinematics 방식으로 야구공을
도착지점을 계산해본다.

40

Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.

More Related Content

Recently uploaded

A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)Tae Young Lee
 
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Kim Daeun
 
Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Wonjun Hwang
 
캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스
 
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionMOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionKim Daeun
 
Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Wonjun Hwang
 

Recently uploaded (6)

A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)
 
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
 
Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)
 
캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차
 
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionMOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
 
Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

하복 코리아 7회 오픈 세미나 "Havok physics 기초" 발표

  • 1. Havok Physics Primer Alex Kang 1 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 2. 물리학 (Physics) 갈릴레오 갈릴레이 (1564~1642) 아이작 뉴턴 (1643~1727) 알베르트 아인슈타인 (1879~1955) <<1687, Principia >> 3 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 3. Physics - Kinematics 낙체의 법칙 진공에서 물체가 떨어질 경우 모든 물체가 같은 속도로 떨어짐 [1590, on Motion] 갈릴레오 갈릴레이 (1564~1642) 투사체 운동 투사체의 궤도인 포물선 운동을 수평방향의 등속 운동 과 수직방향의 가속 운동 (자유낙하운동) 으로 나누어 설명 관성의 발견 물체가 처음의 운동상태를 유지하려는 성질 4 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 4. Physics - Dynamics 뉴턴 역학 (Newtonian Mechanics) 운동의 제1법칙 ( 관성의 법칙) 아이작 뉴턴 (1643~1727) 운동의 제2법칙 (가속도의 법칙) 운동의 제3법칙 (작용 반작용의 법칙) [1687, Principia] 5 만유인력의 법칙 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 5. Physics Engine 강체 (Rigid Body) 시뮬레이션 동역학 (Dynamics) 시뮬레이션 물리적인 속성들 (Physical Properties) 충돌 처리 (Collision Detection) Constraint Systems 6 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 6. Rigid Body Simulation Rigid Body, 절대로 형태가 변하지 않는 단단한 물체 7 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 7. Rigid Body Simulation 지형(Landscape)은 변하지 않음 8 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 8. Rigid Body Simulation 단순화된 Collision geometry(Shape) 을 사용 9 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 9. Rigid Body Simulation 속도를 위해 물리 연산이 비활성화 되기도 함 (Simulation Island) 10 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 10. Dynamics Simulation 연속적인 이동 경로를 일정한 시간 주기로 나누어서 Collision detection 계산 Continuous 11 Discrete Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 11. Dynamics Simulation 실제 Motion 연산을 좀 더 단순화 해서 사용 – 공기 저항이나 바람은 경우에 따라 사용 안하기도 함 Optional 12 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 12. Dynamics Simulation Iterations (sub-time-steps) – physics simulation은 화면 갱신 주기보다 자주 발생됨 – sub-steps 는 조절 가능 Accumulation of error – 다음 step 계산시 바로 직전 Step 만을 참조 한다. (= Full history 가 아님) 13 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 13. Dynamics Simulation Center of mass (COM) 14 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 14. Physical Properties 정지 마찰계수 (Static friction) – 정지된 상태의 물체가 미끌어지지 않도록 막는 힘 – 물체가 안정적으로 붙어 있게 해주는 주요 속성 운동 마찰계수 (Dynamic friction) – 바닥에 붙은채 움직이는 물체에 작용하는 마찰 계수 [Friction Demo] 15 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 15. Physical Properties 반발계수,복원력 (Restitution) – 충돌이 발생된 후 보존되는 에너지의 양 – 0~1사이의 값, 1인 경우 충돌시 에너지를 잃지 않음 [Restitution Demo] 질량 (Mass) – 물체를 움직이게 하는데 필요한 힘의 크기 16 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 16. Collision Detection 물리 엔진의 핵심 코어 최적화를 위해 여러 단계를 거쳐서 처리 – Broadphase: 더 상세한 충돌 처리 단계로 넘어가기전 AABB 를 사용 해서 대부분의 오브젝트를 제거하는 과정 – Midphase: 충돌 처리를 위한 연산의 복잡도를 낮추는 과정 – Narrowphase: 실제 오브젝트 간의 Distance 계산이 이루어짐 Narrowphase 에서의 오브젝트 쌍의 개수에 의해 Performance가 결정됨 17 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 17. Collision Detection Broadphase 간단한 AABB 연산 을 통해 가능한 많은 오브젝트를 제거함 18 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 18. Collision Detection Midphase 복잡한 오브젝트를 나누기 위해 BroadPhase에 비해 무거운 연산이 필요하게됨 – Example Landscape 전체가 아닌 통나무와 충돌 가능성이 있는 일부 삼각형 만을 선별 19 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 19. Collision Detection Narrowphase 최종 충돌 여부를 판정하기 위해 거리 계산을 수행 20 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 20. Collision Detection Rigid bodies and collision geometries(Shape) – 빠른 충돌 연산을 위해 적절한 Shape을 사용해야 한다 21 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 21. Collision Detection Convex hull shapes 그래픽 메쉬를 감싸는 “shrink wrap” Shape 22 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 22. Collision Detection Compound shapes – convex list shapes 의 충돌 처리를 빠르게 하기 위해 추가적인 midphase 사용 – 계층적인 트리 구조 – Sub-object의 Instances 으로 메모리 절약 가능 26 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 23. Collision Detection Discrete Collision Detection의 한계 – Missed collisions "bullet-through-paper„ – Interpenetration 오브젝트가 파묻힘 [Discrete vs Continuous Demo] 27 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 24. Collision Detection Discrete Penetration acceptable. Integrate Continuous => Done. Collide t1 t0 No TOIs => Done. Integrate t0 28 Collide Solve TOI Detect Penetration Collision Generate TOI Re-Integrate Re-Collide t1 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 25. Collision Detection Stable stacking 30 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 26. Constraint Systems 연결된 rigid body 에서의 Constraint systems – – – – – – 31 Springs Dashpots Gears Mechanical joints Limited motion Motorized motion Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 27. Constraint Systems 다양하게 연결된 Constraint System 사례 [ArmConveyor Demo] 33 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 28. Havok Physics 기초 실습 [야구의신, 네오위즈] 36 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 29. 사전 준비 Havok Physics 2012.2.x SDK DirectX SDK Visual Studio WinMerge (Optional) Unzip Physics_Basic_Workshop.zip to {Havok SDK}DemoDemosPhysicsWorkshop 37 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 30. Workshop 1 hkpBoxShape 인스턴스를 공유하는 벽면(hkpRigidBody)을 만들어서 좌,우를 막는다 38 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 31. Workshop 2 hkpSphereShape으로 야구공(hkpRigidBody)을 만든다 39 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.
  • 32. Workshop 3 물리엔진에서 제공하는 동역학(Dynamics) 시뮬레이션이 아닌 Kinematics 방식으로 야구공을 도착지점을 계산해본다. 40 Havok Confidential. © Copyright 2012 Havok.com (or its licensors). All Rights Reserved. Confidential Information of Havok.