ALGORITHM USING OPENGL
By Felix Oey
A Bachelor’s Thesis Submitted to the Faculty of INFORMATION TECHNOLOGY
In partial fulfillment of the requirements for the Degree of BACHELOR OF SCIENCES
WITH A MAJOR IN INFORMATION TECHNOLOGY
SWISS GERMAN UNIVERSITY Campus German Center Bumi Serpong Damai – 15321
Island of Java, Indonesia
www.sgu.ac.id
STATEMENT BY THE AUTHOR
I Hereby declare that this submission is my own work and to the best of my knowledge, it contains no material previously published or written by another person, not material which to substantial extent has been accepted for the award of any other degree or diploma at any educational institution, except where due acknowledgment is made in this thesis.
Felix Oey
Approved by:
Richard Kumaradjaja, PhD
Chairman of the Examination Steering Committee
Date
Date
Date
ABSTRACT
IMPLEMENTATION OF SPHERICAL ENVIRONMENT MAPPING ALGORITHM USING OPENGL
By Felix Oey
SWISS GERMAN UNIVERSITY Bumi Serpong Damai
Richard Kumaradjaja, PhD, Major Lecturer
In rendering computer graphic projects, 3D rendering tools such as 3D MAX or MAYA already became a most wanted option. Moreover, through this paper, the author wants to show that rendering a 3D scene is not always need tools. Besides, implementing spherical environment mapping algorithm in rendering a scene is possibly done without immense hindrances.
Functions for creating objects, positioning them in the scene, defining the lightning and material properties, applying the texture mapping and environment mapping are all available in OpenGL library. Subsequently, the task is to utilize those functions to be used in creating the scene.
The point of doing this project is rendering a 3D image that possibly done without using any image rendering tool. In fact, coding an OpenGL application is not that complicated.
In short, this could be an alternative way to learn or to render 3D scenery instead of
DEDICATION
This thesis is dedicated to Jesus Christ my savior, my family, and friends. To both art and
technology that have brightened my entire part of life. To people that have not received a
proper education.
ACKNOWLEDGEMENTS
In this opportunity, I would like to thank GOD for HIS blessings and guidance through the whole process of this thesis.
I would also like to thank Mr. Richard Kumaradjaja, PhD. for his ideas and inputs that have played a big role in the completion of this thesis.
Thank you to my family for their wonderful support, love, and care that never endings.
Thank you also to my entire fellow batch 2004 that have shared laugh and tears throughout this memorable university life in SGU.
Lastly, I would like to thank SGU for the wonderful opportunity to work on this thesis.
TABLE OF CONTENTS
STATEMENT BY THE AUTHOR ... 2
ABSTRACT ... 3
DEDICATION ... 4
ACKNOWLEDGEMENTS ... 5
TABLE OF CONTENTS ... 6
LIST OF TABLES ... 8
LIST OF FIGURES ... 9
CHAPTER 1 – INTRODUCTION ... 10
1. 1 Background ... 10
1. 2 Objectives ... 10
1. 3 Significance of Study ... 11
1. 4 Research Scope and Limitations ... 11
1. 5 Methodology ... 12
CHAPTER 2 – LITERATURE REVIEW ... 13
2. 1 Computer Graphics ... 13
2. 2 Rendering ... 13
2. 3 OpenGL ... 14
2.3.1 OpenGL Command Syntax ... 14
2.3.2 OpenGL as State Machine ... 15
2.3.3 OpenGL Rendering Pipe ... 16
2. 4 The OpenGL Interface ... 20
2. 5 Geometric Primitives ... 21
2.5.1 Points ... 21
2.5.2 Lines ... 21
2.5.3 Polygons ... 22
2.5.4 Filled Primitives... 23
2.6 The Law of Reflection ... 23
2.9 Spherical Environment Mapping ... 26
2.10 Texture Mapping ... 28
CHAPTER 3 – METHODOLOGY ... 29
3. 1 Planning Method ... 29
3. 2 Scene Development ... 30
3. 3 Objects Development... 32
3. 4 Mapping Appliance ... 37
3. 5 Finishing Stage ... 42
3.5.1 Shininess ... 42
3.5.2 Lightning Appliance ... 43
3.5.3 Board Reflection ... 44
CHAPTER 4 – RESULT AND DISCUSSION ... 49
4.1 Result ... 49
CHAPTER 5 – CONCLUSION AND RECOMMENDATION ... 56
5.1 Conclusion ... 56
5.2 Recommendation ... 56
GLOSSARY ... 57
REFERENCES ... 58
APPENDICES ... 59