POV-Ray : Newsgroups : povray.binaries.images : Stained Glass Revisited Server Time
16 Nov 2024 18:23:41 EST (-0500)
  Stained Glass Revisited (Message 1 to 10 of 14)  
Goto Latest 10 Messages Next 4 Messages >>>
From: How Camp
Subject: Stained Glass Revisited
Date: 4 Dec 2002 13:57:16
Message: <3dee500c@news.povray.org>
I recognize there have been questions from time-to-time in the newsgroups
related to stained-glass windows.  As I've read through them, I've run into
some questions.  I'd like to create a stained-glass window based on an image
map I have.  In my simplistic approach, I thought of placing a transparent
crackle texture over my image, and then somehow coloring each of the
'pieces' in the texture to be the dominant color below.  Once the image was
created, I could take the resulting output and use various filter values to
allow light to pass through certain glass more than others, etc.

However, I'm not sure if this is really possible, or if it's the easiest way
to create this stained-glass effect.  Can one come up with a method to
'color in' a piece of the crackle pattern?

My latest sad and sorry attempt is attached.  I need to somehow know what
the color is behind each of these pieces.  The center color, average color,
whatever.  Something that allows me to transform each crackle 'piece' into a
solid color.

I messed around a bit with some of the filters recently posted in p.b.i by
Gena Obukhov (thanks!).  The result (second image showing square-ish
patterns) is more like the effect I'm looking for, but I'd rather not have
squares - the crackle pattern is more what I'm after.

Er, so... anyone know how I can work out a similar effect?


Post a reply to this message


Attachments:
Download 'ex_stglass2.png' (56 KB) Download 'ex_stglass.png' (101 KB)

Preview of image 'ex_stglass2.png'
ex_stglass2.png

Preview of image 'ex_stglass.png'
ex_stglass.png


 

From: James Taylor
Subject: Re: Stained Glass Revisited
Date: 4 Dec 2002 14:34:52
Message: <3dee58dc$1@news.povray.org>
I just guessing here, but try the eval_pigment macro

jim


Post a reply to this message

From: Ross Litscher
Subject: Re: Stained Glass Revisited
Date: 4 Dec 2002 14:54:03
Message: <3dee5d5b@news.povray.org>
wow, i'd hate to have to cut, grind, foil and solder(sp) all those pieces.


How Camp <kro### [at] hotmailcom> wrote in message
news:3dee500c@news.povray.org...
> I recognize there have been questions from time-to-time in the newsgroups
> related to stained-glass windows.  As I've read through them, I've run
into
> some questions.  I'd like to create a stained-glass window based on an
image
> map I have.  In my simplistic approach, I thought of placing a transparent
> crackle texture over my image, and then somehow coloring each of the
> 'pieces' in the texture to be the dominant color below.  Once the image
was
> created, I could take the resulting output and use various filter values
to
> allow light to pass through certain glass more than others, etc.
>
> However, I'm not sure if this is really possible, or if it's the easiest
way
> to create this stained-glass effect.  Can one come up with a method to
> 'color in' a piece of the crackle pattern?
>
> My latest sad and sorry attempt is attached.  I need to somehow know what
> the color is behind each of these pieces.  The center color, average
color,
> whatever.  Something that allows me to transform each crackle 'piece' into
a
> solid color.
>
> I messed around a bit with some of the filters recently posted in p.b.i by
> Gena Obukhov (thanks!).  The result (second image showing square-ish
> patterns) is more like the effect I'm looking for, but I'd rather not have
> squares - the crackle pattern is more what I'm after.
>
> Er, so... anyone know how I can work out a similar effect?
>
>
>
>


Post a reply to this message

From: jfmiller
Subject: Re: Stained Glass Revisited
Date: 4 Dec 2002 16:26:59
Message: <3dee7323@news.povray.org>
Boy, I wish I could help you out here.  I have been trying for a different
effect but having simular problems.  the difficultie is how to make
different cells of the crackle pattern different valuse, but to have a
consistent value throughout the cell.  My ultimant conclusion was that to do
this one whould have to hand write the crackle function and abandon the POV
version.  If you can find a more elegant solution please let me know.

JFMILLER

