Cityengine - textured roofs

988
1
04-25-2019 01:27 AM
KristýnaLihanová
New Contributor

Hi,

I have a problem with texturing the roofs of buildings. I have orthophotomap with resolution 5cm (25000 x 20000 pixels) and buildings.


I did an automatic texturization of the roofs following the next code (by this page https://www.geoplanit.co.uk/?p=470):

# dimension of the satellite map
const mapdimension_x = 1251 #change this to satellite image details
const mapdimension_z = 1001 #change this to satellite image details
# offset of the satellite map
const mapoffset_x = -753750.290 #change this to satellite image details
const mapoffset_z = 1038999.780 #change this to satellite image details
Lot-->
extrude(rand(0,0)) Mass
Mass -->
# split building mass into roof and side faces
comp(f){top : Roof | side : Facade}
Roof --> Rooftex
Rooftex -->
setupProjection(0, world.xz, mapdimension_x, mapdimension_z)
set(material.colormap, "images/KLADNO_1_9_4.tif") #change this
projectUV(0)
translateUV(0, -mapoffset_x/mapdimension_x, -mapoffset_z/mapdimension_z)
scaleUV(0,1,-1)

The roofs were textured, but their resolution is low. I send pictures original orthophoto and textured roof for example.

Is there any way to get the same resolution on the roofs?

Thank you for your advice.

Best regards
Mgr. Kristýna LihanováOriginal orthophotoTextured roof

0 Kudos
1 Reply
MatthiasBuehler3
Occasional Contributor

Hi,

CityEngine does not support 25x25k textures. It works different as a GIS system that only loads what is visible for the screen space. In CityEngine, this entire (huge!) file has to be loaded onto your graphics card which certainly has not enough memory.

This is a precaution measure of CityEngine. Please reduce the file to 6000x6000 pixels (cells), then it should work, otherwise go even lower (4000x4000). Use this lower resolution as a temporary file to work with in CityEngine and in the end, in your target application, go back to the full resolution (if it is supported there).

Hope this helps.

------------------------------------------------------------------------------------------------------------------
matthias buehler || ceo & co-founder || msc. arch. eth zurich
------------------------------------------------------------------------------------------------------------------

vrbn AG – official esri partner 
|| www.vrbn.io || winterthurerstrasse 53 || 8610 uster || switzerland
+41 78 930 04 07 || matthias.buehler@vrbn.io || @vrbnio @mattb3d