Skip to content

AceSavaid/UnityShaderShowcase

Repository files navigation

Computer Graphics Unity Shader Showcase

This project is a level-based, 3D third-person platformer base used to facilitate showcasing the shaders created. In this game the plyaer avoids obstacles, shoot enemies and platform in their attempt to reach the end of each stage.

Final Project:

Credits: Line shadow texture was from tutorrial. Bases of scripts were from lectures. Probuilder and Cinemachine were used. All other textures were made by us.
**Note: Can toggle debug mode through pausing the game (pressing esc)
Slides: https://docs.google.com/presentation/d/10Lnsc44KVlqOOGGfMC5SAeE4YbPRhudr1aMxsp9T6-0/edit?usp=sharing
Youtube Video: https://youtu.be/zTegaFG-DZ8

Roles
Alannis - Itegrations, Toon Shader, Water Shader, Holograms, Shadow Shader, Upgraded outlines, Creating Debug mode
Bradley - Level Design and Implementaion, Depth of Field and Bloom shader, LUT Shader, Selection and Placement of Materials
Carlos - Pixelization , adding music and sound effects

Itegrations

  • Combined shaders so that more effects can be done as well as more variations to the possibilities of materials. It is also for optimization, for example having the toon shader and the outline shader be one shader, as well as having variations with displacement maps, normal maps and more for different effects.
  • Adjusted the bloom and blur to fit the aesthetic of the game more.
  • Added systems to make things togglable in debug mode.

image
image
image

Texturing

  • Use of material and uv sampling
  • use of different textures such as toon ramps, normal maps and displacement maps
    ABrick
    BrickNormalMap

Colour Correction

  • Uses a script on the camera to render LUTs stored in materials onto the camera, the camera refereces the currently inplace lut to know what colour style it should use in visualizing the scene.
    image

  • Added areas that change what LUT the camera is rendering, this is to help with showing off area changes and adding to the environmental aestetic of the game.
    image

  • Several Luts were created to give off different feels such as cool, warm and very hot.
    image image image

Visual Effects

  • Holograms are similar to rim lighting while void is similar to reverse rimlighting, however these effects havethe added style of transparency and the ability to use a material on the effect for more details and variations. The Saturation of the dot product of the normalised view direction and normal is set as the rim and that is then multiplied by the rim power.

image

image

Additional Effects

Outlining

  • Combining this shader into other shaders to add this effect to more shaders.
  • This extuds the edges of a shape and colours it a specific colour before rendering the actual object infront of this to give the illusion of outlining.
  • This adds clarity and distinction to our objects, especially since toon shading can make some objects lack depth.
    image

Screenshot 2023-04-04 060107 Screenshot 2023-04-04 055728

Toon Shading

  • Uses a material called a toon ramp to apply shading to an object based on how much light is directly hitting that part of the object
  • Also added normal mapping and shadows to enhance the toon shading.
  • This was used to create a more toony style to the game.
    image DotToonWrap

image

Water

  • Displaces the vertecies of the object in the form of a sine wave
  • This is to add life and movement to the scene. Toon shading was added to it to help the shader have shadows but also fit the aethetic.
    image

Screenshot 2023-04-04 023331

Shadows

  • Added textured shadows that can also be coloured and have their transpaceny altered.
  • This allows for the object to have a completely different colour scheme and material dependant on whether that part of the object is in shadow or not.
  • This was used to add more stylization to the game as well as more customizations to the look of the game
    image

Screenshot 2023-04-04 063620 Screenshot 2023-04-04 063748

Post processing

Bloom

  • Adds a blurring intesity to the objects it is rendered on. Makes objects more bright and saturated.
  • Iterations affects how bright it gets, thresholds is like the lower limit to things affected by the blur.
  • This was used to add to the style of the game, making it more similar to early 3D console games. image image

image image

