POV-Ray : Newsgroups : povray.binaries.images : Skyrim (and beyond) : Re: Skyrim (and beyond) Server Time
24 Apr 2024 18:14:13 EDT (-0400)
  Re: Skyrim (and beyond)  
From: Samuel Benge
Date: 15 Oct 2012 16:30:01
Message: <web.507c7131f9ac85a3474fd52e0@news.povray.org>
Tim Cook <z99### [at] gmailcom> wrote:
> This rendering was actually made a bit over a month ago, as a supplement
> to my primary project of making a topographic map of Skyrim.  That,
> while based on a render of the game terrain data with a gradient slapped
> on it to indicate elevations, is needing to be redone by hand to get
> consistent-width contour lines (if I were clever, I'd probably be able
> to figure out something much simpler and faster as an automated process,
> but what can I say, glutton for punishment or something), so doesn't
> really qualify for posting here.

Try out the following if/when you have a chance:

#declare NLines  = 10; // number of elevation lines
#declare LineSize = 2; // line size in pixels (1.0-2.0)
#declare LineOffs = 0; // line offset (phase)(0.0-1.0)

// your input pigment
#declare PgInput =
 pigment{
  bumps
  turbulence .5
  lambda 2.5
 }

#declare FInput =
 function{
  pattern{
   pigment_pattern{
    PgInput
    phase LineOffs/NLines
    color_map{
     #for(V, 0, NLines)
      [V/NLines rgb (mod(V,2)=0)]
      [V/NLines+1/NLines rgb (mod(V,2)=0)]
     #end
    }
   }
  }
 }

#declare FSpherical = function{pattern{spherical}}

#declare PgElevationLines =
 pigment{
  #declare LineSizeX = LineSize/image_width;
  #declare LineSizeY = LineSize/image_height;
  function{
   FSpherical(
    FInput(x+LineSizeX, y, 0)-FInput(x-LineSizeX, y, 0),
    FInput(x, y+LineSizeY, 0)-FInput(x, y-LineSizeY, 0),
    0
   )
  }
 }

plane{z,0
 pigment{PgElevationLines}
}

It's really only good for line thicknesses between 1-2 pixels, but at least the
lines are of an even width. Antialiasing is recommended. Hope it helps!

Sam


Post a reply to this message

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