Question

How to drape a GeoTiff on Clipped Triangles or TINSurface using AppearanceSetter

  • 14 September 2017
  • 6 replies
  • 33 views

Hi,

I'm trying to drape a selection of map tiles in GeoTIFF onto a Triangle or TINSurface with the AppearanceSetter. After trying using the TINGenerator > Clipper > AppearanceSetter I followed a few tutorials and help articles (e.g. https://gis.stackexchange.com/questions/130870/help-with-draping-an-image-over-a-tin-in-fme-for-viewing-in-meshlab-or-similar ).

The closest result (see image) was by passing SurfaceModeller > Clipper > FaceReplacer > AppearanceSetter but the output terrain had a single map tile repeated across the whole surface.

To address that tried ensuring that the tiles and terrain aligned perfectly by introducing BoundaryReplacer earlier in my process and then passing that to SurfaceModeller > Face Replacer > AppearanceSetter. My tiles are still being rejected by the AppearanceSetter.

Any suggestions would be appreciated.


6 replies

Badge +7
Hey @virtualarchitec, thanks for posting your question!

 

 

Have you verified that your image and terrain model are in the same geographic or coordinate space? Have you tried routing TINSurface into the AppearanceSetter rather than Triangles? What are you AppearanceSetter parameters? Erroneous settings under the Texture Coordinate Generation Parameters have caused me troubles with image draping before. Sharing your workspace might also help iron out some of the draping wrinkles.

 

 

Thanks,

 

Nathan

 

 

Hi @NathanAtSafe

Thank you for looking at this. I've checked and coordinate system for all my inputs and they are fine. I'm using Triangles because the boundary clipper doesn't work on the TINSurface. I realised that the AppearanceSetter assumes it will be getting a single input feature so I've now used the RasterMosaicker to merge my map tiles into one. They are no longer being rejected but the tiling is still an issue.

I've tried several different values for Texture Wrap Style but I suspect I need to do something specific with the UV values rather than using the FME defaults. Tried the u and v Texture Scaling Factor at '1' each but no joy. Any suggestions are appreciated.

Hi @NathanAtSafe

After looking at this some more it seems whatever I do the raster image is projected to each triangle separately. To try and work out what's going on I set up the simplest version of my issue that I could which is simply to drape raster to surface.

It feels like this should work but whatever scaling or clamping I've tried in the AppearanceSetter hasn't spread the raster across the whole surface. It stays within the individual polygons. Swapping the Surface Tolerance parameter on the SurfaceModeller between values of 0 and 1 does appear to impact how the resulting surface is subdivided and textured thoughgeotiff2surface.fmw. Feels like I'm missing something fundamental here that will help me sort out my wider issue (basic workspace attached).

Userlevel 2
Badge +17

Hi @virtualarchitec, if the surface and the raster have the same coordinate system and the same geographic extents, I think you can set default to parameters in the AppearanceSetter, except setting "From Top View" to the Texture Mapping Type parameter.

This article might be a good starting point: Add Appearances to a 3D City Model

See also the attached workspace example: texture-mapping-demo.fmwt (FME 2017.0)

Badge +7

Hi @NathanAtSafe

After looking at this some more it seems whatever I do the raster image is projected to each triangle separately. To try and work out what's going on I set up the simplest version of my issue that I could which is simply to drape raster to surface.

It feels like this should work but whatever scaling or clamping I've tried in the AppearanceSetter hasn't spread the raster across the whole surface. It stays within the individual polygons. Swapping the Surface Tolerance parameter on the SurfaceModeller between values of 0 and 1 does appear to impact how the resulting surface is subdivided and textured thoughgeotiff2surface.fmw. Feels like I'm missing something fundamental here that will help me sort out my wider issue (basic workspace attached).

Hi @virtualarchitec,

 

Your simplified workspace is very close to the one that @takashi mentioned. However, the Texture Mapping setting of "From Top View" is important.

 

Have you tried the same workflow with a single, non-mosaicked raster image? Since your SurfaceModeller and AppearanceSetter portion seems right, this might help sort out any issues with the raster image you're using as a texture.

 

Hi @NathanAtSafe and @takashi,

Thanks for the help. The issue in the end wasn't so much the AppearanceSetter but the order of operations. Sandwiching the AppearanceSetter between a face Aggregator and the Triangulator solved the issue with the triangles and Clipping the tile Mosaicker output before passing it to the AppearanceSetter resolved the issue (see workspace image attached).

Many thanks,

Reply