|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I have always liked the Rayshade lighting model, since you can specify the
ambient, diffuse and specular colour as rgb values, instead of the POV-Ray
percentage of diffuse model.
What are the chances of allowing this in POV-Ray? Or can someone tell me how to
write a Renderman surface shader that will mimic the Rayshade model so I can
use it with POVMan.
The problem with the POV-Ray model is that you can never get exactly the colour
you want, even when you iteratively try and refine it. If you change the light
you have to redo all the colour. It's harder to get the colour you want, cause
you can't just directly specify it.
Thanks
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Grim Reaper nous illumina en ce 2008-06-04 04:21 -->
> I have always liked the Rayshade lighting model, since you can specify the
> ambient, diffuse and specular colour as rgb values, instead of the POV-Ray
> percentage of diffuse model.
>
> What are the chances of allowing this in POV-Ray? Or can someone tell me how to
> write a Renderman surface shader that will mimic the Rayshade model so I can
> use it with POVMan.
>
> The problem with the POV-Ray model is that you can never get exactly the colour
> you want, even when you iteratively try and refine it. If you change the light
> you have to redo all the colour. It's harder to get the colour you want, cause
> you can't just directly specify it.
>
> Thanks
>
>
In POV-Ray you can always set those parameters with a full colour instead of
shades of gray. diffuse 1 get promoted to diffuse<1,1,1>.
The following are all legal:
ambient <1,0.5,0.1>/10 // give a red tint to your shadowed areas. Also to the
rest of the object.
diffuse <0.2, 1, 0.898> // This object will apears blue-green
specular <0.5,0.3,0.8> // bluish megenta specular highlights.
phong <0,1,0> // green phong highlight
If you want rgb value in the 0-255 range, just divide the colour vector by 255.
--
Alain
-------------------------------------------------
99 percent of lawyers give the rest a bad name.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Alain <ele### [at] netscapenet> wrote:
> The following are all legal:
> ambient <1,0.5,0.1>/10 // give a red tint to your shadowed areas. Also to the
> rest of the object.
> diffuse <0.2, 1, 0.898> // This object will apears blue-green
> specular <0.5,0.3,0.8> // bluish megenta specular highlights.
> phong <0,1,0> // green phong highlight
I'm probably completely wrong, but I thought that diffuse, specular and phong
have always accepted only floats, not colour values. It certainly seems that
way in 3.61, at least. Is this incorrect?
Tom
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Alain <ele### [at] netscapenet> wrote:
> In POV-Ray you can always set those parameters with a full colour instead of
> shades of gray. diffuse 1 get promoted to diffuse<1,1,1>.
>
> The following are all legal:
> ambient <1,0.5,0.1>/10 // give a red tint to your shadowed areas. Also to the
> rest of the object.
> diffuse <0.2, 1, 0.898> // This object will apears blue-green
> specular <0.5,0.3,0.8> // bluish megenta specular highlights.
> phong <0,1,0> // green phong highlight
>
> If you want rgb value in the 0-255 range, just divide the colour vector by 255.
Tried it, but the only one that allows a vector is ambient, the others do not.
Also the ambient vector does not work as expected, instead of setting the
ambient colour to that colour it just seems to change it to the equivalent
percentage (float) value.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Grim Reaper" <sup### [at] hotmailcom> wrote in message
news:web.484923ac4c6c80f26863987c0@news.povray.org...
> Alain <ele### [at] netscapenet> wrote:
>
>> In POV-Ray you can always set those parameters with a full colour instead
>> of
>> shades of gray. diffuse 1 get promoted to diffuse<1,1,1>.
>>
>> The following are all legal:
>> ambient <1,0.5,0.1>/10 // give a red tint to your shadowed areas. Also to
>> the
>> rest of the object.
>> diffuse <0.2, 1, 0.898> // This object will apears blue-green
>> specular <0.5,0.3,0.8> // bluish megenta specular highlights.
>> phong <0,1,0> // green phong highlight
>>
>> If you want rgb value in the 0-255 range, just divide the colour vector
>> by 255.
>
> Tried it, but the only one that allows a vector is ambient, the others do
> not.
> Also the ambient vector does not work as expected, instead of setting the
> ambient colour to that colour it just seems to change it to the equivalent
> percentage (float) value.
>
Ambient seems to work the way I would expect it to when a colour is
specified, so the following code shows up as mainly red, even though the
pigment is more yellow.
camera {location <0,0,-1> look_at 0}
light_source { <-4,75 ,-10 >, rgb 1}
sphere {<0,0,3>,1
pigment {rgb <0.5,1,0>}
finish {ambient <1,0,0> phong 0.5}
}
Diffuse, Specular and Phong in the 3.6.1 help are listed as accepting an
'Amount', rather than a 'Color' and POV-Ray 3.6.1 whinges about it when a
colour is specified. Can anyone verify the behaviour of the 3.7 beta?
Regards,
Chris B.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Tom York" <alp### [at] zubenelgenubi34spcom> wrote:
> Alain <ele### [at] netscapenet> wrote:
> > The following are all legal:
> > ambient <1,0.5,0.1>/10 // give a red tint to your shadowed areas. Also to the
> > rest of the object.
> > diffuse <0.2, 1, 0.898> // This object will apears blue-green
> > specular <0.5,0.3,0.8> // bluish megenta specular highlights.
> > phong <0,1,0> // green phong highlight
>
> I'm probably completely wrong, but I thought that diffuse, specular and phong
> have always accepted only floats, not colour values. It certainly seems that
> way in 3.61, at least. Is this incorrect?
>
> Tom
Is absolutely correct, unfortunately.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Ambient seems to work the way I would expect it to when a colour is
> specified, so the following code shows up as mainly red, even though the
> pigment is more yellow.
>
> camera {location <0,0,-1> look_at 0}
> light_source { <-4,75 ,-10 >, rgb 1}
> sphere {<0,0,3>,1
> pigment {rgb <0.5,1,0>}
> finish {ambient <1,0,0> phong 0.5}
> }
Your example works for me to, but it seems to only work when the ambient and rgb
shares rgb values, that is the red component is more than zero for both. The
following for example doesn't work as expected.
camera {location <0,0,-1> look_at 0}
light_source { <-4,75 ,-10 >, rgb 1}
sphere
{
<0,0,3>,1
pigment {rgb <0.8, 0, 0>}
finish
{
ambient <0, 0, 1> phong 0.5
}
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Grim Reaper <sup### [at] hotmailcom> wrote:
> The following for example doesn't work as expected.
Actually it does work as expected. If the surface is pure red, it does
not reflect anything than red light. It will not reflect blue light. Thus
it will not reflect blue ambient light either.
POV-Ray was designed from the very start to emulate classical lighting
principles such as this one (although, admittedly, you can still achieve
physically incorrect results, such as an object reflecing *more* light
than it's receiving).
I'm not saying that's a good (or a bad) thing. I'm just stating a fact.
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Grim Reaper" <sup### [at] hotmailcom> wrote in message
news:web.484baa224c6c80f26863987c0@news.povray.org...
>> Ambient seems to work the way I would expect it to when a colour is
>> specified...
>
> Your example works for me to, but it seems to only work when the ambient
> and rgb
> shares rgb values, that is the red component is more than zero for both.
>
Ah I can see what you're expecting, but the Ambient setting is controlling
how much of the light coming from the object simulates ambient lighting of
the pigment specified. If the colour of the object has a zero red component
then any red in the ambient lighting will have no impact. By contrast, I
believe that the 'reflection' finish setting is independant of the colour of
the pigment, allowing red to be reflected off a pure shiny green surface.
Regards,
Chris B.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp <war### [at] tagpovrayorg> wrote:
> Grim Reaper <sup### [at] hotmailcom> wrote:
> > The following for example doesn't work as expected.
>
> Actually it does work as expected. If the surface is pure red, it does
> not reflect anything than red light. It will not reflect blue light. Thus
> it will not reflect blue ambient light either.
>
> POV-Ray was designed from the very start to emulate classical lighting
> principles such as this one (although, admittedly, you can still achieve
> physically incorrect results, such as an object reflecing *more* light
> than it's receiving).
>
> I'm not saying that's a good (or a bad) thing. I'm just stating a fact.
>
> --
> - Warp
Ok so I guess the question becomes: Does anyone know what lighting model formula
I can use to mimic the Rayshade lighting model in POVMan through a Renderman
shader?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|