Solstice - Programming

Role: Programmer
Solstice

Introduction to Tech Art and Shader Programming

In this project, one of my key responsibilities was to tackle Tech Art and Shader Programming—an area that was new to me at the time. My primary task was creating a shader to simulate a portal to another dimension or world. The shader needed to reveal a unique environment visible only when a fracture fully opened, with the environment inside remaining distinct from the original game world. This required intricate mesh manipulation, including dynamically cutting and selectively rendering parts of meshes to avoid overlap and maintain clear boundaries between environments.

Though I had little prior experience with shaders beyond basic dissolve effects, the challenge intrigued me. Despite my initial lack of interest in shaders, I took on this task because it was essential for the project and no one else on the team was available to handle it. Through the guidance of Maximilian Meinhardt, a shader expert, I was able to overcome the learning curve and tackle this complex task. His mentorship and shared resources were invaluable in helping me grasp the technical aspects of shader development.

Prototyping and Iteration

Creating the portal shader involved numerous prototypes and iterations to refine the effect. Early attempts focused on solving the mesh rendering issue. We explored different approaches, including several shape iterations to find the most fitting design for the fracture. Initially, a spherical shape was considered, but we quickly realized that it didn’t work well for our needs, as it was not easily recognizable from a distance. This led to a decision to opt for a cylindrical shape with rough edges, which better integrated with the aesthetic and helped maintain resource efficiency.

Videos of these early prototypes can be found here:‍‍

These iterations allowed me to explore different visual styles, and after gathering team feedback, we settled on the best approach that fit both our technical and artistic requirements. The finalized shader effectively showcased custom assets, including those created by the environment artists, blending seamlessly with the world around the fracture.

Advanced Shader Development and HDRP Challenges

One of the major challenges I faced during this task was working within Unity's High Definition Render Pipeline (HDRP). Since HDRP is not a standard feature in Unity, I had to develop a custom HDRP rendering solution for both the inside and outside of the fracture. This process involved integrating advanced features like roughness maps and normal maps to maintain visual consistency, which made the fracture appear more realistic and integrated into the scene.

Additionally, I worked with fog effects within the fracture, using Unity’s fog system to add atmosphere and depth. However, the integration of these features required a nuanced approach to ensure they didn’t clash with other visual elements in the game. This included fine-tuning the fog and ensuring it blended correctly with the fracture's environment, which was a technically demanding aspect of shader programming.

Terrain Integration and Complex Systems

Another significant challenge arose when integrating the fracture shader with terrain data. Since our game used custom shaders for terrain and assets, placing a prefab fracture onto a terrain required calculating its position, converting it to terrain coordinates, and carving a hole of specific dimensions. This also involved removing vegetation such as grass and trees, but the real complexity arose when the fracture closed. The hole had to seamlessly close, reinstating the original vegetation.

This system required me to work closely with terrain data and coordinate mapping to ensure everything worked smoothly. Despite the complexity, I was able to develop a solution that integrated the fracture's behavior with the terrain, ensuring that the visual effects remained consistent and believable.

Final Touches and Shader Dissolution

Once the basic fracture shader was completed, I turned my attention to improving the visual appeal of the fractures through a dissolve effect. This shader allowed the fractures to dissolve dynamically, enhancing the overall user experience. I also worked on a separate interactable shader, which indicated to the player which items could be picked up, adding an extra layer of interactivity to the game.

The dissolution effect, combined with other shader elements, gave the fracture a more polished and professional appearance. While some technical issues remained—such as bugs with asset rendering when multiple fractures appeared in sequence—the shaders ultimately fulfilled their intended purpose, and I was proud of the overall result.

Other Technical Contributions and Systems Development

Beyond shaders, I played a crucial role in developing several core systems and background scripts for the project. This included working with Git for version control and managing the overall flow of the codebase. I developed and implemented various systems, including player hand sway, checkpoint mechanics, game over systems, cutscenes, and creature pathfinding and AI behavior, as well as the system for guiding the player through the game.

Additionally, I focused on bug fixing and ensuring that systems worked as expected. Many of these tasks involved close collaboration with the art team to ensure that new elements like fractures were correctly integrated into the project. Despite my primary role being game design, I took on these technical tasks to ensure that the project was functional and that our assets and systems worked seamlessly together.

Version Control History

Reflection and Challenges

While I was able to complete many of the tasks assigned to me, I must acknowledge that my involvement in programming, particularly in shader development, exceeded my initial expectations. I had intended to focus more on level design and less on programming, but due to resource constraints, I took on more technical responsibilities. In hindsight, I believe I could have delegated some of these tasks to other team members, allowing me to focus more on my primary role.

Though I feel that my programming skills were not at their peak, I took great pride in overcoming the technical challenges presented by shader programming and system development. While certain areas, such as code optimization and modularization, could have been improved, I gained invaluable experience that will undoubtedly help me in future projects.

More Info about this Project

Other Projects

Stay in Touch