분류 전체보기 115

[OpenGL] 게임 엔진 개발 (5) - Skeletal Animation (3)

이제 애니메이션을 프로젝트에 적용해볼 시간이다. 이번에도 애니메이션은 프로젝트할 때마다 항상 덕을 많이 보고있는 mixamo에서 구했다.https://www.mixamo.com/#/ Mixamo www.mixamo.com 그리고 모델링은 니어: 오토마타의 캐릭터 데볼의 모델링을 사용하였다.https://sketchfab.com/3d-models/devola-nier-automata-27271403970d417cab3e8cb1715e1769 Devola - Nier: Automata - Download Free 3D model by Banof - SketchfabOpen with QR Code: Scan this code to open the model on your device, then, tap on ..

[OpenGL] 게임 엔진 개발 (4) - Skeletal Animation (2)

앞선 과정을 통해 각 버텍스가 자신에게 영향을 주는 bone들의 정보를 모두 갖추게 되었다.(몇번 index의 bone이 나에게 얼마만큼의 영향을 주고, 그 bone의 offset matrix는 어떻게 되는지) 이제 모든 키프레임 데이터를 가지며, 그 사이를 선형 보간하는 클래스 Bone을 만들 차례이다. Bone.h:#pragma once#include #include #include #include #include #include "assimp/anim.h"struct KeyPosition{ glm::vec3 position; float timeStamp;};struct KeyRotation{ glm::quat orientation; float timeStamp;};struct KeyScale{ gl..

[OpenGL] 게임 엔진 개발 (3) - Skeletal Animation (1)

전적으로 learnopengl.com의 글의 도움을 받았다.https://learnopengl.com/Guest-Articles/2020/Skeletal-Animation LearnOpenGL - Skeletal AnimationSkeletal Animation Guest-Articles/2020/Skeletal-Animation 3D Animations can bring our games to life. Objects in 3D world like humans and animals feel more organic when they move their limbs to do certain things like walking, running & attacking. This tutorlearnopengl.co..

[OpenGL] 게임 엔진 개발 (2) - GUI + Skybox

현재까지 진행 상황:  사실 개발 과정을 다 공부 카테고리에 적어놓아서, 여기에 따로 쓸건 없을 것 같다.https://ciel45.tistory.com/113 [OpenGL] FrameBuffer 생성, 사용참조 : https://learnopengl.com/Advanced-OpenGL/Framebuffers LearnOpenGL - FramebuffersFramebuffers Advanced-OpenGL/Framebuffers So far we've used several types of screen buffers: a color buffer for writing color values, a depth buffer to write and testciel45.tistory.comhttps://ciel4..

[OpenGL] Skybox

우리가 게임에서 보는 광활한 skybox는, 사실 실제로 맵 전체를 둘러싸고 있지 않다. 스카이림의 한 스크린샷인데, 만약 실제로 오로라와 달을 저 멀리 두고 렌더링하는 것이라면, far clipping plane을 엄청 멀리 둬야 할 것이다. 실제로는, 저 오로라와 달을 포함한 하늘은 정확히 딱 카메라만 감싸고 있다.대충 그림으로 그려보자면 이렇게 표현할 수 있다. 그런데 저 그림대로라면, 다른 모든 오브젝트들은 skybox에 가려져 안 보여야 할 것이다.지금까지 화면에 오브젝트들을 그릴 때 depth testing을 해왔기 때문이다. 이를 해결하기 위해 처음 skybox를 그릴 때만 depth testing을 비활성화할 것이다. 그러면 실제로는 skybox가 가장 가까이 있는 것임에도 불구하고, 다른..

OpenGL/공부 2024.07.18

[OpenGL] FrameBuffer 생성, 사용

참조 : https://learnopengl.com/Advanced-OpenGL/Framebuffers LearnOpenGL - FramebuffersFramebuffers Advanced-OpenGL/Framebuffers So far we've used several types of screen buffers: a color buffer for writing color values, a depth buffer to write and test depth information, and finally a stencil buffer that allows us to discard certain fragmenlearnopengl.com  우선 framebuffer라는 것에 대해 짚고 넘어가자면,GPU는 그림을 ..

OpenGL/공부 2024.07.16

[OpenGL] ImGuizmo 설치, 사용법

어제 이것 때문에 12시간을 고통받아서, 언젠가 또 나중을 위해서 기록해둘 겸 글을 남기려고 한다. 쓰는 사람이 적어서 그런지 인터넷 상에 정보가 매우 적어서, 이 글이 조금이나마 다른 분들에게 도움이 되었으면 좋겠다.  먼저 ImGui가 설치되어있다는 것을 전제로 한다.https://ciel45.tistory.com/111 [OpenGL] 게임 엔진 개발 (1) - 시작 + ImGui지금까지 학습한 내용을 바탕으로 게임 엔진 제작을 시작하였다.  우선 엔진의 기본 구성 요소들(Camera, Model, Mesh, Light, Material 등)은 공부 일지에서 사용했던 코드를 사용하되, 내 스타일에 맞게ciel45.tistory.com  ImGuizmo는 ImGui에서 사용할 수 있는 gizmo 라이..

OpenGL/공부 2024.07.16

[OpenGL] 게임 엔진 개발 (1) - 시작 + ImGui

지금까지 학습한 내용을 바탕으로 게임 엔진 제작을 시작하였다.  우선 엔진의 기본 구성 요소들(Camera, Model, Mesh, Light, Material 등)은 공부 일지에서 사용했던 코드를 사용하되, 내 스타일에 맞게 여기저기 많이 고쳤다. 공부할 때 사용했던 코드는 포인터를 거의 사용하지 않았기 때문에 헤더 파일에 #include가 필요하게되어 헤더가 비대화되는 문제가 있었다.https://ciel45.tistory.com/4 (관련 내용) [언리얼 엔진 5] 헤더를 include할 때 주의할 점 (+ 포워드 선언)우선, #include "__.h"를 사용하는 것은 해당 헤더의 소스 코드 전체를 include문의 위치에 그대로 복사 & 붙여넣기하는 것과 같다.컴파일 시에 소스 코드의 inclu..

[OpenGL] Model Loading (Assimp)

Assimp는 Open Asset Import Library의 약자로, fbx, obj, gltf 등 다양한 3d 모델 포맷을 지원한다. OpenGL 프로그램에서 모델링 불러올 때는 웬만하면 이걸 사용하는 것 같다.학교 수업에서도 사용했고, learnopengl.com에서도 이걸 소개하고 있다.  우선 얘가 사용하는 구조를 보자면 다음과 같다. 이 다이어그램 전체가 하나의 모델이라고 생각하면 된다.언뜻 보기에는 좀 복잡한데, 천천히 살펴보자면우선 중요한 점을 하나 짚고 가자면, 모델은 여러개의 메시로 이루어져있다.모델의 모든 데이터는 Scene 안에 담겨있다. (material, mesh 등)좌측을 보면 Scene에 Root node가 달려있고, 그 아래로 트리처럼 Child node들이 달려있는 것을 ..

OpenGL/공부 2024.07.13