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?
Solved! Go to Solution.
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:
Later the two exports need to be combined via a unique identifier.
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:
Later the two exports need to be combined via a unique identifier.
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.
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.
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:
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
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.
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
Great, looking forward to it.