Using Point Shapes for asset placement

05-04-2015 12:14 PM
New Contributor


I am still learning .cga scripting, and I've found the tutorials pretty useful for mass modeling, but I can't seem to find any references for using point data for asset placement.

I have an area in my map where no footprint data is available, but a .shp of points is available. I also have a library of around 50 residential buildings (.obj).

I would like to use this shapefile data to randomly distribute residential buildings.

Ideally, I'd like to ensure that they are rotated to face the street, but as of right now I can't seem to bring them in in the first place.

Here is what I have currently:


elevation= 0

attr Residential("assets/Buildings/Residential/Residential_*.obj")


Lot -->


ResidentialBuilding -->



I have tried other variations on this, including removing the lot completely (I don't need it- I just thought maybe my asset import needed an area to compare Scope with)

But no matter what I do, I seem to always get the same Mismatched Token error with my i() function.

I am sure there is a simple way to use point features for asset placement. How do I make this work?

Thank you.

0 Kudos
3 Replies
by Anonymous User
Not applicable

Here's a start:

BuildableSpace -->




See if that gets anywhere.

0 Kudos
New Contributor

Hi Chris,

Thanks for the help. innerRect bases size on a lot shape, though. I am trying to place assets with point data because I do not have footprint or lot shapes to use for procedural generation.
Using this script I'm no longer receiving any errors, but when I Generate, nothing is placed.

0 Kudos
by Anonymous User
Not applicable

How about:

attr testAsset = "assets/Buildings/Residential.___seeBelow____.obj"

# So the testAsset should be set to a file name, not a wildcard.

# And to test this, we print to console to make sure we have a proper asset.

BuildingInsertionPoint -->

     # Scale to a point, since in CE all points are tiny squares. This inserts in model's units.




# Let me know if this brings one of your assets into the scene.

0 Kudos