SlideShare uma empresa Scribd logo
1 de 10
구본탁
1. 시야 변환 개괄
• 시야공간(이하 View Space)는 카메라에 부착된
좌표계이다.
카메라는 이 좌표계의 원점에 위치해서
양의Z축을 바라본다.
• X축은 카메라의 오른쪽이 +방향, Y축은 카메라의
위쪽이 +방향이다.
• 렌더링 파이프라인의 후반 단계들에서는 장면의
정점들을 세계공간(이하 World Space)을
기준으로 서술하는 대신 카메라 좌표계를
기준으로 서술하는 것이 편리하다.
• World Space에서 View Space로의 좌표 변환을
시야 변환(View Transform)이라 부르며 해당 변환
행렬을 시야 행렬(View Matrix)라고 부른다.
1. 시야 변환 개괄
• Qw = (Qx, Qy, Qz, 1), uw = (ux, uy, uz, 0), vw(vx, vy, vz, 0), ww = (wx, wy, wz, 0)이
각각 World Space를 기준으로 한 시야 공간의 원점과 x, y, z 축을 나타내는 동차좌표들이라고 하면
View Space에서 World Space로의 좌표 변경 행렬은 다음과 같다.
• 하지만 이는 지금 필요한 변환 행렬이 아니며, 반대 방향, 즉 World Space에서 View Space로의 변환
행렬이 필요하다.
역변환은 앞선 내용들에서 봤듯이 역행렬로 주어진다.
즉, World Space에서 View Space로의 변환 행렬은 W-1이다.
1. 시야 변환 개괄
• 일반적으로 World Space의 좌표계와 View Space의 좌표계는 원점의 위치와 좌표축들의 방향만 다르다.
이와 같은 경우 W=RT라고 생각할 수 있다.(World Matrix를 회전 후에 이동을 적용하는 방식으로 분해할
수 있다.) 이러한 형태의 행렬은 역행렬을 구하기가 수월하다.
V = W-1 = (RT)-1 = T-1R-1 = T-1RT = T-1RT
2. 주요 메서드의 구현
2.1. XMVector 반환 메서드
2. 주요 메서드의 구현
2.2. SetLens 메서드
• 시야 절두체는 시야를 제어한다는 점에서 카메라의 렌즈에 해당한다고 할 수 있다.
• SetLens 메서드는 절두체 속성들을 설정해 두고, 투영행렬도 구축한다.
2. 주요 메서드의 구현
2.3. 유도된 절두체 정보
• SetLens 메서드에서 보았듯 수직 시야각은 카메라 클래스의 사용자가 직접 설정한다.
하지만, 수평 시야각을 직접 설정하는 방법은 없다.
대신, Camera class는 수평 시야각을 계산해주는 메서드를 제공한다.
• 또한 가까운 평면과 면 평면에서의 절두체의 너비와 높이를 리턴시켜주는 메서드를 재공한다.
2. 주요 메서드의 구현
2.4. 카메라 변환
• 충돌 검출을 무시할 때, 1인칭 카메라가 갖추어야 할 기능 또는 특징은 다음과 같다.
1. 카메라를 Forward Vector를 따라 앞 또는 뒤로 움직인다.
- Forward Vector를 따라 이동시켜서 구현
2. 카메라를 Right Vector를 따라 좌우 이동한다.
- Right Vector를 따라 이동시켜서 구현
3. 위, 아래를 볼 수 있도록 카메라를 Right Vecotr에 대해 회전한다.
- 카메라의 Forward Vector와 Up Vector를 XMMatrixRotationAxix 함수를 이용하여
카메라 Right Vector를 중심으로 회전시켜 구현할 수 있다.
4. 좌, 우를 볼 수 있도록 카메라를 World Space의 Y축에 대해 회전한다.
- 카메라의 모든 기저벡터를 XMMatrixRotationY 함수를 이용해 World Space의 Y축에 대해
회전시킬 수 있다.
2. 주요 메서드의 구현
2.5. View Matrix 구축
• 카메라의 회전이 여러 번 반복되면 수치 오차가 누적되어 Right, Up, Forward Vector들이 더 이상
정규직교벡터가 아닐 수 있기때문에 이 Vector들을 다시 한 번 정규화를 한 이후에 시야 변환
행렬을 계산한다.
감사합니다.

Mais conteúdo relacionado

Último

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
 
캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스
 
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
 
Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Wonjun Hwang
 
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
 

Último (6)

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)
 
캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차
 
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)
 
Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)
 
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 ...
 

Destaque

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
 

