CityScope / CSL_Guadalajara

Repository for the CityScope project related to Guadalajara Collaboration
GNU General Public License v3.0
2 stars 4 forks source link

Add 3D building textured #15

Closed agrignard closed 4 years ago

agrignard commented 4 years ago

@LeticiaIG has the idea to add some facade

You can take some inspiration from the GAMA model library in Visualization and User Interaction/Visualization/3D Visualization/models/Procedural City.gaml

to have something like this

aspect textured {
  draw shape texture:[roof_texture.path,texture.path] depth:depth;
}
Screen Shot 2020-03-05 at 18 54 21
agrignard commented 4 years ago

@LeticiaIG @gamalielpalomo any update on this part?

gamalielpalomo commented 4 years ago

I have updated the model with terrain and 3D buildings sent by @LeticiaIG . Now working on integrating to simulation, but I am having problem as OBJ and STL files are not georeferenced.

LeticiaIG commented 4 years ago

@agrignard We are having trouble trying to include both terrain and buildings. Firstly, we used .obj files (which manually adjusted the scale and geolocation, based on where the previous 2d shapefile was placed). Since this is not ideal, and we would like to have access to each building to give them different characteristics afterward, we tried with 3d shapefile (models/gis/fivecorners/27M_buildings), but it raises an error when executing: Unsupported shape type. We are following this: https://github.com/gama-platform/gama/wiki/Data-Importation-3D-shapefile-Loading

agrignard commented 4 years ago

Why can't you use a classic GIS map (I mean a buildings.shp) of the building and then add a Depth attribute? Like in this model for instance https://gama-platform.github.io/wiki/IncrementalModel_step5 ?

gamalielpalomo commented 4 years ago

Simple depth attribute works well in the current state of the model, the problem comes when we try to incorporate 3D terrain DEM. I used for terrain an obj (converted from stl 3D file sent by Leti). As it is composed by many triangles, the texture does not adjust well. Captura

agrignard commented 4 years ago

OK I see the Building 3D is not only the depth of the building but also the position of it (However this could still be embedded in a GIS with attribute altitude for the base of the building and depth for the height of the building)

For the DEM I would suggest to use an .asc file (this is an ESRI standard for Digital Elevation Model https://library.carleton.ca/help/dem-formats), for that you should have a look the GAMA model library in this model.

Data Importation/models/Grid Dem.gaml

I don't undersatnd when you say "As it is composed by many triangles, the texture does not adjust well." why the fact that there is many triangles would impact on the adjustment? I don't know how is the stl generated but it might not be well georeferenced? @LeticiaIG can you tell us a bit more how this stl is generated?

agrignard commented 4 years ago

BTW this discussion should be in this issue #16 as this one is about the texturing of the building

agrignard commented 4 years ago

@LeticiaIG and @gamalielpalomo is this issue closed?