Skip to content

inthong610/CG_OpenGL_Rendering

Repository files navigation

"OpenGL Rendering"

OpenGL, GLUT, 3DF Zephyr, Meshlab, C++ 이용하여 개발

Colorless & Color rendering.

1. OpenGL Rendering

a. 프로젝트 설명

3DF Zephyr를 이용해서 만든 object를 meshlab을 이용하여 .off 파일로 변환하고, 이 파일들을 OpenGL을 이용하여 목표에 따라 rendering 하여 구현한다.

아래 사진은 3DF Zephyr를 이용해서 만든 object의 모습이다.

CG HW2_1 CG HW2_2 CG HW3_3

b. 프로젝트 목표

  • add proper lighting (ambient, diffuse, specular)

  • find proper viewpoint

  • improve the speed of normal calculation

  • restore the original color texture from HW2 by exporting and adding per-vertex color

c. 시연

With Color :

per-vertex color가 아닌 per-point color로 구현해서 깨짐이 보인다.

with_color_1

with_color_2

with_color_3

with_color_4

Without Color :

without_color_1

without_color_2

without_color_3

without_color_4

3. 실행 파일 실행법 & 소스 코드 컴파일 하는 법

- 실행 파일 실행

(Mac OS 기준)

  1. 터미널을 켠다.
  2. 해당 폴더로 이동한다.

cd /Users/folder

3-1) (without color) typing

./CG_HW5

Enter the file name :  generated.off

3-2) (with color) typing

./CG_HW5_colored 

Enter the file name : generatedColored.off 

소스 코드 (main.cpp) 컴파일 하기

( Xcode 기준 )

  1. 프로젝트를 만든다.
  2. Project > Build Phases > Compile Sources > add 소스 파일들
  3. Project > Build Phases > Link Binary With Libraries > add OpenGL.framework > add GLUT.framework
  4. Product > Run

( Eclipse 기준 )

  1. 프로젝트를 만든다.
  2. Project > Properties > C/C++ Build > Settings > MacOX X C++ Linker > Miscellaneout > Linker flags add -framework GLUT -framework OpenGL
  3. Project > Properties > C/C++ Build > Settings > GCC C++ Compiler > Includes > Include paths (-l) add "/opt/X11/include "
  4. BUILD PROJECT -> RUN as LOCAL C/C++ APPLICATION

4. 개발자 정보

홍정수

5. 최종 업데이트 날짜

2018.12.03 (MON)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages