5 ms·
Author here - as mentioned I was not expecting this to get posted but I am happy to answer any questions or elaborate further. For so long as I can stay awake
by gavanwoolery 11y ago
Author here - as mentioned I was not expecting this to get posted but I am happy to answer any questions or elaborate further. For so long as I can stay awake at least. :)
Some other shots worth looking at:
Some terrain I quickly whipped up based on this method, using Voxel Quest's actual generated map:
https://twitter.com/gavanw/status/589499986854838272 https://twitter.com/gavanw/status/589499986854838272
Screenshot of the test scene, with median filter:
https://twitter.com/gavanw/status/590895532509265920 https://twitter.com/gavanw/status/590895532509265920
Here is a short vid showing that it is in fact volumetric:
https://twitter.com/gavanw/status/590903499342229504 https://twitter.com/gavanw/status/590903499342229504
A few basic tricks I use:
A "macro" pass that ignores small, expensive to compute details.
A "micro" pass that avoids texture reads but produces complex algorithmic textures (texture reads will KILL your performance in many cases because of cache invalidation).
Supercover lines used for raymarching to precisely march through each cell.
http://lifc.univ-fcomte.fr/home/~ededu/projects/bresenham/ http://lifc.univ-fcomte.fr/home/~ededu/projects/bresenham/
- cordite 11y agoLooking forward to a full breakdown on this :)
- chrisseaton 11y agoCan you give an overview of the technique you are using for this project (in general, not just this demo) for someone with only undergraduate level graphics knowledge? Do you basically draw two triangles that fill the whole screen and then render everything using a shader? And how do you store that many voxels? A sparse data structure? When you have a large solid area do you simply say this entire area is filled so don't have to represent the voxels individually? I saw a video where you cut away sections of a building using a brush. Do you store the building voxels and then store the subtraction separately? If you had a world with thousands of buildings in it and cut away a little at each does that mean you can no longer share the shape of each building and space requirements blow up?
- gavanwoolery 11y ago> Do you basically draw two triangles that fill the whole screen and then render everything using a shader? Yes. It determines the ray origin and direction for each pixel, and casts out a ray from there with pretty standard ray tracing methods and a few additional tricks I mention above. > And how do you store that many voxels? A sparse data structure? When you have a large solid area do you simply say this entire area is filled so don't have to represent the voxels individually? No voxels anymore, although it can be fairly easily "voxelized" by clamping the step space of the rays to approximate towards the nearest cube. So, I guess I might have to change the name, or make it look more voxel-ly :) > I saw a video where you cut away sections of a building using a brush. Do you store the building voxels and then store the subtraction separately? If you had a world with thousands of buildings in it and cut away a little at each does that mean you can no longer share the shape of each building and space requirements blow up? You can store a million modifications in a few megabytes. I was never intending for it to allow that many though, but I will figure out what corner cases are worth addressing.
- tgb 11y agoAre you doing ray tracing or ray marching? You seem to mention both. Very neat stuff! I've been playing around with ray marching and it's awesome what can be done. I love finding mature projects to inspire me.
- gavanwoolery 11y agoPrimarily ray marching. I tend to switch / misuse the terms. I do perform a few calculations without marching though (ray intersection with some types of geometry).
- rsp1984 11y ago> No voxels anymore So how do you represent geometry then? Mesh? SDF? Space tetrahedralization?
- gavanwoolery 11y ago
- agentultra 11y agoI didn't realize they were called "supercover" lines... I use the same algorithm in my 2D raycast projection renderer. Very nice work! I'm super-impressed by every update you make.
- gavanwoolery 11y agoThanks! I had no idea what they were called until I googled around. :)
- aidenn0 11y agoDo you have any reflection demos yet?
- gavanwoolery 11y agoYes, here: https://twitter.com/gavanw/status/590906524177801216 https://twitter.com/gavanw/status/590906524177801216 But reflections are slow, so I am not using them for now - all lighting occurs in screenspace for now.
- gavanwoolery 11y agoOne other note is that there has been quite a bit of progress in other aspects, if you have missed the past updates: Sprite rendering, smooth movement, collision, and more: http://www.voxelquest.com/news/update-04-08-2015 http://www.voxelquest.com/news/update-04-08-2015 AI and some other stuff: http://www.voxelquest.com/news/update-03-11-2015 http://www.voxelquest.com/news/update-03-11-2015 Underwater: http://www.voxelquest.com/news/update-11292014 http://www.voxelquest.com/news/update-11292014 Full list of videos: http://www.voxelquest.com/videos.html http://www.voxelquest.com/videos.html