POV-Ray : Newsgroups : povray.binaries.images : Losing the ability to POV... : Problem solved! (was Re: Losing the ability to POV...) Server Time
20 Apr 2024 03:36:23 EDT (-0400)
  Problem solved! (was Re: Losing the ability to POV...)  
From: Jörg "Yadgar" Bleimann
Date: 7 Nov 2016 20:42:26
Message: <58212d82@news.povray.org>
Hi(gh)!

After deciding to discard the smooth color gradients in favour of sharp 
stripes (which would be more true to the Amiga original), I now fixed my 
problem with the background texture (see attachment).

I now will apply this layered texture to six planes defining the cubic 
space in which the game level is located; they will be animated 
according to the player's (a simple ball) movements, just like in the 
original game!

Here is the code:

// begin code

// POV'n'Roll
// The Amiga game Rock'n'Roll as POV-Ray world

// E-Mail: yaz### [at] gmxde

// PIGMENTS



// FINISHES

#declare F_Background=
finish
{
   ambient 1
   diffuse 0
}

// TEXTURES

#declare T_Cubic_Division_Blue_Layer_1 =
texture
{
   pigment
   {
     boxed
     warp { repeat <1.384, 0, 0> }
     warp { repeat <0, 0, 1.384> }
     color_map
     {
       [0 rgb 0]
       [0.00001 rgb 0]
       [0.00001 rgb <0, 0, 0.192>]
       [1 rgb <0, 0, 0.192>]
     }
   }
   finish { F_Background }
}

#declare T_Cubic_Division_Blue_Layer_2 =
texture
{
   pigment
   {
     gradient x
     color_map
     {
       [0       rgbft <0, 0, 0, 1, 1>]
       [0.40625 rgbft <0, 0, 0, 1, 1>]
       [0.40625 rgbft <0.388, 0.396, 0.678, 0, 0>]
       [0.46875 rgbft <0.388, 0.396, 0.678, 0, 0>]
       [0.46875 rgbft <0.2, 0.267, 0.533, 0, 0>]
       [0.53125 rgbft <0.2, 0.267, 0.533, 0, 0>]
       [0.53125 rgbft <0.129, 0.125, 0.388, 0, 0>]
       [0.59375 rgbft <0.129, 0.125, 0.388, 0, 0>]
       [0.59375 rgbft <0, 0, 0, 1, 1>]
       [1       rgbft <0, 0, 0, 1, 1>]
     }
     scale 1.384
     translate <-0.192, 0, 0>
   }
   finish { F_Background }
}

#declare T_Cubic_Division_Blue_Layer_3 =
texture
{
   pigment
   {
     gradient z
     color_map
     {
       [0       rgbft <0, 0, 0, 1, 1>]
       [0.40625 rgbft <0, 0, 0, 1, 1>]
       [0.40625 rgbft <0.129, 0.125, 0.388, 0, 0>]
       [0.46875 rgbft <0.129, 0.125, 0.388, 0, 0>]
       [0.46875 rgbft <0.2, 0.267, 0.533, 0, 0>]
       [0.53125 rgbft <0.2, 0.267, 0.533, 0, 0>]
       [0.53125 rgbft <0.388, 0.396, 0.678, 0, 0>]
       [0.59375 rgbft <0.388, 0.396, 0.678, 0, 0>]
       [0.59375 rgbft <0, 0, 0, 1, 1>]
       [1       rgbft <0, 0, 0, 1, 1>]
     }
     scale 1.384
     translate <0, 0, -0.192>
   }
   finish { F_Background }
}

#declare T_Cubic_Division_Blue_Layer_4 =
texture
{
   pigment
   {
     boxed
     warp { repeat <1.384, 0, 0> }
     warp { repeat <0, 0, 1.384> }
     color_map
     {
       [0 rgbft <0, 0, 0, 1, 1>]
       [0.15 rgbft <0, 0, 0, 1, 1>]
       [0.15 rgbft <0.129, 0.125, 0.388, 0, 0>]
       [1 rgbft <0.129, 0.125, 0.388, 0, 0>]
     }
     translate <0.072, 0, 0.072>
   }
   finish { F_Background }
}

