A method, apparatus, equipment, medium, and product for generating guide line effects.

By calculating the scaling information of the guide line model and generating the corresponding texture coordinates, the problem of inconsistent guide line effect lengths was solved, achieving unified and continuous rendering of guide line effects at different lengths.

CN122134906APending Publication Date: 2026-06-02NETEASE (HANGZHOU) NETWORK CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NETEASE (HANGZHOU) NETWORK CO LTD
Filing Date
2026-03-06
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing methods for generating guide lines result in inconsistent lengths of guide line effects across different guide line lengths, leading to uneven visual effects.

Method used

By determining the target axis scaling information of the guide line model, calculating the final scaling information, generating tiled texture coordinates and scaled texture coordinates, and sampling the sequence frame texture map in combination with the sequence frame texture coordinates, the length of each guide line effect is consistent.

Benefits of technology

This ensures that the length of each guide line effect is consistent across guide lines of different lengths, guaranteeing visual uniformity and continuity, and avoiding texture stretching and distortion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122134906A_ABST
    Figure CN122134906A_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, device, medium, and product for generating guide line effects. The method involves: determining the target axis scaling information of the guide line model; determining the final scaling information of the guide line model based on the target axis scaling information and a preset standard length for a single guide line effect; obtaining the tiled texture coordinates of the guide line model based on its base texture coordinates and the final scaling information; determining the scaled texture coordinates of the single guide line effect based on the tiled texture coordinates; determining the sequence frame texture coordinates based on the tiled texture coordinates and the scaled texture coordinates of the single guide line effect; and sampling the sequence frame texture map based on the sequence frame texture coordinates to generate the guide line effect. This invention enables consistent lengths of guide line effects across guide lines of varying lengths.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, device, medium, and product for generating guide line effects. Background Technology

[0002] In 3D game development, guide lines are one of the core functional effects. Their function is to clearly mark the path direction for players, while enhancing the game's immersion and visual depth through dynamic visual presentation.

[0003] Current methods for generating guide lines involve creating particle emitters in the game engine's particle editor, arranging particle emission points along a preset marching path, and controlling parameters such as particle lifecycle, speed, and color gradient to simulate the dynamic effect of guide lines. For example, the guide effect particle tool built into the Neox2 engine can bind path curves to allow particles to be continuously generated along the curve, creating a linear guide effect; some solutions also use particle collision detection and lifecycle control to achieve the visual representation of particles flowing along a path.

[0004] However, for the particle scheme, the distribution of particles along the path depends on the setting of the emission point spacing. When the guide line length changes, the number or spacing of emission points needs to be manually adjusted, otherwise the length of each guide line effect will be inconsistent. Therefore, a scheme is needed to ensure that the length of each guide line effect is consistent under guide lines of different lengths. Summary of the Invention

[0005] This invention provides a method, apparatus, device, medium, and product for generating guide line effects, so as to achieve consistent length of guide line effects across different lengths of guide lines.

[0006] According to one aspect of the present invention, a method for generating guide line effects is provided, comprising: Determine the target axis scaling information of the guide line model, and determine the final scaling information of the guide line model based on the target axis scaling information and the preset standard length of a single segment guide line effect; The tiled texture coordinates of the guide line model are obtained based on the base texture coordinates of the guide line model and the final scaling information; The scaling texture coordinates of the single-segment guide line effect are determined based on the tiled texture coordinates. The sequence frame texture coordinates are determined based on the tiled texture coordinates and the scaled texture coordinates of the single-segment guide line effect; The sequence frame texture map is sampled based on the sequence frame texture coordinates to generate a guide line effect.

[0007] Optionally, determining the target axis scaling information of the guide line model, and determining the final scaling information of the guide line model based on the target axis scaling information and the preset length of a single-segment guide line effect, includes: The local space vector of the guide line model is converted into a world space vector, where the world space represents the display space corresponding to the target game scene; The target axis scaling information is obtained by performing vector modulus calculation on the transformed world space vector; Based on the target axis scaling information and the standard length of the single-segment guide line effect, the final scaling information is obtained; the final scaling information represents the total number of segments of the guide line model after being divided according to the standard length of the single-segment guide line effect.

[0008] Optionally, obtaining the tiling texture coordinates of the guide line model based on the base texture coordinates and the final scaling information includes: The length direction component of the basic texture coordinates is calculated with the final scaling information to obtain the adjusted length direction component, while the width direction component remains unchanged. The tiling texture coordinates are obtained based on the adjusted length direction component and the width direction component.

[0009] Optionally, determining the sequence frame texture coordinates based on the tiled texture coordinates and the scaled texture coordinates of the single-segment guide line effect includes: By reading the real-time transformation matrix of the guide line model, the scaling component in the target axis direction is extracted to obtain the real-time scaling ratio, which represents the real-time length change of the guide line model. The sub-intervals corresponding to each scaling texture coordinate in the tiling texture coordinates are respectively calculated with the real-time scaling ratio to obtain the length direction position range of each scaling texture coordinate under the real-time scaling ratio. Based on the basic geometry of the guide line model, the length direction position range is mapped to the three-dimensional space coordinates of the model to determine the specific rendering position of each scaled texture coordinate in the current stretching state, thereby obtaining the sequence frame texture coordinates.

