POV-Ray : Newsgroups : povray.binaries.images : Losing the ability to POV... Server Time
7 Nov 2024 06:24:37 EST (-0500)
  Losing the ability to POV... (Message 1 to 10 of 21)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Jörg "Yadgar" Bleimann
Subject: Losing the ability to POV...
Date: 7 Nov 2016 08:46:27
Message: <582085b3@news.povray.org>
Hi(gh)!

For quite a long time I did hardly anything POV-Ray-related than just 
manually editing the Kabul 1:100,000 heightfield or, more recently, 
collecting high-resolution OpenTopMap tiles for a more advanced version 
of that heightfield...

...and now, I want to re-create a level from the Amiga game 
"Rock'n'Roll" in POV-Ray (of course for animating it from the ball's 
perspective later on...) - and fail already at the very first step, 
which is creating a layered texture for a sky_sphere (or, simpler as not 
involving UV_mapping, for six planes forming a cubic space).

The lowermost layer consist of equally spaced squares - so I thought 
using the boxed pigment would be appropriate. But... whatever I try, I 
always only get uniform black!

Is it an idiosyncrasy of 3.7? Or do I simple lose the general ability to 
do anything sensible with POV-Ray?

Here is the code:

#declare P_Cubic_Division_Blue_Layer_1=
pigment
{
   boxed
   color_map
   {
     [0    rgb 0]
     [1    rgb 1]
   }
   translate <0, -1, 0>
}

// ACTUAL SCENE

plane
{
   y, -1
   texture
   {
     pigment
     {
       P_Cubic_Division_Blue_Layer_1
       scale 0.1
     }
     finish
     {
       ambient 1
       diffuse 0
     }
   }
}

camera
{
   location 0
   look_at <0, -1, 0>
   angle 40
}


Post a reply to this message

From: William F Pokorny
Subject: Re: Losing the ability to POV...
Date: 7 Nov 2016 09:50:43
Message: <582094c3$1@news.povray.org>
On 11/07/2016 08:46 AM, Jörg "Yadgar" Bleimann wrote:
>
> The lowermost layer consist of equally spaced squares - so I thought
> using the boxed pigment would be appropriate. But... whatever I try, I
> always only get uniform black!
>
> Is it an idiosyncrasy of 3.7? Or do I simple lose the general ability to
> do anything sensible with POV-Ray?
>
Remember that that boxed pattern is not a repeating one. It is 1.0 at 
the origin and 0.0 at the sides of the box. You've moved the boxed 
pattern down to the depth of the plane with a translate, but then you 
have a scale 0.1 so the value at the plane is outside the box or 0.0 
always.

Your camera is also quite close to the plane so even moving to a scale 
of 1.0 for the boxed based pigment it might be hard to see the gray 
gradient. Perhaps use a camera angle of 80 instead of 40 or move the 
camera up the y axis.

Lastly, you might find the pavement or tiling patterns of use for what 
you are trying.

Bill P.


Post a reply to this message

From: Stephen
Subject: Re: Losing the ability to POV...
Date: 7 Nov 2016 09:51:38
Message: <582094fa$1@news.povray.org>
On 11/7/2016 1:46 PM, Jörg "Yadgar" Bleimann wrote:
> Hi(gh)!
>
> For quite a long time I did hardly anything POV-Ray-related than just
> manually editing the Kabul 1:100,000 heightfield or, more recently,
> collecting high-resolution OpenTopMap tiles for a more advanced version
> of that heightfield...
>
> ....and now, I want to re-create a level from the Amiga game
> "Rock'n'Roll" in POV-Ray (of course for animating it from the ball's
> perspective later on...) - and fail already at the very first step,
> which is creating a layered texture for a sky_sphere (or, simpler as not
> involving UV_mapping, for six planes forming a cubic space).
>
> The lowermost layer consist of equally spaced squares - so I thought
> using the boxed pigment would be appropriate. But... whatever I try, I
> always only get uniform black!
>
> Is it an idiosyncrasy of 3.7? Or do I simple lose the general ability to
> do anything sensible with POV-Ray?
>
> Here is the code:
>

I thing boxed is not the pattern you want.
To get an image with it move the plane away from the origin.
Weird pattern.


-- 

Regards
     Stephen


Post a reply to this message

From: Bald Eagle
Subject: Re: Losing the ability to POV...
Date: 7 Nov 2016 09:55:00
Message: <web.582094b843d9fd0d80403a200@news.povray.org>
Hi Yadgar -

I believe that boxed is a non-repeating pattern, and so is wholly unsuited for
what you want, as well as how you're implementing it.
Read the description - it is ONE box.
You would have to translate it -0.5, rather than -0.1 to even see it.
You have no light source.
You have an odd camera position / look at / with no sky to contrast with.

So in essence you're looking at the unlit black plane that you've defined in
your scene.

Here's my quick dabbling that you can edit and see what I mean:

=======================================================

#version 3.7;
global_settings {
 assumed_gamma 1.0
 ambient_light color rgb <1, 1, 1>
}
include "colors.inc"

// Create an infinite sphere around scene and allow any pigment on it
sky_sphere{ pigment { gradient <0,1,0>
                      color_map { [0.00 rgb <0.6,0.7,1.0>]
                                  [0.35 rgb <0.0,0.1,0.8>]
                                  [0.65 rgb <0.0,0.1,0.8>]
                                  [1.00 rgb <0.6,0.7,1.0>]
                                }
                      scale 2
                    } // end of pigment
          } //end of skysphere -------------------------------------


