POV-Ray : Newsgroups : povray.binaries.images : Crater field Server Time
8 Aug 2024 01:22:27 EDT (-0400)
  Crater field (Message 11 to 15 of 15)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: PM 2Ring
Subject: Re: Crater field
Date: 30 Nov 2005 08:20:00
Message: <web.438da5cd133a23eb3dc12f230@news.povray.org>
"PM 2Ring" <nomail@nomail> wrote:
> "Kenneth" <kdw### [at] earthlinknet> wrote:

> > Which gave me an
> > idea!!  I took the image, stuck it into Photoshop, and inverted it (whites
> > to blacks and blacks to whites.) I couldn't resist; hope you don't mind!
> > Ah, the evils of post-processing!  :-)
> >
> > Here's the result...
>
> I like it! I'll try to post the craterfield generator tonight. I just need
> to write some docs for it...

I've written the docs, but now it looks like I can't upload .zip archives
(or maybe it's the downloading that causes archive corruption). Anyway,
here's a
simple scene file that can render using either a heightfield or a
isosurface, and a image to feed to it.

//-------------------------------------------

// Persistence of Vision Ray Tracer Scene Description File
// File: Crater.pov
// Desc: Render a contour map either as a heightfield or isosurface.
// Date: 2004.11.14
// Auth: PM 2Ring
//
// +A0.2 +AM2 +R3
// +A0.3 +AM2 +R2

#version 3.6;

//-------------------------------------------

#declare Use_Iso = 0;  //Render using heightfield or isosurface?

global_settings {
  assumed_gamma 1
}

camera {
  location <0, 2.25, -3.5> * 3.25 // * 2.875
  right x*image_width up y*image_height
  direction z
  angle 45

  look_at -2.5*y
}

light_source {<1, 5, -3>*50 rgb 1}

//------------------------------------------

//RGB "rainbow" colour map
#declare CMRainbow =
color_map{
  [1/8 rgb<0,0,0>]
  [1/8 rgb<1,0,0>]
  [2/8 rgb<1,0,0>]
  [2/8 rgb<1,1,0>]
  [3/8 rgb<1,1,0>]
  [3/8 rgb<0,1,0>]
  [4/8 rgb<0,1,0>]
  [4/8 rgb<0,1,1>]
  [5/8 rgb<0,1,1>]
  [5/8 rgb<0,0,1>]
  [6/8 rgb<0,0,1>]
  [6/8 rgb<1,0,1>]
  [7/8 rgb<1,0,1>]
  [7/8 rgb<1,1,1>]
}

#declare CMIce0 =
color_map{
  [0 rgb <.1,.075,0.025>]
  [0.25 rgb <0.2 0.2 0.25>]
  [0.75 rgb <.7 .7 .8>]
  [1 rgb 1]
}

#declare CMIce1 =
color_map{
  [.15 rgb <.8 .9 1>]
  [.85 rgb <1 1 1.15>]
}

#declare Shiny2 =
finish {
  ambient .05
  diffuse .85
  specular .25 roughness 1e-3
  //phong .25 phong_size 25
  //brilliance 1.25
}

#declare TMount =
texture{
  pigment {
    #if(0)
      rgb <1,1,1.2>
    #else
      gradient y
      //wrinkles scale <.2 1 .2>

      color_map{
        //CMRainbow
        //CMIce0
        //CMIce1
        [0 rgb <.6,.7,.8>][1 rgb <1 1 1.1>]
      }
    #end
  }
  finish {Shiny2}
}

//-------------------------------------------
//Heightfield stuff
#declare GX = 1;       //horizontal repetitions
#declare GY = GX;      //vertical repetitions
#declare Grid = 1500;  //Heightfield grid size

//Heightfield source image
#declare CraterPigment =
pigment {
  image_map {
    //pgm "CraterHF.pgm"
    jpeg "CraterHF.jpg"
    interpolate 2
  }
  scale 2
  translate <mod(GX,2), mod(GY,2), 0>
}

//Heightfield source function
#declare NFunc = function{pigment{CraterPigment}}
#declare Scale = 8;
#declare Height = .035;

#declare Craters =
#if(Use_Iso)
  isosurface{
    function {y-NFunc(GX*x,GY*z,0).x}
    contained_by{box{<-1,0,-1>,<1,1,1>}}
    accuracy 0.0075
    max_gradient 12
  }
#else
  height_field{
    function Grid,Grid {NFunc(GX*(2*x-1),GY*(1-2*y),0).x}
    smooth
    translate <-1, 0, -1>/2
    scale <2 1 2>
  }
#end

object {
  Craters

  texture{TMount}
  scale <GX, Height, GY> * Scale/max(GX,GY)
}

background{rgb 0}

//-------------------------------------------


Post a reply to this message


Attachments:
Download 'craterhf.jpg' (183 KB)

Preview of image 'craterhf.jpg'
craterhf.jpg


 

From: Jellby
Subject: Re: Crater field
Date: 30 Nov 2005 11:32:10
Message: <q6mu53-37o.ln1@badulaque.unex.es>
Among other thing, Rick Measham <rickm*at%isite.net.au> saw fit to write:

>> I think my eyes and brain are playing tricks on me.
>> Probably just a result of the lighting...
>> but the craters look kind of dome-like.
> 
> Whoah .. I was the same! I even went to the casini website and took a
> look at the source material, sure enough, some of *theirs* look domed too.

For me it's the oposite... I see (concave) craters everywhere, in the
original, in the inverted one, in the Moon photographs...

-- 
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby


Post a reply to this message

From: PM 2Ring
Subject: Re: Crater field
Date: 1 Dec 2005 22:15:00
Message: <web.438fbb9f133a23eb91e6526b0@news.povray.org>
"PM 2Ring" <nomail@nomail> wrote:
> "Kenneth" <kdw### [at] earthlinknet> wrote:
> > "PM 2Ring" <nomail@nomail> wrote:
> > > After seeing Cassini's recent pictures of some of the icy crater fields of
> > > Saturn's moons Dione & Tethys, I was inspired to dig up my old crater
> > > height field generator I wrote on the Amiga to see how it works on Linux.

Please see povray.binaries.utilities, subject 'Crater field' for the .zip
archive of the NewCraters program.

It appears that downloading .zip files via the Web interface is broken, so
you'll have to use a news reader.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Crater field
Date: 2 Dec 2005 03:45:37
Message: <439009b1@news.povray.org>
"Rick Measham" <rickm*at%isite.net.au> schreef in bericht
news:438c3bde@news.povray.org...
>
> So I gave up and started looking at the detail .. and all of a sudden I
> noticed they were concave! Now I can't see them as convex any more!
> Stupid eyes!
>
It helps sometimes to turn the image 180 degrees...

Thomas


Post a reply to this message

From: m1j
Subject: Re: Crater field
Date: 2 Dec 2005 15:05:01
Message: <web.4390a7e3133a23eb74103f4b0@news.povray.org>
"PM 2Ring" <nomail@nomail> wrote:
> After seeing Cassini's recent pictures of some of the icy crater fields of
> Saturn's moons Dione & Tethys, I was inspired to dig up my old crater
> height field generator I wrote on the Amiga to see how it works on Linux.
>
> As you can see from the quick test below, it functions ok (yes, the texture
> looks more like plastic than ice :). I've just improved the way each crater
> is blended into the existing landscape, although I'm still not completely
> happy with the crater generation algorithm.
>
> To be perfectly honest, I can't remember the algebra behind some of the
> parameters.  That's what happens when you don't use enough comments & other
> documentation and you then try to decipher 5 year old code. :) I'll just
> have to sit down & reverse-engineer the geometry...
>
> The crater generator height field output is only 8 bit .pgm, but I'm
> thinking of adding 16 bit & maybe even simple floating point (hdr) output.
>
> If anyone's interested in this crater generator, I'll post the C source &
> Linux binary (in the appropriate area).
>
> PS. The crater heightfield is tileable.


This looks nice. I would suggest a better shape for the out site of the
craters. Not so steep and with a few debris lines. Also not every crater
would be made by direct 90 degree angles. In fact many would be any where
with in the 90 degree from the ground.

Just some opinions.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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