"How Camp" <kro### [at] hotmailcom> wrote in message
news:3dee500c@news.povray.org...
> I recognize there have been questions from time-to-time in the newsgroups
> related to stained-glass windows.  As I've read through them, I've run
into
> some questions.  I'd like to create a stained-glass window based on an
image
> map I have.  In my simplistic approach, I thought of placing a transparent
> crackle texture over my image, and then somehow coloring each of the
> 'pieces' in the texture to be the dominant color below.  Once the image
was
> created, I could take the resulting output and use various filter values
to
> allow light to pass through certain glass more than others, etc.
>
> However, I'm not sure if this is really possible, or if it's the easiest
way
> to create this stained-glass effect.  Can one come up with a method to
> 'color in' a piece of the crackle pattern?
>
> My latest sad and sorry attempt is attached.  I need to somehow know what
> the color is behind each of these pieces.  The center color, average
color,
> whatever.  Something that allows me to transform each crackle 'piece' into
a
> solid color.
>
> I messed around a bit with some of the filters recently posted in p.b.i by
> Gena Obukhov (thanks!).  The result (second image showing square-ish
> patterns) is more like the effect I'm looking for, but I'd rather not have
> squares - the crackle pattern is more what I'm after.
>
> Er, so... anyone know how I can work out a similar effect?
>
>
>
>


Post a reply to this message

From: hughes, b 
Subject: Re: Stained Glass Revisited
Date: 4 Dec 2002 18:15:36
Message: <3dee8c98@news.povray.org>
"jfmiller" <jfm### [at] hotmailcom> wrote in message
news:3dee7323@news.povray.org...
> Boy, I wish I could help you out here.  I have been trying for a different
> effect but having simular problems.  the difficultie is how to make
> different cells of the crackle pattern different valuse, but to have a
> consistent value throughout the cell.  My ultimant conclusion was that to
do
> this one whould have to hand write the crackle function and abandon the
POV
> version.  If you can find a more elegant solution please let me know.

Yeah, a different color within each of the interiors of the cells is
probably not possible since they are all of the same index of that pattern.

Speaking of cells, the cells pattern would make a good stained glass by
itself, just add turbulence. But then you still can't gather color
information into each segment as though an underlying image were used for
the color placements. Also, not really a way to get the leaded borders added
in I guess.


Post a reply to this message

From: Marc-Hendrik Bremer
Subject: Re: Stained Glass Revisited
Date: 5 Dec 2002 03:12:56
Message: <3def0a88@news.povray.org>
"hughes, b." <omn### [at] charternet> schrieb im Newsbeitrag
news:3dee8c98@news.povray.org...
> "jfmiller" <jfm### [at] hotmailcom> wrote in message
> news:3dee7323@news.povray.org...
> > Boy, I wish I could help you out here.  I have been trying for a
different
> > effect but having simular problems.  the difficultie is how to make
> > different cells of the crackle pattern different valuse, but to have a
> > consistent value throughout the cell.  My ultimant conclusion was that
to
> do
> > this one whould have to hand write the crackle function and abandon the
> POV
> > version.  If you can find a more elegant solution please let me know.
>
> Yeah, a different color within each of the interiors of the cells is
> probably not possible since they are all of the same index of that
pattern.

Isn't this, what the "solid"-keyword is meant for? "Causes the same value to
be generated for every point within a specific cell." This way you get one
index for one cell - but you still have to find out a way to map the wanted
colors to the color-indices. Perhaps some "eval_pigment" in a loop? Evaluate
the index of the cell, evaluate the color for this cell, safe that color in
an array at the specified index. Use that array to create the color_map for
the cracle pattern. Might work or not :-)

Regards,

Marc-Hendrik


Post a reply to this message

