Author Archive for deron

Trapezoidal Texture Projection with OpenGL

All surface images in Insight3D are placed on the Earth where the edges of the image align with latitudinal and longitudinal lines and the top edge is north.  Several customers have asked if they could map an image where that is not the case, where they have the latitude and longitude coordinates of each corner.

Fig. 1 shows an image captured from the viewpoint of a simulated UAV camera.  While the image itself is exactly as it was, the image is not correctly positioned on the terrain.  As mentioned, the image edges align with latitudinal and longitudinal lines. 

Fig. 1

In fig. 2, the image’s corners have been mapped from their original coordinates to their actual coordinates. One can tell that the camera took this image from the southwest.

Fig. 2

This capability has been added to Insight3D’s  Surface Mesh Primitive for our upcoming r8 release.  I’ll wait until r8 is out to discuss the new interfaces and how this method differs from projecting an image onto the terrain.

In this post, I’ll discuss how we use OpenGL to remap the image of fig. 1 to that of fig. 2.


AGI Components 2009r6 is Out

Download the latest version of Insight3D, part of AGI Components. Check out what is new and fixed.

Matlab with Insight3D

Over at the Dynamic Geometry Library Blog, Ted Driver explains how to use Insight3D and other AGI Components in Matlab.

NASA LCROSS Moon Mission

You may have heard in the news that NASA’s LCROSS satellite has reached the Moon.  The satellite’s mission is to map the Moon’s surface for future manned missions and to determine if water in the form of ice exists in a crater at the Moon’s south pole.

STK, software that we work on, was used amongst others to help plan the mission.  STK was streamed live on June 23, 2009 to visualize the lunar swingby in 3D in real-time.  A recording of the swingby is here under the section titled “Lunar swingby coverage animation”.

Telemetry, for example the satellite’s orientation, was sent in real-time from the satellite to the Earth and into STK;  based on that telemetry, the satellite was oriented and displayed in 3D.  The satellite, the satellite orbit, the two camera sensor beams, the Moon, vectors, textual information, and more were all displayed together in one 3D window.

While we are excited that we just officially released Insight3D, this is also very exciting for us.  By the way, Insight3D is based on the same 3D engine used in STK and uses AGI’s Dynamic Geometry Library for astrodynamics, which is also based on STK’s.  The use of STK for NASA’s mission underscores the quality and accuracy of the 3D visualization that you can expect from Insight3D.

We wish NASA continuing success in this mission.

Insight3D Publicly Available

We’re excited to announce the release Insight3D.  Visit for product information, and then please give it a try.  You can download it here.

Chances are that you won’t read the documentation first, so I recommend that you open …\Program Files\AGI\AGI Components 2009\r3\Examples\Insight3D\ Examples.sln; then, build and run our How To example pictured below.


This example demonstrates many of our features.  In the left window is a tree of those features.  When you check a feature’s box, it is displayed in the 3D window, and the its code is displayed in the bottom window.  This a quick way to familiarize yourself with Insight3D.


Horizon Culling 2

In a previous entry, I described a simple method for horizon culling.  That method determined if one sphere, the occluder, occluded another sphere, the occludee, for example if a planet represented as a bounding sphere occluded a satellite represented as a bounding sphere.  In this entry, I’ll describe how to find if a planet occludes a part of itself.  Normally, I write out all the math; however given my time constraints and in the interest of me finally writing another blog, I’ll forego that.

3D GIS applications invariably render the Earth and other planets.  A planet is generally organized as a hierarchy of terrain tiles of varying levels of detail.  As the viewer moves closer and closer to particular part of a planet, higher and higher fidelity tiles are rendered.  The Virtual Terrain Project has a nice list of terrain rendering algorithms.  Frustum culling techniques are normally first applied to tiles, so that only tiles inside the view frustum are rendered.  Next, horizon culling is applied.


Insight3D Alpha 2008 r8 Released

<Update: Insight3d has been officially released.>

We have released the r8 version of Insight3D.  New features include:  2D window overlays, point batch per point display conditions, support for asynchronous network video streams, window snapshot capability, and real-time animation modes.  For more details see the What's New section of our online help.  We’ve been remiss in announcing our updates; the What's New section lists the updates for all previous versions.

The below image demonstrates the flexibility of our overlay system showing web browser, text, video, and toolbar overlays.  Our online help describes the overlay system.


If you have questions or comments, or would like to request an alpha version of Insight3D, email us at

Vector Vectoria

3D GIS applications often render 2D vector data, like roads, rivers, and country boundaries onto the landscape.  Techniques for combining 2D features with 3D terrain are generally either texture or geometry based.  Both have their issues.  In this blog entry, I'm going to give a short preview of Insight3D's approach.

A few years ago for STK, we developed a method using shadow volumes.  A long thin box is created that represents, for example, a road.  The bottom of the box is below the terrain and the top is above.  The terrain is colored where the box intersects the terrain forming a line.  Two papers were recently written that describe this method:  Efficient and Accurate Rendering of Vector Data on Virtual Landscapes  and Rendering 3D Vector Data using the Theory of Stencil Shadow Volumes.

While both papers describe how to determine the height of the box, they do not describe how to determine the width.  If they keep the width static, as the camera moves away from the line, the line will disappear.  In STK, we use a vertex shader to dynamically modify the width based on the camera's field of view and distance from the line to keep the line a user defined width in pixels.

This method has two issues.  Lines breaks up from certain viewpoints as seen in the left image of fig. 1.

Figure 1

Also, lines smear down the side of steep terrain, such as on mountainsides.  The left image of fig. 2 shows a line that is supposed to be one pixel wide.

Figure 2

We have been working on a new lines on terrain method for Insight3D to eliminate these issues.  The right images of figs. 1 and 2 show the new method.  The line is not broken and remains one pixel wide over the mountainside.

Research into this method is ongoing.  We hope to add the ability to create patterned lines, like dashed and dotted lines.  We'd like to apply this method to create altitude contour lines.  We are also working on a line level of detail system to allow Insight3D to render massive amounts of 2D vector data.

There you go - a short preview of current research we are doing.  Sometime in the future, we expect to describe the new method in detail.

Precisions, Precisions

Rendering objects over large distances is common for geospatial programs, and when done incorrectly, the objects may visually jitter.  Here, an object is made up of any combination of triangles, lines, and points, like a 3D model.  The problem becomes more noticeable as the viewer nears the object.  The following video demonstrates this using STK.  (Note that I had to modify STK as it does not ordinarily exhibit jitter.)

Rotating about the space shuttle from far away, there is no jitter.  After zooming in, the jitter is readily apparent.  In this blog entry, I'll discuss the cause of this problem and the solutions used in Point Break and STK.


Horizon Culling

I'll discuss using a bounding sphere for occlusion culling today. The basic idea is that large objects, occluders, are likely to occlude smaller objects in a scene.  In Point Break, an obvious occluder is the Earth, and satellites, ground stations, vehicles, are objects likely to be occluded.  Occlusion culling applied in this manner is sometimes called horizon culling, since objects are no longer visible when they go below the horizon.

I recently read an entry in the Journal of Ysaneya regarding horizon culling that got me thinking about the topic again.  (Check out Ysaneya's blog for incredible planet and space screen shots from his game under development.  I know you'll be asking when we'll be able to render such amazing scenes.)  We have horizon culling code that is very fast, but is sometimes wrong.  For Point Break, we needed to address this.

A satellite about to disappear below the horizon