Watch3D OpenGL Program

Here’s a link to the original WW pages describing Watch3D an OpenGL program I developed a while ago to import and convert objects.

Watch3D

Watch3D is an OpenGL program I developed a while ago to import and convert objects.

Watch3D

Crossroads is a graphics library described in “3D Graphics File Formats” by Keith Rule. Published by Addison-Wesley Developers Press, 1996. There is an enhancement to the library on the web circa 1998.

coversm

Crossroads provides a very complete infrastructure for 3D graphics based on the VRML model of objects. There are input and output routines for about a dozen file formats.

Watch3D User Interface

mainwindow
Main Window

Watch3D provides an OpenGL user interface to display objects as well as modify them. The view object code is distantly based on OpenGL example code by Ron Fosner, 1996.

The toolbar items from left to right are:

  • New file. Clears to the default torus object.
  • Open a file. Calls Crossroads conversion routines. Not completely tested. 3DS, OBJ and DXF files have been used extensively. Materials are not correctly imported with DXF files.
  • Save file. Only Save As is supported. 3DS, OBJ and DXF have been used.
  • Details. Display the details dialog.
  • Animate. Spin the object. Animate need not be used to just move the object. Use SHIFT to move and CTRL to zoom. With Animate selected, release the mouse while the object is moving to give it a spin.
  • Use OpenGL display lists. May significantly speed things up. Create a display list when the object changes and then use this display list instead of creating OpenGL commands for every frame.
  • Printing is not supported.

Gemstones program

Here’s a link to the Gemstones program. It creates gemstone objects of several styles, displays them and exports them for other 3D programs to use.

Gemstones.

gemstonestitle

The Gemstones program creates gemstone objects of several styles, displays them and exports them for other 3D programs to use.

Gemstones.

I am releasing the source in case you would like to learn how it works and modify it. I would appreciate it if you would let me know of any interesting modifications that you make.

Gemstones Program Source.

Gem_1_16_AllCuts

The Gemstones program displays various gemstone shapes and allow rotation to examine the shapes.

Objects can be saved to OBJ graphic files for import into graphics environments.

The large picture above was created by RayDream 5.5 after importing the shapes. The other pictures were created by screen capture from the program.

Colored lights and White, Black and Gray backgrounds are now available.

Animation

To review the gem as it is created:

 mouseanim_300
GemRotateAni
With Version 2.5, animation is mouse driven rather than keyboard driven. Weren’t you tired of clicking the keys?
To rotate the view, just click on the window and drag with the mouse. Clicking stops any current motion and dragging rotates the view.
To rotate around the Z axis, move drag the cursor near the edges of the window.
GemSpinAni
To spin the object, release the mouse while still moving. Spin it fast or slow, it keeps the motion it had when you released the mouse.
GemZoomAni
To zoom the view, use CTRL with the mouse.
GemMoveAni
To move the view, use SHIFT with the mouse..

Updates

  • Version 2.9, 16 May 2001, Animation defaults off. Mouse turns on animation when required. Program is much more CPU friendly.
  • Version 2.8, 15 April 2001, Startup is much faster. State is saved.
  • Version 2.7, 6 April 2001, Correct problem with closing program when minimized.

Programs and images Copyright (c) 2001, Darrell Duffy. Updated: 16 May 2001

Here are some of the gems that this program can create.

Enjoy,
ww