Archive for the ‘Graphics’ Category

Vega Prime Viewer Hot Keys

Thursday, September 26th, 2013

bostonThumbnailI happened upon a list of the hot key functions for the Presagis Vega Prime standard viewer, which is used in the Lynx Prime Active Preview and is supported in the API by the vpApp class. Since I can never remember where to find them, I’m putting the list here.

vpApp responds to the following keyboard input:

        Esc : quit the application
          ~ : enable / disable the first stats page
          s : cycle forward through the stats for all channels
          S : cycle backward through the stats for all channels
  Backspace : reset the state vector for all observers
      Enter : capture the state vector for all observers
          c : put all observers at the center of the scene
          f : enable / disable fog for all channels
          l : enable / disable lighting for all channels
          p : print the absolute position for all observers
          t : enable / disable texture for all channels
          T : enable / disable transparency for all channels
          w : enable / disable wireframe for all channels
          a : enable / disable shaders for all channels
          x : enable / disable the position strategy for all observers
        Tab : enable / disable scene graph overlay drawing
     NumPad : pan position of the scene graph overlay
          q : scale the scene graph overlay up
          Q : scale the scene graph overlay down
         F8 : capture video stream
         F9 : capture still-image

Convert 3ds files to obj with Blender

Tuesday, January 24th, 2012


3DS is an aging binary interchange format for 3D models. OBJ is another aging, but ASCII-based format for 3D models.

Here is a simple Python script that converts one or more files from 3DS format to OBJ format using Blender:

# Convert 3ds to obj using Blender
# Run as follows:
#   blender -b dummy.blend -P -- file.3ds ...
# dummy.blend is just an empty Blender file needed as an argument.
# Put one or more .3ds files on the end of the command.
# The .obj files will be created with the same name (and path) as
# the .3ds file, but with the .obj extension.
# The export creates a .mtl file for each .obj file also.

import bpy
import sys
import os.path

for i in range(1, len(sys.argv)):
    if sys.argv[i] == "--":

for file in sys.argv[i+1:]:
    # Start with an empty scene

    # Read a .3ds file

    # Write a .obj file
    outfile = os.path.splitext(file)[0]+".obj"


Save the script code in a file named  You will also need a Blender file to use as a placeholder in the command line.  You can save an empty file from Blender, or use an existing one.  Assume it is called dummy.blend.

To convert 3DS files, use the following command:

blender -b dummy.blend -P -- file1.3ds file2.3ds file3.3ds

Tack on as many 3DS files to the end of the command as you want.

Note:  This assumes that dummy.blend and are in the same folder as your 3DS files.  If not, you will need to specify the proper path to each.

iPhone Screen Capture

Thursday, May 20th, 2010

iPhone ScreenshotDuring my last Japan visit, my good friend Tomo showed me how to take an iPhone screenshot:

  1. Press and hold the power button
  2. Press the main round button

The screenshot is saved in your Camera Roll.  From there you can email it, or sync it over to your main computer.

Black terrain after conversion to .vsb

Saturday, May 1st, 2010

Terrain in Vega PrimeAfter my last big visual database delivery on a tight deadline, I thought I had Terra Vista terrain generation mastered:  simply convert the OpenFlight to .vsb and make sure to specify the path to your vt_sub.rgb texture.

Then this time around, my texture came out black.  What now?  Turns out I had gotten used to using the -ct flag for the to_vsb.exe command when converting my culture layers.  -ct compresses the texture maps to .dds format.  Make sure to leave that off when converting the terrain layer that is textured with a virtual texture!

White terrain after conversion to .vsb

Saturday, May 1st, 2010

Terrain in Vega PrimeUsing Terra Vista I generated a large terrain surface covered with a large Virtual Texture.  It looked fine when I loaded the OpenFlight version of it into Vega Prime.  But when I converted it to .vsb format, the terrain came up white.

Dan Oller from Presagis explained why.  The vsb converter (to_vsb.exe)  is creating an optimized file for fast runtime loading, so it doesn’t want to include anything that does not exist.  So if it does not find a texture map, it will not include it.  The terrain that is to be covered with the Virtual Texture has a placeholder texture on it called vt_sub.rgb.  A copy of that texture needs to be somewhere where the vsb converter can find it when it converts your OpenFlight files.  You can specify a search path for the vsb converter.  In the GUI, under Options -> VSB Options…, add folders to the Search Path Options list.  On the command line, use the -p option followed by one or more pathnames to search, separated by semicolons.  On the command line, remember to use quotes if your pathnames contain spaces.