SketchpunkLabs | WebGL2 : 074 : Voxel Ray Intersection @SketchpunkLabs | Uploaded 6 years ago | Updated 2 days ago
Today we learn how to use a ray to find all the voxels that a ray intersects within a voxel chunk. We use the popular "Fast Voxel Traversal" algorithm to determine all the voxels that the ray traverses. We then add to it by also getting the intersection points and normal direction for each voxel. When all said and done, we can use this to select any voxel in the chunk to do whatever we'd like.
======================================================
Links of Interest
http://www.cse.chalmers.se/edu/year/2010/course/TDA361/grid.pdf
http://www.flipcode.com/archives/Raytracing_Topics_Techniques-Part_4_Spatial_Subdivisions.shtml
======================================================
GitHub :: https://github.com/sketchpunk/FunWithWebGL2
Patreon :: https://www.patreon.com/sketchpunk
Twitter :: https://twitter.com/SketchpunkLabs
Tumblr :: http://sketchpunklabs.tumblr.com/
Trello :: https://trello.com/b/zcTUPpFy/fun-with-webgl-20
Today we learn how to use a ray to find all the voxels that a ray intersects within a voxel chunk. We use the popular "Fast Voxel Traversal" algorithm to determine all the voxels that the ray traverses. We then add to it by also getting the intersection points and normal direction for each voxel. When all said and done, we can use this to select any voxel in the chunk to do whatever we'd like.
======================================================
Links of Interest
http://www.cse.chalmers.se/edu/year/2010/course/TDA361/grid.pdf
http://www.flipcode.com/archives/Raytracing_Topics_Techniques-Part_4_Spatial_Subdivisions.shtml
======================================================
GitHub :: https://github.com/sketchpunk/FunWithWebGL2
Patreon :: https://www.patreon.com/sketchpunk
Twitter :: https://twitter.com/SketchpunkLabs
Tumblr :: http://sketchpunklabs.tumblr.com/
Trello :: https://trello.com/b/zcTUPpFy/fun-with-webgl-20