Unity: Day 5




Unity logo 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 Support

As 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 results

One 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 FAQs

Here'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 - 9 responses

Displayed newest to oldest. Leave a comment.
homeowners insurance estimate wrote:   
The a real excellent content. This site is really so useful. I must understand another specifics of this write-up. So make sure you provide some other specifics of this specific part,Many thanks.
homeowners insurance rates minnesota wrote:   
I am genuinely disappointed about threads honestly exactly where we will need to instill the feeling connected with brotherhood amongst our!! How can we anticipate our children so that you can admire various other religious beliefs when we don’t guide them by simply model?? I am unable to observe as well as comment any kind of craft in romance in order to religious beliefs
homeowners insurance for mobile homes wrote:   
Superb things from you, guy. I have study your information in advance of along with youre equally well wonderful. I quite like precisely what youve got in this article, enjoy what exactly youre expressing and exactly how you declare the idea. You will be making the idea engaging so you now be capable of help keep the item smart. We can't wait around to go through additional from you. That is really a terrific web site.
music group business cards wrote:   
This is actually the most unique article We've read in some time. I've learnt a lot as a result.
online business cards wrote:   
Here is the most unique article I've read in a while. We've learnt greatly than it.
wholesale business cards magnets wrote:   
Nice to generally be visiting your site again, many experts have months in my opinion. Well this article that I have been previously waited for too long.
Emil Johansen aka AngryAnt wrote:   
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.
David Helgason wrote:   
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:   
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 comment

Name:
Website:
Comment:

Email:
Captcha:
Select the icon of Saturn from below:

           

           

 

This site is mostly about

Video Game Design

User Interface Design

Creative & fun stuff

 

Your Host

I'm Hanford Lemoore. My parking skills are unparalleled.

I make things. From consumer electronics, to video games, to theme park attractions. Perhaps I can make things for you! Check out my portfolio.

When I'm not making things for other people, I'm usually experimenting.

 

Contact

Follow me on Twitter.

Message me on Facebook.

Email me using my contact form.

 

RSS 2.0

 

maquettegame.com

tikiroom.com

junkyardclubhouse.com

monolux.com

 

   


Copyright 2012 Hanford Lemoore | Blog | About | Portfolio | Contact
Powered by Olark