Nogredex is now an official “OgreAddon”

The latest source for Nogredex is now in the Ogre Sorceforge CVS repository

I’ve also uploaded a stand-alone demo of Nogredex, you can get it here

I’ve removed the 16 bit index limitation on meshes. You should now be able to load any size mesh you want. (I wouldn’t recommend it tho, in my testing I found that Novodex starts to bog down on meshes larger than 10,000 triangles).

Meshes with more than one sub-mesh are now fully supported and correctly simulated. I’ve also added some optional code that will even optimize these types of meshes by removing duplicate vertices.

Enjoy!

Mesh support for Nogredex


As promised, I’ve added arbitrary mesh support for Nogredex, the Novodex + Ogre framework. As usual, this is open source code so I would appreciate peer review if you have any comments or suggestions.

New graphics card in the mail

I spent most of last weekend investigating displacement maps and refactoring my terrain code so I would be ready to support DirectX 9 displacement maps, only to discover that my Ti 4600 doesn’t support it. D’oh. I guess part of me wasn’t listening to the voice of reason.. after all, my card doesn’t support anything past vertex/pixel shader 1.1.

I’m bummed about replacing this card because it truely is a fast card. It runs every new game I’ve tried on it just fine; or at least at a high enough level that it doesn’t distract me. I’m bummed because in order to get a card that is superior to it in speed I have to spend at least $110. In the past when I’ve replaced my video card getting a faster model only meant $50 because technology had been moving so fast. I guess not now.

In today’s graphics market it looks like the chip makers are going after features and pipelines over speed. The new cards feature more pipelines, faster memory, etc., but the raw texel fill rates aren’t dramatically higher than what was available a year ago.

So my new card is going to be an nVidia 6600 GT, it looks like right now that’s the best bang for the buck. I opted to get one of the MSI models, since everyone seems to be saying they’re nice and quiet and don’t run too hot.

Ported Nogredex to Ogre 1.0.1

I just completed a port of the Nogredex demo to Ogre 1.0.1. Nogredex is a framework for combining the Ogre 3D graphics engine with Novodex, a killer physical simulation library. Novodex + Ogre = nOGREdex. Har har. (I pronounce it NO-gerr-dex).

Nogredex is great because it completely abstracts away the complexity of routinely inspecting the state of your physics state during your draw loop. You just do a Nogredex->addObject() and it does the rest, you never have to deal with the object again (unless you want to, of course).

I’ve been using Nogredex extensively in my research. I’ve actually been expanding it to add new object types, new object constructors, etc. Right now I’m working on adding mesh support.

I’d appreciate some peer review of my code, so if you’re interested in this sort of thing please check it out.

Orthoimage overlays

I figured out how to overlay USGS “DOQ” files in geotiff format over my terrain. (What you saw previously was a screen grab of some of their website data hand stretched over the terrain.. hehe). Now I’m actually rendering the real thing, at about 1 meter resolution.

The orthoimage for just the NE portion of the Corvallis quad is about 40mb alone. It takes a few seconds to load this guy. 🙂

Overlaying the geotiff files actually isn’t that tough. There’s an open source library called libgeotiff that does pretty much all of the hard work for you. Since DirectX can only load BMP/JPG files as textures I actually don’t even use the .tif file that comes as part of the geotiff file… I convert it to a .bmp and then use libgeotiff to pull out the metadata. Once I have the coordinates of the geotiff in UTM I can easily overlay it onto my height-map, it’s just a matter of scaling the coords into the texture coordinate system of the height-map.

Speaking of UTM, I should mention that I encountered some horrible floating point error dealing with UTM coordinates. The coordinates for Corvallis are something like (470187.46959, 4927222.852384). Big numbers. The spacing between heights in the elevation data file are somewhere around 0.00087. Well I can’t just go around adding floating point numbers of such different magnitudes together and expect things to work (I tried, heh), so I got around this by translating everything to the origin and working with the elevation and geotiff data in reference to 0,0 instead of those huge UTM coordinates. Everything is still UTM, it’s just offset by a lot.

I also downloaded some plant coverage data, part of the “national land cover dataset.” This also comes in geotiff format. Next I’m going to look at writing a vertex shader that draws little trees and grass where the land coverage data says they should be.

Finally, some terrain

I finally got some terrain rendering. Pictured above is the 7.5 minute data for hills just north of Corvallis.

The complete 7.5 minute quad is about 1.3M vertices ~= 2.7M faces. I know this is a lot, but I didn’t think that it would be too much for my graphics card to handle (Ti 4600). Apparently it is, because at full-resolution this scene only gets about 1.5fps. If I bump things down by sub-sampling the elevation data at every-other point I get about 8fps, and at every third sample (what you see above) I get about 30fps.

The data comes from USGS SDTS files. I finally bit the bullet and went with SDTS because a) it’s the new format (new as in after 1996) and b) it’s the only format you can get 7.5 minute data in for free. The USGS doesn’t have it on their site, but if you fight hard enough and create a fake registration account you can get it for free from mapmart.com.

I’m parsing the SDTS files using sdts++, an open source package from the USGS. Earlier I complained about sdts++, but after using it some more it ain’t so bad. Its one major downfall is its heavy reliance on RTTI and C++ exceptions. For debugging I just compiled it right into my program and ate the performance hit so that I could catch the exceptions. I need to figure out how to segment it into a library so I don’t need to have RTTI going in the main app.

Todo: I really want to get some orthoimagery and try and do an overlay. I think that would be badass. Real-time weather data and cloud rendering would be neat too.