Game scene processing method and device, electronic equipment and storage medium

CN117599421BActive Publication Date: 2026-09-29NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311813821.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-26
Publication Date
2026-09-29
Estimated Expiration
2043-12-26

AI Technical Summary

Technical Problem

[0003]本发明实施例是提供一种游戏场景的处理方法、装置、电子设备以及计算机可读存储介质,以解决或部分解决游戏赛道场景的处理过程中存在效率低下、门槛高以及成本高的问题

Benefits of technology

[0019]在本发明实施例中,在对游戏赛道场景进行处理的过程中,可以通过获取游戏赛道对象对应的赛道参数,接着根据赛道参数进行地形构建,获得游戏赛道对象对应的基础地形,接着根据游戏赛道对象的第一顶点信息与基础地形的第二顶点信息进行对象组合,控制基础地形吸附至游戏赛道对象,实现了游戏赛道对象与基础地形之间的融合后,可以进一步在基础地形上添加相应的地形对象,丰富游戏场景的内容,通过响应于基础地形的地形对象添加指令,在基础地形上添加与地形对象添加指令对应的目标地形对象,获得与游戏赛道对象对应的游戏赛道场景,从而在游戏赛道场景的过程中,一方面通过赛道参数生成基础地形,保证了游戏赛道对象与地形之间的适配性,同时通过顶点信息将游戏赛道对象与地形进行融合,进一步地提高了两者之间的适配性,以及通过在地形上添加地形对象,丰富游戏场景内容,提高游戏场景的真实性,保证玩家的游戏体验,另一方面基于自动化地地形构建、赛道与地形之间的吸附,以及添加地形对象,有效地降低了游戏赛道场景的构建门槛,提高了处理效率并降低了成本。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117599421B_ABST
    Figure CN117599421B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a game scene processing method and device, electronic equipment and storage medium, and relate to the technical field of games, the method comprising: acquiring a track parameter corresponding to a game track object; performing terrain construction according to the track parameter to obtain a basic terrain corresponding to the game track object; combining an object according to first vertex information of the game track object and second vertex information of the basic terrain to control the basic terrain to be adsorbed to the game track object; and in response to a terrain object adding instruction of the basic terrain, adding a target terrain object corresponding to the terrain object adding instruction on the basic terrain to obtain a game track scene corresponding to the game track object, thereby ensuring the authenticity of the game scene, improving the game experience of the player, and reducing the difficulty of scene construction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of game technology, and in particular to a method for processing game scenes, a device for processing game scenes, an electronic device, and a computer-readable storage medium. Background Technology

[0002] For racing games, the design of game tracks and the control of virtual vehicles are often core components. A well-designed game track can provide players with a smoother gameplay experience. For example, in addition to designing the track itself, the corresponding environment can be designed. Straight tracks, winding tracks, etc., can provide players with different gameplay experiences, while different environments can offer diverse game scenarios, enhancing realism and the player's visual experience. However, for game designers, the process of creating game tracks involves design, production, testing, modification, and iteration. This cumbersome process significantly reduces the efficiency of track creation, raises the processing threshold, and also increases communication costs between different staff members. Summary of the Invention

[0003] The present invention provides a method, apparatus, electronic device, and computer-readable storage medium for processing game scenes, in order to solve or partially solve the problems of low efficiency, high threshold, and high cost in the processing of game track scenes.

[0004] This invention discloses a method for processing game scenes, including:

[0005] Get the track parameters corresponding to the game track object;

[0006] Based on the track parameters, terrain is constructed to obtain the basic terrain corresponding to the game track object;

[0007] Based on the first vertex information of the game track object and the second vertex information of the basic terrain, the objects are combined, and the basic terrain is controlled to be attached to the game track object.

[0008] In response to the terrain object addition command of the basic terrain, a target terrain object corresponding to the terrain object addition command is added to the basic terrain to obtain a game track scene corresponding to the game track object.

[0009] This invention also discloses a game scene processing device, comprising:

[0010] The track parameter acquisition module is used to obtain the track parameters corresponding to the game track object;

[0011] The terrain construction module is used to construct the terrain based on the track parameters to obtain the basic terrain corresponding to the game track object.

[0012] The terrain snapping module is used to combine objects based on the first vertex information of the game track object and the second vertex information of the basic terrain, and control the basic terrain to snap to the game track object.

[0013] The scene construction module is used to respond to the terrain object addition command of the basic terrain, add the target terrain object corresponding to the terrain object addition command on the basic terrain, and obtain the game track scene corresponding to the game track object.

[0014] This invention also discloses an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0015] The memory is used to store computer programs;

[0016] When the processor executes a program stored in the memory, it implements the method described in the embodiments of the present invention.

[0017] This invention also discloses a computer-readable storage medium storing instructions that, when executed by one or more processors, cause the processors to perform the methods described in this invention.

[0018] The embodiments of the present invention have the following advantages:

[0019] In this embodiment of the invention, during the processing of the game track scene, the track parameters corresponding to the game track object can be obtained. Then, terrain is constructed based on the track parameters to obtain the basic terrain corresponding to the game track object. Next, the first vertex information of the game track object and the second vertex information of the basic terrain are combined to control the basic terrain to be attached to the game track object. After the fusion between the game track object and the basic terrain is achieved, corresponding terrain objects can be added to the basic terrain to enrich the content of the game scene. By responding to the terrain object addition command of the basic terrain, the target terrain object corresponding to the terrain object addition command is added to the basic terrain to obtain the game track scene corresponding to the game track object. Thus, in the process of game track scene processing, on the one hand, the basic terrain is generated through track parameters, ensuring the compatibility between the game track object and the terrain. At the same time, the game track object and the terrain are merged through vertex information, further improving the compatibility between the two. Furthermore, by adding terrain objects to the terrain, the content of the game scene is enriched, the realism of the game scene is improved, and the player's game experience is guaranteed. On the other hand, based on the automated terrain construction, the attachment between the track and the terrain, and the addition of terrain objects, the construction threshold of the game track scene is effectively reduced, the processing efficiency is improved, and the cost is reduced. Attached Figure Description

