This content has been marked as final. Show 4 replies
the tutorials are a little out of date, sorry for that .. :(
resource center ( all work in progress. check out the new tutorials under the /gallery/ ! ):
short osm tutorial :
on osm site, draw rectangle
export .osm file to desktop
with SAME extent, export map picture file to desktop
go in CE: file > new > CityEngine > CityEngine project > name it, create.
go to desktop, copy (ctrl-c) both files (osm & map file)
go to CE, select data folder of new project, paste files in there.
RMB-click on scenes folder, new CE scene.
drag and drop .osm file into viewport, this starts the import, click through the settings (clean the graphs !)
select all objects and set shapeCreation to true for all object types (blocks, streets, nodes) in Inspector. by default, shapes are not created because the osm data (same with shape files !) may contain bad data, thus this is a protection mechanism.
the picture file is NOT geolocated (has no .prj file or similar), thus we have to place it manually.
drag-n-drop the file also into the viewport. create a terrain via the pop-up window.
use the 'w' and 'e' keys to place/scale the terrain so it fits the osm data. (use the 'x','y','z' keys to orient the camera, use the 'p' key to toggle between a persp/ortho cam)
note : the CE can not reproject raster files on import based to match a target scene coordinate system, thus, this picture file will not match 100% perfectly.
RMB-click on the rule folder in your project : create new CGA rule file
copy this code into the file :
color( rand(1), rand(1), rand(1) )
save the rule file.
select 1 Lot shape and 1 LotInner shape from a Block (so 2 shapes are selected, using shift key)
RMB-click into the viewport and Select > Select with same Start Rule (all Lots & LotInners are selected)
drag and drop the cga rule file from the rule folder onto one of the selected shapes.
have fun !
yay ! ;)
Great, thanks for the reply. I'll try out what you posted and let you know if I have further questions.
Another quick question. From osm, which picture type should I download and drag into the viewport? .jpg or .png didn't seem to work. Thanks, Dave
afaik, the exported file type which is exported drom osm.org is always png.
thus, this should work. maybe you're nor displaying maps (toggle F9) ?
after drag n dropping the file into the viewport, is a map layer created ?