#declare P_Cubic_Division_Blue_Layer_1 =
pigment
{
   boxed
   color_map
   {
     [0    rgb 0.5]
     [0.5    rgb 0.5]
     [0.5    rgb 1]
     [1    rgb 1]
   }
   translate <0, -0.5, 0>
}

// ACTUAL SCENE

plane
{
   <0, 1, 0>, -1
   texture
   {
     pigment
     { //checker Red, Blue
      P_Cubic_Division_Blue_Layer_1
       scale 100
     }
     finish
     {
       ambient 1
       diffuse 0
     }
   }

}

camera
{
   location <0, 50, -50>
   look_at <0, 20, 100>
   //angle 40
}

light_source {<0, 5, -30> rgb 1}


Post a reply to this message

From: Jörg "Yadgar" Bleimann
Subject: Re: Losing the ability to POV...
Date: 7 Nov 2016 10:33:05
Message: <58209eb1@news.povray.org>
Hi(gh)!

On 07.11.2016 15:50, Bald Eagle wrote:
> Hi Yadgar -
>
> I believe that
> boxed is a non-repeating pattern, and so is wholly unsuited for
> what you want,

No, it's not unsuited at all - at least when I use warps! So I did, and 
it worked quite well (see attachment)... but now another problem arises 
(of course, that's computing!): the inner boxes (uppermost texture 
layer, see code) should have a concentric color gradient from greyish 
blue to white - but instead, the gradient is centered in the lower left 
corner, as if the box pattern uses only a quarter of the entire box! How 
can I fix this?

The code:

// 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.129, 0.125, 0.388, 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.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.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.125 rgbft <0, 0, 0, 1, 1>]
       [0.125 rgbft <0.388, 0.396, 0.678, 0, 0>]
       [1 rgbft <1, 1, 1, 0, 0>]
     }
     translate <0.06, 0, 0.06>
   }
   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 }

// ACTUAL SCENE

plane
{
   y, 0
   texture { LT_Cubic_Division_Blue }
}

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

// end of code

See you in Khyberspace!

Yadgar


Post a reply to this message


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

Preview of image 'povnroll.png'
povnroll.png


 

From: Mike Horvath
Subject: Re: Losing the ability to POV...
Date: 7 Nov 2016 10:54:01
Message: <5820a399$1@news.povray.org>
Does POV-Ray support infinite sky_box sort of like sky_sphere? This may 
be a good addition in a future version.


Mike


Post a reply to this message

From: Alain
Subject: Re: Losing the ability to POV...
Date: 7 Nov 2016 19:28:27
Message: <58211c2b$1@news.povray.org>
Le 16-11-07 à 08:46, Jörg "Yadgar" Bleimann a écrit :
> Hi(gh)!
>
> For quite a long time I did hardly anything POV-Ray-related than just
> manually editing the Kabul 1:100,000 heightfield or, more recently,
> collecting high-resolution OpenTopMap tiles for a more advanced version
> of that heightfield...
>
> ...and now, I want to re-create a level from the Amiga game
> "Rock'n'Roll" in POV-Ray (of course for animating it from the ball's
> perspective later on...) - and fail already at the very first step,
> which is creating a layered texture for a sky_sphere (or, simpler as not
> involving UV_mapping, for six planes forming a cubic space).
>
> The lowermost layer consist of equally spaced squares - so I thought
> using the boxed pigment would be appropriate. But... whatever I try, I
> always only get uniform black!
>
> Is it an idiosyncrasy of 3.7? Or do I simple lose the general ability to
> do anything sensible with POV-Ray?
>

boxed evaluate to 1 at <0,0,0>, that value drop to zero at 1 unit 
distance in all 3 directions forming a box going from <-1,-1,-1> to <1,1,1>.
Outside that box, it always return zero.

The other similar patterns are planar, cylindrical and spherical.
planar evaluate as 1 on the X-Z plane and drop to zero at +-Y.
cylindrical is a cylinder around the Y axis with a radius of 1.
spherical drop to zero at radius 1.

All those remain at zero outside those domains.


Post a reply to this message

From: Jörg "Yadgar" Bleimann
Subject: Problem solved! (was Re: Losing the ability to POV...)
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


 

From: Bald Eagle
Subject: Re: Problem solved! (was Re: Losing the ability to POV...)
Date: 9 Nov 2016 10:15:01
Message: <web.58233d6a37b7c347b488d9aa0@news.povray.org>
Congrats on working it out   :)

Nice use of warp and repeat.
I always forget about the warp feature - so many things to use in POV-Ray   :O


Post a reply to this message

From: Jörg "Yadgar" Bleimann
Subject: Re: Problem solved! (was Re: Losing the ability to POV...)
Date: 9 Nov 2016 20:44:11
Message: <5823d0eb$1@news.povray.org>
On 09.11.2016 16:14, Bald Eagle wrote:
> Congrats on working it out   :)
>
> Nice use of warp and repeat.
> I always forget about the warp feature - so many things to use in POV-Ray   :O
>
...but then I accidentally deleted all *png files in the POVnroll 
project directory - and among them also the level 1 mosaic, cumbersomely 
screen-copied from the Amiga emulator! So I will not be able to resume 
my work, unless I do it all over again! Perhaps not all - a partial 
version of it is on my friend's harddisk, but I have to phone him to 
e-mail it to me, he does not regularly check his e-mail...

Computing sucks!!!

See you in Khyberspace!

Yadgar


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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