The Deep Magic Of 3D Graphics Perspective

Many of us of a certain age will have had their first true, good 3D video game experience with Super Mario 64. Unlike previous 3D games, the camera was an object controllable by the player, rather than a first-person-ony mode or one where the game tries to guess the best placement for the camera. We might take this mechanic for granted today, but 3D was a new technology at the time that took experimentation before settling on the norms we have today. From a programming perspective, 3D graphics can be a bit of a head-scratcher but [Gabriel] shows that perspective and the camera can be as simple as a few lines of math.

When starting out as a programmer, [Gabriel] used various tools that provided a camera somewhat automatically. But after reaching the limits of these types of frameworks, the next step is to learn how that works from scratch. It turns out that it’s a bit of matrix math, with values for foreground and background clipping planes as well as aspect, field of view, and position. This basically replicates a trapezoidal prism which can be thought of as a viewer looking at a scene from the perspective of a camera. To provide the depth effect, the X and Y coordinates are divided by the Z coordinate within this matrix system, making far-away objects smaller and generating the 3D effect.

On [Gabriel]’s site which explains this method, there are a few sliders in several examples that demonstrate how changing values of each of these variables changes the perspective and the object being displayed. For a math lesson it is very interactive and helps intuit these concepts. Cameras aside, the generation of 3D objects has its own unique set of math equations to learn about that are “equally” interesting.

Make Yourself A Megamind With A Hypercentric Camera

Sometimes, all it takes to learn something new is a fresh perspective on things. But what’s to be learned from reversing your perspective completely with a hypercentric lens? For one thing, that you can make humans look really, really weird.

To be fair, there’s a lot to the optical story here, which [volzo] goes over in ample detail. The short version of it is that with the right arrangement of optical elements, it’s possible to manipulate the perspective of a photograph for artistic effect, up to the point of reversing the usual diminishment of the apparent size of objects in the scene that are farther away from the camera. Most lenses do their best to keep the perspective of the scene out of this uncanny valley, although the telecentric lenses used in some machine vision systems manipulate the perspective to make identical objects within the scene appear to be the same size regardless of their distance from the camera. A hypercentric lens, on the other hand, turns perspective on its head, making near objects appear smaller than far objects, and comically distorts things like the human face.

[volzo]’s hypercentric camera uses a 700-mm focal length Fresnel lens mounted on a motorized gantry, which precisely positions a camera relative to the lens to get the right effect. A Raspberry Pi controls the gantry, but it’s not strictly needed for the hypercentric effect to work. Lighting is important, though, with a ring of LEDs around the main lens providing even illumination of the scene. The whole setup as well as the weirdly distorted portraits that result are shown in the video below.

If these bizarrely distorted faces look familiar, you might be recalling [Curious Marc]’s head-enlarging wearable.

Continue reading “Make Yourself A Megamind With A Hypercentric Camera” →

Build A Real-life Escher’s Waterfall

Instructables user [GuokrDIY] has provided a translation of a detailed guide on making one of our favorite Escher inspired illusions. Unlike the previous speculated solutions to Escher’s waterfall this one manages to keep the water path coherent up until the top level. The trick of the whole setup is very carefully controlling perspective to overlap the water source and outlet.  We say water but for some reason the builder is actually using “toilet detergents” as the liquid… At any rate, the liquid is allowed to flow downhill until it reaches the fourth corner, which does not exist. The liquid actually falls off the end of the table (out of sight) and into a basin. A carefully timed pump in the basin pushes liquid up to the top of the waterfall through one of the model’s pillars, where it then cascades over the wheel.

Using sketchup to model the various structural components of the waterfall the design is fashioned out of PVC and ABS plastic, then skinned with mapped textures to ensure that everything looks coherent. The visual details are fine tuned by viewing the whole setup through a camcorder.  The hardest part of the illusion seems to be modulating power to the pump in order to time it with the liquid’s flow.

We just hope that thing about toilet detergent was a mistranslation or some kind of sarcasm from the original Chinese article.  Check out the model in action after the jump!

Continue reading “Build A Real-life Escher’s Waterfall” →

Make Your Own 3d Monitor

[youtube=http://www.youtube.com/watch?v=NektsV1EOic]

Don’t let this cruddy video fool you. [Sprite_tm] has done an amazing job here. He has put together a fairly simple way of creating your own 3d monitor at home. The basic principle is easy to get. You have to supply different angles of an object, on the screen, at the same time. [Sprite_tm] has done this by using transparency sheets, printed with a pattern to only show specific pixels. As you move your head, you see a different set of pixels, and therefore a different image. It’s simple, but it works. The system isn’t really new. Traditional 3d with polarized glasses uses a very similar setup. This system however seems like it is lacking in stereoscopic view however. When you move your head, you’re looking at a different angle, but still a 2d image of it. It would be really cool if he could somehow present each eye a different view, without polarizing filters and glasses. We’ve seen others do that with multiple screens, but that gets so clunky and can give most people a headache pretty quick. We also think we are about to see a flood of face tracking perspective modification, especially with project Natal and similar technology emerging.