POV-Ray : Newsgroups : povray.general : Tiled Background Images... Server Time
11 Aug 2024 19:36:29 EDT (-0400)
  Tiled Background Images... (Message 1 to 9 of 9)  
From: John Shadow
Subject: Tiled Background Images...
Date: 13 Jun 1999 01:48:54
Message: <376346DC.4B9F50C@usa.net>
Greetings,
  Can SOMEONE please help me???  I'm looking for info on how to make
seamless tiled images, using Pov-Ray to render them....anyone know where
I can find this info???  I thought I once found it on a web-site or in
the help file, but alas, that was several months ago, and I've forgotten
where I read that information, or if I even did in the first
place...please help if you can..:)

John Shadow
JSh### [at] usanet


Post a reply to this message

From: Alan Kong
Subject: Re: Tiled Background Images...
Date: 13 Jun 1999 02:05:22
Message: <376449df.87192908@news.povray.org>
On Sun, 13 Jun 1999 00:51:24 -0500, John Shadow <JSh### [at] usanet>
wrote:

>  Can SOMEONE please help me???  I'm looking for info on how to make
>seamless tiled images, using Pov-Ray to render them...

  Chris Colefax has a tile generator include file that can do this:

http://www.geocities.com/SiliconValley/Lakes/1434/

-- 
Alan
--------------------------------------------------------------------
http://www.povray.org - Home of the Persistence of Vision Ray Tracer
news.povray.org - where POV-Ray enthusiasts around the world can get
together to exchange ideas, information, and experiences with others
--------------------------------------------------------------------


Post a reply to this message

From: David Cook
Subject: Re: Tiled Background Images...
Date: 13 Jun 1999 23:18:01
Message: <37647469@news.povray.org>
FYI, I asked this same question a few weeks ago and was also referred to
Chris Colefax's code. Turns out that what he does is use a gradient to sort
of blend the pattern. This kind of works ok if the pattern isn't too
complex, or if its an even (v.s. an odd) number of regular elements. I
haven't found a really good solution yet. Please let me know if any of you
out there have any better suggestions. But even so, my compliments to Chris
Colefax. This and all of his other work is extraordinarily educational, at
the least.

Here's an example you can play with to see what I mean:

// TexTileTest.pov
// This is for testing the TextureTile.inc utility.
// 22-May-99
// D. Cook

#include "colors.inc"
#include "woods.inc"
#include "stones.inc"

global_settings
{
  assumed_gamma 1.5 // this is a dark scene, make it brighter
}

light_source {-z * 100000 rgb <1, 1, 1>}

file:#declare TileTexture = texture {T_Wood32 scale 4 rotate <80, 0, 10>}
// looks like dried mud
file://#declare TileTexture = texture {T_Stone28 scale .2}
file://#declare TileTexture = texture {T_Stone31 scale .2}

// classic checkerboard
// This illustrates how the TextureTile works, which is by blending
// the texture from the corners by means of a gradient. As you can see,
// if the number of squares is an even number, everything is fine. But
// if it has to do a blend, things get fuzzy in the middle. This is the
// problem with using sharply defined textures such as stone, marble, etc.
// as a tile texture - they get fuzzy in the middle.
// Oh well, you can't have everything...
#declare TileTexture = texture
{
  pigment {checker color rgb 1 color blue 1 scale 0.0666}
  file://pigment {checker color rgb 1 color rgb 0 scale 0.5}
  finish {reflection 0.2}     // original version
  file://finish {reflection 0.5}   // more reflecton
}

#include "TextureTiler.inc"

--- End of TexTileTest.pov


Alan Kong <ako### [at] pacbellNO-SPAMnet> wrote in message
news:376449df.87192908@news.povray.org...
> On Sun, 13 Jun 1999 00:51:24 -0500, John Shadow <JSh### [at] usanet>
> wrote:
>
> >  Can SOMEONE please help me???  I'm looking for info on how to make
> >seamless tiled images, using Pov-Ray to render them...
>
>   Chris Colefax has a tile generator include file that can do this:
>
> http://www.geocities.com/SiliconValley/Lakes/1434/
>
> --
> Alan
> --------------------------------------------------------------------
> http://www.povray.org - Home of the Persistence of Vision Ray Tracer
> news.povray.org - where POV-Ray enthusiasts around the world can get
> together to exchange ideas, information, and experiences with others
> --------------------------------------------------------------------


Post a reply to this message

From: Mark Wagner
Subject: Re: Tiled Background Images...
Date: 14 Jun 1999 00:05:30
Message: <37647f8a@news.povray.org>
John Shadow wrote in message <376### [at] usanet>...
>Greetings,
>  Can SOMEONE please help me???  I'm looking for info on how to make
>seamless tiled images, using Pov-Ray to render them....anyone know where
>I can find this info???  I thought I once found it on a web-site or in
>the help file, but alas, that was several months ago, and I've forgotten
>where I read that information, or if I even did in the first
>place...please help if you can..:)


If you want to tile a single existing image file, there is a way of
modifying it so it will seamlessly tile a plane.  Using a paint program,
copy the image.  Then, create a new image with each dimension being twice
that dimension in the original image.  Paste a copy of the original image
into the top-left corner.  Paste another copy in the bottom-left corner, but
flip this copy around the horizontal axis so it is upside-down.  Paste a
third copy in the top-right corner, flipped so it is mirrored around the
vertical axis.  Paste a fourth copy in the remaining corner flipped both
horizontally and vertically.  Save the resulting image.  This image then can
be tiled seamlessly with itself.  A similar variant done entirely in POV-Ray
can be used to make 'infinite' height-fields and similar things.

Mark


Post a reply to this message

From: Alan Kong
Subject: Re: Tiled Background Images...
Date: 14 Jun 1999 00:06:49
Message: <37697f3d.166402607@news.povray.org>
On Sun, 13 Jun 1999 20:15:47 -0700, "David Cook" <nos### [at] homecom>
wrote:

>FYI, I asked this same question a few weeks ago and was also referred to
>Chris Colefax's code. Turns out that what he does is use a gradient to sort
>of blend the pattern. This kind of works ok if the pattern isn't too
>complex, or if its an even (v.s. an odd) number of regular elements. I
>haven't found a really good solution yet.

  Hi, David. I think there will always be limitations to creating a tileable
image that wasn't designed to be tileable. I found a link for a Photoshop
plug-in to make an image tileable (I think it's usable with Paint Shop Pro
v5.0) somewhere on Truman Brown's pages and it had similar limitations.

http://www.websharx.com/~ttbrown/tbtwfs.html

  I suppose the only alternative is to tweak the scene code to manually
blend the image to be as tileable as possible, though this may be difficult
in many cases.

-- 
Alan
--------------------------------------------------------------------
http://www.povray.org - Home of the Persistence of Vision Ray Tracer
news.povray.org - where POV-Ray enthusiasts around the world can get
together to exchange ideas, information, and experiences with others
--------------------------------------------------------------------


Post a reply to this message

From: Ron Parker
Subject: Re: Tiled Background Images...
Date: 14 Jun 1999 10:15:07
Message: <37650e6b@news.povray.org>
On Mon, 14 Jun 1999 04:07:04 GMT, Alan Kong wrote:
>  I suppose the only alternative is to tweak the scene code to manually
>blend the image to be as tileable as possible, though this may be difficult
>in many cases.

You can always tweak the POV source code.  It should be possible to make
crackle, bozo, turbulence, and whatnot be tileable with some relatively 
minor changes in the code, though you might need to change the lacunarity
of the noise code to make it work.  If you do, make it an option and give 
us a patch.


Post a reply to this message

From: Rune S  Johansen
Subject: Re: Tiled Background Images...
Date: 14 Jun 1999 19:46:26
Message: <37659452@news.povray.org>
Ron Parker wrote:
>On Mon, 14 Jun 1999 04:07:04 GMT, Alan Kong wrote:
>>  I suppose the only alternative is to tweak the scene code to manually
>>blend the image to be as tileable as possible, though this may be
difficult
>>in many cases.
>
>You can always tweak the POV source code.  It should be possible to make
>crackle, bozo, turbulence, and whatnot be tileable with some relatively
>minor changes in the code, though you might need to change the lacunarity
>of the noise code to make it work.  If you do, make it an option and give
>us a patch.

Another way is to use a special camera...
This method will distort the texture (or scene) in strange ways, but it
remains absolutely clear and unblended.
In the code below you can replace the textured sphere with any scene, and
you can change the location and look_at of the camera to whatever you wish.
You will be able to get some really interesting effects...

// Width and height of output image must be equal.

camera {
   ultra_wide_angle
   location <0,0,0>
   up y
   right x
   angle 360*pi
   look_at <1,1,1>
}

sphere {
   0, 1
   pigment {spiral1 1}
   finish {ambient 1 diffuse 0}
   hollow
}

Greetings,

Rune S. Johansen
http://welcome.to/rsj


Post a reply to this message

From: Chris Colefax
Subject: Re: Tiled Background Images...
Date: 16 Jun 1999 20:24:20
Message: <3767016A.ED8F3742@ledanet.com.au>
David Cook wrote:
> 
> FYI, I asked this same question a few weeks ago and was also referred to
> Chris Colefax's code. Turns out that what he does is use a gradient to sort
> of blend the pattern. This kind of works ok if the pattern isn't too
> complex, or if its an even (v.s. an odd) number of regular elements. I
> haven't found a really good solution yet. Please let me know if any of you
> out there have any better suggestions. But even so, my compliments to Chris
> Colefax. This and all of his other work is extraordinarily educational, at
> the least.

Yes, this is exactly what the first version of the Texture Tiler include
file did (ie. use gradient blends), and some patterns don't blend well
this way.  The question, though, is how would you *expect* to blend a
checker pattern that doesn't quite fit into the available space...?

The good news is that the Tile Generator macro file offers plenty of
other blending options.  You could try the new blob tile, which allows
you to blend textures/pigments mapped to tiled blobs, giving a more
"organic" seam.  Or, you could create a layered, random object tile that
includes blue and white boxes (you won't get a regular checker pattern,
but if that's all you want then you don't need the Texture Tiler or Tile
Generator anyway!).


Post a reply to this message

From: John Shadow
Subject: Re: Tiled Background Images...
Date: 17 Jun 1999 18:55:26
Message: <37697D7A.1A5377F7@aol.com>
Chris Colefax wrote:

> Yes, this is exactly what the first version of the Texture Tiler include
> file did (ie. use gradient blends), and some patterns don't blend well
> this way.  The question, though, is how would you *expect* to blend a
> checker pattern that doesn't quite fit into the available space...?
>
> The good news is that the Tile Generator macro file offers plenty of
> other blending options.  You could try the new blob tile, which allows
> you to blend textures/pigments mapped to tiled blobs, giving a more
> "organic" seam.  Or, you could create a layered, random object tile that
> includes blue and white boxes (you won't get a regular checker pattern,
> but if that's all you want then you don't need the Texture Tiler or Tile
> Generator anyway!).

Wow, Kewl!! Chris Colefax actually had a message in my news thread!:D  By the
way, thanks for everyone who replied to my post.  This has helped alot, if only
pointing me in the directions I need to search further:)

John Shadow


Post a reply to this message

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