Skip to content

13caroline/solar-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solar-System

Computer Graphics Engine Project

The goal of this assignment is to develop a mini scene graph based 3D engine and provide usage examples that show its potential. The assignment is split in four phases, each containing a report and code for the engine and generator.

Phase 1 - Graphical primitives

This phase requires two applications: the generator, which purpose is to generate the vertices for different models (plane, box, sphere and cone), and the engine itself, which will read a configuration file, written in XML, and display the models:

<scene>
  <model file=”sphere.3d” />
  <model file=”plane.3d” />
</scene>

Phase 1 report

Phase 2 - Geometric Transforms

This phase is about creating hierarchical scenes using geometric transforms. A scene is defined as a tree where each node contains a set of geometric transforms (translate, rotate and scale) and optionally a set of models. Each node can also have children nodes.

<scene>
  <group> <!-- TERRA -->
    <translate Z="35"/>
    <scale X="0.73" Y="0.73" Z="0.73"/>
    <models>
      <model file="planeta.3d"/>
    </models>
    <group> <!-- LUA -->
      <translate X="1.5"/>
      <scale X="0.16" Y="0.16" Z="0.16"/>
      <models>
        <model file="planeta.3d"/>
      </models>
    </group>
  </group>
</scene>

In this phase, the models are now drawn with VBOs, as opposed to immediate mode used in the previous phase.

Phase 2 report

Phase 3 - Curves, Cubic Surfaces and VBOs

In this phase, the generator must be able to create a new type of model based on Bezier patches applying Bezier rules for the defined control points and tesselation level. The generator will receive as parameters the name of a file where the Bezier control points are defined as well as the required tessellation level. The resulting file will contain a list of the triangles to draw the surface.

Rotate and Translate elements have been extended. The goal is to perform animations based on Catmull-Rom cubic curves, considering a set of points and the number of seconds to run the whole curve.

Phase 3 report

Phase 4 - Normals and Texture Coordinates

In the last phase, the generator should provide texture coordinates and normals for each vertex of each model, in order to add lighting and texture. The light sources in the xml configuration file are demonstrated below.

<scene>
  <lights>
    <light type="POINT" posX="23" posY="15" posZ="23"/>
  </lights>
  ...
</scene>

Phase 4 report

Collaborators

Name
Carolina Cunha
Hugo Faria
João Diogo Mota
Rodolfo Silva

University of Minho, Software Engineering (3rd Year).