Fire and Torches (more particles) | Voxel Dev Showcase
Вставка
- Опубліковано 27 бер 2024
- With the new particle rendering, I can add all kinds of effects that I like, such as this fire, which even has added smoke particles with a completely different material.
I am now copying the voxel data back to the CPU when there are chunk updates, so the CPU has a copy of the voxels. I'm doing this because the fully GPU-driven codebase is difficult to maintain, and it negatively impacts iteration times a lot. This has allowed me to put the player back on the CPU as well, though, which means I'm now able to do Player-voxel collision again!
With the voxel data on the CPU, I now want to experiment with new rendering acceleration structures and only upload the surface-voxels for rendering. This will reduce the strain on the GPU, and hopefully much faster rendering (especially global illumination rays!)
The Public Codebase:
github.com/GabeRundlett/gvox_...
If you want to chat with other community members and me, join my Discord!
/ discord
My website:
www.gaberundlett.com
GPU: RTX 3070 (8GB VRAM)
CPU: AMD Ryzen 7 5800x (8 core/16 thread)
RAM: 64GB 2667 MHz DDR4 - Наука та технологія
I know a John Lin when I see one
do you know what happened to john lin? I texted him on tw a couple of times and he never responded. I'm wondering why he is lost and what he doing
@@--Emirhan-- He's just busy with something, since he liked posts in X. But it’s a pity that he moved away from the idea of microvoxels =(
Yeah he's still alive
@@--Emirhan-- I have no clue, sorry, I wish I did! I started my voxel journey after he had already disappeared
@@GabeRundlett good to see someone pick up the torch.
you are my new voxel god. gabe literally about to overthrow john lin from the voxel throne.
I think a diffuse/scattered blue light from the whole sky mixed with the more direct yellow sunlight would help soften the harshness of the sun as you transition from sunlit to shaded to caves. Awesome stuff!
The issue is that there aren't soft shadows in this "per-voxel normals" mode. However, there already is diffuse ambient lighting, as there is global illumination in my voxel engine. The sun is just so much brighter than the sky in real life, and that makes it difficult to display nicely on a non--HDR display. I tonemap with agx, but I know it still is so contrast-y
The wind, the reflections, the bloom, the lighting, etc., are all looking pretty incredible, well done.
Thank you! No bloom yet, but I really want it! You might be just seeing it from the volumetric scattered atmosphere. But I did cheat a bit and put bloom in the thumbnail 😅
@@GabeRundlettIt still looks incredible, stay motivated.
you are actually john lin, that's amazing !!! i really dig the look of the normals, it gives off very retro vibes
Yeah love the retro vibe
do you know what happened to john lin? I texted him on tw a couple of times and he never responded. I'm wondering why he is lost and what he doing
@@--Emirhan-- CIA nabbed him. LOL
@@judgsmith It can be real btw xd
@@--Emirhan--i have an ever so tiny bit of insider knowledge that i was asked not to share that can make me think you shouldn't really worry about him, he even made a new post on his blog recently so he definitely isn't dead
Oh hell yeah, I love this style of voxel art.
I _love_ the current voxel resolution, it has a lot of character (and looks beautiful)
Oh pretty cool! Relaxing music in the background would fit so well in the video, like Minecraft music or something similar. 😊
Not only technically impressive, but also genuinely beautiful from an artistic perspective.
Thank you! I try my best. I'm not super happy with the trees still, but I just need to spend a little more time on them
Looking amazing! If you havent already considered it, for the trees I would like to recommend using L-systems (or a parameter or probability based generalisation of them) to generate them procedurally. They can look really good and have good customizability for different tree types. Alternatively graph-grammar based systems for all sorts of procedural generation.
Also a quick question: does the voxel implementation use octrees or sparse directed acyclic graphs? With the sheer amount of voxels its definitely not the naive implementation.
I don't know anything about tree gen, and I've never heard of L systems. I'll have to look into it! Do you have any good resources? Not using an octree, nor SVDAG. The voxels are stored as a 1-level brickmap with lossless palette compression for each node. Perf is not amazing, and since last weekend I've been completely overhauling the rendering to be hardware RT!
@@GabeRundlett looking forward to seeing the progress!
As for resources, if you are completely new I recommend 3 steps: first is watching some UA-cam videos on L-systems. I think SimonDev has done a decent video on it. Second would be reading the Wikipedia article on it, it demonstrates the idea and different applications and extensions nicely. Third are some research papers on the topic: these are also quite nice even for non-math fans since the math involved in L-systems is pretty minimal. Here are a couple I think are nice (all easily and freely available): "Simulate forest trees by integrating L-system and
3D CAD files", "Real-time 3D Plant Structure Modeling by L-System with Actual
Measurement Parameters", "Procedural Forest Generation with L-System
Instancing", "Integration of fuzzy system into Genetic L-System Programming based plant
modeling environment with Mathematica".
The reason I like this system so much is the versatility: you can generate anything from apple trees to ferns to weeping willows to baobab trees to palm trees with it given the right rules (also their root systems if you want to). Also, the way they are constructed allows you to easily access different growth stages for a given tree. That means a fun thing you can do is:
1. Define the rules for 1 tree species.
2. Generate, say, 64 different tree variants of that species (and automatically their growth stages).
3. Generate a basic "height" map (perlin noise or smth similar) for your terrain, place the generated tree variants with density and growth stage according to that "height" map.
Now you have forests with dense cores of mature trees and gradually thinning borders of younger and smaller trees. Also, foliage like bushes and ferns can naturally be generated with the same technique, allowing you to also fill those in as well to make the environment feel more real.
If you want the best results, I recommend making the system both parametric and stochastic. Parametric gives you way more freedom in the plant design and stochastic makes them even more organic. Luckily both extensions are easily compatible.
@@GabeRundlett Also, I know this is pretty late, but another gem is "Procedural Tree Modeling with Guiding Vectors". Doesn't need nearly as much fiddling with parameters to get realistic tree shapes and has better global control of the tree shape.
wow, you even made it open source!!!
this is beyond amazing, it would be even greater if the light intensity danced at random like in real life
Maybe give the torch particles a bit of variation in yellow/redness when they get spawned. That may give it a bit more of a realistic look.
When your work is one day widely recognized (which it will definitely), remember us.
this is witness, he will become dollar billioner if he develops realism game on voxels
Another day - another step closer to Lin!
looks really good and better in some ways!
@@aspidinton Thanks so much!
do you know what happened to john lin? I texted him on tw a couple of times and he never responded. I'm wondering why he is lost and what he doing
@@--Emirhan-- he's working in shadows i guess, but still working on the game probably. Last time he replied someone on tw was in January. Also he replied to my comment in september 2023 on his old account with lots of unlisted videos with :0. There's a lot of links to unlisted videos on voxel game dev dc server.
@@aspidinton well it's interesting. is he active in dc server? I was thinking somebody kidnap him for a while :d
Wow this is clearly an amazing engine. This project is improving so fast
Well done! Your project is becoming outstanding
Thank you Jaime!
This is actually the best voxel engine I have seen to date. Amazing work
Wow! This is really spectacular! The light looks so alive!
You're doing great. I'm wondering what you'll be do next months
So beautiful! great job
This is impressive, well done!
This looks really good. imagine carving out ground or building a house in this. imagine if this was the direction Minecraft took. this could be a competitor if you do it right.
Looks so good. I feel like it could look so good with brighter ambient lighting relative to the sun. It looks so crispy and and nice tho
Thanks! The ambient light is physically based, so the way to make it bounce more would be with a more reflective material (as in a brighter albedo, such as white) I want to show off the GI in a wintery scene because there the snow will bounce a lot of light!
That’s insane, the only questions I got is, is it vulkan with draw indirect since gpu driven? And which tutorials did you use to integrate draw indirect?
Yes, I'm using GPU-driven indirect draws for the particles. Sascha Willems' Vulkan samples are really useful.
@@GabeRundlett thank you, keep it up!!
it looks incredibly unique. I love it
It looks so good
Will you be able to scatter the light? And what are you going to do with your engine?
Do you mean like god-rays? Yes, absolutely. I don't know what I'm going to do with my engine honestly. I want an art-program mixed with a sand-box. This is what I find most fun.
This is insanely impressive, incredible work!! Is it available to mess with in the github repo? I would love to try and wrap my brain around how you can manage to render particles that effectively...
You absolutely can already play with this on the GitHub. I didn't push the fire yet specifically, but the fire is basically just a copy+paste of the other particle effects (most similar to the falling leaves)
@@GabeRundlett:O
Gorgeous.
Super impressive stuff! How large is the world?
At the moment, it's limited to 2048^3 voxels, due to the amount of memory it consumes. I'm working on making larger worlds possible since last week!
@@GabeRundlett thank you for responding, I'm looking forward to it!
damn, looking impressive!
So impressive
I can't fathom how are you able to render so much voxels (as I saw in previous videos) with no lags spikes. I was thinking about that you could add later tools that dig in different shapes and sizes in the ground (not just spheres).
Also I have a question, do you plan to add hardness levels on different types of terrain?
You absolutely can already dig with any shape defined by an SDF - it's exactly the same as placing voxels! All you need to do is define *where* to place AIR as opposed to placing fire or wood.
@@GabeRundlett That's great. Do you already have a direction on how will you make this game? Like story based or something like survival?
@@danielaguiar7891he plans on making more of an art soft at the moment, but in the grand scheme of things, maybe in 7 or 8 years it'll end up being a game
@@dottedboxguy alright, fair enough.
Looks great! This is probably explained in another video which I haven't gotten to yet, but what data structure are you using to store your voxels?
I have a similar question but for the particles. I'm mostly curious to know if they're handled completely differently from regular voxels (different data structure etc)
Currently, it's a single level brickmap with losslessly palette compressed bricks (8x8x8 voxels)
@@niuagethey completely are, they're not even rendered the same way(they're raster/splat instead of raytraced)
AMAZIIING
Wow, this is incredible. VR support in the future? This engine would make some sick VR cave exploration if you could also implement rigidbodies for rocks and such.
VR would be cool, but I'm not terribly interested. As the project is open source, though, it may be simple for someone else to add it themselves and make a PR!
my hero
question: have you made it so different things have different hardness? so you have tools in game for removing stuff. like a shovel or an axe? or are those not implemented yet?
not implemented at all
This is amazing. It looks like Minecraft it was developed nowadays.
Hey! I've been loving these videos, as it's been a dream of mine to program a voxel engine for the past 10 years or so. I tried once ~7 years ago with C++ and OpenGL, but gave up due to lack of learning resources (and mindset). Recently, however, I've started building a voxel prototype inside of Godot. My question, perhaps an ignorant one, is would a similar result to what you've been working on be achievable with Godot in terms of scale and performance? I feel as though I'm missing a critical piece of information as to why all of these voxel devlogs I've seen recently are all using a custom built engine. I'm aware of voxel projects, and even a voxel library built for Godot, but those seem like they're just trying to be a "good enough" solution (educational minecraft clone), not one that breaks new ground and truly knocks people's socks off, like what you've been doing with this channel.
This is a good question. The reason I personally am not using an existing engine is because it's actually easier for me. I struggle to learn how to use existing engines like Unreal, Unity, or Godot. That being said, I think it absolutely could be possible to do something like this within Godot. I know Godot has support for C# and that may suffice, but you may need to use something like the GDExtension API to get that native perf of a compiled language. Most of the important parts of my engine are in shaders, which should hopefully be possible in Godot
@@GabeRundlett Thanks for clarifying! I chose Godot because it seemed like a set of tools that wasn't trying to do and be everything, unlike Unreal engine, which is an unwieldy beast with canyons of features I'd probably never touch and hate to learn. I'm happier building all of my own tools too, though, using language and structure that makes sense to me, which Godot mostly forces me to do due to how simple it is by comparison to the other big engines. Learning shaders is my next move as I've hit that initial performance brick wall with chunk loading taking ~300ms per chunk. Always on the lookout for more of your videos, and if you're ever inclined to do so, I'd love to see a video discussing the low-level building blocks (ha) of what goes into making something like this!
Maybe yoi can vary how wiggly the grass is depending of placement.
So, how do you render each voxel? Is it a shader like a vertex shader for less GPU usage, or is it generated from collision faces? Also how did you "make" the world (I say make as in get it to generate the way it did/does) I am working on an infinite survival game, which is pretty boring due to flatland. (low poly) but I love the style of this voxel engine. Also soft lighting looks very good.
The voxels are raytraced in compute. The moving "voxels" are all particle systems that are spawned during world-gen. So for example, each grass blade is spawned by the world-gen and individually simulated, and spawns a few cube particles to render itself. The particles are rasterized, and so I just draw the necessary triangles to make a cube. However, rasterizing triangles is really slow when triangles are small, so at a distance (when the voxel would be smaller than 5x5 pixels) the particle is rendered as just a square, and then turned into a cube via the fragment shader. This square to cube technique is colloquially called "voxel splatting" and is described in this paper here: jcgt.org/published/0007/03/04/paper-lowres.pdf
@@GabeRundlett I have heard of voxel splatting before, thank you for the information as well. I usually watch some videos on voxels, and voxel simulations from time to time. But since you raytrace the voxels you can apply the collision to the faces am I right? So is that how the player can walk on them? Also thank you for the link, I will read up on it.
I just realized from the paper, you probably use the particle collision detection as it cites.
@@Mr.EventHorizon I do some very simple collision testing, and the player does not collide with the particles, as the particles are only on the GPU right now. Particles can collide with the voxels though, because I just ray-trace the voxels to get collisions.
@@GabeRundlett Are the particles also rendered by ray tracing? How do you link the raytraced voxel scene to the particle scene (at a very high level)?
prettyyyyyyy
How can we combine your shaders with Ethan Gore's supermassive world?
Larger view distances coming soon!
@@GabeRundlett 😯😯😯😯😯😯😯😯
What graphics api and version? Assuming the code isnt open source. also, true voxels or triangles?
You should have just checked the description, it is open source! Vulkan 1.3 is required. "True" voxels, though the particles are triangles or splats depending on distance. I don't really care about the distinction between "true vs true", I just do the thing that is the simplest/fastest to render. I raytrace the rest in compute shaders.
i see now, its gvox. I would love to port this library to homebrew via devkitpro.
@@michaelmueller5211 I specifically mean gvox engine... I did a bad job with naming, as I also have a library called gvox. I have no clue what homebrew is
@@GabeRundlett homebrew is home made games for jail broken Nintendo consoles and nintendo emulators such as dolphin. I'm currently working on a voxel game for the Wii but I need to optimize it. Glad I found you!
Are the grass voxels a part of the brickmap?
They are not
@@GabeRundlett Gotcha, makes sense
Now do a small explosion that takes out a small chunk and sprays 1 voxel embers around.
How does it look like if the voxels are smaller?
Not gonna lie, but I do kinda want to see all the grass burn 🫢
John Lin? Is that you?
I wish
do you know what happened to john lin? I texted him on tw a couple of times and he never responded. I'm wondering why he is lost and what he doing
@@--Emirhan-- I have no clue. Unfortunately, I started doing voxels after he had already disappeared
@@GabeRundlett I see. Thanks
@@--Emirhan-- I’m pretty sure his “Voxel engine” was just a prerendered animation, so once he got popular he didn’t know what to do and left.
heyy.. this looks familiar :p
I definitely was heavily inspired by John Lin if that's what you're referencing!
Could you allow links in comments? Thanks.
I couldn't find a setting anywhere to allow them. As an alternative, you can join my discord to send links, which is linked in the description!
@@GabeRundlett Studio > Settings > Community > uncheck Block links
@@prltqdf9 hmm. weird. it was already unchecked 🤔
I’m the only one who thinks that trees look strange compared to the overall visual appearance.
You're not the only one. I spent only maybe 30 minutes designing them, so they're nowhere near final. I've had a few ideas on how to make them prettier, but that's part of some larger overarching changes in the engine which may take weeks. Stay tuned!
For how many billions is Microsoft gonna buy this one?
🙏