Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

I've been writing some code for efficient traversal in voxel spaces recently. Here's a visual comparison between the Bresenham line algorithm, and the Amanatides-Woo "Fast Voxel Traversal Algorithm". #gamedev #solodev #indiedev #customengine

25,850 görüntüleme • 1 yıl önce •via X (Twitter)

13 Yorum

Meetem profil fotoğrafı
Meetem1 yıl önce

At first I used it too, but unfortunately it’s too slow for big volumes and too rigid / expensive when it comes to skipping larger steps (like skipping 128/64/32 voxels etc), so only left it for small chunks where it works perfectly, and higher level is a traced tree

Topotoy Labs profil fotoğrafı
Topotoy Labs1 yıl önce

Good point. Indeed, per-cell traversal is an insufficient approach for sparse/big volumes. But I will address that with a multi-resolution grid and a lo-hi precalculation of the contents of each cell.

Meetem profil fotoğrafı
Meetem1 yıl önce

If you have an option to make mipmaps like Teardown did then HDDA can make sense, yes

Maurog profil fotoğrafı
Maurog1 yıl önce

I dunno what you're building there, but in any case, this might help 🤔

Topotoy Labs profil fotoğrafı
Topotoy Labs1 yıl önce

Thanks! This is part of a larger system I am building for terrain rendering.

Xiltsch profil fotoğrafı
Xiltsch1 yıl önce

Is there any difference between Amanatides-Woo and the DDA(Digital Differential Analyzer) Algorithm?

Topotoy Labs profil fotoğrafı
Topotoy Labs1 yıl önce

Somebody correct me if I'm wrong. My understanding is that DDA is any algorithm that incrementally steps through a line in a grid. Bresenham is a 2D, integer-only version. Amanatides–Woo traverses the 2D/3D cells pierced by the line segment between two floating-point endpoints.

Xiltsch profil fotoğrafı
Xiltsch1 yıl önce

I looked the termup and found a paper titled "A Fast Voxel Traversal Algorithm for Ray Tracing" it appears to be a variant of DDA

Floorislava profil fotoğrafı
Floorislava1 yıl önce

I was messing around doing a line of sight/lighting map and came up with a worse way of doing this but I thought it was interesting. Find the normal of the ray cast. Each voxel step, add the normal which is only 2 floating point adds with no branching.

AlbedoLux profil fotoğrafı
AlbedoLux1 yıl önce

The Bresenham line algorithm is so clean. Understanding how it works teaches you so much about efficiency

ShiroJR profil fotoğrafı
ShiroJR1 yıl önce

Oh i had the pleasure of doing 3D DDA recently too. Nothing fancy tho, just the basics...

Yuri Karabatov profil fotoğrafı
Yuri Karabatov1 yıl önce

Looks like line rasterizing 😅

Topotoy Labs profil fotoğrafı
Topotoy Labs1 yıl önce

That's what it is!

Benzer Videolar