[0010] Optionally, the step of sampling the sequence frame texture map based on the sequence frame texture coordinates to generate the guide line effect includes: Import a preset sequence frame texture as the effect texture, and configure the row and column parameters and playback mode of the sequence frame texture; Obtain runtime parameters and speed control parameters, generate a frame index by multiplying the time parameters and speed control parameters, and read the texture of the current frame from the sequence frame texture according to the index; Extract the tiled texture coordinates corresponding to the texture coordinates of the sequence frames and pass them into the sampling module as texture sampling coordinates; The texture of the current frame is sampled to obtain the texture's color and transparency information; the sampled texture information is mapped and bound to the three-dimensional spatial coordinates of the texture coordinates of the sequence frame, and texture sampling is performed to generate a guide line effect.

[0011] Optionally, the method further includes: Based on the tiled texture coordinates and the final scaling information, calculate the beginning and end blurring factors of the guide line effect; Based on the blurring factor, smooth interpolation processing is performed to obtain the beginning and end blurring effect data. After sampling the sequence frame texture map based on the sequence frame texture coordinates, the guide line effect is generated based on the beginning and end blurring effect data.

[0012] Optionally, calculating the beginning and end blurring factors of the guide line effect based on the tiling texture coordinates and the final scaling information includes: The tail blurring factor is obtained by the length direction component of the tiled texture coordinates; The initial blurring factor is obtained by inverting the length direction component of the basic texture coordinates and multiplying it with the final scaling information. The tail-end blurring factor and the head-end blurring factor are range-limited and fused to obtain the head-tail blurring factor.

[0013] Optionally, the method further includes: The sequence frame textures are sampled to extract the color and transparency information of each texture in the sequence frame textures; The final transparency information is obtained by calculating the transparency information and the beginning and end blurring effect data; the final color information is obtained based on the color information and preset brightness adjustment parameters. The guide line effect is rendered based on the final transparency information and the final color information.

[0014] According to another aspect of the present invention, a guide line effect generating apparatus is provided, comprising: The final scaling information determination unit is used to determine the target axis scaling information of the guide line model, and to determine the final scaling information of the guide line model based on the target axis scaling information and the preset standard length of a single segment guide line effect. A tiled texture coordinate determination unit is used to obtain the tiled texture coordinates of the guide line model based on the base texture coordinates of the guide line model and the final scaling information; A scaling texture coordinate determination unit is used to determine the scaling texture coordinates of the single-segment guide line effect based on the tiled texture coordinates. A sequence frame texture coordinate determination unit is used to determine the sequence frame texture coordinates based on the tiled texture coordinates and the scaled texture coordinates of the single-segment guide line effect; A sequence frame texture sampling unit is used to sample the sequence frame texture based on the sequence frame texture coordinates to generate a guide line effect.

