Close Show/hide page

{zero point nine} personal experiments, etc.

Video Projector Effect, Advanced

Thumbnail - Click me Click to run demo

This version handles arbitrary rotations, field of view / focal length, and uses correct math; the previous example faked it somewhat, doing everything basically with 2D math (but why admit to that? :). I found it twice as difficult getting to this point compared to the version posted a few days ago. It turns out that when you want to rotate more than 90 degrees around the x-axis, it's good to make friends with quaternions, if only superficially.

There's still a lot that could be done right / better with this: backface culling (already tried and failed); frustrum culling; per-triangle alpha based on distance and angle to simulate light intensity; per-triangle focus/blur based on distance, maybe (but probably not); a more straightforward way to implement video; shadows... Basically, anything short of building a renderer-inside-a-renderer.

View or post a comment