Hello, Earthling! How would you like unlimited cosmic power? That is essentially what you get when you use the ultra-versatile Unity game engine in combination with the awesome assets you can create with the Blender graphics toolkit. "Wait a minute," you say with worry, "that much power sounds expensive." Well, worry not! All that power can be had for the low, low price of… nothing!
(Full disclosure: if you start making more than $100,000 a year with Unity, you need to start paying a licensing fee. You should be so unlucky!)
This book starts you on the path to that unlimited power. Once begun, it is a never-ending journey bounded only by your effort and imagination. Unity and Blender go together like some of the most famous human combinations:
- Peanut butter and jelly
- Pen and paper
- Thelma and Louise
On our journey, we will learn how to create, alter, texture, animate, and script 3D objects in Unity and Blender and exchange them between the two programs in our pursuit of making breath-taking, mind-altering, fun-inducing, superlative-worthy video games.
This chapter lays the groundwork for what lies ahead. We will cover the following:
- What is Unity and why choose it?
- What is Blender and why choose it?
- What software, hardware, and knowledge should you have to make this journey?
What is Unity?
Firstly, what's a video game engine? Aww, come on. Are you really reading this book and asking that? Okay, you are forgiven. Maybe you are recovering from a mind-wipe. A video game engine is a software tool that helps you to create a video game. One example of an incredibly famous video game engine would be… Unity!
Unity was first released in 2005. It was available only on Mac and could only publish games for Mac. That very quickly changed and now, over a decade later, Unity is a mature and capable (though not yet sentient) piece of software. Unity is available for use on Windows, macOS, and Linux. As of this writing, Unity can create 3D and 2D games for more than 25 different platforms! These platforms include Windows, macOS, and Linux as well as WebGL, PlayStation, Xbox, Nintendo Switch, various virtual reality and augmented reality platforms, and more!
When I say Unity can "create games," I don't actually mean it can only "create games." That's just the tip of the planetoid. Unity is currently used to create many different kinds of experiences in areas and industries besides video games, including the fields of virtual/augmented/extended reality (VR/AR/XR), simulation, real-time cinema, film pre-visualization, and automotive design and marketing. Oh yeah, let's not leave out construction, architecture, art installations, engineering, and research data visualization. Got all that? For those of you sitting in the back, there may be a pop quiz later.
Top 12 Reasons for Using Unity
- Versatility: If you can dream it, you can build it, all the way up to AAA titles. Unity has an amazing toolset that allows you to create 2D and 3D games ranging from the very simple to the very complex. It can be your go-to choice whether you are re-making Pong or creating the next best MMORPG.
- Ease of Learning: To be clear, Unity development can get very complex. But to get started with Unity and produce something surprisingly fun and advanced can take as little as 15 minutes. And Unity caters to different learning styles, with visual scripting available for those who prefer that to code editing.
- Portability: With little to no modification, you can get your latest masterpiece running on a number of the many platforms Unity supports, including desktop, web, mobile, and XR!
- Community: You are not alone. Unity has a development community of over 1.5 million people. You read that right, 1.5 million humans. Of course, that is insignificant on a galactic scale, but from your limited perspective, it is quite impressive. This means that if you run into a problem or need advice, the answers are out there in cyberspace. The Unity developer community is very friendly and encouraging as well.
- Learning support: Unity has excellent documentation as well as an extensive, dedicated, free learning site: https://learn.unity.com. This is not to mention the hundreds of high-quality tutorial videos on YouTube as well as the many excellent how-to books available (such as this one!).
- Customizability: Every developer and every project is different. The Unity editor is tremendously configurable and even programmable. You can create in-editor custom tools to make working on your specific game much easier. And if you need a certain special visual quality for your game? Even the rendering pipeline Unity uses for graphics is programmable and customizable.
- Price: Free! Did I mention that already? You only need to start paying a fee if your games start making gobs of money. Gobs.
- Reach: You have certainly played a Unity-made game before whether you knew it or not. As of the writing of this book, Unity games have reached over 500 million gamers and the Unity engine is responsible for creating 34% of free mobile games on the market. Unity games reach every game market there is.
- Assets: 3D models, 2D art, visual effects, sound effects, GUIs, tools, templates, and much more. Back in the bad old days of game development, there were some powerful game engines and development technologies available (anyone remember Microsoft's XNA?) but, as an indie developer or hobbyist, there was nothing to put into your game unless you created it yourself or paid (or mind-controlled) a talented artist. It cannot be overstated how valuable the Unity Asset Store is, whether for assets to use in prototyping or in your final release. And some very high-quality assets are available for free. In fact, on our journey, we will use multiple free assets in addition to the ones we create.
- Development Support Tools: Unity includes tools for integration with different code editors/IDEs, version control systems, asset creation tools (such as Photoshop), and it supports collaborative team development as well.
- Monetization-Friendliness: Unity wants you to profit from your efforts! Built-in packages such as Unity Ads and In-App Purchases make it easy to build revenue opportunities into your game. And the Unity Analytics tools allow you to discover and make use of insights about how players play your game. Even minor game changes can greatly boost the success of your game.
- Maturity: Unity has been around long enough that most of its sharp edges have been smoothed. Over and over, every day the engine proves itself to be stable, effective, and reliable.
With Unity explained away, let's take a look at the other focus of this book…
What Is Blender?
Blender is described as a "computer graphics software toolset." It was first and foremost designed to create sophisticated 3D graphics when it was released in 2002 but now is capable of producing spectacular 2D creations as well.
Blender is free and (unlike Unity) open source. It is used every day for creating assets and animations for computer games and visualizations. In addition, it can create animated films, visual effects, and artwork, models for 3D printing, simulations of fluid, smoke, and soft bodies, and it also does video editing and compositing. Did I mention it's free? As in, costing no money.
So, what's the catch?
It's a beast.
When you first experience Blender, especially if you have had no previous experience with 3D creation software, you may get dizzy and get a nosebleed and want to pilot your ship into the heart of a quasar. But fear not! That will pass!
As intimidating as Blender may seem at first, it can be mastered. The secret is to tackle it a little bit at a time, learning bits of related functionality, and to understand and believe that there is a method to Blender's glorious madness. As an open source project it has grown in different directions with its community and it has its own particular way of doing things. At some point, you will just "get it."
If you are brave and determined and attentive, you will achieve great success. You get out of it what you put into it (in that sense, it is like the kitchen appliance!).
Here is some Blender "wow":
Top 8 and a Half Reasons for Using Blender
Although this list isn't as long as the one for Unity, many of the reasons to use Blender are the same and they are no less important.
- Free and open source: Other industry-standard 3D applications (such as 3DS Max, Houdini, and Maya) cost thousands of dollars. Blender gives you AAA graphics capabilities for nothing. The fact that Blender is open source might not seem like an immediate benefit to non-programmers, but it actually has tremendous benefits. See Extensibility, below.
- Versatility: This book will focus on using Blender for modeling, texturing, and animation, but Blender is a treasure trove of functionality. Unlike other proprietary modeling programs, Blender is more of a "one-stop shop", with capabilities that include powerful 2D graphics creation and animation, motion tracking, and video compositing, among others.
- Community: Blender has a huge user base, with some estimates putting it at around three million Earthlings. Like the Unity community, it is very friendly and helpful, providing support and inspiration.
- Learning Support: In addition to the official Blender documentation, there are hundreds of excellent YouTube videos to help you learn, not to mention highly valuable resources available in book form (ahem!).
- Fast Workflow: Once you get comfortable with Blender's preferred mouse-and-keyboard work process, you will see your productivity soar. It is arguably faster than the more menu-oriented workflows of other programs.
- Customizability: Blender is nothing if not highly customizable. You can change just about everything in the UI and input system to your heart's content. Beyond that, the application is programmable via the popular Python language.
- Lightweight and Multi-Platform: Blender easily runs on Mac, Windows, and Linux. In addition, compared to other top 3D applications, Blender is tiny. It can easily fit on a thumb drive you take with you and run anywhere.
- Extensibility: Blender has a huge number of existing plugins, ranging from the very general to the super-specific (for example, there's one just for creating rocks). Because Blender is open source, it's not limited by the size of an in-house development team. This means that developers from all over the world are constantly working on new features and creating plugins.
- Built-in Monkey: Unlike other programs that augment their standard palette of 3D primitives (cube, sphere, and so on) with a teapot, Blender comes with its own 3D mascot, Suzanne the monkey.
Show me the monkey!
We have now identified our two primary tools for achieving cosmic power. But what do you need to use them?
Requirements for this Book
We are boldly going where a lucky few have gone before.
In this book, we will get comfortable using Unity and Blender hand in hand, specifically learning how to create new assets in Blender—and modify existing ones—and then incorporate them into a simple sci-fi Unity mini-game project. We will learn how to create materials and do animation in both Unity and Blender, and we will learn best practices for when to use each tool.
By the end of this book, we will have covered an incredible amount of ground (or space?). You will have created, animated, and scripted some science-fiction themed props, scenery, and characters that you can reuse in your future games.
The following sections outline the bare minimum in terms of knowledge, hardware, and software that you will need in order to have a pleasant and productive experience with this book.
Modeling versus Sculpting
Blender has two primary 3D creation methods: polygonal modeling and sculpting. Polygonal modeling focuses on creation by assembling polygons such as quads and triangles, whereas sculpting treats your creation more as if you were shaping something out of clay. The two creation methods have different workflows and tools. This book will focus on polygonal modeling in Blender.
That said, there are just a few basic things that will keep your head from exploding and your blood from boiling:
- You should have a rough familiarity with 3D concepts such as x, y, and z coordinates and transformations within that space: translating, rotating, and scaling. It helps if you have heard of vectors, but no knowledge of 3D math is assumed.
- You should have a basic knowledge of using the Unity editor's Scene View and Hierarchy View to place and manipulate a GameObject.
- You should understand how to examine and manipulate the properties of a GameObject in the Inspector window. You should also understand how to add a Component to your GameObject in this window.
- You are able to create a new C# script, add it to a GameObject, and edit it in the code editor of your choice. In this book, we will use Visual Studio. A basic understanding of C# will be helpful to complete the projects, but the code that is included is clearly explained. The majority of this book is not very code-heavy; it is only toward the end of this book, when we start to bring together all the assets we have created, that we will make the most use of scripting.
- You should know the basics of using an image-editing program such as Photoshop. This knowledge will only be necessary for sections on texturing assets.
If it has not been made clear, you do not need to have any prior experience with Blender.
At a bare minimum, you will need copies of both Unity and Blender installed, updated to the current version of each. As of this writing, the latest version of Unity is version 2020.3.21 and the latest version of Blender is version 3.0.0..
Both programs are cross-platform and available for macOS, Windows, and Linux.
The latest version of Unity can be found at https://unity3d.com/get-unity/download.
The latest version of Blender can be found at https://www.blender.org/download/.
In addition to Unity and Blender, you should have access to an image-editing program. Photoshop is the industry standard but comes with a price tag. A free alternative is GIMP, which can be downloaded here: https://www.gimp.org/downloads/.
Blender itself has some image-editing capability. Although we will not delve into it, you may want to explore that if you don't use other alternatives.
Well, the tablet question is easy to answer. Blender will not run on a tablet. So a desktop or laptop it is then. The particular hardware requirements for Unity and Blender can be found at these locations:
- Unity: https://unity3d.com/get-unity/download
- Blender: https://www.blender.org/download/requirements/
Using a 3-Button Mouse
Yes, you can technically use Blender and Unity without a 3-button mouse. But that is like saying that technically you can survive in outer space without a spacesuit. Those 10-15 seconds you would survive would be pretty painful. In other words, use a 3-button mouse. Your sanity will thank you.
How to Read This Book
Now, I understand that many of you are going to be naughty and flit about between chapters like an over-caffeinated hummingbird.
Personally, I believe you will get the best learning experience from this book by reading it in chapter order and—although I make efforts to have chapters be as self-contained as possible—I specifically try to have later tasks and concepts build on earlier ones. That said, it is still quite possible to jump around the chapters willy-nilly, like the aforementioned hummingbird. Your eventual punishment for doing so will not be too severe.
Getting Additional Help
One book, even one as awesome and mighty as this one, cannot cover everything, especially when it deals with two complex programs.
Thus, I encourage you to use this book as a launchpad and when you invariably encounter new situations where you need additional help, to make full use of the ample free resources available at your (virtual) fingertips.
The official Blender support page is at https://www.blender.org/support/.
There are many other unofficial high-quality support sites if you do a little Google searching.
As mentioned, YouTube.com has a vast array of tutorial and showreel videos.
Packt Publishing also has an extensive line of books for Unity and Blender that delve into many specific topics in much more detail than we can go into here. A complete list can be found by searching at https://www.packtpub.com/.
Let's review. In this chapter:
We've identified key capabilities of both Unity and Blender and looked at why you should choose these programs over their competitors.
Also, I've flagged that you do not need any prior experience with Blender, but it will help greatly if you have a modest familiarity with Unity.
Besides that essential up-front knowledge, we've looked at what software you will need installed and what hardware will get the job done with the least amount of pain.
We've foreshadowed the mini-game level we will develop in this book, which will give you the skills and confidence necessary to go on and create bigger and bolder things in your other projects.
Coming up next, we will gather the necessary resources for our journey, becoming familiar with the Unity Asset Store and setting up the project where all the action will take place.
Ready to become a master of time and space? I hear your engines firing up and I have received your request to launch. Permission granted.
3… 2… 1… lift off!