Skip to content

Kioberry/CSCI580_AlienCat_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Proposal:

  • Our project is a real-time 3D rendered scene built entirely in GLSL on Shadertoy, rendering a green alien cat character wearing a colored inflatable swimming ring and floating on the ocean.
  • This is Computer Graphics related because it requires us to implement a complete rendering pipeline from scratch. From defining geometry mathematically, to casting rays, computing intersections, evaluating lighting models, and applying post-processing, they all run in real-time on the GPU.
  • We build the entire 3D scene using ray marching, where we set up a virtual camera that casts rays to detect objects like the cat, swimming ring, and ocean. We use transformations such as translation, rotation, and scaling to position and animate everything, and we compute surface normals from distance fields to handle shading. We improve realism by adding lighting effects like soft shadows, ambient occlusion, and simple reflections and refractions for the water. We also rely on procedural methods, including noise and fractal Brownian motion, to create ocean waves and surface details. Overall, we define both geometry and materials using signed distance functions and procedural coloring.
  • New techniques we will need to learn include: GLSL shader programming and the Shadertoy framework, SDF character sculpting with smooth blending operators, height-field ray marching for ocean waves, and chromatic aberration (CA) as a post-processing effect — by offsetting the R and B color channels in opposite directions along the sway direction. CA simulates lens distortion and adds a dynamic, lively feel to the cat's animation cycle.

Demo:

Final Result

How to Run:

  1. Open Shadertoy and create a new shader.
  2. Copy the contents of final.glsl into the editor.
  3. Set up the following channels in Shadertoy:
    • iChannel0 → Upload img/CatFace.jpg
    • iChannel1 → Upload img/CatFur.jpg
    • iChannel2 → Upload img/CatEarFur.jpg
    • iChannel3 → Select built-in cubemap: Forest Blurred

Reference:

  • https://www.shadertoy.com/view/WlBBzV Squishy Donut Cat is the closest match to our concept, i.e. a character sitting inside a ring-shaped object, modeled with SDFs. But in our project, we will redesign both the main character and the ring it interacts with, and add a full ocean background to create a more complete and dynamic scene. To achieve our goal, we will deal with water surface reflections and volumetric color gradients that respond to the scene's geometry and lighting.
  • https://www.shadertoy.com/view/4tsXzn Buoy - Our scene will be like the Buoy one, a ray tracing object floating on a ray marching ocean with reflection and refraction. But our project will build on this by replacing the simple sphere object with a more complex SDF character and an inflatable swimming ring.
  • https://www.shadertoy.com/view/w3KyW1 Ocean Water Test — a relatively simple but well-structured ocean water shader featuring procedural wave height fields and water caustics. We referenced its wave system architecture and caustic noise approach to build the ocean in our scene.
  • Claude (claude.ai) — used as an AI assistant for debugging GLSL shader code, explaining rendering concepts, and reviewing the final shader for unused functions and logic issues.
  • ChatGPT (chatgpt.com) — used as an AI assistant for brainstorming scene design, helping with SDF modeling approaches, and drafting code structure.

About

This is a computer graphic project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages