Unity: Day 5Sep-3-08, 1:59 pm by HanfordFile under: Video games, Unity, tech I've now spent a few days with Unity (see my initial reactions here). I'm still only about 1/2 way through the Lerpz tutorial, but I have an update:
Unity SupportAs I mentioned in my previous post, I had experienced a few crashes. Let me provide you on a few details about them. Every time Unity crashes, a simple Bug Report app fires up which encourages you to submit a bug. The app is so easy to use, I've filed bug reports every time the app crashed on me. I'm happy to report that every bug I submitted was replied to by a Unity representative. In both cases, I was able to narrow down the crashing to two known bugs that Unity is aware of. Additionally, both bugs are pretty easy to work around.While crash bugs are never welcome, it's nice to know that the bug reports didn't fall into a black hole, and that the developers were aware of them. Unity and Lightwave: first resultsOne of my biggest questions about Unity, not to mention every other 3d engine I've messed with, is how well does it play with Lightwave. Lightwave is a great modeler but not quite the industry standard, and I never had great success importing Lightwave scenes into Director, which ultimately kept me from ever using Director's 3D capabilities for a project. When I started to test Unity, Tom Higgins (Unity Product Evangelist) told me it should work just fine, but I still like to qualify my tools via testing before truly sinking my teeth into them. The executive summary of my initial Lightwave testing is everything's working great so far. Here's a bit more detail, though:Importing models from Lightwave into Unity First off, I had to install the FBX exporter to Lightwave 9.3. Pretty straightforward, and it was covered in the Unity documentation. I loaded up a character from my previous game development follies, and exported him. This is where I learned that the Lightwave FBX exporter requires all texturing to be done with the UV projection, as opposed to other projections. I normally don't apply UVs when modeling in Lightwave since all my models are pretty basic, designed for pre-rendering, and using UVs in Modeler adds extra steps. For this first test, I exported the model anyway. the FBX exporter still worked, it just left off the textures. Additionally, the FBX model froze the subdivision cages that the model had, and turned them into triangles. Pretty cool. The model imported into Unity and showed up in the game world just fine, outside of it's missing textures. Importing animation from Lightwave to Unity My next test was to import a walk cycle from Lightwave and see how it showed up in Unity. I exported a character with a bone-enabled walk cycle to FBX and pulled it into Unity. Again, it worked great. Here I ran into a bit of short-lasting confusion: It appeared that with Lightwave models you only get one animation per model. After a bit of playing around I discovered the "Settings" button in the Project pane. In Settings it allows you to manually break the imported animation into pieces, specifying a name, beginning frame, ending frame, and whether or not it loops. So the process is to do all your character's animations in a single timeline, export it, then break them up in Unity using the Settings panel. Once I figured that out, I was very happy. TexturesI then soldiered forward and decided to import a model with proper UV maps. I quickly made a crate and textured it on all sides, and exported it. The import into Unity looked great. To Do: animation with texturesSo my next test will be to combine the above: import a character animation with textures and see if it looks right in Unity. At this point I feel like it's just a formality, but I still want to make sure it all works during this trial process. Hanford's Unity FAQsHere's a running list of open questions I have about Unity. As I find the answers, I hope to update this.Q: Does Unity have native SaveGame and LoadGame support or do you have to hand-roll this? A: Unity has support for saving and loading data, but as far as tying that data to the state of the world, you'll need to roll your own. Specifically, you’ll want to use the PlayerPrefs class which works both in standalone and Unity Web Player targets. (Source: blog comments). Q: Does Unity have native PathFinding built into it's terrain? If not, is it easy to implement given an A* routine? A: No native pathfinding built in. It is possible to create your own, and there are third party implementations. Specifically, there's an article in issue 1 of Unity Developer Magazine in how to do so, and a free A* implementation by Angry Ant. (Source: blog comments) Q: How much support is there for permanently modifying a scene via scripting? Can I write my own level editor tools that change the Scene permanently? A: Via scripting it's possible to edit the scene realtime, and using this with a combination of saving the worldstate (like a saveGame script would do) would give you the results you'd want. However, there's also support for using Editor commands via scripting described in the Editor section of the Unity Manual. However, the strategy for using these classes to modify the scene is still unclear to me. (Source: blog comments) Feedback - 3 responsesDisplayed newest to oldest. Leave a comment.David Helgason wrote: Sep-4-08, 2:07 am Hi Hanford (and Marty), 1. What Marty said. Specifically, you'll want to use the PlayerPrefs class which works both in standalone and Unity Web Player targets. 2. What Marty said. In addition, Emil "AngryAnt" Johansen has created a pathfinding module for Unity, which he distributes for free. Find it here: http://angryant.com/path.html 3. What Marty said. You can also write editor scripts, which /can/ modify scene or project data. Check the docs here: http://unity3d.com/support/documentation/ScriptReference/20_class_hierarchy.Editor_Classes.html Here's to you enjoying Unity, joining the forums, and telling all your friends :) d. Marty wrote: Sep-3-08, 2:25 pm Heya, Hanford. My quick, and oh-so-possibly-incorrect answers to your first three open questions are as follows: 1. You will have to roll your own, but it won't be any more difficult than writing a bunch of variables to an external file. And Unity will even allow you to save user info from a web-based Unity game now! 2. There's no native A*, etc. but there is a great article in he current (Premiere) issue of Unity Developer Magazine describing an implementation of A* in Unity. Plus, the Unity FPS demo has a great waypoints example. And there's plenty more discussions of these topics on the Unity forums. 3. You'd probably have to write the modified terrain data out to an external file and read it back in, but that's no biggie in Unity. And since Unity lets you build meshes at runtime, you'll be able to use a lot of the techniques you have probably seen used to describe terrain reliefs in Director Shockwave (i.e. datasets, grayscale maps, etc.). Leave a commentComments are displayed on posts and visible to all site visitors. |
|
I design things in Silicon Valley; mostly consumer electronics media players. Perhaps I can design things for you. Check out my UI Portfolio. When I'm not making things for other people, I'm usually making video games. more
Please use our contact form.
|
|
Hey Hanford - just stumbled on your blog here. Very nice - already added your RSS feed :D
Just to clarify: The default license for the Path system states that it is free to use in commercial and non-commercial applications as long as the logo of the app is prominently displayed in the application splash-screen.