CS 457/557 -- Winter Quarter 2018

Project #1

Sharp and Smooth-edged Elliptical Dots

60 Points

Due: January 19


This page was last updated: January 10, 2018


Requirements:

  1. Use glman and GLSL to render some geometry (your choice), covered with elliptical dots.

  2. The definition of "elliptical dot" is somewhat flexible. But, they must be predictably elongated.

  3. The ellipse parameters must be set as uniform variables from glman sliders, like this:
    ##OpenGL GLIB
    
    Perspective 90
    LookAt 0 0 2  0 0 0  0 1 0
    
    
    Vertex   oval.vert
    Fragment oval.frag
    Program  Oval				\
    	uAd <.001 .1 .5>		\
    	uBd <.001 .1 .5>		\
    	uTol <0. 0. 1.>
    
    Color 1. .9 0
    Sphere 1 50 50
    
    

  4. Apply lighting. You can do this simply in the vertex shader, like this:
    #version 330 compatibility
    
    out vec3  vMCposition;
    out float vLightIntensity; 
    
    vec3 LIGHTPOS   = vec3( -2., 0., 10. );
    
    void
    main( )
    {
    	vST = gl_MultiTexcoord0.st;
    
    	vec3 tnorm      = normalize( gl_NormalMatrix * gl_Normal );
    	vec3 ECposition = vec3( gl_ModelViewMatrix * gl_Vertex );
    	vLightIntensity  = abs( dot( normalize(LIGHTPOS - ECposition), tnorm ) );
    
    	vMCposition  = gl_Vertex.xyz;
    	gl_Position = gl_ModelViewProjectionMatrix * aVertex;
    }
    
    or, you can do the full per-fragment-lighting thing.

  5. The choice of geometry is up to you. Keep it simple at first, then, if there is still time, feel free to get more creative. To try out the giraffe model, use the GLIB line:
    Obj giraffe.obj
    
    where the file giraffe.obj is in the same folder as your .glib, .vert, and .frag files.

Hints:


The Turn-In Process:

Your turnin will be done at http://engr.oregonstate.edu/teach and will consist of:

  1. All source files (.glib, .vert, .frag). You can zip this all together if you want.
  2. A PDF report with a title, your name, your email address, nice screen shots from your program, and the link to the Kaltura video demonstrating that your project does what the requirements ask for. Narrate your video so that you can tell us what it is doing.
  3. Be sure your video's protection is set to unlisted.
  4. Do not put your PDF into your zip file. Leave it out separately so my collect-all-the-PDFs script can find it.

Submissions are due at 23:59:59 on the listed due date.

Grading:

FeaturePoints
Hard-edged elliptical dots10
Smooth-edged elliptical dots20
Correct elongation30
Potential Total60