POV-Ray : Newsgroups : povray.binaries.images : The Colony Ship : Re: The Colony Ship Server Time
8 Jul 2024 19:56:44 EDT (-0400)
  Re: The Colony Ship  
From: Sven Littkowski
Date: 14 Feb 2016 09:26:23
Message: <56c08e8f@news.povray.org>
Kenneth,

See here the image. The twisted real heightfield remains gray as the
original image is, and also does not show any heights. It is just like
an ordinary image texture wrapped along a cylinder.

I also include a down-sized version of the heightfield image (the
original is 10,000x10,000, this one is only 1,000x1,000)

Here's the code:

-----------------------------------------------------------

#declare Fn_1 = function
{
 pigment
 {
  image_map { jpeg "Colony Ship I - Heightfield Landscape.jpg" once
interpolate 2 }
// this image needs to be pi-units wide by 1.0 tall, NOT square.

// You can use these two modifiers to 'reverse' the imagery, to see it
// correctly on the INSIDE. HOWEVER, this does not reverse the *depth* of
// the heightfield. The only way to do that (that I know of) is to invert
// the image_map's colors (in Photoshop, for example.)
                //scale <-1,1,1>
                //translate <1,0,0>
 }
}

#declare TheLandscape = object
{
 HF_Cylinder(function { Fn_1(x,y*1.7,z).gray }, // *Needs* the function
'wrapper' Fn_1
                                             1, // UseUVheight:  0 or 1
// ON-- IMPORTANT
                                             0, // UseUVtexture: 0 or 1
                             <int(100*pi),100>, // Resolution.
                                             1, // Smooth: 0 or 1
                                            "", // FileName, ""=no file,
                                       <0,0,0>, // EndA,
                                     <0,1.7,0>, // EndB-- if this
y-value is different from 1.0,
                                                // change the function's
y-value above to compensate.
                                           0.5, // Radius. Keep this at
.5 for 1:1 reproduction of
                                                // the image_map around
the circumference.
                                            0.1 // Depth
  ) //-------------------------
 scale < 0.58, 0.67, 0.58 >
 rotate < 90.0, 0.0, 0.0 >
 scale < 1500.0, 1500.0, 2500.0 >
}

#declare MyLandscape = union
{
 object { TheLandscape scale < 1.0, 1.0,  1.0 > translate < 0.0, 0.0,
0000.0 > }
 object { TheLandscape scale < 1.0, 1.0, -1.0 > translate < 0.0, 0.0,
5000.0 > }
 pigment { rgb < 0.05, 0.25, 0.0 > }
 finish { emission 0.0 }
}

-----------------------------------------------------------

On 14.02.2016 04:15, Kenneth wrote inside the BUGREPORTS section:
> That's odd. I DO see the green color, using just your code example.
Did you
> combine the 'MyLandscape' object with some other CSG and then apply
another
> different 'gray' texture?
>
> Yes, post an image there (at the IMAGES section).


Post a reply to this message


Attachments:
Download 'sl - colony ship i.png' (29 KB) Download 'colony ship i - heightfield landscape 1000px.jpg' (118 KB)

Preview of image 'sl - colony ship i.png'
sl - colony ship i.png

Preview of image 'colony ship i - heightfield landscape 1000px.jpg'
colony ship i - heightfield landscape 1000px.jpg


 

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