Select to view content in your preferred language

Importing Terrain and applying textures to roofs

6807
13
Jump to solution
07-30-2012 03:28 PM
JoanneO_Brien
Deactivated User
Hi
So this is two topics that are related:

1) The first is I'm having issues importing terrain and texture. Are there some clear instructions somewhere on how to do this correctly? The issue for me I think is exporting it from ArcGIS. I have a DEM in ArcGIS and an aerial image for my texture file. I read somewhere that the aerial images don't display properly if the file size is too large, which I suspect might be an issue for me. I also read that the aerial image and the DEM file need to be the same extent? So what size is deemed too large and how do I crop and export to a suitable area for it to display in CityEngine?

2) When I finally succeed in bringing in the aerial image I'd like to be able to use the photograph as a texture layer for my roof's, how is this achieved?

3) I also have in my shapefile attributes the building heights, but these heights are in relation to the sealevel, so I'm hoping that when the DEM model is imported correctly I can use this to produce the correct heights of the buildings, would this be the case?

Hope that all makes sense!
Tags (2)
0 Kudos
13 Replies
JoanneO_Brien
Deactivated User
yeah I might need an example or something for this. How do you link the elevation to the terrain map attribute? Thanks!
0 Kudos
MatthiasBuehler1
Deactivated User
hi !

In the Philly Example :

- Select the 'Basemap' Layer ( Terrain ). Once selected, in the Inspector under 'Layer Attributes', you see
attr elevation = map_01(brightness, 0.304801, 24.078802) + elevationDelta

that's the attr elevation which gets sampled by the height map's brightness value.

now if you want to use this value in your own code, you have to initialize that attr too ( with the same name of course as in the Inspector )

e.g. in 'Street Construction.cga', there's the Initialization on line 133 : attr elevation = 0

Once you have the attr set up, just point to it via the Connection Editor ( Inspector ).

Ok ?
0 Kudos
JoanneO_Brien
Deactivated User
ah yup that had been what I was thinking except I'd done something slightly wrong in setting up the elevation attribute. All good now, thanks! 🙂
0 Kudos
MatthiasBuehler1
Deactivated User
yay !

most welcome !
0 Kudos