crispypin.cc_old/docs/projects/index.html

90 lines
No EOL
5.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/style.css">
<link rel="icon" type="image/x-icon" href="/media/icons/favicon.png">
<title>Projects</title>
</head>
<body>
<header>
<a href="/" id="logo"><img src="/logo.png" alt=""></a>
</header>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/projects/">Projects</a></li>
<li><a href="/blender/">Blender</a></li>
<li><a href="/fractals/">Fractals</a></li>
<li><a href="https://crispypin.itch.io/">Games</a></li>
</ul>
</nav>
<main>
<br>
<b>**This page is a draft**</b>
<h1>Projects:</h1>
<ul>
<li><a href="#voxel-mesh">Voxel mesh optimiser</a></li>
<li><a href="#ovr-utils">OVR Utils</a></li>
<li><a href="#voxel-raymarch">Raymarched voxel rendering</a></li>
<li><a href="#gol-wallpaper">Game of life wallpaper</a></li>
</ul>
<h2 class="title-link" id="voxel-mesh"><a href="#voxel-mesh">Voxel mesh optimiser and chunk system</a></h2>
<a href="https://github.com/CrispyPin/gd-voxel-rs">https://github.com/CrispyPin/gd-voxel-rs</a>
<p>
I am making a voxel engine in rust to learn rust and godot-rust as well as explore voxel systems.
</p>
<video src="/media/projects/voxel/demo.mp4" controls height="320">video not supported :(</video>
<p>Demo of fast terrain generation</p>
<video src="/media/projects/voxel/demo2.mp4" controls height="320">video not supported :(</video>
<p>Greedy mesh visualisation</p>
<h3>Greedy mesh algorithm</h3>
<p>The algorithm I'm using is one I made myself, inspired by a few others. I could not find an easy to understand explanation of how to do it but <a href="https://vercidium.com/blog/voxel-world-optimisations/">this artice</a> and <a href="https://0fps.net/2012/06/30/meshing-in-a-minecraft-game/">this article</a> gave me somewhere to start</p>
<p>In this explanation I will assume basic knowledge of how meshes work and how to do the simplest form of culling for voxel meshes.</p>
<img src="/media/projects/voxel/fig1.png" alt="">
<p>fig. 1: example set of voxels, with the simplest form of mesh generation applied.</p>
<p>To start off, we can break down the problem to 2 dimensions by recognising that each direction along the axis as well as each layer along those directions is independent. We then only have to process a single 2D slice of the voxel domain at once.
</p>
<img src="/media/projects/voxel/fig2.png" alt="">
<p>fig. 2: The algorithm only needs to consider one layer and direction at a time, highlighted in green</p>
<p>The first step is to generate "strips", essentially create long quads that cover connected voxels. We can loop through the plane and keep track of at most one active strip. The active strip is the last one started and we grow it as more voxels under it are traversed. In the inner loop we check the voxel at that position as well as the one above. With this we can determine if we need to stop the current strip, start a new one or do nothing. If there is not currently an active strip, a new one should be created when the voxel below is filled and the one above is empty (an exposed surface). </p>
<img src="/media/projects/voxel/fig3.png" alt="">
<p>fig.3: Long strips of adjacent voxels can be merged into fewer, long quads.</p>
<h2 class="title-link" id="ovr-utils"><a href="#ovr-utils">OVR Utils</a></h2>
<a href="https://github.com/CrispyPin/ovr-utils">https://github.com/CrispyPin/ovr-utils</a>
<p>
OVR Utils is a VR overlay application that has some useful tools for SteamVR. I have been working on it on and off since May 2021.
</p>
<p>
I wanted an overlay that could tell me the time without having to open the steam dashboard, and to see the battery levels of my controllers easily, but couldn't find one for free that also had linux support. So I decided to create my own, and also wrote down a long list of other useful tools. So far only a few of these have been implemented, such as the image overlay and the keyboard.
</p>
<h2 class="title-link" id="voxel-raymarch"><a href="#voxel-raymarch">Raymarched voxel rendering</a></h2>
<a href="https://github.com/CrispyPin/voxel-raymarcher">https://github.com/CrispyPin/voxel-raymarcher</a>
<img src="/media/projects/raymarched-voxels.png" alt="">
<h2 class="title-link" id="gol-wallpaper"><a href="#gol-wallpaper">Game of life wallpaper</a></h2>
<a href="https://github.com/CrispyPin/gol-wallpaper">https://github.com/CrispyPin/gol-wallpaper</a>
<p>See live here: <a href="https://gol.crispypin.cc/?cellsize=5&time=2&margin=0&populate=true">gol.crispypin.cc</a></p>
</main>
<footer>
<p>Copyright © 2022 - CrispyPin</p>
<div class="links">
<a href="https://github.com/CrispyPin"><img src="/media/icons/github.png" alt="" width=32px></a>
<a href="https://crispypin.itch.io/"><img src="/media/icons/itch.io.svg" alt="" width=32px></a>
<a href="https://www.youtube.com/channel/UCFW1QTsbFgux8VrduCz_ckQ"><img src="/media/icons/youtube.png" alt="" width=32px></a>
</div>
</footer>
</body>
</html>