Creating 3D Game Art for the iPhone with Unity Part 9 ppsx

28 352 0
Creating 3D Game Art for the iPhone with Unity Part 9 ppsx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

I created a different look for my game as you can see in the comparison of the default-baked scene and the color-graded scene. Adding Grime to Maps The level looks great with the lightmaps applied; however, for a trash yard, the scene looks way to clean. We need to introduce some dirt and grime to the scene. This is quite simple to do in Photoshop. First, I created a grime brush preset as shown in Fig. 8.30. I then created a new layer and chose my preset brush, changed some set- tings in the brush editor so that I could stamp the grime down by simply left-clicking. I then began to stamp random dirt across the scene as shown in Fig. 8.31. It’s important to be mindful of the seams as due to the nature of the lightmap UVs, there are lots of seams and careless painting can really reveal these seams as shown in Fig. 8.32. FIG 8.28 The Exposure Was Adjusted in Photoshop Using the HDR Toning Tools. FIG 8.29 Here You Can See the Difference That Color Grading Your Maps Can Have on the Style and Look of Your Levels. 206 Creating 3D Game Art for the iPhone with Unity FIG 8.30 I Took a Grime Map from My Texture Collection and Created a Brush Preset in Photoshop. FIG 8.31 The Dirt Was Stamped Across the Scene and Was Placed on Its Own Layer. 207 Creating Lightmaps Using Beast FIG 8.32 By Painting Directly on the Seams, You Can See That the Seams Become Visible in the Lightmap. In Photoshop, you can then adjust the strength of the dirt by adjusting the opacity of the layer. Again, saving the file results in the lightmap automatically being updated in Unity iOS. FIG 8.33 The Secondary Dirt Layer Was Used to Create Accumulation in the Corners and at the Base of the Walls. Once the base layer of grime was laid down, I went back and then added a secondary layer to further hide the tiling effect of the dirt. In this second layer of dirt, I stayed completely away from the seams and used a combination of a smaller version of the grime brush and the eraser tool to create dirt accumula- tion around the edges of the walls and areas where the barrels were stacked in corners. In Fig. 8.33, you can see the secondary dirt layer. 208 Creating 3D Game Art for the iPhone with Unity Summary In this chapter, we discussed the usage of lightmaps not only to optimize your scene, but also to add a greater level of style and realism. The adoption of Beast has quickly become one of my favorite features in Unity iOS. Its quality and productive workflow is unparalleled, and in the spirit of being “Unity way,” its full integration makes creating lightmaps a breeze and puts the creative power back into the hands of the artist. In Fig. 8.34, you can see a comparison between the default lightmap and the lightmap with dirt applied. Notice that the scene looks much better and more rich since the dirt layer provides a level of randomness and detail to the level, as well as match the overstyle of the level design being that of a trash yard. FIG 8.34 Notice That the Dirt Layer Provides a Layer of Randomness and Detail, Thus Improving the Look and Style of the Level. 209 Creating Lightmaps Using Beast [...]... the call to the Add Explosion Force Function, which as we discussed is a part of the Rigidbody Class and actually explodes the pieces of the target From there, the Physics Engine takes care of the rest Fig 9. 20╇ The Rigidbody Class Has a Specific Function for Creating an Explosion Effect Fig 9. 21╇ The Explosion Script is Added at the Root of the Target Game Object 225 Creating 3D Game Art for the. .. for the LandscapeLeft and LandscapeRight orientations Finally, you need to write code that will support and rotate the screen to adhere to the orientations your game supports In Fig 9. 30, you can see a simple script for supporting different resolutions The script only rotates the screen if the device running the game is the iPad, otherwise 2 29 Creating 3D Game Art for the iPhone with Unity Fig 9. 29 •‡... Automatically Generate Particles The One Shot Parameter Will Only Emit the Particles Once Finally, in the Explosion Script, the Particle Emitter’s Emit parameter is activated when the Add Explosion Force is called as shown in Fig 9. 25 Also, notice that the script references the Particle Emitter as a public variable, which is set in the Unity iOS Editor Fig 9. 25╇ The Explosion Script References the Particle Emitter... the iPhone with Unity Fig 9. 22╇ These Highlighted Areas Show the Key Areas of the Script for Creating the Explosion Adding Particles If we’re exploding the target from a gun blast, then we’ll have to have some fire and smoke, and Unity s Particle System will be perfect to create this effect as shown in Fig 9. 23 I simply used the explosion particle Prefab that I got from the Desktop version of Unity. .. to the desired settings and positioned the Emitter at the center of the target Next, I disabled the Emit parameter and activated One Shot so that particles would only emit once on the Emitter as shown in Fig 9. 24 Fig 9. 23╇ Unity s Particle System Is Great for Creating Fire and Smoke for Our Explosion Effect 226 Working with Game Assets in Unity iOS Fig 9. 24╇ By Disabling the Emit Parameter the. .. and change their size within Unity iOS In Fig 9. 11, you can see by checking Override for iPhone, you can then have access to setting the maximum size as well as the format for the texture The size you choose for your textures depends on your game as well as the device the game is running on For instance, you’ll need to use higher resolution textures such as 1024  1024 for the iPad and iPhone 4 However,... this could be part of the issue causing the frame rate to dip As we discussed earlier, Colliders can be very expensive on the iPhone and Fig 9. 17╇ Each Mesh Piece that Makes Up the Target Object Has a Rigidbody and Box Collider Component 223 Creating 3D Game Art for the iPhone with Unity should be used with care For each piece of the target, we are using the Box Collider, which is one of the least expensive... and Then Sets the Emit Parameter to True When the Collision Happens, i.e., the Target Is Shot 227 Creating 3D Game Art for the iPhone with Unity Now that the target is completed, I can create a Prefab of this object so that€I€can quickly place targets in the level with all the functionality already in€place Optimizing Physics Using the Time Manager Earlier, we talked about the physics causing the. .. Game Assets in Unity iOS Fig 9. 9╇ The Box Collider Is Covering the Entire Mesh Like a Bounding Box and Won’t Work as an Effective Collider Fig 9. 10╇ The Highlighted Mesh Above the Actual Level Is the Collider Object Notice Its Much Simpler Than the Actual Level Mesh 217 Creating 3D Game Art for the iPhone with Unity Texture Compression In Chapter 3, we discussed texture size and format You can... these setting in Fig 9. 28 Fig 9. 28╇ The Target iOS Is the Minimum OS Required to Run Your Application Some developers on the Unity iPhone forums have had issues with app approval when the splash screen didn’t start up in the default orientation the device is€being held You can read more about this issue by searching “iPad€Rotation”€on the Unity iOS iPhone forums However, we’ll take a look at the €fix . Levels. 206 Creating 3D Game Art for the iPhone with Unity FIG 8.30 I Took a Grime Map from My Texture Collection and Created a Brush Preset in Photoshop. FIG 8.31 The Dirt Was Stamped Across the Scene. in corners. In Fig. 8.33, you can see the secondary dirt layer. 208 Creating 3D Game Art for the iPhone with Unity Summary In this chapter, we discussed the usage of lightmaps not only to optimize. look for my game as you can see in the comparison of the default-baked scene and the color-graded scene. Adding Grime to Maps The level looks great with the lightmaps applied; however, for a

Ngày đăng: 08/08/2014, 13:21

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan