My team and I are currently working on exporting a CityEngine model in ESRI Scene Layer Package (slpk) format and uploading it to ArcGIS Online for visualization in the Scene Viewer. When most buildings of the model appear as designed, we have encountered an issue with one specific building, as shown in the attached image. All the middle buildings in other blocks share the same CGA rule and textures, and they are showing up correctly. However, in the case of this particular building, all the textures appear to be broken.
We tried to address this by removing the problematic building and replacing it with a copy of a similar building from the next block. Surprisingly, the issue persisted even with the replacement. FYI, this building looks correct in CityEngine. The problem only comes up when viewing the model in ArcGIS Online Scene Viewer.
If anyone has insights into the potential cause of this issue or suggestions for resolving it, your input would be greatly appreciated.
Solved! Go to Solution.
Hi @MostahidulAlam ,
My first impression is that the initial shape may have problems. I would check if the shape isn't duplicated or if all vertices from the initial shape are not overlapping/duplicated at any point.
Hope this makes sense.
Hi @MostahidulAlam,
The reason could also be that you have a shapes with two vertices only in this area of the broken export.
For CityEngine a valid geometry needs to have at least three vertices. In theory it's not possible to create such shapes in CityEngine but apparently there are still rare cases where it's possible to create them.
You can check for such invalid shapes using this python script:
from scripting import *
# get a CityEngine instance
ce = CE()
if __name__ == '__main__':
shapes = ce.getObjectsFrom(ce.scene, ce.isShape)
selection = []
for shape in shapes:
if len(ce.getVertices(shape)) < 9:
selection.append(shape)
print("invalid geometry found! OID: " + ce.getOID(shape))
ce.setSelection(selection)
print("done")
Hope this helps,
Jonas
Hi @MostahidulAlam ,
My first impression is that the initial shape may have problems. I would check if the shape isn't duplicated or if all vertices from the initial shape are not overlapping/duplicated at any point.
Hope this makes sense.
Hi @MostahidulAlam,
The reason could also be that you have a shapes with two vertices only in this area of the broken export.
For CityEngine a valid geometry needs to have at least three vertices. In theory it's not possible to create such shapes in CityEngine but apparently there are still rare cases where it's possible to create them.
You can check for such invalid shapes using this python script:
from scripting import *
# get a CityEngine instance
ce = CE()
if __name__ == '__main__':
shapes = ce.getObjectsFrom(ce.scene, ce.isShape)
selection = []
for shape in shapes:
if len(ce.getVertices(shape)) < 9:
selection.append(shape)
print("invalid geometry found! OID: " + ce.getOID(shape))
ce.setSelection(selection)
print("done")
Hope this helps,
Jonas
Thanks @plfontes and @JonasObertuefer for the response. Apparently, the polygon had an extended vertex which was causing the issue. I really appreciate your support.
-Mostahidul