|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
The checker pattern gives:
ABABABAB
BABABABA
ABABABAB
BABABABA
But what is the best way to obtain
ABCABCABCABC
BCABCABCABCA
CABCABCABCAB
ABCABCABCABC
BCABCABCABCA
and other general checker patterns? Must these be done "by hand" using
loops?
Thanks,
Rick Mabry
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Rick Mabry <rma### [at] softdiskcom> wrote:
> The checker pattern gives:
>
> ABABABAB
> BABABABA
> ABABABAB
> BABABABA
>
> But what is the best way to obtain
>
> ABCABCABCABC
> BCABCABCABCA
> CABCABCABCAB
> ABCABCABCABC
> BCABCABCABCA
>
> and other general checker patterns? Must these be done "by hand" using
> loops?
POV-Ray includes the hexagon pattern, which tiles three colours, pigments,
textures, etc. using (duh!) hexagons. If you want other tiled patterns you
should be able to use repeat warps (best for flat colours) and/or nested
patterns, e.g. a macro to create the tiling pattern you've shown above:
#macro checker_pigment (Pigment1, Pigment2, Pigment3)
gradient y pigment_map {
[1/3 gradient x pigment_map {
[1/3 Pigment1] [1/3 Pigment2] [2/3 Pigment2] [2/3 Pigment3]}
]
[1/3 gradient x pigment_map {
[1/3 Pigment3] [1/3 Pigment1] [2/3 Pigment1] [2/3 Pigment2]}
]
[2/3 gradient x pigment_map {
[1/3 Pigment3] [1/3 Pigment1] [2/3 Pigment1] [2/3 Pigment2]}
]
[2/3 gradient x pigment_map {
[1/3 Pigment2] [1/3 Pigment3] [2/3 Pigment3] [2/3 Pigment1]}
]
}
scale 3
#end
plane {z, 20
pigment {checker_pigment (rgb x, rgb y, rgb z) translate -100}
finish {ambient 1 diffuse 0}
}
This macro can be easily modified for tiling complete textures, and extended
into the third dimension (z) if needed. The only thing to note is that the
gradient pattern is symmetrical around the origin, so the tiling breaks
along the x and y axes. This is easily avoided by translating the pattern
origin out of view.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Wed, 15 Nov 2000 16:42:06 +1000, "Chris Colefax"
<chr### [at] tagpovrayorg> wrote:
>This macro can be easily modified for tiling complete textures, and extended
>into the third dimension (z) if needed. The only thing to note is that the
>gradient pattern is symmetrical around the origin, so the tiling breaks
>along the x and y axes. This is easily avoided by translating the pattern
>origin out of view.
How about using marble with ramp_wave?
Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] usanet
TAG e-mail : pet### [at] tagpovrayorg
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Wed, 15 Nov 2000 16:42:06 +1000, Chris Colefax wrote:
>This macro can be easily modified for tiling complete textures, and extended
>into the third dimension (z) if needed. The only thing to note is that the
>gradient pattern is symmetrical around the origin, so the tiling breaks
>along the x and y axes. This is easily avoided by translating the pattern
>origin out of view.
Or using a repeat warp, which is how I would have done it.
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 15 Nov 2000 09:32:07 -0500, Ron Parker wrote:
>On Wed, 15 Nov 2000 16:42:06 +1000, Chris Colefax wrote:
>>This macro can be easily modified for tiling complete textures, and extended
>>into the third dimension (z) if needed. The only thing to note is that the
>>gradient pattern is symmetrical around the origin, so the tiling breaks
>>along the x and y axes. This is easily avoided by translating the pattern
>>origin out of view.
>
>Or using a repeat warp, which is how I would have done it.
That is,
#macro checker_pigment (Pigment1, Pigment2, Pigment3)
gradient x pigment_map {
[1/3 Pigment1] [1/3 Pigment2] [2/3 Pigment2] [2/3 Pigment3]}
warp {repeat x}
warp {repeat y offset 1/3*x}
scale <3,1,1>
#end
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thanks for the macro suggestions. They both worked great for color pigments.
I am trying to modify them to allow for image_maps --- at present they do
not seem to accomodate these (due to stretching and such).
Rick
"Ron Parker" <ron### [at] povrayorg> wrote in message
news:slr### [at] fwicom...
> On 15 Nov 2000 09:32:07 -0500, Ron Parker wrote:
> >On Wed, 15 Nov 2000 16:42:06 +1000, Chris Colefax wrote:
> >>This macro can be easily modified for tiling complete textures, and
extended
> >>into the third dimension (z) if needed. The only thing to note is that
the
> >>gradient pattern is symmetrical around the origin, so the tiling breaks
> >>along the x and y axes. This is easily avoided by translating the
pattern
> >>origin out of view.
> >
> >Or using a repeat warp, which is how I would have done it.
>
> That is,
>
> #macro checker_pigment (Pigment1, Pigment2, Pigment3)
> gradient x pigment_map {
> [1/3 Pigment1] [1/3 Pigment2] [2/3 Pigment2] [2/3 Pigment3]}
> warp {repeat x}
> warp {repeat y offset 1/3*x}
> scale <3,1,1>
> #end
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Something seems strange in the documentation. In the section "Pigment Maps
and Pigment Lists," there is the statement:
`You may not use pigment_map or individual pigments with an image_map. See
section "Texture Maps" for an alternative way to do this.'
Even though image_maps didn't give me just what I wanted (yet), an image was
rendered using the image_maps I provided.
Rick.
"Ron Parker" <ron### [at] povrayorg> wrote in message
news:slr### [at] fwicom...
> #macro checker_pigment (Pigment1, Pigment2, Pigment3)
> gradient x pigment_map {
> [1/3 Pigment1] [1/3 Pigment2] [2/3 Pigment2] [2/3 Pigment3]}
> warp {repeat x}
> warp {repeat y offset 1/3*x}
> scale <3,1,1>
> #end
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Wed, 15 Nov 2000 12:00:24 -0500, Rick Mabry wrote:
>Thanks for the macro suggestions. They both worked great for color pigments.
>I am trying to modify them to allow for image_maps --- at present they do
>not seem to accomodate these (due to stretching and such).
In that case, try the modification below. Make your image maps fit in the
square from <0,0,0> to <1,1,0>. (If you do that and make them tiled, you can
remove the translates in the macro below as well.)
>> #macro checker_pigment (Pigment1, Pigment2, Pigment3)
>> gradient x pigment_map {
>> [1/3 Pigment1] [1/3 Pigment2] [2/3 Pigment2] [2/3 Pigment3]}
Replace this line with
[1/3 Pigment1 scale <1/3,1,1>]
[1/3 Pigment2 translate x scale <1/3,1,1>]
[2/3 Pigment2 translate x scale <1/3,1,1>]
[2/3 Pigment3 translate 2*x scale <1/3,1,1>]
}
>> warp {repeat x}
>> warp {repeat y offset 1/3*x}
>> scale <3,1,1>
>> #end
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Ron Parker" <ron### [at] povrayorg> wrote in message
news:slr### [at] fwicom...
> On Wed, 15 Nov 2000 12:00:24 -0500, Rick Mabry wrote:
> >Thanks for the macro suggestions. They both worked great for color
pigments.
> >I am trying to modify them to allow for image_maps --- at present they do
> >not seem to accomodate these (due to stretching and such).
> In that case, try the modification below [snip]
Thanks, that worked nicely for the ABC/BCA/CAB version. I also modified the
macro from Chris by sprinkling some instances of "scale 1/3", after which it
worked well for image_maps.
Gratefully yours,
Rick Mabry
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ron Parker <ron### [at] povrayorg> wrote:
> Or using a repeat warp, which is how I would have done it.
This is the first suggestion I made (see my original reply), but if
patterned pigments are used, a repeat warp will cause repeated sections of
the child patterns to render. The macro I posted avoids this, behaving
instead like the internal checker and hexagon patterns.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|