[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the guide line effect generation method according to any embodiment of the present invention.

[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the guide line effect generation method according to any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the guide line effect generation method described in any embodiment of the present invention.

[0018] The technical solution of this invention calculates the final scaling information by normalizing the standard length of a single segment, ensuring that the physical size of the special effects segments of different lengths of guide lines is uniform, thus solving the problem of uneven segmentation in traditional solutions. Based on the basic texture coordinates and the final scaling information, proportional tiling texture coordinates are generated to avoid texture stretching and misalignment, ensuring the consistency of texture mapping for each segment of special effects. Combined with the scaling texture coordinates, the texture coordinates of the sequence frames are dynamically adjusted to adapt to scenarios such as stretching and deformation of the guide line model, ensuring that there is no offset between the special effects and the model position, thereby achieving uniform length of guide line effects under different lengths of the guide line model.

[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a flowchart of a method for generating guide line effects provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of a sequence frame mapping applicable to an embodiment of the present invention; Figure 3 This is a schematic diagram of a guide line effect applicable to an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a guide line effect generation device provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of an electronic device that implements the guide line effect generation method of this invention. Detailed Implementation

[0022] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0023] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0024] Figure 1 This is a flowchart of a method for generating guide line effects according to an embodiment of the present invention. This embodiment is applicable to situations where guide line effects of equal length are generated in a game scene. This method can be executed by a guide line effect generation device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes: S110. Determine the target axis scaling information of the guide line model, and determine the final scaling information of the guide line model based on the target axis scaling information and the preset standard length of the single-segment guide line effect.

[0025] Specifically, a guide line model refers to a long, strip-shaped basic geometry pre-constructed using 3D modeling software. It serves as the physical carrier for guide line effects, with its length aligned with a preset target axis. It's used to mark paths and guide directions in the game scene. When creating a guide line model, it can be created using Maya, exported in FBX format based on the game engine's scene unit (decimeter), and then imported into the game engine to obtain a GIM model and its corresponding MTL material. Hardware batching of the GIM model is enabled to ensure performance can handle a large number of guide lines on screen simultaneously. The target axis is a predefined coordinate axis aligned with the guide line model's length direction, typically the Z-axis. Length-related scaling and calculations are performed around this target axis. Target axis scaling information indicates the actual scaling ratio of the guide line model along the target axis direction. This is extracted by the game engine from the model's transformation matrix and directly reflects the actual physical length of the guide line. For example, if engine scene unit 1 corresponds to 0.2 meters, and the target axis scaling ratio is 30, then the actual length of the guide line is 6 meters. This information includes the final length characteristics after external influences such as the model's own scaling and the transformation of its parent object. The standard length of a single guide line effect refers to the predefined fixed physical size corresponding to each guide line effect segment. The final scaling information refers to the total number of effect segments after the guide line model is divided according to the standard length.

[0026] By using a standard length as a unified benchmark, guide lines of varying actual lengths are all divided into fixed single-segment lengths. Regardless of changes in the actual length of the guide line, the physical size of each effect segment remains consistent. Since the standard length of a single guide line effect is a preset parameter, it can be flexibly adjusted according to the needs of different game scenarios without modifying the model or core calculation logic, thus adapting to the effect presentation requirements of different scenes. Target axis scaling information ensures that the final scaling information is unaffected by external transformations; regardless of whether the model is scaled or moved, the number of effect segments always precisely matches the actual length.

[0027] S120. Obtain the tiled texture coordinates of the guide line model based on the base texture coordinates and final scaling information of the guide line model.

[0028] The base texture coordinates, also known as the original UV coordinates, are a two-dimensional coordinate system generated during the modeling phase using UV unwrapping tools. Typically represented as UV, they contain U-axis and V-axis components, corresponding to UV.x and UV.y, with a fixed coordinate range of 0-1. They serve as the mapping medium between the model and texture resources. The length component UV.y corresponds to the target axis of the guide line model, while the width component UV.x aligns with the model's width direction. The guide line model is segmented according to a preset standard length, and each segment of the guide line effect together constitutes a complete guide line effect. The base texture coordinates are a whole composed of several continuous sub-coordinate intervals: each guide line effect corresponds to an independent continuous sub-interval within the base texture coordinates, and all sub-intervals together form the complete set of base texture coordinates.

[0029] Specifically, through UV unwrapping during the 3D modeling stage, a fixed 2D coordinate system, namely the basic texture coordinates, is preset for the guide line model. This coordinate system is a set of several continuous sub-intervals divided according to the segmentation logic of the guide line effect. Each sub-interval precisely corresponds to the physical position of a segment of the guide line effect, thereby establishing a mapping relationship between the effect segment positions and the texture coordinate intervals on the model surface, allowing texture sampling and effect rendering to accurately locate each effect position. For example, if the guide line model is divided into 30 effect positions at 0.2 meters / segment, its basic texture coordinates (UV.y range 0-1) will be simultaneously divided into 30 continuous sub-intervals, that is, each sub-interval is 0.033 in length. The first effect position corresponds to UV.y=0-0.033, the second corresponds to 0.033-0.066, and so on, up to the 30th segment corresponding to 0.967-1. All sub-intervals together constitute the set of position coordinates.

[0030] Tiling UV is a two-dimensional coordinate system based on base texture coordinates and final scaling information. It is a scaled texture mapping carrier. Its length range is 0 to the final scaling information (e.g., 30 segments correspond to 0-30), which perfectly matches the total number of effect segments. Its width range is 0-1, consistent with the UV.x of the base texture coordinates, ensuring no distortion of the texture in the width direction. Tiling UV is essentially a quantitative expression of position proportion. Each coordinate value corresponds to the relative proportion of the effect position in the total length of the guide line, making tiling UV an index in the total number of guide line segments.

[0031] Specifically, through real-time calculations by the shader, the basic texture coordinates are combined with the final scaling information to obtain length-direction proportional coordinates that match the total number of segments. Then, the coordinates are recombined to generate tiling texture coordinates. Each effect position corresponds to an independent sub-interval of length 1, quantifying the relative positional proportion of each effect segment within the entire length of the guide line. For example, if the final scaling information of the guide line model is 30 (30 effect segments), and the UV.y range of the basic texture coordinates is 0-1, then the length-direction range of the tiling texture coordinates is 0×30~1×30=0-30. The first effect segment corresponds to sub-interval 0-1, the second segment corresponds to 1-2, and so on, up to the 30th segment corresponding to 29-30, with all sub-intervals having the same positional proportion.

[0032] S130. Determine the scaling texture coordinates of the single-segment guide line effect based on the tiling texture coordinates.

[0033] The scaled texture coordinates are normalized two-dimensional texture coordinates specifically generated for single-segment guide line effects. Both length and width directions are limited to the standard range of 0-1, serving as the final coordinate reference for texture sampling of single-segment effects, ensuring that each effect segment can independently and completely map the effect texture. From the set of tiled texture coordinates, the length direction sub-interval corresponding to the current single-segment guide line effect is located. The non-standard length interval is converted to the standard range of 0-1. The normalized length direction component (0-1) is recombined with the original width direction component (0-1) to form the two-dimensional scaled texture coordinates. For example, if the length range of the tiled texture coordinates is 0-30 (30 effects), and the 8th effect corresponds to the length sub-interval of 7-8, the length value of the tiled texture coordinates at any position within this segment is 7.9. Then, by using Frac(7.9)=0.9 and combining it with the width component 0.5, the scaled texture coordinates at this position are obtained as (0.5, 0.9), adapting to the 0-1 texture sampling standard.

[0034] S140. Determine the texture coordinates of the sequence frame based on the scaling texture coordinates of the tiled texture coordinates and the single-segment guide line effect.

[0035] Specifically, as mentioned earlier, the tiled texture coordinates provide an index of the coordinate position within the total segments of the guide line. The scaled texture coordinates of a single guide line effect are normalized 0-1 standard coordinates, serving as a local sampling reference within the single guide line effect. This ensures complete mapping within the single guide line effect, avoiding stretching or truncation of the frame sequence texture. When determining the sequence frame texture coordinates, the index value of the current segment is first extracted from the tiled texture coordinates. Combined with the sequence frame row and column number parameters, the basic coordinates of the frame corresponding to that index in the sequence frame atlas are calculated. Then, the scaled texture coordinates are combined with these basic coordinates (e.g., scaled or overlaid by frame range). The generated sequence frame texture coordinates contain the frame position information of "which frame to play" and the local sampling information of "which position of the sampled frame texture map," ensuring that the sequence frame texture plays accurately and completely in each guide line effect, and that the frame animations of different segments are sequentially connected, achieving a continuous and error-free dynamic effect along the entire length of the guide line.

[0036] S150. Sample the sequence frame texture map based on the sequence frame texture coordinates to generate guide line effect.

[0037] Among them, sequence frame maps refer to visual resources pre-imported into the target game engine. They can be divided into static maps or dynamic maps and serve as the visual representation of guide line effects. The located target position is combined with the preset visual texture to output a complete guide line in the game scene that has both path guidance function and visual aesthetics.

[0038] Specifically, based on the previously calculated sequence frame texture coordinates that contain both sequence frame index information and single-segment effect standard sampling information, the color, transparency, and other texture pixel information of the corresponding position are located and extracted from the pre-imported sequence frame texture map. Then, the sampled texture data is bound to the three-dimensional spatial coordinates of the sequence frame texture coordinates for rendering, so that the sequence frame animation is presented continuously and completely on each segment of guide line effect according to the rules, generating a guide line visual effect with dynamic flow effect, unified segmentation, and precise position.

[0039] In this embodiment of the invention, determining the target axis scaling information of the guide line model, and determining the final scaling information of the guide line model based on the target axis scaling information and the preset length of a single segment guide line effect, includes: Convert the local space vector of the guide line model into a world space vector, where world space represents the display space corresponding to the target game scene; Perform vector magnitude calculation on the transformed world space vector to obtain the target axis scaling information; Based on the target axis scaling information and the standard length of the single-segment guide line effect, the final scaling information is obtained; the final scaling information represents the total number of segments after the guide line model is divided according to the standard length of the single-segment guide line effect.

[0040] Specifically, the first step is to eliminate the influence of the model's own local coordinate system. The local spatial vector, which only represents the model's own direction and relative relationship, is transformed into the globally unified world space of the game scene. The world space is the spatial coordinate system corresponding to the game scene that the player actually sees. After the transformation, it can truly reflect the actual spatial state of the guide line model in the scene, avoiding the distortion of length calculation caused by factors such as model rotation and parent object transformation. This lays a spatial reference for the subsequent accurate extraction of target axis scaling information.

[0041] The actual scaling of the guide line in the target axis direction is quantified by vector magnitude calculation. The magnitude of the world space vector after spatial transformation is calculated. This magnitude is not affected by irrelevant factors such as direction and rotation, and only reflects the actual scaling ratio of the guide line model on the length target axis. This value is the target axis scaling information, which is the quantitative data characterizing the actual physical length of the guide line.

[0042] The actual total length of the guide line is normalized to the fixed standard length of a single effect segment. The final scaling information is obtained by dividing the target axis scaling information by the standard length of a single segment. The essence of this value is the total number of effect segments that the guide line model can be divided into after being divided according to the uniform length of a single effect segment. This ensures that guide lines of different lengths can be segmented according to the same standard, guaranteeing the consistency of effect texture mapping and rendering.

[0043] In addition, the base texture coordinates of the guide line model can be determined in the following way: The guide line model is processed by unfolding the texture coordinates so that the unfolded basic texture coordinates form a positional mapping relationship with the physical shape of the guide line model. The basic texture coordinates are a set of two-dimensional coordinates, and each coordinate element corresponds to the spatial position of each guide line effect on the guide line model. Align the length component of the base texture coordinates with the target axis of the guide line model, and align the width component with the width direction of the guide line model; wherein, each guide line effect position corresponds to a continuous sub-interval in the base texture coordinate set, and the length range of each sub-interval is proportional to the segment physical length of the guide line model.

[0044] Texture coordinate unwrapping is the industry-standard UV unwrapping operation. Using the UV editing tools of modeling software (such as Maya and Blender), the 3D surface of the guide line model is decomposed and tiled into a 2D coordinate plane. During the process, it is necessary to ensure that the coordinates do not overlap, stretch, or twist, so that the unwrapped base texture coordinates form a mapping relationship with the 3D physical shape of the model. Each physical point on the model surface corresponds to a unique base texture coordinate point.

[0045] Align the length component (UV.y) of the basic texture coordinates with the target Z-axis of the guide line model, and align the width component (UV.x) with the width direction of the model. Match the coordinate dimensions with the physical dimensions of the model. Effect calculations in the length direction can be directly based on UV.y, while texture mapping in the width direction can be completed based on UV.x. Divide the overall basic texture coordinates into several continuous and non-overlapping sub-intervals according to the preset physical length of a single effect segment. The length range of each sub-interval is proportional to the physical length of the model segment, indicating that the rules for dividing the coordinate intervals are consistent with the rules for dividing the physical segments. For example, if the physical length of a certain effect segment accounts for 1 / 30 of the total length of the guide line, the length of its corresponding coordinate sub-interval also accounts for 1 / 30 of the total range of the basic texture coordinates.

[0046] In this embodiment of the invention, obtaining the tiled texture coordinates of the guide line model based on the base texture coordinates and the final scaling information includes: The length component of the base texture coordinates is calculated with the final scaling information to obtain the adjusted length component, while the width component remains unchanged. The tiled texture coordinates are then obtained based on the adjusted length and width components.

[0047] Specifically, as mentioned earlier, the length component UV.y of the basic texture coordinates is a fixed range of 0-1, reflecting only relative position and not the number of segments; while the final scaling information value equals the total number of effect segments in the guide line model. Through multiplication, the 0-1 length component can be expanded to a length direction proportional coordinate from 0 to the final scaling information. When calculating the tiled texture coordinates, the width component does not need to be adjusted; simply combine the length direction proportional coordinate that adapts to the total number of segments with the original width component to obtain the tiled texture coordinates. For example, each coordinate element in the tiled texture coordinates, such as (0.5, 2.3), has a length direction value of 2.3 that directly reflects its relative position within the total length of the guide line, i.e., 2.3 ÷ final scaling information. This relative proportion remains unchanged regardless of whether the actual length of the guide line is 3 meters or 6 meters. For example, when the final scaling information is 30, the relative proportion corresponding to the length value of 2.3 is 2.3 / 30=7.67%, which means that the position is located at 7.67% of the total length of the guide line. If the guide line is stretched to 9 meters, the final scaling information is still 30, and the relative proportion is still 7.67%. The corresponding actual physical position is stretched synchronously, but the relative position remains unchanged.

[0048] Since the length range of the tiled texture coordinates is 0 to the final scaling information, and each unit corresponds to the standard length of one effect segment, the position of each guide line effect segment will precisely correspond to a continuous sub-interval of length 1 in the tiled texture coordinates. For example, the first effect segment corresponds to the 0-1 sub-interval, the second segment corresponds to the 1-2 sub-interval, ..., the nth segment corresponds to the (n-1)-n sub-interval. The sub-intervals are continuous and do not overlap, ensuring that each effect segment has an independent and uniform texture mapping range of 0-1. By performing a fractional Frac operation, a single segment of texture coordinates within the standard 0-1 range can be extracted from each sub-interval, enabling independent texture sampling and independent dynamic rendering of each effect segment.

[0049] In this embodiment of the invention, determining the texture coordinates of the sequence frames based on the tiled texture coordinates and the scaled texture coordinates of the single-segment guide line effect includes: By reading the real-time transformation matrix of the guide line model, the scaling component in the target axis direction is extracted to obtain the real-time scaling ratio, which represents the real-time length change of the guide line model. The sub-intervals corresponding to each scaled texture coordinate in the tiled texture coordinates are calculated with the real-time scaling ratio to obtain the length direction position range of each scaled texture coordinate under the real-time scaling ratio. Based on the basic geometry of the guide line model, the position range in the length direction is mapped to the three-dimensional space coordinates of the model to determine the specific rendering position of each scaled texture coordinate in the current stretching state, thus obtaining the sequence frame texture coordinates.

[0050] Specifically, the dynamic length characteristics of the guide line model are acquired in real time during game operation. By reading the real-time transformation matrix that records the current scaling, rotation, and displacement state of the model in the game engine, the scaling component corresponding to the target axis that is consistent with the length direction of the guide line is extracted. This scaling component is the real-time scaling ratio, and its value will be dynamically updated according to the model's stretching, shrinking, and parent object linkage transformation, reflecting the actual length change of the guide line model at the current moment, providing real-time and accurate length benchmark data for the dynamic adaptation of subsequent special effects positions.

[0051] The tiled texture coordinates have been divided into independent sub-intervals corresponding to each scaled texture coordinate. Each sub-interval represents the relative position ratio of the single-segment effect. By multiplying these sub-intervals with the real-time scaling ratio, the ratio range that only reflects the relative relationship can be converted into a length direction position range that matches the current actual stretching state of the guide line. This ensures that no matter how the model stretches or shrinks in real time, the length interval corresponding to each scaled texture coordinate can be adapted synchronously, maintaining the stability of the physical size and segmentation relationship of the single-segment effect.

[0052] The basic geometry of a guideline model refers to its inherent physical properties, such as cross-sectional dimensions, the position of the local coordinate system origin, and axial orientation. Based on this inherent geometry, the length-direction position range (i.e., the sub-intervals of the tiling texture coordinates multiplied by the real-time scaling ratio) mentioned above is mapped to the model's 3D spatial coordinate system. This mapping is then performed using a spatial coordinate transformation algorithm, determining the corresponding 3D spatial region for each scaled texture coordinate in the model's current stretched state—the specific rendering area. Specifically, the model's real-time transformation matrix is ​​first read. The local spatial coordinates corresponding to the length-direction position range are multiplied by the model's scaling matrix to adapt to the guideline model's current stretched / shrunken state; then multiplied by a rotation matrix to match the guideline model's orientation in the game scene; finally, a translation matrix is ​​added to overlay the guideline model's overall position in world space, converting the guideline model's local coordinates into a 3D spatial region in world space based on the game scene's global origin. The scaled texture coordinates corresponding to the three-dimensional spatial region are fused with the frame index of the sequence frame, that is, the two-dimensional texture coordinates are bound to the three-dimensional spatial position, so as to obtain the sequence frame texture coordinates that contain both texture sampling information and match the real-time spatial position.

[0053] In this embodiment of the invention, sampling the sequence frame texture map based on the sequence frame texture coordinates to generate the guide line effect includes: Import the preset sequence frame map as the effect texture, and configure the row and column parameters and playback mode of the sequence frame map; Obtain runtime parameters and speed control parameters, generate a frame index by multiplying the time parameters and speed control parameters, and read the texture of the current frame from the sequence frame texture map according to the index; Extract the tiled texture coordinates corresponding to the texture coordinates of the sequence frames and pass them as texture sampling coordinates into the sampling module; The texture of the current frame is sampled to obtain the texture's color and transparency information; the sampled texture information is mapped and bound to the three-dimensional spatial coordinates of the texture coordinates of the sequence frames, and texture sampling is performed to generate guide line effects.

[0054] Figure 2 This is a schematic diagram of a sequence frame mapping applicable to an embodiment of the present invention, such as... Figure 2As shown, a sequence frame texture is a pre-made collection of multiple static textures. Each frame of texture is sequentially linked to form a dynamic visual effect. Its advantage is that it can present dynamic changes and is more visually guiding than static textures. After importing this texture resource into the target game engine, two parameters need to be configured: the row and column number parameter, which tells the engine the arrangement rules of the sequence frames, so as to accurately calculate the total number of frames and the texture coordinate range of each frame; and the playback mode, which defines the presentation logic of the texture dynamic effect, such as loop playback to adapt to continuous guidance scenes, and single playback to adapt to trigger-based guidance scenes.

[0055] The runtime parameter is the system runtime recorded in real time by the game engine, such as the number of seconds from game startup to the present. It is used to synchronize texture playback with game time to ensure a stable playback rhythm. The speed control parameter is a preset, adjustable parameter used to control the playback speed of the sequence frames to adapt to the visual rhythm requirements of different scenes. By multiplying the runtime parameter by the speed control parameter, the cumulative number of playback frames can be obtained. This value, after rounding or modulo processing, becomes the frame index, such as index 5 corresponding to the 6th frame texture. The corresponding single frame texture is read from the sequence frame texture map according to this index, ensuring that the sequence frames play continuously at the preset speed and avoiding frame errors or stuttering.

[0056] The texture coordinates of the sequence frames are the three-dimensional spatial coordinate range calculated earlier. Passing the tiled texture coordinates as texture sampling coordinates to the game engine's sampling module essentially tells the sampling module which pixel information to extract from the sequence frame texture for rendering the current effect position. For example, if the tiled texture coordinates of an effect are (0-1, 2-3), after rounding, they become (0-1, 0-1). The sampling module then extracts the complete pixel information of the current frame texture, ensuring that the texture and effect position have a perfectly matched aspect ratio without stretching or cropping. Based on the input sampling coordinates, the sampling module performs sampling operations on the texture of the current frame, extracting color and transparency information. It then binds the texture to the three-dimensional spatial coordinates of the sequence frame texture using a coordinate mapping algorithm, meaning that a certain segment of the three-dimensional space corresponds to a certain part of the texture, ensuring that the texture and the physical shape of the effect position are perfectly aligned. The game engine performs rendering operations, rendering the bound texture to the target three-dimensional spatial position. Combined with anti-aliasing, lighting blending, and other optimizations, a dynamically flowing, precisely positioned, and visually clear guide line effect is presented in the game scene. Figure 3 This is a schematic diagram of a guide line effect applicable to an embodiment of the present invention.

[0057] In this embodiment of the invention, the method may further include the following steps: Based on the tiled texture coordinates and the final scaling information, calculate the blurring factor at the beginning and end of the guide line effect position; After performing smooth interpolation based on the blurring factor to obtain the beginning and end blurring effect data, and sampling the sequence frame texture map based on the sequence frame texture coordinates, the guide line effect is generated based on the beginning and end blurring effect data.

[0058] Specifically, the beginning and end blur factor is a quantized parameter ranging from 0 to 1, where 0 represents complete blur / transparency and 1 represents no blur / clear. The length component `tilingUV.y` is extracted from the tiling texture coordinates. This component represents the relative proportion of the current effect position within the entire length of the guide line. Combined with the final scaling information, the beginning and end blur intervals are defined, such as the first 5% and the last 5% segments being blur regions. For the beginning position, the blur factor is calculated using 1 - (tilingUV.y / final scaling information). The closer to the start of the guide line, the smaller the factor value, and the stronger the blur. For the end position, the blur factor is calculated using `tilingUV.y / final scaling information`. The closer to the end of the guide line, the smaller the factor value, and the stronger the blur. The blur factor for non-beginning and end intervals is uniformly set to 1, i.e., no blur. The positional proportion is converted into a quantized value of the blur degree, ensuring that the blur range only affects the beginning and end, without affecting the clear display of the effect in the middle section.

[0059] The calculated blurring factors at the beginning and end are processed by smooth interpolation, such as using algorithms like SmoothStep or linear interpolation. An interpolation starting point is set, so that the change of the blurring factor from 0 to 1 changes from a step-like to a gradual change, resulting in blurring effect data at the beginning and end without any discontinuities and with a natural transition. When performing texture rendering, this blurring effect data is multiplied by the texture's transparency / brightness information: at the beginning of the guide line, the blurring factor gradually increases from 0 to 1 as the position changes, and the effect gradually changes from completely transparent to clear; at the end, it gradually decreases from 1 to 0, and the effect gradually changes from clear to completely transparent. This ensures the blending of the blurring effect with the overall guide line effect, making the visual presentation of the guide line effect more natural and more in line with the visual aesthetics of the game scene without affecting the clarity of the middle section of the guide line.

[0060] In this embodiment of the invention, the method may further include the following steps: Sample the sequence frame textures and extract the color and transparency information of each texture in the sequence frame textures; The final transparency information is obtained by calculating the transparency information and the beginning and end blurring effect data; the final color information is obtained by calculating the color information and the preset brightness adjustment parameters. The guide line effect is rendered based on the final transparency and color information.

[0061] Specifically, the engine sampling module extracts color and transparency information from the textures of the sequence frame maps. The color information determines the base tone of the guide line effect, and the transparency information determines the transparency of the effect, which is used to prevent the effect from obscuring the background or other elements of the game scene.

[0062] The transparency information of the sequence frame texture itself is multiplied with the beginning and end blur effect data to achieve the superposition effect of the texture's inherent transparency and the beginning and end gradient blur. While preserving the transparency characteristics of the texture itself, the transparency of the guide lines is further reduced at the beginning and end according to the blur rules to avoid the conflict between the blur effect and the texture transparency, making the transition between the beginning and end smoother. On the other hand, the brightness of the special effect is adjusted by multiplying the preset brightness adjustment parameters with the original color information to adapt to the lighting environment of different game scenes, so that the special effect is both visually aesthetic and scene-adaptable.

[0063] During rendering, the game engine uses the final transparency and color information as rendering parameters and binds them to the texture coordinates of the sequence frames to be rendered. Based on the spatial range of the target location, the final color information is used as the base tone and the final transparency information is used as the transparency standard. The engine's rendering pipeline performs drawing operations, while combining low-level optimizations such as anti-aliasing and lighting blending to ensure that the rendering result has both the fluidity of the sequence frame texture and the natural transition of the beginning and end blurring, as well as the brightness and transparency that adapt to the scene, presenting a complete guide line effect in the game scene.

[0064] Figure 4 This is a schematic diagram of a guide line effect generation device provided in an embodiment of the present invention. Figure 4 As shown, the device includes: The final scaling information determination unit 410 is used to determine the target axis scaling information of the guide line model, and to determine the final scaling information of the guide line model based on the target axis scaling information and the preset standard length of the single-segment guide line effect.

[0065] The tiled texture coordinate determination unit 420 is used to obtain the tiled texture coordinates of the guide line model based on the base texture coordinates and the final scaling information of the guide line model.

[0066] The scaling texture coordinate determination unit 430 is used to determine the scaling texture coordinates of a single-segment guide line effect based on the tiling texture coordinates.

[0067] The sequence frame texture coordinate determination unit 440 is used to determine the sequence frame texture coordinates based on the tiled texture coordinates and the scaled texture coordinates of the single-segment guide line effect.

[0068] The sequence frame texture sampling unit 450 is used to sample the sequence frame texture based on the sequence frame texture coordinates to generate guide line effects.

[0069] The guide line effect generation device provided in this embodiment of the invention can execute the guide line effect generation method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.

[0070] Figure 5 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0071] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0072] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0073] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the guide line effect generation method.