[0020] Figure 1 This is a flowchart of the steps of a game scene processing method provided in an embodiment of the present invention;

[0021] Figure 2 This is a schematic diagram of the race track plane provided in an embodiment of the present invention;

[0022] Figure 3 This is a schematic diagram of a game track object provided in an embodiment of the present invention;

[0023] Figure 4 This is a schematic diagram of terrain collision provided in an embodiment of the present invention;

[0024] Figure 5 This is a schematic diagram of the height curve provided in an embodiment of the present invention;

[0025] Figure 6 This is a schematic diagram of the basic terrain provided in the embodiments of the present invention;

[0026] Figure 7 This is a schematic diagram of the interactive interface of the plugin provided in this embodiment of the invention;

[0027] Figure 8 This is a structural block diagram of a game scene processing device provided in an embodiment of the present invention;

[0028] Figure 9This is a block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0029] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0030] As an example, in the process of designing game track scenes, for game planners, the process of handling game track scenes includes design, production, testing, modification and iteration. The cumbersome process greatly reduces the efficiency of generating game track scenes, increases the processing threshold, and also easily increases the communication costs between different staff.

[0031] In this invention, during the processing of the game track scene, the track parameters corresponding to the game track object are obtained. Then, terrain is constructed based on the track parameters to obtain the basic terrain corresponding to the game track object. Next, the first vertex information of the game track object and the second vertex information of the basic terrain are combined to control the basic terrain to be attached to the game track object. After the fusion between the game track object and the basic terrain is achieved, corresponding terrain objects can be added to the basic terrain to enrich the content of the game scene. By responding to the terrain object addition command of the basic terrain, the target terrain object corresponding to the terrain object addition command is added to the basic terrain to obtain the game track scene corresponding to the game track object. Thus, in the process of game track scene creation, on the one hand, the basic terrain is generated through track parameters, ensuring the compatibility between the game track object and the terrain. At the same time, the game track object and the terrain are merged through vertex information, further improving the compatibility between the two. Furthermore, by adding terrain objects to the terrain, the content of the game scene is enriched, the realism of the game scene is improved, and the player's game experience is guaranteed. On the other hand, based on the automated terrain construction, the attachment between the track and the terrain, and the addition of terrain objects, the construction threshold of the game track scene is effectively reduced, the processing efficiency is improved, and the cost is reduced.

[0032] Reference Figure 1 The diagram illustrates a flowchart of a game scene processing method provided in an embodiment of the present invention, which may specifically include the following steps:

[0033] Step 101: Obtain the track parameters corresponding to the game track object;

[0034] A game track scene can consist of game track objects and the terrain surrounding them. Game track objects can be roads in the game, while terrain can be landforms, buildings, and landscapes that make up the game scene. Game track objects can provide players with different game operation experiences, while terrain can provide players with different game scenes, enriching the game's scene content. Different game scenes can create different driving atmospheres and different visual experiences for players.

[0035] The game track object can be pre-built content, and the track parameters can include the coordinate parameters of the game track object in the bounding box, slope, width, length, etc. The terrain can be constructed through the corresponding track parameters, and the present invention does not limit this.

[0036] Optionally, the processing of game scenes in this embodiment of the invention can be achieved by deploying corresponding plugins in the design software and inputting corresponding instructions into the plugins. The plugins used for game scene processing and the plugins used for constructing game track objects can be different or the same; this invention does not impose any restrictions on this.

[0037] Step 102: Construct terrain based on the track parameters to obtain the basic terrain corresponding to the game track object;

[0038] In its implementation, the plugin obtains the track parameters of the game track object based on the user's actions. It can then construct the terrain based on these parameters to obtain the basic terrain corresponding to the game track object. Users can then further edit the basic terrain to obtain a richer and more realistic game scene.

[0039] In some feasible implementations, a bounding box corresponding to the game track object can be constructed, and the coordinate parameters of the game track object within the bounding box can be obtained. This allows for the retrieval of expansion parameters corresponding to the terrain expansion operation on the game track object, and the construction of the terrain based on these expansion parameters and coordinate parameters to obtain the basic terrain corresponding to the game track object. The expansion parameters can be used to expand the game track object, and their size can be determined.

[0040] In the specific implementation, the coordinate parameters include x-axis coordinates, y-axis coordinates, and z-axis coordinates. The x-axis coordinates can include the x-coordinates corresponding to each vertex on the game track object, the y-axis coordinates can include the y-coordinates corresponding to each vertex on the game track object, and the z-axis coordinates can include the z-coordinates corresponding to each vertex on the game track object. Correspondingly, the extended parameters include x-axis extended parameters corresponding to the x-axis coordinates, y-axis extended parameters corresponding to the y-axis coordinates, and z-axis descent parameters corresponding to the z-axis coordinates. Then, the first terrain size can be obtained by calculating using the x-axis coordinates and x-axis extended parameters, the second terrain size can be obtained by calculating using the y-axis coordinates and y-axis extended parameters, and the terrain height can be obtained by calculating using the z-axis coordinates and z-axis descent parameters. Then, the terrain is constructed according to the first terrain size, the second terrain size, and the terrain height to obtain the basic terrain corresponding to the game track object. Thus, the basic terrain is generated through the track parameters, ensuring the adaptability between the game track object and the terrain.

[0041] It should be noted that the game track scene can be a bounded scene, and the game track object can be the track located within that scene. The dimensions of the game track scene can be represented by a first terrain dimension and a second terrain dimension. When the first terrain dimension represents the width of the game track scene, the second terrain dimension can be used to represent the length of the game track scene; conversely, the first terrain dimension can be used to represent the length of the game track scene, and the second terrain dimension can be used to represent the width, etc. Correspondingly, the terrain height can be the height of the terrain, which can be dynamically adjusted during the subsequent snapping of the game track object to the terrain. This invention does not impose any limitations on this.

