I had a complete model (CGA rules, textures...) on City Engine and I needed to change some fields related to the footprints shape so:
1. I modified the footprint file on ArcGIS and imported it back to CityEngine as a GDB file
2. City Engine read the CGA rules associated to each building but not the textures
Does anybody know why is that? The rules are perfectly written specifying the exact path to the Images. I left the original layer on the scene (it has the same rules and shows the textures) and it works perfectly. The imported one doesn´t read the textures...
I hope somebody can help me. Thank you
Is the texture file specified in the cga code or does it come from an object attribute on your shape? Could you please include the cga code that determines where to get the texture?
attr gid = 0
attr path = "images/"+gid+"/"
attr end = ".jpg"
//
BEGIN FaF_MSL
FaF_M -->
texture(path+"White_01_m"+end)
alignScopeToGeometry(zUp, 0, world.lowest)
setupProjection(0, scope.xy, '1.0000, '1.0000)
projectUV(0)
split (y){
(scope.sy-0): FaF_M_Body |
~1 : FaF_M_Top
}
On the inspector this is shown for the building 627334:
The code looks fine. It looks like the attributes called end and path are linked to Object Attributes. This means that they are trying to get their values from the Object Attributes on the shape. The attribute gid is also linked and has the value 627334 which it got from the linked Object Attribute. The Object Attribute values for end and path are empty, so that's why they look empty in the screenshot. I think this might be why the texture are not found. To link these attributes (end and path) back to the rules, you can click on the icon with the square and black arrow and set them to rule attributes. You could also try to diagnose the problem by printing the texture file to the console before the texture call in the rules using print(path+"White_01_m"+end). Then, open the console (Window -> Show Console) to see the output.