Destaque (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...
 

Graphics 14장 1인칭 카메라 만들기.pptx

  • 2. 1. 시야 변환 개괄 • 시야공간(이하 View Space)는 카메라에 부착된 좌표계이다. 카메라는 이 좌표계의 원점에 위치해서 양의Z축을 바라본다. • X축은 카메라의 오른쪽이 +방향, Y축은 카메라의 위쪽이 +방향이다. • 렌더링 파이프라인의 후반 단계들에서는 장면의 정점들을 세계공간(이하 World Space)을 기준으로 서술하는 대신 카메라 좌표계를 기준으로 서술하는 것이 편리하다. • World Space에서 View Space로의 좌표 변환을 시야 변환(View Transform)이라 부르며 해당 변환 행렬을 시야 행렬(View Matrix)라고 부른다.
  • 3. 1. 시야 변환 개괄 • Qw = (Qx, Qy, Qz, 1), uw = (ux, uy, uz, 0), vw(vx, vy, vz, 0), ww = (wx, wy, wz, 0)이 각각 World Space를 기준으로 한 시야 공간의 원점과 x, y, z 축을 나타내는 동차좌표들이라고 하면 View Space에서 World Space로의 좌표 변경 행렬은 다음과 같다. • 하지만 이는 지금 필요한 변환 행렬이 아니며, 반대 방향, 즉 World Space에서 View Space로의 변환 행렬이 필요하다. 역변환은 앞선 내용들에서 봤듯이 역행렬로 주어진다. 즉, World Space에서 View Space로의 변환 행렬은 W-1이다.
  • 4. 1. 시야 변환 개괄 • 일반적으로 World Space의 좌표계와 View Space의 좌표계는 원점의 위치와 좌표축들의 방향만 다르다. 이와 같은 경우 W=RT라고 생각할 수 있다.(World Matrix를 회전 후에 이동을 적용하는 방식으로 분해할 수 있다.) 이러한 형태의 행렬은 역행렬을 구하기가 수월하다. V = W-1 = (RT)-1 = T-1R-1 = T-1RT = T-1RT
  • 5. 2. 주요 메서드의 구현 2.1. XMVector 반환 메서드
  • 6. 2. 주요 메서드의 구현 2.2. SetLens 메서드 • 시야 절두체는 시야를 제어한다는 점에서 카메라의 렌즈에 해당한다고 할 수 있다. • SetLens 메서드는 절두체 속성들을 설정해 두고, 투영행렬도 구축한다.
  • 7. 2. 주요 메서드의 구현 2.3. 유도된 절두체 정보 • SetLens 메서드에서 보았듯 수직 시야각은 카메라 클래스의 사용자가 직접 설정한다. 하지만, 수평 시야각을 직접 설정하는 방법은 없다. 대신, Camera class는 수평 시야각을 계산해주는 메서드를 제공한다. • 또한 가까운 평면과 면 평면에서의 절두체의 너비와 높이를 리턴시켜주는 메서드를 재공한다.
  • 8. 2. 주요 메서드의 구현 2.4. 카메라 변환 • 충돌 검출을 무시할 때, 1인칭 카메라가 갖추어야 할 기능 또는 특징은 다음과 같다. 1. 카메라를 Forward Vector를 따라 앞 또는 뒤로 움직인다. - Forward Vector를 따라 이동시켜서 구현 2. 카메라를 Right Vector를 따라 좌우 이동한다. - Right Vector를 따라 이동시켜서 구현 3. 위, 아래를 볼 수 있도록 카메라를 Right Vecotr에 대해 회전한다. - 카메라의 Forward Vector와 Up Vector를 XMMatrixRotationAxix 함수를 이용하여 카메라 Right Vector를 중심으로 회전시켜 구현할 수 있다. 4. 좌, 우를 볼 수 있도록 카메라를 World Space의 Y축에 대해 회전한다. - 카메라의 모든 기저벡터를 XMMatrixRotationY 함수를 이용해 World Space의 Y축에 대해 회전시킬 수 있다.
  • 9. 2. 주요 메서드의 구현 2.5. View Matrix 구축 • 카메라의 회전이 여러 번 반복되면 수치 오차가 누적되어 Right, Up, Forward Vector들이 더 이상 정규직교벡터가 아닐 수 있기때문에 이 Vector들을 다시 한 번 정규화를 한 이후에 시야 변환 행렬을 계산한다.

Notas do Editor

  1. 회전행렬의 역행렬은 전치행렬과 같다.
  2. XMVector는 DX에서 사용하는 자료형으로 4차원 벡터를 나타내지만 비어있는 원소들을 0으로 채워 넣음으로써 그 이하의 차원을 표현하는데에 사용할 수 있다. XMFloat3는 구조체 형식으로 3개의 float과 연산자, 생성자 등 단순하게 정의되어 ㅇㅆ다.