Sunday, October 23, 2011

Bug Hunting in JII

This week, I have refocused my Journey Back Into Imagination efforts from adding elements to getting the web simulation engine optimized.  It's been getting bulky and has always been a bit sloppy in the controls.  

This task switch was well-timed.  The import tool that I use to get the Sketchup models into Unity is called Playup and it had a few bugs that I didn't really know how to deal with.  This is the very first 3D project I've ever attempted so I'm still very new at it.  Anyway, the biggest issue is that Playup was importing objects at a huge scale and rotated 90 degrees sideways.  I compensated for this by scaling up Unity components to match and by building my Sketchup models sideways.  These bugs have been fixed in the most recent version of Playup and it is wonderful.  However, it means that I have to go back and un-rotate the models, re-import them all and fix the upscaled Unity components.  It'll be worth it but the progress is slow going.  The ride system in particular is going to be a problem and it may need to be rebuilt from scratch.

As you can see in the attached screenshot, I have already fixed most of the exterior areas.  What you see here is about 1/100th the size of the last model.

I have also begun working on something called culling.  Using a Unity plug-in, I can now "turn off" items that are not immediately visible to save processor strain.  This sounded simple at first but doing it for the exterior is proving complicated.  The system uses zones of visibility, but my trouble is that the exterior is wide open and there is glass everywhere.  There are very few places where something is out of sight.  I'll figure it out.  This technique is going to be very important inside the ride though.  Things will be complicated in there and it will be nice to shut-off scenes that the riders aren't in.

Another thing I am adjusting is the controller sensitivity.  This is a lot easier now that the scale is smaller and more logical.  The mouse sensitivity in the next version will be less than 1/3rd of what it is right now.

The work load for these updates is pretty big.  What I think I'm going to do is get the scaling corrected in the exterior and EO Theater scenes but leave the ride scene alone until I can figure out the ride system issue.  I'll also get the controller sensitivity fixed and some basic culling in.  Then I'll update the web simulation at that point.  It'll be a bit of a step backwards since some previous elements might be missing (vehicles in lobby, EO canopy, trees) but at least it should run smoother.  This part isn't all that much fun but it'll be nice to have it done.

I'll let everyone know as soon as the fixes are published.