Due: Friday 6/14 10:00am

GitHub link: https://classroom.github.com/a/mHYDusTj

and in the end…

For the final project, you are to add any features you’d like to your current graphics engine. Your final project must start as a working MDL compiler. The base code provided implements all the features we have covered in class using MDL, including using reflective constants as variables. Any new features added must still use the MDL framework.

Below are some good places to start (you may work on other features if you prefer, just talk to me about it first). There is no particular order to these features.

Animation:

Animation requires the use of the vary MDL command, and understanding how to use knobs. Animation will be discussed in class. You can also check the book chapter on animation.

Existing, MDL Commands/Features:

  • light
    • Add a light to the symbol table,
    • When calculating diffuse and specular: loop through all the lights.
    • The provided parser will already add the light to the symbol table. You need to be able to use that data.
  • mesh
    • Use an external .obj file for polygons
    • Read up on the obj format here.
    • Find example files here.
    • Some .obj files list quadrilateral faces instead of triangles, you can either ignore or implement them.
  • set
    • Assign a value to a knob
  • saveknobs
    • Save current knob values to a list
  • tween
    • Produce an animation by going between two knob lists
  • shading
    • Use different shading techniques / calculating I more or less frequently.
    • This will be discussed in class.
    • Some notes are available from the book here.
    • A hash table structure can be very helpful for dealing with vertex normals. Java and Python have readily available hash tables, if you are woking in c, check out uthash.
  • save_coordinate_system
    • Save a copy of the top of the stack to the symbol table
    • use this coordinate system when drawing shapes (extra argument required)

Additions to MDL that require changes to the language:

  • New primitive shapes
    • This requires adding new tokens and new syntax rules for the shapes. A good idea is to start with an existing shape and modify the code for your shape.
  • Change the behavior of vary
    • add a parameter to change how it calculates the change over time
    • Linear , Exponential, Logarithmic, Arbitrary equation, etc.
  • Anti-aliasing / Super-sampling
    • Reduce pixelated edges by calculating a higher resolution version of the image then reducing it to the intended size
  • Perspective.
  • Texture mapping
  • Using vary to move lights.

Useful feature combinations

There are lots of different options to choose from for the final project. If you’re looking for some guidance, here are the features, or combinations of features, that would count as a good project.

  • Animation and the lighting commands.
  • Implementing Phong or Goraud shading, the lighting commands and adding one other existing MDL feature.
  • Implementing the mesh command and 3 other MDL features.
  • Adding 3 new shape primitives (including adding a new MDL command for that shape), and adding 3 other MDL features.
  • You can also mix and match these, or try some the the MDL extensions listed above.

Your README.md file must describe what features you have implemented and any relevant MDL instructions. Start your README.md file with your name(s). Then have a succinct list of the features you have implemented, and any relevant MDL commands. Provide more detailed descriptions below that list if needed.