Terrain Textures

5506
10
Jump to solution
08-09-2015 06:02 PM
ValerioBozzo
New Contributor III

Hi all,

I created the terrain with height map with tiff images, but the texture is located in wrong position. I posted some screenshots to show my issue.

1.jpg2.jpg

In the first 2 images I created the terrain (Terrain Import) with greyscale tiff for heightmap and set the aerial view as texture. As you can see, the texture is not properly aligned with the buildings and roads position.

In the second 2 images I created a flat terrain (Texture Import) using the same aerial view image, and it is in perfect position with buildings and streets.

3.jpg4.jpg

Any suggestion? How can I change the texture mapping?

Please help me!

I add one of the images I was talking about with the heightmap.

Images.zip - Google Drive

Here there is the shape file for the buildings footprints, just to check if the aerial image is correctly located.

Shapefiles.zip - Google Drive

Messaggio modificato da Valerio Bozzo

0 Kudos
1 Solution

Accepted Solutions
MatthiasBuehler
Occasional Contributor III

Well, if you drag-n-drop either of the images into the viewport in CE, the terrain creation dialog will come up.

Best do this in a new scene, for both image files.

If the propoposed scene coordinate system (SCS) and the extent/offset don't exaclty match for BOTH images, the georeferencing info is wrong.

What you then can do, e.g. if one of the files does not have a proper georef definition or e.g. does not recognize a projection, therefore falls back to metric scene coordinates, use the one that has proper georeferencing data, CREATE the terrain and then edit the texture file in the terrain object. The reason for this is that when you're still in the terrain creation wizard, loading a new map will reset the extent in the wizard. If the terrain is created, loading a new picture will only edit the picture.

But the images MUST MUST MUST depict the same extent, since basically BOTH of the textures are only 'draped' on top of the terrain geometry (scaled to the ends in both dimensions). The georef info is only used to create the terrain geometry, the images are then mapped over this geometry, even if the extents don't match. So be very cautious.

Ok?

Matthias Buehler

Head of 3D Technologies

twitter: @MattB3D

-------------------------------------

Garsdale Design Limited

matthias.buehler@garsdaledesign.co.uk

www.garsdaledesign.co.uk

View solution in original post

10 Replies
MatthiasBuehler
Occasional Contributor III

Hi Valerio,

Did you create the terrain image in ArcGIS? If so, does the terrain line up there?

Does the image have the exact same projection as the other data?

To fix this quick and dirty, select the later, press 'w' and move it into position. Of course, you want to have a proper solution.

Matthias Buehler

Head of 3D Technologies

twitter: @MattB3D

-------------------------------------

Garsdale Design Limited

matthias.buehler@garsdaledesign.co.uk

www.garsdaledesign.co.uk

ValerioBozzo
New Contributor III

Hi Matthias,

thank you for support. Unfortunately I never used ArcGIS and I don't know how to use it. I only have a license for CityEngine at university. The images are tiff data georeferenced in WGS 1984 UTM, and the data have the same coordinate system. As you can see, the streets and the buildings footprints are correctly located, but when I try to load the greyscale heightmap it change the correct position, and I have no idea why it happens.

Regards,

Valerio Bozzo

0 Kudos
MatthiasBuehler
Occasional Contributor III

Hi,

When you load an image file in the terrain creation dialog, CityEngine adapts the size of the terrain. I'd say create the terrain first, THEN choose an other file.

Also, make sure BOTH files (satellite / elevation) have the absolute exact idential extent and projection.

--> So basically, check if visibly, everything lines up in both files.

Cheers!

Matthias Buehler

Head of 3D Technologies

twitter: @MattB3D

-------------------------------------

Garsdale Design Limited

matthias.buehler@garsdaledesign.co.uk

www.garsdaledesign.co.uk

ValerioBozzo
New Contributor III

Hi Matthias,

how can I check extent and projection of the images? Can I send to you one of them?

Thank you

0 Kudos
BenLeslie1
Occasional Contributor III

I suggest adding the imagery first, making a note of the size and offset settings, then adding the height map and changing the settings back if necessary - still not a proper fix but gets the imagery back to the exact same position.

Is it possible that your texture map and height maps are different sizes/dimensions?

ValerioBozzo
New Contributor III

Hi Ben,

I checked the dimension, but the heightmap tiff doesn't mention the resolution.

I tried this method, but it doesn't work.

Thank you

0 Kudos
MatthiasBuehler
Occasional Contributor III

@Ben: Thanks for helping out here.

It's well possible that your heightmap file does not have proper georeferencing data. Are there a .prj or a 'world' file accompanying the tif file?

The resolution itself does not matter. It's just the geographic extent that matters: BOTH images have to show the exact same geographic location/'rectangle'.

I know.. this all is very confusing since there are so many factors to consider.

Maybe post all the files on dropbox and share the link. Somebody here could then have a look at the files.

The thing you can also do is write to support@esri.com.

Ok?

Matt

Matthias Buehler

Head of 3D Technologies

twitter: @MattB3D

-----------------------------------

Garsdale Design Limited

matthias.buehler@garsdaledesign.co.uk

www.garsdaledesign.co.uk

ValerioBozzo
New Contributor III

Hi Matt,

here is the list of data I shared in the post.

Thanks

Image 002.png

0 Kudos
MatthiasBuehler
Occasional Contributor III

Well, if you drag-n-drop either of the images into the viewport in CE, the terrain creation dialog will come up.

Best do this in a new scene, for both image files.

If the propoposed scene coordinate system (SCS) and the extent/offset don't exaclty match for BOTH images, the georeferencing info is wrong.

What you then can do, e.g. if one of the files does not have a proper georef definition or e.g. does not recognize a projection, therefore falls back to metric scene coordinates, use the one that has proper georeferencing data, CREATE the terrain and then edit the texture file in the terrain object. The reason for this is that when you're still in the terrain creation wizard, loading a new map will reset the extent in the wizard. If the terrain is created, loading a new picture will only edit the picture.

But the images MUST MUST MUST depict the same extent, since basically BOTH of the textures are only 'draped' on top of the terrain geometry (scaled to the ends in both dimensions). The georef info is only used to create the terrain geometry, the images are then mapped over this geometry, even if the extents don't match. So be very cautious.

Ok?

Matthias Buehler

Head of 3D Technologies

twitter: @MattB3D

-------------------------------------

Garsdale Design Limited

matthias.buehler@garsdaledesign.co.uk

www.garsdaledesign.co.uk