|
![](/i/fill.gif) |
Fabien Mosen wrote:
> Erhard Ducke wrote:
>
>> So NOT the whole giant bitmap is used but only a fragment that should be
>> patched over the lo-res bitmap.
>
>
> I did a macro some time ago which does that... I'll try to find it, but
> it must be buried in the disorganized mess of my hard drive...
Well, no SO disorganized, I found it ! Here's a complete sample scene
with the relevant #macro :
usage : with some software, determine, in percent starting from upper
left, which are the limits of the frame you want from the image.
Then, use the macro like this :
(in place of a sphere's pigment definition)
PartialSphereMap (
sphere radius,
"image name",
PL, //first line
DL, //last line
PC, //first column
DC //last column
)
It isn't *exactly* what you need (since it loads all
the image), but the basis is the same.
Fabien.
//--------------------------------------------------------
#include "colors.inc"
camera {location <50,50,50> look_at 0 angle 50}
#local SphereRadius = 20;
#macro PartialSphereMap (SRadius,NomImage,PL,DL,PC,DC)
pigment {image_map {jpeg NomImage once} scale <DC-PC,DL-PL,1>
translate <PC,PL,0>
warp {
spherical orientation z dist_exp 0.1
}
scale SRadius
}
#end
sphere {
0,20
PartialSphereMap (SphereRadius,"myimage.jpg",0.1,0.9,0.1,0.9)
}
light_source {<200,300,400> White*2}
//--------------------------------------------------------
Post a reply to this message
|
![](/i/fill.gif) |