|
![](/i/fill.gif) |
"Mark M. Wilson" wrote:
>
> Er, I thought you were supposed to be able to have different triangles in
> a mesh have different pigments or textures, but I'm getting seemingly
> contradictory error messages when I render.
>
> I have a mesh that I want to use for some panes in a "stained glass"
> window, and I want the triangles to be of different glass textures from
> the glass.inc file.
>
> I'm specifically trying to use the Col_Glass_Winebottle on individual
> triangles, like so:
>
> #declare leaf_window =
> mesh {
> triangle {<a>, <b>, <c> texture { Col_Glass_Winebottle}}
> triangle {<c>, <d>, <e> texture { Col_Glass_Orange }}
> etc...
> }
> but it chokes on the first one, saying
> -- Parse Error: Expected 'texture identifier', colour identifier found instead
>
> so if I change the above to say "pigment { Col_Glass_Winebottle}}", it
> says:
> Parse Error: No matching } in 'triangle', pigment found instead
>
> So which is it, a texture or a pigment ? WTF?!?
> The docs use a texture statement within individual triangles, so I know
> I'm supposed to be able to treat each one separately. What obvious thing
> am I missing?
> Thanks for any help!
> Mark W.
You're trying to use color definitions as a texture identifier. Triangles
in a mesh will only take a texture. To use the pre-declare colors listed
in glass.inc you would have to use them like this -
#include "glass.inc"
mesh {
triangle {<a>, <b>, <c> texture { pigment { Col_Glass_Winebottle }}}
triangle {<c>, <d>, <e> texture { pigment { Col_Glass_Orange }}}
etc...
}
--
Ken Tyler
Post a reply to this message
|
![](/i/fill.gif) |