에버플래닛의 글로브뷰 렌더링 ndc2011
TRANSCRIPT
에버플래닛의
글로브뷰 렌더링
김이선 (veblush at neople | gmail)
네오플 던파개발실
BNB 프로그래머
카트라이더 리드 프로그래머
버블파이터 프로토타입
리드 프로그래머
에버플래닛 리드 프로그래머
던전엔파이터 테크니컬 디렉터
게임 프로그래밍 10년차
1. 글로브뷰 소개 2. 지형 3. 카메라, 하늘
Marineblues
VS
“평면 지형 + 왜곡 효과”
기존 맵 편집 방법 사용 가능
물리 처리, 게임 로직 처리 간단
물리 처리, 게임 로직 처리 간단
자연스럽지 않은 각도가 존재함
왜곡 효과를 어떻게?
Globe Transform 직교좌표계에서 평면을 구면으로 변환
http://youtu.be/osY-ZM-jh1Y
1. 글로브뷰 소개 2. 지형 3. 카메라, 하늘
극점에서 멀어질 수록 z축 방향으로 내림
Quadratic Transform
d
e
http://www.youtube.com/watch?v=_XKJ86c8z_k
근거리에서 그럴듯함
원거리에서는 …
http://www.youtube.com/watch?v=Ov14izoWUPs
정말 구에 매핑해보자!
Spherical Transform
d
e
http://www.youtube.com/watch?v=PbMHT8phiq0
Spherical 은 멀리서 잡아도 이쁨
http://www.youtube.com/watch?v=iiJ9U-Ct2-0
둘 을 비교해 보면?
VS
VS 9 slots
63 slots
게임 화면은 Quadratic!
Spherical 은 선택적으로만 사용 (마이플래닛 등)
Globe Transform 을 어디서?
Local Space
World Space
View Space
Projection Space
World Transform
View Transform
Perspective Transform
Local Space
World Space
View Space
Projection Space
World Transform
View Transform
Perspective Transform
Globe Space
Globe Transform
극점의 위치
VertexShader 사용 Globe Transform 은 Matrix 로 표현할 수 없음
최저사양!
T&L > Vertex Shader
해결해야 했던 문제
변환을 염두한 모델링
직선이 유지 되지 않음
Translate
Rotate
Scale
Projection
Local Space
World Space
View Space
Projection Space
World Transform
View Transform
Perspective Transform
Globe
Local Space
World Space
View Space
Projection Space
World Transform
View Transform
Perspective Transform
Globe Space
Globe Transform
?
Bounding Box
극축!
극축!
Picking
World Space
Projection Space
View*Perspective Transform-1
Screen Space
Pos Picking Ray
View Space
Projection Space
Perspective Transform-1
Screen Space
Pos Picking Ray
Globe Space
Globe Transform-1
World Space
View Transform-1
View Space
Projection Space
Perspective Transform-1
Screen Space
Pos Picking Ray
Globe Space
Globe Transform-1
World Space
View Transform-1
Globe Space
Projection Space
View*Perspective Transform-1
Screen Space
Pos Picking Ray
Local Space
World Space
World Transform
Globe Transform
Globe Space
1. 글로브뷰 소개 2. 지형 3. 카메라, 하늘
극점 이동
계속 돌기
하늘!
보통의 경우
하늘 만들기
지평선 맞추기
일반적인 카메라
캐릭터의 고도에 맞춰 카메라의 고도 변경
http://www.youtube.com/watch?v=u8StAeWc6m8
지평선 유지 카메라
캐릭터의 고도에 맞춰 카메라의 고도/각도 변경
http://www.youtube.com/watch?v=A7gHQHAyhQg
-0.4
-0.3
-0.2
-0.1
0
0.1
0.2
0.3
0.4
-5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
v-r
ad
z
지평선 유지 카메라+
각도 고정을 70%만
http://www.youtube.com/watch?v=LyGQmjWYTPk
결론
글로브뷰는
월드의 구조를 변경하지 않고
행성 위를 걷는 효과를 만듦
감사합니다!