[0042] In one example, assuming the game track object is a 5*3*2 area (x-axis coordinates 0-5, y-axis coordinates 0-3, z-axis coordinates 0-2), when the user inputs expansion parameters of x-axis expansion to 300, y-axis expansion to 300, and z-axis reduction to 3, the generated base terrain dimensions include: a first terrain dimension x of 300*2+5, a second terrain dimension y of 300*2+3, and a terrain height of -3. This generates the base terrain based on the track parameters, ensuring the adaptability between the game track object and the terrain. It should be noted that doubling the expansion upwards along the x and y axes, based on the game track object's own parameters, allows for full expansion in all directions (e.g., up, down, left, right), ensuring the game track object can completely fit into the base terrain.

[0043] Furthermore, after constructing the basic terrain that matches the game track object, users can further adjust the precision of the game track scene. Higher precision provides players with clearer and more accurate details and colors in the game track scene, bringing a more realistic and lifelike visual experience. Specifically, by responding to precision control operations on the basic terrain, the user can obtain the cell precision corresponding to the precision control operation and control the precision of the basic terrain using the cell precision. The cell precision can be replicated according to the units corresponding to the real-world scene. For example, cell precision can include 4 meters, 9 meters, 16 meters, 25 meters, etc. The smaller the value, the higher the precision. Correspondingly, refer to... Figure 2 The diagram illustrates a track plane provided in an embodiment of the present invention. A spatial coordinate system is constructed with the horizontal axis as the Y-axis, the vertical axis as the X-axis, and the direction perpendicular to the plane as the Z-axis. By inputting the coordinate parameters and extended parameters corresponding to the game track object, the corresponding basic terrain can be constructed, and the game track object can be displayed on the basic terrain. This allows the positional relationship between the game track object and the basic terrain to be obtained, so as to further adjust the game track object and / or the basic terrain and construct the game track scene, etc.

[0044] It should be noted that, as Figure 2 As shown, the accuracy of the basic terrain can be controlled by adjusting the cell precision to control the side length of each grid. The smaller the cell precision value, the smaller the corresponding cell area and the higher the accuracy of the basic terrain. Conversely, the higher the precision value, the lower the accuracy. This invention does not impose any limitations on this.

[0045] Step 103: Combine the game track object with the base terrain based on the first vertex information of the game track object and the second vertex information of the base terrain, and control the base terrain to attach to the game track object;

[0046] To increase the diversity of game controls, in addition to incorporating a variety of curves and straightaways, slopes can be added to game track objects during design, enhancing their richness. Based on this, to ensure the fit between the terrain and the game track objects, the terrain can be controlled to snap to the track objects, guaranteeing their compatibility.

[0047] In some feasible implementations, the information of the first vertices on the game track object and the information of the second vertices on the base terrain can be obtained. Then, a vertex collision analysis is performed between the first vertices and the second vertices to select the first target vertex that intersects with the base terrain, and the second target vertex that intersects with the game track object. The second target vertex is then controlled to snap to the first target vertex, thereby merging the game track object and the terrain using vertex information, further improving their compatibility. The vertex information can include coordinate-related information such as vertex number, x-coordinate, y-coordinate, and z-coordinate.

[0048] In the specific implementation, each first vertex can be taken as the origin, and rays can be emitted vertically upward to collide with the first vertex. The first vertex that collided is taken as the first target vertex, and the second vertex that collided is taken as the second target vertex. Then, for the same set of first and second target vertices that collided, the vertex coordinates of the second target vertex were replaced with the vertex coordinates of the first target vertex, so as to achieve the adsorption between the basic terrain and the game track object.

[0049] In one example, when obtaining track parameters for a game track object, the plugin can collect track information related to the game track object. After constructing the basic terrain, it collects the terrain information of the basic terrain. Specifically, the plugin can use the `collectAllRoad()` function to collect the first vertex information corresponding to all first vertices on the game track object and store it in the `roadArrayAll` array. Simultaneously, it can use the `getAllVerGround()` function to collect the second vertex information corresponding to all second vertices on the basic terrain and store it in the `verPosArrayAll` array. Based on the first vertex information of the game track object and the second vertex information of the basic terrain, the plugin can create a collision box using the `creatColliderBox()` function. It creates a box for ray collision for each second vertex on the basic terrain to achieve adhesion between the game track object and the object. For the adhesion process, the plugin can iterate through each second vertex and construct a ray for each second vertex. Then, it fires a ray upwards at an angle of (0, 1, 0) and collides it with the first vertex on the game track object. When the ray encounters the game track object, it returns the coordinates of the collision point (i.e., the coordinates of the first vertex that collided). Then, it replaces the vertex coordinates of the corresponding second vertex with the coordinates of the corresponding first vertex, thus achieving adhesion between the game track object and the basic terrain.

[0050] Optionally, for the first target vertex on the game track object that collides with the basic terrain, the GetAllRoadDownGround() function can be used to collect the vertex information corresponding to the first target vertex and store it in the allRoadDownGround array. Correspondingly, other vertices in the second vertex, excluding the second target vertex, can also be added to the corresponding first vertex array, and the vertices in the first vertex array can be given the corresponding vertex colors. By adding the corresponding vertex colors, the areas in the basic terrain affected by the game track object can be marked, so that users can quickly and intuitively understand the construction of the terrain and take appropriate processing strategies.

[0051] In another feasible implementation, the center point on the center line and the edge point on the edge line of the game track object can be obtained. Then, the first coordinate of the center point and the second coordinate of the edge point are used to calculate the direction to obtain the target direction of the edge line relative to the center line. Then, with the center point as the origin, a ray is emitted along the target direction to collide with the basic terrain. The second vertex that collides is taken as the third target vertex, and the collision distance between the third target vertex and the corresponding center point is obtained. Then, the third target vertex with a collision distance greater than or equal to a preset threshold is added to the corresponding second vertex array, and the corresponding vertex color is added to the vertices in the second vertex array.

