|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I feel rather stupid :-(
I am unable to discover what is wrong in the following piece of code (a
variation of Rune's Grasstex macro use, adapted for a mesh2 object embedded
in a macro using MyTexture):
//---start code---
#declare MyTexture =
texture {
#declare gt_groundcolors =
color_map {
[0.0, color <0.70,0.55,0.40>]
[0.5, color <0.50,0.40,0.30>]
[1.0, color <0.30,0.25,0.20>]
}
gt_ground()
normal {wrinkles 0.5 scale 1*gt_scale turbulence 1}
finish {
ambient 0 // ambient surface reflection color [0.1]
diffuse 0.6 // amount [0.6]
brilliance 1.0 // tightness of diffuse illumination [1.0]
conserve_energy // more realistic
} // finish
scale 1/ObjScale
}
texture {
#declare gt_color = <0.15,0.65,0.00>;
#declare gt_offset = -0.00;
#declare gt_seed = 0;
gt_grass()
normal {FurNormal scale gt_scale}
finish {
ambient 0 // ambient surface reflection color [0.1]
diffuse 0.6 // amount [0.6]
brilliance 1.0 // tightness of diffuse illumination [1.0]
conserve_energy // more realistic
} // finish
scale 1/ObjScale
}
object {Fur(MyTexture) scale ObjScale}
//---end code---
Individually, the textures work fine, but when I layer them, POV-Ray gives
an error message at the second texture { telling me "Parse error: No
matching } in 'texture', # found instead". If I comment out the
declarations, it is the macro call that is found instead...
As far as I can tell, all braces are accounted for (also earlier in the
scene), so what is the problem?
Any bright idea is welcome!!!
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thomas de Groot wrote:
> Individually, the textures work fine, but when I layer them, POV-Ray gives
> an error message at the second texture { telling me "Parse error: No
> matching } in 'texture', # found instead".
Might be related to the following note in "3.5.6 Layered Textures":
No macros are allowed in layered textures. The problem is that if a
macro would contain a declare the parser could no longer guess that two
or more texture identifiers are supposed to belong to the layered
texture and not some other declare.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Christian Froeschlin" <chr### [at] chrfrde> schreef in bericht
news:467a8c12@news.povray.org...
> Thomas de Groot wrote:
>
>> Individually, the textures work fine, but when I layer them, POV-Ray
>> gives an error message at the second texture { telling me "Parse error:
>> No matching } in 'texture', # found instead".
>
> Might be related to the following note in "3.5.6 Layered Textures":
>
> No macros are allowed in layered textures. The problem is that if a
> macro would contain a declare the parser could no longer guess that two
> or more texture identifiers are supposed to belong to the layered
> texture and not some other declare.
However, Rune's Grasstex works perfectly this way! This code is even an
exact copy, and his original code has no problems....
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I assume the macro calls return a pigment? If so, just declare them and
call the macro from outside the texture definition and explicitely declare
the pigments...
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thomas de Groot wrote:
>
> Any bright idea is welcome!!!
>
> Thomas
I can't say I've had this exact problem, but I've had similar... Have
you tried adding an extra closing curly bracket ( } ) before the macro's
#end? It has helped me in the past. It didn't make sense to have more
closing brackets than opening ones, but it worked nevertheless.
~Sam
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> However, Rune's Grasstex works perfectly this way! This code is even an
> exact copy, and his original code has no problems....
I believe, if you go back and look, that Rune's samples had the texture
attached to the object instead of #declared.
It's fine to #declare the macro pigments first, or just #declare a texture
for both layers, then combine them.
#declare MyTexture = texture {MyTex1} texture {MyTex2};
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thank you all, my friends, for your helpful advise!
Tim's was the easiest to implement in the present test context, and it
worked perfectly.
Additionally, I noted that putting a material{} around the layered texture
worked also. In the end, because I want to use this with objects exported
from Poser, that will be the final solution.
Thanks again!
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |