Team Shader

Welcome to our showcase for CS 440 - Computer Graphics. We are the Shaders and our members are.....

Batool Ahmed

CS 2023 - Habib University

Altaf Sheikh

CS 2022 - Habib University

Maaaz Shaheen

Cs 2022 - Habib University

Haania Siddiqui

CS 2023 - Habib University

Our Concept

When we started out this project, we had fancy thoughts of chandeliers and castles in mind. But all fantasies must eventually end, and our dreams shattered by the awakening to reality.


As dread started to set in that the project might not be completed on time, we saw within our dread an opportunity. An oppertunity to seize that dread and share it with the world. Hence, our project model of the horrifying and the macabre, born of the fear each student faces when looking despair in the eye, was born.


However, the intent behind our model is not to scare. Carrie Fisher, who played Princess Leia in Star Wars, once said "Be afraid and do it anyway". And is that not where true courage is tested? We hope this model inspires you to face your fears, your remaining deadlines, for as we used our fear to make this model for the project, we hope you will use your fear to face yours!

Our Scene


We have made our scene consisting of macabre objects situated infront of a red curtain. We have utilised 3 lights. Ambient, Point and Directional.


The objects as seen are a skull, a spider, a hand, a curtain, a sphere, candles, some blood, and a table below the items. Approximately 2.5 million primitives have been used.


As can be seen, the materials are of two types, matte and reflective

Acceleration Structure


We have implemented Regular Grid as an acceleration structure. To test it, we rendered images with different number of spheres, and compared the timings before and after implementing the acceleration structure. To use acceleration, add all the objects to the grid using the add_object() function, use the setup_cells() function of the grid, and then add the grid to the world using the add_geometry() function. To disable acceleration, normally add all objects to world using add_geometry() function.

Without Grid
Resolution Primitives Time taken (secs)
480 x 360 100 3.763231
480 x 360 1000 14.604122
480 x 360 10000 147.773
480 x 360 100000 ⪢ 10 mins
1920 x 1080 100 18.223131
With Grid
Resolution Primitives Time taken (secs)
480 x 360 100 0.421002
480 x 360 1000 0.359998
480 x 360 10000 0.718001
480 x 360 100000 0.809849
480 x 360 1 Million 2.686994
1920 x 1080 100 3.393997
1920 x 1080 1000 5.90635

Image Features

Interesting features in our code and fun renders.

2 Points Lights

2 Reflectives

Anti-Aliased

Directional Light

Code Features

Following are listed our implemented features in the code.

Lighting

We have implemented several types of lighting, namely Point, Directional and Ambient.

Camera

We have two types of cameras, parallel and perspective for different views.

Samplers

We've implemented 3 samples. Simple, Random, Regular.

BRDF

We've implemented Lambertian, PerfectSpecular, GlossySpecular to showcase bidirectional reflectance.

Acceleration Structures

We have implemented Grid data structure for quick intersection of rays and primitives.

Geometry

We have implemented several geometric structures such as Planes, Spheres, Triangles and Rectangle as well. We also implemented Compound Objects for the purpose of regular Grid.

Material

We have implemented several materials in our renders. These are Matt, Phong, Reflective and Emissive.

Tracer

We have implemented several tracers alongside Basic and Raycast such as AreaLighting and Whitted.

Bonus renders and features

Here we have added any bonus renders and features
Emissive Light
Reflections
Reflections
Phong Reflective
Mesh

Build

All relevant code is provided in the github repo.
  • BuildChapter14:
    To showcase anti-aliasing
  • BuildEmissive:
    To showcase emissive material, area light, AreaLighting tracer
  • BuildMany:
    To calculate times for acceleration struct
  • BuildReflect:
    To showcase reflectance among different materials
  • BuildShadow:
    To showcase shadows from point lights and directional lights
  • BuildPly
    To render concept scene.

Acknowledgements

We would like to thank the following sources for their immeasureable help and usefulness during the project:

1. Kevin Suffern - RayTracing from the Ground Up

2. For reading ply files: hapPLY

3. 3D models from: sketchfab, cgtrader, clara.io

4. Blender