Question

CityGML texture atlas problem

  • 13 July 2018
  • 2 replies
  • 10 views

Badge

Hi

I have a workspace that extrudes texture files (appearance) from my CityGML buildings, puts them together and creates a simple single texture atlas image file to improve performance when viewing the photorealistic model. The source CityGML file is a textured building with multiple texture image files, one image for each surface.

The problem is that FME's CityGML writer always writes by default it's "own" appearance module (if the source file had textures) to the output CityGML file and copies the texture coordinates and imageURI parametres from source, which in this case is a CityGML file with a reference to multiple texture files instead of one texture atlas raster image.

I only want to modify the existing appearance module, which i managed to do, but the writer still writes out appearance module to the CityGML file. As a result i have a CityGML file with two different appearance module where the other module references to my newly created texture atlas image with modfied texture coordinates and the other module references to multiple (source) images with old texture coordinates. In this case the appearance module with references to multiple images is useless.

How can i prevent the CityGML writer to write out this default appearance module?

Thank's for advance!


2 replies

Userlevel 2
Badge +17

Hi @jerez,

If you use the AppearanceSetter on the CityGML features to apply the atlas image as a texture, this should override the original textures. You may need to use a Geometry XQuery in the AppearanceSetter to ensure that the new texture is written to the same hierarchy level in the geometry as the original.

If you would like to share your workspace, I would be happy to take a look at it for you. If you don't want to make it public, you can send it to dave.campanas@safe.com.

Badge

Hi @jerez,

If you use the AppearanceSetter on the CityGML features to apply the atlas image as a texture, this should override the original textures. You may need to use a Geometry XQuery in the AppearanceSetter to ensure that the new texture is written to the same hierarchy level in the geometry as the original.

If you would like to share your workspace, I would be happy to take a look at it for you. If you don't want to make it public, you can send it to dave.campanas@safe.com.

Hi thanks for answering!

 

 

I sent you an e-mail!

Reply