POV-Ray : Newsgroups : povray.advanced-users : how to do ultra-hi-res image_mapping on a sphere? Server Time
1 Nov 2024 03:16:27 EDT (-0400)
  how to do ultra-hi-res image_mapping on a sphere? (Message 1 to 4 of 4)  
From: Erhard Ducke
Subject: how to do ultra-hi-res image_mapping on a sphere?
Date: 20 Dec 2003 12:01:36
Message: <1gv8uvs6svm2tflakglt740mgmsoibkc6p@4ax.com>
Hi!
Can anyone give me a hint how to image_map very high resolution pictures on
a sphere?

The (earth) sphere is basically rendered with a ~8kx4k pixel projected on
it but there are special regions of interest that should use parts of a
40kx20k file.
So NOT the whole giant bitmap is used but only a fragment that should be
patched over the lo-res bitmap.
Is it possible to put this bitmap only on a exactly defined part of the
sphere? I know this is possible with other primitives as boxes but
image_maps on a sphere are wrapped completely around or am i wrong?
Thanks in advance and Merry Christmas to all people around here!
-- 
Erhard Ducke


Post a reply to this message

From: Christoph Hormann
Subject: Re: how to do ultra-hi-res image_mapping on a sphere?
Date: 20 Dec 2003 13:02:03
Message: <iveeb1-srt.ln1@triton.imagico.de>
Erhard Ducke wrote:
> Hi!
> Can anyone give me a hint how to image_map very high resolution pictures on
> a sphere?
> 
> The (earth) sphere is basically rendered with a ~8kx4k pixel projected on
> it but there are special regions of interest that should use parts of a
> 40kx20k file.
> So NOT the whole giant bitmap is used but only a fragment that should be
> patched over the lo-res bitmap.

You can either use a spherical warp or code the spherical mapping 
yourself with a function pigment.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 25 Oct. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Fabien Mosen
Subject: Re: how to do ultra-hi-res image_mapping on a sphere?
Date: 20 Dec 2003 14:24:31
Message: <3fe4a1ef@news.povray.org>
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...

Fabien.


Post a reply to this message

From: Fabien Mosen
Subject: Re: how to do ultra-hi-res image_mapping on a sphere?
Date: 20 Dec 2003 14:37:48
Message: <3fe4a50c$1@news.povray.org>
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

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