A scene routing mask editing and generating method and system

By using semi-transparent texture maps to draw pathfinding masks in a top-view perspective, generating pathfinding mask units and setting them as obstacles, the problem of excessive time consumption in existing technologies is solved. This improves the efficiency and accuracy of scene pathfinding baking, enables rapid editing, ensures full scene controllability, and enhances the efficiency and accuracy of scene pathfinding baking.

CN118236691BActive Publication Date: 2025-12-05FUJIAN TQ DIGITAL
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211658345.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-22
Publication Date
2025-12-05
Estimated Expiration
2042-12-22

AI Technical Summary

Technical Problem

Existing technologies consume a lot of time in the process of generating pathfinding masks in game scenes and make it difficult to accurately control the pathfinding situation in each area. In particular, the parameter settings are not intuitive in 3D scenes, resulting in low baking efficiency and insufficient accuracy.

Method used

Semi-transparent texture maps are used to cover the game scene from a top-down perspective. Pathfinding masks are drawn with brush strokes, and pathfinding mask units are generated according to accuracy requirements. Finally, these units are set as non-pathfinding obstacles, enabling rapid editing and precise control.

Benefits of technology

It simplifies the creation process of 3D objects and face vertices, improves the efficiency and accuracy of scene pathfinding baking, and realizes controllable pathfinding in all areas of the entire scene.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118236691B_ABST
    Figure CN118236691B_ABST
Patent Text Reader

Abstract

The application provides a scene pathfinding mask editing and generating method, which comprises the following steps: S1: generating a semi-transparent texture map with the size of a game scene multiplied by an accuracy multiple n according to the size of the game scene in an engine and according to a required accuracy requirement; S2: displaying the game scene using a top view in a preview frame of a pathfinding mask editing tool, and covering the generated semi-transparent texture map on the game scene with the same size; S3: setting a pen touch size according to the size of the semi-transparent texture map, and drawing a pathfinding mask on the semi-transparent texture map; S4: generating corresponding pathfinding mask units in the game scene according to the semi-transparent texture map after the pathfinding mask is drawn; and S5: setting all the pathfinding mask units as non-pathfinding obstacles, and baking a pathfinding grid of the game scene. The application realizes fast editing, guarantees controllable pathfinding conditions in all regions of the whole scene, and improves the baking efficiency and baking accuracy of scene pathfinding.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to a game scene pathfinding mask editing and generating method, in particular to a scene pathfinding mask editing and generating method and system. BACKGROUND

[0002] In the development of a game, it is often necessary to pathfinding bake a scene to determine which parts can be walked. For a game scene, a mask is usually made as an unpathfinding part and then baked to determine the pathfinding part in the scene. However, making a mask as an obstacle requires a large amount of man-hours and a cumbersome production process.

[0003] In a two-dimensional game scene, the prior art pathfinding grid baking is performed by creating a large number of three-dimensional object obstacles in the scene to place in the unpathfinding place as a mask, or drawing a three-dimensional patch in a three-dimensional modeling software to cover the unpathfinding place, thereby baking the pathfinding grid as a mask. Such a mask generation method requires a large amount of man-hours for an artist to create a large number of three-dimensional objects, then place the three-dimensional objects in the scene and drag the obstacles to the appropriate position, or create a three-dimensional patch to draw a large number of vertices in the patch to determine that the patch covers the unpathfinding place in the scene.

[0004] In a three-dimensional game scene, the prior art mainly bakes the scene pathfinding grid according to editing baking parameters such as a slope greater than a certain value, a walking character radius, etc. The main problem of this method is that the details are uncontrollable, such as whether a certain part of the scene is pathfinding or not cannot be determined intuitively by setting the parameters, and some places are contradictory, such as a place with a larger slope is expected to be pathfinding, and another place with a smaller slope is not expected to be pathfinding. Such a method cannot cover all pathfinding grid requirements with uniform parameters. A three-dimensional game scene can also determine the pathfinding area by creating a three-dimensional object as an obstacle. The disadvantage of this method is the same as that in the two-dimensional game scene. SUMMARY

