Arrays make radiance sloww

Hi,
I’m using arrays to create simple patterns for my radiance scenes but have noticed it runs quite slowly with oconv and rvu when the arrays become large. Is there a better way to ‘copy-and-translate’ objects?
Isak

How are you “using arrays”, exactly? If simply copying (arraying) geometry around in your modeling tool and making one huge input file to oconv, then yes, there is a better way. The xform command is your friend, when used with the -i option. You could make an octree out of a repeatable bit of geometry and then instance it with calls to the -i and -a options in xform to assemble a highly detailed bit of geometry from small bit(s) of geometry. This will yield a small octree that takes up much less space in memory. This will speed up the octree generation process.

From the oconv man page:

An array is a repeated transformation that results in a repeated object. It is specified using the −a option, which takes the number to repeat as its argument. The objects will step by the transformation given between this −a option and the next −a or −i option. The first object will have zero applications of the transform. A two-dimensional array is given by two different transformations each preceded by an array count.

Hi,
To be more specific, I’ve written for example:
!xform -n ‘name’ -a 57 -t 0.5 0 0 -a 23 -t 0 0.5 0 ‘file’
So I have created an object in ‘file’ and use xform to create a 2D array of the object. However, generating this octree is quite slow (even though every object in my case is about 6 polygons). I haven’t used the -i option for anything here, would this help?
Isak

Hi @IsakW,

Is 'file' a .rad file in your example? By using !xform, you are ultimately asking oconv to convert the same .rad file to octree format once for each instance in the array, which could be quite slow. I think you will find it much faster to use instance or mesh, so that your arrayed geometry only needs to be converted once.

1 Like