My submission to the 2024 Swift Student Challenge, which was selected as a Distinguished Winner!
I started by modeling my submarine and research sea base with clay, then captured using Reality Composer Object Capture.
I painted the textures for these models using Procreate with Apple Pencil.
For terrain, I used crowdsourced bathymetry data of the sea floor. The data started in the form of a heat map, which I converted to a height map and smoothed with a gaussian filter before generating a 3D mesh from it. It took some trial and error to ensure the resulting USDC is detailed but reasonably sized.
For rendering the game, I used RealityKit, which I used for the first time. I have played with SceneKit in the past, but I really enjoyed the additional capabilities of RealityKit 2.
To achieve a realistic underwater effect, I used a Metal post-processing shader to render distortion, "dust" particle effects, and an underwater hue.
For the UI, I used SwiftUI and used TipKit for the tutorial.
![](https://private-user-images.githubusercontent.com/44100876/317956069-c7fb9c2c-576f-4fdc-a0a8-3763c070ce98.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA2NDUwMTgsIm5iZiI6MTcyMDY0NDcxOCwicGF0aCI6Ii80NDEwMDg3Ni8zMTc5NTYwNjktYzdmYjljMmMtNTc2Zi00ZmRjLWEwYTgtMzc2M2MwNzBjZTk4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzEwVDIwNTE1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU5ODMxMzhkMmIwMzhhZTQxOTBhNGY4ODgwM2E1YjEyMDIxNmIwOGU0ZWUxNDZmZTg0ZmJhN2Y3ZWJiOTU4YzImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.l3Azk2BO3ELuGLbWbk0hlDQ_u5D4rAoeU1xSeWW-Pwk)
I'm sharing this for educational purposes only; please reach out if you'd like to reuse some part of this.