POV-Ray : Newsgroups : povray.advanced-users : Wallpaper patterns Server Time
29 Jul 2024 06:14:22 EDT (-0400)
  Wallpaper patterns (Message 1 to 3 of 3)  
From: Andrew Coppin
Subject: Wallpaper patterns
Date: 25 Sep 2002 11:49:12
Message: <3d91daf8@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I don't particularly like the background patterns supplied with
POV-Ray. (Well, the bw marble one is quite nice.) So I decided to
make my own, using... well... POV-Ray! The trick is, how do you get
the pattern to loop? The best I can come up with is something like...

camera
{
  spherical
  angle 360, 360
  location <0, 0, 0>
  direction z
  up y
  right x
}

object
{
  sphere {<0, 0, 0>, 200}
  hollow
  texture
  {
    pigment {...}
    finish {ambient 1 diffuse 0}
  }
}

If you render that as a square image (e.g., 100x100 pixels) it loops
quite nicely... The image is a bit distorted though. The other
possibility is to use

camera
{
  ultra_wide_angle
  angle 360
  location <0, 0, 0>
  direction z
  up y
  right x
}

But that has other distortions too. (I like the first one better!)
Can anyone think of more creating ways of going about this? Perhaps
something weird could be done using function pigments and an
orthographic camera?

Thanks.
Andrew.

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPZHZ07EpzUF0Y1JeEQIqpACgtYFVgyfK0W44Ss/1NSPDL8IR7yAAoLo5
Ub6GQgo43JMd+SqTse5bn+k6
=QZeB
-----END PGP SIGNATURE-----


Post a reply to this message

From: TinCanMan
Subject: Re: Wallpaper patterns
Date: 25 Sep 2002 16:46:14
Message: <3d922096$1@news.povray.org>
Adapted from my repeating HF generator from:
(http://news.povray.org/povray.binaries.scene-files/26011/)
This uses a function pigment, there is a bit of distortion, but depending on
the pattern, it is nowhere near as noticeable as the spherical camera type,
and it is repeating in both the x and y directions rather than giving the
'banding' that the spherical camera tends to give.

-tgq


//start scene
camera{
  orthographic
  up y*image_height
  right x*image_width
  location -z
  look_at  0
}

#macro RepeatPattern(Ptrn)//macro to make repeating texture
  #macro CMap(C) color_map{[0 rgbt C*<3,3,3,0>+<0,0,0,1>][1 rgbt
C*<3,3,3,0>+<0,0,0,0>]}#end
  #local Pat=function{pigment{Ptrn}}
  #local FR=function{Pat(cos(x),sin(y),(sin(x)+cos(y))/2).red}
  #local FG=function{Pat(cos(x),sin(y),(sin(x)+cos(y))/2).green}
  #local FB=function{Pat(cos(x),sin(y),(sin(x)+cos(y))/2).blue}
  average
  texture_map {
    [pigment{function{FR(x,y,z)} CMap(<1,0,0>)}finish{ambient 1}]
    [pigment{function{FG(x,y,z)} CMap(<0,1,0>)}finish{ambient 1}]
    [pigment{function{FB(x,y,z)} CMap(<0,0,1>)}finish{ambient 1}]
  }
  scale <image_width,image_height,1>/radians(360)
#end

#declare Ptrn=//use whatever pattern you want here as a pigment
pigment{
  bozo turbulence 0.72
  color_map{
    [0 rgb <1,0,0>]
    [1 rgb <0,1,0>]
  }
  scale 1/2
}

plane{z 0 texture{RepeatPattern(Ptrn)}}

//end scene


Post a reply to this message

From: Andrew Coppin
Subject: Re: Wallpaper patterns
Date: 26 Sep 2002 05:14:06
Message: <3d92cfde@news.povray.org>
Thanks for that! Will try 'em out a bit later... (POV-Ray is doing an
animation right now ;-)

Andrew.


Post a reply to this message

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