View Full Version : Python city block instance off y=0?

06-14-2019, 07:52 PM
I'm trying to use the python city block object instancing for the first time. I have a scene set up and need some buildings around the periphery for background. Due to the camera angle, I need to set up the instances below the y axis and offset on the x axis, but I can't get that to work properly. I've tried saving the object off center as well as playing with the vertical spacing in the plugin, but I can't get reliable or predictable results. Does it only work with the object centered at 0,0,0?


06-15-2019, 09:44 AM
Yes, the "base" object should be at (0,0,0), although to place an instanced building above ground, I'd expect the geometry to have its ground-level base or foundation at Y=0 rather than being centered on Y. When placing buildings on rough ground, I always have a story or two of concrete foundation in negative Y so if the center of the building is on sloping ground, the foundation shows on the lower portions of the ground.

You can use a node network to place the individual instances where you'd like. I've attached a sample LW2019 scene which uses the Distance from the original Base Object to place the Instances in -Y, creating a "hill top" top of setup:

145213 145214

145215 145216

MOV File: 145217

The Instancer node setup uses the Instance's Fixed Random to rotate each instance by a multiple of 90 degrees (pi/2 radians) and to scale it randomly:


There's a separate node setup on the Building Fascade surface to give each instance a random color (based upon a Gradient) and random roughness:


Hope it helps!

06-15-2019, 09:50 AM
Wow, thanks very much for all that!