Zylann / godot_voxel

Voxel module for Godot Engine
MIT License
2.63k stars 246 forks source link

A Ray-Box Intersection Algorithm and Efficient Dynamic Voxel Rendering #47

Open blockspacer opened 5 years ago

blockspacer commented 5 years ago

Maybe useful: Very fast Ray-Box Intersection Algorithm

it is suitable for fully dynamic scenes in which every voxel potentially changes every frame. These improvements can enable a dramatic increase in dynamism, view distance, and scene density for visualization applications and voxel games such as LEGO® Worlds and Minecraft.

'A Ray-Box Intersection Algorithm and Efficient Dynamic Voxel' http://www.jcgt.org/published/0007/03/04/ http://www.jcgt.org/published/0007/03/04/supplement.zip http://www.jcgt.org/published/0007/03/04/paper.pdf

A hybrid voxel rendering engine using 'A Ray-Box Intersection Algorithm and Efficient Dynamic Voxel' https://github.com/kosshishub/voxplat/

See also: https://github.com/kosshishub/voxplat/blob/019f073a7d2387662e61ffbcc837cbb2d619f4e2/README.md https://github.com/kosshishub/voxplat/blob/244070fd84bdc5468f4df4a62c11638836329442/resources/splat.frag.glsl https://kosshi.net/projects.html https://medium.com/p/41125138b525/responses/show https://github.com/guillaumechereau/goxel/blob/42a7cbc638a0980b8574462a1702d533698cbf85/ext_src/yocto/yocto_bvh.h#L351 https://github.com/aras-p/ToyMeshPathTracer/blob/e74b743256ad11c5eb4be92a9dfe2badd6cb3d7d/source/scene.cpp#L37 https://medium.com/@bromanz/another-view-on-the-classic-ray-aabb-intersection-algorithm-for-bvh-traversal-41125138b525 https://forum.minetest.net/viewtopic.php?f=7&t=20835 https://news.ycombinator.com/item?id=18033635 https://github.com/simcop2387/voxelquest/blob/c3cddb3bd3cff21712a5e4b4841b344cd1727092/src/glsl/PointShader.c#L127 https://www.indiedb.com/games/voxel-quest/news/voxel-quest-how-does-it-work https://www.reddit.com/r/gamedev/comments/22gbbc/how_the_tech_behind_voxel_quest_works/ https://www.moddb.com/news/voxel-quest-how-does-it-work https://www.starandserpent.com/blog/a-ray-box-intersection-algorithm-and-efficient-dynamic-voxel-rendering/ https://github.com/meshula/awesome-voxel

Zylann commented 5 years ago

I'm not sure this applies to a Godot implementation... remember this module can't litterally replace Godot's renderer, it has to work within its limitations.

Maybe doable with shaders, but then everything else in Godot becomes somewhat unusable (non-voxel entities, shadow mapping and all the rest). It's almost like this would need to be its own engine to be used at full potential. That voxplat looks impressive though, could be worth getting a test of this running in Godot, probably doesn't need this module given it's all shaders? One area it could be definitely useful is for far-away terrain, like said in the repo.