FME Version
Introduction
Draping can be done for both textures and vector geometries. This example will focus primarily on textures, which can be draped over any solid or surface.
Textures have been used as a representative way of assessing GIS, BIM and other models, so that users can make informed business decisions about their data.
The act of draping is referred to as overlaying a 2D feature, also referred to as textures, onto a 3D feature. Let’s walk through the workspace provided in DrapingTextures_Hawaii.zip. In this scenario we have draped a PNG Landsat image of two islands in Hawaii, Lanai and Molokai, over TIN surfaces. The workspace below uses contour data to generate the TIN surfaces for both islands. Then Landsat images are added as textures, covering the TIN surface. The Landsat image now acts as a background for the entire scene.
World DEM Texture Example
If the workspace above looks a little bit too complex, here are some steps to create a simpler workspace, where we use a global DEM to demonstrate draping textures. You can also download DrapingTextures_World.zip to follow along with the exercise.
1. Open FME Workbench on your machine. Create a New workspace.
2. Add a Microsoft Excel Reader to the canvas. Assign the dataset to the WorldDEM spreadsheet, WorldDEM.xlsx. Open the Reader parameters and assign X,Y, and Z as the number type. Click OK twice to add the Reader Feature Type to the canvas.
3. Add an ExpressionEvaluator and create a new attribute called _z_scaled using this arithmetic expression:
(@Value(z)/500.0)
5. Add a TINGenerator to create a TINSurface. Connect the Output port from the VertexCreator to the Points/Lines input port on the TINGenerator. Apply a Surface Tolerance of 1. The surface tolerance parameter determines which input points to add to the surface model as vertices.
7. Add an AppearanceSetter to the canvas. This transformer sets appearance styles onto the front and/or back sides of geometries. Connect the JPEG Reader to the Appearance port, and the TINSurface to the Geometry port. Within the parameters, set Texture Mapping Type to From Top View.
8. Finally, add a Adobe 3D PDF Writer. Within the parameters, under Coordinate System, set Move to Local Coordinate System to No.
The final results should look similar to the image below:
Data Attribution
The World DEM was provided by the National Oceanic and Atmospheric Administration (NOAA) - National Centers for Environmental Information .
Comments
0 comments
Please sign in to leave a comment.