[0005] To overcome the above problems, the purpose of the present application is to provide a game scene pathfinding mask editing and generating method and system which is convenient to use and saves a large amount of man-hours, realizes fast editing, ensures controllable pathfinding of each area in the whole scene, and improves the scene pathfinding baking efficiency and baking accuracy.

[0006] The present application adopts the following scheme to realize the above purposes:

[0007] A scene pathfinding mask editing and generating method, the method comprising the following steps:

[0008] Step S1: according to the size of the game scene in the engine, according to the required accuracy requirements, generate a translucent texture map of the size of the scene multiplied by the accuracy multiple n;

[0009] Step S2: display the game scene using the top view angle in the preview box of the pathfinding mask editing tool, and cover the generated translucent texture map on the game scene with the same size;

[0010] Step S3: set the brush size according to the size of the translucent texture map, and draw the pathfinding mask on the translucent texture map;

[0011] Step S4: generate the corresponding pathfinding mask unit in the game scene according to the translucent texture map after drawing the pathfinding mask;

[0012] Step S5: set all the pathfinding mask units as non-pathfinding obstacles, and bake the pathfinding grid of the game scene.

[0013] Further, in step S2, the method of displaying the game scene using the top view angle in the preview box of the pathfinding mask editing tool is: loading the game scene resource, and creating an orthogonal camera, the display area of the camera being the area of the game scene resource in the engine, and displaying the effect in the preview box of the tool.

[0014] Further, in step S2, the method of covering the generated translucent texture map on the game scene with the same size is: compressing the size of the translucent texture map to the size of the game scene, and displaying the generated translucent texture map on the top view camera effect of the scene, the size of the translucent texture map in the preview box of the tool being corresponding to the size of the game scene.

[0015] Further, step S3 is further specific: after selecting the brush type and size, drawing the mask on the translucent texture map, and the transparency of the pixels corresponding to the translucent texture map in the place brushed by the brush changes to 0 with the specified radius size.

[0016] Further, step S4 is further specific: generating the pathfinding mask unit of the game scene in the engine according to the pixels of the translucent texture map after drawing the pathfinding mask, according to the accuracy multiple n, the size of the translucent texture map of the pathfinding mask is n times the size of the game scene in the engine, the size of each pixel of the translucent texture map of the pathfinding mask in the engine is: (1 / n)*(1 / n); in the game scene, no pathfinding mask unit is generated in the place where the pixel of the translucent texture map is 0, and a pathfinding mask unit is generated in the corresponding position where the pixel of the translucent texture map is not 0.

[0017] A scene pathfinding mask editing and generating system, the system comprises: a map generating module, a covering module, a drawing code module, a pathfinding mask generating module, a baking module;

[0018] The map generating module is used to generate a translucent texture map with a size of the scene size multiplied by the precision multiple n according to the size of the game scene in the engine and the required precision requirement.

[0019] The covering module is used to display the scene using a top view in the preview frame of the pathfinding mask editing tool, and cover the generated translucent texture map on the game scene with the same size.

[0020] The drawing code module is used to set the brush size according to the size of the translucent texture map, and draw the pathfinding mask on the translucent texture map.

[0021] The pathfinding mask generating module is used to generate the corresponding pathfinding mask unit in the game scene according to the translucent texture map after the pathfinding mask is drawn.

[0022] The baking module is used to set all pathfinding mask units as non-pathfinding obstacles, and bake the pathfinding grid of the game scene.

[0023] Further, in the covering module, the method for displaying the game scene using a top view in the preview frame of the pathfinding mask editing tool is: loading the game scene resource, and creating an orthogonal camera, the display area of the camera being the area of the game scene resource in the engine, and displaying the effect in the preview frame of the tool.

[0024] Further, in the covering module, the method for covering the generated translucent texture map on the game scene with the same size is: compressing the size of the translucent texture map to the size of the game scene, and displaying the generated translucent texture map on the top view camera effect of the scene, the size of the translucent texture map in the preview frame of the tool being corresponding to the size of the game scene.

[0025] Further, the drawing code module is further specifically: after selecting the brush type and size, drawing the pathfinding mask on the translucent texture map, and changing the transparency of the corresponding pixels of the translucent texture map to 0 within the specified radius size where the brush passes.

