Batch export of many building models, using one model file per building

3448
15
08-21-2012 11:52 AM
AndrewBasile
New Contributor
When I export a selection of multiple modeled buildings to Wavefront OBJ or Collada DAE format, all of the buildings get lumped together into a single OBJ or DAE.

For our application, we would like to be able to export a large number of buildings at once, and use a separate OBJ or DAE for each building model.  Is this possible in CityEngine?  We do not want to have to manually select and export the buildings one at a time.
0 Kudos
15 Replies
DanielBraun2
New Contributor
I tried it with a fresh installation of CE 2013 and the default preset.

Same problem. Only one Material file with only the materials of one object. Looks like a bug in CityEngine.
0 Kudos
MatthiasBuehler1
Frequent Contributor
Hi,

I'm on medical leave and thus cannot look into this this week.

Meanwhile, can you confirm that the 'file size' option works correctly ?

Matt
0 Kudos
DanielBraun2
New Contributor
Same problem here:

If I choose the filse size big enough (=> only one OBJ file is generated), everything is fine. If I choose the file size smaller and the model gets splitted into multiplte OBJ files, only one material file (that does not contain all information) is generated.
0 Kudos
MatthiasBuehler1
Frequent Contributor
Hi,

Can you please create a very simple minimal repro dataset with no textures that you can send me to reproduce here ?

E.g. a simple scene with many copied shapes and many boxes stacked on top of each other in CGA

Would that be possible ?


Lemme know ..

matt
0 Kudos
DanielBraun2
New Contributor
Hi,

I've attached a minimal example:

Rule-File:
attr myColor = 50%: "#ff7777" 
               else: "#58FA58"
 
Lot  --> extrude(10) color(myColor)


Material-File with filesize option:
newmtl Lot_1
    Kd 0.345098 0.980392 0.345098
    Ka 0 0 0
     d 1
    Tf 1.0 1.0 1.0
    Ni 1.0
 illum 3
    Ks 0 0 0
    Ns 0
newmtl Lot
    Kd 1 0.466667 0.466667
    Ka 0 0 0
     d 1
    Tf 1.0 1.0 1.0
    Ni 1.0
 illum 3
    Ks 0 0 0
    Ns 0


As expected, two colors.

With file_per_shape option I also got only one material-file with content:
newmtl Lot_30
    Kd 1 0.466667 0.466667
    Ka 0 0 0
     d 1
    Tf 1.0 1.0 1.0
    Ni 1.0
 illum 3
    Ks 0 0 0
    Ns 0
0 Kudos
MatthiasBuehler1
Frequent Contributor
Hi,

with the 'per file' option, I correctly get:
newmtl CityEngineMaterial
illum 3
Ka 0 0 0
Kd 1 0.466667 0.466667
Ks 0 0 0
Ns 0
d 1
Tf 1.0 1.0 1.0
Ni 1.0

newmtl CityEngineMaterial_1
illum 3
Ka 0 0 0
Kd 0.345098 0.980392 0.345098
Ks 0 0 0
Ns 0
d 1
Tf 1.0 1.0 1.0
Ni 1.0



Can you post a screenshot of all your export settings ?

Hmmm...
0 Kudos