GPU Shader Grass Interaction via Ripple Perturbation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current image processing methods for online games, particularly for grass interaction, suffer from low efficiency and unrealistic animation effects due to high CPU and video memory overheads, leading to poor display effects when multiple players interact with large scales of grass, resulting in stiff and unnatural interaction animations.

Innovation Solution

An image processing method that generates a base image of a water wave animation with ripples within the interaction area, allowing the target object (grass) to be moved based on the ripple positions, using GPU vertex shaders for perturbation, thereby reducing CPU overhead and enhancing animation realism.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If CPU-based intersection detection and vertex buffer locking method is used for grass interaction, then interaction effect can be implemented, but processing efficiency deteriorates when large numbers of players and grass are present

Engineering Contradiction:
Improveinteraction effectVSAvoidprocessing efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent replaces the CPU-based mechanical detection and rendering system with a GPU-based shader system. The vertex shader automatically calculates grass interaction effects using fragment-based processing, eliminating the need for CPU-based intersection detection and vertex buffer locking. This substitution leverages the GPU's parallel processing capability to handle large numbers of players and grass simultaneously, resolving the efficiency problem while maintaining interaction effects.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The patent uses a fragment buffer to store interaction parameters and copies this data to the vertex shader. Instead of processing each grass blade individually through CPU detection, the system creates a fragment-based representation of the interaction area, allowing the GPU to efficiently calculate and render all grass interactions in parallel, thereby improving processing efficiency.

Inventive Principle:
Principle #26Copying

2Reliability

If individual vertex stream processing is used for each grass blade, then interaction rendering can be achieved, but video memory overhead increases significantly

Engineering Contradiction:
Improveinteraction renderingVSAvoidvideo memory overhead
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent merges all grass blade rendering into a single draw call with unified vertex buffer processing. Instead of creating separate vertex streams for each grass blade, the system uses a single vertex buffer that is processed by the vertex shader, which dynamically calculates positions based on interaction parameters. This merging approach dramatically reduces video memory overhead while maintaining individual grass blade interaction rendering.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The vertex buffer and vertex shader serve multiple functions simultaneously: they handle positioning, interaction calculation, and rendering for all grass blades. The unified rendering approach allows the same buffer and shader to process numerous grass instances, reducing the need for separate memory allocations for each blade while maintaining rendering flexibility.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Reliability

If frequent vertex buffer locking and updating is performed for each grass blade, then interaction animation can be rendered, but CPU overhead increases

Engineering Contradiction:
Improveinteraction animationVSAvoidCPU overhead
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent replaces the CPU-based vertex buffer locking and updating mechanism with GPU-based shader processing. The vertex shader runs on the GPU and automatically updates grass positions based on interaction parameters without requiring CPU intervention. This substitution eliminates the frequent CPU-GPU data transfers and locking operations, significantly reducing CPU overhead while maintaining smooth interaction animation.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The shader-based approach enables continuous animation rendering without discrete CPU intervention cycles. The vertex shader continuously processes grass positions based on interaction parameters in a streamlined manner, eliminating the stop-start nature of CPU-based locking and updating. This continuous processing reduces CPU overhead while maintaining animation quality.

Inventive Principle:
Principle #20Continuity of useful action

4Reliability

If a large-scale interaction image is used to cover the entire interaction area, then comprehensive interaction can be achieved, but frame rate deteriorates due to excessive pixel calculations

Engineering Contradiction:
Improvecomprehensive interactionVSAvoidframe rate
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the interaction area into discrete fragments processed by the fragment shader. Instead of using a single large interaction image that requires processing all pixels, the system divides the area into manageable fragments that are processed in parallel by the GPU. This segmentation maintains comprehensive interaction coverage while dramatically reducing the computational burden and improving frame rate.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS10839587B2Image processing methods and devices for moving a target object by using a target ripple
Publication Date: 2020.11.17 TENCENT TECHNOLOGY (SHENZHEN) CO LTD
  • US10839587B2 patent drawing
  • US10839587B2 patent drawing
  • US10839587B2 patent drawing

AI summary

An image processing method, system, and apparatus are provided. The method includes obtaining an interaction area in a current image frame in which an interaction space of a first object is intersected with a first plane on which a second object is located, a target object in the second object being located in the interaction area. A base image of a water wave animation corresponding to the interaction area is generated, where plural ripples are displayed in the base image. By using a first target ripple of the plural ripples, the target object is moved to a position that is in the current image frame and that corresponds to a ripple position of the first target ripple in the base image, the first target ripple corresponding to the target object.