|
POST
|
hi ! this is indeed not very well documented, here's a few inputs : * we read xyz as regular grid with equidistant square grid (point clouds not supported) * data MUST match Scene Coordinate System (SCS) * points must be stored with spaces let me know if this helps. matt
... View more
03-05-2012
04:29 AM
|
0
|
0
|
676
|
|
POST
|
@ Andre thanks for joining me on the support front ! 😉 amazing, you're even using the @StartRule decoration !!!
... View more
03-01-2012
12:52 AM
|
0
|
0
|
8574
|
|
POST
|
hi Andre, I went and checked with the developers and it seems that sadly, this is indeed not fixed on Linux. I remember I forwarded this issue specific on MacOS, so it seems Linux slipped. 😞 sorry for the bad news ! I'll forward this and check what we'll do about it. matt
... View more
03-01-2012
12:49 AM
|
0
|
0
|
1890
|
|
POST
|
hi ! to close 'case' statements, you always need an else at the end to have it work properly. CGA code can not be executed unless you have no more red error bars on the side of the CGA editor. coloring and extruding can easily be combined together. that should not be the issue. let me know if it works .. matt
... View more
03-01-2012
12:39 AM
|
0
|
0
|
1890
|
|
POST
|
hi ! I've posted the info on the forum, so other users can also profit from the work. try an approach like this : classification 1 : VOLUMES http://forums.arcgis.com/threads/51733-classification-approach-towards-%28volumetric%29-multiPatch-data classification 2 : SURFACE ORIENTATION (use a comp(f) to go from the classified volumes to each polygon) http://forums.arcgis.com/threads/51546-Calculating-shape-slopes classification 3 : SURFACE DIMENSION for each single polygon, test the dimension and accordingly trigger e.g. the texturing of - flat roof surface - facade - metal box surface - .. it all looks a little complex, but once you have a good rule set, you can run this rule over any number of buildings and get good texturing completely automatted. I guess in your case this approach is VERY promising. cheers !:cool:
... View more
02-29-2012
03:07 AM
|
0
|
0
|
665
|
|
POST
|
hi ! in an other thread, a user has asked how non-attributed multiPatches, once imported into the CityEngine and thus converted to shapes, can be 'classified' based on their volumetric appearence. here's one strategic approach that handles this issue in CGA code. please note this example provides only an 'experimental brain construct' and not a proper solution. a classification like this, once it provides acceptable results, can be further broken down into each meshe's subshapes (single polygons) and e.g. test the shape orientation for proper texturing. polygon orientation classification could be done as proposed in this thread : http://forums.arcgis.com/threads/51546-Calculating-shape-slopes * * * let's have a look at the task at hand : let's assume your multiPatch data has NO attributes imported, e.g. because the multiPatch data comes from unknown origin or it's been converted from kml and you need to texture all objects as well as possible. left : imported shapes without any attributes | right : classified subvolumes [ATTACH=CONFIG]12304[/ATTACH] so what the process is actually about is to analyze all the volumes geometrically and track down each possible type of object to classify it. volumes, which are wider and higher than e.g. a room are classified as 'building' volumes, which are less thick than 0.5 meters, higher than 2 meters and longer than 2 meters are classified as 'wall' and so on. the following code shows an initial, very crude, example of such classification. note the initial alignScopeToGeometry() operation, which aligns the scope ( http://forums.arcgis.com/threads/44417-CGA-Understanding-the-concept-of-the-scope ) to the longest edge of the volume, thus lets a volume be measured semantically. e.g. scope.sx is the 'length', scope.sy is the 'height', scope.sz is the 'depth' now, a series of attributes for minima and maxima of specific classification types can be defined and checked one after each other to classify the volumes. special objects, such as the roof railing wall - as seen on the right side of the screenshot - may have a scope which does not represent the actual volumetric appearence properly since the scope (the scope is visible in the screenshot !) is a 'bounding box'. thus, some genius is required to write the classification rules to cleverly classify also elements like this.
##################################################################################################################
# attributes
##################################################################################################################
attr minBuildingPartWidth = 3
attr minBuildingPartHeight = 2.5
attr minBuildingPartDepth = 3
attr maxSmallBoxWidth = .6
attr maxSmallBoxHeight = 1.2
attr maxBigBoxWidth = 6
attr maxBigBoxHeight = 3
attr wallThickness = 0.5
attr wallMinHeight = 2
@StartRule
Shape -->
alignScopeToGeometry(yUp, world.lowest, longest) # scope.sx is aligned to the longest edge, scope.sy points upwards
alignScopeToAxes(y) # orient scope.sy exactly vertical
ShapeDimensions(scope.sx, scope.sy, scope.sz)
print(scope.sx)
print(scope.sy)
print(scope.sz)
ShapeDimensions(xDim, yDim, zDim) -->
# large volumes
case xDim > minBuildingPartWidth && yDim > minBuildingPartHeight && zDim > minBuildingPartDepth :
ShapeType("building")
# wall like volumes
case (xDim < wallThickness && yDim > wallMinHeight) || (zDim < wallThickness && yDim > wallMinHeight) :
ShapeType("wall")
# big box like structures
case xDim < maxBigBoxWidth && yDim < maxBigBoxHeight && zDim < maxBigBoxWidth :
ShapeType("bigBox")
# small box like structures
case xDim < maxSmallBoxWidth && yDim < maxSmallBoxHeight && zDim < maxSmallBoxWidth :
ShapeType("smallBox")
else:
ShapeType("Element")
ShapeType(type) -->
case type == "building" :
color(1,0,0)
case type == "wall" :
color(0,0,0)
case type == "smallBox" :
color(.95,1,0)
case type == "bigBox" :
color(.5,.5,0)
else :
color(1,1,1)
... View more
02-29-2012
03:02 AM
|
0
|
0
|
2263
|
|
POST
|
hi ! 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/ ! 😞 http://resources.arcgis.com/content/cityengine/about short osm tutorial : 1] on osm site, draw rectangle 2] export .osm file to desktop 3] with SAME extent, export map picture file to desktop 4] go in CE: file > new > CityEngine > CityEngine project > name it, create. 5] go to desktop, copy (ctrl-c) both files (osm & map file) 6] go to CE, select data folder of new project, paste files in there. 7] RMB-click on scenes folder, new CE scene. 8] drag and drop .osm file into viewport, this starts the import, click through the settings (clean the graphs !) 9] 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. 10] the picture file is NOT geolocated (has no .prj file or similar), thus we have to place it manually. 11] drag-n-drop the file also into the viewport. create a terrain via the pop-up window. 12] 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) 13] 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. 14] RMB-click on the rule folder in your project : create new CGA rule file 15] copy this code into the file : LotInner --> Lot Lot --> extrude(rand(20,30)) color( rand(1), rand(1), rand(1) ) 16] save the rule file. 17] select 1 Lot shape and 1 LotInner shape from a Block (so 2 shapes are selected, using shift key) 18] RMB-click into the viewport and Select > Select with same Start Rule (all Lots & LotInners are selected) 19] drag and drop the cga rule file from the rule folder onto one of the selected shapes. 20] have fun ! yay ! 😉
... View more
02-28-2012
09:35 AM
|
0
|
0
|
1265
|
|
POST
|
hi ! did you check the log for any input on what may be wrong ? maybe start off very simple, without any linking of stuff. does this work : Lot --> extrude(10) color(#"ff0000")
... View more
02-28-2012
08:55 AM
|
0
|
0
|
1890
|
|
POST
|
hi ! I just heard this behavior is hardcoded, thus you'll NEED to rename the file as you're currently doing...
... View more
02-28-2012
08:33 AM
|
0
|
0
|
1230
|
|
POST
|
hi ! ah, I thought it might be this one. it's been fixed for the 2011.2 version. the customer portal already has the new version available. the TRIAL should be up any day too !
... View more
02-28-2012
03:54 AM
|
0
|
0
|
1891
|
|
POST
|
hi .. I personally have no clue yet about those technical 3d display issues, though I'll forward the input and try to post something which helps you at a later time, ok ? so if you need a quick answer, maybe you ask about this better in the specific esri subforum (explorer related) since this one is dedicated to the CityEngine. 🙂
... View more
02-27-2012
06:22 AM
|
0
|
0
|
3794
|
|
POST
|
hmm. can you post a few naming examples ? so you are defining the file name via the exporter settings in Python, correct ? matt
... View more
02-22-2012
11:31 PM
|
0
|
0
|
1230
|
|
POST
|
hi ! fyi : this thread may also be of interest for you : http://forums.arcgis.com/threads/50979-re-model-%E2%80%98non-textured%E2%80%99-3D-feature-class-into-%E2%80%98textured%E2%80%99-3D wait for the new versions 2011.2 which should be released very soon. it should fix a lot of issues. sometimes, 3d multiPatches lose their z component, thus are flattened out - which is clearly a bug. 1] what you could do is instead of importing the geometries via multiPatch, import them via kml (which is basically a collada file with location info). make sure you import it (e.g. RMB > import > kml ) NOT as static model. instead, it will be imported as static shapes. the difference is : static model : as the name states, it's already a 'model' and cannot be changed. static shape : since the polygons are shapes, you can assign rules and work with those shapes in CGA. 2] if the buildings extrude downwards, the normal points down. this has to do with the point order (if clockwise or counter clockwise). thus, you need to fix the normal of the shape. either via Shapes menu > reverseNormals or in CGA like here : http://forums.arcgis.com/threads/49789-Reverse-Invert-Lot-Orientation
... View more
02-22-2012
11:29 PM
|
0
|
0
|
1937
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-06-2012 08:40 AM | |
| 1 | 09-30-2013 08:33 AM | |
| 1 | 08-07-2013 04:45 AM | |
| 1 | 10-15-2012 02:19 AM | |
| 1 | 01-30-2014 12:09 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:24 AM
|