[0052] Among them, reference Figure 3 This diagram illustrates a game track object provided in an embodiment of the present invention. The game track object can be divided according to corresponding coordinate intervals. Based on the divided game track object, the center point on the center line and the first and second edge points on the two side edge lines can be obtained. Assuming the center point in the same region is point A, the first edge point is the left edge point point B, and the second edge point is the right edge point point C, the coordinates of point A (x0, y0, z0), point B (x1, y1, z1), and point C (x2, y2, z2) can be obtained respectively. Then, using the coordinates of the center point and the edge points in the same region, two vectors are calculated, including... The corresponding vector can be used to determine the pointing direction, such as pointing to the left side of the game track object, pointing to the right side of the game track object, etc. (Refer to...) Figure 4This diagram illustrates the terrain collision mechanism provided in this embodiment of the invention. Once the corresponding pointing direction is determined, a ray can be emitted from the center point as the origin. The ray then collides with the second vertex of the basic terrain, and the second vertex that collides with it is taken as the third target vertex. Assuming that the distance between the center line and the edge line of the game track object is a preset threshold, the third target vertices whose collision distance is greater than or equal to the preset threshold can be added to a preset second vertex array. A corresponding vertex color is added to each vertex in the second vertex array. By adding the corresponding vertex color, the area of ​​the basic terrain affected by the game track object can be marked, so that the user can quickly and intuitively understand the terrain construction and take appropriate processing strategies.

[0053] In this embodiment of the invention, vertices in the basic terrain affected by the game track object can be added to the corresponding vertex arrays by using ray collision. Thus, when a user wants to view the terrain that is not attached to the game track object, the plugin can display the game track object and the vertices in the first vertex array and / or the second vertex array by responding to the vertex color display command for the game track scene. Vertices in the game track object that are attached to the basic terrain can also be represented by vertex color display. By marking the vertices by vertex color, users can quickly and intuitively understand the construction of the terrain so as to take appropriate processing strategies.

[0054] It should be noted that the first vertex array and the second vertex array can be the same vertex array or different vertex arrays, and this invention does not impose any restrictions on this.

[0055] Furthermore, after the game track object and the base terrain are snapped together, in response to terrain editing operations on the base terrain, the edge information and edge reservation range corresponding to the terrain editing operation can be obtained. Then, the target edge corresponding to the edge information is selected from the game track object, and the editing area is filtered out from the base terrain according to the edge reservation range, using the target edge as the boundary. The edge reservation range can be a reserved size. By extending the edge reservation range outward from the target edge as the boundary, the corresponding editing area can be obtained. The editing area is the area where terrain editing of the base terrain is performed.

[0056] In the specific implementation, edge information can represent whether to retain uneditable areas on both sides of the game track object. Users can input corresponding operations in the plugin to control whether to retain uneditable areas on the basic terrain on both sides of the game track object. Specifically, the plugin can respond to the edge selection command for the basic terrain, obtain the edge information corresponding to the edge selection command, which represents whether to retain uneditable areas on both sides of the game track object, and respond to the range control command for the edge information to obtain the edge reserved range corresponding to the uneditable area.

[0057] The edge information includes unilateral and bilateral information. Unilateral information includes left and right information. If the edge information is bilateral, both the left and right edges of the game track object are taken as the target edge. If the edge information is left, the left edge of the game track object is taken as the target edge. If the edge information is right, the right edge of the game track object is taken as the target edge.

[0058] For example, in the plugin, terrain editing for basic terrain can offer different parameter selections, including "left," "right," and "left and right edges" for edge selection, and different distance options for edge reserve range selection, including 5 meters, 10 meters, 15 meters, and 20 meters. Optionally, the edge reserve range can also be adjusted using sliding controls to edit according to actual needs; this invention does not limit this.

[0059] It should be noted that edge reservation is performed on the basic terrain to reserve a certain distance on one or both sides of the game track object so that it is not included in the terrain calculation. This avoids the situation where the model clips through when the accuracy of the basic terrain is insufficient, thereby ensuring the quality of the game track scene.

[0060] Step 104: In response to the terrain object addition command of the basic terrain, add a target terrain object corresponding to the terrain object addition command on the basic terrain to obtain the game track scene corresponding to the game track object.

[0061] To enrich the content of the game scene, different terrain objects can be added to the basic terrain. By coordinating different terrain objects, different scenes can be created for the player. Specifically, by responding to the terrain object addition command of the basic terrain, a target terrain object corresponding to the terrain object addition command can be added to the basic terrain to obtain a game track scene corresponding to the game track object. In this way, by adding terrain objects to the terrain, the content of the game scene is enriched, the realism of the game scene is improved, and the player's gaming experience is guaranteed. In addition, based on the automated terrain construction, the adhesion between the track and the terrain, and the addition of terrain objects, the construction threshold of the game track scene is effectively reduced, the processing efficiency is improved, and the cost is reduced.

[0062] In some feasible implementations, the plugin can respond to a terrain object addition command for the basic terrain, determine the target terrain object corresponding to the terrain object addition command, and after adding the corresponding target terrain object, the user can further edit the target terrain object. The plugin can then respond to an object editing command for the target terrain object, obtain the object adjustment parameters corresponding to the object editing command, and add the target terrain object to the basic terrain according to the object adjustment parameters, thus obtaining a game track scene corresponding to the game track object. The target terrain object includes at least one of the following: river object, lake object, tunnel object, building object, and vegetation object.

[0063] Specifically, when the target terrain object is a river, users can adjust the river length and depth using the object adjustment parameters; when the target terrain object is a lake, users can adjust the lake radius and depth using the object adjustment parameters; when the target terrain object is a tunnel, users can adjust the tunnel height using the object adjustment parameters; and when the target terrain object is a building or vegetation object, users can adjust the position of the building or vegetation object using the object adjustment parameters, including to the left, right, and left / right sides of the game track object, as well as adjust the coverage, height, size, and density of the building or vegetation object. By adding terrain objects to the terrain, users enrich the game scene content, enhance the realism of the game scene, and ensure a better gaming experience for players.

[0064] In addition to adding terrain objects to the basic terrain, the height of the basic terrain can also be adjusted. The basic terrain can be divided according to coordinates, using the edge of the game track object (or the boundary between the reserved non-editable area and the editable area) as the boundary, to obtain corresponding height control points. These height control points are then displayed according to coordinates, resulting in a height curve. Users can adjust the height of corresponding positions on the basic terrain by adjusting the height control points on the height curve. In some feasible implementations, the plugin can respond to height adjustment commands for the basic terrain, displaying the corresponding height curve. The height curve includes height control points corresponding to the coordinates of the basic terrain. Then, in response to adjustment commands for any height control point, it obtains the target height corresponding to the adjustment command and adjusts the corresponding position in the basic terrain to the target height. This height adjustment of corresponding positions in the basic terrain makes the terrain more realistic and enhances the richness of the game track scene.

