Category Archives: Development

Unity And Blender Files

Importing Blender Into Unity

Since I’m using Blender and Unity for my current projects, I’ve had to figure out a common problem with this integration.

Right-handed… left-handed… up is forward… forward is up… dogs and cats living together.

There are a bunch of posts about importing models from Blender into Unity, and how they always come in rotated incorrectly. Blender is right-handed with (right, forward, up) orientation, while Unity is left-handed with the (right, up, forward) orientation. The primary axes seem to be forward and up, since the objects rotate around the axis that bisects those two.

Basically, you want your Blender model to face forward along the z-axis and up along the y-axis. This causes your model to appear to be pointing up in the Blender workspace, which is not really how you want to work on things. Blender has the ability to distinguish between applied rotation and displayed rotation, which I use to fix this apparent problem.

After researching and experimenting, I’ve decided to use the following method. However, I have not attempted to animate any of my objects yet, so that may not work properly. If animations, or any other feature, breaks this method in the future, I will update this post to reflect the fix.

Blender Workflow

  • In Blender, create your model upright using (right, forward, up) orientation.
  • Rotate the model (-90, 180, 0) using XYZ Euler rotation.
  • Apply the rotation.
  • Rotate the model (-90, 180, 0) using XYZ Euler rotation.

This will apply the corrective rotation, which fixes the rotation in Unity. Then it uses the second rotation to make the object appear correctly aligned in Blender. It just so happens that the complementary rotations are equal, since it’s effectively rotating the object 180 degrees around the (0,0.7071,0.7071) axis.

You could also rotate the model using (0, 0, 0.7071, 0.7071) in quaternions, or (0, 0.7071, 0.7071, 180) in axis-angle notation. It’s up to you. Generally these are safer, since they don’t suffer from potential gimble-lock, but this rotation works fine in Euler angles.

I’ve found that as I join objects together, they remain properly rotated. I haven’t tried anything too complicated though, like multiple objects or joining to a non-rotated object. I’ll test those situations out soon and update this post with any findings.

Facebooktwitterlinkedin

Going Back To Cali

Taking My Games To E3

Well, I’ve pretty much got my games in a playable state and I’m ready to head down to L.A. for E3. I’m planning to take my games to E3 on the second day and try to find a place in the lobby to set up and show them to whomever wants to see them. I’d also love to show them to any companies, if they are interested.

Windows 8.1 Laptop. Meh.

I got a laptop at Costco on Monday so that I have something on which to run the games. It has Windows 8.1 on it, so that’s been fun to learn. I pretty much stay in desktop mode, but every once in a while Windows uses an app to open a file. That’s pretty annoying, because apps can’t be moved and re-sized like normal windows. I’ll probably be returning this laptop before the 90 day return period runs out, since they have better laptops online for the same price.

Laptop And Oculus

I was having some issues getting the games to run on the laptop and the DK1 on Tuesday. The good news is that Unity 5.1 came out on Tuesday with native support for VR, which means Oculus for now. The bad news is that I still can’t get my standalone builds to show up on the DK1, so I have to run the games from the editor. This has a slight affect on performance, so the games have some frame stutters at times. At least I can play the games on the laptop though.

I still need to add menus to the games and some in-game command maps would be nice as well. I’ll be walking people through the demos for now, so that shouldn’t be a big problem at this point. Those are definitely things that I’ll need to add before uploading the games to the Oculus share site.

Screeching Weasel

We’re heading up to Portland to see Screeching Weasel at the Crystal Ballroom tonight. We’ll stay at the Crystal Hotel and then I’ll be flying out of PDX tomorrow afternoon. I’ll be staying with my brother in Costa Mesa and my friend, Scott, in Aliso Viejo while I’m down there. It’s gonna be a crazy week.

Facebooktwitterlinkedin

Starting up

Well, it’s been an eventful couple of weeks for sure.

I just registered my business and got my EIN and bank account. I’ve also been meeting regularly with other game devs and business people to get information about starting a company. I suspect that the information I’ve been gathering will make for another post soon.

Here’s a quick list of the tools and services that I am using:

  • Unity
    • This is the primary content tool that I am using. It’s a free game engine for companies that make less than $100K/year.
  • Unreal Engine
    • This is another game engine, which is free to use and only requires royalties if you make any money with your project. I have this set up, but am focusing on Unity to start, since I have the most recent experience with it.
  • Android SDK
    • This is necessary to build apps for Android devices.
  • Oculus Rift SDK
    • This is necessary to build VR projects for the Oculus Rift
  • Sublime Text 2
    • Fast and lightweight text editor. Not very easy to configure, but the defaults work pretty well nonetheless.
  • Git
    • This is the source control system that I am using on my local machine. It’s a free distributed version control system.
  • BitBucket
    • This is a Git (and Mercurial) based online server for hosting repositories.
  • Test Fairy
    • This is a test build distribution and testing platform. It allows devs/testers to download builds directly to their devices without going through the app stores. It also captures debug data whenever the app is run.
  • GIMP 2
    • This is an image manipulation program, with more than enough features to create authentic programmer art.
  • Blender
    • This is a 3D modelling program, which has a range of tools and capabilities to rival any licensed programs. Now, if I can just learn to use it well.

Well, I’ve written one post so far. Let’s see how frequently I can keep doing that.

Facebooktwitterlinkedin