Virtual road generation method and device, equipment and storage medium
By displaying virtual vehicles on the graphical user interface and responding to the player's driving control operations, the target virtual road is automatically generated, which solves the complex operation of the racing track creation tool, and achieves the effect of simplifying operations and improving creative efficiency.
Patent Information
- Application Number
- CN202510653229.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-07-04
AI Technical Summary
The existing racing track creation tools require high requirements for players' operating skills, which is difficult for novices to master quickly, the track curve adjustment is cumbersome and time-consuming, the creation efficiency is low, and frequent switching of editing and preview modes affects the fluency of creation.
By displaying virtual vehicles on the graphical user interface and responding to the player's driving control operations, the target virtual road is automatically generated, including steering and slope control, using angle adjustment controls to accurately adjust the route, and combining the preview window to display the route in real time, simplifying the operation process.
It lowers the operating threshold of track design, improves creative efficiency and player experience, reduces misoperation and waiting time, and players can create more smoothly.
Smart Images

Figure CN120242484A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of game technologies, and in particular, to a method, apparatus, device, and storage medium for generating virtual roads. Background Art
[0002] With the development of the game industry, the User Generated Content (UGC) model has become increasingly popular in the field of game creation. It gives players the ability to create game content by themselves, greatly enriching the diversity of the gaming experience. For example, in a racing game, players can create personalized racing tracks through the UGC editor, adding unique charm and infinite possibilities to the game.
[0003] However, there are many problems to be solved urgently in the existing UGC editors in terms of the function of creating racing tracks. During the process of creating a track, adjusting the curvature of the track requires high operation skills from players, and novice players are difficult to master quickly, which greatly increases the difficulty of getting started. For example, when creating a track with complex curves, players need to accurately control the curvature parameters of each section of the track, and a slight deviation may result in the entire curve not meeting the expectations, and it is difficult to quickly locate and correct the error. Summary of the Invention
[0004] In view of the above deficiencies in the prior art, this application provides a method, apparatus, device, and storage medium for generating virtual roads to solve the problems existing in the prior art.
[0005] The technical solutions adopted in the embodiments of this application are as follows:
[0006] In a first aspect, an embodiment of this application provides a method for generating a virtual road. A graphical user interface is provided through a terminal device. The method includes:
[0007] Display a preset editing scene on the graphical user interface, where the preset editing scene at least includes: a virtual vehicle in an automatic driving state;
[0008] In response to a driving control operation on the virtual vehicle, control the virtual vehicle to drive in the preset editing scene;
[0009] Obtain the target driving route of the virtual vehicle, and generate a target virtual road according to the target driving route.
[0010] Optionally, the step of "in response to a driving control operation on the virtual vehicle, control the virtual vehicle to drive in the preset editing scene" includes:
[0011] In response to a steering control operation on the virtual vehicle, control the virtual vehicle to drive in a steering manner in the preset editing scene;
[0012] Obtaining a target driving route of the virtual vehicle, and generating a target virtual road according to the target driving route, includes:
[0013] Obtaining a steering driving route of the virtual vehicle, and generating a steering road according to the steering driving route, where the target virtual road includes: the steering road.
[0014] Optionally, the responding to a steering control operation for the virtual vehicle to control the virtual vehicle to steer in the preset editing scene includes:
[0015] Responding to the steering control operation, displaying a first angle adjustment control in the graphical user interface;
[0016] Responding to a first angle adjustment operation input through the first angle adjustment control, controlling the virtual vehicle to steer in the preset editing scene at an angle corresponding to the first angle adjustment operation.
[0017] Optionally, the method further includes:
[0018] Responding to a cancellation operation of the steering control operation, canceling the display of the first angle adjustment control.
[0019] Optionally, the method further includes:
[0020] Responding to a cancellation operation of the steering control operation, controlling the virtual vehicle to drive straight in the preset editing scene.
[0021] Optionally, the responding to a driving control operation for the virtual vehicle to control the virtual vehicle to drive in the preset editing scene includes:
[0022] Responding to a slope control operation for the virtual vehicle, controlling the virtual vehicle to drive on a slope in the preset editing scene;
[0023] Obtaining a target driving route of the virtual vehicle, and generating a target virtual road according to the target driving route, includes:
[0024] Obtaining a slope driving route of the virtual vehicle, and generating a slope road according to the slope driving route, where the target virtual road includes: the slope road.
[0025] Optionally, the responding to a slope control operation for the virtual vehicle to control the virtual vehicle to drive on a slope in the preset editing scene includes:
[0026] Responding to the slope control operation, displaying a second angle adjustment control in the graphical user interface;
[0027] In response to a second angle adjustment operation input through the second angle adjustment control, control the virtual vehicle to travel on a ramp at an angle corresponding to the second angle adjustment operation in the preset editing scene.
[0028] Optionally, the method further includes:
[0029] In response to a cancellation operation of the ramp control operation, cancel the display of the second angle adjustment control.
[0030] Optionally, the method further includes:
[0031] In response to a cancellation operation of the ramp control operation, control the virtual vehicle to travel flat in the preset editing scene.
[0032] Optionally, at least one direction control is further displayed in the graphical user interface; the at least one direction control is respectively used to trigger different driving control operations.
[0033] Optionally, the method further includes:
[0034] Display a preview window in the graphical user interface, and display the target driving route in the preview window.
[0035] Optionally, generating the target virtual road according to the target driving route includes:
[0036] Generate the target virtual road according to the target driving route from a target perspective.
[0037] In a second aspect, an embodiment of the present application provides a virtual road generation device, which provides a graphical user interface through a terminal device. The device includes:
[0038] A display module, configured to display a preset editing scene on the graphical user interface, where the preset editing scene at least includes: a virtual vehicle;
[0039] A control module, configured to control the virtual vehicle to travel in the preset editing scene in response to a driving control operation for the virtual vehicle;
[0040] A generation module, configured to obtain a target driving route of the virtual vehicle, and generate a target virtual road according to the target driving route.
[0041] In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores program instructions executable by the processor. When the electronic device runs, the processor communicates with the storage medium through the bus, and the processor executes the program instructions to implement the virtual road generation method described in any of the above embodiments.
[0042] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which program instructions are stored. When the program instructions are run by a processor, the virtual road generation method described in any of the above embodiments is implemented.
[0043] The beneficial effects of the present application are as follows: The present application provides a virtual road generation method, including displaying a preset editing scene on a graphical user interface, where the preset editing scene at least includes a virtual vehicle in an autonomous driving state; in response to a driving control operation on the virtual vehicle, controlling the virtual vehicle to drive in the preset editing scene; obtaining a target driving route of the virtual vehicle, and generating a target virtual road according to the target driving route.
[0044] Among them, by responding to the driving control operation on the virtual vehicle, the virtual vehicle can be conveniently controlled to drive in the preset editing scene, greatly simplifying the road design process, reducing the operation threshold, and enabling even novice players to quickly get started. While optimizing the player experience, it also improves the creation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0046] Figure 1 One of the flow diagrams of the virtual road generation method provided by the embodiment of the present application;
[0047] Figure 2 One of the schematic diagrams of the graphical user interface provided by the embodiment of the present application;
[0048] Figure 3 One of the flow diagrams of the virtual road generation method provided by the embodiment of the present application;
[0049] Figure 4 One of the flow diagrams of the virtual road generation method provided by the embodiment of the present application;
[0050] Figure 5The second schematic diagram of the graphical user interface provided by the embodiment of the present application;
[0051] Figure 6 The third schematic diagram of the graphical user interface provided by the embodiment of the present application;
[0052] Figure 7 The fourth schematic flow diagram of the virtual road generation method provided by the embodiment of the present application;
[0053] Figure 8 The fifth schematic flow diagram of the virtual road generation method provided by the embodiment of the present application;
[0054] Figure 9 The fourth schematic diagram of the graphical user interface provided by the embodiment of the present application;
[0055] Figure 10 The fifth schematic diagram of the graphical user interface provided by the embodiment of the present application;
[0056] Figure 11 The sixth schematic diagram of the graphical user interface provided by the embodiment of the present application;
[0057] Figure 12 The structural schematic diagram of the virtual road generation device provided by the embodiment of the present application;
[0058] Figure 13 The structural schematic diagram of the electronic device provided by the embodiment of the present application. Detailed implementation manners
[0059] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application.
[0060] Therefore, the detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed present application, but merely represents selected embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the scope of protection of the present application.
[0061] In addition, the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0062] In the current field of User Generated Content (UGC), especially in the application scenario of creating racing tracks, the existing technical solutions have many problems that need to be solved urgently.
[0063] When creating a racing track, players often need to frequently adjust the track in a manual segmented manner. In this process, the adjustment of the track curvature requires high operating skills from the player, which is difficult for novice players to master quickly, greatly increasing the difficulty of getting started. For example, when creating a track with complex curves, the player needs to accurately control the curvature parameters of each section of the track, and a slight deviation may cause the entire curve to not meet expectations, but it is difficult to quickly locate and correct the error.
[0064] At the same time, players need to frequently manually adjust the track in sections, which means that players have to operate each section of the track separately, which takes a lot of time and energy and seriously affects the creative efficiency. For example, when building a long racing track, players may need to manually set up dozens or even hundreds of track sections in turn. The operation process is cumbersome, time-consuming and labor-intensive.
[0065] In addition, during the track creation process, players have to repeatedly switch between editing mode and preview mode to view the actual effect of road generation. This operation mode seriously affects the creation efficiency. Each mode switch requires a certain amount of time to wait for the interface to refresh and render, which frequently interrupts the originally smooth creation process. Moreover, frequent mode switching also affects the continuity of the creation. The player's creative ideas are easily interrupted, making it difficult to maintain an efficient and focused creative state.
[0066] Therefore, the present application provides a virtual road generation method, which can run on a local terminal device or a server. The following provides specific illustrative examples of the virtual road generation method provided by the present application in conjunction with the accompanying drawings. It should be noted that, without conflict, the features in the embodiments of the present application can be combined with each other.
[0067] Figure 1 FIG. 1 is one of the schematic flowcharts of the virtual road generation method provided by the embodiments of the present application. This method provides a graphical user interface through a terminal device, such as Figure 1 shown, the method includes:
[0068] S101. Display a preset editing scene on the graphical user interface.
[0069] First, as Figure 2 shown, display a preset editing scene on the graphical user interface. The preset editing scene at least includes a virtual vehicle 10 in an autonomous driving state.
[0070] Among them, a virtual vehicle is an object that can be controlled to drive by the driving control operations input by a player in a preset editing scene. When a driving control operation is issued, the virtual vehicle will drive along the path corresponding to the instruction; the autonomous driving state means that the virtual vehicle automatically drives straight ahead and the slope of the driving road surface is constant. That is, when no driving control operation input by the player is received, the virtual vehicle drives in the autonomous driving state.
[0071] S102. In response to a driving control operation for the virtual vehicle, control the virtual vehicle to drive in the preset editing scene.
[0072] As Figure 2 shown, at least one direction control is also displayed in the graphical user interface. The at least one direction control is respectively used to trigger different driving control operations. For example Figure 2 in FIG. 2, controls 11 and 12 are respectively used to trigger the steering control operation for the virtual vehicle, and controls 13 and 14 are respectively used to trigger the slope control operation for the virtual vehicle.
[0073] The player can make driving control operations for the virtual vehicle through the at least one direction control, and then in response to the driving control operation, the system can control the virtual vehicle to drive in the preset editing scene.
[0074] S103. Obtain the target driving route of the virtual vehicle, and generate a target virtual road according to the target driving route.
[0075] During the driving of the virtual vehicle, the system accurately obtains the target driving route of the virtual vehicle. This route is presented in the form of complex coordinate data, which details the forward trajectory of the virtual vehicle in the preset editing scene.
[0076] Based on the acquired target driving route, the system uses graphics rendering technology to start generating the target virtual road. Starting from the starting point of the route (that is, the moment when the driving control operation is received), the road model is gradually constructed, and its width, material, texture and other details are rendered according to the pre-set parameters. The road edge is clear and distinct, dividing the safe driving boundary. As the vehicle continues to move forward, the virtual road is perfectly integrated with the surrounding virtual environment.
[0077] The traditional method of manually adjusting the curvature of the track in segments requires extremely high user operating skills, which often discourages novices. This embodiment controls the virtual vehicle to drive in a preset editing scene by responding to driving control operations, so that first-time players can easily get started. Players no longer need to accurately control complex track curvature parameters, but only need to control the vehicle to drive like in ordinary racing games. The system can generate a corresponding track based on the vehicle's driving trajectory, greatly reducing the technical difficulty of track creation.
[0078] In addition, the tedious road shape adjustment operation is prone to mistakes, wasting a lot of time on error detection and correction, seriously affecting the user experience. With the help of virtual vehicle driving control, players can create more smoothly and reduce the probability of misoperation. Even when making multiple fine-tuning on a long track, there will be no subtle errors due to complex operations, thus avoiding rework, greatly improving the user experience in the track creation process, and fully mobilizing the user's enthusiasm for creation.
[0079] In summary, the present application provides a virtual road generation method, which conveniently controls the virtual vehicle to drive in a preset editing scene by responding to driving control operations on the virtual vehicle, greatly simplifies the road design process, and lowers the operating threshold. Even first-time players can get started quickly, which optimizes the player experience while also improving creation efficiency.
[0080] Figure 3 The second flowchart of the virtual road generation method provided in the embodiment of the present application, in one embodiment, as Figure 3 As shown, in response to the driving control operation on the virtual vehicle, controlling the virtual vehicle to drive in the preset editing scene in S102 may include:
[0081] S201. Responding to a steering control operation on a virtual vehicle, controlling the virtual vehicle to turn and travel in a preset editing scene.
[0082] In this embodiment, the steering control operation includes a left-turn control operation and a right-turn control operation. In response to the steering control operation for the virtual vehicle, the virtual vehicle is controlled to steer and travel in the preset editing scene, specifically including: triggering the left-turn control operation for the virtual vehicle through control 11, and in response to the left-turn control operation, controlling the virtual vehicle to turn left and travel in the preset editing scene; or triggering the right-turn control operation for the virtual vehicle through control 12, and in response to the right-turn control operation, controlling the virtual vehicle to turn right and travel in the preset editing scene.
[0083] Among them, the left-turn control operation can be, for example, an operation triggered by long-pressing control 11, and the right-turn control operation can be, for example, an operation triggered by long-pressing control 12.
[0084] Then, step S103 of obtaining the target driving route of the virtual vehicle and generating the target virtual road according to the target driving route may include:
[0085] S202. Obtain the steering driving route of the virtual vehicle and generate a steering road according to the steering driving route.
[0086] During the game operation, the game engine will continuously monitor the player's control input for the virtual vehicle. Once an operation instruction related to the steering control is captured, the system can start the steering data acquisition process. First, the system accurately obtains the current position coordinates of the virtual vehicle, and then, based on the current position coordinates and combined with the steering control operation input by the player, calculates and generates the steering driving route of the virtual vehicle in the next period of time.
[0087] After successfully obtaining the steering driving route of the virtual vehicle, the system takes this route as the core basis to analyze the terrain data of the area passed by the route. If the area was originally flat terrain, the system generates a steering road that meets the steering requirements in this area according to the direction and curvature of the steering driving route, including setting a reasonable road width, adding appropriate road marking lines, etc.; if the route passes through complex terrain, such as hills, rivers, etc., the system will skillfully transform the terrain and construct a steering road that allows the virtual vehicle to smoothly steer and travel without destroying the overall scene style. For example, a winding mountain road is opened at the hills, and a bridge is built over the river to ensure the continuity of the steering road. That is, the target virtual road described in S102 includes the steering road.
[0088] In another embodiment, the steering angle corresponding to the steering control operation can also be adjusted. Figure 4 This is the third flow chart of the virtual road generation method provided by the embodiment of the present application. As Figure 4 shown, step S201 of responding to the steering control operation for the virtual vehicle and controlling the virtual vehicle to steer and travel in the preset editing scene may include:
[0089] S301. In response to a steering control operation, display a first angle adjustment control in the graphical user interface.
[0090] When the control 11 or 12 is long - pressed ( Figure 5 and the control 11 is filled with black, indicating that the control 11 is long - pressed), display the first angle adjustment control 15 as shown in Figure 5 the figure. The first angle adjustment control is used to adjust the angle of turning left or right. The angle range that the first angle adjustment control can adjust is 0° - 300°, that is, the first angle adjustment control is used to adjust the angle of turning left or right within the range of 0° - 300°.
[0091] S302. In response to the first angle adjustment operation input through the first angle adjustment control, control the virtual vehicle to steer and drive at the angle corresponding to the first angle adjustment operation in the preset editing scene.
[0092] The player can drag the first angle adjustment control with a finger to trigger the first angle adjustment operation. In response to the first angle adjustment operation, the system can control the virtual vehicle to steer and drive at the angle corresponding to the first angle adjustment operation in the preset editing scene.
[0093] For example, when the left - turn control operation is triggered through the control 11, display the left - turn angle adjustment control corresponding to the left - turn control operation on the graphical user interface. The initial left - turn angle is Figure 5 20° (or other degrees) as shown in the figure. The virtual vehicle turns left at the initial left - turn angle in the preset editing scene. The player drags the left - turn angle adjustment control with a hand and adjusts the left - turn angle to Figure 6 50° as shown in the figure. At this time, the virtual vehicle turns left at an angle difference of 50° from the driving direction angle in the automatic driving state in the preset editing scene. The right - turn control operation is the same and will not be elaborated here.
[0094] In this embodiment, the player can accurately input the desired angle through the first angle adjustment control, which has the following advantages:
[0095] 1. Precise control: Make the virtual vehicle steer and drive at the specified angle, which is very helpful for scenarios that require precise operations, such as performing specific path planning, precise docking, or completing some tasks with angle requirements in the preset editing scene, and can improve the accuracy and success rate of operations.
[0096] 2. Intuitive and convenient: The angle adjustment function is presented in the form of controls in the graphical user interface, which conforms to the players' habit of visual operation. Players do not need to remember complex instructions or perform cumbersome operations to achieve turning. They only need to directly interact with the controls on the interface and can complete the angle adjustment through simple operations such as dragging the slider and clicking the button, reducing the operation threshold and improving the convenience and efficiency of operation.
[0097] 3. Real-time feedback: When the player inputs an angle adjustment operation through the first angle adjustment control, the virtual vehicle will immediately turn and drive at the corresponding angle in the preset editing scene. The player can see the result of the operation in real time. This real-time feedback mechanism helps the player quickly understand the effect of their operation, facilitates timely adjustment and optimization, and enhances the interactivity and immersion between the player and the virtual scene.
[0098] 4. Strong scene adaptability: The preset editing scene usually has diverse environments and task requirements. Through the first angle adjustment control, the virtual vehicle can be flexibly controlled to turn and drive at various angles in different scenes, adapting to different road conditions, obstacle distributions, and task requirements, improving the coping ability and adaptability of the virtual vehicle in complex scenes.
[0099] In one embodiment, when the player cancels the steering control operation (for example, releasing control 11 or 12), in response to this operation, the first angle adjustment control is cancelled from display on the graphical user interface.
[0100] In one embodiment, in response to the cancellation of the steering control operation, the virtual vehicle is controlled to drive straight in the preset editing scene. That is, when control 11 or 12 is released, the virtual vehicle resumes the automatic driving state and drives straight in the preset editing scene.
[0101] Figure 7 This is the fourth flowchart of the virtual road generation method provided by the embodiment of the present application. In one embodiment, as Figure 7 shown, the step of controlling the virtual vehicle to drive in the preset editing scene in response to the driving control operation for the virtual vehicle in S102 may include:
[0102] S401. Respond to the slope control operation for the virtual vehicle and control the virtual vehicle to drive on a slope in the preset editing scene.
[0103] In this embodiment, the ramp control operation includes an uphill control operation and a downhill control operation. In response to the ramp control operation for the virtual vehicle, the virtual vehicle is controlled to drive on a ramp in a preset editing scene, specifically including: triggering the uphill control operation for the virtual vehicle through control 13, and in response to the uphill control operation, controlling the virtual vehicle to drive uphill in the preset editing scene; or triggering the downhill control operation for the virtual vehicle through control 14, and in response to the downhill control operation, controlling the virtual vehicle to drive downhill in the preset editing scene.
[0104] Among them, the uphill control operation can be, for example, an operation triggered by long-pressing control 13, and the downhill control operation can be, for example, an operation triggered by long-pressing control 14.
[0105] Then, step 103 of obtaining the target driving route of the virtual vehicle and generating a target virtual road according to the target driving route may include:
[0106] S402. Obtain the ramp driving route of the virtual vehicle and generate a ramp road according to the ramp driving route.
[0107] Similar to S202, during the game operation, the game engine will continuously monitor the player's control input for the virtual vehicle. Once an operation instruction involving ramp control is captured, the system can start the ramp data acquisition process. The system first accurately obtains the current position coordinates of the virtual vehicle, and then, based on the current position coordinates and combined with the ramp control operation input by the player, calculates and generates the ramp driving route of the virtual vehicle in the next period of time.
[0108] After successfully obtaining the ramp driving route of the virtual vehicle, the system will use this route as the core basis to generate a ramp road. That is, the target virtual road described in S102 includes a turning road.
[0109] In another embodiment, the ramp angle corresponding to the ramp control operation can also be adjusted. Figure 8 This is the fifth flowchart of the virtual road generation method provided by the embodiment of the present application. As Figure 8 shown, step S402 of responding to the ramp control operation for the virtual vehicle and controlling the virtual vehicle to drive on a ramp in a preset editing scene may include:
[0110] S501. In response to the ramp control operation, display a second angle adjustment control in the graphical user interface.
[0111] When long-pressing control 13 or 14 ( Figure 8 when control 13 is filled black in the central control, indicating that control 13 is long-pressed), the following is displayed on the graphical user interface as Figure 9The second angle adjustment control 16 shown is used to adjust the uphill or downhill angle. The angle range that the second angle adjustment control can adjust is 0° - 300°. That is, the second angle adjustment control is used to adjust the uphill or downhill angle within the range of 0° - 300°.
[0112] S502. In response to the second angle adjustment operation input through the second angle adjustment control, control the virtual vehicle to drive on an angle slope corresponding to the second angle adjustment operation in the preset editing scene.
[0113] Players can drag the second angle adjustment control with their fingers to trigger the second angle adjustment operation. In response to the second angle adjustment operation, the system can control the virtual vehicle to drive on an angle slope corresponding to the second angle adjustment operation in the preset editing scene.
[0114] For example, when the uphill control operation is triggered through control 13, the uphill angle adjustment control corresponding to the uphill control operation is displayed on the graphical user interface. The initial uphill angle is Figure 9 30° (or other degrees) as shown. The virtual vehicle goes uphill at the initial uphill angle in the preset editing scene. The player drags the uphill angle adjustment control with their hand and adjusts the uphill angle to Figure 10 70° as shown. At this time, the virtual vehicle goes uphill in the preset editing scene at an angle difference of 70° from the driving direction angle in the automatic driving state. The downhill control operation is the same and will not be elaborated here.
[0115] In this embodiment, players can accurately input the desired angle through the second angle adjustment control, which has the following advantages:
[0116] 1. Precise control of the slope driving angle: Players can accurately input the required angle through the second angle adjustment control, enabling the virtual vehicle to drive on an angle slope as specified. This is very important for preset editing scenes that require precise control of the vehicle's driving posture, such as simulating driving on specific terrains and performing precise path planning.
[0117] 2. Improvement of scene editing efficiency: In the preset editing scene, this precise angle control helps players quickly achieve the desired virtual vehicle driving effect, reducing the time for repeated attempts and adjustments, thereby improving the efficiency of the entire scene editing and facilitating players to create complex virtual scenes more efficiently.
[0118] 3. Enrichment of scene editing possibilities: Allowing driving on angle slopes at different angles provides players with more creative space. It can simulate various different terrains and driving situations, enriching the diversity and authenticity of the preset editing scene and meeting the needs of players in different application scenarios.
[0119] 4. Enhance the gaming experience: This interaction method enables players to control virtual vehicles more flexibly and precisely, increasing their sense of participation and control during operation, thereby enhancing the player experience and making players more willing to engage in scene editing and virtual vehicle operation.
[0120] In one embodiment, when the player cancels the ramp control operation (for example, by releasing control 13 or 14), in response to this operation, the second angle adjustment control is cancelled from display on the graphical user interface.
[0121] In one embodiment, in response to the cancellation operation of the ramp control operation, the virtual vehicle is controlled to travel flat in the preset editing scene. That is, when control 13 or 14 is released, the virtual vehicle resumes the automatic driving state and travels flat in the preset editing scene.
[0122] In another embodiment of the present application, a preview window 17 as shown in Figure 11 is displayed in the graphical user interface, and the target driving route is displayed in the preview window.
[0123] The preview window occupying a specific area of the screen is presented in a clear and intuitive manner. The preview window has a resizable border, and players can flexibly adjust its size according to their own needs to obtain a more suitable visual display effect. Inside the preview window, through high-precision rendering technology, the target driving route is precisely outlined in a prominent color, such as a bright blue line ( Figure 11 the color is not shown in the figure), and the arrow direction at the front end of the target driving route indicates the current driving direction of the virtual vehicle.
[0124] Optionally, the target driving route in the preview window is drawn based on the actual position data (such as coordinates) of the virtual vehicle and the navigation algorithm. Key turning points, passing locations, and estimated driving times and other important information can also be marked in real time. In addition, as the mouse pointer moves within the preview window, detailed location description labels will dynamically pop up on the route, providing players with a more comprehensive and convenient route preview experience.
[0125] In this embodiment, during the process of the player controlling the virtual vehicle to travel, the track is generated in real time, and creation and preview are carried out simultaneously without waiting for the interface to be refreshed and rendered. The creation process is no longer interrupted, and players can maintain an efficient and focused creation state, greatly improving the overall efficiency of track creation and solving the problem that in the past, players needed to repeatedly switch between the editing mode and the preview mode to view the road generation effect, which seriously affected the creation efficiency.
[0126] In one embodiment, S103 generating the target virtual road according to the target driving route may include: generating the target virtual road according to the target driving route from the target perspective.
[0127] To enable players to experience the driving effect of virtual vehicles on the target virtual road in the editing mode, the viewing angle of the editing scene can be set to be the same as that of the game scene in the game mode. For example, in the third-person perspective of the game mode, the virtual camera that captures the virtual scene is usually fixedly set behind the virtual vehicle. The target view covers various parameters of the virtual camera, such as the relative position of the virtual camera and the virtual vehicle, the horizontally observed angle, the vertically pitched angle, and a specific zoom ratio from the target driving route that are default or preset by the player. As shown in Appendix Figure 5 , 6 , 9, and 10, in the editing mode, regardless of the driving direction, steering angle size, uphill and downhill slopes, etc. of the current virtual vehicle, the target view of the editing scene in the graphical user interface is observed from behind the virtual vehicle, thus being the same as the viewing angle in the game mode.
[0128] During the generation process of the virtual road, a unified view helps players clearly examine the layout rationality of the road and surrounding buildings and infrastructure from a fixed and consistent angle, and then make scientific decisions.
[0129] In summary, the present application provides a virtual road generation method, which has the following advantages:
[0130] 1. By responding to the driving control operation for the virtual vehicle, the virtual vehicle can be conveniently controlled to drive in the preset editing scene, greatly simplifying the road design process and reducing the operation threshold. Even players who are new to this can quickly get started, improving the creation efficiency while optimizing the player experience.
[0131] 2. By accurately inputting the desired angle through the first angle adjustment control, it realizes precise control, intuitive convenience, real-time feedback, and strong scene adaptability of the operation; by accurately inputting the desired angle through the second angle adjustment control, it realizes the functions of precisely controlling the slope driving angle, improving the scene editing efficiency, enriching the scene editing possibilities, and enhancing the game experience.
[0132] 3. During the process of the player controlling the virtual vehicle to drive, the track is generated in real time, and creation and preview are carried out simultaneously. Without waiting for the interface to be refreshed and rendered, the creation process is no longer interrupted, and the player can maintain an efficient and focused creation state, greatly improving the overall efficiency of track creation.
[0133] The following continues to explain the device, equipment, and storage medium for executing the virtual road generation method provided in any of the above embodiments of the present application. The specific implementation process and the technical effects produced are the same as those of the corresponding method embodiments described above. For a brief description, for the parts not mentioned in the following embodiments, reference can be made to the corresponding content in the method embodiments.
[0134] As Figure 12 shown, the present application also provides a virtual road generation device. By means of a terminal device, a graphical user interface is provided. The device includes:
[0135] A display module 10, configured to display a preset editing scene on the graphical user interface, where the preset editing scene at least includes: a virtual vehicle in an autonomous driving state.
[0136] A control module 20, configured to control the virtual vehicle to travel in the preset editing scene in response to a driving control operation on the virtual vehicle.
[0137] A generation module 30, configured to obtain a target driving route of the virtual vehicle, and generate a target virtual road according to the target driving route.
[0138] Optionally, the control module 20 is further configured to control the virtual vehicle to turn and travel in the preset editing scene in response to a steering control operation on the virtual vehicle; the generation module 30 is further configured to obtain a turning travel route of the virtual vehicle, and generate a turning road according to the turning travel route, and the target virtual road includes: the turning road.
[0139] Optionally, the control module 20 is further configured to display a first angle adjustment control in the graphical user interface in response to the steering control operation; and control the virtual vehicle to turn and travel at an angle corresponding to the first angle adjustment operation in the preset editing scene in response to a first angle adjustment operation input through the first angle adjustment control.
[0140] Optionally, the device further includes a cancellation module, configured to cancel the display of the first angle adjustment control in response to a cancellation operation of the steering control operation.
[0141] Optionally, the control module 20 is further configured to control the virtual vehicle to travel straight in the preset editing scene in response to a cancellation operation of the steering control operation.
[0142] Optionally, the control module 20 is further configured to control the virtual vehicle to travel on a slope in the preset editing scene in response to a slope control operation on the virtual vehicle; the generation module 30 is further configured to obtain a slope travel route of the virtual vehicle, and generate a slope road according to the slope travel route, and the target virtual road includes: the slope road.
[0143] Optionally, the control module 20 is further configured to respond to the ramp control operation and display a second angle adjustment control in the graphical user interface; and respond to a second angle adjustment operation input through the second angle adjustment control, and control the virtual vehicle to travel on a ramp at an angle corresponding to the second angle adjustment operation in the preset editing scene.
[0144] Optionally, the cancellation module is further configured to respond to a cancellation operation of the ramp control operation and cancel the display of the second angle adjustment control.
[0145] Optionally, the control module 20 is further configured to respond to a cancellation operation of the ramp control operation and control the virtual vehicle to travel flat in the preset editing scene.
[0146] Optionally, the device further includes a display module, configured to display a preview window in the graphical user interface and display the target driving route in the preview window.
[0147] Optionally, the generation module 30 is further configured to generate the target virtual road according to the target driving route from a target perspective.
[0148] The above device is used to execute the method provided in the foregoing embodiment, and its implementation principle and technical effects are similar, and will not be elaborated here.
[0149] The above modules may be one or more integrated circuits configured to implement the above methods, for example: one or more application specific integrated circuits (ASICs), or, one or more microprocessors, or, one or more field programmable gate arrays (FPGAs), etc. Again, when a certain module above is implemented in the form of a processing element dispatching program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program code. Again, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0150] As Figure 13 shown, the present application further provides an electronic device, including a processor 100, a storage medium 200, and a bus 300. The storage medium stores program instructions executable by the processor. When the electronic device runs, the processor communicates with the storage medium through the bus, and the processor executes the program instructions. The implemented method includes:
[0151] Display a preset editing scene on the graphical user interface, where the preset editing scene at least includes: a virtual vehicle in an autonomous driving state;
[0152] In response to a driving control operation on the virtual vehicle, control the virtual vehicle to drive in the preset editing scene;
[0153] Obtain the target driving route of the virtual vehicle, and generate a target virtual road according to the target driving route.
[0154] Optionally, the "In response to a driving control operation on the virtual vehicle, control the virtual vehicle to drive in the preset editing scene" includes:
[0155] In response to a steering control operation on the virtual vehicle, control the virtual vehicle to drive with a turn in the preset editing scene;
[0156] The "Obtain the target driving route of the virtual vehicle, and generate a target virtual road according to the target driving route" includes:
[0157] Obtain the steering driving route of the virtual vehicle, and generate a steering road according to the steering driving route, where the target virtual road includes: the steering road.
[0158] Optionally, the "In response to a steering control operation on the virtual vehicle, control the virtual vehicle to drive with a turn in the preset editing scene" includes:
[0159] In response to the steering control operation, display a first angle adjustment control in the graphical user interface;
[0160] In response to a first angle adjustment operation input through the first angle adjustment control, control the virtual vehicle to drive with a turn at an angle corresponding to the first angle adjustment operation in the preset editing scene.
[0161] Optionally, the method further includes:
[0162] In response to a cancellation operation of the steering control operation, cancel the display of the first angle adjustment control.
[0163] Optionally, the method further includes:
[0164] In response to a cancellation operation of the steering control operation, control the virtual vehicle to drive straight in the preset editing scene.
[0165] Optionally, the "In response to a driving control operation on the virtual vehicle, control the virtual vehicle to drive in the preset editing scene" includes:
[0166] In response to a ramp control operation for the virtual vehicle, control the virtual vehicle to drive on a ramp in the preset editing scene;
[0167] The obtaining of the target driving route of the virtual vehicle and generating a target virtual road according to the target driving route includes:
[0168] Obtain the ramp driving route of the virtual vehicle and generate a ramp road according to the ramp driving route, where the target virtual road includes: the ramp road.
[0169] Optionally, the controlling the virtual vehicle to drive on a ramp in the preset editing scene in response to a ramp control operation for the virtual vehicle includes:
[0170] In response to the ramp control operation, display a second angle adjustment control in the graphical user interface;
[0171] In response to a second angle adjustment operation input through the second angle adjustment control, control the virtual vehicle to drive on a ramp at an angle corresponding to the second angle adjustment operation in the preset editing scene.
[0172] Optionally, the method further includes:
[0173] In response to a cancellation operation of the ramp control operation, cancel the display of the second angle adjustment control.
[0174] Optionally, the method further includes:
[0175] In response to a cancellation operation of the ramp control operation, control the virtual vehicle to drive flat in the preset editing scene.
[0176] Optionally, at least one direction control is further displayed in the graphical user interface; the at least one direction control is respectively used to trigger different driving control operations.
[0177] Optionally, the method further includes:
[0178] Display a preview window in the graphical user interface and display the target driving route in the preview window.
[0179] Optionally, the generating a target virtual road according to the target driving route includes:
[0180] Generate the target virtual road according to the target driving route from a target perspective.
[0181] This application also provides a readable storage medium, on which program instructions are stored, and the method implemented when the program instructions are run by a processor includes:
[0182] Display a preset editing scene on the graphical user interface, where the preset editing scene at least includes: a virtual vehicle in an autonomous driving state;
[0183] In response to a driving control operation on the virtual vehicle, control the virtual vehicle to drive in the preset editing scene;
[0184] Obtain the target driving route of the virtual vehicle, and generate a target virtual road according to the target driving route.
[0185] Optionally, the step of "In response to a driving control operation on the virtual vehicle, control the virtual vehicle to drive in the preset editing scene" includes:
[0186] In response to a steering control operation on the virtual vehicle, control the virtual vehicle to steer and drive in the preset editing scene;
[0187] The step of "Obtain the target driving route of the virtual vehicle, and generate a target virtual road according to the target driving route" includes:
[0188] Obtain the steering driving route of the virtual vehicle, and generate a steering road according to the steering driving route, where the target virtual road includes: the steering road.
[0189] Optionally, the step of "In response to a steering control operation on the virtual vehicle, control the virtual vehicle to steer and drive in the preset editing scene" includes:
[0190] In response to the steering control operation, display a first angle adjustment control on the graphical user interface;
[0191] In response to a first angle adjustment operation input through the first angle adjustment control, control the virtual vehicle to steer and drive in the preset editing scene at an angle corresponding to the first angle adjustment operation.
[0192] Optionally, the method further includes:
[0193] In response to a cancellation operation of the steering control operation, cancel the display of the first angle adjustment control.
[0194] Optionally, the method further includes:
[0195] In response to a cancellation operation of the steering control operation, control the virtual vehicle to drive straight in the preset editing scene.
[0196] Optionally, the step of "In response to a driving control operation on the virtual vehicle, control the virtual vehicle to drive in the preset editing scene" includes:
[0197] In response to a ramp control operation for the virtual vehicle, control the virtual vehicle to drive on a ramp in the preset editing scene;
[0198] The obtaining of the target driving route of the virtual vehicle and generating a target virtual road according to the target driving route includes:
[0199] Obtain the ramp driving route of the virtual vehicle and generate a ramp road according to the ramp driving route, where the target virtual road includes: the ramp road.
[0200] Optionally, the controlling the virtual vehicle to drive on a ramp in the preset editing scene in response to a ramp control operation for the virtual vehicle includes:
[0201] In response to the ramp control operation, display a second angle adjustment control in the graphical user interface;
[0202] In response to a second angle adjustment operation input through the second angle adjustment control, control the virtual vehicle to drive on a ramp at an angle corresponding to the second angle adjustment operation in the preset editing scene.
[0203] Optionally, the method further includes:
[0204] In response to a cancellation operation of the ramp control operation, cancel the display of the second angle adjustment control.
[0205] Optionally, the method further includes:
[0206] In response to a cancellation operation of the ramp control operation, control the virtual vehicle to drive flat in the preset editing scene.
[0207] Optionally, at least one direction control is further displayed in the graphical user interface; the at least one direction control is respectively used to trigger different driving control operations.
[0208] Optionally, the method further includes:
[0209] Display a preview window in the graphical user interface and display the target driving route in the preview window.
[0210] Optionally, the generating a target virtual road according to the target driving route includes:
[0211] Generate the target virtual road according to the target driving route from a target perspective.
[0212] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the couplings or direct couplings or communication connections shown or discussed with each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical or other forms.
[0213] The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0214] In addition, each functional unit in various embodiments of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware, or in the form of hardware plus software functional units.
[0215] The above integrated units implemented in the form of software functional units can be stored in a computer-readable storage medium. The above software functional units stored in a storage medium include several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to execute some steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (English: Read-Only Memory, abbreviated as: ROM), random access memories (English: Random Access Memory, abbreviated as: RAM), magnetic disks or optical discs that can store program codes.
[0216] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed in the present application should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for generating a virtual road, characterized in that, Providing a graphical user interface through a terminal device, the method includes: Displaying a preset editing scene on the graphical user interface, wherein the preset editing scene at least includes: a virtual vehicle in an autonomous driving state; In response to a driving control operation for the virtual vehicle, controlling the virtual vehicle to drive in the preset editing scene; Obtaining a target driving route of the virtual vehicle, and generating a target virtual road according to the target driving route.
2. The method according to claim 1, wherein The step of "in response to a driving control operation for the virtual vehicle, controlling the virtual vehicle to drive in the preset editing scene" includes: In response to a steering control operation for the virtual vehicle, controlling the virtual vehicle to steer and drive in the preset editing scene; The step of "obtaining a target driving route of the virtual vehicle, and generating a target virtual road according to the target driving route" includes: Obtaining a steering driving route of the virtual vehicle, and generating a steering road according to the steering driving route, wherein the target virtual road includes: the steering road.
3. The method according to claim 2, wherein The step of "in response to a steering control operation for the virtual vehicle, controlling the virtual vehicle to steer and drive in the preset editing scene" includes: In response to the steering control operation, displaying a first angle adjustment control in the graphical user interface; In response to a first angle adjustment operation input through the first angle adjustment control, controlling the virtual vehicle to steer and drive at an angle corresponding to the first angle adjustment operation in the preset editing scene.
4. The method according to claim 3, characterized in that The method further includes: In response to a cancellation operation of the steering control operation, canceling the display of the first angle adjustment control.
5. The method according to claim 2, wherein The method further includes: In response to a cancellation operation of the steering control operation, controlling the virtual vehicle to drive straight in the preset editing scene.
6. The method according to claim 1, characterized in that The step of "in response to a driving control operation for the virtual vehicle, controlling the virtual vehicle to drive in the preset editing scene" includes: In response to a slope control operation for the virtual vehicle, controlling the virtual vehicle to drive on a slope in the preset editing scene; The step of "obtaining a target driving route of the virtual vehicle, and generating a target virtual road according to the target driving route" includes: Obtaining a slope driving route of the virtual vehicle, and generating a slope road according to the slope driving route, wherein the target virtual road includes: the slope road.
7. The method according to claim 6, wherein The step of "in response to a slope control operation for the virtual vehicle, controlling the virtual vehicle to drive on a slope in the preset editing scene" includes: In response to the slope control operation, displaying a second angle adjustment control in the graphical user interface; In response to a second angle adjustment operation input through the second angle adjustment control, controlling the virtual vehicle to drive on a slope at an angle corresponding to the second angle adjustment operation in the preset editing scene.
8. The method according to claim 7, wherein The method further includes: In response to a cancellation operation of the slope control operation, canceling the display of the second angle adjustment control.
9. The method according to claim 6, characterized in that, The method further includes: In response to a cancellation operation of the slope control operation, controlling the virtual vehicle to drive on a flat surface in the preset editing scene.
10. The method according to claim 1, characterized in that, At least one direction control is also displayed in the graphical user interface; the at least one direction control is respectively used to trigger different driving control operations.
11. The method according to claim 1, characterized in that, The method further includes: Display a preview window in the graphical user interface, and display the target driving route in the preview window.
12. The method according to claim 1, wherein The generating the target virtual road according to the target driving route includes: Generating the target virtual road according to the target driving route from a target perspective.
13. A virtual road generation device, characterized in that, Provide a graphical user interface through a terminal device, and the device includes: A display module, configured to display a preset editing scene on the graphical user interface, where the preset editing scene at least includes: a virtual vehicle in an autonomous driving state; A control module, configured to control the virtual vehicle to drive in the preset editing scene in response to a driving control operation for the virtual vehicle; A generating module, configured to obtain a target driving route of the virtual vehicle, and generate a target virtual road according to the target driving route.
14. An electronic device, characterized in that, Including: A processor, a storage medium, and a bus, where the storage medium stores program instructions executable by the processor. When the electronic device runs, the processor communicates with the storage medium through the bus, and the processor executes the program instructions to implement the virtual road generation method according to any one of claims 1 to 12.
15. A readable storage medium, characterized in that, Program instructions are stored on the readable storage medium, and when the program instructions are run by the processor, the virtual road generation method according to any one of claims 1 to 12 is implemented.