I would like to render many buildings (say, about 50000) as simple columns on a flat plain in Blender. I have values for location (X,Y) and a height value. However, if I try to add more than a couple of thousand columns, I run out of memory.
I think that I want to use the particle / hair system since each building is not independent. they are all simple 4 sided columns, so they can use the same textures, etc. I can add 50,000 columns, using the techniques discussed in the video http://www.youtube.com/watch?v=mCEQYyesxLg. However, I need to be able to set the location and scale of each one based on my data. How can I do this?
The end result should be something like: http://ekisto.sq.ro/ which is a beautiful visualization of stack overflow data.
Update: I'm close! The following updates my particle locations and scales:
scalesize = 10 scalexy = 50 object = bpy.context.object cols = object.particle_systems.particles def setColumn(index, name, xval, yval, heightval): cols[index].location.x = float(xval) / scalexy cols[index].location.y = float(yval) / scalexy cols[index].location.z = 0 cols[index].size = float(heightval) / scalesize ii = 0 f = open('input.data', 'r') for line in f: values = line.split() setColumn(ii, values, values, values, values) ii = ii + 1 f.close()
However, when I hit 'F12' to do the render, the particle system updates all the locations and un-does the setting of the locations. How do I tell the particle system to not update?