My Virtual Workbench Project

Home

 
 
 
I now have a new website http://www.3draddict.com/
Everything here (and more) is now there.
 
 
 
 
 
 
 
 
A Bit of Background
My name is Allan and I am a recently-retired industrial process control software engineer.
It's nice to be able to put a face to a name, so here's my mugshot:
I am a South African, living in Knysna, a small but popular holiday resort on the banks of  a large beautiful lagoon which opens up to the sea through a very narrow passageway between two rocky headlands.
http://www.visitknysna.co.za/ .I happen to run a guesthouse establishment (http://www.lavenderrose.co.za) in the area.  Anybody fancy a holiday in South Africa ?
 
Since the start of the home PC I have always had an interest in realtime 3D graphics programming, although in those days it was not very realtime!  
I started programming in DOS MSBasic and Assembler, then Windows VisualBasic, and finally C / C++.
After some not very successful attempts at building my own DirectX 3D engine, I purchased a 3D graphics engine called "PowerRender" which I have stuck to for a number of years until recently.
My current favourite is "3DRad", a rapid application development system, well-suited to the type of projects which interest me.
Having had  technical, scientific and educational training experience, my projects have always had a bias towards these areas.
The faster numerical and video processors have enabled the application of realtime physics and visual effects which now make realistic interactive simulations entirely possible.
I am into this 3D stuff purely as a hobby, and have never marketed or made any financial gain from it.
 
 
This Project (commenced March 2009)
My project for the coming months is to build what I call a "Virtual Workbench" whereby a user, standing at the "workbench", will be able to conduct basic practical physical science tasks and stimulating simulations, interacting in realtime with the apparatus comprising them. As I progress through this project I will discuss certain aspects of interest to "3DRadders" and make available for download the various completed tasks. The content used in the tasks, and also the source code, will not be freely accessible............it will all be encapsulated into the downloaded exe file.
 
 
The Room
My first step was to provide a room for my workbench. I chose this to be small and simple with bare brick walls, white ceiling tiles and clay floor tiles. The workbench, which is the central focus point of the room (and where all activity takes place), consists of a U-shaped piece of pine board supported by a few strategically placed packing crates. A large whiteboard is fastened to the front wall of the room. This whiteboard is used to display task instructions, help instructions, diagrams, photographs and movies.
 
 
Oh, and there is also a locked door (this room is strictly private!) in the back wall :-
 
 
The user, who is working at the bench, has the following views:-
                                                                                                                        
                                     LEFT                                                                                                  FRONT                                                                                              RIGHT
                                             
 
                                                                                                                                                                         
Navigation and Control                                                                                                
The user can move and look around freely in the room using the keyboard keys:-
 
[Up Arrow]       = Move forward
[Down Arrow]  = Move back
[Left Arrow]      = Sidestep left
[Right Arrow]   = Sidestep right
 
[A]   = Turn left
[D]  = Turn right
[S]  = Look up
[X]  = Look down
 
I wanted to keep the mouse purely for selecting and manipulating the items that are being used on the workbench.
Which leads me to:
 
Task1 - Manipulating Objects
 
 
Its back to your infant years.........playing with wooden blocks !
The task is to stack as many blocks on top of each other without them toppling over.
There is a neat digital stopwatch included, by which you can time your attempts if you want to.
[F1] will display the mouse usage instructions on the whiteboard.
Post a screenshot on the "3DRad Forum" if you succeed in stacking all eight blocks !
 
 User comments  on version 0.0 (Apr 16, 2009)
1) The blocks feel soft on the edges and "sinks" a bit, doesn't feel like hard blocks.
2) Challenging !
3)
Using the mousewheel to adjust the to/from distance of the blocks should be reconsidered... it is not inuitive and it creates a dexterity puzzle in itself when holding down the left mouse button, trying to point  the mouse, and then rolling the mouse wheel... i would suggest using the same controls that you move in and out with  (the arrow keys) to move the blocks when a block is selected (being grasped).
4) There are no shadows cast on the blocks by other blocks... this would provide a visual cue which would help in the final positioning of the blocks.
5) There is no sound... it would add immesely to the immersion factor if the blocks made some noises when they impacted each other or impacted the table.
6) As you raised the final blocks higher, they seemed to rotate on their own (skewed from the original angle they were picked up at)... this is a minor fault, and can be corrected, but it is a lil disconcerting.
 
Improvements based on above comments
1) The 'soft' edges are due the sphere-based composition of their dynamic rigidbody structure. By re-arranging the sphere positions slightly, I was able to get a more stable block which now makes it possible for a column of 8 blocks to be assembled (without resorting to trickery!)
2) Maybe less challenging (less impossible!) now that the blocks are more stable.
3) I kept the mousewheel (mainly because I'm used to using it), but added an alternative to use key[1] and key[2] to accomplish the same forward/back movement.
4) Shadows added.
5) Sound added.
6) This is now corrected. It was caused by the mass centre being ever so slightly off from the rigidbody centre.
 
Latest improved version 0.1 is attached....(uninstall previous version first)
 
Task2 - Its All Balls
 
 
The task here is to use the seesaw to sort 10 balls in order of their mass.
The balls are all accurate to their real-life size, weight and restitution (bounciness) properties.
 
The SeeSaw
 
 
The seesaw was assembled in the 3DRad Visual Editor using some of my own custom rigidbody components fixed together with joints.
I find this method easy to use, accurate, and testing the final product is a cinch..........its also great fun!
 
 
Task3 - Weighing the Old Way
 
 

The old way was to compare an unknown weight with known weights by manually adding/removing the known weights until a balance point was reached. The new (or modern) way is to place the unknown weight on the weighpan of a 'blackbox' and read off the weight from a digital LCD display ( an electronic load cell does all the work). I chose to simulate the Triple-Beam Balance, whereby an object is weighed by adjusting three sliding known weights along their respective bars (or beams). I did this because it amply illustrate a well-known principle of physics called "The First Law of Levers" :-

 

As in Task2, I assembled the beam balance within the 3DRad Virtual Editor from components built in an external modelling application.

A real fun part of this exercise was building and applying the realtime environment map to the weighpan and other silver components of the balance........this is something that 3Drad really excells at ! I built the environment map using the free ATI CubeMap Generator tool, applying six views (top,bottom,front,back,left,right) of the room to the sphere surface:

 

An experimenter requires a means of recording his/her results........so for this task a simple Notebook has been provided:-
 

A problem that I did have was physics-related. As the beam of the balance swung downwards, the horizontal component of the gravitational force came into action, increasing as the angle of the beam increased. This caused the slider weights to creep forward on the beam, thus feeding the whole process further ! To remedy this, I had to counteract with equal and opposite forces. I can understand now why real-life scales have notches at each graduation mark !

I am sure that this task would have taken me months using the more traditional programming approach.......the use of 3DRad just streamlines everything and removes all the drudgery, letting one just get on with the task at hand.  The actual weighing of objects is not as precise as I would have liked, but it does demonstrate quite nicely the working of a real-life balance. For best results, run this application at a screen resolution of 1024x768 or 800x600

 
Task4 - Introducing Robbie the Robotic Arm
 
 

The task is to use the virtual controller to manipulate Robbie such that the wooden block is moved from its initial position to a final position on top of the far platform.To use the controller, position the mouse pointer over the relevent 'button' and 'depress' it wth the LMB. To avoid overshooting desired positions of the robotic arm, I have found that very quick clicks are best for fine control. Careful placing of the grippers is neccessary to avoid accidental collisions.The servomotor sound adds to the realism, so ensure your sound system is active.

Entirely physics based........the various components comprising the arm are jointed and moved via their respective joint 'motors'

The model of Robbie was supplied from Google 3DWarehouse with the kind permission of its builder John Coyne. I used an external modelling app. to seperate the component parts, then re-assembled them in 3DRad's Virtual Editor as dynamic rigid bodies. Thanks also to Fernando (3DRad developer) for assisting me with a problem I had in performing relative rotations.

Robbie is going to play further roles in future developments that I have planned. I would like to add a 'Teach' mode, whereby the user can set a sequence of steps for playback purposes. At present, Forward Kinematics are used to manipulate Robbie (i.e. move a parent component and the child components move with it). I want to later (hopefully) add Inverse Kinematics (i.e. move the final child end component to the desired target position and all attached components follow)

Although the task might test your frustration level a bit, it is entirely possible........just requires a little patience and a few tries!

NOTE (4th June 2009) : A reported bug (arm movement not stopping occasionally) has now been fixed and the download file for Task4 has been updated accordingly

 

Attachments (4)

  • VirtualWorkbench_Task1_Install.ZIP - on Apr 24, 2009 6:28 AM by allanf@uninet.co.za (version 1)
    6126k Download
  • VirtualWorkbench_Task2_Install.ZIP - on Apr 27, 2009 10:48 AM by allanf@uninet.co.za (version 1)
    5496k Download
  • VirtualWorkbench_Task3_Install.ZIP - on May 29, 2009 1:00 AM by allanf@uninet.co.za (version 3 / earlier versions)
    8506k Download
  • VirtualWorkbench_Task4_Install.zip - on Jun 4, 2009 6:08 AM by allanf@uninet.co.za (version 5 / earlier versions)
    6004k Download