|
|
A Baker wrote:
>
> I am completing a program that will generate shells for POVray. The program
> will generate a mesh of "triangles", as well as a mesh of
> "smooth_triangles".
>
> I have had no problem attaching a single texture to the entire mesh of
> triangles, or smooth triangles. I have also been able to attach unique
> textures to individual triangles in the mesh.
>
> The problem is trying to attach a unique texture to individual
> smooth_triangles in a mesh of smooth_triangles.
>
> Does anyone know the correct syntax?
You must predeclare any texture that you want to attach to the individual triangle
smooth or other wise in a mesh object.
I just tested this syntax to ensure that it works and had no problems:
#declare T1 = texture { pigment{ rgb<1,1,1>}}
#declare T2 = texture { pigment{ rgb<1,0,0>}}
#declare T3 = texture { pigment{ rgb<0,1,0>}}
#declare T4 = texture { pigment{ rgb<0,0,1>}}
#declare T5 = texture { pigment{ rgb<1,1,0>}}
#declare T6 = texture { pigment{ rgb<1,0,1>}}
mesh {
smooth_triangle{<,,>,<,,>,<,,>,<,,>,<,,>,<,,> texture{T1} }
smooth_triangle{<,,>,<,,>,<,,>,<,,>,<,,>,<,,> texture{T2} }
smooth_triangle{<,,>,<,,>,<,,>,<,,>,<,,>,<,,> texture{T3} }
smooth_triangle{<,,>,<,,>,<,,>,<,,>,<,,>,<,,> texture{T4} }
smooth_triangle{<,,>,<,,>,<,,>,<,,>,<,,>,<,,> texture{T5} }
smooth_triangle{<,,>,<,,>,<,,>,<,,>,<,,>,<,,> texture{T6} }
}
--
Ken Tyler
mailto://tylereng@pacbell.net
http://home.pacbell.net/tylereng/links.htm
Post a reply to this message
|
|