|
![](/i/fill.gif) |
Jimbob wrote:
> Hi,
> im a relatively new POV-ray user, and im having trouble creating stained
> glass windows.
>
> I am trying to create a "wizards" room, with a table with crystal ball
> etc, and stained glass windows at the back of the scene letting in
> coloured light.
>
> I started by putting up a "wall" at the back with two cylindrical holes
> in it. I then inserted two cylinders with "Glass" texture in the holes,
> and giving the windows a filtering image map (filter all 0.9).
>
> I the put a light source behind the wall, expecting the light to shine
> through the windows, illuminating them and casting coloured filtered
> light on the scene. However, the windows do not illuminate, and as far
> as i can see, no coloured light is cast on the scene.
>
> Am i going about this correctly? what am i doing wrong? if anyone could
> help me with this i would be very grateful. If you could, please reply
> to my email address, but i realise some newsgroups dont welcome that, so
> post to the newsgroup if you want to...
>
> thanks
> --
> Grant 'Jimbob' Williamson
> jim### [at] gwbbs net au
> http://gwbbs.net.au/jimbobs/
I have made stained glass before and it is a relitively straight foreward process.
I believe there is a neutral glass in the glass.inc file called
glass4 or NormBowlerGlass. It is a clear glass texture that makes
a good base to work from. The image map could work but offers less
control of the filtering process. Here is an example using the
clear glass for the base and what you can do to add color to it:
cylinder<0,0,-.5>,<0,0,0.5>,2
texture{ClearGlass
pigment{ rgbf<0.65, 0.1, 0, 0.95>}
}
}
If you place a white light behind this cylinder you should
have no problem seeing a red light cast from the pigment that has
been added to the glass. Adjust the ior value of the base glass
as need to change the way the light refracts through the glass.
Depending on the thickness of the base material and the ior used
the light will come through with differing properties and the ior
can radically affect this.
You can even make it multi-colored by using a color map and the
pigment pattern of your choice. Just make sure you add a filtering
value to each color in the color_map. Marble and gradient patterns
are good to start with and add a little turbulence to the pattern
to help blend the color demarcation lines.
If you are determined to use your image_map as a color pattern
for your scene, apply it to a base glass texture so that it inherits
the properties of glass. Otherwise all you are doing is filtering the
image and not producing a material with glass like properties.
It would look like this in your scene:
cylinder<0,0,-.5>,<0,0,0.5>,2
texture{ClearGlass
pigment{
image_map{tga "GlassMap.tga" interpolate 2}
scale<your scale>}
}
}
For some interesting effects add a surface normal to your cylinder.
Add a heavy bump or dent pattern and you will get a glass that obscures
objects behind it but will let the light show through. Many people use
this kind of glass in their front door, where the want some light to
shine through, but don't want people at the front door to see into the
house. For a frosted glass look use the same normal patterns but scale
them very small.
Ken Tyler
Post a reply to this message
|
![](/i/fill.gif) |