Skip to content

Commit 5763ff4

Browse files
authored
Merge pull request #76 from nhy3795/gh-pages
All Basic Tutorial Translation Complete To Korean
2 parents 72d9efb + 77e8a05 commit 5763ff4

File tree

7 files changed

+236
-224
lines changed

7 files changed

+236
-224
lines changed

kr/beginners-tutorials/tutorial-3-matrices/index.markdown

+41-32
Original file line numberDiff line numberDiff line change
@@ -161,51 +161,57 @@ glm::vec3 myRotationAxis( ??, ??, ??);
161161
glm::rotate( angle_in_degrees, myRotationAxis );
162162
```
163163
164-
## Cumulating transformations
164+
## 누적 변환
165165
166166
이제 우리는 벡터들을 어떻게 회전하고, 평행이동하고, 스케일 하는지 알게 되었습니다. 이들 변환들을 합칠수 있다면 굉장하겠죠. 이는 매트릭스들을 함께 곱함으로서 이루어집니다. 예를 들어 :
167167
168168
``` cpp
169169
TransformedVector = TranslationMatrix * RotationMatrix * ScaleMatrix * OriginalVector;
170170
```
171171

172-
**!!! 주의사항 !!!** 이 라인은 실제로는 스케일리을 먼.저. 하고나서 그 다.음.에 회전하고, 그 다.음.에 평행이동 합니다. 이것이 매트릭스 곱이 동작하는 법이에요.
172+
**!!! 주의사항 !!!** 이 라인은 실제로는 **스케일링**을 먼저 하고나서 그 다음에 회전하고, 그 다음에 평행이동 합니다. 이것이 매트릭스 곱이 동작하는 법이에요.
173173

174174
연산을 다른 순서로 작성하는 것은 같은 결과를 내주지 않을 겁니다. 스스로 해보세요 :
175175

176-
- make one step ahead ( beware of your computer ) and turn left;
176+
- 한 걸음 간 다음에 (아, 컴퓨터 조심하세요.) 왼쪽으로 돌아보세요.
177177

178-
- turn left, and make one step ahead
178+
- 왼쪽으로 돈 다음에, 한 걸음 가보세요.
179+
180+
실제로, 위 순서는 게임 캐릭터나 다른 것들에게 꼭 필요한 것들이에요. : 확대가 필요하다면, 먼저 한 다음. 방향을 전하고, 이동하는 거에요. 예를 들어 볼까요? 배를 하나 가져다 놓을게요.
179181

180182
As a matter of fact, the order above is what you will usually need for game characters and other items : Scale it first if needed; then set its direction, then translate it. For instance, given a ship model (rotations have been removed for simplification) :
181183

182-
* The wrong way :
183-
- You translate the ship by (10,0,0). Its center is now at 10 units of the origin.
184-
- You scale your ship by 2\. Every coordinate is multiplied by 2 _relative to the origin_, which is far away... So you end up with a big ship, but centered at 2*10 = 20. Which you don't want.
185184

186-
* The right way :
187-
- You scale your ship by 2\. You get a big ship, centered on the origin.
188-
- You translate your ship. It's still the same size, and at the right distance.
185+
* 틀린 방법 :
186+
- 배를 (10, 0, 0) 으로 이동했어요. 이제 원점으로 부터 10 unit 떨어져 있네요.
187+
- 그리고 배를 2배로 키웠어요. 모든 좌표는 원점으로부터 상대적으로 2배 더 커졌고요. 어유. 멀리도 갔네. 확대가 끝나면 큰 배는 가지겠지만. 이제 원점으로 부터 2*10 = 20이나 멀어졌네요. 원하지 않는 선물을 받아버렸어요.
188+
189+
* 올바른 방법 :
190+
- 배를 2배 키워요. 그러면 큰 배를 얻었고, 원점에 잘 있죠.
191+
- 그리고 배를 이동시켜요. 여전히 같은 크기를 가지고 있고, 올바른 방향을 가지고 있죠.
192+
193+
194+
행렬 - 행렬 곱은 행렬 - 벡터 곱가 아주 유사해요, 그래서 구체적인 내용을 생략하고. 대신 참고가 [될 만한 링크를(Matricesa and Quaternions FAQ)]({{site.baseurl}}/assets/faq_quaternions/index.html#Q11)걸어드릴게요. 만약에 행렬곱이 필요하다면. 지금은 그냥 컴퓨터에게 맡깁시다. :
189195

190196
Matrix-matrix multiplication is very similar to matrix-vector multiplication, so I'll once again skip some details and redirect you the the [Matrices and Quaternions FAQ]({{site.baseurl}}/assets/faq_quaternions/index.html#Q11) if needed. For now, we'll simply ask the computer to do it :
191197

192-
**in C++, with GLM :**
198+
**GLM과 함깨, C++에선. :**
193199

194200
``` cpp
195201
glm::mat4 myModelMatrix = myTranslationMatrix * myRotationMatrix * myScaleMatrix;
196202
glm::vec4 myTransformedVector = myModelMatrix * myOriginalVector;
197203
```
198204

199-
**in GLSL :**
205+
**GLSL에선. :**
200206

201207
``` glsl
202208
mat4 transform = mat2 * mat1;
203209
vec4 out_vec = transform * in_vec;
204210
```
205211

206-
# The Model, View and Projection matrices
212+
# 모델, 뷰, 프로젝션 행렬
207213

208-
_튜토리얼의 남은 부분들에서는, 우리가 블랜더의 가장 사랑받는 3d 모델-키 수자네-을 그릴줄 이미 알고 있었다고 하고 진행합니다_
214+
*튜토리얼의 남은 부분들에서는, 우리가 블랜더의 가장 사랑받는 3d 모델-키 수자네-을 그릴줄 이미 알고 있었다고 하고 진행합니다*
209215

210216
모델과 뷰, 프로젝션 매트릭스는 변환들을 분명하게 구별하기 위한 좋은 도구 입니다. 이들을 안 쓸수도 있습니다 (여기까지 우리가 튜토리얼 1과 2에서 했던것 처럼). 하지만 써야만 합니다. 모든 사람이 이렇게 합니다. 왜냐면 이렇게 하는게 쉬운 길이니까요.
211217

@@ -284,7 +290,6 @@ glm::mat4 projectionMatrix = glm::perspective(
284290
);
285291
```
286292

