10 ms·
The Perfect Voxel Engine
- junon 5y agoFor reference, this is John Lin who posts semi-frequent devlogs[0] of his voxel engine progress - an engine that is, in my opinion, one of the best voxel engines in existence rivaled only by Dennis Gustafsson's "Teardown" voxel engine. [0] https://www.youtube.com/watch?v=8ptH79R53c0 https://www.youtube.com/watch?v=8ptH79R53c0
- nynx 5y agoOh wow, I’ve seen that video and couldn’t find any information about it!
- shultays 5y agoWow, very impressive. Made me remember this, which is one of favorites: http://www.advsys.net/ken/voxlap.htm http://www.advsys.net/ken/voxlap.htm It has destructible scenes, physics and even some gameplay. Much smaller & simpler scenes and not as good looking though. But pretty good for a 15 years old project!
- aasasd 5y agoIs it the one that started with ‘Why don't games simulate every blade of grass? Here I've single-handedly made an engine for that.’ I remember seeing that some a couple years ago, but IIRC it was going for more life-like look than this vid. Edit: found it—“voxel game StoneQuest microgeometry” https://www.youtube.com/watch?v=lXm5JWys55o https://www.youtube.com/watch?v=lXm5JWys55o Now those are voxels I can get behind. Also vaguely think I've heard the name semi-recently.
- junon 5y agoThe leafs on the ground are objects, according to the creator's comments. It appears just the terrain is voxels.
- convolvatron 5y agowhy the love for voxels? it seems like you get a much smoother model for the same representational cost with triangles on the surface. (I used to do scientific visualization and have written voxel renderers...it just never occurred to me that someone would want to do that for general purpose graphics)
- ALittleLight 5y agoWithout knowing the technical terms or details, I think of voxels as the things in Minecraft. A voxel game world, to me, is one where I could destroy or place any random voxel I want anywhere in the game world and have the game world smoothly and faithfully incorporate my decision. If voxels just mean the smallest rendering primitive is a cube instead of a triangle then I agree it seems just like an artistic preference.
- namrog84 5y agoWhile voxels are often represented in cubes like minecraft, they don't have to be. A voxel is just a data point in 3d space. It can be rendered or visualized many different ways including smooth curves or many other things. While blocky cubes are common that is not all they are or can do.
- beebeepka 5y agoFor the longest time I thought the deal with voxels is that they are 3d objects in 3d space. I need to do some reading.
- convolvatron 5y agoyeah, actually i was going to ask in my earlier message - there must be some form of subdivision-surface-like smoothing model? you can certainly also do a gaussian with alpha if you dont mind drawing jello...are there other approaches you know of for direct rendering?
- foota 5y ago
- wokwokwok 5y agoI have a lot of respect for Johns work, but this post is mostly fluff. > So as you can see, conversion operators aren’t just for rearranging data; they’re more like black boxes. Input data of a specific format and let the engine figure out and execute the link to the desired output format. It’s such a simple concept that’s more general than volume conversion, and yet it’s managed to solve our problems. Well, fair, but this has nothing to do with rendering voxels, or managing the n^3 problem of memory required for voxels. All we get is the suggestion that spare trees aren’t ideal runtime structures, and a whole lot of talk about how it’s not ideal to structure your code around one specific implementation because it makes refactoring and trying new things hard. Cool, I get it, good point… but I don’t think it’s particularly novel to have the idea of an engine built on a black box of data transformers. …unless you’re prepared to go into the detail of what you’re transforming the data into that’s useful, which we got about 4 sentences of.
- djmips 5y agoIt's valuable to bring those concepts to the fore. Easy to say it's not novel but what is? But anyway this was 5 minutes of your time.
- wokwokwok 5y ago> We’ve done a lot of talking about what the problems are and not a whole lot of proactive thinking to address them. … > We’ve observed the main problems with voxel engines being how our data is laid out and processed, and what happens when it’s not optimal for a given job. … > Now it’s time to apply these ideas to voxels. As I previously mentioned, the answer is simply to use whatever format is best for the job. > But when working with volumes, it’s not that easy. Even with different formats, we can’t ever just store raw data for the entire world because of memory usage. > Conversely, we can’t always work with compressed data because compression takes place after the raw data has been filled out. … > By building systems around formats that can be swapped out at run time or exchanged/changed in the future, your codebase is safe from painful refactors. … > The very thing we started out discussing and are going to close on. How do we take a dynamic voxel format with dynamic attributes and expect to throw it at the GPU? > The solution here will have to wait until the *next post* where I take a deep dive into the rendering setup (I guess I accidentally lied on the last post). I’ll briefly… I mean, I’ve obviously cherry picked quotes here, but you decide if I’m being unfair. We enumerated a problem; it’s a well known problem. Perhaps, there is a novel solution to the problem; there certainly seems to be the suggestion there is; maybe it’s not novel… but the solution is not shown, so who knows? Does it need to be novel? Dunno, but it’s a bit rubbish to say you have an interesting solution to a problem, and your solution is “generic data processing at runtime” and give no other details. In my opinion.
- aasasd 5y agoI'm not familiar with modern stuff like Teardown, but the best voxels I've seen are in Vangers from 1998: https://www.youtube.com/watch?v=P9R7QJ5Sh1o https://www.youtube.com/watch?v=P9R7QJ5Sh1o (specifically the outside spaces). The game is weird in the way that quite a bunch of people on HN should appreciate. I didn't give this much thought in the day, when I was young and used to 80s/90s full-on craziness, but now I realize it's genuinely hard to construct a world that is completely foreign while simultaneously also homely and warm and fuzzy.
- aasasd 5y agoUpdate: scratch that, StoneQuest is the best so far: https://www.youtube.com/watch?v=lXm5JWys55o https://www.youtube.com/watch?v=lXm5JWys55o
- Andrew_nenakhov 5y agoMade me remember Vangers [1], an insane trippy game from 1998. Originally in Russian, it featured a very different world with a very deformed imagery and language. I don't know how this feeling survived the translation into English. It's main game mode featured racing on (hostile) surface of various planets, which utilizes a voxel engine, which gave it a very distinct look. [1]: https://en.m.wikipedia.org/wiki/Vangers https://en.m.wikipedia.org/wiki/Vangers
- orbital223 5y agoYoutuber MandaloreGaming has a really in depth review of the game for anyone who wants to check out what it looks like: https://www.youtube.com/watch?v=P9R7QJ5Sh1o https://www.youtube.com/watch?v=P9R7QJ5Sh1o
- IAmLiterallyAB 5y agoFor a detailed look at picking a good data structure for voxel engines, I'd recommend this fantastic article https://0fps.net/2012/01/14/an-analysis-of-minecraft-like-engines/ https://0fps.net/2012/01/14/an-analysis-of-minecraft-like-en...
- schaefer 5y ago/sigh. The page has margins a mile wide, but chops the code off at about column 40.
- KronisLV 5y agoMy first exposure to working with voxels was in jMonkeyEngine (https://jmonkeyengine.org/ https://jmonkeyengine.org/) with a few plugins, when i wanted to display the sort of representation of a world that you see in games like Minecraft (the closest i had previously done was using particle systems for visualizing point cloud data). Almost immediately, it became clear that any sort of a larger world needs a lot of optimizations done to work properly, so there were quite a few algorithms to be grokked. Personally, i found quite a few posts talking about things like meshing: - https://0fps.net/2012/06/30/meshing-in-a-minecraft-game/ - https://blackflux.wordpress.com/2014/02/23/meshing-in-voxel-engines-part-1/ - https://blackflux.wordpress.com/2014/03/01/meshing-in-voxel-engines-part-2/ - https://blackflux.wordpress.com/2014/03/02/meshing-in-voxel-engines-part-3/ And also even a few about things like real time occlusion culling, which doesn't get talked about a lot: - https://procworld.blogspot.com/2015/08/voxel-occlusion.html Nowadays, i'd advise that people look at the more established projects/engines out there if they just want to get something working, though it can also definitely be interesting to try getting something working all by yourself. Also, in regards to pretty interesting voxel engines out there, i do believe that Ken Silverman's Voxlap engine deserves a mention: http://advsys.net/ken/voxlap.htm http://advsys.net/ken/voxlap.htm It was written around 20 years ago, yet remains an interesting project to this day - its performance is impressive, and IIRC it achieves this in a software rendering mode, something that's surprising even today. It was actually the basis for the Ace of Spades game, the modern (free) version of which is known as OpenSpades: http://openspades.yvt.jp/ http://openspades.yvt.jp/ (though i think that the project now uses a different renderer maybe, it's been a while).
- CodeGlitch 5y agoHey I was a developer on Ace of Spades when it was taken over by Jagex. Fun fact: it was written in python, which meant the hackers had an easy time reversing the net code, meaning cheating basically ruined the game. The game did have some fun aspects to it, especially the zombie mode (every game needed a zombie mode for some reason). Bad management and bad technical choices destroyed the game. For example a mobile version was developed, no idea why anyone would think that would work...