Aerial Photo Alignment

I’ve been working with River Simulation results recently. The simulation results look good colored by the various variables, but they look 10x better when you use aerial photos overlaid on the simulation. This gives a great perspective and context to the simulation, as well as providing the viewer with a lot more spatial information. It is a great combination of simulation and real map. The crux of this problem is the accurate alignment of the photo with the simulation results. Lucky, most high end/bespoke aerial photos have some type of Global Positioning, or World File information with them. This provides some spatial reference information which can be combined with the simulation space to align the two pieces of information.

texture map alignment

Exact Alignment of Texture map image with geometry using World File information.

In the models and images I looked at this week, the images had “World Files” associated with them. These world files provide the scaling, rotation, and transformation information to map the pixels of the image into 2D space. So, I wrote a small little python tool as an example of being able to accurately align the image with the simulation results using these “World Files”. The python file opens up the image file to figure out its pixel dimensions, and then opens the World File to extract out the scaling & transformation information (I’ve left rotation out of the mix for the moment). With this information, I can then correctly specify the S and T projection vectors as well as the Offset information in the texture map dialog to automatically project the image onto the geometry in the correct 2D space. I also included an option for relative vs. absolute coordinates of the simulation model, so that you can easily account for that difference in the World File.

The Python tool and window are as follows:


This provides a nice enhancement to the texture map capability in EnSight, to exactly align the image with the geometry when this information is known (via World File).

If users utilize other conventions for alignment of the Aerial Photo with the geometry, please feel free to contact us, as the power of python programming should allow alternative methods.

To install this python, copy the link below, and place into your ~/.ensight92/extensions/user_defined/Tools/ directory (or subdirectory), and re-launch EnSight.

EnSight UserDefinedTool for Image Alignment

Creating mirror images of parts

This tool creates the effect of mirroring parts about any plane orthogonal to one of the XYZ axes. It also optionally creates a plane at the plane of symmetry using point parts.

Download tool and icon (2013-3-6)


There are two intended uses of the tool:

1. Create a ‘display room’ effect where there is a partial reflection of the model, as seen in the image of the Ford Taurus below.

2. For symmetric models where the plane(s) of symmetry are not the X, Y, Z=0 planes.


How to use

First select all the parts that you want to create a mirror image for, then run the tool. A screenshot of the options is below.

Direction to reflect in: (+X, +Y, +Z, -X, -Y, -Z)

How to set mirror location: (Extents of selected parts, Extents of entire model, Specify a value)

X, Y, or Z value: (float) Location of the plane of symmetry if ‘Specify a value’ is chosen

Create symmetry plane: Whether to create a plane part at the plane of symmetry.


Other notes

The partial reflection effect is created with a partially-transparent plane at the plane of symmetry. The strength of the reflection can be adjusted by changing the opacity of the plane. The plane is 4x larger than the model extents. It can be changed on line 55 of the code.

The tool attempts to group all the newly-created copy parts into a group. In EnSight 9 this can fail and produce an error message if there are different types of parts. The rest of the tool still works in this case.

The tool attempts to account for the current symmetry state of the model. So it will correctly reflect the shuttle model for example. It may not work in all cases however. The tool can be used multiple times to reflect a reflection. In this case you may need to manually edit the symmetry of the parts to get the effect you want.

This tool was not created for a specific customer need and has not been heavily tested.



Copy selected parts; activate mirror symmetry, original instance off; use frame mode to move the copy parts to the appropriate position; create a plane using point parts at the plane of symmetry (optional)


EnSight versions: 9.2, 10.0
OS: Windows, Linux, Mac