287-
One last time :
288293
마지막으로 :
289294

290295
_우리는 카메라 공간 (모든 버텍스들이 카메라 좌표에 상대적) 에서 호모니지어스 공간 (모든 버텍스들이 작은 큐브 안에 정의되고, 큐브안에 있는 모든 것들은 화면에 띄어집니다)으로 갔습니다._
@@ -313,7 +318,7 @@ _우리는 카메라 공간 (모든 버텍스들이 카메라 좌표에 상대
313318

314319
그리고 여기 실제로 랜더 되는 이미지가 있네요 !
315320

316-
## 변환들 쌓기 : 모델뷰 매트릭스
321+
## 변환 쌓기 : 모델뷰 매트릭스
317322

318323
... 당신이 이미 사랑했었던 일반적인 매트릭스 곱과 같습니다 !
319324

@@ -336,7 +341,7 @@ transformed_vertex = MVP * in_vertex;
336341
// 프로젝션 매트릭스 : 45도 시야각, 4:3 비율, 시야 범위 : 0.1 유닛 <--> 100 유닛
337342
glm::mat4 Projection = glm::perspective(glm::radians(45.0f), (float) width / (float)height, 0.1f, 100.0f);
338343

339-
// 혹은 ortho(직교) 카메라에선 :
344+
//혹은 ortho(직교) 카메라에선 :
340345
//glm::mat4 Projection = glm::ortho(-10.0f,10.0f,-10.0f,10.0f,0.0f,100.0f); // 월드 좌표로 표현
341346

342347
// 카메라 매트릭스
@@ -352,46 +357,50 @@ transformed_vertex = MVP * in_vertex;
352357
glm::mat4 mvp = Projection * View * Model; // 기억하세요, 행렬곱은 계산은 반대순서로 이루어집니다
353358
```
354359
355-
* Second step : give it to GLSL
360+
* 두번째 : GLSL에게 줘버려요.
356361
357362
``` cpp
358-
// Get a handle for our "MVP" uniform
359-
// Only during the initialisation
363+
// 우리의 "MVP" 행렬에 참조를 얻습니다.
364+
// 아. 초기화때만 하셔야 해요.
360365
GLuint MatrixID = glGetUniformLocation(programID, "MVP");
361366
362-
// Send our transformation to the currently bound shader, in the "MVP" uniform
363-
// This is done in the main loop since each model will have a different MVP matrix (At least for the M part)
367+
// 현재 바인딩된 쉐이더에게 변환한 메트릭스를 보냅시다. 방금 얻은 참조로요.
368+
// 이건 각각의 모델마다 다른 MVP 행렬을 가지고 있을 것이니, 메인 루프에 해줍시다. (VP는 같을지 몰라도, M은 다를거에요.)
364369
glUniformMatrix4fv(MatrixID, 1, GL_FALSE, &mvp[0][0]);
365370
```
366371

367-
* Third step : use it in GLSL to transform our vertices
372+
* 세번쨰 : 우리가 GLSL에게 넘겨준 행렬을 정점에 적용시킵시다.
368373

369374
``` glsl
370-
// Input vertex data, different for all executions of this shader.
375+
// vertex 데이터 입력 값, 쉐이더의 실행때마다 값이 다릅니다.
371376
layout(location = 0) in vec3 vertexPosition_modelspace;
372377
373-
// Values that stay constant for the whole mesh.
378+
// 이 값은 한 매쉬동안은 상수적입니다.
374379
uniform mat4 MVP;
375380
376381
void main(){
382+
// 정점의 출력 좌표, clip space에선 : MVP * position
377383
// Output position of the vertex, in clip space : MVP * position
378384
gl_Position = MVP * vec4(vertexPosition_modelspace,1);
379385
}
380386
```
387+
381388
{: .highlightglslvs }
382389

383-
* Done ! Here is the same triangle as in tutorial 2, still at the origin (0,0,0), but viewed in perspective from point (4,3,3), heads up (0,1,0), with a 45° field of view.
390+
* 끝났어요! 튜토리얼 2와 같은 삼각형이 있을거에요. 아직도 원점 (0,0,0)에 있는 거 말이죠. 하지만 perspective로 (4,3,3) 좌표에서, 상향 벡터는 (0,1,0)으로 줬으니 45도 각도로 보일거에요.
384391

385392
![]({{site.baseurl}}/assets/images/tuto-3-matrix/perspective_red_triangle.png)
386393

387-
In tutorial 6 you'll learn how to modify these values dynamically using the keyboard and the mouse to create a game-like camera, but first, we'll learn how to give our 3D models some colour (tutorial 4) and textures (tutorial 5).
394+
튜토리얼 6에서는 키보드와 마우스를 이용해서 어떻게 우리가 오늘 썼던 값을 다이나믹하게 바꿀 수 있는지 배울거에요 - 마치 게임 카메라 같을걸요? - 하지만. 우선은 우리의 3D 모델에 어떻게 색상을 넣는지 (tutorial 4)와 텍스쳐를 넣을지부터 배울거에요. (tutorial 5)
395+
396+
397+
# 연습문제
388398

389-
# Exercises
390399

391-
* Try changing the glm::perspective
392-
* Instead of using a perspective projection, use an orthographic projection (glm::ortho)
393-
* Modify ModelMatrix to translate, rotate, then scale the triangle
394-
* Do the same thing, but in different orders. What do you notice ? What is the "best" order that you would want to use for a character ?
400+
* glm::perspective를 한번 바꿔보세요.
401+
* perspective(원근법) projection(투영법)을 쓰는 대신, orthographic projection을 써보세요. (glm::ortho)
402+
* ModelMatrix를 이동하고, 회전하고, 확대해서 삼각형을 수정해보세요.ㅗ
403+
* 같은 걸 해보시는데, 한번 다른 순서로 해보시겠어요? 어떤게 최고의 방법이었나요? 어떤 순서로 해야 캐릭터가 예쁘게 보일 것 같았나요?
395404

396405
_Addendum_
397406

kr/beginners-tutorials/tutorial-5-a-textured-cube/index.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: tutorial
33
status: publish
44
published: true
5-
title: 'Tutorial 5 : A Textured Cube'
5+
title: 'Tutorial 5 : 텍스쳐가 입혀진 큐브'
66
date: '2011-04-26 07:55:58 +0200'
77
date_gmt: '2011-04-26 07:55:58 +0200'
88
categories: [tuto]

kr/beginners-tutorials/tutorial-6-keyboard-and-mouse/index.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: tutorial
33
status: publish
44
published: true
5-
title: 'Tutorial 6 : Keyboard and Mouse'
5+
title: 'Tutorial 6 : 키보드와 '
66
date: '2011-05-08 08:26:13 +0200'
77
date_gmt: '2011-05-08 08:26:13 +0200'
88
categories: [tuto]

kr/beginners-tutorials/tutorial-7-model-loading/index.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: tutorial
33
status: publish
44
published: true
5-
title: 'Tutorial 7 : Model loading'
5+
title: 'Tutorial 7 : 모델 불러오기'
66
date: '2011-05-08 17:48:12 +0200'
77
date_gmt: '2011-05-08 17:48:12 +0200'
88
categories: [tuto]

0 commit comments

Comments
 (0)