POV-Ray : Newsgroups : povray.binaries.images : Skyrim (and beyond) Server Time
26 Jun 2025 07:16:08 EDT (-0400)
  Skyrim (and beyond) (Message 4 to 13 of 36)  
<<< Previous 3 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Tim Cook
Subject: Re: Skyrim (and beyond)
Date: 15 Oct 2012 11:44:18
Message: <507c2f52@news.povray.org>
I do believe I just clicked on the 'reply' button instead of 'followup'...

...again.

Really dislike that 'feature' of Thunderbird.

I think the data I pulled is the level-of-detail terrain data from 
in-game, one or another of which is used as the world-map as well...?

I'm of half a mind to take and scale the meshes so they match what I've 
been able to discern of 'real' distances for things; they're squished 
about 10x laterally and stretched 10x vertically, so when you correct 
for that, Skyrim's a lot flatter.  (It's about 250 lore-canon miles from 
Dawnstar to Windhelm, or something like that...?  Whereas in-game, if 
you use their 128 units = 6 feet, it's only about 25 miles.  And the 
Throat of the World is iirc 52 miles high--again with the 128 units to 6 
feet measure.)


Post a reply to this message

From: Samuel Benge
Subject: Re: Skyrim (and beyond)
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

From: Samuel Benge
Subject: Re: Skyrim (and beyond)
Date: 15 Oct 2012 17:05:00
Message: <web.507c79ecf9ac85a3d09d0ca60@news.povray.org>
"Samuel Benge" <stb### [at] hotmailcom> wrote:
> 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!

Here's a version using an improved method. Elevation lines of any thickness will
be drawn properly, at the expense of PPS:

#declare NLines  = 10; // number of "elevation" lines
#declare LineSize = 3; // line size in pixels (1.0-?)
#declare LineOffs = 0; // line offset (phase)(0.0-1.0)
#declare LineRes = LineSize*16; // number of line samples (1=?)

// 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
    }
   }
  }
 }

#macro SampleLoop()
 #for(N, 1, LineRes)
  #local C = 1/LineRes*N;
  #local R = pow(C*sqrt(N)/pow(LineRes,.5),1/3);
  #local Angle = N*137.508;
  #local Pt = vrotate(y*R, z*Angle);
  #local PtX = Pt.x*LineSizeX;
  #local PtY = Pt.y*LineSizeY;
  , FInput(x+PtX, y+PtY, 0)
 #end
#end

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

plane{z, 0
 pigment{PgElevationLines}
}


Post a reply to this message

From: Samuel Benge
Subject: Re: Skyrim (and beyond)
Date: 15 Oct 2012 19:40:01
Message: <web.507c9e11f9ac85a32165ae730@news.povray.org>
I believe the code has reached its final state. Elevation lines are now mapped
correctly starting at elevation=0.0. Included is an option for using smoothed
lines or not, and it's all wrapped up nicely into a macro that produces a
pigment_pattern.

Use it or don't; I always script for fun :)

http://news.povray.org/povray.text.scene-files/thread/%3Cweb.507c9bbc53181abf2165ae730%40news.povray.org%3E/

Sam


Post a reply to this message

From: Samuel Benge
Subject: Re: Skyrim (and beyond)
Date: 15 Oct 2012 19:50:01
Message: <web.507ca0ecf9ac85a3721473b50@news.povray.org>
"Samuel Benge" <stb### [at] hotmailcom> wrote:
> I believe the code has reached its final state.

Attached is an image rendered from the example scene, using eight elevation
lines. An acceptable result, IIDSSMS, although calculating the number of lines
needed for real-world data might prove to be somewhat of a challenge!


Post a reply to this message


Attachments:
Download 'elevationlines.png' (119 KB)

Preview of image 'elevationlines.png'
elevationlines.png


 

From: Tim Cook
Subject: Re: Skyrim (and beyond)
Date: 15 Oct 2012 22:15:14
Message: <507cc332$1@news.povray.org>
Needs a bit of fiddling (go right-hand rule!) and POV 3.7 to work, but...

...need to figure out proper scaling and offset, but I think that just 
might let me bypass another month of hand-drawing contour lines.

Thanks!

--
Tim Cook
http://empyrean.sjcook.com


Post a reply to this message

From: Thomas de Groot
Subject: Re: Skyrim (and beyond)
Date: 16 Oct 2012 03:06:59
Message: <507d0793$1@news.povray.org>
On 16-10-2012 1:36, Samuel Benge wrote:
> I believe the code has reached its final state. Elevation lines are now mapped
> correctly starting at elevation=0.0. Included is an option for using smoothed
> lines or not, and it's all wrapped up nicely into a macro that produces a
> pigment_pattern.
>
> Use it or don't; I always script for fun :)
>
>
http://news.povray.org/povray.text.scene-files/thread/%3Cweb.507c9bbc53181abf2165ae730%40news.povray.org%3E/
>

Incredible, Sam. This can be a very useful feature. I shall certainly 
use it. Thanks indeed.

