Friday, June 17, 2011

Ride System Simulation

The last couple of days have been spent on one of the bigger technical challenges I've been preparing for.  I built the functioning ride system (and rider viewing engine).  It actually works!

I built this in Unity using a module called Splines.  The track, walls and scale are all correct but the speed is very high to offset the fact that there is basically nothing to see yet.  I still need to add the speed changes but that is proving complicated since my "train" is actually 4 autonomous vehicles that would close in or spread apart as they pass over a track-based speed trigger.  I need to figure out how to get the lead car's speed changes to trigger the other 3 at the same time.  Working on it.

The vehicles do make the 90 degree turn for the Flight of the Imagination scene but I haven't put in the elevation changes yet.  That is mostly because I don't know where they are yet.  I think my next challenge besides the speed triggers will be synchronizing the turntable.  I may be able to cheat with this since I only have to deal with one train and one POV.  I would love to eventually create a fully functional 3rd person view of the entire ride running at once.  That would be extremely complicated though.  I would basically be faced with the exact same technical challenges as the original ride programmers.  I'm going to focus solely on the single train 1st person ride POV for now.

My plan is to make this a "scene" in the game.  When you approach the load, you'll be moved into the vehicle and ride it restrained this way.  In the load scene, there will be an endless train passing through load to give the correct Omnimover appearance but it will switch to the single train for the ride.

Speaking of scenes (which I'm learning about now), I've decided to divide the interactive model into 4 scenes: outside (including the main ride lobby / load), the ride (with restrained POV), Captain EO interiors (with music), and eventually, The image Works.  This will lower the load times and break the project into more manageable chunks for programming.  The next major update should include that break up minus The Image Works.  We'll see.

Wednesday, June 8, 2011

Journey Into Interactive Online

The 1st draft of the interactive Journey Back Into Imagination is now up and running online.  Check it out HERE.

It doesn't seem like there's much to it yet (and there really isn't), but it was quite a bit more work than I expected.  I started working on the interactive model with some free game development software called 3D Rad.  I was running into limitations including not being Mac compatible and a really fussy web player so I eventually decided to try Unity.  Unity is a lot more complicated but very flexible (and still free).  I finally have most of the basics figured out.  My goal wasn't really to copycat all of the software and techniques being used over at Horizons Resurrected.  I've actually researched and tried about 20 different programs for various parts of this project and eventually ended up using the same stuff.  I know first hand why he picked what he did now.  Currently, I'm using Google Sketchup 8 to build the models (see some of the parts HERE).  I then export them using PlayUp into Unity to build the "game".

I don't really have  background in 3D graphics or game development so I'm learning everything as I go.  Fun and frustrating.  I started playing with Google Sketchup about a year ago and think I've become relatively proficient at it, but I have been doing a lot of cheating.  When shapes got complicated, I usually hid the problems with clever coloring or a carefully placed square.  My models were built to be seen from specific angles or in videos where I controlled the view.  In an interactive model where you can wander around on your own, that is not practical.  Also, all of that hidden geometry covered up in the background still gets rendered by the game software.  Things get slow and clunky.

I've spent the past couple of weeks going through nearly every inch of the JII model.  I've removed tons of hidden junk geometry and simplified a lot of messy intersections.  I've also made some of the interior spaces accessible so all of my cheats that made the exterior look good while mucking up the interior had to go.  I've also broken it down into smaller chunks (called components) and set all of them to the same axis orientation for better control in Unity.

And then there are the faces.  I've learned that all faces have a front and a back.  In Sketchup, that isn't a big deal because you can just paint either side the color you want.  In Unity, the backside of faces are invisible (at least by default - I don't know if that can be changed yet).  A huge part of the work this last week has been flipping about half of the hundreds of faces in this model and then repainting them.  That work is not entirely done.  You can still see many invisible walls, ceilings and other surfaces when you go inside the buildings.  Fixing that is my next task.

I'm starting to fix up the basic interior structures today.  My plan is to try and add a few fancy features to the exterior after that: better textures, animated water features and jumping fountains, other people, the missing trees, and maybe some lighting so I can do night scenes as well.  In the interior areas that are fleshed out already, I need to add lighting, working escalators (and maybe the elevator too) and I want to start adding some sound as well.

Building the inside of the ride and Captain EO theater are farther ahead but still the ultimate goal.  If I get pretty decent at Unity, maybe I can put some functioning Image Works elements in as well.  We'll see...

And now back to work.