After much work and a lot of wrong turns, I’ve finally gotten help with installing OpenSceneGraph on Windows XP. It was simple after all, at least using the pre-compiled binaries. There are up to date tutorials for how to install from source after all, but that wasn’t my goal. I just wanted to get started making apps using OSG. With some helpful advice from the OSG community, here’s my detailed instructions for installing OSG on Windows XP from the pre-compiled binaries for use with Visual Studio 2005. The instructions are similar for other versions of Windows and Visual Studio, but I have no experience with them with regard to OSG. This tutorial assumes some experience (but not much) with C++, Visual Studio, command line usage, and Windows XP.

  1. First, you have to actually get the binaries. They can be found here.
  2. Download the packages labeled openscenegraph-all-2.8.0-win32-x86-vc80sp1-Debug.tar.gz and openscenegraph-all-2.8.0-win32-x86-vc80sp1-Release.tar.gz. They are the files associated with the Debug and Release builds, respectively.
  3. Also download the Sample Datasets (found here).
  4. Uncompress all three archives (try 7-zip for the .tar.gz files). Put all the directories from the Debug release in a directory you want to be the install directory. I’m going to assume C:\Program Files\OpenSceneGraph-2.8.0 from now on as the root for your installation.
  5. Inside the root, you should now see that it contains the folders: bin, doc, include, lib, and share
  6. So you can use both the debug and release builds of each library, go to the Release version’s folder (uncompressed) and copy all the contents into your installation directory. If and when it asks to overwrite a file, click no to all.
  7. It doesn’t really matter where you put the Sample files, so I made a folder in my installation directory called “samples” and copied them there (specifically “C:\Program Files\OpenSceneGraph-2.8.0\samples\OpenSceneGraph-Data-2.8.0″). These files are useful for running examples and giving access to basic fonts and textures.
  8. Now the files are “installed”, but Windows doesn’t know how to use them. To do that, we have to modify the environmental variables.
    1. Right-click on My Computer and select Properties.
    2. Select the Advanced tab.
    3. Click the Environmental Variables button.
    4. Under “System Variables” select the New button.
    5. Give the variable name “OSG_ROOT”.
    6. Give the variable value “C:\Program Files\OpenSceneGraph-2.8.0″ or whereever your install directory is.
    7. Now do the same for several other references, which refer to the OSG_ROOT variable:
      • Name: OSG_BIN_PATH | Value: %OSG_ROOT%\bin
      • Name: OSG_INCLUDE_PATH | Value: %OSG_ROOT%\include
      • Name: OSG_LIB_PATH | Value: %OSG_ROOT%\lib
      • Name: OSG_SAMPLES_PATH | Value: %OSG_ROOT%\share\OpenSceneGraph\bin
      • Name: OSG_FILE_PATH | Value: %OSG_ROOT%\samples\OpenSceneGraph-Data-2.8.0 (note: your directory structure may be different, see above)
    8. Then, select the already existing Path variable, and click Edit.
    9. To the end of the line, after the final semi-colon, add “%OSG_BIN_PATH%;%OSG_SAMPLES_PATH%;”
    10. Apply your changes and close the windows
    11. Your environmental variables should be successfully changed.
    12. To make sure they are working, open a command line window by going to Start, then Run, type “cmd”, and push OK.
    13. Type in “echo %OSG_ROOT%” and hit enter. It should display your install directory.
  9. At this point, you can also test to make sure Windows understands where OSG is. Open a command line window and type “osgversion”. It should return the version of OSG, namely “OpenSceneGraph Library 2.8.0″.
  10. Furthermore, you can test that the sample datasets have been installed by typing “osgviewer cow.osg” into the command line window. This should open the cow model in OSG’s viewer program. Push the escape key to exit.
  11. Now, we need to set up Visual Studio.
    1. Open Visual Studio 2005. If it was already open, close it and reopen it (so that it will get the latest changes you just made above).
    2. Select File > New > Project… and choose Empty Project under Visual C++ > General.
    3. Put it in a directory you’ll remember, and name is something like “OSGDefaultProject”.
    4. So that you will have all the necessary available options, create a new C++ file that will serve as your main file. (I named mine “Main.cpp”.)
    5. Select Project > [ProjectName] Properties…
    6. Select the Debug option from the Configuration dropdown.
    7. Select Configuration Properties > C/C++ > General
    8. Select the box to the right of Additional Include Directories and paste “$(OSG_INCLUDE_PATH)” there.
    9. Select Configuration Properties > C/C++ > Preprocessor
    10. Select the box to the right of Preprocessor Definitions and paste “WIN32;_WIN32;_DEBUG”
    11. Select Configuration Properties > Linker > General
    12. Select the box to the right of Additional Library Directories and paste “$(OSG_LIB_PATH)”
    13. Select Configuration Properties > Linker > Input
    14. Select the box to the right of Additional Dependencies and paste whatever libraries you will use. For now, paste these: osgd.lib osgGAad.lib osgDBd.lib osgViewerd.lib osgTextd.lib osgUtild.lib OpenThreadsd.lib
    15. Notice that all these library names are appended with a ‘d’.
    16. Now the Debug mode is set up. Select the Release configuration and follow the same steps, except that the library names should NOT have a ‘d’ at the end, and in the Preprocessor Definitions change “_DEBUG” to “NDEBUG”.
    17. Visual Studio should now be set up.
  12. Finally, you need to test it.
    • Into your C++ file, you need to copy some valid OSG code.
    • Many test their installation with osgViewer.cpp which can be found in OSG’s source.
    • If you don’t have the source or want a quicker method, go to this tutorial.
    • There are links at the bottom to the full source for the tutorial. Copy the text into your file.
    • Compile and run. You should see two colored pyramids that you can rotate with your mouse.
  13. Now that it’s installed and you have a working project, you can use this project as a basis for all your OSG projects.