Thomas


Post a reply to this message

From: Tim Cook
Subject: Re: Skyrim (and beyond)
Date: 16 Oct 2012 07:40:20
Message: <507d47a4@news.povray.org>
A'ight, I think I'm doing something wrong here, because I'm not getting 
the fixed-width contour lines.

Here's relevant bit of SDL:

#declare East_Land4 = union {
   object { Land4_P00P00_to_P12P28 }
   object { Land4_P20P00_to_P28P28 }
   object { Land4_P00M04_to_P12M32 }
   object { Land4_P16M04_to_P32M32 }
   object { Land4_P32P00_to_P44_28 }
   object { Land4_P48P00_to_P60P28 }
   object { Land4_P32M04_to_P44M32 }
   object { Land4_P48M04_to_P60M32 }
   object { tamriel_4_12_60_ }
   object { tamriel_4_28_60_ }
   object { tamriel_4_44_60_ }
   object { tamriel_4_60_60_ }
   #declare InputPigment = pigment{
     gradient z
     rotate x*90
   }
   pigment{
     Pg_Elevation_Lines(
       InputPigment,
       8,
       3,
       8,
       0,
       on
     )
     pigment_map{ [ 0 InputPigment][ 1 rgb x] }
     rotate -90 * x
     scale 16384.0 * 3.2
     translate <0.0, 0.0, -13800.0>
   }
   finish{ ambient 1 diffuse 0 }
}

Halp?

--
Tim Cook
http://empyrean.sjcook.com


Post a reply to this message


Attachments:
Download 'tamrieleast.png' (217 KB)

Preview of image 'tamrieleast.png'
tamrieleast.png


 

From: Bill Pragnell
Subject: Re: Skyrim (and beyond)
Date: 16 Oct 2012 08:50:00
Message: <web.507d579ef9ac85a35b7d07940@news.povray.org>
Tim Cook <z99### [at] gmailcom> wrote:
> I do believe I just clicked on the 'reply' button instead of 'followup'...
>
> ...again.

Oh yes. I've not yet been to Dawnstar, Riften or Morthal so I couldn't comment!
Trying to keep the quest list down to a manageable size :)

> I'm of half a mind to take and scale the meshes so they match what I've
> been able to discern of 'real' distances for things; they're squished
> about 10x laterally and stretched 10x vertically, so when you correct
> for that, Skyrim's a lot flatter.  (It's about 250 lore-canon miles from
> Dawnstar to Windhelm, or something like that...?  Whereas in-game, if
> you use their 128 units = 6 feet, it's only about 25 miles.  And the
> Throat of the World is iirc 52 miles high--again with the 128 units to 6
> feet measure.)

I thought so, or it would take weeks to cross wilderness! It's quite a clever
effect though, the landscape hides the locations' proximities so on the ground
it feels like a real, large world.

If you get Sam's contours working, it'd be fun to see a tourist hiking map :)


Post a reply to this message

From: Samuel Benge
Subject: Re: Skyrim (and beyond)
Date: 16 Oct 2012 15:20:00
Message: <web.507db334f9ac85a35f336ae30@news.povray.org>
Tim Cook <z99### [at] gmailcom> wrote:
> A'ight, I think I'm doing something wrong here, because I'm not getting
> the fixed-width contour lines.
>
> Here's relevant bit of SDL:
>
> #declare East_Land4 = union {
>    object { Land4_P00P00_to_P12P28 }
>    object { Land4_P20P00_to_P28P28 }
>    object { Land4_P00M04_to_P12M32 }
>    object { Land4_P16M04_to_P32M32 }
>    object { Land4_P32P00_to_P44_28 }
>    object { Land4_P48P00_to_P60P28 }
>    object { Land4_P32M04_to_P44M32 }
>    object { Land4_P48M04_to_P60M32 }
>    object { tamriel_4_12_60_ }
>    object { tamriel_4_28_60_ }
>    object { tamriel_4_44_60_ }
>    object { tamriel_4_60_60_ }
>    #declare InputPigment = pigment{
>      gradient z
>      rotate x*90
>    }
>    pigment{
>      Pg_Elevation_Lines(
>        InputPigment,
>        8,
>        3,
>        8,
>        0,
>        on
>      )
>      pigment_map{ [ 0 InputPigment][ 1 rgb x] }
>      rotate -90 * x
>      scale 16384.0 * 3.2
>      translate <0.0, 0.0, -13800.0>
>    }
>    finish{ ambient 1 diffuse 0 }
> }
>
> Halp?

A simple "gradient z" will not work because it doesn't contain any topographical
information describing your landscape. The macro requires a height map, so
you'll need to produce one from East_Land4 and then pass it to the macro. (You
might even be able to use it for a height_field object instead of that union of
objects you have now, but I'm not sure, since I don't know how your scene is set
up.)

Once you have your height_map, you'll be going forward again. If not, just give
me a holler :)


Post a reply to this message

<<< Previous 3 Messages Goto Latest 10 Messages Next 10 Messages >>>

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