For computational efficiency, is there a way to avoid the division step? It seems like this might take extra time, and perhaps we might be able to check intersection without having to fully divide this term. I'm thinking back to when we performed line tests to rasterize triangles and we ensured expensive operations such as division were removed from the process.
Carpetfizz
In the second equation, how can t be a scalar quantity? Is vector division element-wise?
Hsifnus
Perhaps, t in that case is calculated as the ratio involving x components of p', o, and d, where would therefore be scalar division.
hershg
@carpetfizz, note that normal vector goes away since its a unit vector that's axis aligned. Thus two of the 3 dimensions also get killed from the simplification of an axis-aligned normal vector.
In this case, y and z components of normal vector will be 0 since N = x-unit-vector -> only dealing w/ x components -> only 2 scalar operations on scalar quantities -> t is scalar :)
moridin22
@ryanpmeyer I think the one thing you would have to be careful of there is that you do need to compute the quantity <d,N> in order to make sure that it isn't zero (and therefore that t isn't infinity).
avinashnandakumar
The second equation on the bottom, we would still have to repeat that process 4 times in order for us to find the exact two points of intersections of 4 lines correct? To be able to take the maxs' of the mins and the mins of the maxs' of the potential t-values right?
nahman
I assume we need special error handling if dx = 0? I guess
you would just set the range to -inf, inf, in that case
MingweiSamuel
@ryanpmeyer you could avoid the division step by replacing it with multiplication. In the previous slide, we only care about the relative values of the tx, ty, tz (min & max) so for example dividing ty by B would be equivalent to multiplying tx and tz by B.. I doubt this would be much faster if it was faster at all... we can see
xiaoyankang
So in order to get scalar t, we need to divide x, y, z of vector (p'-o) by corresponding x, y, z of vector d, is that right?
killawhale2
Yes, that is correct. Although this is mathematically equivalent to taking the dot product of the vectors, from a computational viewpoint, doing them separately is faster.
xiaoyankang
Sorry I think my above comment is wrong. The division of x, y and z respectively should give the same scalar t?
For computational efficiency, is there a way to avoid the division step? It seems like this might take extra time, and perhaps we might be able to check intersection without having to fully divide this term. I'm thinking back to when we performed line tests to rasterize triangles and we ensured expensive operations such as division were removed from the process.
In the second equation, how can t be a scalar quantity? Is vector division element-wise?
Perhaps, t in that case is calculated as the ratio involving x components of p', o, and d, where would therefore be scalar division.
@carpetfizz, note that normal vector goes away since its a unit vector that's axis aligned. Thus two of the 3 dimensions also get killed from the simplification of an axis-aligned normal vector.
In this case, y and z components of normal vector will be 0 since N = x-unit-vector -> only dealing w/ x components -> only 2 scalar operations on scalar quantities -> t is scalar :)
@ryanpmeyer I think the one thing you would have to be careful of there is that you do need to compute the quantity <d,N> in order to make sure that it isn't zero (and therefore that t isn't infinity).
The second equation on the bottom, we would still have to repeat that process 4 times in order for us to find the exact two points of intersections of 4 lines correct? To be able to take the maxs' of the mins and the mins of the maxs' of the potential t-values right?
I assume we need special error handling if dx = 0? I guess you would just set the range to -inf, inf, in that case
@ryanpmeyer you could avoid the division step by replacing it with multiplication. In the previous slide, we only care about the relative values of the tx, ty, tz (min & max) so for example dividing ty by B would be equivalent to multiplying tx and tz by B.. I doubt this would be much faster if it was faster at all... we can see
So in order to get scalar t, we need to divide x, y, z of vector (p'-o) by corresponding x, y, z of vector d, is that right?
Yes, that is correct. Although this is mathematically equivalent to taking the dot product of the vectors, from a computational viewpoint, doing them separately is faster.
Sorry I think my above comment is wrong. The division of x, y and z respectively should give the same scalar t?
they would give three different values of t.