#declare T_Cubic_Division_Blue_Layer_5 =
texture
{
   pigment
   {
     boxed
     warp { repeat <1.384, 0, 0> }
     warp { repeat <0, 0, 1.384> }
     color_map
     {
       [0 rgbft <0, 0, 0, 1, 1>]
       [0.3 rgbft <0, 0, 0, 1, 1>]
       [0.3 rgbft <0.2, 0.267, 0.533, 0, 0>]
       [1 rgbft <0.2, 0.267, 0.533, 0, 0>]
     }
     translate <0.144, 0, 0.144>
   }
   finish { F_Background }
}

#declare T_Cubic_Division_Blue_Layer_6 =
texture
{
   pigment
   {
     boxed
     warp { repeat <1.384, 0, 0> }
     warp { repeat <0, 0, 1.384> }
     color_map
     {
       [0 rgbft <0, 0, 0, 1, 1>]
       [0.45 rgbft <0, 0, 0, 1, 1>]
       [0.45 rgbft <0.388, 0.396, 0.678, 0, 0>]
       [1 rgbft <0.388, 0.396, 0.678, 0, 0>]
     }
     translate <0.216, 0, 0.216>
   }
   finish { F_Background }
}

#declare T_Cubic_Division_Blue_Layer_7 =
texture
{
   pigment
   {
     boxed
     warp { repeat <1.384, 0, 0> }
     warp { repeat <0, 0, 1.384> }
     color_map
     {
       [0 rgbft <0, 0, 0, 1, 1>]
       [0.6 rgbft <0, 0, 0, 1, 1>]
       [0.6 rgbft <0.533, 0.533, 0.8, 0, 0>]
       [1 rgbft <0.533, 0.533, 0.8, 0, 0>]
     }
     translate <0.288, 0, 0.288>
   }
   finish { F_Background }
}

#declare T_Cubic_Division_Blue_Layer_8 =
texture
{
   pigment
   {
     boxed
     warp { repeat <1.384, 0, 0> }
     warp { repeat <0, 0, 1.384> }
     color_map
     {
       [0 rgbft <0, 0, 0, 1, 1>]
       [0.75 rgbft <0, 0, 0, 1, 1>]
       [0.75 rgbft <0.733, 0.733, 0.867, 0, 0>]
       [1 rgbft <0.733, 0.733, 0.867, 0, 0>]
     }
     translate <0.36, 0, 0.36>
   }
   finish { F_Background }
}

#declare T_Cubic_Division_Blue_Layer_9 =
texture
{
   pigment
   {
     boxed
     warp { repeat <1.384, 0, 0> }
     warp { repeat <0, 0, 1.384> }
     color_map
     {
       [0 rgbft <0, 0, 0, 1, 1>]
       [0.9 rgbft <0, 0, 0, 1, 1>]
       [0.9 rgbft <1, 1, 1, 0, 0>]
       [1 rgbft <1, 1, 1, 0, 0>]
     }
     translate <0.432, 0, 0.432>
   }
   finish { F_Background }
}



#declare LT_Cubic_Division_Blue =
texture { T_Cubic_Division_Blue_Layer_1 }
texture { T_Cubic_Division_Blue_Layer_2 }
texture { T_Cubic_Division_Blue_Layer_3 }
texture { T_Cubic_Division_Blue_Layer_4 }
texture { T_Cubic_Division_Blue_Layer_5 }
texture { T_Cubic_Division_Blue_Layer_6 }
texture { T_Cubic_Division_Blue_Layer_7 }
texture { T_Cubic_Division_Blue_Layer_8 }
texture { T_Cubic_Division_Blue_Layer_9 }

// ACTUAL SCENE

plane
{
   y, -10000
   texture
   {
     LT_Cubic_Division_Blue
     scale 500
     translate <0, -10000, 0>

   }
}

camera
{
   location <0, 10, 0>
   look_at 0
   angle 40
}

// end code

See you in Khyberspace!

Yadgar

P. S. Yes, POV-Ray hurts when not exercised on a daily basis!


Post a reply to this message


Attachments:
Download 'povnroll.png' (10 KB)

Preview of image 'povnroll.png'
povnroll.png


 

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