FBX export: is it possible to add custom attributes?

2126
8
Jump to solution
03-08-2018 10:41 AM
LR
by
Occasional Contributor III

I would like to retain my object attributes (building type, usage, etc) when exporting to FBX. Apparently it's possible to extend the format - can it be done with CE?

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
ThomasFuchs
Esri Regular Contributor

Hello L R

The CityEnginge FBX exporter does not support writing attributes. For exporting high quality models and attributes, the CityEngine Alembic ABC Export can be used.

If you need to use FBX, there are two options:

  1. Export the models as FBX and the shapes with attributes to a SHP file.
  2. Export the models as FBX and use the python export to write a text file (e.g. CSV) with the relevant attributes: Tutorial 12: Scripted report export—CityEngine Tutorials | ArcGIS Desktop 

Later the two exports need to be combined via a unique identifier.

View solution in original post

0 Kudos
8 Replies
ThomasFuchs
Esri Regular Contributor

Hello L R

The CityEnginge FBX exporter does not support writing attributes. For exporting high quality models and attributes, the CityEngine Alembic ABC Export can be used.

If you need to use FBX, there are two options:

  1. Export the models as FBX and the shapes with attributes to a SHP file.
  2. Export the models as FBX and use the python export to write a text file (e.g. CSV) with the relevant attributes: Tutorial 12: Scripted report export—CityEngine Tutorials | ArcGIS Desktop 

Later the two exports need to be combined via a unique identifier.

0 Kudos
LR
by
Occasional Contributor III

That's what I ended up doing - models and csv. Now if only CE had an option to merge meshes by start shape-  combining by material name is nice, but e.g. trees still end up in multiple parts (Crown and Trunk) and require touching up later.

0 Kudos
ThomasFuchs
Esri Regular Contributor

On Export please activate "Create Shape Groups" in the Granularity Settings. Then you get only one group per start shape. Combining the attribute information per group name, should then be possible.

0 Kudos
LR
by
Occasional Contributor III

That still won't merge different materials despite them having the same name, or? What I meant is that the models are not a single mesh, but consist of multiple parts, like this:

0 Kudos
SimonHaegler
Esri Contributor

hi LR

trying to better understand your workflow: is the requirement to merge all meshes from a shape only motivated to have a simple way to assign the attributes from the csv file? or is this actually a requirement of unity itself?

one reason i am asking is that by merging all meshes you have potentially a mesh with multiple materials which might also have undesired consequences...

you could also assign the attributes to all sub-meshes individually, right?

best,

simon

0 Kudos
LR
by
Occasional Contributor III

It's mostly for performance and ease of use. Combining meshes reduces draw calls, which is always good. I also found that most GIS-derived objects have little reason to have separately addressable components.

As for Unity, it's not a requirement. It's possible to use the parent-child hierarchy for the attribute linking (i.e. give each child the parent's attributes) and to manipulate the other children (e.g. highlighting). Alternatively there's the option to make a second set of single-material simplified models to use as collider with the parent.

0 Kudos
SimonHaegler
Esri Contributor

makes perfect sense. i've added the requirement to our backlog, i.e. to export a generated model of one shape into a single mesh using per-face material assignments.

best,
simon

LR
by
Occasional Contributor III

Great, looking forward to it.

0 Kudos