Player Interactions Visualized
Introduction and Music
The video starts with music playing in the background.
Introduction
- The video begins with music playing.
- The speaker thanks the audience for watching.
Immersive Experiences in Games
The speaker discusses the importance of immersive experiences in games.
Importance of Immersive Experiences
- Immersive experiences in games can enhance player engagement and authenticity.
- Studies have shown that players react more authentically when facing decisions in game scenarios compared to real-world situations.
- Video games provide a flow of joy, challenges, and skill levels that lead to extreme focus and self-actualization.
- Game developers aim to create immersive experiences to keep players engaged and in the flow.
Cosmetic Interactions: Adding Details
The speaker explains how cosmetic interactions, such as visual details, can enhance immersion.
Adding Visual Details
- Examples like inflatable crocodiles in Hitman or ants in Skyrim help sell the idea of a highly detailed world.
- These cosmetic interactions trigger the player's imagination and make them believe in an overall richer experience.
- By adding visual details, players feel immersed and believe there is more to discover around every corner.
Passive Interactions: Grounding the Player
The speaker discusses passive interactions designed to ground players in the game world.
Grounding Players
- Passive interactions are designed to make players feel part of the game world.
- Since games lack certain sensory experiences like smell or touch, passive interactions must be visualized.
Interactive Effects: Rewarding Player Actions
The speaker talks about interactive effects that reward player actions.
Rewarding Player Actions
- Interactive effects support gameplay by visually representing the outcome of player decisions.
- Every decision a player makes should be visualized so they can experience the consequences of their actions.
Immersion and Visual Effects
The speaker explains how visual effects contribute to immersion in games.
Enhancing Immersion
- Visualizing player interactions, whether passive or intentional, enhances immersion more than any other graphical element.
- High-quality visual effects help maintain the flow of the game and trigger positive player experiences.
The remaining part of the transcript is not provided.
Identifying Interactive Elements in Games
This section discusses the process of identifying elements in a game that players can interact with to enhance the gameplay experience.
Identifying Interactive Elements
- Look for items or features in the game world that could benefit from additional fidelity.
- Use imagination and observation to identify potential interactive elements.
- Consider objects, characters, or environmental features that players may engage with.
Tools for Creating Effects
- Understand the available tools and use them wisely and optimally.
- Typical tools for creating effects include particles, cloud simulations, physics, scripting, and shading.
- VFX creation involves problem-solving and may require experimentation to determine successful approaches.
Examples of Interaction Design
Inflatable Crocodile
- Simple setup using cloth simulation, shader runtime modification, and game logic for gunshot detection.
- Low-resolution cloth simulation allows blending of crumpled normal map when deflated.
Flattening Car Tires
- Example from Hitman game using physics constraints, object transformation, and vertex shader to flatten tires to the ground.
- Lower fidelity version is acceptable if it enhances player immersion.
Computer Monitors Showing Video Feed
- Monitors in-game security room provide immersion but also serve as a hidden gameplay feature.
- Players can recognize locations inside the level by looking at screens showing video feed from security cameras.
Procedural Development in Game Assets
This section explores the benefits of procedural development in creating game assets and maintaining consistency throughout development.
Benefits of Procedural Development
- Flexibility: Assets can be easily managed and changed during development if designed for flexibility.
- Consistency: Procedural assets help maintain graphics consistency throughout the game.
- Memory Performance: Reusing assets for multiple purposes aids memory performance.
- Fun and Challenging: Creating assets meant for reuse can be enjoyable and challenging.
Example of Procedural Solution - Water Puddle Decals
- Previously, environment artists baked water plane into textures, limiting flexibility and affecting memory performance.
- Procedural solution allows artists to create pits in the ground and fill them with water using shaders.
- Interactive footsteps, gunshot ripples, dripping effects can be added procedurally.
- Environment artist can change water height and mud color dynamically.
- Engine used (Glacier) offers flexible decal system with UV space transformation and vertex colors for driving procedural effects.
The transcript does not provide enough content for additional sections.
New Section
This section introduces the concept of creating a procedural puddle through an interactive demo. The artist can set the water height and a height map is used to drive the effect.
Creating a Procedural Puddle
- A puddle can be made procedurally using an interactive demo.
- The artist can set the preferred water height by changing the decal's alpha value.
- A height map is used as data to create a gradient between water and no water.
- A remap function is used to map values and create a narrower gradient.
- The function takes a gradient as the first argument and values between zero and one as the second and third arguments.
- By passing a sample height map and user input, we can control the width of the water line in the puddle.
- Too large width leads to undefined water appearance, while too small width causes aliasing.
New Section
This section explores how render targets are used to create ripples in the puddle shader. Sprite particles are spawned into a top-down buffer, creating disturbances in the water plane.
Using Render Targets for Ripples
- Inspired by Naughty Dog's technique from "The Technical Art of Uncharted 4," sprite particles are rendered into a top-down buffer.
- The render target contains low-resolution representations of ripple normals and height values.
- The render targets are sampled inside the puddle shader to disturb the water plane.
- By adding the sample texture from render targets to user input, we achieve changes in ripple heights.
- Wetness level does not change over time due to lack of delta time for realistic behavior.
New Section
This section discusses how gradients can be used for additional effects such as coloring mud or creating wet areas around the water in the puddle shader.
Using Gradients for Additional Effects
- Gradients can be used to set the color of the wet area surrounding the water.
- The ground color is multiplied by inverted porosity to achieve physically accurate results.
- The brightness of mud color is determined to define dark colors as transparent.
- Transparency is defined separately since vertex colors do not have a float for transparency.
New Section
This section concludes the discussion on defining transparency and mentions modeling how water interacts with different surfaces.
Defining Transparency and Modeling Water Interaction
- Transparency is defined separately due to limitations in vertex colors.
- Brightness of mud color determines transparency, allowing for dark colors to be transparent.
- Modeling how water interacts with different surfaces:
- Plastic allows water to drip off, while concrete absorbs it.
- Inverted roughness or porosity can be used to achieve more physically accurate results.
New Section
This section discusses the interpolation between wet ground and muddy water based on the brightness of the mud color.
Interpolation between Wet Ground and Muddy Water
- The brightness of the mud color is used to interpolate between wet ground and muddy water.
New Section
This section explains how to unpack ripple normals and convert an unsigned vector texture to a sine wave.
Unpacking Ripple Normals
- Ripple normals need to be unpacked since the texture in the render target is an unsigned vector.
- To convert it to a sine wave, multiply the sample by two and subtract one.
- The resulting value is set from zero to one instead of negative one to one.
New Section
This section mentions that a more accurate set value can be calculated from x and y if needed.
Calculating Set Value
- The set value can be recalculated for more accuracy using x and y if required.
- However, setting it to one for simplicity is also acceptable.
New Section
This section explains that all layers need to be composited using lerps in order to complete the effect.
Compositing Layers
- All layers of the effect need to be composited together, similar to how it's done in Photoshop.
- In code, this can be achieved through lerps.
New Section
This section highlights that besides creating puddles, this technique can also be used for disturbing local plant life.
Disturbing Plant Life
- Besides creating puddles, this technique can be used to have the player disturb local plant life.
- The goal is to make the sphere bend and flatten the ferns as it rolls through the vegetation.
New Section
This section explains how a render target is used to achieve the desired effect on plants.
Using Render Target for Plant Disturbance
- A render target is used to understand what's happening with the plants.
- Two elements are written to this render target: a single quad aligned with the sphere's position and sprite particles spawned with their parent's velocity.
New Section
This section discusses shading particles using direction vectors and lifetime, as well as using a sine wave for swaying motion.
Shading Particles
- Particle shading involves using direction vectors, particle lifetime, and a sine wave for swaying motion.
- The particles' color changes due to the swaying of vectors.
New Section
This section explains that the blue channel of particles will be used as a mask for flattening plants.
Flattening Plants
- The blue channel of particles serves as a mask for flattening plants.
- When sampling the render target in the plant shader, red determines positive x-axis rotation, while absence of red results in negative axis rotation.
New Section
This section describes how particle lifetime drives faster or slower swaying motion in plants.
Swaying Motion in Plants
- Particle lifetime drives faster swaying at the beginning and slower swaying towards the end.
- The changing color of particles indicates the swaying motion of vectors.
New Section
This section explains the use of a blue channel as a mask for flattening plants.
Masking for Flattening Plants
- The blue channel of particles is used as a mask to flatten plants.
- The sampled color determines the rotation direction of plants.
New Section
This section discusses sampling coordinates and flexibility in plant rotation.
Sampling Coordinates and Flexibility
- When sampling the render target, it's important to consider which coordinates to use.
- The flexibility or blend value determines how rigid or unified the plant looks when intersecting with the sphere.
New Section
This section mentions finding a balance between sampling at pivot position and vertex position for plant rotation.
Finding Balance in Plant Rotation
- Sampling only at pivot position results in a rigid look, while sampling only at vertex position leads to independent vertices.
- A balance between these extremes is usually suitable for most situations.
New Section
This section suggests introducing baked pivots for large plants to improve rotation.
Baked Pivots for Large Plants
- For large plants, it may be beneficial to introduce baked pivots by writing pivot positions to UV sets.
- Sharing pivots among vertices can enhance rotation effects.
New Section
This section emphasizes normalizing rotation vectors and using them to rotate plant positions.
Rotating Plant Positions
- After creating coordinates, sample the render target and unpack vectors to assign range.
- The crude method of adding x and y can be used to rotate plant positions, but it's not a true rotation.
New Section
This section explains how to calculate the amplitude for rotating plants.
Calculating Amplitude
- The amplitude for rotating plants can be calculated using x and y as a base.
- Normalizing the rotation vector is important, and adding a small number helps avoid none values.
New Section
This section mentions that sampling coordinates depend on the shape and size of plants.
Sampling Coordinates for Plants
- Sampling coordinates should be determined based on the shape and size of plants.
- Finding a balance between pivot position and vertex position works well in most cases.
New Section
This section suggests using x and y values to create a crude rotation effect in plants.
Crude Rotation Effect
- X and y values can be used to create a crude rotation effect in plants by adding them together.
- However, this method does not provide true rotation.
New Section
This section explains how to calculate the amplitude for rotating plants using x and y as a base.
Calculating Amplitude
- The amplitude for rotating plants can be calculated using x and y as a base.
- Normalizing the rotation vector is important, but adding a small number may not always prevent none values.
New Section
This section concludes that an if statement may be required to avoid none values when calculating amplitude.
Avoiding None Values
- Adding a small number to the rotation vector may not always prevent none values.
- To ensure none values are avoided, an if statement can be used, although it may impact performance.
Creating Rotation Functions for Plants
In this section, the speaker discusses the process of creating rotation functions for plants in a game engine.
Implementing Rotation Functions
- To achieve the desired effect of rotating plants, it is important to have rotation functions implemented in the game engine.
- These rotation functions can be obtained online or may already be available in the engine being used.
Flattening Plants
- In addition to rotation, flattening plants is also necessary.
- The blue channel of the render target can be used as a mask to flatten the plant.
- The height of the plant needs to be determined, either through a simple per plant definition or procedurally by getting object set bounds.
- It is important to ensure that only areas allowed by the flattening mask are flattened.
Adding Flattening to Position Offset
- The position offset can be modified to move vertices that are masked as flat downwards.
- For example, vertices can be moved 20 centimeters downwards.
- However, care should be taken to prevent vertices from passing through the ground.
Handling Collision with Ground
- Depending on the engine being used and whether an offset or absolute position is outputted in the vertex shader, additional steps may be required.
- In Unreal Engine (used in this demo scene), adding world positions temporarily to the offset is necessary.
- A ground height needs to be defined for collision with the plant. This could be just above the pivot or based on a terrain height map.
- Adding a downscaled rb space height to the ground height helps avoid issues when all vertices are compressed to a single height value.
- Using a max function ensures that leaves never go under the ground.
Improving Decals with Destruction Buffer
This section focuses on improving decals using a method called "destruction buffer" to create more unified destruction effects.
Traditional Decals
- Traditionally, decals are spawned on a surface to create visual details.
- However, they often appear floating on the surface and lack realism.
Introducing the Destruction Buffer
- The destruction buffer method involves drawing decals at impact points of the surface in a separate pass.
- This buffer can later be used in materials to create more realistic destruction effects.
Using the Destruction Buffer
- Decals are spawned and drawn into a standalone decal buffer.
- The grayscale value of the buffer is used in the wall shader to peel off tiles.
- A texture is used to define how the material should break, with dark values indicating easier peeling.
Creating Normals for Shading
- Procedural creation of normals is necessary since it's unknown how the surface will break.
- Hardware functions like ddx and ddy are utilized to convert grayscale peel masks into decent normals.
- The resulting normals may appear blocky but still provide usable shading.
Recap: Disturbing Plants, Improved Decals, and Wall Breakage
This section provides a recap of disturbing plants using rotation functions, improving decals with the destruction buffer method, and creating wall breakage effects.
Disturbing Plants Recap
- To disturb plants:
- Create a render target
- Draw vectors for rotations
- Use blue channel as a mask for flattening
- Adjust position offset based on flattening mask
- Handle collision with ground by defining ground height and using max function
Improved Decals Recap
- Traditional decals can appear floating on surfaces
- The destruction buffer method improves realism by:
- Drawing decals in a separate pass
- Using grayscale values to peel off tiles
- Defining material breakage using textures
Wall Breakage Recap
- Wall breakage can be achieved by:
- Creating a separate decal buffer
- Spawning decals and peeling off tiles using the destruction buffer
- Using textures to define material breakage
- Generating normals procedurally for shading
New Section
In this section, the speaker explains the basics of achieving a fluid simulation effect using a few tricks. The steps involve creating a closed liquid mesh inside a 3D model, setting the vertices above the defined liquid height to that height, finding the nearest point inside the glass to ensure all vertices stay inside, and fading off the effect when it fails.
Achieving the Fluid Simulation Effect
- Start by filling the container with liquid by creating a closed liquid mesh inside the 3D model.
- Set all vertices above the defined liquid height to that height. Ensure that all vertices stay inside the glass by tilting it if necessary.
- Find the nearest point inside the glass to determine its radius. Note that this effect works best for cylindrical containers.
- Allow slight bending of the plane as it resembles surface tension and adds to the visual effect.
- Fade off the effect when it fails at certain angles.
New Section
This section focuses on transforming values between local space and world space in order to achieve accurate positioning of vertices within a glass container.
Transforming Values between Local Space and World Space
- Ensure that the height value representing fill level can never go below lower bounds.
- Convert height value from local space to world space using coordinate transformation, creating an infinite plane for vertex alignment with horizon regardless of glass rotation.
- Put vertices back into the glass by using its radius as reference. The radius is determined by measuring distance from tip of glass to liquid plane and inverting that result.
- Measure distance from vertex to center of liquid and compare it with the radius to determine if the vertex is outside the glass.
- Place vertices back into the center of the liquid by creating a direction vector from glass center to vertex and scaling it by the radius of the contents.
New Section
This section explains how to create coordinates, sample textures, and use them to deform plants in a larger level.
Deforming Plants in Larger Levels
- Create coordinates using a remap function to map height values to a zero-to-one range.
- Sample textures and multiply the radius texture sample with maximum radius defined earlier.
- Measure distance from vertex to center of liquid and compare it with the radius value obtained from texture sampling.
- Use direction vector from glass center to vertex scaled by radius value to place vertices in center of liquid, achieving deformation effect.
New Section
In this section, the speaker summarizes the steps involved in achieving the fluid simulation effect and emphasizes their applicability in visual effects.
Summary and Applicability
- Fill container with liquid, force vertices above liquid height to that height, put vertices back into glass using its radius, and fade off effect when it fails.
- The methodology and functions discussed may not be applicable to all projects but can provide useful insights for visual effects implementation.
New Section
The speaker concludes by expressing gratitude towards contributors and listeners.
Conclusion
- The speaker thanks everyone who contributed towards making this presentation possible and expresses gratitude to the audience for listening.
New Section
The speaker opens the floor for questions.
Questions
- A question is asked about using render targets and render textures to deform plants in bigger levels. The speaker acknowledges the use of render targets but does not provide a detailed answer in this transcript.
New Section
The camera in the game is scaled to a world scale, and it is in relation to the world.
Camera Scaling
- The camera in the game is set to a maximum of 50 meters.
- The camera's scaling is relative to the world in the game.
New Section
Memory allocation for render buffers and render fetches in Hitman.
Render Buffers and Memory Allocation
- In Hitman, there were multiple render buffers reserved for different details in the game.
- There were concerns about running out of memory for actual render fetches.
- The render targets in Hitman were not very big, around 512 pixels.
- The team reused these render targets for various purposes, not just limited to plants or water elements.
New Section
Reusing render targets for multiple purposes in Hitman.
Reusing Render Targets
- In Hitman, the team reused the smaller-sized render targets (around 512 pixels) for many different things.
- These render targets served multiple purposes beyond just plants or water elements.
- This approach helped optimize memory usage and reduce the need for a large number of individual render targets.