Skip to content

Dovizu/BezierRenderer

Repository files navigation

Project Identity

###Names

  • Leo Colobong (@lcolobong)
  • Donny Reynolds (@dovizu)

###Platform OS X (Orchard Macs)

###Source Location ./

###Submitted by cs61b-bw

###Compile Instruction make

Demonstration

###Core: Uniform Shading (Step size: 0.1) Flat vs Smooth Shading

./renderBezier -f bezFiles/teapot.bez 0.1 + press s + press w

teapot-u-flat teapot-u-smooth teapot-u-wire

###Core: Adaptive Shading (Error tolerance: 0.01) Flat vs Smooth Shading

./renderBezier -f bezFiles/teapot.bez 0.01 -a + press s + press w

teapot-a-flat teapot-a-smooth teapot-a-wire

###Core: Transformation, Shading Modes and Fill Modes YouTube Video

###Extra: Multiple Objects Support YouTube Video

###Extra: Hidden Line Removal ./renderBezier -f bezFiles/teapot.bez 0.01 -a + press h

teapot-a-hlr

YouTubeVideo

###Extra: Custom Shader (No Phong Shading) ./renderBezier -f bezFiles/teapot.bez 0.01 -a --opengl3

YouTube Video

###Extra: Convert OBJ to BEZ Patches ./renderBezier -f bezFiles/bunny.bez 0.1 -a

Note: some errors come from our obj2bez.py converter. bunny

Directory Structure

  • build/: temporary object files for linking (need to be created)
  • libraries/: external libraries
  • source/: source code
  • Makefile
  • .gitignore
  • BezierSurfaceRenderer.xcodeproj: XCode project settings
  • bezFiles/: default bez files for testing
  • examples/: submitted examples
  • obj/: obj2bez.py parser and other obj files

Command Line Usage

./renderBezier [-f path/To/File.bez | -d path/to/dir/] stepSize|epsilon [-a] [--opengl3]

##Parameters -f path/To/File.bez: renders a single Bezier file (relative), the file must end in .bez

-d path/to/dir/: renders all the .bez files in the specified directory, the trailing / is required

-a: if -a is specified, adaptive tessellation will be used, otherwise uniform tessellation will be used

--opengl3: enables our incomplete extra credit modern OpenGL 3.2+ pipeline, no Phong shading is implemented, but all transformations work correctly

GUI Usage

##Drawing Control w: press w to toggle between Wireframe and Filled drawing mode

s: press s to toggle between Smooth shading and Flat shading

h: press h to toggle between Hidden Line Removal mode and regular mode

ESC: press ESC to exit

##Transformations +/-: press +/- to zoom in/out

UP/DOWN/LEFT/RIGHT: translate

SHIFT + UP/DOWN/LEFT/RIGHT: rotate

Left Mouse Click: open up a menu to choose which object to transform, selected object will be highlighted

Documentation

##External Libraries

  • Eigen
  • GLFW (Doc)
  • GLEW (Doc)
  • GLUT (Doc)
  • OpenGL

##Main Classes ###BEZParser Parses BEZ files containing patch data ###Tessellation ####UniformTessellation ####AdaptiveTessellation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages