Home Game Development Mind-Melding Unity and Blender for 3D Game Development

Mind-Melding Unity and Blender for 3D Game Development

By Spencer Grey
books-svg-icon Book
eBook $39.99 $27.98
Print $48.99 $28.99
Subscription $15.99 $10 p/m for three months
$10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
BUY NOW $10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
eBook $39.99 $27.98
Print $48.99 $28.99
Subscription $15.99 $10 p/m for three months
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
  1. Free Chapter
    Chapter 1: Melding Unity and Blender
About this book
Blender is an incredibly powerful, free computer graphics program that provides a world-class, open-source graphics toolset for creating amazing assets in 3D. With Mind-Melding Unity and Blender for 3D Game Development, you'll discover how adding Blender to Unity can help you unlock unlimited new possibilities and reduce your reliance on third parties for creating your game assets. This game development book will broaden your knowledge of Unity and help you to get to grips with Blender's core capabilities for enhancing your games. You'll become familiar with creating new assets and modifying existing assets in Blender as the book shows you how to use the Asset Store and Package Manager to download assets in Unity and then export them to Blender for modification. You'll also learn how to modify existing and create new sci-fi-themed assets for a minigame project. As you advance, the book will guide you through creating 3D model props, scenery, and characters and demonstrate UV mapping and texturing. Additionally, you'll get hands-on with rigging, animation, and C# scripting. By the end of this Unity book, you'll have developed a simple yet exciting mini game with audio and visual effects, and a GUI. More importantly, you'll be ready to apply everything you've learned to your Unity game projects.
Publication date:
December 2021
Publisher
Packt
Pages
460
ISBN
9781801071550

 

Chapter 1: Melding Unity and Blender

"The journey of 1,000 parsecs begins with a single thruster burn." – The AutoSage of Rigel VI

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?

Unity is a paradox. It is a video game engine that is not a video game engine, or rather, it is so much more than that.

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!

Here is an example of a made-in-Unity, first-person-shooter:

Fig. 1.1 – Escape from Tarkov. Developer: Battlestate Games

Fig. 1.1 – Escape from Tarkov. Developer: Battlestate Games

And here is an example of a retro 2D arcade game:

Fig. 1.2 – Cup Head. Developer: Studio MDHR

Fig. 1.2 – Cup Head. Developer: Studio MDHR

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.

Now, it's true that there are other powerful game engines out there, such as Unreal, Godot, and so on. So why should Unity be your go-to game engine of choice?

Top 12 Reasons for Using Unity

These are the top reasons for using Unity as your game engine of choice:

  1. 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.
  2. 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.
  3. 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!
  4. 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. 
  5. 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!).
  6. 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. 
  7. Price: Free! Did I mention that already? You only need to start paying a fee if your games start making gobs of money. Gobs.
  8. 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.
  9. 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.
  10. 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.
  11. 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.
  12. 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?

Well, firstly, Blender is not a kitchen appliance. If you try to make a game with Unity and that kind of blender, the results could be interesting, but it sounds rather dangerous and messy.

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":

Fig. 1.3 – A Party Tug at 6:00 A.M., by Ian Hubert

Fig. 1.3 – A Party Tug at 6:00 A.M., by Ian Hubert

As with Unity, there are many powerful, competing Digital Content Creation (DCC) programs available, two of the biggest being 3DS Max and Maya. So why would we use Blender over one of those?

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.

The top reasons to use Blender are:

  1. 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.
  2. 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.
  3. 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.
  4. 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!).
  5. 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. 
  6. 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.
  7. 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.
  8. 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. 
  9. 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!

Fig. 1.4 – Suzanne. Another future overlord?

Fig. 1.4 – Suzanne. Another future overlord?

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.

Knowledge Prerequisites

I'll say this: the braver you are, the less you need to know heading into this book. If you follow along closely, you will be able to accomplish everything we set out to do.

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.

Software Prerequisites

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.

It is strongly recommended that you install the Unity Hub software, which helps you manage your projects, your editor installations, and also provides access to key learning materials.

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.

Hardware Prerequisites

Software needs a place to run, doesn't it? So how do we decide between a desktop computer versus a laptop versus a tablet?

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:

In general, you should do fine with a system that is younger than 5 years old and has DX10 (shader model 4.0) capabilities with a full HD display.

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 Unity Support page is at https://unity.com/support-services and the extensive community forums are at https://forum.unity.com.

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/.

 

Summary

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!

About the Author
  • Spencer Grey

    Spencer Grey is a native New Yorker who started making games by typing in source code from magazines (that used to be a thing!). Once upon a time he was Creative Director of Sesame Street’s Digital group where he would boss around Elmo and Big Bird. After that, he co-founded Electric Funstuff and for 15 years developed game ideas for companies like Scholastic, Sony, and Lego. Spencer has been a teacher, programmer, writer, and producer in the games industry. Mr. Grey is definitely not related to the grey aliens stored in Area 51. Definitely not. No way.

    Browse publications by this author
Latest Reviews (2 reviews total)
I've been wanting for a good book to come out that would jumpstart my CG artistic side! I've relied on other people's assets to this point. I only bought the book a couple weeks back, but I've been devouring it since. It certainly covers enough to get me started, which is all I really need.
Just what I was looking for, the workflow link between the two, simply explained. Nice!
Mind-Melding Unity and Blender for 3D Game Development
Unlock this book and the full library FREE for 7 days
Start now