[0065] In one example, refer to Figure 5 This diagram illustrates a height curve provided in an embodiment of the invention. For the height curve, the horizontal axis represents the distance to the edge of the game track object (or the boundary between the reserved non-editable area and the editable area). A larger value indicates a greater distance from the edge, and a smaller value indicates a closer distance. The vertical axis represents the height, with a value greater than 0 indicating above the horizontal plane and a value less than 0 indicating below the horizontal plane. Users can adjust the height of corresponding positions in the basic terrain by adjusting the values ​​of the height control points on the height curve. This height adjustment makes the basic terrain more realistic and enhances the richness of the game track scene. Accordingly, referring to... Figure 6 This diagram illustrates the basic terrain provided in an embodiment of the invention. Based on the aforementioned process of adjusting the height of the basic terrain, the height change of the basic terrain can be as follows: Figure 6 As shown. It should be noted that the numerical values, illustrations, etc., shown in the embodiments of the present invention do not constitute any limitation on the embodiments of the present invention, but are merely illustrative examples.

[0066] In this embodiment of the invention, during the processing of the game track scene, the track parameters corresponding to the game track object can be obtained. Then, terrain is constructed based on the track parameters to obtain the basic terrain corresponding to the game track object. Next, the first vertex information of the game track object and the second vertex information of the basic terrain are combined to control the basic terrain to be attached to the game track object. After the fusion between the game track object and the basic terrain is achieved, corresponding terrain objects can be added to the basic terrain to enrich the content of the game scene. By responding to the terrain object addition command of the basic terrain, the target terrain object corresponding to the terrain object addition command is added to the basic terrain to obtain the game track scene corresponding to the game track object. Thus, in the process of game track scene processing, on the one hand, the basic terrain is generated through track parameters, ensuring the compatibility between the game track object and the terrain. At the same time, the game track object and the terrain are merged through vertex information, further improving the compatibility between the two. Furthermore, by adding terrain objects to the terrain, the content of the game scene is enriched, the realism of the game scene is improved, and the player's game experience is guaranteed. On the other hand, based on the automated terrain construction, the attachment between the track and the terrain, and the addition of terrain objects, the construction threshold of the game track scene is effectively reduced, the processing efficiency is improved, and the cost is reduced.

[0067] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, an example is provided below for illustration:

[0068] Reference Figure 7 The diagram illustrates the interactive interface of the plugin provided in this embodiment of the invention. The plugin for constructing game track scenes may include controls for performing different functions, such as a plane generation control 710, a plane deletion control 720, an extended parameter input control 730, a precision adjustment control 740, an information collection control 750, a terrain editing control 760, a river / lake editing control 770, a tunnel editing control 780, a building / vegetation editing control 790, a normal display control 7110, and a vertex color display control 7120, etc.

[0069] In the specific implementation, the user can first obtain the track parameters (including coordinates, vertex information, etc.) corresponding to the game track object through the information collection control 750. Then, the user can input the corresponding extended parameters (such as x: 300; y: 300; z: 3, etc.) in the extended parameter input control 730, and select the corresponding precision in the precision adjustment control 740. Then, the user can construct the basic terrain corresponding to the game track object through the plane generation control 710. If the generated basic terrain does not meet the conditions, the user can delete the already constructed basic terrain through the plane deletion control 720 and re-enter the corresponding parameters to reconstruct the basic terrain.

[0070] Once the basic terrain is constructed, it can be edited using the terrain editing control 760. This includes selecting reserved edges on the game track object and the distance of the reserved edges. Additionally, corresponding terrain objects can be added to the basic terrain using the river / lake editing control 770, tunnel editing control 780, and building / vegetation editing control 790 to enrich the content of the game scene.

[0071] Furthermore, users can input corresponding height adjustment commands into the plugin, which will then display the corresponding height curve in the interactive interface, allowing users to adjust the height of the basic terrain based on the height control points on the height curve.

[0072] Furthermore, the vertex color display control 7120 can display areas in the basic terrain that are not snapped to the game track object, for example, by displaying them in red. This vertex color display allows users to intuitively and quickly understand the corresponding areas, facilitating appropriate decision-making. Conversely, normal display controls can be displayed using normal colors.

[0073] Through the above process, in the game track scene, on the one hand, the basic terrain is generated through track parameters, ensuring the compatibility between the game track object and the terrain. At the same time, the game track object and the terrain are merged through vertex information, further improving the compatibility between the two. Furthermore, by adding terrain objects to the terrain, the game scene content is enriched, the realism of the game scene is improved, and the player's gaming experience is guaranteed. On the other hand, based on the automated terrain construction, the adhesion between the track and the terrain, and the addition of terrain objects, the construction threshold of the game track scene is effectively reduced, the processing efficiency is improved, and the cost is reduced.

[0074] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0075] Reference Figure 8 The diagram illustrates a structural block diagram of a game scene processing device provided in an embodiment of the present invention, which may specifically include the following modules:

[0076] The track parameter acquisition module 801 is used to acquire the track parameters corresponding to the game track object;

[0077] The terrain construction module 802 is used to construct the terrain according to the track parameters to obtain the basic terrain corresponding to the game track object.

[0078] The terrain snapping module 803 is used to combine objects based on the first vertex information of the game track object and the second vertex information of the basic terrain, and control the basic terrain to snap to the game track object.

[0079] The scene construction module 804 is used to respond to the terrain object addition instruction of the basic terrain, add a target terrain object corresponding to the terrain object addition instruction on the basic terrain, and obtain a game track scene corresponding to the game track object.

[0080] In some feasible implementations, the track parameters include the coordinate parameters of the game track object within the bounding box, and the terrain construction module 802 is specifically used for:

