POV-Ray : Newsgroups : povray.binaries.images : 2.5D 'matte painting'--using Rune's ILLUSION.INC : 2.5D 'matte painting'--using Rune's ILLUSION.INC Server Time
30 Jul 2024 02:21:05 EDT (-0400)
  2.5D 'matte painting'--using Rune's ILLUSION.INC  
From: Kenneth
Date: 28 Jan 2013 17:05:01
Message: <web.5106f53bd9b7ab13c2d977c20@news.povray.org>
I've lately been mulling over ideas about what's called 2.5D matte painting or
"2 and a half D" in the CG animation biz. Another term for it might be 'camera
projection' of an image. One of its uses is creating photo-real set extensions,
where the camera can move 'through the set' in a limited way, without showing
noticeable parallax distortion.  I've been trying to come up with some idea of
how to make it work in POV-Ray--using the Screen.inc include file as a starting
point.

A precise, clear definition of '2.5D' is actually hard to find--it seems to be a
malleable description for various techniques, depending on the individual CG
artist. Haven't yet found much info about it on the web, although it's covered
in specialist books and DVDs.

The *basic* idea (AFAIU) is to project a photographic image onto 'simplified'
geometry--but in a way that the image shows no perspective foreshortening as the
object's own z-depth naturally recedes into the distance. A regular map_type 0
image_map projection in POV-Ray doesn't do that.

I had *some* success with my own code, but couldn't get the 'perspective
elimination' thing to work--which necessitated having to drastically alter an
image in Photoshop first, to eliminate its own perspective.

Then, much to my delight, I (re)-discovered Rune's ILLUSION.INC include file.
Found here...

http://runevision.com/3d/include/

It's an amazing tool! And does pretty much exactly what I was looking for. There
are only a few examples of its use in the newsgroups, all relating to still
images. But Rune's code also works (with caveats) for animation. You just feed
it an image, adjust a few parameters, and...magic! It works with multiple
objects, too.  The power of this technique is two-fold: A rather crude object
can be made to look realistic and 'quasi-3D' in animation, with some (limited)
camera movement; and the applied photo can be used as-is, no laborious
reworking.

I've included some example renders. Parts of the applied image might appear to
be showing up on a thin tilted box--but it's actually overlaid onto the floor
plane! This whole topic is probably best illustrated by a simple animation, so
I'll post that too.

I made some changes to Rune's code, though (in a minor way)--parts of it seem to
be specifically for reproducing his sample POV-Ray file ('illusionsample.pov')
when they should be more generic; and the image rendered from the example looks
a bit confusing, not *visually* clear enough to show the code's real power.

As wonderful as the code is, it's not set up FOR animation (and probably wasn't
designed for that anyway, as the code *relies* on the camera position being
well-defined.) That is, a FREELY-moving camera introduces distortion into the
applied image--not really parallax distortion but something else. There's no
easy/quick solution in the parameter settings; but I'm giving that some thought,
to see what I can come up with. It *may* turn out to be very simple to fix.


Post a reply to this message


Attachments:
Download 'illusion_inc_example.jpg' (446 KB)

Preview of image 'illusion_inc_example.jpg'
illusion_inc_example.jpg


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.