-
Notifications
You must be signed in to change notification settings - Fork 7
Hw2 Flash Animation
In this assignment you will create a simple OpenGL 2D application to create a flash animation like the one shown in this video. The animation does not have to necessarily be what is in the video... be creative!
The basics can be implemented in two separate executables (to simplify your life)
- the first uses simple geometry & transformations to create a small animation (start with triangles, later use Bezier)
- one level of transformation hierarchy (e.g. flapping wings)
- one animation bezier path (e.g. translation/rotation/scale of bat around scene)
- the second is for editing Bezier curves (number of vertices and initial layout can be hard-coded).
- editor that allows to change Bezier handle positions and tangents.
- (drawing text is not required, but you can just load simple texture for it if you want)
Note many operations can either be performed on the CPU or the GPU (CPU/GPU points for the same feature do not cumulate).
Modeling
- generate content with convolutions (see sun halo in teaser image) (1% CPU, 2% separable filter, 3% GPU, 4% separable filters on GPU)
- rasterize the bezier polygon into a polygon (render the bezier boundary to a framebuffer, then use parity check to perform inside/outside on each scanline. See Framebuffer::display_color_attachment() to see how to dump the offscreen rendering texture into a cv::Mat, then you can perform the scanline on this image on CPU) (5%)
- triangulate a bezier polygon with trapezoidal decomposition (5%)
- use textures with alpha-blending (e.g. the wing is just a textured quad where some of the pixels are just transparent) (2%)
- efficient Bezier evaluation (recursive deCastlejau split rule) (2%)
- use tessellation shaders (OpenGL4 only) to draw bezier curves efficiently (5%)
Effects
- anti-alias each frame of your animation (clearly you cannot use GL_MULTISAMPLE) (3% CPU, 5% GPU)
- motion blur moving objects (not just global motion blur!) (2%)
Animation
- arc-length parameterization of motion trajectories (2%)
- easy in/out for the animation path (1%)
-
save your animation as a MOV/AVI
- just use some screen capture software (1%)
- dump framebuffer as png/jpeg images then load image sequence (2%)
- let it snow!! particles, geometry shaders and sprites (5%)
- build a system that allows animation key-framing editing (10%)
Software Engineering
- code quality (e.g. organization, Object Oriented programming) (1%)
- use of git repository (i.e. frequent commits with quality log messages) (1%)
- software documentation (comments) (1%)
Open for suggestions!! Let me know if you have anything you'd like to try but I forgot to mention.
Simply pull from the git repository, use the introglsl folder as your starting point. Note that your laptop might not be compatible with OpenGL>=3.2. The computers in the lab have already been tested, so if you want to use your own machine it is your responsibility to invest in getting the code framework up and running! Post related questions on the GitHub issue tracker... and help each other!!
Suggestion: start the assignment by animating a few simple triangles (e.g. the wing of the bat can be approximated by triangles). Later you can replace these with Bezier curves, polygons and textures.
-
Most people said the difficult part is to get started with openGL. Once the program starts to give some result it is easier to keep building up. Also, because this assignment seems to be at the same time of mid-term exams, some students said they didn't spend the expected amount of time into doing it.
-
Because all students who did triangulation of Bezier curve did a specialized triangle fan for Bezier curve, no one did a real triangulation algorithm such as trapezoidal decomposition or ear-clipping, etc, that feature is marked as 2.5% instead of 5% in the total grade calculation.
-
Because all students who did particle effects just created many Quads by hand, no one is using geometry shader / sprites instancing, that feature is marked as 2% instead of 5% in the total grade calculation.
-
Those who correctly applied the Gaussian blur example, but without changing any shader code to do the convolution part get half the mark on the convolution feature.
©Department of Computer Science, University of Victoria, 2015.