[0081] In response to the terrain expansion operation for the game track object, the expansion parameters corresponding to the terrain expansion operation are obtained, and the terrain is constructed according to the expansion parameters and the coordinate parameters to obtain the basic terrain corresponding to the game track object.

[0082] In some feasible implementations, the coordinate parameters include x-axis coordinates, y-axis coordinates, and z-axis coordinates, and the extended parameters include x-axis extended parameters corresponding to the x-axis coordinates, y-axis extended parameters corresponding to the y-axis coordinates, and z-axis descent parameters corresponding to the z-axis coordinates. The terrain construction module 802 is specifically used for:

[0083] The first terrain dimension is obtained by calculating using the x-axis coordinates and the x-axis extended parameters;

[0084] The second terrain dimension is obtained by calculating using the y-axis coordinates and the y-axis extended parameters;

[0085] The terrain height is obtained by calculating using the z-axis coordinates and the z-axis descent parameters;

[0086] The terrain is constructed according to the first terrain size, the second terrain size, and the terrain height to obtain the basic terrain corresponding to the game track object.

[0087] In some feasible implementations, the apparatus further includes:

[0088] A precision control module is used to respond to a precision control operation for the basic terrain, obtain the cell precision corresponding to the precision control operation, and control the precision of the basic terrain with the cell precision.

[0089] In some feasible implementations, the terrain adsorption module 803 is specifically used for:

[0090] Obtain the first vertex information corresponding to each first vertex on the game track object;

[0091] Obtain the second vertex information corresponding to each second vertex on the basic terrain;

[0092] Perform vertex collision between the first vertex information of the first vertex and the second vertex information of the second vertex, filter out the first target vertex that intersects with the basic terrain from the first vertex, and filter out the second target vertex that intersects with the game track object from the second vertex;

[0093] Control the second target vertex to attract the first target vertex.

[0094] In some feasible implementations, the terrain adsorption module 803 is specifically used for:

[0095] With each of the second vertices as the origin, rays are emitted vertically upwards and collide with the first vertex.

[0096] The first vertex that collides is designated as the first target vertex, and the second vertex that collides is designated as the second target vertex.

[0097] In some feasible implementations, the terrain adsorption module 803 is specifically used for:

[0098] For the same set of first and second target vertices that collide, replace the vertex coordinates of the second target vertex with the vertex coordinates of the first target vertex.

[0099] In some feasible implementations, the apparatus further includes:

[0100] The vertex color addition module is used to add the vertices other than the second target vertex in the second vertex array to the corresponding first vertex array, and add the corresponding vertex color to the vertices in the first vertex array.

[0101] In some feasible implementations, the apparatus further includes:

[0102] The location point acquisition module is used to acquire the center point on the center line and the edge point on the edge line of the game track object;

[0103] The direction calculation module is used to perform direction calculation using the first coordinates of the center point and the second coordinates of the edge point to obtain the target direction of the edge line relative to the center line.

[0104] The ray collision module is used to emit rays along the target direction with the center point as the origin to collide with the basic terrain.

[0105] The distance acquisition module is used to take the second vertex that collided as the third target vertex and acquire the collision distance between the third target vertex and the corresponding center point;

[0106] The vertex processing module is used to add third target vertices whose collision distance is greater than or equal to a preset threshold to the corresponding second vertex array, and to add the corresponding vertex color to the vertices in the second vertex array.

[0107] In some feasible implementations, the apparatus further includes:

[0108] The display module is configured to, in response to a vertex color display instruction for the game track scene, display the game track object and display the vertices in the first vertex array and / or the second vertex array with the vertex color.

[0109] In some feasible implementations, the apparatus further includes:

[0110] The terrain editing module is used to respond to terrain editing operations on the basic terrain and obtain edge information and edge reserved range corresponding to the terrain editing operation;

[0111] The region determination module is used to select a target edge corresponding to the edge information from the game track object, and to filter out the editing area from the basic terrain according to the edge reserved range, using the target edge as the boundary.

[0112] The editing area is the area where the basic terrain is edited.

[0113] In some feasible implementations, the terrain editing module is specifically used for:

[0114] In response to an edge selection command for the basic terrain, edge information corresponding to the edge selection command is obtained, wherein the edge information is information representing whether to retain uneditable areas on both sides of the game track object;

[0115] In response to the range control command for the edge information, the edge reserved range corresponding to the non-editable region is obtained.

[0116] In some feasible implementations, the edge information includes unilateral information and bilateral information, the unilateral information includes left-side information and right-side information, and the region determination module is specifically used for:

[0117] If the edge information is bilateral information, then both the left and right edges of the game track object are taken as target edges;

[0118] If the edge information is left-side information, then the left edge of the game track object is taken as the target edge;

[0119] If the edge information is right-side information, then the right edge of the game track object is taken as the target edge.

[0120] In some feasible implementations, the scene construction module 804 is specifically used for:

[0121] In response to a terrain object addition instruction for the basic terrain, a target terrain object corresponding to the terrain object addition instruction is determined;

[0122] In response to an object editing command for the target terrain object, the system obtains object adjustment parameters corresponding to the object editing command, and adds the target terrain object to the base terrain according to the object adjustment parameters to obtain a game track scene corresponding to the game track object.

[0123] In some feasible implementations, the target terrain object includes at least one of the following: river object, lake object, tunnel object, building object, and vegetation object.

[0124] In some feasible implementations, the apparatus further includes:

[0125] A curve display module is used to display a height curve corresponding to the basic terrain in response to a height adjustment command for the basic terrain. The height curve includes height control points corresponding to the coordinates of the basic terrain.

[0126] The height adjustment module is used to respond to an adjustment command for any of the height control points, obtain the target height corresponding to the adjustment command, and adjust the corresponding position in the basic terrain to the target height.

[0127] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0128] In addition, this invention also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described game scene processing method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0129] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described game scene processing method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0130] Figure 9 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.

[0131] The electronic device 900 includes, but is not limited to, components such as: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, a processor 910, and a power supply 911. Those skilled in the art will understand that the electronic device structure involved in the embodiments of the present invention does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. In the embodiments of the present invention, the electronic device includes, but is not limited to, mobile phones, tablet computers, laptop computers, PDAs, in-vehicle terminals, wearable devices, and pedometers.