From: hughes, b 
Subject: Re: Stained Glass Revisited
Date: 5 Dec 2002 11:05:44
Message: <3def7958@news.povray.org>
"Marc-Hendrik Bremer" <Mar### [at] t-onlinede> wrote in message
news:3def0a88@news.povray.org...
>
> "hughes, b." <omn### [at] charternet> schrieb im Newsbeitrag
> news:3dee8c98@news.povray.org...
> >
> > Yeah, a different color within each of the interiors of the cells is
> > probably not possible since they are all of the same index of that
> pattern.
>
> Isn't this, what the "solid"-keyword is meant for? "Causes the same value
to
> be generated for every point within a specific cell." This way you get one
> index for one cell - but you still have to find out a way to map the
wanted
> colors to the color-indices. Perhaps some "eval_pigment" in a loop?
Evaluate
> the index of the cell, evaluate the color for this cell, safe that color
in
> an array at the specified index. Use that array to create the color_map
for
> the cracle pattern. Might work or not :-)

Oops, yes, right you are. And the lead framing can be added with the regular
crackle in a texture layer. I still don't see a way you could ever get the
values into the right positions. That would require some kind of
paint-by-number method plus placement. Crackle randomly positions the cells
so you would only get random colors. You need a paint tool filler sort of
thing to do what is needed for this. Unless there's something I'm
overlooking.


Post a reply to this message

From: Xplo Eristotle
Subject: Re: Stained Glass Revisited
Date: 5 Dec 2002 11:26:40
Message: <3def7e40@news.povray.org>
IME, crackle will produce a passable stained glass-ish effect and MIGHT 
be good for scenes where you're not looking right at the window, but the 
only way to get a really authentic-looking stained glass window is to 
use a photo as an image map, or make your own in an image editor or 
something similar.

The reason is that most stained glass windows aren't truly broken up 
into random cells; instead, they use thick leading to create heavy 
outlines, like a picture in a coloring book, and then fills in those 
outlines with colored glass in a way that may OR MAY NOT be random. 
There's no simple way to do this algorithmically, and in order to even 
try, you would need to create a texture with some kind of edge-finding 
ability, to create the heavy outlines.

(If you wanted to cheat halfway, I suppose you could create an image map 
with just the outlines, and then use a crackle or turbulated cells 
pattern to fill in the colored areas.)

As long as I'm on this subject, I should point out that a lot of stained 
glass isn't crystal clear or consistently colored. A good deal of 
stained glass is milky-looking, or has milky-looking swirls in it; some 
is clear but too dark to really see anything through, and small 
variations in color, color intensity, and transparency/milkiness are 
common. If you don't already have a pretty good idea of what stained 
glass is really like, it would be wise to hunt down some photos to study.

-Xplo


Post a reply to this message

From: Marc-Hendrik Bremer
Subject: Re: Stained Glass Revisited
Date: 5 Dec 2002 11:29:44
Message: <3def7ef8@news.povray.org>
"hughes, b." <omn### [at] charternet> schrieb im Newsbeitrag
news:3def7958@news.povray.org...
> Oops, yes, right you are. And the lead framing can be added with the
regular
> crackle in a texture layer. I still don't see a way you could ever get the
> values into the right positions. That would require some kind of
> paint-by-number method plus placement. Crackle randomly positions the
cells
> so you would only get random colors. You need a paint tool filler sort of
> thing to do what is needed for this. Unless there's something I'm
> overlooking.
>

I don't know, if it is possible. It would be, if every cell gets an unique
number. The docs don't tell anything about the range the solid-values are
in. Probably something between 0 and 255 - but does any cell in the rage of
<0,0,0>, <1,1,1> gets it's own number? Would be nice, but somehow I doubt
it. Would anybody want to take a look at the source code?

Regards,
Marc-Hendrik


Post a reply to this message

From: hughes, b 
Subject: Re: Stained Glass Revisited
Date: 5 Dec 2002 14:55:23
Message: <3defaf2b@news.povray.org>
"Marc-Hendrik Bremer" <Mar### [at] t-onlinede> wrote in message
news:3def7ef8@news.povray.org...
>
> I don't know, if it is possible. It would be, if every cell gets an unique
> number. The docs don't tell anything about the range the solid-values are
> in. Probably something between 0 and 255 - but does any cell in the rage
of
> <0,0,0>, <1,1,1> gets it's own number? Would be nice, but somehow I doubt
> it. Would anybody want to take a look at the source code?

The source code shows a noise function (Perlin?) is used, to get each of a
possible 256 values I believe, but I get lost in all that programming.


Post a reply to this message

Goto Latest 10 Messages Next 4 Messages >>>

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