[0026] Furthermore, the pathfinding mask generation module is further specified as follows: Based on the pixels of the semi-transparent texture map after the pathfinding mask is drawn, a pathfinding mask unit for the game scene in the engine is generated. According to the precision multiple n, the size of the semi-transparent texture map for drawing the pathfinding mask is n times the size of the game scene in the engine. The size of each pixel of the semi-transparent texture map in the engine corresponding to the scene size is (1 / n)*(1 / n). In the game scene, no pathfinding mask unit is generated where the semi-transparent texture map pixel is 0, and a pathfinding mask unit is generated at the corresponding position where the semi-transparent texture map pixel is not 0.

[0027] The beneficial effects of this invention are as follows: This invention uses a brush to paint the pixels of a semi-transparent texture map and automatically generates obstacles, which simplifies the tedious operation of creating a large number of 3D objects and dragging a large number of face vertices; by matching the scene view with the semi-transparent texture map to be painted, it solves the problem of the large amount of work of dragging a large number of 3D objects and a large number of face vertices to a specified position, thus improving the efficiency of scene pathfinding baking.

[0028] This invention provides a method and system for editing and generating scene pathfinding masks, which enables rapid editing and ensures that the pathfinding situation in each area of ​​the entire scene is controllable, thereby improving the efficiency and accuracy of scene pathfinding baking. Attached Figure Description

[0029] Figure 1 This is a flowchart of the method of the present invention;

[0030] Figure 2 This is a structural block diagram of the system of the present invention. Detailed Implementation

[0031] The invention will now be further described with reference to the accompanying drawings.

[0032] like Figure 1 As shown, a method for editing and generating scene pathfinding masks includes the following steps:

[0033] Step S1: Based on the size of the game scene in the engine and the required precision, generate a semi-transparent texture map that is the size of the game scene multiplied by the precision multiplier n.

[0034] Step S2: Display the game scene in the preview frame of the pathfinding mask editor using a top view, and overlay the generated semi-transparent texture map on the game scene with the same size;

[0035] Step S3: Set the stroke size according to the size of the semi-transparent texture map, and draw the pathfinding mask on the semi-transparent texture map;

[0036] Step S4: Generate the corresponding pathfinding mask unit in the game scene based on the semi-transparent texture map after drawing the pathfinding mask;

[0037] Step S5: set all the pathfinding mask units as unpathable obstacles, and bake the pathfinding grid of the game scene.

[0038] The application will be further described in combination with a specific embodiment:

[0039] A scene pathfinding mask editing and generating method, the method comprises the following steps:

[0040] According to the size of the game scene in the engine, such as 180*200, the precision multiple is set to 10 times, and then a semi-transparent black map with a size of 1800*2000 is generated.

[0041] Step S2: display the game scene in the top view in the preview box of the pathfinding mask editing tool, and then cover the semi-transparent texture map with the same size on the game scene in the preview box.

[0042] Load the game scene resource and create an orthogonal camera, the display area of the camera is the area of the game scene resource in the engine, and the effect is displayed in the preview box of the tool, thereby completing the display of the game scene in the top view in the preview box of the pathfinding mask editing tool; the semi-transparent black map is compressed, and the generated semi-transparent black map is displayed on the top view camera effect of the game scene, the size of the semi-transparent black map in the preview box of the tool corresponds to the size of the game scene.

[0043] Step S3: select the pen type and size, and then draw the mask on the semi-transparent black map, and the transparency of the corresponding pixels of the semi-transparent black map is changed to 0 according to the specified radius size where the pen touches.

[0044] Select the pen type and size, draw the mask on the semi-transparent map, and the transparency of the corresponding pixels of the semi-transparent black map is changed to 0 according to the specified radius size where the pen touches, so that the effect after the mask editing can be displayed.

[0045] Step S4: according to the semi-transparent texture map after drawing the pathfinding mask, generate pathfinding mask units in the corresponding position of the game scene.

[0046] Because the precision multiple is 10 times, the size of the semi-transparent black map is 10 times the size of the game scene in the engine, and the size of the semi-transparent map pixel of the mask corresponds to the size of the game scene in the engine, which is 0.1m*0.1m, that is, the size of all mask units in the game scene in the engine is 0.1m*0.1m, and the place where the semi-transparent map pixel of the mask is 0 in the game scene does not generate a pathfinding mask unit, and the place where the semi-transparent map pixel of the mask is not 0 in the game scene generates a pathfinding mask unit at the corresponding position.

