POV-Ray : Newsgroups : povray.advanced-users : Projecting an image outward from the camera : Re: Projecting an image outward from the camera Server Time
8 Jul 2024 19:00:52 EDT (-0400)
  Re: Projecting an image outward from the camera  
From: Tim Attwood
Date: 5 Jul 2007 17:23:26
Message: <468d614e$1@news.povray.org>
About creating a dirtmap pigment with radiosity pre-renders...

Idea 1. Orthographic camera with planar mapping
> I tried aligning a planar mapped pigment from the camera to the target, 
> but the result is terrible. Perspective causes many unwanted problems.
...
> The whole point of projecting an image from the camera location is that 
> everything the camera sees would be ok (minus reflective surface catching 
> the backside).

Yeah, you'd need to calculate the angle from the camera to the object
in order to rotate the pigment to hide the bad back. So any animation
would be out, and if the back shows up in reflections it'd be wrong.
To fix that you might start piecing maps together, but by then you
might as well have drawn your dirt map by hand. I think this idea
might work in some cases, but would always be a lot of work to
align correctly.

Idea 2. Inverted-spherical camera with look_at in center of object
>> This is a real stumper... what you'd really want is
>> some sort of inverted spherical camera, where the
>> rays are shot from a sphere surrounding the look_at.
>
> Actually, a spherical camera would probably work, and I've thought of 
> this, but I would have to render a huge image for the dirt map just to 
> match the resolution of the final render.

I think an inverted-spherical camera would work without excessive
image sizes, because every ray would be cast at the look_at point,
so the entire map image would be of the object, but of course there
is no such camera, it'd need to be implemented... in MegaPov I think
you can setup user defined cameras based on functions on UV.
The resulting image pigment would be applied with spherical mapping.
It should be do-able.

Idea 3. Spherical camera placed at center of object
>> You might be able to get a reasonable map for some
>> sorts of simple objects by making them hollow and
>> rendering with a spherical camera placed inside at the
>> center.

This should work for objects where the whole surface is viewable
from the center of the object, the resulting image pigment could
then be spherical mapped onto the object. I haven't tested this,
and I see a couple of flaws in the idea too. First off, a complex
object is likely to have portions of the interior that are obscured.
Secondly, I'm not at all sure that the radiosity will appear correct
from the inside of an object.


Post a reply to this message

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