Closed brodieG closed 5 years ago
Glad you’re enjoying it! Yep, this is a bug related to constructing an orthonormal basis for the camera plane—it takes the cross product between the camera_up vector and the look direction vector to build the camera plane. When those two are parallel, the resulting cross product is zero so no plane is formed.
I’ll probably just end up throwing an error for these cases since the camera is poorly defined otherwise. An easy solution is just to slightly perturb the camera_up direction in an orthogonal direction (e.g. ‘camera_up = c(0, 1, 0.001)’) or do what you did and perturb the look direction.
Turns out I fixed this (in the sense of throwing an error) a couple weeks ago (see bff50a3e85c677edd65e00fbb2fdfb7e0f63444d) and just never pushed to master!
I'm continuing to have a blast playing with this package. Awesome (in the original sense) stuff.
One small seeming glitch I've run into. If you sight straight down the Y-axis (or whatever the
camera_up
axis is)rayrender
very slowly renders dark inky blackness. My completely uneducated guess is that there is a NaN or some such arising from an angle calculation relative to thecamera_up
vector.Created on 2019-11-05 by the reprex package (v0.3.0)
Obviously this has a trivial work-around so absolutely no rush in fixing this on my account.