[0132] It should be understood that, in this embodiment of the invention, the radio frequency unit 901 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink data from the base station and processes it with the processor 910; additionally, it transmits uplink data to the base station. Typically, the radio frequency unit 901 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, etc. Furthermore, the radio frequency unit 901 can also communicate with networks and other devices through a wireless communication system.

[0133] Electronic devices provide users with wireless broadband internet access through network module 902, such as helping users send and receive emails, browse web pages, and access streaming media.

[0134] The audio output unit 903 can convert audio data received by the radio frequency unit 901 or the network module 902 or stored in the memory 909 into audio signals and output them as sound. Furthermore, the audio output unit 903 can also provide audio output related to specific functions performed by the electronic device 900 (e.g., call signal reception sound, message reception sound, etc.). The audio output unit 903 includes a speaker, a buzzer, and a receiver, etc.

[0135] Input unit 904 is used to receive audio or video signals. Input unit 904 may include a graphics processing unit (GPU) 9041 and a microphone 9042. The GPU 9041 processes image data of still images or videos acquired by an image capture device (such as a camera) in video capture mode or image capture mode. The processed image frames can be displayed on display unit 906. The image frames processed by GPU 9041 can be stored in memory 909 (or other storage medium) or transmitted via radio frequency unit 901 or network module 902. Microphone 9042 can receive sound and process such sound into audio data. The processed audio data can be converted into a format that can be transmitted to a mobile communication base station via radio frequency unit 901 in telephone call mode.

[0136] The electronic device 900 also includes at least one sensor 905, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 9061 according to the ambient light level, and the proximity sensor can turn off the display panel 9061 and / or backlight when the electronic device 900 is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used to identify the posture of the electronic device (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc. The sensor 905 may also include a fingerprint sensor, pressure sensor, iris sensor, molecular sensor, gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc., which will not be described in detail here.

[0137] The display unit 906 is used to display information input by the user or information provided to the user. The display unit 906 may include a display panel 9061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0138] User input unit 907 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of electronic devices. Specifically, user input unit 907 includes a touch panel 9071 and other input devices 9072. Touch panel 9071, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near touch panel 9071). Touch panel 9071 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to processor 910, which receives and executes commands from processor 910. In addition, touch panel 9071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. Besides touch panel 9071, user input unit 907 may also include other input devices 9072. Specifically, other input devices 9072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, joysticks, etc., which will not be described in detail here.

[0139] Furthermore, the touch panel 9071 can cover the display panel 9061. When the touch panel 9071 detects a touch operation on or near it, it transmits the information to the processor 910 to determine the type of touch event. Subsequently, the processor 910 provides corresponding visual output on the display panel 9061 based on the type of touch event. It is understood that in one embodiment, the touch panel 9071 and the display panel 9061 are implemented as two independent components to realize the input and output functions of the electronic device. However, in some embodiments, the touch panel 9071 and the display panel 9061 can be integrated to realize the input and output functions of the electronic device; the specific implementation is not limited here.

[0140] Interface unit 908 serves as an interface for connecting external devices to electronic device 900. For example, external devices may include a wired or wireless headphone port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, and so on. Interface unit 908 can be used to receive input from external devices (e.g., data, power, etc.) and transmit the received input to one or more components within electronic device 900, or it can be used to transmit data between electronic device 900 and external devices.

[0141] The memory 909 can be used to store software programs and various data. The memory 909 may primarily include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory 909 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0142] The processor 910 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 909, and by calling data stored in the memory 909, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. The processor 910 may include one or more processing units; preferably, the processor 910 may integrate an application processor and a modem processor. The application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 910.

[0143] The electronic device 900 may also include a power supply 911 (such as a battery) that supplies power to various components. Preferably, the power supply 911 is logically connected to the processor 910 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system.

[0144] In addition, the electronic device 900 includes some functional modules not shown, which will not be described in detail here.

[0145] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0146] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0147] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.

[0148] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0149] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0150] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0151] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0152] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0153] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0154] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for processing game scenes, characterized in that, include: Get the track parameters corresponding to the game track object; Based on the track parameters, terrain is constructed to obtain the basic terrain corresponding to the game track object; Based on the first vertex information of the game track object and the second vertex information of the basic terrain, the objects are combined, and the basic terrain is controlled to be attached to the game track object. In response to the terrain object addition command of the basic terrain, a target terrain object corresponding to the terrain object addition command is added to the basic terrain to obtain a game track scene corresponding to the game track object; The step of combining the game track object with the base terrain based on the first vertex information of the game track object and the second vertex information of the base terrain, and controlling the base terrain to attach to the game track object, includes: Obtain the first vertex information corresponding to each first vertex on the game track object; Obtain the second vertex information corresponding to each second vertex on the basic terrain; Using each of the second vertices as the origin, rays are emitted vertically upwards to collide with the first vertices. The first vertex that collides with the first vertex is taken as the first target vertex that intersects with the basic terrain, and the second vertex that collides with the second vertex is taken as the second target vertex that intersects with the game track object. Control the second target vertex to attract the first target vertex.

2. The method according to claim 1, characterized in that, The track parameters include the coordinate parameters of the game track object within the bounding box. The step of constructing terrain based on the track parameters to obtain the basic terrain corresponding to the game track object includes: In response to the terrain expansion operation for the game track object, the expansion parameters corresponding to the terrain expansion operation are obtained, and the terrain is constructed according to the expansion parameters and the coordinate parameters to obtain the basic terrain corresponding to the game track object.

3. The method according to claim 2, characterized in that, The coordinate parameters include x-axis coordinates, y-axis coordinates, and z-axis coordinates. The extended parameters include an x-axis extended parameter corresponding to the x-axis coordinate, a y-axis extended parameter corresponding to the y-axis coordinate, and a z-axis descent parameter corresponding to the z-axis coordinate. The step of constructing terrain based on the extended parameters and the coordinate parameters to obtain the basic terrain corresponding to the game track object includes: The first terrain dimension is obtained by calculating using the x-axis coordinates and the x-axis extended parameters; The second terrain dimension is obtained by calculating using the y-axis coordinates and the y-axis extended parameters; The terrain height is obtained by calculating using the z-axis coordinates and the z-axis descent parameters; The terrain is constructed according to the first terrain size, the second terrain size, and the terrain height to obtain the basic terrain corresponding to the game track object.

