POV-Ray : Newsgroups : povray.windows : smooth_triangle textures Server Time
28 Jul 2024 12:35:01 EDT (-0400)
  smooth_triangle textures (Message 1 to 2 of 2)  
From: A Baker
Subject: smooth_triangle textures
Date: 5 Aug 1999 22:05:36
Message: <37aa42f0@news.povray.org>
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?


Post a reply to this message

From: Ken
Subject: Re: smooth_triangle textures
Date: 5 Aug 1999 22:27:50
Message: <37AA4768.ADD38B47@pacbell.net>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.