POV-Ray : Newsgroups : povray.newusers : Simple Repeating Material definition : Re: Simple Repeating Material definition Server Time
29 Dec 2024 00:01:06 EST (-0500)
  Re: Simple Repeating Material definition  
From: Steve
Date: 28 Nov 2001 23:49:03
Message: <slrna0bfgt.99o.steve@zero-pps.localdomain>
On Thu, 29 Nov 2001 12:45:30 +0900, Jong wrote:
>Dear all,
>
> I have imported POV file from a Rhino3D modeller file, which contain a lot
>of cylinder-like objects, say 50 of them. Actually, I have given the objects
>the same material property. But the imported objects have separate almost
>identical -- except for the number identifiers--statements of the material.
>I'd like to simplify them.
>My simple thought was :
>
>#declare ObjectCommonMaterial= material {
>  something_I_want
>  }
>#declare Object1Material = ObjectCommonMaterial;
>.... (repeating #declares here)
>....
>#declare Object49Material= ObjectCommonMaterial;
>#declare Object50Material= ObjectCommonMaterial;
>
>However, I know this is not an elegant way to do the work, since I might
>have for example two hundreds more of the same objects.
>
>I wish you could help me in this regard.
>Thanks in advance,

How about putting all of your cylinders inside a union and 
then giving the union one material, leav out any cylinders
that you would like to be different. 

#declare CommonMaterial =
material{
         material directives in there......

        }


#declare Most_Of_The_Cylinders =
union{
      cylinder....   rotate... translate...
      cylinder....   rotate... translate...

      material{CommonMaterial}
     }

object{Most_Of_The_Cylinders rotate... translate... }

Hope some of that helps. 

--
Cheers
Steve              email mailto:ste### [at] zeroppsuklinuxnet

%HAV-A-NICEDAY Error not enough coffee  0 pps. 

web http://www.zeropps.uklinux.net/

or  http://start.at/zero-pps

  4:40am  up 51 days, 20:24,  1 user,  load average: 1.00, 1.04, 1.00


Post a reply to this message

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