4. The method according to any one of claims 1-3, characterized in that, After constructing the terrain based on the track parameters to obtain the basic terrain corresponding to the game track object, the method further includes: In response to a precision control operation for the basic terrain, the cell precision corresponding to the precision control operation is obtained, and the precision of the basic terrain is controlled with the cell precision.

5. The method according to claim 1, characterized in that, The control of the second target vertex to attract the first target vertex includes: For the same set of first and second target vertices that collide, replace the vertex coordinates of the second target vertex with the vertex coordinates of the first target vertex.

6. The method according to claim 1, characterized in that, The method further includes: emitting rays vertically upwards from each of the second vertices as origins to collide with the first vertices, designating the first vertex that collides with the first target vertex intersecting with the basic terrain, and designating the second vertex that collides with the second target vertex intersecting with the game track object; Add the other vertices in the second vertex array, excluding the second target vertex, to the corresponding first vertex array, and add the corresponding vertex color to the vertices in the first vertex array.

7. The method according to claim 6, characterized in that, Also includes: Obtain the center point on the center line and the edge point on the edge line of the game track object; The target direction of the edge line relative to the center line is obtained by using the first coordinate of the center point and the second coordinate of the edge point to perform direction calculation. With the center point as the origin, a ray is emitted along the target direction and collides with the basic terrain. The second vertex that collided with the third target vertex was used as the third target vertex, and the collision distance between the third target vertex and the corresponding center point was obtained. Add the third target vertex whose collision distance is greater than or equal to a preset threshold to the corresponding second vertex array, and add the corresponding vertex color to the vertices in the second vertex array.

8. The method according to claim 7, characterized in that, Also includes: In response to a vertex color display instruction for the game track scene, the game track object is displayed and the vertices in the first vertex array and / or the second vertex array are displayed with the vertex color.

9. The method according to claim 1, characterized in that, After combining the game track object with the base terrain based on the first vertex information of the game track object and the second vertex information of the base terrain, and controlling the base terrain to attach to the game track object, the method further includes: In response to a terrain editing operation on the basic terrain, obtain the edge information and edge reserved range corresponding to the terrain editing operation; Select the target edge corresponding to the edge information from the game track object, and use the target edge as the boundary to filter the editing area from the basic terrain according to the edge reserved range; The editing area is the area where the basic terrain is edited.

10. The method according to claim 9, characterized in that, The step of responding to a terrain editing operation on the basic terrain by acquiring edge information and edge reservation range corresponding to the terrain editing operation includes: In response to an edge selection command for the basic terrain, edge information corresponding to the edge selection command is obtained, wherein the edge information is information representing whether to retain uneditable areas on both sides of the game track object; In response to the range control command for the edge information, the edge reserved range corresponding to the non-editable region is obtained.

11. The method according to claim 9, characterized in that, The edge information includes unilateral and bilateral information, and the unilateral information includes left-side and right-side information. Selecting the target edge corresponding to the edge information from the game track object includes: If the edge information is bilateral information, then both the left and right edges of the game track object are taken as target edges; If the edge information is left-side information, then the left edge of the game track object is taken as the target edge; If the edge information is right-side information, then the right edge of the game track object is taken as the target edge.

12. The method according to claim 1, characterized in that, The step of adding a target terrain object corresponding to the terrain object addition instruction in response to the basic terrain, thereby obtaining a game track scene corresponding to the game track object, includes: In response to a terrain object addition instruction for the basic terrain, a target terrain object corresponding to the terrain object addition instruction is determined; In response to an object editing command for the target terrain object, the system obtains object adjustment parameters corresponding to the object editing command, and adds the target terrain object to the base terrain according to the object adjustment parameters to obtain a game track scene corresponding to the game track object.

13. The method according to claim 1 or 12, characterized in that, The target terrain object includes at least one of the following: river object, lake object, tunnel object, building object, and vegetation object.

14. The method according to claim 1, characterized in that, Also includes: In response to a height adjustment command for the base terrain, a height curve corresponding to the base terrain is displayed, the height curve including height control points corresponding to the coordinates of the base terrain; In response to an adjustment command for any of the height control points, a target height corresponding to the adjustment command is obtained, and the corresponding position in the basic terrain is adjusted to the target height.

15. A device for processing game scenes, characterized in that, include: The track parameter acquisition module is used to obtain the track parameters corresponding to the game track object; The terrain construction module is used to construct the terrain based on the track parameters to obtain the basic terrain corresponding to the game track object. The terrain snapping module is used to combine objects based on the first vertex information of the game track object and the second vertex information of the basic terrain, and control the basic terrain to snap to the game track object. The scene construction module is used to respond to the terrain object addition command of the basic terrain, add the target terrain object corresponding to the terrain object addition command on the basic terrain, and obtain the game track scene corresponding to the game track object; Specifically, the terrain adsorption module is used for: Obtain the first vertex information corresponding to each first vertex on the game track object; Obtain the second vertex information corresponding to each second vertex on the basic terrain; Using each of the second vertices as the origin, rays are emitted vertically upwards to collide with the first vertices. The first vertex that collides with the first vertex is taken as the first target vertex that intersects with the basic terrain, and the second vertex that collides with the second vertex is taken as the second target vertex that intersects with the game track object. Control the second target vertex to attract the first target vertex.

16. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; The memory is used to store computer programs; When the processor executes a program stored in the memory, it implements the method as described in any one of claims 1-14.

17. A computer-readable storage medium having instructions stored thereon that, when executed by one or more processors, cause the processors to perform the method as described in any one of claims 1-14.

Citation Information

Patent Citations

  • Collision detection method and device

    CN112657192A

  • Game data display method and apparatus

    WO2022237130A1