|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Fact: POV-Ray can use an image as a pigment.
Fact: POV-Ray can use a pigment as a function.
Fact: POV-Ray can use a function as a pigment.
In spite of the above, I can't seem to get POV-Ray to load an image as a
pigment, turn the pigment into a function, and then turn the function
back into a pigment again. (I want to **** around with the coordinates.)
Any hints?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Orchid XP v3 wrote:
> Fact: POV-Ray can use an image as a pigment.
> Fact: POV-Ray can use a pigment as a function.
> Fact: POV-Ray can use a function as a pigment.
>
> In spite of the above, I can't seem to get POV-Ray to load an image as a
> pigment, turn the pigment into a function, and then turn the function
> back into a pigment again. (I want to **** around with the coordinates.)
>
> Any hints?
Does this help? It's approximated using the default assumed_gamma, and
may not be perfect, but it's a start:
#declare img =
pigment{
image_map{
png"povmap.png"
}
scale<320,200,1>/320
}
#declare f_img =
function{
pigment{ img }
}
#declare option_1 = // no color
pigment{
function{ f_img(x,y,z).grey }
}
#declare option_2 = // approximated colors
pigment{
average
pigment_map{
[1 function{ f_img(x,y,z).x } color_map{[0 rgb 0][1 rgb x*1.55]} ]
[1 function{ f_img(x,y,z).y } color_map{[0 rgb 0][1 rgb y*1.55]} ]
[1 function{ f_img(x,y,z).z } color_map{[0 rgb 0][1 rgb z*1.55]} ]
}
}
plane{z,0
pigment{option_2}
finish{ambient 1}
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>> Any hints?
>
> Does this help? It's approximated using the default assumed_gamma, and
> may not be perfect, but it's a start:
I see... So a pigment function has to be colour_mapped? That would
explain why it's not working.
Ah, but I can extract all three colour components, turn each into a
pigment, and average them together... ingenius!
OK, I'll give that a go.
PS. I'm not using any gamma correction at all - I don't know what it is
or how it works. So...
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Orchid XP v3 wrote:
> I see... So a pigment function has to be colour_mapped? That would
> explain why it's not working.
Anytime I've tried to apply a color_map to a function pigment, it never
looked right. I have just recently discovered the .x, .y, .z extensions
to functions.
> Ah, but I can extract all three colour components, turn each into a
> pigment, and average them together... ingenius!
>
> OK, I'll give that a go.
Let me know how it works for you.
> PS. I'm not using any gamma correction at all - I don't know what it is
> or how it works. So...
It lightens/darkens an image. It helps to fix dark scenes, or washed-out
scenes (which are less likely with POV).
~Sam
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Orchid XP v3 <voi### [at] devnull> wrote:
> >> Any hints?
> >
> > Does this help? It's approximated using the default assumed_gamma, and
> > may not be perfect, but it's a start:
>
> I see... So a pigment function has to be colour_mapped? That would
> explain why it's not working.
>
> Ah, but I can extract all three colour components, turn each into a
> pigment, and average them together... ingenius!
>
> OK, I'll give that a go.
>
> PS. I'm not using any gamma correction at all - I don't know what it is
> or how it works. So...
Yes, functions don't carry vectors. Here is a simple example of how I use
it (I use the .red, .green and .blue filters rather than .x, .y and .z):
//START
#local PIMAGE = function {pigment{image_map {sys ImageMap interpolate 2}}}
#local FRd=function(x,y) {PIMAGE(x,y,0).red }
#local FGn=function(x,y) {PIMAGE(x,y,0).green }
#local FBl=function(x,y) {PIMAGE(x,y,0).blue }
box{<0,0,0>,<1,1,1>
texture{average
texture_map{
[pigment{function{FRed(x,y)} color_map{[0 rgb 0][1 rgb
<1,0,0>]}} finish {ambient 3 diffuse 0}]
[pigment{function{FGrn(x,y)} color_map{[0 rgb 0][1 rgb
<0,1,0>]}} finish {ambient 3 diffuse 0}]
[pigment{function{FBlu(x,y)} color_map{[0 rgb 0][1 rgb
<0,0,1>]}} finish {ambient 3 diffuse 0}]
#end
}
}
}
//END
-tgq
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Trevor G Quayle <Tin### [at] hotmailcom> wrote:
> Yes, functions don't carry vectors.
Actually function can handle and return vectors. These are called
vector-functions. The problem is that at least currently vector-functions
can't be used as pigments directly. You can only extract the components
of the vector returned by the function (or assign the vector to an
identifier, of course).
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Samuel Benge <stb### [at] hotmailcom> wrote:
> Orchid XP v3 wrote:
> > PS. I'm not using any gamma correction at all - I don't know what it is
> > or how it works. So...
>
> It lightens/darkens an image. It helps to fix dark scenes, or washed-out
> scenes (which are less likely with POV).
>
True...and very useful...but OOH you'll hear loud cries of dissent
from many in the POV community about "abusing gamma."
(I massage assumed_gamma all the time ;-) Just another
artistic tool, IMHO.)
Ken W.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Kenneth wrote:
> Samuel Benge <stb### [at] hotmailcom> wrote:
>> It lightens/darkens an image. It helps to fix dark scenes, or washed-out
>> scenes (which are less likely with POV).
>>
> True...and very useful...but OOH you'll hear loud cries of dissent
> from many in the POV community about "abusing gamma."
> (I massage assumed_gamma all the time ;-) Just another
> artistic tool, IMHO.)
>
> Ken W.
Sometimes the only way to get enough color-saturation in a scene is to
bump up the assumed gamma and brighten the lights. Or you could put a
rgbt<1,1,1,2> plane in front of everything....
~Sam
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Samuel Benge <stb### [at] hotmailcom> wrote:
>
> Does this help? It's approximated using the default assumed_gamma, and
> may not be perfect, but it's a start:
>
So THAT'S how it's done. Thanks, Samuel. VERY useful.
The color_map entry [0 rgb 0] is kind of a mystery to me, though.
What does color_map{[0 rgb 0][1 rgb x*1.55]}, for example, actually tell
POV-Ray to do, in this case? (I do understand the x*1.55 part.)
Ken W.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Kenneth wrote:
> Samuel Benge <stb### [at] hotmailcom> wrote:
>
>> Does this help? It's approximated using the default assumed_gamma, and
>> may not be perfect, but it's a start:
>>
>
> So THAT'S how it's done. Thanks, Samuel. VERY useful.
Your welcome!
> The color_map entry [0 rgb 0] is kind of a mystery to me, though.
> What does color_map{[0 rgb 0][1 rgb x*1.55]}, for example, actually tell
> POV-Ray to do, in this case? (I do understand the x*1.55 part.)
An image has three color channels which range between 0 & 255. All the
color_map is telling POV to do is to apply a color range from 0 to 1.55
(255*1.5)for the red channel. All the channels are combined to make a
complete rgb image.
~Sam
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|