# Planet Explorer


{{< link_badge "https://github.com/AuroraEchoes/PlanetExplorer" >}}
    {{< ico font-awesome-brands github  2em>}}
    Source Code on GitHub
{{< /link_badge >}}

Plant Explorer is a three.js program from my Computer Graphics course, which dynamically generates, renders, and lights planets. The thing I’m proudest of is that all planets are lit using a physically based rendering (PBR) bidirectional reflectance distribution function (BRDF) which I wrote.

I had great fun researching and implementing each individual brick of this: diffuse lighting using the Lambertian model; specular lighting using Schlick’s Fresnel approximation; and Cook-Torrance to approximate surface roughness. I highly recommend checking out `src/shaders/fragment.glsl`; it’s all well-documented in the comments there.

I generated the planets themselves are generated using a sphere, which is procedurally offset by fractional Brownian motion applied to Simplex noise, creating fine details. I added normal textures to give the BRDF something to think about; this was by using a lunar normal map in combination with a shader technique called triplanar mapping to ensure reasonably continuity.

This was a really fun one for me, because I got to go and learn a bunch of techniques and then implement them.

# Technologies Used
{{< icon_row >}}
    {{< technology_icon "three.js" >}}
        {{< ico dev "threejs/threejs-original" 5em >}}
    {{< /technology_icon >}}
    {{< technology_icon "TypeScript" >}}
        {{< ico dev "typescript/typescript-original" 5em >}}
    {{< /technology_icon >}}
    {{< technology_icon "GLSL" >}}
        {{< ico dev "opengl/opengl-original" 5em >}}
    {{< /technology_icon >}}
    {{< technology_icon Git >}}
        {{< ico dev "git/git-original" 5em >}}
    {{< /technology_icon >}}
{{< /icon_row >}}


---

> Author: Aurora Esmeralda  
> URL: http://auroraechoes.dev/projects/planet-explorer/  