[0074] In some embodiments, the guide line effect generation method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the guide line effect generation method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the guide line effect generation method by any other suitable means (e.g., by means of firmware).

[0075] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0076] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0077] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0078] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0079] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0080] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0081] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0082] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for generating guide line effects, characterized in that, include: Determine the target axis scaling information of the guide line model, and determine the final scaling information of the guide line model based on the target axis scaling information and the preset standard length of a single segment guide line effect; The tiled texture coordinates of the guide line model are obtained based on the base texture coordinates of the guide line model and the final scaling information; The scaling texture coordinates of the single-segment guide line effect are determined based on the tiled texture coordinates; The sequence frame texture coordinates are determined based on the tiled texture coordinates and the scaled texture coordinates of the single-segment guide line effect; The sequence frame texture map is sampled based on the sequence frame texture coordinates to generate a guide line effect.

2. The method according to claim 1, characterized in that, The process of determining the target axis scaling information of the guide line model, and determining the final scaling information of the guide line model based on the target axis scaling information and the preset length of a single segment guide line effect, includes: The local space vector of the guide line model is converted into a world space vector, where the world space represents the display space corresponding to the target game scene; The target axis scaling information is obtained by performing vector modulus calculation on the transformed world space vector; Based on the target axis scaling information and the standard length of the single-segment guide line effect, the final scaling information is obtained; the final scaling information represents the total number of segments of the guide line model after being divided according to the standard length of the single-segment guide line effect.

3. The method according to claim 1, characterized in that, The step of obtaining the tiled texture coordinates of the guide line model based on the base texture coordinates and the final scaling information includes: The length direction component of the basic texture coordinates is calculated with the final scaling information to obtain the adjusted length direction component, while the width direction component remains unchanged. The tiling texture coordinates are obtained based on the adjusted length direction component and the width direction component.

4. The method according to claim 3, characterized in that, The process of determining the sequence frame texture coordinates based on the tiled texture coordinates and the scaled texture coordinates of the single-segment guide line effect includes: By reading the real-time transformation matrix of the guide line model, the scaling component in the target axis direction is extracted to obtain the real-time scaling ratio, which represents the real-time length change of the guide line model. The sub-intervals corresponding to each scaling texture coordinate in the tiling texture coordinates are respectively calculated with the real-time scaling ratio to obtain the length direction position range of each scaling texture coordinate under the real-time scaling ratio. Based on the basic geometry of the guide line model, the length direction position range is mapped to the three-dimensional space coordinates of the model to determine the specific rendering position of each scaled texture coordinate in the current stretching state, thereby obtaining the sequence frame texture coordinates.

5. The method according to claim 4, characterized in that, The step of sampling the sequence frame texture map based on the sequence frame texture coordinates to generate the guide line effect includes: Import a preset sequence frame texture as the effect texture, and configure the row and column parameters and playback mode of the sequence frame texture; Obtain runtime parameters and speed control parameters, generate a frame index by multiplying the time parameters and speed control parameters, and read the texture of the current frame from the sequence frame texture according to the index; Extract the tiled texture coordinates corresponding to the texture coordinates of the sequence frames and pass them into the sampling module as texture sampling coordinates; The texture of the current frame is sampled to obtain the texture's color and transparency information; the sampled texture information is mapped and bound to the three-dimensional spatial coordinates of the texture coordinates of the sequence frame, and texture sampling is performed to generate a guide line effect.