[0047] Step S5: set all pathfinding mask units in the game scene as non-pathfinding obstacles, so that there is no non-pathfinding obstacle without a pathfinding mask unit, and there is an obstacle corresponding to a pathfinding mask unit; thereby completing the baking of the pathfinding grid of the game scene.

[0048] A scene pathfinding mask editing and generating system, the system comprises: a map generating module, a covering module, a drawing module, a pathfinding mask generating module, and a baking module; the map generating module is used to generate a semi-transparent texture map with a size of the scene multiplied by a precision multiple n according to the size of the game scene in the engine and the required precision requirement; the covering module is used to display the scene using a top view in a preview frame of the pathfinding mask editing tool, and cover the generated semi-transparent texture map on the game scene with the same size; the drawing module is used to set the brush size according to the size of the semi-transparent texture map, and draw the pathfinding mask on the semi-transparent texture map; the pathfinding mask generating module is used to generate the corresponding pathfinding mask unit in the game scene according to the semi-transparent texture map after the pathfinding mask is drawn; and the baking module is used to set all pathfinding mask units as non-pathfinding obstacles, and bake the pathfinding grid of the game scene.

[0049] In the covering module of the scene pathfinding mask editing and generating system, the method for displaying the game scene using a top view in a preview frame of the pathfinding mask editing tool is: loading the game scene resource, creating an orthogonal camera, and setting the display area of the camera as the area of the game scene resource in the engine, and displaying the effect in the preview frame of the tool.

[0050] In the covering module of the scene pathfinding mask editing and generating system, the method for covering the generated semi-transparent texture map on the game scene with the same size is: compressing the size of the semi-transparent texture map to the size of the game scene, and displaying the generated semi-transparent texture map on the top view camera effect of the scene, and the size of the semi-transparent texture map in the preview frame of the tool corresponds to the size of the game scene.

[0051] The scene pathfinding mask editing and generating system, the drawing code module is further specific to: after selecting the pen touch type and size, the pathfinding mask is drawn to the semi-transparent texture map, the place where the pen touch brush is pressed is made into 0 according to the specified radius size of the transparency of the pixel corresponding to the semi-transparent texture map.

[0052] The scene pathfinding mask editing and generating system, the pathfinding mask generating module is further specific to: the pathfinding mask unit of the game scene in the engine is generated according to the pixel of the semi-transparent texture map after the pathfinding mask is drawn, according to the precision multiple n, the size of the semi-transparent texture map of the pathfinding mask is n times of the size of the game scene in the engine, the size of each pixel of the semi-transparent texture map of the pathfinding mask corresponding to the scene in the engine is (1 / n)*(1 / n); in the game scene, the place where the pixel of the semi-transparent texture map is 0 does not generate the pathfinding mask unit, and the place where the pixel of the semi-transparent texture map is not 0 generates the pathfinding mask unit at the corresponding position.

[0053] The above only describes the preferred embodiments of the present application, and any equivalent changes and modifications made according to the scope of the patent application of the present application shall be included in the scope of the present application.

Claims

1. A method for scene navigation mask editing and generation, characterized in that, The method comprises the following steps: Step S1: according to the size of the game scene in the engine, according to the required accuracy requirement, generate a translucent texture map of the size of the scene multiplied by the accuracy multiple n; Step S2: display the scene using the top view angle in the preview box of the pathfinding mask editing tool, and cover the generated translucent texture map on the game scene with the same size; Step S3: set the brush size according to the size of the translucent texture map, and draw the pathfinding mask on the translucent texture map; Step S4: generate the corresponding pathfinding mask unit in the game scene according to the translucent texture map after drawing the pathfinding mask; Step S5: set all the pathfinding mask units as non-pathfinding obstacles, and bake the pathfinding grid of the game scene.

2. The method of claim 1, wherein, In step S2, the method for displaying the game scene using the top view angle in the preview box of the pathfinding mask editing tool is: loading the game scene resource, and creating an orthogonal camera, the display area of the camera is the area of the game scene resource in the engine, and the effect is displayed in the preview box of the tool.

