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
|