You are previewing CryENGINE 3 Cookbook.
O'Reilly logo
CryENGINE 3 Cookbook

Book Description

"

Over 90 recipes written by Crytek developers for creating third-generation real-time games

  • Begin developing your AAA game or simulation by harnessing the power of the award winning CryENGINE3

  • Create entire game worlds using the powerful CryENGINE 3 Sandbox.

  • Create your very own customized content for use within the CryENGINE3 with the multiple creation recipes in this book

  • Translate your design into CryENGINE by following the easy step by step recipes exploring flow graph, track view, and many of the other tools within CryENGINE

In Detail

With every successive console generation, the cost, time, and complexity of developing games has grown. Meet CryENGINE3, a middleware engine that is the perfect fit for most developers allowing users to exceed current generation quality standards while using less people and time than ever thought possible.

The CryENGINE3 CookBook is packed full of recipes for junior and senior developers alike. It covers everything from creating photo realistic architectural visualizations to implementing advanced physics such as ragdoll and tornado effects. Topics covered include the sandbox, level layout, environment creation, AI, character creation, creating vehicles, and game logic. Every recipe is designed to add AAA quality to your games.

The CryENGINE3 SDK has many tools immediately available to developers of all disciplines. For designers the book has recipes for building up your own levels and populating your levels with intelligent AI and photo realistic assets. For artists we have recipes for practical workflow tools and techniques used when working with the advanced CryENGINE shaders and materials. For animators we have recipes that will bring your creations to life using skinned characters and advanced animation systems like locomotion groups. Finally for programmers we have recipes that show how to employ the core mechanics behind entities such as vehicles and weapons while also utilizing the strengths of the physics engine to create a unique and exciting game.

Get to grips with CryENGINE 3 and use the CryENGINE Sandbox editor a production-proven real-time game compositing tool suite designed and built by AAA developers.

"

Table of Contents

  1. CryENGINE 3 Cookbook
    1. CryENGINE 3 Cookbook
    2. Credits
    3. About the Authors
    4. www.PacktPub.com
          1. Support files, eBooks, discount offers and more
            1. Why subscribe?
            2. Free access for Packt account holders
    5. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code and colored graphics for this book
        2. Errata
        3. Piracy
        4. Questions
    6. 1. CryENGINE 3: Getting Started
      1. Introduction
      2. Opening a level in the CryENGINE 3 Sandbox
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. What is a .cry file?
          2. Using a level.cfg
        5. See also
      3. Navigating a level with the Sandbox Camera
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Viewport movement speed control
          2. Under Views you can adjust the viewport to view different aspects of your level
          3. Splitting the main viewport to several subviewports
        5. See also
      4. Setting up a personalized toolset layout
        1. Getting ready
        2. How to do it...
        3. How it works...
          1. The Status Bar
          2. The Console
          3. The Toolbox
        4. See also
      5. How to customize toolbars and menus
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. The Options tab
          2. Personalized menus and toolbars
      6. Using the Rollup Bar
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. The AI section
          2. The Area section
          3. The Entities section
          4. The Misc Objects section
          5. The Solids section
          6. The Archetype entity section
          7. The Geom entity section
          8. The Prefabs section
          9. The Sound section
        5. See also
      7. Selecting and browsing level objects
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Browsing frozen and hidden objects
          2. List types
          3. Display as a Tree
        5. See also
      8. Restoring the CryENGINE 3 default settings
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Deleting your user folder
        5. See also
    7. 2. Sandbox Basics
      1. Introduction
      2. Creating a new level
        1. Getting ready
        2. How to do it...
        3. How it works...
          1. Using the Terrain option
          2. Heightmap resolution
          3. Meters per unit
          4. Terrain size
        4. There's more...
        5. See also
      3. Generating a procedural terrain
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Terrain generation settings
        5. See also
      4. Terrain sculpting
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Noise settings
          2. Reposition objects and vegetation
        5. See also
      5. Setting up the terrain texture
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      6. Placing the objects in the world
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      7. Refining the object placement
        1. Getting ready
        2. How to do it...
        3. There's more...
          1. Local position and rotation
          2. Grid and angle snaps
          3. Ctrl + Shift + Click
        4. See also
      8. Utilizing the layers for multiple developer collaboration
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. External layer limitations
        5. See also
      9. Switching to game mode
        1. Getting ready
        2. How to do it...
        3. See also
      10. Saving your level
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      11. Exporting to an engine
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Opening .pak files
          2. Corrupted .pak files should be deleted and re-exported
      12. Essential game objects
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      13. Running a map from the Launcher
        1. Getting ready
        2. How to do it...
        3. See also
    8. 3. Basic Level Layout
      1. Introduction
      2. Making basic shapes with the Solids tool
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Other shapes—cone, sphere, cylinder
          2. Number of sides—only for cone, sphere, cylinder
        5. See also
      3. Editing and merging solids
        1. Getting ready
        2. How to do it...
        3. There's more...
          1. Exporting the selected geometry to .OBJ
          2. Resetting the XForm
        4. See also
      4. Grouping the objects
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      5. Utilizing the Geom entities instead of brushes
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      6. Road construction
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Road parameters
          2. Shape editing
          3. Align Height Map
        5. See also
      7. Painting vegetation
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Vegetation parameters
        5. See also
      8. Breaking up tiling with Decals
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Decal parameters
          2. Decals can have their unique position, rotation, and scale
        5. See also
      9. Making caves with Voxels
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Soft Create
          2. Material
          3. Copy Terrain
      10. Creating Prefabs to store in external libraries
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Extract Object and Extract All
          2. Open/Close
          3. Pick and Attach/Remove Object and Update Prefab
        5. See also
    9. 4. Environment Creation
      1. Introduction
      2. Creating your first time of day using the basic parameters
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Forcing sky update to true
          2. Record icon
          3. Play icon
        5. See also
      3. Adjusting the terrain lighting
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Terrain ambient occlusion
          2. Transition shading from the sun to the moon
          3. SSAO (screen-space-ambient occlusion)
        5. See also
      4. Using the real-time Global Illumination
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Advanced GI Cvars
        5. See also
      5. Editing HDR lighting and the effects for flares
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Lights with flare effects
          2. Glow texture effect produces bloom and flares
        5. See also
      6. Creating a global volumetric fog
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Density offset
          2. Enabling or disabling fog in the Render Settings
        5. See also
      7. Creating a night scene with time of day parameters
        1. Getting ready
        2. How to do it...
        3. There's more...
          1. SSAO contrast and amount
          2. HDRSetup parameters at night
          3. Moon and corona color and scale
        4. See also
      8. Color grading your level
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. _CCH naming convention
          2. Capturing TGA images as reference images
          3. Debugging visual glitches
        5. See also
      9. Creating a photo realistic ocean
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Animating water parameters
          2. Caustics
          3. Free form transformation FFT water
      10. Improving your sky with clouds
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Cloud shadows
        5. See also
      11. Making it rain in your level
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Lightning entity
          2. Wind
          3. Fog volumes
    10. 5. Basic Artificial Intelligence
      1. Introduction
      2. Placing the enemy AI
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      3. Generating the AI navigation
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Generating AI triangulation
        5. See also
      4. Forbidden boundaries
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      5. Forbidden areas
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      6. Setting up the interior navigation
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Auto-Dynamic Points versus Designer Controlled Points
        5. See also
      7. Debugging the AI triangulation
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      8. Narrowing the AI's FOV to allow attacks from behind
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      9. Respawning AI
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. AI territory FlowGraph node properties
          2. AI wave FlowGraph node properties
    11. 6. Asset Creation
      1. Introduction
      2. Installing the CryENGINE 3 plugin for 3D Studio Max
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. 3ds Max CryTools Maxscripts
          2. Installing the 3ds Max CryTools Maxscripts
          3. Uninstalling the 3ds Max CryTools Maxscripts
        5. See also
      3. Creating textures using CryTIF
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Editing the CryTif plugin root path
          2. Adjusting the default presets in the CryTIF dialog
          3. Manually generating the .DDS output
        5. See also
      4. Setting up units to match CryENGINE in 3ds
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Grid and Snap settings
          2. Measurement reference
        5. See also
      5. Basic material setup in 3ds
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Assigning textures in 3ds Max to materials
          2. Physicalize
        5. See also
      6. Creating and exporting static objects
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Physics proxy
          2. Occlusion geometry
          3. User defined properties
        5. See also
      7. Creating and exporting destroyable objects
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Two-dimensional breakable assets
          2. Jointed breakables
          3. User defined properties
        5. See also
      8. Using advanced material editor parameters to create animation
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Animated textures
          2. Vertex deformation
        5. See also
      9. Creating new material effects
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Creating new surface types
          2. Physics block parameters
          3. Ammo surface types
        5. See also
      10. Creating image-based lighting
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Generating all Cubemaps
          2. Creating a CubeMap with Material Editor
        5. See also
    12. 7. Characters and Animation
      1. Introduction
      2. Creating skinned characters for the CryENGINE
        1. Getting ready
        2. How to do it...
        3. How it works...
          1. Materials and characters
          2. LOD (Level of Detail)
          3. Bone Attachments
        4. See also
      3. Ragdoll and physics for characters
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. IK limits
          2. ParentFrames
          3. Dead body entity settings
        5. See also
      4. Creating animation for your character
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Changing the animations compression
          2. .chrparams file Wildcard Mapping
          3. Animobject entity
        5. See also
      5. Previewing animations and characters for Sandbox
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Animation driven motion
          2. Searching and filtering animations
          3. Types of animation assets
        5. See also
      6. Creating upper body only animations
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Additive animations
          2. Using additives
        5. See also
      7. Creating locomotion animations
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Swimming and vehicle transitions
          2. Locomotion loops
          3. Idle to move and 180 degree rotational assets
        5. See also
      8. Animating rigid body geometry data
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Pre-baked physics with .CGA objects
          2. Anim object and pre-baked .CGA
        5. See also
    13. 8. Creating Vehicles
      1. Introduction
      2. Creating a new car mesh (CGA)
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Dummy helpers for modification of the parts
          2. Parts for vehicles and their limitless possibilities
        5. See also
      3. Creating a new car XML
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      4. Giving more speed to the car
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      5. Increasing the mass to push objects with the car
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      6. Defining a sitting location
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      7. Setting up multiple cameras for the car
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      8. Need for a machine gun
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      9. Giving the car a weak spot
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
    14. 9. Game Logic
      1. Introduction
      2. How to beam the player to a tag point from a trigger
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      3. Making the AI go to a location when the player enters a proximity trigger
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. AIGotoEx
        5. See also
      4. Debugging the Flow Graph
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      5. Creating a kill counter
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      6. Rewarding the player for reaching a kill goal
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      7. Displaying the player's health through a Flow Graph
        1. Getting ready
        2. How to do it...
        3. How it works...
      8. Changing the player camera through key input
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      9. Creating a countdown timer
        1. How to do it...
        2. How it works...
        3. There's more...
    15. 10. Track View and Cut-Scenes
      1. Introduction
      2. Creating a new Track View sequence
        1. How to do it...
        2. How it works...
        3. There's more...
          1. Available tracks in the director node
          2. Sequence properties
        4. See also
      3. Animating a camera in the Track View
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. FOV
          2. Playback speed
          3. Curve editor
        5. See also
      4. Triggering a sequence using the Flow Graph
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Useful debugging trigger
          2. Start time property
          3. Break on stop property
        5. See also
      5. Animating entities in the Track View
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Entity visibility track
          2. Animating scale
          3. Entities and their tracks
        5. See also
      6. Playing animations on entities in the Track View
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Loop animation
          2. Start time
          3. Time scale
        5. See also
      7. Using console variables (CVars) in the Track View
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Animating the CVar values
          2. T_scale cvar in Track View
        5. See also
      8. Using track events
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Removing events from the sequence
          2. Triggering image nodes for track sequences
        5. See also
    16. 11. Fun Physics
      1. Introduction
      2. Low gravity
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Uniform property
          2. Gravity sphere
      3. Hangman on a rope
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      4. Tornadoes
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      5. Constraints
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Constraint properties
      6. Wrecking ball
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      7. Rock slide
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Physics properties
          2. Simulation properties
        5. See also
    17. 12. Profiling and Improving Performance
      1. Introduction
      2. Profiling performance in the Sandbox
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Draw Calls
          2. Triangle count
          3. Budgets
        5. See also
      3. Saving level statics
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Textures tab and render targets
          2. Physics tris and physics size
          3. Detailed dependencies tab
        5. See also
      4. Enabling the debug draw modes
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Overdraw pixel cost scale
          2. R_stats 15
          3. Profiles
        5. See also
      5. Optimizing the levels with VisAreas and portals
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Ambient color of VisAreas and portals
          2. Blind spots
          3. Using VisAreas and portals vertically
        5. See also
      6. Using light boxes and light areas
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Using a concave light shape
          2. Linking to multiple light shapes
        5. See also
      7. Activating and deactivating the layers
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Limits of layer switching
          2. Cinematics
        5. See also