And that’s it. Hopefully the tutorial wasn’t too simplistic. This is the quickest way I know how to install it on Windows. If you want to install from source, try some of the links below.

This tutorial is based on the following tutorials and posts

  • Basic tutorial – current, a source installation tutorial.
  • Paul’s Tutorial – current, a source installation tutorial.
  • My Post – I posted about my problems getting it to work. The respondents were quite helpful on a number of subjects.

Edit (March 20, 2010):
Due to increasing volumes of spam, I must begin closing comments after a certain period. I know several of you have asked questions via the comments, and I’m sorry you won’t be able to do that anymore. You should visit the OSG Forums for further support and more up-to-date information.

I went to the premier last night. It was great! Lots of great scenes, nothing I found particularly bad. There are many people talking about this movie, so I’ll focus on two things that I’m not seeing anyone else talk about. Don’t worry, these spoilers are about as mild as you can get.

  1. In the movie, there are frequent references and uses of what’s called “Red Matter.” It appears to be a liquid substance that is kept in magnetic suspension in a special container. The liquid is, of course, red. To use it, a user will insert a magnetically shielded needle into the sphere of matter and a single drop is extracted, itself kept in magnetic suspension. This canister is then allowed to be broken in a given location. Once the Red Matter has contact with any other kind of matter, it forms an instant singularity (a black hole). They gave no explanation as to how it worked or how it was discovered, but I can only guess that it’s made up of extremely exotic anti-matter. Anyway, J.J. Abrams, the director of Star Trek also created that great Action/Drama TV show Alias. For those of you who watched the show, you might have noticed that Alias also featured a magnetically suspended red liquid. Regular water could be made to levitate in a sphere that quickly turned red, and in many cases turned poisonous or caused madness. It was all because of one of Rambaldi’s Mueller devices. I thought it was interesting that he used the same visual effect for two very different, but similarly important inanimate objects.
  2. Secondly, I didn’t get a chance to, but someone really should count how many times Kirk gets punched in the face. It’s seemed like far more than 30 times! He really was a glutton for punishment in this. Another physical recurrence was characters holding onto cliffs, platforms, and everything else for dear life, about to fall off. The amount of times a character was found holding on to something by their arms for dear life was something like 10 times. J.J. Abrams must really like that kind of physical suspense.

After a ton of work, and a final push by everyone on the team, we got Ronin Duck ready for presentation day and turned in the project. With all the required files, our install disc took over 450 MB! The game is looking and playing fantastically, even compared to a few weeks ago. Never underestimate how much effect a little polish adds to a game. Here are some screens of the game.

Ronin Duck Screen

Ronin Duck Screen

Ronin Duck Screen

Ronin Duck Screen

I have been trying to use Mac OS X’s developer tools lately. While XCode works like a dream and the setup of OpenSceneGraph takes literally 30 seconds, I had some problems with the OpenGL Shader Builder. I couldn’t figure out how to access textures as sampler uniforms in your shaders. In fact, I had a hard time finding anyone else on the internet with the same problem.

So I kept experimenting for almost a day before I finally found someone with the same problem. Turns out, you have to use uniform references labeled “texture0″, “texture1″, and so on.

Then, you have to go to the Symbols screen and change the “x” value to correspond to the number value labeling the texture. So, “texture0″ needs x-value 0, and “texture6″ needs x-value 6.

Then, your fragment shader would look like this:

uniform sampler2D texture0;

void main()
{
	vec4 color = texture2D(texture0, gl_TexCoord[0].st);
	gl_FragColor = color;
}

The Dog Island is a game you’ve probably never heard of, and with good reason. Why don’t you watch this review first? It will give you a good starting point before I explain my experience with the game.

wiiviewer’s review of The Dog Island
Note: He is inaccurate about the map situation. Maps do appear in all areas unless you turn them off.

I’ve been listening to the GoNintendo Podcast for several years now. One of my favorite co-hosts of the show is Lube. Lube is the podcast’s token crazy person, who’s main hobby is drinking. His lowering quantity of brain cells charming personality makes him one of everyone’s favorite co-hosts of the show. He always has something funny to say, usually on the crazy end of the spectrum.

