huge refactor

This commit is contained in:
Crispy 2022-05-07 22:05:22 +02:00
parent 481fcf0227
commit f116de48b9
43 changed files with 404 additions and 449 deletions

View file

@ -8,30 +8,30 @@
<include header.html/>
<main>
<h1>Blender creations</h1>
<p>I have been using Blender since around august 2020 on and off, and did a course in it 2021, which boosted my motivation a lot. I just like to make art in it and of course use it for game jams.</p>
<p>I have been using Blender since around august 2020 on and off, and did a course in it 2021, which boosted my motivation a lot. I occasionally make art in it and of course use it for game jams.</p>
<h2>Alien Creatures animation</h2>
<p>January 2022</p>
<p><a href="https://youtu.be/AfRJvExamX4">youtu.be/AfRJvExamX4</a></p>
<!-- <iframe width="854" height="480" src="https://www.youtube-nocookie.com/embed/AfRJvExamX4"></iframe> -->
<video src="/media/blender/critters.mp4" controls height="480"></video>
<video src="critters.mp4" controls height="480"></video>
<h2>Alien Tree</h2>
<p>January 2022</p>
<a href="/media/blender/alien_tree.png"><img src="/media/blender/alien_tree_preview.png" alt="Alien Tree" title="Click for full resolution"></a>
<a href="alien_tree.png"><img src="alien_tree_preview.png" alt="Alien Tree" title="Click for full resolution"></a>
<h2>Decapod Alien</h2>
<p>January 2022</p>
<a href="/media/blender/decapod_shock.png"><img src="/media/blender/decapod_shock_preview.png" alt="Decapod Alien" title="Click for full resolution"></a>
<a href="decapod_shock.png"><img src="decapod_shock_preview.png" alt="Decapod Alien" title="Click for full resolution"></a>
<h2>Crab</h2>
<p>October 2021</p>
<a href="/media/blender/crab.png"><img src="/media/blender/crab_preview.png" alt="Crab" title="Click for full resolution"></a>
<a href="crab.png"><img src="crab_preview.png" alt="Crab" title="Click for full resolution"></a>
<h2>Shork Wallpaper</h2>
<p>This is a wallpaper for the game <a href="https://crispypin.itch.io/ld-48">Shork</a>.</p>
<p>May 2021</p>
<a href="/media/blender/shork_wallpaper.png"><img src="/media/blender/shork_wallpaper_preview.png" alt="Shork Wallpaper" title="Click for full resolution"></a>
<a href="shork_wallpaper.png"><img src="shork_wallpaper_preview.png" alt="Shork Wallpaper" title="Click for full resolution"></a>
</main>
<include footer.html/>
</body>

View file

@ -3,12 +3,78 @@
<head>
<include meta.html/>
<title>Fractals</title>
<style>
.demo-render {
margin: 20px;
width: -webkit-min-content;
width: -moz-min-content;
width: min-content;
background-color: #000;
}
.controlbar {
background-color: #181818;
padding: 2px 5px;
height: -webkit-max-content;
height: -moz-max-content;
height: max-content;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: space-evenly;
-ms-flex-pack: space-evenly;
justify-content: space-evenly;
-ms-flex-line-pack: stretch;
align-content: stretch;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.controlbar button, .controlbar input {
padding: 4px 6px;
height: 25px;
border: 1px solid #000;
border: 0;
cursor: pointer;
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
margin: 2px;
}
.controlbar label {
background-color: #181818;
color: #fb8;
margin: 2px;
font-family: 'Consolas', 'Courier New', Courier, monospace;
}
.clickable, nav li, .controlbar button, .controlbar input {
border-radius: 2px;
background-color: #4a4;
}
.clickable:hover, nav li:hover, .controlbar button:hover, .controlbar input:hover {
background-color: #4af;
}
.clickable:active, nav li:active, .controlbar button:active, .controlbar input:active {
background-color: #46c;
}
.clickable:disabled, nav li:disabled, .controlbar button:disabled, .controlbar input:disabled {
background-color: #8b8;
text-decoration: line-through;
color: #000;
cursor: default;
}
</style>
</head>
<body>
<include header.html/>
<main>
<h1>Fractals</h1>
<p>This page is a collection of fractal renderers I made in JS for a school assignment back in 2020. Please note that I don't use JS any more.</p>
<p>This page is a collection of fractal renderers I made in JS for a school assignment back in 2020.</p>
<h2>Fractal tree</h2>
<p>The splitting angle is defined by the mouses x position. The number of iterations is set in the first input field (default is 12). Each branch is slightly smaller than its parent, the factor is the second input field. Click the canvas to pause/resume the image.</p>
<div class="demo-render" id="fractal-tree">

View file

@ -8,7 +8,53 @@
<include header.html/>
<main>
<h1>Hello!</h1>
<p>Welcome to my corner of the internet. I use this page to showcase some of my interesting projects in an easier to see way compared to just github. (This is very much a WIP)</p>
<p>Welcome to my corner of the internet. I use this page to showcase some of my interesting projects in an easier to see way compared to just github.</p>
<section id="voxels">
<h2><a href="/voxels">Voxel engine in godot-rust</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="/voxels/demo.mp4" controls height="320">video not supported :(</video>
<p>Demo of fast terrain generation</p>
</section>
<section id="ovr-utils">
<h2 class="title-link"><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>
</section>
<section id="blender">
<h2><a href="/blender">Blender creations</a></h2>
<p>I have been using Blender since around august 2020 on and off, and did a course in it 2021, which boosted my motivation a lot. I occasionally make art in it and of course use it for game jams.</p>
<img src="/blender/shork_wallpaper_preview.png" alt="">
</section>
<section id="voxel-raymarch">
<h2 class="title-link"><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="/projects/raymarched-voxels.png" alt="">
</section>
<section id="gol-wallpaper">
<h2><a href="https://gol.crispypin.cc/">Game of life wallpaper</a></h2>
<p>Source: <a href="https://github.com/CrispyPin/gol-wallpaper">https://github.com/CrispyPin/gol-wallpaper</a></p>
<p>See live here: <a href="https://gol.crispypin.cc/?cellsize=5&time=2&margin=0&populate=true">gol.crispypin.cc</a></p>
<img src="/projects/gol.png" alt="">
</section>
<section id="fractals">
<h2><a href="/fractals">Fractals</a></h2>
While I was learning web development and javascript I made a page with fractals. I thought it was interesting enough to keep here.
</section>
</main>
<include footer.html/>
</body>

View file

@ -1,68 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<include meta.html/>
<title>Projects</title>
</head>
<body>
<include header.html/>
<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>
<include footer.html/>
</body>
</html>

42
pages/voxels/index.html Normal file
View file

@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en">
<head>
<include meta.html/>
<title>Voxel engine</title>
</head>
<body>
<include header.html/>
<main>
<h1>Godot-Rust Voxel Engine</h1>
<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="demo.mp4" controls height="320">video not supported :(</video>
<p>Demo of fast terrain generation</p>
<video src="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="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="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="fig3.png" alt="">
<p>fig.3: Long strips of adjacent voxels can be merged into fewer, long quads.</p>
</main>
<include footer.html/>
</body>
</html>