Select to view content in your preferred language

Shapes VS. Models VS. MultiPatch

3593
4
02-01-2013 03:58 AM
MatthiasBuehler1
Deactivated User
Hi !

It is still a little confusing to some people to distinguish between Shapes, Models and MultiPatches, when working with CityEngine.


Fundamentals in CityEngine :
------------------------------
1 Shape + 1 Rule File --> Generate --> 1 Model

That means that the RESULT of the work in CityEngine is always supposed to be a Model. So the so-called 'Static Models' are already the Result and thus have no slots for rule file and start rule in the Inspector.

[Note that Shapes can be textured.]

Now in the GIS world, 3d geometries are represented and stored as MultiPatches, so there's no distinction between Shapes or Models.


MultiPatch IMPORT into CE :
------------------------------
If a MultiPatch is imported into a CE scene via gdb, Shapes are created.


MultiPatch EXPORT out of CE :
--------------------------------
Premiss :
A Model can only be generated, if a valid rule file and start rule is assigned. If either the rule file contains errors, the start rule is undefined or for other such reasons, a Model can not be generated from the Shape and you'll get a CGA warning during Generation.

So when a Model, which can successfully be generated, is exported to a gdb, a MultiPatch feature class is written or updated in that gdb.

But what happens at the export, when for one of the above reasons, a Model can not be generated ?
Have a look in the exporter's General Settings, under 'Exported Content' :

Default          : 'Export models if generatabla, else export shapes'
Other options : 'Export generatable models' and 'Export shapes only'

So what happens by default is that if no Model can actually be generated, the Shape is exported instead as if it were the Model.

So how can I just create a Model from a Shape without altering it otherwise ?
By just using a very simple CGA rule with the code :
Shape -->
    Shape.

This basically just copies the incoming geometry of the shape (plus textures, if existing) into the final Model geometry.

So what we learn from this is that there's a very important distinction between exporting Shapes and exporting Models.


Rendering of Shapes and Models in the 3d viewport :
------------------------------------------------------
Shapes and Models are rendered (= 'displayed') differently in CityEngine's 3d viewport. Shapes are always rendered with little grey wireframe lines, independent of whether the viewport is displayed with wireframes ( toggle by 7 key ) or not.

Use F11 and F12 to toggle the visibility of Shapes and Models individually.


Terminology of Shape Editing Tools ( such as the 'Polygonal Shape Creation Tool' ) :
-----------------------------------------------------------------------------------
Since MultiPatches are just a term used in the GIS world and 'MultiPatch' does not actually exist in CityEngine terminology, many people use the term 'MultiPatch Editor' instead of 'Polygonal Shape Creation Tool'. That's not per se a 'wrong term', just a little misused in the context, since all the tool does is edit 'Shapes' within CityEngine.



Hope I did some 'de-inclarification' here. 😮

Cheers !

Matt
Tags (2)
0 Kudos
4 Replies
AleksandarLalovic
Deactivated User
Im not sure if this is the right place for this question, if its not just move it.

I am generating some footprints using a rule and i would like to export them back to in order to further use them and edit in a plan drawing. In order to export generated footprints i need to convert them to shapes first but as soon as i do so, i loose colour or material information, everything joins into single shape.

I would like to keep the differentiation bettween, lets say green plots and footprints (to be able to select them individualy). In first image the colour is set with : yellow = "#dfff00". In the second with : set(material.color.g, 0). I am not sure if there is a difference in terms of a result in between these two methods.

First image : actual footprints that i want to export.

Sectond image : An example from the help file.
0 Kudos
MatthiasBuehler1
Deactivated User
In order to export generated footprints i need to convert them to shapes first but as soon as i do so, i loose colour or material information, everything joins into single shape.


Why do you need to convert back to Shapes exactly ?

Models are what's exported as final geometry, to what ever format. E.g. if you go to ArcGIS, you export MODELS to a GDB and in there, they're stored as textured multiPatches.

Shapes are the starting point of CGA. Shapes can only be textures or non-textured, but have no other material properties ( no color, reflectivity, ..)

Ok ?

m.
0 Kudos
AleksandarLalovic
Deactivated User
I would like get generated footprints and parcels back to the cad platform (Autocad or even better VectorWorks), ideally as poly-lines or polygons and to be able to select parcels and footprints separately (this was the problem with converting to shapes everything groups into one object).

It would be ideal if i could keep the attribute values as well.
0 Kudos
MatthiasBuehler1
Deactivated User
hi Alex !



Ah, I see.

Then, the best option is to select the shapes as they are, assign no rule at all and in the geometry exporter settings under 'General', choose 'Export models if generatable, else export shapes' or 'Export shapes only'.

Instead of exporting generated geometry, this way you export the shapes' geometry themselves.

To export attributes too, you need to export to a format which supports attributed geometries, such as GDB or SHP. Possibly also DXF, but I never tried this myself.

Can you try this ?

Let me know.

Matt
0 Kudos