Unity Shaders and Effects Cookbook

所需积分/C币:10 2014-08-19 10:26:07 7.28MB PDF
收藏 收藏

Unity Shaders and Effects Cookbook Download for http://it-ebooks.info/,Just share for study~! About this book: Discover how to make your Unity projects look stunning with Shaders and screen effects
Unity Shaders and Effects Cookbook Copyright c 2013 Packt Publishing All rights reserved No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented, However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information First published: June 2013 Production reference: 1110613 Published by Packt Publishing Ltd Livery Place 35 Livery Street Birmingham B3 2PB, UK SBN978-184969-5084 www.packtpub.com Cover Image by Erol Staveley(erolsapacktpub. com) Credits Author Project Coordinator Kenny Lammers Leena purkait Reviewers Proofreaders Vincent lim Dirk manuel Christian XeviaN'" Meneghini Aaron nash Acquisition Editor Indexer Edward gordon Tejal Soni Lead technical editors Graphics oel noronha Ronak dhruv Chalini Sega victor Production coordinator Technical editors Aparna bhagat Jalasha d'costa Amit Ramadas Cover Work Aparna bhagat About the Author Kenny Lammers has been working in the games industry for 13 years now. he has worked for companies such as Microsoft, Activision and the late surreal Software. he currently runs two companies; the first is Creative TD, where he does Unity 3D consulting / asset creation for companies such as IGT, Microsoft, Janus Research, and Allegorithmic, and the second company he owns and operates, with his business partner Noah kaarbo, is Ozone Interactive Ozone specializes in creating interactive applications and high-quality design with a focus on Untiy 3D, for companies such as Amazon, E-line Media, Microsoft, and Sucker Punch games His games industry experience has given him the opportunity to create characters using Zbrush and maya, to write real-time Shaders and post effects and to program full games in Unity 3D using C#. He is currently working on a few games and developing toolsets within Unity to expedite the game creation process There are so many people I would like to thank, that it would take up a whole chapter by itself. First and foremost I would definitely like to thank my mom, for always telling me to keep working toward my dreams and always being there for me! I would like to thank my business partner Noah Kaarbo, for supporting me throughout the writing of this book and being my friend. I want to thank all the people I have worked with in the past, but most importantly I want to thank the few individuals who always urged me to push my skill sets even further and opened new worlds of the industry to me. These people are Ben Cammerano (MGS), Paul Amer(MGS), Fillipo Costanzo(5D Institute), Alessandro Tento (Lakshya), James Rogers(MGS) and Tony Garcia Unity Technologies). I wouldnt be where I am today without any of these people, and they have my utmost respect. About the reviewers Vincent Lim is a graduate from The One Academy with a Diploma in Digital Animation and Game development. he joined Big ant studio immediately after graduation, where he was sculpted into a game developer. Spending a couple of years with them vincent has learned much, from low poly modeling to tiling textures to terrain sculpting, a little bit of programming and MEL scripting. With the variety of tasks he encountered during his active employment with Big ant studio, vincent has equipped himself with knowledge about the game engine, how certain Shaders work, and the workflow pipeline. He was given several opportunities to construct or restructure certain pipelines for better efficiency. His Mel scripting skills were fostered through practical implementations within the pipeline. This enabled him to create the tools artist could use to speed up the process and shorten the gap to get a 3D model from a base mesh to in-game. With these experiences from Big Ant Studios, vincent has been broadening his knowledge by learning new software and reading up about game mechanics and game engines. This has allowed him to discover Unity, and he has been experimenting with it as he strives to make his learning curves sky rocket Christian XeviaN Meneghini is the young owner and enthusiast of Sinclair ZX Spectrum. He started to snoop the game development world with hardcoded sprites in basic and assembly languages. Years passed by and he worked with great technologies such as C64, the glorious Amiga, and all the Pc's family processors, using all the video cards from Hercules and cga from the first 3d accelerators to the actual ones he felt an addiction to real-time rendering and demo scene, while specializing in graphics programing and performance optimization. Christian also composes music in his spare time After years of night-hour works with friends and colleagues, studying tech books, writing engines, and working for third-party companies, Christian founded a small studio in 2011, along with his friends Marco Di timoteo and Luca marchetti, and called it sTUDIO EVIL. the first product of STUDIO EVIL was Syder Arcade, an old-style retro Shoot 'em up with actual 3D graphics for PC and Mac platforms, subsequently ported to iOS, Android, and OUYa platforms Id like to thank all of my Italian game-developer friends for their commitment in growing the game development industry in our country. www.packtpub.com Support files, eBooks, discount offers and more Youmightwanttovisitwww.Packtpub.comforsupportfilesanddownloadsrelatedto your book Did you know that Packt offers e Book versions of every book published, with PdF and ePub filesavailableYoucanupgradetotheeBookversionatwww.PacktPubcomandasaprint book customer, you are entitled to a discount on the e Book copy. Get in touch with us at service@packtpub com for more details Atwww.packtpub.comyoucanalsoreadacollectionoffreetechnicalarticlessignup for a range of free newsletters and receive exclusive discounts and offers on Packt books and ebooks PACKTLIB http://packtlib.Packtpub.com Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books. Why Subscribe? Fully searchable across every book published by Packt Copy and paste, print and bookmark content on demand and accessible via web browser Free Access for packt account holders IfyouhaveanaccountwithPacktatwww.Packtpub.comyoucanusethistoaccess Packtlib today and view nine entirely free books. Simply use your login credentials for immediate access Table of contents Preface Chapter 1: Diffuse Shading Introduction Creating a basic Surface Shader Adding properties to a Surface Shader 12 Using properties in a Surface Shader 14 Creating a custom dIffuse lighting mode Creating a Half Lambert lighting model 20 Creating a ramp texture to control diffuse shading 22 Creating a faked BrdF using a 2D ramp texture 24 Chapter 2: Using Textures for Effects 29 Introduction 29 Scrolling textures by modIfying Uv values 30 Animating sprite sheets 33 PackIng and blendIng textures 39 Normal mapping 44 Creating procedural textures in the Unity editor 48 hotoshop levels effect 54 Chapter 3: Making Your Game Shine with Specular 59 Introduction 59 Utilizing Unity 3D's built-in Specular type 60 Creating a Phong Specular type 62 Creating a Blinn Phong specular type 66 Masking Specular with textures 69 Metallic versus soft Specular 74 Creating an Anisotropic Specular type 79 Table of contents Chapter 4: Reflecting Your World 87 Creating Cubemaps in Unity 3D 88 Simple Cubemap reflection In Unity 3D 93 Masking reflections in Unity 3D 96 Normal maps and reflections in Unity 3D 100 Fresnel reflections in Unity 3D 104 Creating a simple dynamic Cubemap system 108 Chapter 5: Lighting Models 113 Introduction 113 The Lit Sphere lighting model 114 The diffuse convolution lighting model 119 Creating a vehicle paint lighting model 125 skin shader 130 Cloth shading 137 Chapter 6: Transparency 143 Introduction 143 Creating transparency with alpha 143 Transparent cutoff shader 146 Depth sorting with render queues 148 GUI and transparency 151 Chapter 7: Vertex Magic 159 Introduction 159 Accessing a vertex color in a Surface Shader 160 Animating vertices in a Surface Shader 164 Using vertex color for terrains 168 Chapter 8: Mobile Shader Adjustment 173 Introductlon 173 What is a cheap shader? 74 Profiling your Shadel 179 Modifying your Shaders for mobile 185 Chapter 9: Making Your Shader World Modular with Cglncludes 191 Introduction 191 Cglnclude files that are built into Unity 192 Creating a Cglnclude file to store lighting models 195 BulldIng Shaders wlth #define directives 199 Table of contents Chapter 10: Screen Effects with Unity Render Textures 203 Introduction 203 Setting up the screen effects script system 204 Brightness, saturation, and contrast with screen effects 213 Basic Photoshop-like blend modes with screen effects 218 The overlay blend mode with screen effects 224 Chapter 11: Gameplay and Screen Effects 229 Introduction 229 Creating an old movie screen effect 230 Creating a night vision screen effect 239 Index 249 II

试读 127P Unity Shaders and Effects Cookbook
立即下载 低至0.43元/次 身份认证VIP会员低至7折
    jasdghgh 真实的资料,好好好好
    码农凌云 好书,想给六星
    direet 做图形 做U3D 英语好的同学福音
    yyq2005 好书,想给六星

    关注 私信 TA的资源

    Unity Shaders and Effects Cookbook 10积分/C币 立即下载
    Unity Shaders and Effects Cookbook第1页
    Unity Shaders and Effects Cookbook第2页
    Unity Shaders and Effects Cookbook第3页
    Unity Shaders and Effects Cookbook第4页
    Unity Shaders and Effects Cookbook第5页
    Unity Shaders and Effects Cookbook第6页
    Unity Shaders and Effects Cookbook第7页
    Unity Shaders and Effects Cookbook第8页
    Unity Shaders and Effects Cookbook第9页
    Unity Shaders and Effects Cookbook第10页
    Unity Shaders and Effects Cookbook第11页
    Unity Shaders and Effects Cookbook第12页
    Unity Shaders and Effects Cookbook第13页
    Unity Shaders and Effects Cookbook第14页
    Unity Shaders and Effects Cookbook第15页
    Unity Shaders and Effects Cookbook第16页
    Unity Shaders and Effects Cookbook第17页
    Unity Shaders and Effects Cookbook第18页
    Unity Shaders and Effects Cookbook第19页
    Unity Shaders and Effects Cookbook第20页


    10积分/C币 立即下载 >