Following on from yesterday's post, I've managed to implement what I call the frustrum squeeze into The Dark Room. Here's how it works. The engine is drawing a kind of virtual camera projection set. This is part of the previsualiser tool, where you can view clips in a kind of 3D frame space, kind of like this:
This 3D frame space currently looks like a square space (see the green outlines). But, when a camera takes an image, like your eye, it's actually seeing things from a pyramid-like projection view (field of view). Something like this:
Interesting info: the human eye can see up to 200 degrees. But because of where it's placed, you won't get that full field of view. Parts of your face like your nose and eyebrow ridge get in the way. But it's not much use. You can't make out any meaningful detail, just that you know something is there. Back in the days of being on the African savanna's, it was probably more useful, as although you can't make out much in the way of detail, you can pickup movement.
Back to the topic. I can now make adjustments to the frame space (the virtual frame's field of view), by squeezing parts of the clips depending on where they sit in the frame's depth. Like this:
This functionality can be controlled by the user, including how much of a squeeze is applied. The above image has something around 90% squeeze. It won't be used for final rendering. It's just a perspective viewport aide.
Next step is to work on removing parts of the 3D render clip that are black. That is, to apply some sort of alpha matte to them. This way you'll be able to see the 3D render on top of the video clip, without the black background. I also need to add in a depth component to the clip's pixels. Once these are in, the rest will be sorting out the camera lens distortion, tracking and camera solve. This will be the trickiest, but will be the most rewarding. The tool will be usable once these are in place.
On a slightly different note, I still haven't figured out how to fix the green lines (see the previous post for more on this!). I tried re-ordering the clip and set piece draws, but now all the green lines draw on top of the clips, when some should be behind. I may have to look at another solution to fix this issue.