So when he began speaking about “this awesome game” last fall, I was intrigued. He talked about how he had just finished the game, and that the last hour was terribly epic. But “no-one will ever know, because no-one plays this game.” It reminded me of the jokes about the last level of Battletoads (aka, “[insert random crazy scenario] is totally like the last level of Battletoads!” “The last level of Battletoads isn’t like that!” “Oh yeah, have you actually GOTTEN to the last level?” “Well… no…” “Right, so this is exactly like it.”) Anyway, I decided to get the game last summer. I think this is the first game I’ve ever gotten based purely on the impressions of another person.

Well, it got off to a slow start, but I eventually started playing through the game. It’s definitely NOT a dog simulator in any way, shape, or form. It’s an adventure game through and through. The graphics and simple gameplay make the game an obvious choice for the pre- and young teen market. However, there’s a surprising depth to this game. The controls are implemented well, and the game is complete in the truest sense of the word. Everything that should be there is. There was nothing specifically missing this game, which totally surprised me. I expected it to be like all the shovelware you often hear about, with bad lighting, impossible controls, and meaningless difficulty. None of these things were to be found in The Dog Island.

But aside from the well implemented controls, menus, and layout. The game’s depth includes the story. While the story is certainly simple, it’s not that far behind the stories of many other video games. The game is surprisingly emotional and complex for what is supposed to be a pre-teen game. For example:

  • The reason your main character leaves home is not to gain friends or travel the world, but rather he takes it upon himself (or herself) to find a cure for your terminally ill sibling. It’s quite sad to see her (in my case) collapse on what’s supposed to be a fun-filled holiday. I forget some of the details, but I believe your father has been missing for years when he went looking for a cure to your sibling’s illness himself.
  • One of the characters you help thinks that she is responsible for murdering her best friend due to an accident. It turns out that the friend’s family had moved the next day, hense the disappearance. You get the pleasure of reuniting these long lost friends.
  • There’s an ex-ringleader from a circus who enlists your help to rebuild his circus. On one occasion, I guessed (rather than figuring out) the answer to one of his questions. After that point, the dog hated me, talking about how I disrespected his ideals (because I gave him the wrong answer).

The gameplay itself is very simple. You mostly focus on finding new smells. The new smells are sought either to help others (item quests) and to become a Sniff Master, a dog who is capable of astounding feats of olfactory detection. There’s also a collecting aspect to the game. You can beat the game after finding only 70 to 80% of the total number of smells. To get all the smells, you have to do a lot of bug catching and fishing.

There are several minigames (including fishing) that are usually very simple. However, the soccer game is surprisingly difficult. I found a good way to win, but playing normally, expect the computer to beat you, often.

This is the first adventure game I’ve heard of that takes the idea of health into account, while specifically being non-violent (at least at the beginning). You see, until the VERY last stages of the game, the enemies (snakes, bears, buffalos, gorillas, and vultures) do not actually harm you. They scare you. If you get too scared, you get a game over. I had always wondered if it was possible to make a game that was both adventure style and non-violent. Apparently, it’s totally possible. I applaud the game creators’ creativity on this rather difficult challenge.

The last part of the game is quite a bit more epic. While certain parts of the beginning and middle are story driven and exciting, the last part really pulls all the tasks, people, and lore you’ve gained throughout the game together to essentially save the world. The final boss fight is quite scary in comparison to the rest of the game (which, like Portal, has no other bosses), but not as difficult as it seems.

The music is very relaxing, almost all of it acoustic guitar based. Combined with the simple and bright graphics, the game plays less like an adventure and more like an experience-style game. You can play this game to relax. Of the few people I’ve heard talk about playing this game, many find enjoyment playing it together with a sibling, girlfriend, or child. It’s certainly a great introductory game for kids wanting to get into the adventure genre. Make no mistake, however. This game is not for everyone. No doubt most gamers will hate this game, or find it WAY too cute or simple for their tastes. But I think if you’re going to try a game that is intended for a young age group, this is probably the one for you.

There were two things I think could have been done better.

Firstly, the game has mesh tessellation (or a similar technique) in place. While this would be a good thing normally, allowing for a farther perceived range of vision, the point at which models jump to full quality is very close to the camera. The result: pots and houses occasionally pop from low poly to high poly. In the case of characters and enemies, you have to be somewhere within about 50 relative feet to see them at all (they’re simply invisible farther than that). This is sometimes a problem for planning your movement so as to avoid them, and buffalos have a wider attack range that that, so they will see you before you see them sometimes.

Secondly, and I agree with the wiiviewer on this point, voice acting would have made this game intensely better. There is a lot of text to read. And though you could easily skip reading the text and trust the mission memo that the game creates for you (very handy), the range of personalities would have allowed even bad voice acting to add to the experience.