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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NTM4NzMsIm5iZiI6MTczODk1MzU3MywicGF0aCI6Ii80NDEwMDg3Ni8zMTc5NTYwNjktYzdmYjljMmMtNTc2Zi00ZmRjLWEwYTgtMzc2M2MwNzBjZTk4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDE4MzkzM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZmOTY5OThmZjI3MjdmNDY0MWViYzMwOWFlNDAxYzkwNjg5MGE0MDliMWM0NDZkNTg0N2FjNzJkZTY2NWI5OGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.pGRg2TZQeFCwAmBKWO0QUh8vQe_dmrIHWFyiYotHv60)
I'm sharing this for educational purposes only; please reach out if you'd like to reuse some part of this.