6. The method according to claim 1, characterized in that, The method further includes: Based on the tiled texture coordinates and the final scaling information, calculate the beginning and end blurring factors of the guide line effect; Based on the blurring factor, smooth interpolation processing is performed to obtain the beginning and end blurring effect data. After sampling the sequence frame texture map based on the sequence frame texture coordinates, the guide line effect is generated based on the beginning and end blurring effect data.

7. The method according to claim 6, characterized in that, The calculation of the beginning and end blurring factors of the guide line effect based on the tiled texture coordinates and the final scaling information includes: The tail blurring factor is obtained by the length direction component of the tiled texture coordinates; The initial blurring factor is obtained by inverting the length direction component of the basic texture coordinates and multiplying it with the final scaling information. The tail-end blurring factor and the head-end blurring factor are range-limited and fused to obtain the head-tail blurring factor.

8. The method according to claim 6, characterized in that, The method further includes: The sequence frame textures are sampled to extract the color and transparency information of each texture in the sequence frame textures; The final transparency information is obtained by calculating the transparency information and the beginning and end blurring effect data; the final color information is obtained based on the color information and preset brightness adjustment parameters. The guide line effect is rendered based on the final transparency information and the final color information.

9. A guide line effect generating device, characterized in that, include: The final scaling information determination unit is used to determine the target axis scaling information of the guide line model, and to determine the final scaling information of the guide line model based on the target axis scaling information and the preset standard length of a single segment guide line effect. A tiled texture coordinate determination unit is used to obtain the tiled texture coordinates of the guide line model based on the base texture coordinates of the guide line model and the final scaling information; A scaling texture coordinate determination unit is used to determine the scaling texture coordinates of the single-segment guide line effect based on the tiled texture coordinates. A sequence frame texture coordinate determination unit is used to determine the sequence frame texture coordinates based on the tiled texture coordinates and the scaled texture coordinates of the single-segment guide line effect; A sequence frame texture sampling unit is used to sample the sequence frame texture based on the sequence frame texture coordinates to generate a guide line effect.

10. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the guide line effect generation method according to any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the guide line effect generation method according to any one of claims 1-8.

12. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the guide line effect generation method according to any one of claims 1-8.