Depth of field

  • Turned the regular blur script into a depth of field script

  • Takes in a circle of confusion value and using the given range and depth apples a level of bluring to what is being rendered on the screen.

  • Range is how far the transition from blurry to not blury is from each other, coc is the actual circle of blurriness. Depth is distance from camera that it blurs.

  • This was used to add depth to our game as well as fade away the borders of the level.
    image image

image image

Pixelizatoin

  • Groups Pixels and averages the sum of their colours in the colour that is displayed. Leads to a lower resoloutiion and more pixelated feel. Was used to give the game a more retro field to add to the toony aesthetic.
    image image

image

Debug Menu

Worked on a menu and interfaces in game that allows uses to toggle different factors of visuals we added to the game.
Materials

  • Using numbers 1-6, you can see the progression of material used. The main ones in the game now are variations of toon shading with normal mapping and shadows.
  1. Default unity material
  2. Diffuse Shaders
  3. Difuse with specular shaders
  4. Toon Shading
  5. Toon Shading with materials and normal mapping
  6. Toon Shading with shadow textures and colouring

Post Processing
Going into the deubug menu found in the pause menu, you can toggle on and off the colour correction and post processing effects. There are several toggles and sliders to toggle the effects seen in game.
image


Group Assignmemt

Supporting Documents

Slides: https://docs.google.com/presentation/d/1qHUVmM7UDbQPsCz0wPt5AmObGQ26cu6l9dbFuFq-ypY/edit?usp=sharing YoutubeLink: https://youtu.be/R_RzUvM6myo

Contributions

Bradley

  • Bloom Shader
  • Decals
  • Level Designs and Layout

Alannis

  • Depth of Field
  • Void Material
  • Programming

Carlos

  • Sound Effects
  • Outlines
  • Particles

Explainations

Void Material
This works similar to the rim lighting shader but it allows transparency and and alpha value. The Saturation of the dot product of the normalised view direction and normal is set as the rim and that is then multiplied by the rim power. This rim value is then applied to the level of colour and transparency the object has so that the center is the most opaque and coloured and the outer edges are transparents and lack colour.

Decal
Gets two textures and applies one on top of the other to give it more detail such as bullet holes or scorch marks

Particles
Applies a material to a sprite in the particle system to have various properties and functions appied to it.

Depth of Field
Blurs what is rendered in the camera by how far it is from the camera.

Individual Assignment

Alannis Davis

Project Manager + Gameplay Programmer

  • Codes the main mechanics and systems of the game as well as manages the progress of the overall game.

Link to Slides: https://docs.google.com/presentation/d/1OFhTw9AdopR1gQyJs2cxFFqDmimmFOSGA32SsXMZ3lc/edit?usp=sharing
Demo Video: https://youtu.be/ZYAwaEgcMEQ

Explaination & Documentation

Worked on scripts for a base of the project as they were already started on in the project and it didnt make sense to redo them. Probuilder and https://cpetry.github.io/NormalMap-Online/ were used.

Bradley Cameron

Enemy and Level Designer

Link to Slides:
Demo Video: https://drive.google.com/file/d/1INVHxMU0O_wMb6BsLeTVq8Fezb1EG5mp/view?usp=share_link Demo Video:

Explaination & Documentation

Some scripts like the base player and genral kill scrips were made as a group as a base and then edited in the scenes as the project was in progression and it would not be optimal to recode the same scripts and mechanics for the project multiple times over.
Probuilder was used.

Carlos Lu

Sound Designer

  • Creates the sound effects and soundtrack of the game, also assisting with vfx when needed.
  • Has a mini project along side the main game for additional content.

Link to Slides: https://docs.google.com/presentation/d/1awsoW2XGMIp2MkMkAQZ2CAZEJfHon6Xx0WO9VoaPU-U/edit?usp=sharing

Demo Video: https://youtu.be/ZWYCuUv2rcc

Explaination & Documentation

Third Party Plugins Used: Cinemachine & New Input System

About

A showcase of multiple shaders created and developed over 3 months in a base of a game with togglable debug menu.

Resources

Stars

Watchers

Forks

Packages

No packages published