3. The method of claim 1, wherein, In step S2, the method for covering the generated translucent texture map on the game scene with the same size is: compressing the size of the translucent texture map to the size of the game scene, and displaying the generated translucent texture map on the top view camera effect of the scene, the size of the translucent texture map in the preview box of the tool is corresponding to the size of the game scene.

4. The method of claim 1, wherein, Step S3 is further specific: after selecting the brush type and size, draw the pathfinding mask on the translucent texture map, and the places brushed by the brush change the transparency of the corresponding pixels of the translucent texture map to 0 with the specified radius size.

5. The method of claim 1, wherein, Step S4 is further specific: generate the pathfinding mask unit of the game scene in the engine according to the pixels of the translucent texture map after drawing the pathfinding mask, according to the accuracy multiple n, the size of the translucent texture map after drawing the pathfinding mask is n times the size of the game scene in the engine, the size of each pixel of the translucent texture map of the pathfinding mask in the engine is: (1 / n)*(1 / n); in the game scene, no pathfinding mask unit is generated in the place where the pixel of the translucent texture map is 0, and a pathfinding mask unit is generated in the corresponding position where the pixel of the translucent texture map is not 0.

6. A scene routing mask editing and generation system characterized by: The system comprises: a map generation module, a covering module, a drawing module, a pathfinding mask generation module, and a baking module; The map generation module is used to generate a translucent texture map of the size of the scene multiplied by the accuracy multiple n according to the size of the game scene in the engine and according to the required accuracy requirement; The covering module is used to display the scene using the top view angle in the preview box of the pathfinding mask editing tool, and cover the generated translucent texture map on the game scene with the same size; The drawing module is used to set the brush size according to the size of the translucent texture map, and draw the pathfinding mask on the translucent texture map; The pathfinding mask generation module is used to generate the corresponding pathfinding mask unit in the game scene according to the translucent texture map after drawing the pathfinding mask; The baking module is used to set all the pathfinding mask units as non-pathfinding obstacles, and bake the pathfinding grid of the game scene. The baking module is used to set all the pathfinding mask units as unpathable obstacles, and bake the pathfinding grid of the game scene.

7. The scene routing mask editing and generating system according to claim 6, wherein, In the covering module, the method for displaying the game scene from the top view in the preview frame of the pathfinding mask editing tool is: loading the game scene resource, and creating an orthogonal camera, the display area of the camera is the area of the game scene resource in the engine, and the effect is displayed in the preview frame of the tool.

8. The scene routing mask editing and generating system according to claim 6, wherein, In the covering module, the method for covering the generated semi-transparent texture map on the game scene with the same size is: compressing the size of the semi-transparent texture map to the size of the game scene, and displaying the generated semi-transparent texture map on the top view camera effect of the scene, the size of the semi-transparent texture map in the preview frame of the tool is corresponding to the size of the game scene.

9. The scene routing mask editing and generating system according to claim 6, wherein, The drawing code module is further specific: after selecting the pen type and size, the pathfinding mask of the semi-transparent texture map is drawn, and the transparency of the corresponding pixels of the semi-transparent texture map is changed to 0 in the place brushed by the pen with the specified radius size.

10. The scene routing mask editing and generating system according to claim 6, wherein, The pathfinding mask generation module is further specific: generating the pathfinding mask units of the game scene in the engine according to the pixels of the semi-transparent texture map after drawing the pathfinding mask, according to the precision multiple n, the size of the semi-transparent texture map for drawing the pathfinding mask is n times the size of the game scene in the engine, the size of each pixel of the semi-transparent texture map for drawing the pathfinding mask is (1 / n)*(1 / n) in the engine, and no pathfinding mask unit is generated in the place where the pixel of the semi-transparent texture map is 0 in the game scene, and the pathfinding mask unit is generated in the corresponding position where the pixel of the semi-transparent texture map is not 0.

Citation Information

Patent Citations

  • Baking rendering method and apparatus, terminal device, and storage medium

    CN107909641A

  • Method and device for manufacturing visual track plug-in

    CN111522544A