Hi,Yes, that should work.Have a look at the insert operation i() and the sciFi city example we have.The Obj and Dae file formats are our 3d asset file formats, so you should be able to instanciate as many of those buildings in your specific urban layouts. I don't see any problems there.matt
buildingAsset = "assets/skyscraper_1.obj" Lot --> alignScopeToAxes(y) s(0,0,0) i(buildingAsset) Building.
Hi,sure ! 🙂here's the example : http://resources.arcgis.com/en/communities/city-engine/01w90000000r000000.htm#s=0&n=30&d=1&md=cte-ce-version:10_cte-architectural-style:00001_cte-resource-type:0000001000download the 'Example Instance City 2012'.i() inserts an asset in the current scope. basically that way, you create instances of assets in CityEngine. this example shows how instead of modeling all buildings procedurally, you can also use premodeled buildings and insert them according to their best-fitting ratio or size in the scope of a shape.the same methodology is used to e.g. distribute trees on point marker shapes.maybe start with the following code on 1 shape :( copy 1 obj file in the assets folder .. )buildingAsset = "assets/skyscraper_1.obj" Lot --> alignScopeToAxes(y) s(0,0,0) i(buildingAsset) Building.let me know if there's more questions, ok ?have fun !Matt
attr buildingAsset = assetApproxSize("*/assets/*.obj", "xz", 6) Lot --> alignScopeToAxes(y) s(0,0,0) i(buildingAsset) Building
/** * File: instance_city_on_ground.cga * Created: 5 May 2010 09:21:09 GMT * Author: andi */ version "2011.1" # select one of the best 3 fitting building asset attr scifiasset = assetApproxSize("*/assets/scifi_building_*.obj", "xz", 3) # RULES ########### ################################### # Buildings # @StartRule Lot --> Ground convexify comp(f){all : alignScopeToGeometry(yUp,0,longest) innerRect Footprint } LotCorner --> Ground LotInner --> Lot Footprint --> alignScopeToAxes(y) Building Building --> i(scifiasset) # specularity set(material.specular.r,70) # for the looks in the CityEngine we add some over-exagerated specularity (otherwise the model is too dark for opengl...) set(material.specular.g,70) set(material.specular.b,70) set(material.specularmap,"assets/scifi_texture_refl_2k.jpg") set(material.shininess,20) # bump set(material.bumpmap,"assets/scifi_texture_bump_2k.jpg") set(material.bumpValue, -.1) # opacity set(material.opacitymap,"assets/scifi_texture_opacity_2k.jpg") # reflectivity set(material.reflectivity, 2.3) Ground --> setupProjection(0,world.xz,300,2048) projectUV(0) texture("scifi_texture_ground.jpg") # specularity set(material.specular.r,10) # for the looks in the CityEngine we add some over-exagerated specularity (otherwise the model is too dark for opengl...) set(material.specular.g,10) set(material.specular.b,10) set(material.specularmap,"scifi_texture_ground.jpg") set(material.shininess,15) # bump set(material.bumpmap,"assets/scifi_texture_ground.jpg") set(material.bumpValue, -.25) # reflectivity set(material.reflectivity, 1.2) ################################### # Streets # Street --> StreetTex Sidewalk --> comp(f) {all: split(y) { 2 : StreetLine | ~1: Ground } } Crossing --> StreetTex Junction --> Crossing JunctionEntry --> Street StreetTex --> setupProjection(0.0, scope.xz, 600, 300) texture("assets/scifi_texture_street_dark.jpg") projectUV(0.0) # specularity set(material.specular.r,20) # for the looks in the CityEngine we add some over-exagerated specularity (otherwise the model is too dark for opengl...) set(material.specular.g,20) set(material.specular.b,20) #set(material.specularmap,"assets/scifi_texture_street_dark.jpg") set(material.shininess,60) # reflectivity set(material.reflectivity, .3) StreetLine --> setupProjection(0.0, world.xz, 900, 150) texture("scifi_texture_street_bright.jpg") projectUV(0.0)
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.