A virtual wetland landscape layout method, system, electronic device and storage medium
By optimizing the layout of virtual wetland landscapes through gesture recognition technology, users can select plant models, layout modes, and locations using gestures. This solves the problems of complex operation and limited freedom in traditional methods, and achieves a more intuitive and personalized layout experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NORTHWEST A & F UNIV
- Filing Date
- 2024-01-09
- Publication Date
- 2026-06-26
AI Technical Summary
Traditional virtual wetland landscape layout methods are complex to operate, requiring users to remember different key and mouse click combinations, which increases the cognitive burden on users, limits their freedom, and fails to meet personalized layout needs.
Through gesture recognition technology, users can select plant models by recognizing the first set gesture, select the layout mode by recognizing the second set gesture, and determine the layout position by recognizing the third set gesture. Combined with the trajectory template library to optimize gesture commands, the layout of plant models in virtual wetland landscapes can be realized.
It simplifies the operation process, reduces the learning difficulty, improves the user's operating experience and the freedom of personalized layout, and reduces the time cost of custom layout.
Smart Images

Figure CN117827006B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of landscape planning technology, and in particular to a virtual wetland landscape layout method, system, electronic device and storage medium. Background Technology
[0002] Virtual reality (VR) technology uses a head-mounted display (HMD) to render computer-simulated virtual 3D scenes in front of the user, and updates the rendered image in real time with the help of other sensor signals to give the user an immersive experience. In recent years, with the emergence of consumer-oriented VR devices such as HTC Vive and Oculus, research on VR applications has increased significantly.
[0003] Taking virtual wetland landscapes as an example, keyboard and mouse operations are typically required to interact with the layout of these landscapes, allowing users to select plant types and layout methods. However, keyboard and mouse operation is not intuitive enough; users need to remember different key and mouse click combinations to complete specific operations, increasing their cognitive load. Furthermore, for new users, familiarizing themselves with and mastering complex keyboard and mouse operations often requires time and training, limiting their ability to quickly learn and operate efficiently.
[0004] Therefore, due to operational limitations and complexity, users' freedom in selecting plants and adjusting the layout of virtual wetland landscapes is restricted, resulting in a lack of personalization in the final virtual wetland landscape layout. Summary of the Invention
[0005] The purpose of this application is to provide a virtual wetland landscape layout method, system, electronic device and storage medium, which can complete the layout of virtual wetland landscape through a simpler and more convenient interactive method, and provide users with a better personalized experience.
[0006] To address the aforementioned technical problems, embodiments of this application provide a virtual wetland landscape layout method, comprising the following steps: recognizing a user's first preset gesture, providing a plant model library containing multiple plant models based on the first preset gesture, allowing the user to select a target plant model from the plant model library to be laid out in a pre-built initial wetland landscape model; recognizing a user's second preset gesture, recording the user's fingertip trajectory based on the second preset gesture, and selecting a target trajectory template matching the fingertip trajectory from a pre-stored trajectory template library, the target trajectory template being used to indicate the target layout pattern of the target plant model in the initial wetland landscape model; recognizing a user's third preset gesture, providing an interactive ray based on the third preset gesture, allowing the user to manipulate the interactive ray to collide with the ground of the initial wetland landscape model, determining the target layout position of the target plant model in the target layout pattern based on the collision point of the interactive ray with the ground; and laying out the target plant model in the initial wetland landscape model at the target layout position using the target layout pattern, and rendering the target wetland landscape model.
[0007] An embodiment of this application also provides a virtual wetland landscape layout system, comprising: a layout object selection module, configured to recognize a user's first preset gesture, and provide a plant model library containing multiple plant models based on the first preset gesture, so that the user can select a target plant model to be laid out in a pre-built initial wetland landscape model from the plant model library; a layout mode selection module, configured to recognize a user's second preset gesture, record the user's fingertip trajectory based on the second preset gesture, and select a target trajectory template matching the fingertip trajectory from a pre-stored trajectory template library, the target trajectory template being used to indicate the target layout mode of the target plant model in the initial wetland landscape model; a layout position selection module, configured to recognize a user's third preset gesture, and provide an interactive ray based on the third preset gesture, so that the user can manipulate the interactive ray to collide with the ground of the initial wetland landscape model, and determine the target layout position of the target plant model in the target layout mode based on the collision point of the interactive ray with the ground; and a layout rendering module, configured to lay out the target plant model in the initial wetland landscape model at the target layout position using the target layout mode, and render the target wetland landscape model.
[0008] Embodiments of this application also provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the above-described virtual wetland landscape layout method.
[0009] Embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described virtual wetland landscape layout method.
[0010] The virtual wetland landscape layout method provided in this application, upon recognizing a user's first preset gesture, provides a plant model library containing multiple plant models, allowing the user to select a target plant model from the library to be placed in a pre-built initial wetland landscape model, thus completing the selection of the layout object. Upon recognizing a user's second preset gesture, the method begins recording the user's fingertip trajectory, which determines the target layout pattern of the aforementioned target plant model in the initial wetland landscape model, thus completing the selection of the layout pattern. Upon recognizing a user's third preset gesture, an interactive ray is provided, allowing the user to manipulate the interactive ray to collide with the ground. Based on the collision point between the interactive ray and the ground, the target layout position of the target plant model in the target layout pattern is determined, thus completing the selection of the layout position. Finally, at the target layout position, the target plant model is placed in the initial wetland landscape model using the target layout pattern, completing the operation of placing the layout object in the virtual wetland landscape. In this application, users can trigger different operations (i.e., layout object selection, layout mode selection, and layout position selection) through different gestures. Compared with using a keyboard and mouse to perform these operations, users do not need to rely on external devices, making the interaction with the virtual wetland landscape simpler and more convenient, thus improving the user experience. Furthermore, users can freely select layout objects, layout modes, and layout positions through gestures, allowing the virtual wetland landscape to be arranged according to user preferences, providing a better personalized experience. In addition, this application not only defines multiple set gestures to trigger different layout operations but also defines trajectory templates. By combining set gestures with trajectory templates to complete layout mode selection, overly complex gesture commands are eliminated, optimizing gesture commands and making it easier for users to learn them, thus reducing the time cost of customizing the virtual wetland landscape layout.
[0011] In some optional embodiments, the trajectory template library includes an isolated planting trajectory template corresponding to the isolated planting layout mode, a row planting trajectory template corresponding to the row planting layout mode, a clump planting trajectory template corresponding to the clump planting layout mode, a patch planting trajectory template corresponding to the patch planting layout mode, and a free trajectory template corresponding to the free arrangement mode.
[0012] In some optional embodiments, determining the target layout position of the target plant model in the target layout mode based on the collision point between the interactive ray and the ground includes: recording a number of collision points where the interactive ray collides with the ground; selecting a target collision point from the number of collision points according to the target layout mode; and determining the target layout position based on the location of the target collision point.
[0013] In some optional embodiments, selecting a target collision point from the plurality of collision points according to the target layout pattern includes: if the target layout pattern is the solitary planting pattern or the clump planting pattern, then the first collision point where the interactive ray collides with the ground is taken as the target collision point; if the target layout pattern is the row planting pattern, then the first two collision points where the interactive ray collides with the ground are taken as the target collision point; if the target layout pattern is the patch planting pattern, then the first four collision points where the interactive ray collides with the ground are taken as the target collision point; if the target layout pattern is the free layout pattern, then all collision points where the interactive ray collides with the ground are taken as the target collision point.
[0014] In some optional embodiments, the step of arranging the target plant models in the initial wetland landscape model at the target layout location using the target layout pattern includes: if the target layout pattern is the solitary planting layout pattern, then arranging one target plant model at the location of the first collision point; if the target layout pattern is the row planting layout pattern, then arranging multiple target plant models at a first fixed interval between the first and second collision points; if the target layout pattern is the clump planting layout pattern, then arranging multiple target plant models on a circle with the first collision point as the center and the crown width of the target plant model as the diameter; if the target layout pattern is the patch planting layout pattern, then arranging multiple target plant models within the area enclosed by the first four collision points; if the target layout pattern is the free layout pattern, then arranging multiple target plant models at a second fixed interval along the line connecting all collision points.
[0015] In some optional embodiments, the method further includes: recognizing a fourth preset gesture of the user, providing a displacement ball according to the fourth preset gesture, allowing the user to control the displacement ball to move; and, while the displacement ball is moving, causing the virtual character corresponding to the user to follow the displacement ball to move in the initial wetland landscape model.
[0016] In some alternative embodiments, the method further includes: recognizing a user's fifth preset gesture, which allows the user to move, scale, and rotate layout objects in the initial wetland landscape model. Attached Figure Description
[0017] One or more embodiments are illustrated by way of example with reference to the accompanying drawings, and these illustrative descriptions do not constitute a limitation on the embodiments.
[0018] Figure 1 This is a flowchart of a virtual wetland landscape layout method according to an embodiment of this application;
[0019] Figure 2 This is a schematic diagram of parameters for a tree model provided according to an embodiment of this application;
[0020] Figure 3 This is a schematic diagram of parameters of a land cover model provided according to an embodiment of this application;
[0021] Figure 4 This is a framework diagram for constructing an initial wetland landscape model according to an embodiment of this application;
[0022] Figure 5 This is a schematic diagram of a trajectory template and a corresponding layout pattern provided according to an embodiment of this application;
[0023] Figure 6 This is a schematic diagram of a virtual wetland landscape provided according to an embodiment of this application;
[0024] Figure 7 This is a schematic diagram of a gesture command provided according to an embodiment of this application;
[0025] Figure 8 This is an architecture diagram of a method for implementing a virtual wetland landscape according to an embodiment of this application;
[0026] Figure 9 This is a schematic diagram of a virtual wetland landscape system according to an embodiment of this application;
[0027] Figure 10 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the various embodiments of this application will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details have been provided in the various embodiments of this application to help readers better understand this application. However, the technical solutions claimed in this application can be implemented even without these technical details and various changes and modifications based on the following embodiments. The division of the various embodiments below is for the convenience of description and should not constitute any limitation on the specific implementation of this application. The various embodiments can be combined with and referenced by each other without contradiction.
[0029] Traditional virtual wetland landscape layout methods require the use of a keyboard and mouse, which is complex and limits the freedom of layout, failing to meet users' personalized experience.
[0030] The virtual wetland landscape layout method provided in this application is based on a gesture recognition algorithm. With the continuous development and improvement of virtual reality technology, gesture recognition algorithms have matured and are widely used in the field of human-computer interaction. Gesture recognition technology can accurately perceive the user's hand movements and postures and convert them into system-understandable instructions, enabling interaction with the virtual environment. Through gesture recognition technology, users can operate using natural and intuitive gestures without relying on traditional input devices such as keyboards and mice. This interaction method is more in line with human natural habits and provides a more direct and efficient operating experience. Furthermore, gesture recognition technology has good scalability and adaptability. It can adapt to the hand characteristics and habits of different users, allowing users to interact with the virtual environment in a personalized way. The gesture recognition algorithm can also flexibly support multiple gestures and be customized and extended according to specific application scenarios to meet the needs of different users. Therefore, it can effectively solve the technical problem that complex operations lead to limited layout freedom and an inability to meet the personalized experience of users.
[0031] One embodiment of this application relates to a virtual wetland landscape layout method. The implementation details of the virtual wetland landscape layout method of this embodiment are described in detail below. The following implementation details are provided for ease of understanding and are not necessary for implementing this solution.
[0032] The specific process of the virtual wetland landscape layout method in this embodiment can be described as follows: Figure 1 As shown, it includes:
[0033] Step 101: Recognize the user's first preset gesture, and provide a plant model library containing multiple plant models based on the first preset gesture, so that the user can select a target plant model laid out in the pre-built initial wetland landscape model from the plant model library.
[0034] Specifically, the virtual wetland landscape layout method in this embodiment involves laying out an initial wetland landscape model. The layout specifically involves placing plant models within the initial wetland landscape model, and the selection of plant models can be triggered by a user's first preset gesture. Therefore, upon recognizing the first preset gesture, a plant model library is displayed through a user interface (UI), allowing the user to select the target plant model to be placed in the initial wetland landscape model from the plant model library displayed on the UI panel.
[0035] The plant model library contains multiple plant models to provide a diverse and scalable selection, supporting the creation and simulation of virtual environments and ecological landscapes. In a specific example, the library includes 16 tree models and 18 ground cover models, each with detailed parameter descriptions, including crown width, tree height, and branching point height, etc. Figure 2 The 16 tree models shown and Figure 3 The 18 ground cover models shown.
[0036] In one example, the specific process of constructing the initial wetland landscape model in this embodiment can be found in [reference needed]. Figure 4 The frame shown:
[0037] The first step is to acquire satellite and real-world images of the wetland landscape to complete data collection.
[0038] The second step involves using satellite and real-world images as data sources, and then using AutoCAD to extract building boundaries, road boundaries, and water body boundaries from the wetland landscape to obtain CAD plan drawings.
[0039] The third step involves using SketchUp modeling software to parse the CAD 2D drawing and perform cover processing and extrusion processing to convert it into a 3D model. Then, materials and texture mapping are added. Furthermore, texture image paths are loaded into the material sphere, and parameters such as diffuse reflection and transparency are set to give the 3D model a realistic material feel.
[0040] The fourth step is to import the framework model into the Unity engine, use Unity's particle system to create special effects such as water and smoke, and edit the scene's terrain, adjusting the elevation and adding natural terrain features.
[0041] Fifth, to improve the rendering performance and smoothness of the scene, the Unity engine's LOD rendering technology is used to render the model. LOD technology automatically adjusts the level of detail of the model based on the observer's distance and viewpoint, rendering only high-detail models near the observer to reduce the model load, improve rendering efficiency, and ensure a smooth visual experience during interaction with the model.
[0042] Step 102: Identify the user's second set gesture, record the user's fingertip trajectory according to the second set gesture, and select a target trajectory template that matches the fingertip trajectory from the pre-stored trajectory template library. The target trajectory template is used to indicate the target layout pattern of the target plant model in the initial wetland landscape model.
[0043] Specifically, after selecting the target plant model for layout, the process begins by choosing its placement pattern within the initial wetland landscape model. This process is triggered by a second pre-defined gesture from the user. Upon recognizing the gesture, the system records the user's fingertip trajectory. For example, if the user's thumb and middle finger are pinching together, the system records the trajectory of the index finger. Recording stops when the pinching ends. During this process, a 3D point set is acquired using equidistant sampling, and these points are projected onto the camera to convert them into a 2D point set. This projected 2D point set is then input into a trajectory recognizer and compared with pre-stored trajectory templates in a library to select a target trajectory template that matches the fingertip trajectory. Each trajectory template corresponds to a specific layout pattern; therefore, the selected target trajectory template indicates the target layout pattern of the target plant model within the initial wetland landscape model.
[0044] The trajectory template library specifically includes the following trajectory templates: solitary planting trajectory templates corresponding to the solitary planting layout mode, row planting trajectory templates corresponding to the row planting layout mode, clump planting trajectory templates corresponding to the clump planting layout mode, patch planting trajectory templates corresponding to the patch planting layout mode, and free trajectory templates corresponding to the free arrangement mode. Each trajectory template and its corresponding layout mode are as follows: Figure 5 As shown. Therefore, the user's fingertip trajectory is compared with the templates for solitary planting, row planting, clump planting, patch planting, and free trajectory to determine the layout pattern corresponding to the user's fingertip trajectory. This layout pattern is the target layout pattern of the target plant model that the user wants to lay out. This embodiment integrates the user's basic setting gestures with the trajectory template by setting trajectory templates, rather than determining the layout pattern of the plant model solely based on the user's basic setting gestures. This optimizes gesture commands, making them easier to understand and master, and reducing the learning difficulty and time cost.
[0045] Step 103: Recognize the user's third preset gesture, provide an interactive ray based on the third preset gesture, so that the user can manipulate the interactive ray to collide with the ground of the initial wetland landscape model, and determine the target layout position of the target plant model in the target layout mode based on the collision point between the interactive ray and the ground.
[0046] Specifically, after selecting the target plant model and its target layout pattern, the process begins by choosing the target plant model's location within the initial wetland landscape model. This process is triggered by the user's third pre-defined gesture. Therefore, upon recognizing the second pre-defined gesture, an interactive ray extends forward along the user's corresponding virtual character's wrist, allowing the user to manipulate this ray to collide with the ground of the initial wetland landscape model. The user can control this interactive ray to collide with the ground at least once. Several collision points between the interactive ray and the ground are recorded. Based on the target plant model's target layout pattern, a target collision point is selected from these collision points, and the target layout position of the target plant model is determined based on the location of the target collision point.
[0047] Assuming the target layout pattern of the target plant model is a solitary planting pattern or a clump planting pattern, the first collision point where the interactive ray collides with the ground is taken as the target collision point. That is, the target layout position of the target plant model is determined based on the location of the first collision point.
[0048] Assuming the target layout pattern of the target plant model is a row planting pattern, the first two collision points where the interactive ray collides with the ground are taken as the target collision points. That is, the target layout position of the target plant model is determined based on the location of the first two collision points.
[0049] Assuming the target layout pattern of the target plant model is a patchwork layout pattern, the first four collision points where the interactive ray collides with the ground are taken as the target collision points. That is, the target layout position of the target plant model is determined based on the location of the four collision points.
[0050] Assuming the target layout mode of the target plant model is a free layout mode, then all collision points where the interactive ray collides with the ground are taken as target collision points, that is, the location of all collision points determines the target layout position of the target plant model.
[0051] Step 104: At the target layout location, the target plant model is laid out in the initial wetland landscape model using the target layout mode, and the target wetland landscape model is rendered.
[0052] Specifically, after selecting the target plant model to be laid out, the target layout mode of the target plant model, and the target layout location of the target plant model, the layout operation of the target plant model in the initial wetland landscape model begins. That is, at the target layout location, the target plant model is laid out in the initial wetland landscape model using the target layout mode, and the target plant model can be generated by the plant configuration algorithm.
[0053] Assuming the target plant model's target layout pattern is an isolated plant layout pattern, then place a target plant model at the location of the first collision point.
[0054] Assuming the target plant model's layout pattern is a row planting pattern, multiple target plant models are placed at a fixed interval between the first and second collision points. Assume the coordinates of the first and second collision points are... , The number of target plant models in the layout is The first fixed spacing is Then from Start with a fixed spacing Iterative placement 100 trees, of which and The calculation formulas are as follows:
[0055] ;
[0056] Assuming the target plant model's layout pattern is a clump planting pattern, multiple target plant models are placed on a circle centered at the first collision point and with the crown width of the target plant model as its diameter. Specifically, on the circle centered at the first collision point and with the crown width of the target plant model as its diameter, three vectors in random directions are generated within the intervals (0°, 60°), (120°, 180°), and (240°, 300°), respectively. The collision points of these three vectors with the circle are the placement positions of the target plant models, meaning the number of target plant models placed in the clump planting pattern is 3.
[0057] Assuming the target plant model's layout pattern is a patchwork layout, multiple target plant models will be placed within the area enclosed by the first four collision points. Assume the coordinates of these four collision points are as follows: , , , The number of target plant model layouts is , The calculation formula is:
[0058]
[0059] in, Let be the area of the polygon enclosed by the four collision points. It is the area of a circle with the crown width of the target plant model as its diameter.
[0060] Assuming the target layout mode of the target plant model is a free layout mode, multiple target plant models are laid out along the line connecting all collision points at a second fixed interval. The value of the second fixed interval can be equal to the value of the first fixed interval mentioned above.
[0061] It should be noted that the above layout patterns can be implemented in combination. After using any layout pattern or combination of layout patterns to lay out the target plant models, the distance between any two target plant models is greater than the crown width of the target plant model.
[0062] At the target layout location, after placing the target plant models in the initial wetland landscape model using the target layout mode, the target wetland landscape model is rendered. This target wetland landscape model is a virtual wetland landscape that meets the user's personalized needs, such as... Figure 6 As shown.
[0063] In this embodiment, upon recognizing the user's first pre-defined gesture, a plant model library containing multiple plant models is provided, allowing the user to select a target plant model from the library to be placed in a pre-built initial wetland landscape model, thus completing the selection of the layout object. Upon recognizing the user's second pre-defined gesture, the user's fingertip trajectory is recorded. This trajectory determines the target layout pattern of the aforementioned target plant model within the initial wetland landscape model, thus completing the selection of the layout pattern. Upon recognizing the user's third pre-defined gesture, an interactive ray is provided, allowing the user to manipulate the ray to collide with the ground. Based on the collision point between the ray and the ground, the target layout position of the target plant model within the target layout pattern is determined, thus completing the selection of the layout position. Finally, at the target layout position, the target plant model is placed in the initial wetland landscape model using the target layout pattern, completing the operation of placing the layout object in the virtual wetland landscape. In this application, users can trigger different operations (i.e., layout object selection, layout mode selection, and layout position selection) through different gestures. Compared with using a keyboard and mouse to perform these operations, users do not need to rely on external devices, making the interaction with the virtual wetland landscape simpler and more convenient, thus improving the user experience. Furthermore, users can freely select layout objects, layout modes, and layout positions through gestures, allowing the virtual wetland landscape to be arranged according to user preferences, providing a better personalized experience. In addition, this application not only defines multiple set gestures to trigger different layout operations but also defines trajectory templates. By combining set gestures with trajectory templates to complete layout mode selection, overly complex gesture commands are eliminated, optimizing gesture commands and making it easier for users to learn them, thus reducing the time cost of customizing the virtual wetland landscape layout.
[0064] In some embodiments, the virtual wetland landscape layout method of this application also defines other gesture commands, including:
[0065] The fourth preset gesture, such as the palm facing away from the camera with four fingers bent, provides a movement ball for the user to control. After recognizing the user's fourth preset gesture, the virtual character corresponding to the user can follow the movement of the movement ball within the initial wetland landscape model, thus completing the movement of the user's perspective within the virtual wetland landscape. Assume the user's initial coordinates are vector... The coordinate vector after the movement is Then the movement speed The calculation formula is:
[0066]
[0067] in, This is the proportionality coefficient.
[0068] The fifth set gesture, such as the grab gesture, allows users to move, scale, and rotate layout objects in the initial wetland landscape model. That is, the user faces the camera, makes the fifth set gesture, and then begins to move, scale, and rotate the layout objects.
[0069] In some embodiments, the gesture commands defined in the virtual wetland landscape layout method of this application also include, for example: Figure 7 Several gesture commands are shown:
[0070] The stop gesture, which involves spreading your five fingers and facing the back of your hand towards the camera, can be used to terminate the current operation.
[0071] Panel switching gestures, i.e., swiping with the palm, can be used to switch panels.
[0072] Viewport control gestures include: single-hand drag viewport gestures and two-hand zoom viewport gestures.
[0073] One-handed dragging of the viewport allows for viewport displacement; in the gesture trigger event, the starting position of the hand is obtained as the starting point. Continuously listen for gesture movement events, and obtain the current position of the hand as the endpoint within the movement event. Invert the displacement vector between the starting and ending points and multiply it by a scaling factor. This is the camera displacement. Assume the original camera coordinates are... New camera coordinates The calculation formula is: .
[0074] The two-hand zoom gesture is used to trigger the viewport zoom operation; the distance between the two hands determines the zoom ratio. Assume initially, the coordinate vectors of the two hands are recorded as follows: and The Euclidean distance between them is After the displacement occurs, the new coordinate vector is recorded as follows: and The corresponding Euclidean distance is Scaling ratio The calculation formula is:
[0075]
[0076] in, This is the proportionality coefficient.
[0077] In one embodiment, the virtual wetland landscape layout method of this application can be applied to, for example... Figure 8 The architecture shown includes: a data management module, a virtual environment module, a gesture recognition module, and an interaction module.
[0078] The data management module is responsible for managing and maintaining the wetland landscape model's data, such as plant models and parameters, to ensure the system functions properly and provides the necessary functionality. The virtual environment module utilizes virtual reality technology and a graphics engine to provide realistic visual effects, offering users an immersive experience. The gesture recognition module is responsible for defining gesture commands and recognizing user gestures. The interaction module translates user gestures and actions into system-understandable instructions and controls the arrangement of the virtual wetland landscape, enabling human-computer interaction.
[0079] The steps of the various methods described above are only for clarity. In practice, they can be combined into one step or some steps can be split into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this application. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, but without changing the core design of the algorithm and process, are also within the scope of protection of this application.
[0080] Another embodiment of this application relates to a virtual wetland landscape layout system. The implementation details of this virtual wetland landscape layout system are described below. The following details are provided for ease of understanding and are not essential for implementing this solution. A schematic diagram of the virtual wetland landscape layout system in this embodiment can be seen as follows: Figure 9 As shown, it includes: layout object selection module 901, layout mode selection module 902, layout position selection module 903 and layout rendering module 904.
[0081] The layout object selection module 901 is used to recognize the user's first set gesture and provide a plant model library containing multiple plant models based on the first set gesture, so that the user can select the target plant model to be laid out in the pre-built initial wetland landscape model from the plant model library.
[0082] The layout mode selection module 902 is used to recognize the user's second set gesture, record the user's fingertip trajectory according to the second set gesture, and select the target trajectory template that matches the fingertip trajectory from the pre-stored trajectory template library. The target trajectory template is used to indicate the target layout mode of the target plant model in the initial wetland landscape model.
[0083] The layout location selection module 903 is used to recognize the user's third set gesture, provide an interactive ray based on the third set gesture, and allow the user to manipulate the interactive ray to collide with the ground of the initial wetland landscape model. Based on the collision point between the interactive ray and the ground, the target layout location of the target plant model in the target layout mode is determined.
[0084] The layout rendering module 904 is used to lay out the target plant model in the initial wetland landscape model at the target layout location using the target layout mode, and then render the target wetland landscape model.
[0085] It is not difficult to see that this embodiment is a system embodiment corresponding to the above method embodiments, and this embodiment can be implemented in conjunction with the above method embodiments. The relevant technical details and technical effects mentioned in the above embodiments are still valid in this embodiment, and will not be repeated here to reduce repetition. Accordingly, the relevant technical details mentioned in this embodiment can also be applied to the above embodiments.
[0086] It is worth mentioning that all modules involved in this embodiment are logical modules. In practical applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. Furthermore, to highlight the innovative aspects of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed in this application; however, this does not mean that other units are absent in this embodiment.
[0087] Another embodiment of this application relates to an electronic device, such as... Figure 10 As shown, it includes: at least one processor 1001; and a memory 1002 communicatively connected to the at least one processor 1001; wherein the memory 1002 stores instructions executable by the at least one processor 1001, the instructions being executed by the at least one processor 1001 to enable the at least one processor 1001 to execute the virtual wetland landscape layout method in the above embodiments.
[0088] The memory and processor are connected via a bus, which can include any number of interconnecting buses and bridges, connecting various circuits of one or more processors and memories. The bus can also connect various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and will not be described further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by the processor is transmitted over the wireless medium via an antenna, which further receives data and transmits it to the processor.
[0089] The processor manages the bus and general processing, and also provides various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory is used to store data used by the processor during operation.
[0090] Another embodiment of this application relates to a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the method embodiments described above.
[0091] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0092] Those skilled in the art will understand that the above embodiments are specific embodiments for implementing this application, and in practical applications, various changes can be made to them in form and detail without departing from the spirit and scope of this application.
Claims
1. A method for arranging a virtual wetland landscape, characterized in that, include: The system recognizes the user's first preset gesture and provides a plant model library containing multiple plant models based on the first preset gesture, so that the user can select a target plant model laid out in a pre-built initial wetland landscape model from the plant model library. The system identifies the user's second set gesture, records the user's fingertip trajectory based on the second set gesture, and selects a target trajectory template that matches the fingertip trajectory from a pre-stored trajectory template library. The target trajectory template is used to indicate the target layout pattern of the target plant model in the initial wetland landscape model. The system identifies the user's third preset gesture, provides an interactive ray based on the third preset gesture, and allows the user to manipulate the interactive ray to collide with the ground of the initial wetland landscape model. Based on the collision point between the interactive ray and the ground, the system determines the target layout position of the target plant model in the target layout mode. At the target layout location, the target plant model is laid out in the initial wetland landscape model using the target layout mode, and the target wetland landscape model is rendered. The trajectory template library includes an isolated planting trajectory template corresponding to the isolated planting layout mode, a row planting trajectory template corresponding to the row planting layout mode, a clump planting trajectory template corresponding to the clump planting layout mode, a patch planting trajectory template corresponding to the patch planting layout mode, and a free trajectory template corresponding to the free layout mode. Determining the target layout position of the target plant model in the target layout pattern based on the collision point between the interactive ray and the ground includes: Record several collision points where the interactive ray collides with the ground; select a target collision point from the several collision points according to the target layout pattern, and determine the target layout position according to the location of the target collision point; The step of selecting a target collision point from the plurality of collision points according to the target layout pattern includes: If the target layout pattern is the solitary planting pattern or the clump planting pattern, then the first collision point where the interactive ray collides with the ground is taken as the target collision point; if the target layout pattern is the row planting pattern, then the first two collision points where the interactive ray collides with the ground are taken as the target collision points; if the target layout pattern is the patch planting pattern, then the first four collision points where the interactive ray collides with the ground are taken as the target collision points; if the target layout pattern is the free layout pattern, then all collision points where the interactive ray collides with the ground are taken as the target collision points. The step of arranging the target plant model in the initial wetland landscape model at the target layout location using the target layout pattern includes: If the target layout pattern is the solitary planting layout pattern, then one target plant model is placed at the location of the first collision point; if the target layout pattern is the row planting layout pattern, then multiple target plant models are placed between the first and second collision points at a first fixed interval; if the target layout pattern is the clump planting layout pattern, then multiple target plant models are placed on a circle with the first collision point as the center and the crown width of the target plant model as the diameter; if the target layout pattern is the patch planting layout pattern, then multiple target plant models are placed within the area enclosed by the first four collision points; if the target layout pattern is the free layout pattern, then multiple target plant models are placed on the line connecting all collision points at a second fixed interval.
2. The virtual wetland landscape layout method according to claim 1, characterized in that, The method further includes: The system recognizes the user's fourth preset gesture and provides a displacement ball based on the fourth preset gesture, allowing the user to control the displacement ball to move. As the displacement ball moves, the virtual character corresponding to the user follows the displacement ball and moves within the initial wetland landscape model.
3. The virtual wetland landscape layout method according to claim 2, characterized in that, The method further includes: The system recognizes the user's fifth preset gesture, which allows the user to move, scale, and rotate layout objects in the initial wetland landscape model.
4. A virtual wetland landscape layout system, characterized in that, include: The layout object selection module is used to recognize the user's first set gesture and provide a plant model library containing multiple plant models according to the first set gesture, so that the user can select the target plant model to be laid out in the pre-built initial wetland landscape model from the plant model library. The layout mode selection module is used to recognize the user's second preset gesture, record the user's fingertip trajectory according to the second preset gesture, and select a target trajectory template that matches the fingertip trajectory from a pre-stored trajectory template library. The target trajectory template is used to indicate the target layout mode of the target plant model in the initial wetland landscape model. The trajectory template library includes a solitary plant trajectory template corresponding to the solitary plant layout mode, a row plant trajectory template corresponding to the row plant layout mode, a clump plant trajectory template corresponding to the clump plant layout mode, a patch plant trajectory template corresponding to the patch layout mode, and a free trajectory template corresponding to the free layout mode. The layout location selection module is used to recognize the user's third preset gesture, provide an interactive ray based on the third preset gesture, so that the user can control the interactive ray to collide with the ground of the initial wetland landscape model, and determine the target layout location of the target plant model in the target layout mode based on the collision point between the interactive ray and the ground. The layout location selection module is further configured to record several collision points where the interactive ray collides with the ground; select a target collision point from the several collision points according to the target layout mode, and determine the target layout location based on the location of the target collision point; wherein, if the target layout mode is the solitary planting layout mode or the clump planting layout mode, the first collision point where the interactive ray collides with the ground is taken as the target collision point; if the target layout mode is the row planting layout mode, the first two collision points where the interactive ray collides with the ground are taken as the target collision point; if the target layout mode is the patch planting layout mode, the first four collision points where the interactive ray collides with the ground are taken as the target collision point; if the target layout mode is the free layout mode, all collision points where the interactive ray collides with the ground are taken as the target collision point; The layout rendering module is used to lay out the target plant model in the initial wetland landscape model at the target layout location using the target layout mode, and render the target wetland landscape model. Specifically, if the target layout pattern is the solitary planting layout pattern, then one target plant model is placed at the location of the first collision point; if the target layout pattern is the row planting layout pattern, then multiple target plant models are placed between the first and second collision points at a first fixed interval; if the target layout pattern is the clump planting layout pattern, then multiple target plant models are placed on a circle with the first collision point as the center and the crown width of the target plant model as the diameter; if the target layout pattern is the patch planting layout pattern, then multiple target plant models are placed within the area enclosed by the first four collision points; if the target layout pattern is the free layout pattern, then multiple target plant models are placed on the line connecting all collision points at a second fixed interval.
5. An electronic device, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the virtual wetland landscape layout method as described in any one of claims 1 to 3.
6. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the virtual wetland landscape layout method as described in any one of claims 1 to 3.