top of page


Unity 3D / C# 

For my graduate-level graphics course CIS 5660: Procedural Graphics, I worked with my classmate, Will Cai, to develop Seafarer: a stylistically rendered, procedurally generated, infinite boat simulator inspired by the aesthetics of the fishing game "Dredge" and the gameplay of the endless driving simulator Slow Roads. In Seafarer, you navigate a boat through an serene, ever-expanding sea scape featuring two different environments (a mountain biome and a beach biome) complete with custom biome shaders and various procedurally placed assets. The goal of this project was to leverage various procedural techniques that we had learned over the semester to develop a visually stimulating world that provided a calming user experience.  


Below is the demo video:

My responsibilities included: 

  • Chunk-based Infinite Terrain Generation  

    • Divided up the terrain into "chunks" (i.e. smaller sections that could be loaded/generated when needed as player moves around the world) to optimize game rendering and reduce computational load 

      • Created dictionary to map coordinates to terrain chunk game objects

      • Handled chunk rendering criteria to limit the amount of terrain generated

      • Re-shifts the player and moving camera to stay around the origin (0, 0) to reduce game engine lag 

  • Skybox/procedural sky with day-night cycle

    • Wrote a SkyManager.cs script to automate  sky color changes to replicate the passage of time based on Unity's time value 

    • Centered sky dome mesh around the player movement 

    • ​​Wrote LightingManager.cs script and a lighting preset to replicate a seamless day-night cycle

      • Rotated directional light based on the time of day to simulate the movement of the sun throughout the day  

      • Used ambient color, directional color, and fog color gradients to change sunlight colors as the directional light moved

  • Procedural Asset Placement 

    • Randomized the following features: 

      • The number of prefab objects that could be placed onto a given terrain chunk

      • The coordinate on the terrain  that would be picked to place an object 

      • The exact prefab type that was chosen to be placed (i.e. which of the 4 rock types or the 4 tree types would be selected)

    • Used Unity’s RaycastHit and BoxCast info to test if a given object could be placed at the randomly picked point

      • Checked if the point was above water level and a box collider around the placed object would intersect with the terrain 

  • Custom three-tone toon-shader for biomes and assets 

    • Used Unity's Universal Render Pipeline (URP) and Shadergraphs to develop a variety of biome and asset shaders 

      • Developed a base three-tone toon-shader with customizable highlight, mid-tone, and shadow colors for biome and assets​

        • Integrated support for dynamic lighting and multiple-light shadows​

    • Mountain and beach biome shaders​​

      • Determined grass placement based on height and normal, aiming for higher and flatter sections of terrain 

        • Exposed variables to make error thresholds adjustable

    • Cloud shader

      • Created a procedural cloud shader to generate a cloud material for the sky environment.

        • Included panning UVs to give the clouds movement

        • Layered various gradient noise functions to create cloud textures

        • Used alpha clipping to transform the generated texture into stylized cut-out cloud shapes  

        • Added base cloud color and ambient lighting to blend cloud color with day-night cycle 

    • Water shader

      • Replicated water depth 

        • Calculated depth fade value between 1 (shallow water) to 0 (deep water)

          • Measured vertical distance between an object and the water’s surface by taking the distance between the camera and objects below the water’s surface and subtracting the distance between the camera and the water surface

        • Linearly interpolated between a shallow and deep water color based on depth fade value to get base water color 

        • Applied a Fresnel Effect to get a horizon color for the water 

        • Added the colors of the objects beneath the water so that the color of objects underwater could be seen

      • Refracted UVs

        • Added distortion via Gradient Noise, which a "wobbly" effect to mimic movement on the surface of the water 

      • Surface ripples 

        • Created “Panning UVs” (i.e. scrolling/moving UVs) and applied Voronoi noise to form a ripple texture before applying a ripple color and then adding them to the water color 

      • Intersection foam

        • Implemented a ring of white foam around wherever objects or biomes intersect with the water surface 

          • Defined an intersection mask based on the Depth Fade value and a distance cutoff value

          • Utilized Panning UVs and gradient noise function to get a foam shape

bottom of page