POV-Ray : Newsgroups : povray.general : material coordinate systems : Re: material coordinate systems Server Time
31 Jul 2024 14:25:21 EDT (-0400)
  Re: material coordinate systems  
From: Mark Birch
Date: 28 Dec 2006 17:05:01
Message: <web.45943e5d6829b09ecf30d8ee0@news.povray.org>
You could try creating a seperate union for all the instances of a component
with a particular material, eg:

union{ // material1
  object{complicatedObject1 rotate<instance1> translate<instance1>}
  object{complicatedObject2 rotate<instance2> translate<instance2>}
  material{material1}
}

union{ // material2
  object{complicatedObject1 rotate<instance1> translate<instance1>}
  object{complicatedObject2 rotate<instance2> translate<instance2>}
  material{material2}
}

You could also put all the translations/rotations for each instance into an
array to make it easier to build/modify the unions...

union{
  #local ca = 0;
  #while(ca<numobjects)
    object{complicatedobject1 rotate<myarray[0][ca]>
translate<myarray[1][ca]>}
    #local ca = ca+1;
  #end
  material{material1}
}

HTH


Post a reply to this message

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