To debug lighting, it is handy to visualize per-vertex normals. Traditionally, one would create a vertex buffer with a bunch of lines representing normals and render this after rendering the mesh itself. This works but it is not nearly as simple, or as cool, as using a geometry shader.
You can write a trivial geometry shader to visualize normals. The shader takes a triangle as input and outputs 3 lines that represent the normal for each vertex. In the first pass, render the mesh as you normally would. In the second, pass enable the geometry shader and render the mesh again. That's it. No extra vertex buffer, just an extra pass.
As Deron predicted way back in January, our product has been renamed. What you have come to know as Point Break is now called Insight3D. Usually developers resist name changes but we're all pretty happy with it. We hope the name change doesn't cause too much confusion for you. In memory of our original name, I've modified the Surface Mesh primitive example in our HowTo to use our original logo for the texture:
We don't have a new logo yet but you should have high expectations.
In other news, we are thrilled about the amount of interest Insight3D received at this year's User's Conference. Thanks to everyone for their feedback and ideas. If you have more to say or want to request an alpha version, email Insight3D@agi.com. Our team has quite the track record of making changes based on customer feedback. In fact, Bart immediately started coding things based on customer requests from the User's Conference, after he returned in the "party van."
The slides for our Insight to Insight3D presentation from the UC are available under Primers on our User's Conference page. They assure me that the log-in is quick and painless. For other Insight3D resources, check out our online help or this past summer's special edition Inview. The Inview contains two articles on Insight3D (called Point Break back then). We were excited to meet many people at the UC that read the Inview and wanted to learn more.
Our new text rendering code is 5x faster (in a bad case) than our STK code - and the new code uses the same algorithm! How's that work? Well, we are using the same algorithm but the implementation is vastly different. In this post, I'll describe the new implementation, which offloads work from the CPU to a vertex shader running on the GPU, enabling the use of static vertex buffer objects.
We just returned from the annual SIGGRAPH conference, and one thing is clear: it's an exciting time to be in computer graphics. There was an overwhelming amount of things to see. The Larrabee, GPU, and OpenGL presentations were among the best in my opinion.
Fall recruitment season is only a month away. Good timing. Our 3D team is working on lots of interesting problems in the fields of computer graphics and software architecture. In fact, we have so many interesting things to do that we need your help.
Specifically, we’d like to talk to students in computer science, math, engineering, or other hard majors, who are seeking internships for next spring or summer. Both undergraduate and graduate students are equally encouraged to contact us.
The alpha version of Point Break is now complete. For an alpha, it is packed with features, documentation, and examples. I also expect it is more stable then most alpha software; well over 20,000 lines of unit test code have been hammering on it several times a day for months. If you're interested in trying out the alpha, contact Tom Urie at PointBreakAlpha@agi.com.
Before I provide an overview of the major features, I'll show two example projects that ship with the SDK. We’ve blogged a lot about the data structures and algorithms deep inside Point Break, but we've rarely shown it in action – these examples will change that. Since we know there's no better way to learn an API than by example, we've provided the HowTo project shown in the video below.
View the higher quality .avi (31.6 meg) if you want to be able to read the text in the video.
This example presents many of the component's capabilities organized by namespace and object. When the user clicks on a task, the 3D window is immediately updated. In addition, the code used to create the visualization is shown in the code view for easy copy and paste. The HowTo actually reads its own source code to display the code.
Picking makes 3D applications interactive. It allows users to select and interact with objects in the 3D scene. In applications built with Point Break, common uses of picking include double clicking on an object to zoom to it and right clicking on an object to bring up a context menu with operations that act on the object.
In this blog, I will describe the algorithm Point Break uses to implement picking. The depth buffer, in combination with multipass rendering, is used to identify picked objects. The algorithm works in many cases when others do not, is almost trivial to implement, and provides good performance for scenes with moderate object depth complexity given its use of culling and scissoring.
Bounding volume hierarchies (BVHs) were popularized in the ray tracing community by Goldsmith and Salmon in their 1987 paper Automatic Creation of Object Hierarchies for Ray Tracing. In 1988, Eric Haines followed with an article in the Ray Tracing News providing an excellent explanation of creating near optimal bounding volume hierarchies given a list of objects, based on Goldsmith and Salmon's paper.
Point Break doesn't care much about ray tracing but it cares a lot about efficiently rendering dynamic scenes which led me to these ray tracing papers. Besides being useful for ray tracing, BVHs are useful for hierarchical view frustum culling. The intersection algorithm is basically the same; just replace the ray/sphere test with a frustum/sphere test. Primitives use BVHs for this purpose.
Although there is a lot of literature on inserting objects into a BVH and updating objects in a BVH, there isn't much in the way of deleting objects from a BVH. This may be because some approaches to the problem are straightforward or because many application don't need to delete objects from BVHs; they just delete the whole BVH. Point Break needs to delete objects from BVHs. In some cases, deletion from a BVH is done in response to a GUI action such as hiding latitude/longitude lines or turning off the ground track or a model representing a satellite.
Deletion Algorithm
I will present a method to delete objects from a BVH that takes advantage of the objects' spatial locality and typically does not require an O(n) tree traversal to cleanup afterwards. Deletion is expected log(n). With good spatial locality, many deletions will be constant time. Deletions are batched and cleaned in a pass with a run-time proportional to the number of dirty nodes. Although the tree is cleaned up (bounding volumes are recomputed, interior nodes are deleted or merged), it is still susceptible to becoming less optimal over time. Both Lauterbach and Eisemann present criterion to determine when a BVH, or one of its sub-trees, has degraded to the point that it should be rebuilt.
In Point Break, primitives form the building blocks of a 3D scene. Developers create primitives and initialize them with information, such as position and attitude. Primitives then take care of all the 3D rendering (drawing) and optimizations, allowing developers to focus on their application code.
An abridged set of primitives planned for Point Break include:
Models – Support for the industry standard COLLADA format and AGI’s MDL format.
Markers –2D images that always face the viewer and remain a constant pixel size. Markers are commonly used to visualize a large number of tracks moving in real-time.
Polylines – Used for rendering lines on the ground or in space. Polylines are used to visualize many things including country borders, drop lines, range rings, and access lines. Polyline variants can conform to terrain when drawn on the ground.
Triangle Meshes – The rendering workhorse for things such as area targets (e.g. states or countries), terrain and imagery extents, ground ellipses, and border walls. The surface mesh, a triangle mesh variant, can conform to terrain when drawn on the ground.