logging in or signing up Unity 2D in 3D, by Owlchemy Labs BostonIndies Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 465 Category: Education License: All Rights Reserved Like it (0) Dislike it (0) Added: June 01, 2011 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... Premium member Presentation Transcript 2D in 3D Techniques in Unity: 2D in 3D Techniques in Unity Yilmaz Kiymaz Alex SchwartzSlide 3: 2D Workflow2D Workflow: 2D Workflow No built-in 2D Workflow, so let’s create our own. Choose your axes and stick to them! No, not that kind. This kind.2D Workflow: 2D Workflow Have your planes ready! No, not that kind. This kind.2D Workflow: 2D Workflow Cameras Orthographic Gives you Easy Positioning Useful for pixel-perfect placement and display Perspective Gives you Easy ParallaxSlide 7: Our setupDemo scene setup in ST: Demo scene setup in ST Show camera looking at menu system Planes, orthographic camera, front to back positioning Menu screens placed side by side Camera moving right gives appearance of elements moving left Unity scene setup Loader scene (company logo) Main menu Game scene Level editor sceneLayering of game level: Layering of game level Static elements Truck, background, cameras, GameObjects which operate the game Dynamic elements Level Theme Sky / background / cloud materials Ground pieces Obstacles DecorationParallaxing (First Camera): Parallaxing (First Camera) Perspective Camera Distance from camera = slower parallax Illusion of depth Bg, clouds, mesas, deco behind truck, truck, obstacles in front of the truck, HUDPerspective Issues: Perspective Issues Perspective Camera = inconsistent sorting DEMOSorting Fix!: Sorting Fix! Render-queue solution (giveaway!) Object can be farther away but still draw in frontSorting Fix!: Sorting Fix!Slide 14: Creating GUIsGUI in Unity: GUI in Unity Two GUI systems in Unity: GUI Elements (old system) Uses GUITexts and GUITextures GUI API calls made in OnGUI() (immediate-mode GUI) Uses GUISkins and GUIStyles, along with screen-space Rects Rolling your own 3D GUI in Unity Use a 2nd camera (orthographic) to render 3D planes as GUI2D vs 3D GUI: 2D vs 3D GUI 3D GUI - Pros: Scales with resolution Easier to preview in Scene view Easy placement and rotation2D vs 3D GUI: 2D vs 3D GUI 3D GUI - Cons: GUI functionality built from scratch Buttons, Toggles, Lists Pixel-perfect graphics are hard to get right Text is harder to render nicely, especially on small screen sizesResolution independence: Resolution independence Aspect ratios Most common: 16:9, 16:10, 4:3 Override position of 3D objects depending on current ratio Compensating for small screen sizes Making buttons easy to hit Making it legible Keeping it cleanSlide 19: TexturesTextures - Issues: Textures - Issues Most common question about 2d games in a 3d engine “Why does everything look like a blurry piece of shit?”Texture importing: Texture importing Mip-maps 1 to 1 textures Always going to appear at the same size on screen = NO MIPS Filtering Bilinear filtering is great for 3d Turn it off for 1 to 1 texturesTextures - Pixel perfect: Textures - Pixel perfect Single key command Texture dimensions to size your 3d object to exact pixel scale Assuming standard orthographic size Editor Script!Texture compression: Texture compression Disk space and memory vs quality PVRTC (iOS) Gradients :-( Few colors :-) Tip: 2x scale + compressed sometimes a good quality middleground DXT (PC/Mac) Not nearly as bad as PVRTCTextures - Issues: Textures - Issues How do you handle iPad, iPhone, and PC/Mac resolutions and textures, all in one project without including unnecessary content in each build? “Uh...”Texture auto-awesome-izer: Texture auto-awesome-izer Maintain 4 builds iPhone, iPad, Webplayer, Standalone (PC/Mac) Multiple aspect ratios Some textures are unique to one platform NO PROBLEM!Texture auto-awesome-izer PART 1: Texture auto-awesome-izer PART 1 BuildSettings.xml Define compression, auto-scale-downs, mipsTexture auto-awesome-izer PART 2: Texture auto-awesome-izer PART 2 PlatformSpecifics Class Define custom positioning, scale, texture swaps, font changes, text swapsTexture auto-awesome-izer PART 3: Texture auto-awesome-izer PART 3 DEMO! Showing platform specifics used in main menuSlide 29: Gameplay and PhysicsPhysics: Physics Unity uses a 3D Physics engine - PhysX Wasted performance? Not enough to care about. Pretend the objects are 3D Constraining movement of physics objects In some cases, we don’t want “into the scene” movement Constraining rotationPhysics: Physics Joints More recently, Constraints in Rigidbody Gameplay implications of a 3D physics interaction In Smuggle Truck Room in cargo Passenger interaction Make room for the babies You do not have the permission to view this presentation. In order to view it, please contact the author of the presentation.
Unity 2D in 3D, by Owlchemy Labs BostonIndies Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 465 Category: Education License: All Rights Reserved Like it (0) Dislike it (0) Added: June 01, 2011 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... Premium member Presentation Transcript 2D in 3D Techniques in Unity: 2D in 3D Techniques in Unity Yilmaz Kiymaz Alex SchwartzSlide 3: 2D Workflow2D Workflow: 2D Workflow No built-in 2D Workflow, so let’s create our own. Choose your axes and stick to them! No, not that kind. This kind.2D Workflow: 2D Workflow Have your planes ready! No, not that kind. This kind.2D Workflow: 2D Workflow Cameras Orthographic Gives you Easy Positioning Useful for pixel-perfect placement and display Perspective Gives you Easy ParallaxSlide 7: Our setupDemo scene setup in ST: Demo scene setup in ST Show camera looking at menu system Planes, orthographic camera, front to back positioning Menu screens placed side by side Camera moving right gives appearance of elements moving left Unity scene setup Loader scene (company logo) Main menu Game scene Level editor sceneLayering of game level: Layering of game level Static elements Truck, background, cameras, GameObjects which operate the game Dynamic elements Level Theme Sky / background / cloud materials Ground pieces Obstacles DecorationParallaxing (First Camera): Parallaxing (First Camera) Perspective Camera Distance from camera = slower parallax Illusion of depth Bg, clouds, mesas, deco behind truck, truck, obstacles in front of the truck, HUDPerspective Issues: Perspective Issues Perspective Camera = inconsistent sorting DEMOSorting Fix!: Sorting Fix! Render-queue solution (giveaway!) Object can be farther away but still draw in frontSorting Fix!: Sorting Fix!Slide 14: Creating GUIsGUI in Unity: GUI in Unity Two GUI systems in Unity: GUI Elements (old system) Uses GUITexts and GUITextures GUI API calls made in OnGUI() (immediate-mode GUI) Uses GUISkins and GUIStyles, along with screen-space Rects Rolling your own 3D GUI in Unity Use a 2nd camera (orthographic) to render 3D planes as GUI2D vs 3D GUI: 2D vs 3D GUI 3D GUI - Pros: Scales with resolution Easier to preview in Scene view Easy placement and rotation2D vs 3D GUI: 2D vs 3D GUI 3D GUI - Cons: GUI functionality built from scratch Buttons, Toggles, Lists Pixel-perfect graphics are hard to get right Text is harder to render nicely, especially on small screen sizesResolution independence: Resolution independence Aspect ratios Most common: 16:9, 16:10, 4:3 Override position of 3D objects depending on current ratio Compensating for small screen sizes Making buttons easy to hit Making it legible Keeping it cleanSlide 19: TexturesTextures - Issues: Textures - Issues Most common question about 2d games in a 3d engine “Why does everything look like a blurry piece of shit?”Texture importing: Texture importing Mip-maps 1 to 1 textures Always going to appear at the same size on screen = NO MIPS Filtering Bilinear filtering is great for 3d Turn it off for 1 to 1 texturesTextures - Pixel perfect: Textures - Pixel perfect Single key command Texture dimensions to size your 3d object to exact pixel scale Assuming standard orthographic size Editor Script!Texture compression: Texture compression Disk space and memory vs quality PVRTC (iOS) Gradients :-( Few colors :-) Tip: 2x scale + compressed sometimes a good quality middleground DXT (PC/Mac) Not nearly as bad as PVRTCTextures - Issues: Textures - Issues How do you handle iPad, iPhone, and PC/Mac resolutions and textures, all in one project without including unnecessary content in each build? “Uh...”Texture auto-awesome-izer: Texture auto-awesome-izer Maintain 4 builds iPhone, iPad, Webplayer, Standalone (PC/Mac) Multiple aspect ratios Some textures are unique to one platform NO PROBLEM!Texture auto-awesome-izer PART 1: Texture auto-awesome-izer PART 1 BuildSettings.xml Define compression, auto-scale-downs, mipsTexture auto-awesome-izer PART 2: Texture auto-awesome-izer PART 2 PlatformSpecifics Class Define custom positioning, scale, texture swaps, font changes, text swapsTexture auto-awesome-izer PART 3: Texture auto-awesome-izer PART 3 DEMO! Showing platform specifics used in main menuSlide 29: Gameplay and PhysicsPhysics: Physics Unity uses a 3D Physics engine - PhysX Wasted performance? Not enough to care about. Pretend the objects are 3D Constraining movement of physics objects In some cases, we don’t want “into the scene” movement Constraining rotationPhysics: Physics Joints More recently, Constraints in Rigidbody Gameplay implications of a 3D physics interaction In Smuggle Truck Room in cargo Passenger interaction Make room for the babies