Results 1 to 3 of 3

Thread: Python city block instance off y=0?

  1. #1

    Python city block instance off y=0?

    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?

    Erich

  2. #2
    Registered User
    Join Date
    Jan 2005
    Location
    Colorado Springs
    Posts
    1,782
    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:

    Click image for larger version. 

Name:	Final_Render_000.jpg 
Views:	35 
Size:	264.4 KB 
ID:	145213 Click image for larger version. 

Name:	Final_Render_030.jpg 
Views:	31 
Size:	235.0 KB 
ID:	145214

    Click image for larger version. 

Name:	Final_Render_060.jpg 
Views:	29 
Size:	263.7 KB 
ID:	145215 Click image for larger version. 

Name:	Final_Render_090.jpg 
Views:	27 
Size:	260.4 KB 
ID:	145216

    MOV File: Instancer_NegativeYOffset_DistanceToObject_RandomInstanceAttributes_small.MOV

    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:

    Click image for larger version. 

Name:	Instancer_NegativeYOffset_NodeSetup.jpg 
Views:	34 
Size:	1.28 MB 
ID:	145218

    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:

    Click image for larger version. 

Name:	Instancer_NegativeYOffset_SurfaceSetup.jpg 
Views:	18 
Size:	1.15 MB 
ID:	145219

    Hope it helps!
    mTp

  3. #3
    Wow, thanks very much for all that!

    Erich

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •