![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I'm playing with the source to LParser to add a few new formats,
including a couple of pov-ray ones. While creating a example pov file I
came across what I would classify is unexpected behaviour.
In texture.inc Jade is declared as....
#declare Jade =
pigment {
marble
turbulence 1.8
color_map { Jade_Map }
}
if in my pov file I use
#declare texture_3 = texture {Jade}
I get a warning
Parsing.........setup.pov:13: warning: Found pigment identifier that should be in
pigment statement.
however if I use
#declare texture_3 = texture {
pigment {
marble
turbulence 1.8
color_map { Jade_Map }
}
}
I don't get a warning.
So what is going on, is this the expected behaviour, how do I get around
it.
Dave
--
Posted By NewsBe 1.6.4
http://www.vargol.freeserve.co.uk/newsbe/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
David Burnett wrote:
> I'm playing with the source to LParser to add a few new formats,
> including a couple of pov-ray ones. While creating a example pov file I
> came across what I would classify is unexpected behaviour.
>
> In texture.inc Jade is declared as....
>
> #declare Jade =
> pigment {
> marble
> turbulence 1.8
> color_map { Jade_Map }
> }
>
> if in my pov file I use
>
> #declare texture_3 = texture {Jade}
>
> I get a warning
>
> Parsing.........setup.pov:13: warning: Found pigment identifier that should be in
pigment statement.
>
> however if I use
>
> #declare texture_3 = texture {
> pigment {
> marble
> turbulence 1.8
> color_map { Jade_Map }
> }
> }
>
> I don't get a warning.
>
> So what is going on, is this the expected behaviour, how do I get around
> it.
>
> Dave
> --
> Posted By NewsBe 1.6.4
> http://www.vargol.freeserve.co.uk/newsbe/
In the example Jade is a pigment not a texture.
You should be able to use
#declare texture_3 = texture { pigment { Jade } }
--
Dr. Lothar Esser
NIH / NCI
Tel. 301-435-6163
email les### [at] helix nih gov
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
i think it should be:
#declare texture_3 = texture {pigment{Jade} }
for pre-3.5 versions
i.e., declared pigments need to be in pigment wrappers (textures in texture
wrappers, etc.)
-tgq
--
camera{location z*13look_at 0}light_source{15 15looks_like{sphere{0 10
}pigment{rgb 1}finish{ambient 15}}}union{torus{3,0.5rotate x*90}cone{y
*4,.5,-y*8,0}cone{-x*4,.5,x*8,0}pigment{rgb<.7,.6,.4>}finish{ambient 0
diffuse 0reflection{1fresnel on metallic 1}}interior{ior 25}rotate 15}
plane{y,-7pigment{checker rgb 0rgb 1scale 4}finish{diffuse.1}}// TGQ
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Trevor Quayle" <Tin### [at] hotmail com> wrote in message
news:3ba8eb94@news.povray.org...
> i think it should be:
> #declare texture_3 = texture {pigment{Jade} }
>
> i.e., declared pigments need to be in pigment wrappers (textures in
texture
> wrappers, etc.)
Yep, and just to reiterate: keep in mind that the wrapper of each kind of
statement needs to be repeated like that when redeclaring. object,
material, texture, pigment, normal, finish, interior, media, density and
others. I'm not sure of the complete list but most anything with braces {},
aside from CSG union, etc., though. Just happens to be how POV-Ray works
with them.
Probably a good time to point out that layered textures can only be declared
one time through. If trying to add layers into a previously declared
layered texture there will be a warning and it'll stop parsing.
Bob H.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Bob H." wrote:
> Probably a good time to point out that layered textures can only be declared
> one time through. If trying to add layers into a previously declared
> layered texture there will be a warning and it'll stop parsing.
How did you come by that knowledge, Bob? :)
--
Ken Tyler
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Ken" <tyl### [at] pacbel net> wrote in message
news:3BA957B5.B6F538DF@pacbel.net...
>
> "Bob H." wrote:
>
> > Probably a good time to point out that layered textures can only be
declared
> > one time through. If trying to add layers into a previously declared
> > layered texture there will be a warning and it'll stop parsing.
>
> How did you come by that knowledge, Bob? :)
Repitition... and lots of it in my case.
Bob H.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On Wed, 19 Sep 2001 18:16:04 -0500, Bob H. wrote:
>"Trevor Quayle" <Tin### [at] hotmail com> wrote in message
>news:3ba8eb94@news.povray.org...
>> i think it should be:
>> #declare texture_3 = texture {pigment{Jade} }
>>
>> i.e., declared pigments need to be in pigment wrappers (textures in
>texture
>> wrappers, etc.)
>
>Yep, and just to reiterate: keep in mind that the wrapper of each kind of
>statement needs to be repeated like that when redeclaring. object,
>material, texture, pigment, normal, finish, interior, media, density and
>others. I'm not sure of the complete list but most anything with braces {},
>aside from CSG union, etc., though. Just happens to be how POV-Ray works
>with them.
object is a special case. You have to do this:
#declare Foo = sphere{0,1}
object{Foo}
--
#local R=rgb 99;#local P=R-R;#local F=pigment{gradient x}box{0,1pigment{gradient
y pigment_map{[.5F pigment_map{[.3R][.3F color_map{[.15red 99][.15P]}rotate z*45
translate x]}]#local H=pigment{gradient y color_map{[.5P][.5R]}scale 1/3}[.5F
pigment_map{[.3R][.3H][.7H][.7R]}]}}}camera{location.5-3*z}//only my opinions
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |