NorthStar's rain system includes rain ripples, a procedural shader-driven effect within the NorthStarDefaultShader function. To enable or disable rain ripples on compatible surfaces, configure the ripple settings using the Rain Data Scriptable object and add the Rain Controller Component to the scene.
A procedural function reduces texture samples, offering control and reusability advantages over a texture flipbook approach. Procedural ripples allow variable density and intensity, optimizing the effect by removing ripple layers. For Quest 2 builds, rain ripples are halved.
Raindrops are a standalone Particle System, configured and placed as needed. Integration into the Rain Controller is ongoing.
In VR, clipping with the player camera is undesirable, especially with high-frequency effects like rain. NorthStar's challenge is the perception of small geometry at a distance, making raindrops hard to read and contributing to fragment overdraw. Instead of fading particles near the camera, we implemented a dynamic solution that scales particle size by distance. When particles reach size 0, they move behind the player, reducing fragment overdraw and improving performance and readability.
NorthStar's foliage shaders include wind as a procedural feature. Wind functions only when a Wind controller component is present, and models have the correct vertex color setup.
The wind system uses multiple sine waves to simulate complex foliage movements.
Two types of foliage are supported:
Single-layer foliage has a single motion channel, suitable for small clusters like grass or flowers.
Vertex Color Setup:
- R: Wind Influence (0-1).
- G: None.
- B: Random ID for leaf clusters.
- A: None.
Example:
Used for foliage with primary and secondary motion sets, like NorthStar's kelp in Beat 7, where leaves inherit stem motion and add complexity.
Vertex Color Setup:
- R: Stem: Black. Leaves: Wind Influence.
- G: Stem: Wind Influence. Leaves: Stem Wind Influence.
- B: Stem: None. Leaves: Random ID.
- A: Stem: None. Leaves: None.
Trunk:
Wind parameters are stored in the Wind Data scriptable object, viewable in the Wind controller when populated.
The Docks scene in Beat 2, one of our most graphically intense scenes, required optimization due to high vertex counts. Techniques like LODs, imposters, and billboards were used, though not covered here as they are standard.
In NorthStar, teleportation points define vertex density based on distance. With stationary navigation points, geometry reduction is aggressive until silhouettes show hard edges. Density decreases with distance.
Red circles indicate player positions. To reduce draw calls and vertex count, the boat was divided into four parts based on player navigation.
Each segment was baked into a single mesh with two materials: one for metal and one for non-metal parts. The LOD system supports manual switching to cheaper versions of the boat.
Non-optimized geometry was excluded from custom LOD meshes.
Most NorthStar shaders were created with Shader Graph, optimized for the Quest platform.
A custom texture packing setup reduces texture samples in NorthStar's PBR shaders:
- BaseColor Texture: RGB for Base Color, A for Opacity/Emissive.
- Normal Texture: RG for Normal, G for Smoothness, B for Metallic/Ambient Occlusion/Height.
Channels are packed by usefulness, benefiting from ASTC's linear compression.
An uber shader approach reduced shader maintenance and setup complexity. Disconnecting parameters like SmoothnessValue and MetallicValue from the shader graph saves 15% in instruction count, though not a direct performance increase. This basis led to a collection of shaders for common use cases.
Shader functions maintain consistency, with the Uber shader function enabling/disabling features with constants for optimization.
A custom shader inspector helps artists choose the right shaders. Assigning NorthStar PBR shaders uses this custom inspector.
The Selected Shader dropdown provides informative choices and limits displayed information, centralizing shader options.
Selecting a different shader updates the inspector with relevant options.
PBR with smoothness:
PBR Foliage:











