Creating 3D Game Art for the iPhone with Unity
eBook - ePub

Creating 3D Game Art for the iPhone with Unity

Featuring modo and Blender pipelines

  1. 254 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Creating 3D Game Art for the iPhone with Unity

Featuring modo and Blender pipelines

About this book

Revolutionize your iPhone and iPad game development with Unity iOS, a fully integrated professional application and powerful game engine, which is quickly becoming the best solution for creating visually stunning games for Apple's iDevices easier, and more fun for artists. From concept to completion you'll learn to create and animate using modo and Blender as well as creating a full level utilizing the powerful toolset in Unity iOS as it specifically relates to iPhone and iPad game development.

Follow the creation of "Tater," a character from the author's personal game project "Dead Bang," as he's used to explain vital aspects of game development and content creation for the iOS platform. Creating 3D Game Art for the iPhone focuses on the key principles of game design and development by covering in-depth, the iDevice hardware in conjunction with Unity iOS and how it relates to creating optimized game assets for the iDevices.

Featuring Luxology's artist-friendly modo, and Blender, the free open-source 3D app, along side Unity iOS, optimize your game assets for the latest iDevices including iPhone 3GS, iPhone 4, iPad and the iPod Touch. Learn to model characters and environment assets, texture, animate skinned characters and apply advanced lightmapping techniques using Beast in Unity iOS. In a clear, motivating, and entertaining style, Wes McDermott offers captivating 3D imagery, real-world observation, and valuable tips and tricks all in one place - this book is an invaluable resource for any digital artist working to create games for the iPhone and iPad using Unity iOS

Trusted by 375,005 students

Access to over 1.5 million titles for a fair monthly price.

Study more efficiently using our study tools.

Information

Publisher
Routledge
Year
2012
Print ISBN
9780240815633
eBook ISBN
9781136129414
CHAPTER 1
image
Getting to Know the iDevice Hardware and Unity iOS
The technical understanding behind creating game assets is more in-depth than just modeling low-resolution geometry. Before we can get into actual modeling or creating texture maps, we’ll first need to have a solid understanding of the hardware and game engine that the content will run on. Each platform or device will have it’s own limitations, and what might run well on one platform doesn’t mean it will run as well on another. For instance, the faster processor in the iPhone 4 or iPad, in some cases, may help in the processing draw calls than the slower processor in the iPhone 3GS. Another good example is that although the iPad has a 400 MHz boost in chip performance, the lack of an upgraded GPU introduces new bottlenecks in performance to be aware of. This is where the project’s “game budget” comes into play. Your game budget is the blueprint or guide through which your game content is created. There are three specifications to be aware of when evaluating the hardware of the iPhone and iPad, which are memory bandwidth, polygon rate, and pixel fill rate. For instance, if you have a fast-paced game concept, you’ll need to denote a high frame rate in your game budget such as 30–60 frames per second (fps), and all of the content you create must be optimized to allow the game to meet this frame rate budget. You’ll also need to take into consideration that with the iPad, you’re essentially rendering to a pixel count that is over five times that of the iPhone 3GS and around 1.2 times that of the iPhone 4 screen, which results in 5–1.2 times the amount of data being processed per frame. Without a solid understanding of the capabilities and limitations of the device your game is targeting, you won’t know what optimizations to the game content that will be needed to achieve your game’s budgeted frame rate. Essentially, it would be like working in the dark.
The goal of this chapter is to turn the lights on so to speak by familiarizing you with the iPhone and iPad hardware as well as take a look under the hood of the Unity iOS game engine. By familiarizing ourselves with the different iDevices and what’s going on under the hood of Unity iOS, we can then understand the “why” behind building optimized content for these devices. We will also be able to properly determine the frame rate, poly-count, and texture size budgets in our overall game budget, which is determined by a balance of the type of game you’re creating and the targeted frame rate, all of which is ultimately controlled by the hardware’s memory bandwidth, polygon rate, and pixel fill rate.
Technically Artistic
When discussing game development, topics can quickly become very technical and programmatic as we’re discussing real-time graphic implementations and mobile hardware limitations. Being a 3D artist, I found that it wasn’t the modeling and texturing that was difficult in creating game art, but it was in understanding the technical limitations of the hardware and OpenGL implementations to creating real-time graphics that I had a tough time. Not to worry, this chapter’s main goal is to discuss the following topics from the point of view of the game artist.

iDevice Hardware

In this section, we’re going to discuss the hardware for the iPhone and iPad, and at this point, I’d like to make a couple of distinctions between the device models. Throughout the book, I will refer to the term “iDevices” to encompass all of the devices, i.e., iPhone, iPad, and iPod Touch. The term “iOS” is Apple’s official name for the OS or operating system common to all of the iDevices. I’d also like to add that this book will not be covering the iPhone 3G or the iPod Touch second generation and below. As of the writing of this book, these devices are second- and third-generation devices, and I wanted to concentrate on the most current devices. I’ll break this section into two categories, which are the ARM central processing unit (CPU) and PowerVR SGX graphics processing unit (GPU). As we cover the iDevice hardware, we’ll also discuss how these categories relate to Unity iOS.

ARM CPU

The CPU is the processing unit, and the iDevices use the ARM architecture with the Cortex-A8 core at version ARMv7-A, and from an artist’s perspective, the CPU handles calculations. In Fig. 1.1, you can see a break down of the hardware differences in each of the iDevices. Each model of the iDevices contains different or updated hardware that can affect your game’s performance such as how the hardware affects pixel fill rate.
Both the iPad and iPhone 4 contain the A4 processor. The iPhone 3GS and iPod Touch third generation both use an ARM Cortex-A8 that has been under-clocked to 600 MHz. As far as performance goes across these three devices, you can say as a basic rule that the iPad is the fastest in terms of processing, followed by the iPhone 4 due to the A4 being under-clocked and finally not far behind at all is the 3GS. Again, I stress that this is a very basic rule, and your content will really drive these results in terms of how pixel fill rate and polygon throughput affect your game. Profiling your game on the devices with your specific content is the safest and most accurate way to gauge performance, but it can be helpful to have general ideas in place about the device capabilities in the early stages of development.
image
FIG 1.1 Here You Can See a Chart Listing the Different Hardware Components in the iDevices.
There are many aspects to how the CPU affects your Unity iOS powered game. For instance, the CPU also processes scripts and physics calculations as well as holding the entire OS and other programs being run. Since this book is on creating game art, we’ll focus the next subsections to be particular to the game’s art content on our game objects and what operations are important to the CPU in these terms.
On a particular note, just because one might be more oriented toward the art-side of game development doesn’t mean they should steer clear of code, and it certainly doesn’t mean that artists can’t understand technical aspects. In fact, with independent game development, there’s a high probability that not only are you building 3D content but you’re coding the game as well. More often than not, I see great scripts and programs written by amazing artists instead of hardcore programmers. The point here being, scripting sometimes has the negative connotation of something to be feared and I say that couldn’t be further from the truth. You never know what you’re capable of until you jump in and give it a shot.
Draw Calls
The draw call can be thought of as a “request” to the GPU to draw the objects in your scene and can be the area in which the CPU causes a bottleneck in performance. As we’ll discuss in the GPU section, the iPhone and iPad uses OpenGL ES 2.0 (OGLES) emulating OGLES 1.1 shaders on the hardware level, and with this implementation, vertex data is copied for each draw call on every frame of the game loop. The vertex data is the vertices that make up our 3D objects and the information attached to each vertex such as position, normal and UV data, just like a 3D mesh’s vertices in modo has positional, normal, and UV coordinate data.
The vertex data is transformed or moved in 3D space on the CPU. The result of this transformation is appended to an internal vertex buffer. This vertex buffer is like a big list or a container that holds all of the vertex data. Since the vertex data is copied on the CPU, this takes up around one-third of the frame time on the CPU side, which wastes memory bandwidth due to the fact that the iPhone shares its memory between the CPU and GPU. On the iPhone and iPad, we need to pay close attention to the vertex count of our objects and keep this count as low as possible as the vertex count is more important than actual triangle count. As you’ll read in Chapter 2, we’ll talk about how to determine what the maximum number of vertices you can render per individual frame.
Game Loop
Inside the Unity iOS game loop is where the components of our game are updated. The game loop is always running regardless of user input. From a 3D artist’s perspective, you can think of the game loop as an animation. In a 3D animation, your scene runs at a given frame rate, and in each frame of the animation, something is calculated such as key-frame interpolation. A game engine’s game loop is basically doing the same thing.
I used to get confused by the “per frame” section of that statement. It helped me as a 3D artist to think about my game scene just like a scene in modo. For instance, if I have an animation setup in modo, the render camera will render the portion of that scene that the camera can see in its view frustum as set in the camera’s properties, for each frame of the animation. The same is true in Unity iOS. In Fig. 1.2, you can see an illustration that depicts the way in which I visualize a scene’s total vertex count per frame.
image
FIG 1.2 In This Image, the Yellow Highlighted Areas Represent the Camera’s View Frustum and the Vertices Visible per Frame.
With each frame of the game loop, only a certain amount of vertices are visible within the camera’s view frustum for a given frame, and within this frame, we should keep the vertex count for all of the objects in the scene to around 10 k. Now, this is a suggestion as to what works best on the iDevice hardware, but depending on your game and game content, this could possibly be pushed. The point being, with game development, there aren’t any absolute answers when it comes to optimization. You have to optimize content to your game’s performance standards, i.e., your frame rate budget. There are a lot of techniques to optimizing our vertex count as we’ll discuss in the modeling chapters, and there are also rendering optimizations for the camera’s view such as occlusion culling for controlling vertices that are sent to the vertex buffer.
It’s obvious that the faster the CPU, the faster the calculations are going to be. However, just because you have more power doesn’t necessarily mean you should throw more vertices to the system without regard to other performance considerations such as pixel fill rate as we’ll discuss later in this chapter.
Batching
Batching is a means to automatically reduce draw calls in your scene. There are two methods in Unity iOS, which are dynamic and static batching. It’s important to note that draw calls are a performance bottleneck that can largely be dependent on the CPU. Draw calls are generated each time the CPU needs to send data to...

Table of contents

  1. Cover
  2. Halftitle
  3. Title
  4. Copyright
  5. Contents
  6. Acknowledgments
  7. Prologue: Thump’n Noggins
  8. Chapter 1: Getting to Know the iDevice Hardware and Unity iOS
  9. Chapter 2: Creating Game Objects Using modo
  10. Chapter 3: Understanding Textures and UV Maps
  11. Chapter 4: Creating Game Objects Using modo
  12. Chapter 5: Animation Using Blender
  13. Chapter 6: Animation Using Blender
  14. Chapter 7: Animation Using Blender
  15. Chapter 8: Creating Lightmaps Using Beast
  16. Chapter 9: Working with Game Assets in Unity iOS
  17. Bonus Resources
  18. Creating Tater’s Training Trash Yard
  19. Index

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.5M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1.5 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Creating 3D Game Art for the iPhone with Unity by Wes McDermott in PDF and/or ePUB format, as well as other popular books in Computer Science & Desktop Applications. We have over 1.5 million books available in our catalogue for you to explore.