Bringing Models from SketchUp into CityEngine : Recommendations

7195
7
12-06-2012 08:40 AM
MatthiasBuehler1
Frequent Contributor II
Hi !

I've been asked to make a list of things to watch out for in the SU>CE workflow.

1]
If your models are georeferenced and you'd like to use them as 'Static Models', export from SU as .kml or .kmz. Do not use .dae ( Collada ) in this case, since .dae does not provide enough floating point precision ('Wobble effect'). Dragging and Dropping the files in the CE viewport will automatically place them at the correct georeferenced position.

2]
If you'd like to use SU models as assets for use in CGA, you can use .dae or .obj. Make sure these models are centered around the Cartesian origin (0/0/0) to prevent unwanted offsets when placing the assets with CGA.

3]
.dae is an ascii (text) based format, so it can be edited in a text editor. This is e.g. helpful to edit transparency values or fix texture paths if textures are missing.
Note the default file path conventions :
./ = same directory
../ = up one dir
../tex/ = one folder up from the current .dae file path, then inside the folder called 'tex.

Same rules apply to .obj files, which carry the material definitions in a separate .mtl file.

4]
A .kmz file is a zipped .kml file. Unzip it using any unzipper.

5]
A kml file is just one or multiple collada files with a texture folder. Plus some metadata which specifies the georeferencing and 'height above sea level' on the centroid of each .dae model.

6]
Make sure that every last texture you are using in your CityEngine scene has a unique name. Including subfolders of .kml and .kmz files.

7]
If textures are missing, fix the file paths with the knowledge of point 3]

8]
If materials have the wrong transparency values, fix them by using the knowledge of point 3]. Material transparency and texture transparency (alphas) usually are defined fully transparent or fully opaque with different values ( 0 or 1 ). This means there are different standards used in different 3d applications, thus not all 3d models directly work perfectly within CityEngine.


I'll add more points if things are missing.

Cheers !

Matt
0 Kudos
7 Replies
Tom-PierreFrappé-Sénéclauze
New Contributor II
Is the DAE import tool only available in CE advanced? I use basic and I don't find it as an option.

Other alternative for the basic edition?

When consulting a help file, how do I know whether it's available for basic or not?

I would expect it to be mentioned, but did not see any caveat on http://cehelp.esri.com/help/index.jsp?topic=/com.procedural.cityengine.help/html/manual/import/impor... for example...


thanks!
Tom
0 Kudos
MatthiasBuehler1
Frequent Contributor II
Hi !

Please see this table :
http://www.esri.com/software/cityengine/features

Check under 'advanced 3d format support'

Ok ?

Matt
0 Kudos
Tom-PierreFrappé-Sénéclauze
New Contributor II
Yes, thanks Matt.

It would be really useful to have help article be specific about whether the function discussed is available (or not) under each license. As the help files are often not super explicit about where each function is found, one wastes time looking for it until it dawns on you that maybe you don't have access... or maybe it's a setting that you need to change? or a bug?

Clarity would be helpful!... to add to wish-list. 

Meantime I'm grateful at least obj formats are available. Any important distinction between what you can do with obj and collada? (In both cases I'd be generating them from a sketchup model).

best,
Tom
0 Kudos
MatthiasBuehler1
Frequent Contributor II
Hi,

Thanks for that wish. I'll add this to the wishlist as it makes sense to have that somehow documented also in the CE-docs.

The differences between OBJ and DAE are mainly related to exporting models. The biggest difference is that DAE supports instancing. Otherwise, materials are handled slightly better ( a bit more features ).

But if used as assets, both are equal.

Ok ?

Matt
0 Kudos
Tom-PierreFrappé-Sénéclauze
New Contributor II
great. Thanks Matt!
0 Kudos
MichaelWalton
New Contributor III
Hello,

I am using CE 2013 and I am bringing in a .dae collada model from Sketchup. I have organized the textures in a folder titled "tex" located directly above the .dae model in the CE folder directory. The textures within the folder are all .png format. When I imported the building models of peoples bodies standing in a courtyard all have their textures. But the texture files for brick, tile, and grass do not appear on the model. These are the more important textures and I cannot get them to translate into the CE.

Below is my models text editor information. I only pasted the info that involves the .png files. Perhaps I put the ../tex/ in the wrong place? Be mindful that CE is displaying the .png materials for the people, but not material for the buildings and landscape. 


</library_nodes>
   ../tex/ <library_images>

     <image id="ID203">
            <init_from>tex/shoes_2.png</init_from>
        </image>
        <image id="ID224">
            <init_from>tex/legs_5.png</init_from>
        </image>
        <image id="ID237">
            <init_from>tex/body_3.png</init_from>
        </image>
        <image id="ID266">
            <init_from>tex/face_1.png</init_from>
        </image>
        <image id="ID279">
            <init_from>tex/foot_9.png</init_from>
        </image>
        <image id="ID300">
            <init_from>tex/legs_10.png</init_from>
        </image>
        <image id="ID313">
            <init_from>tex/body_11.png</init_from>
        </image>
        <image id="ID342">
            <init_from>tex/head_12.png</init_from>
        </image>
        <image id="ID355">
            <init_from>tex/body_14.png</init_from>
        </image>
        <image id="ID384">
            <init_from>tex/legs_15.png</init_from>
        </image>
        <image id="ID413">
            <init_from>tex/shoes_16.png</init_from>
        </image>
        <image id="ID434">
            <init_from>tex/face_17.png</init_from>
        </image>
        <image id="ID463">
            <init_from>tex/head_18.png</init_from>
        </image>
        <image id="ID476">
            <init_from>tex/shoes_19.png</init_from>
        </image>
        <image id="ID497">
            <init_from>tex/legs_20.png</init_from>
        </image>
        <image id="ID538">
            <init_from>tex/body_21.png</init_from>
        </image>
        <image id="ID569">
            <init_from>tex/shoes_1.png</init_from>
        </image>
        <image id="ID602">
            <init_from>tex/body_2.png</init_from>
        </image>
        <image id="ID615">
            <init_from>tex/leg_1.png</init_from>
        </image>
        <image id="ID628">
            <init_from>tex/head_6.png</init_from>
        </image>
        <image id="ID643">
            <init_from>tex/shoes_4.png</init_from>
        </image>
        <image id="ID664">
            <init_from>tex/leg_5.png</init_from>
        </image>
        <image id="ID677">
            <init_from>tex/body_6.png</init_from>
        </image>
        <image id="ID706">
            <init_from>tex/face_7.png</init_from>
        </image>
        <image id="ID950">
            <init_from>tex/Brick_Antique.png</init_from>
        </image>
        <image id="ID1015">
            <init_from>tex/Tile_Travertine_2inch.png</init_from>
        </image>
        <image id="ID1028">
            <init_from>tex/Vegetation_Grass_Artificial.png</init_from>
        </image>
    </library_images>
    <scene>
        <instance_visual_scene url="#ID1" />
    </scene>
</COLLADA>
0 Kudos
MatthiasBuehler1
Frequent Contributor II
Hi,

this should work. I'm not sure what the issue is here. :(

Since I'm on medical leave I don't have time to look into this right now.

Can you try and track this down further a bit and try to isolate the issue ?

Thanks !

Matt
0 Kudos