I have been working with CityEngine/Datasmith/Unreal, trying to find optimal export settings that are optimal to my workflow. Right now the export settings are giving me mixed results – specifically the mesh merging. I think I can rewrite my CGA to work around it, but what is not clear is when CityEngine/datasmith creates a new actor or merges a mesh. The “pivot” actor adds a whole other layer of complexity but I think I can work around that.
**Here is a CityEngine Screencap. **
The buildings in the foreground are what I call detailed buildings - where I generate architectural details inside my CGA code in CityEngine. Things like walls, windows, parapets, awnings, etc…
Buildings in the background are real simple - a textured box essentially. I am not having any issues with those. I’ll explain below.
https://forums.unrealengine.com/filedata/fetch?filedataid=153021&type=thumb
Unreal/Datasmith - Export Settings: Mesh Merging: Initial Shape, Instancing: Disabled.
The accuracy of the models are correct and the mesh/merch is perfect. However, the problem with this approach is that I would like to replace static meshes - like these simple trees - inside of Unreal. This approach does not allow me to do that. The Static Mesh is merged at the CityEngine shape - in my case the parcel.
https://forums.unrealengine.com/filedata/fetch?filedataid=153025&type=thumb
Unreal/Datasmith - Export Settings: Mesh Merging: Initial Shape, Instancing: Use Instancing
This approach gives me the ability to replace static meshes of trees and cars and things, but the instancing I have noticed, creates instances of my “Walls” in my CGA and the accuracy of the placement is not always accurate. So I am getting these big gaps in my buildings - where instances are not being placed with 100% accuracy. Another thing I’ve noticed is that the “pivot” actor created for the group/shape is placed at 0,0 for every shape or parcel. Working with a model of an entire city…this is pretty difficult.
https://forums.unrealengine.com/filedata/fetch?filedataid=153026&type=thumb
I suppose it would be helpful to know why there are inaccuracies with the placement of the instancing, or perhaps ever better, when CGA creates a new instance or object.