Recursive Ray Traversal Algorithm - Traverse k-d Tree -


i have chosen stack based traversal algorithm (recursive ray traversal algorithm), , having little trouble understanding it.

here understand.

i need find point ray enters voxel (then calculate distance ray origin , point) exits (then calculate distance between ray origin , point), distance between ray origin , plane (in papers saw formula:

(splitpoint - rayorigin[currentaxle]) / rayorientation[currentaxle] 

my ray orientation (0, 0, -1) , in cases dividing 0 (because x = 0 , y = 0). how can be?

and in init of algorithm, ray origin in main voxel, how distance ray enters voxel?

do understand correctly? can explain?

it's book "physically based rendering theory implementation".

enter image description here 2 cases both children of node don’t need processed because ray doesn’t overlap them.

(a) top ray intersects splitting plane beyond ray’s t_max position , doesn’t enter far child. bottom ray facing away splitting plane, indicated negative t_split value.

(b) ray intersects plane before ray’s t_min value, indicating near child doesn’t need processing.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -