3D Scene Navigation standards

Picking up a new software and navigating thru the scene should be easy and intuitive.  Most of the tools out there are picking up a standard set of navigation modes which are the bare essential for a good user experience with your tool.

Sure, some tools add a set of “identity”  navigation mode which identify the software, but that can be tricky business since you need the user to quickly start navigating without worrying or reading the manual. Since very few are willing to read the manual anyways.

While designing your user experience with your visualization tool, it would be a good idea to start with the following set of modes which are intuitive enough for users to start clicking away.

This list assumes your building a navigation system for visualizing a large model for a City, landscape, CAD…etc. For design tools, this list is not nearly complete.

Examine
Summary: The default, basic mouse based navigation, and user fail safe.
Benefits: This mode is your navigation fail safe since if while using another mode and the user isn’t able to get the desired view, this mode can be used for fine tuning.
Usage:
Dragging + Left Mouse: Rotate around viewpoint center or initial clicked location
Dragging + Right Mouse: Translate within current view plane.
Dragging + Middle Mouse: Zoom in/out along current view direction.
Mouse Wheel: smaller step zoom in/out along view direction, best for fine tuning.

Hover
Summary: Keyboard based, game like (easy for people with game experience)
Benefits: Always aligned/oriented along the ground, Intuitive for users with gaming background, best for scene movements, basic impl for a realistic walk
Usage:
W/A/S/D keys: movement around the current perpView plane (view-direction x right).
Arrow keys: same as WASD.
Dragging + Left Mouse: Change looking direction (rotate around the up vector)
Dragging + Right Mouse: nothing (extra: user action)
Dragging + Middle Mouse: nothing
Mouse Wheel: smaller step zoom in/out along view direction, best for fine tuning.
Additional: add gravity to move along the up vector, (great for climbing stairs, dropping to another level, …)

Fly
Summary: mouse based hover like navigation, fly around the scene.
Benefits: Fast movement around the scene, ability to change elevation and “pitch”
Usage:
Dragging + Left Mouse: move forward, turn left/right, or move backwards. depending on mouse diff.
Dragging + Right Mouse: nothing (extra: user action)
Dragging + Middle Mouse: change pitch

Mouse Wheel: smaller step pitch change, best for fine tuning.
Additional: Left+Mouse dragging changes pitch direction, best for continuous movement since moving to middle mouse dragging not very intuitive and causes a slight interruption.

With the above in hand a user can navigate along the scene, reach any view he wants, and have “fun” while doing so. Additional features like zoom-to-window, gravity on/off switch, axis alignment (forcing navigations to align with x, y, and/or z-axis) can be useful as shortcuts.

Another helpful and very intuitive user control is the Over Head navigation control, which can be placed in the top right corner, great for user orientation and a good shortcut for switching views/modes. The best of such controls, in my view, the ViewCube created by AutoDesk AutoCAD.

Git in Enterprise – part 1

Reading around you see that GIT usage in a company with closed source code is not as you would hope or assume.

So whats the problem?

  • GIT is publicized for open-source projects.  So many assume that it wont fit the bill for a large cooperation, and move on to search for another solution
  • All examples of GIT usage revolve around open-source project and how easy you can just clone and hack with the code.
  • Setup examples for enterprise based development are not found or at least hard to find!
  • Hierarchy in control of source code repositories are not intuitive to setup, and not included in git installation.
  • Companies developing windows based solutions see GIT as an alternative source control for the Linux world!
  • Developers with no linux shell know how are not comfortable using cygwin,…etc
  • UI plugins for GIT are not mature and since git is very easy to use (for its current community) I dont think they will be in the near future.

So are these actually problems? well yes but setup solutions are available that will remove almost all of these problems.

Is it worth the effort?

  1. Corruption in a GIT repository is almost unheard of, which provide security for a company source code
  2. Commit messages provide a tool to track changes and pick what shall be reviewed and what is accepted,  just remember the long night you spent reverting a modification to you central repository.
  3. Commit messages can be used as a documentation tool for code modifications.
  4. The distributed methodology of GIT gives the ability to work remotely easily, great for cooperations
  5. Software Version control are easily done with tags and branches, and fix patches can be applied much easier (no need for each version to be in a separate repository) .
  6. Setting up a repository on a server to act as the master repository provides all the benefit you get from Central repository and more since you can choose who and what gets committed on the “central” repository.

Git with ssh control is the best solution for an in-house development, providing flexibility, stability, enriched with meaningful history, and yes easy to use.

Being adopted by the open source community is a great news for companies since tutorials, usage examples, and best practices are of a great abundance over the web. Within a couple of days any user can become well experienced with GIT.

Later I will post a sample setup scenario which would be a great fit for any company looking for flexibility and needs the ability to control!

Stay tuned!

MM Adaptive Rendering using JOGL and Newt

Was working recently on creating an adaptive renderer, using JOGL. The goal of this project was to ensure high frame rate and usability while walking thru a model of a large data set. Ideally, containing approx. a million+ complex geometric objects. What follows is a description on how it was done. (you might see this as lengthy or over simplified…depends)

Before I go into the details, lets see what is required to achieve a “good” adaptive rendering for massive model visualization (MMV).

What is required:
1- Ability to navigate smoothly within the large data set
2- Renderer can hide objects to speed the rendering.
3- At any point, near objects should always be visible and in high resolution
4- When navigation stops, hidden objects should be re-shown.
5- Keep CPU/GPU usage to minimum when navigation is stopped.
6- Don’t block the application when re-showing objects on scene.

A bit of background, the application uses AWT and Swing for Interface, and JOGL for rendering. Using an AWT canvas to do this doesnt work since (6) would need to be compromised since AWT treats the display as another UI.
With the addition of Newt – AWT parenting added to JOGL 2, We can go ahead and render in an independent thread which is independent of the AWT EDT. This takes care of (6)

Now to the rest. To ensure high frame rate we will need to hide objects while rendering, In a large model we will for sure have a lot of occluded objects which at any point can reduce the number of objects drawn on scene. And also depending on the occlusion results u can know approx. how many fragments resulted from each object.

Using this information you can sort your objects depending on the occlusion result. You can do this on every frame (using two pass rendering) if you have time or every couple of frames if you need every ms (which is usually the case). If you have objects that require to be rendered in the end, like transparent objects, a separate list is needed. This ensures (3) since near objects will have high fragment count. Large objects in scene will also have high fragment count, which is a plus to always have large object shown giving the general structure of the scene helping in user orientation.

We create a threshold value set to the minimum fragment count to render. This threshold will stop rendering the objects once we reach an object with fragment_count less than the threshold. An initial value can be set by statistical computations of fragment counts, like median, avg, or min value. In our case, chose a value between avg and min.

Using this threshold, and our statistical fragment count curve, which tell us approx how much objects will be hidden, we can choose the best new threshold. The curve is used to create a smooth hiding and showing of objects.

Continue reading »

Creating a JOGL Eclipse Project

Below is a how to create an eclipse project for JOGL project, www.jogamp.org.

Why isnt it on github….well since eclipse takes full paths of the src directories, you would need to practicaly re-do it after fetching the project.

1- After downloading the source code, create an eclipse workspace in the jogl directory ..or anywhere else.
2- Create a new Java project (jogl-eclipse) with jdk_6u21…
3- Now delete the src forder from package explorer which will remove it from the disk as well.
4- Go to Project –> Properties


a- In the Java Build Path menu:

Under Source Tab: Link the following sources “…” is the path to your jogl directory.

…/src/jogl/classes  –> jogl
../build/jogl/gensrc/classes –> jogl gensrc
…/src/nativewindow/classes –> nativewindow
…/build/nativewindow/gensrc/classes –> nativewindow gensrc
…/src/newt/classes –> newt
…/build/newt/gensrc –> newt gensrc
…/jogl/src/junit –> junit

finally add,
GLUEGEN_HOME/src/java/ –>gluegen common
with the following as excluded paths “com/sun/” and “net/”

In the Libraries tab: add the following as external jars

ant-junit.jar (apache-ant/lib)
gluegen-rt.jar (…/build/jar)
junit.jar (GLUGEN_PATH/make/lib)

b- In the Builders menu:
Add a new Ant Builder: (optional to build from eclipse) with:

Buildfile: …/make/build.xml
Base Directory: …/make

You can then specify the targets if you want. For me I disabled the ant builder and use the command line :) . You can also add the egit plugin…good for visualizing changes (reporting) but kinda of slow. You will get some errors in the gensrc code from extra semicolon… should be fixed in the emitter

And your done!

Pommed with MBP 6-1

As part of configuring mbp 6-1 you have to install and run pommed (optional) and it produce heating…but i like it. Anyways, to get pommed to work I had to do the following:

Follow the documentation on Ubuntu Docs for MBP 7-1 for keyboard setup.

If all goes well then its great and stop reading :) If it didn’t work and you get the not that informative error message

E: Not primary DBus name owner

 And more symptoms include that power manager and and Nvidia control panel cant control screen brightness.
Here how it worked out for me, it appeared after adding debug messages to the dbus.c that it could not connect to the bus.

Solution: the nvidia Macbookpro Backlight driver stoped working.
Re install it then

sudo modprobe mbp-nvidia-bl

and to get it to work always, add it to your rc.local

sudo vi /etc/rc.local/

add the following before the exit 0.

rmmod mbp_nvidia_bl
modprobe mbp_nvidia_bl

reboot and your setup :)
Hope it helps….

Ubuntu Lucid on mbp6-1

Well was installing ubuntu (kubuntu to be precise on my mbp 6-1) and wow can it be more hectic.

With no documentation for Lucid on MBP 6-1, it worked out finally as a mixture of the mbp 7-1 and the mbp 6-1 (…kola).

Pommed, bluetooth, NV graphic drivers, sound, wireless, and heating are the main issues.

Will post details in another posts separated maybe it will be useful for someone.

First Blog Entry

Interesting, first time on blog spot as a writer and not a reader. Well I should also read my postings or maybe not… Anyways created this blog to post ideas experience and comments on CG related stuff. Not artistic but geeky technical :)

Cheers.