Skip to main content

Posts

Showing posts from October, 2005

Using PGMs

A helpful hint if you are using PGM images with DIRSIG maps. It is orders of magnitude faster to load a binary (aka "raw") PGM than an ASCII one. The difference is especially visible when loading large images, such as 4k by 4k textures in Microscene1. You can check the PGM format by opening the .pgm file in a text editor. If the first characters in the file are "P2", then you have an ASCII image (notice that all the digital counts are stored in ASCII further down the file). If it says "P5", then it's already binary, so there is nothing left to do. To convert from ASCII to binary PGMs, you can use the freely available image tool GIMP ( www.gimp.org ). Simply open the image, select "Save As" and choose "Raw" when it queries about data formatting.

Instancing ODBs

The current development version of DIRSIG4 supports ODB instancing. Like object instancing, the same ODB can be used multiple times via an affine transformation. This also gives a quick way to rotate entire ODB files. Here's the new syntax: OBJECT { ODB_FILENAME = ./foxbat.odb UNITS = METERS INSTANCES { INFO = 0.00, 0.00, 0.0, 1.00, 1.00, 1.00, 0.00, 0.00, 0.0 INFO = 0.00, 0.00, 0.0, 1.00, 1.00, 1.00, 0.00, 0.00, 90.0 } } This functionality should become available in the next release of DIRSIG4.