Scene generation method and device
By acquiring the original data and influencing factors of objects within a unified application development platform, determining and rendering the data, the problem of separating scene generation and rendering is solved, enabling real-time effect viewing and efficient scene construction, thus improving visual effects and creation efficiency.
Patent Information
- Application Number
- CN202511662843.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-13
- Publication Date
- 2026-02-06
AI Technical Summary
The separation of scene generation and game engine rendering in existing technologies leads to low creative efficiency and slow iteration speed, and artists cannot view scene effects in real time.
Within a unified application development platform, target rendering data is determined by acquiring the original object data and influencing factors of the target object, and rendering is performed based on the rendering data, achieving a deep integration of scene generation and rendering, allowing artists to view and adjust the effects in real time.
It improves the efficiency and accuracy of scene construction, ensures that scene elements follow specific rules, and enhances visual effects and creative efficiency.
Smart Images

Figure CN121482272A_ABST
Abstract
Description
Technical Field
[0001] The embodiments in this specification relate to the field of application development technology, and in particular to a scene generation method and apparatus. Background Technology
[0002] Scene generation is one of the core technologies in computer graphics and game development. Its purpose is to create virtual environments through automated or semi-automated methods, thereby improving development efficiency and reducing manual production costs.
[0003] Currently, scene generation in game and virtual reality development typically relies on separate, specialized software. The mainstream workflow involves first generating data for scene objects such as terrain and vegetation using third-party tools, and then importing this data into the game engine for rendering. This architecture, separating the generation and rendering stages, prevents artists from viewing the scene's appearance in the final engine environment in real time during the creation process. Every modification requires cumbersome import and export operations, severely hindering creative efficiency and iteration speed. Therefore, there is an urgent need for an integrated solution that deeply integrates scene generation with game engine rendering to achieve real-time interaction, rapid adjustments, and efficient virtual scene construction. Summary of the Invention
[0004] In view of this, embodiments of this specification provide a scene generation method. One or more embodiments of this specification also relate to a scene generation apparatus, a computing device, a computer-readable storage medium, and a computer program product, to address the technical deficiencies existing in the prior art.
[0005] According to a first aspect of the embodiments of this specification, a scene generation method is provided, applied to an application development platform, comprising: Obtain the original data of the target object in the target application scenario, as well as the influencing factors that affect the generation of the target object, wherein the type of the target object corresponds to the type of the influencing factor; Based on the object's original data and influencing factors, determine the target rendering data for the target object; The target object is rendered based on the target rendering data to generate the target application scenario.
[0006] According to a second aspect of the embodiments of this specification, a scene generation apparatus is provided, applied to an application development platform, comprising: The acquisition module is configured to acquire the original data of the target object in the target application scenario, as well as the influencing factors that affect the generation of the target object, wherein the type of the target object corresponds to the type of the influencing factor; The determination module is configured to determine the target rendering data of the target object based on the object's original data and influence factors. The rendering module is configured to render the target object based on the target rendering data, to generate a target application scenario.
[0007] According to a third aspect of an embodiment of the present specification, a computing device is provided, comprising: a memory and a processor; The memory is configured to store computer executable instructions, and the processor is configured to execute the computer executable instructions, which, when executed by the processor, implement the steps of the above-mentioned scene generation method.
[0008] According to a fourth aspect of an embodiment of the present specification, a computer readable storage medium is provided, which stores computer executable instructions, which, when executed by a processor, implement the steps of the above-mentioned scene generation method.
[0009] According to a fifth aspect of an embodiment of the present specification, a computer program product is provided, comprising computer programs / instructions, which, when executed by a processor, implement the steps of the above-mentioned scene generation method.
[0010] One embodiment of the present specification implements a scene generation method, which is applied to an application development platform, comprising: obtaining object original data of a target object in a target application scenario and an influence factor affecting generation of the target object, wherein the type of the target object corresponds to the type of the influence factor; determining target rendering data of the target object based on the object original data and the influence factor; rendering the target object based on the target rendering data to generate the target application scenario.
[0011] In one embodiment of the present specification, by determining the target rendering data of the target object based on the object original data and the influence factor corresponding to the object type in the unified application development platform, and rendering the target object based on the target rendering data, the artist can view the performance of the target object in the game scenario in real time, and in the case that the rendering effect is not satisfactory, the artist can generate a scene effect meeting the expectation by modifying the object original data and / or the influence factor, thereby avoiding tedious import and export operations, and improving the efficiency and accuracy of scene construction. In addition, by dynamically associating the influence factor with a specific object type, it is ensured that the generation of the scene element strictly follows the exclusive rules thereof, thereby improving the visual effect of the scene element. BRIEF DESCRIPTION OF DRAWINGS
[0012] Figure 1 is a flowchart of a scene generation method provided by one embodiment of the present specification; Figure 2 is a process flowchart of a scene generation method provided by one embodiment of the present specification; Figure 3This is a schematic diagram of the structure of a scene generation device provided in one embodiment of this specification; Figure 4 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation
[0013] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0014] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0015] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0016] Furthermore, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. Moreover, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0017] This specification provides a scene generation method, and also relates to a scene generation apparatus, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail in the following embodiments.
[0018] See Figure 1 , Figure 1A flowchart of a scene generation method according to an embodiment of this specification is shown. The scene generation method is applied to an application development platform and specifically includes the following steps 102-106.
[0019] Step 102: Obtain the original data of the target object in the target application scenario, as well as the influencing factors that affect the generation of the target object, wherein the type of the target object corresponds to the type of the influencing factor.
[0020] The application development platform refers to an integrated development environment that provides a unified and fully functional technical framework for core application logic writing, resource management, content creation, and final real-time rendering and output. It deeply integrates scene editing, procedural generation tools, resource libraries, physical systems, and real-time rendering engines, enabling developers (such as artists) to directly create and modify resources within a unified software environment and instantly preview their final visual effects in the target application environment.
[0021] In actual implementation, the Unreal Engine (UE) can be used as the application development platform in this embodiment to provide technical support for the procedural generation and real-time rendering of this embodiment.
[0022] The target object refers to the entity that needs to be rendered and represented in the target application scenario.
[0023] Among them, the object's original data refers to the set of static attributes inherent to the target object itself and independent of the external environment. It defines the object's basic identity and internal structure and is the most basic information unit constituting the object.
[0024] Example location: For vegetation: the raw data of the object is the vegetation model grid, suitable ecological conditions for growth, species type, etc. It answers the basic question of "what kind of plant is this".
[0025] For roads: the raw data of the object is the mesh model of the road segment, the paving material such as asphalt or flagstone, etc. It answers the question "What basic components make up this road?"
[0026] Among them, the influencing factor refers to the rules, environmental conditions, and dynamic parameters external to the target object itself that drive its generation, distribution, evolution, and final performance. It determines the state and behavior of the object in a specific context.
[0027] Example location: For vegetation: influencing factors include environmental conditions such as temperature, humidity, slope, and altitude, as well as procedural rules such as distribution density and competition rules. It determines "where this tree should appear, how densely it should grow, and how it should coexist with other plants".
[0028] For roads: Influencing factors include urban layout, location of main roads and functional areas, traffic flow patterns, and terrain slope. It determines "how roads should be routed, which areas they should connect, and how they should adapt to terrain undulations."
[0029] It should be understood that different types of scene objects, determined by their own physical or logical characteristics, will be affected by different types of external factors.
[0030] In this embodiment, each object type (such as vegetation, terrain, and buildings) has its own dedicated, customized processing module (i.e., a procedural generation tool), and each module only receives and processes specific influencing factors related to it. For example: Vegetation type corresponds to ecological influencing factors (such as temperature, humidity, and slope).
[0031] The terrain type corresponds to the physical simulation influencing factors (such as wind, heat, and erosion intensity).
[0032] Building types correspond to grammatical rules and planning influencing factors (such as building grammar, road network, and regional functions).
[0033] Weather types correspond to dynamic state influencing factors (such as time).
[0034] Step 104: Determine the target rendering data of the target object based on the object's original data and influence factors.
[0035] Among them, target rendering data refers to the data that is ultimately passed to the graphics rendering engine to draw the target object on the screen.
[0036] In one optional implementation of this embodiment, the target object includes terrain, the original object data includes terrain height data, and the influencing factors include terrain erosion parameters. Based on the object's original data and influencing factors, determine the target rendering data for the target object, including: Based on terrain erosion parameters, the terrain height data is eroded to obtain target height data, which is then used as the target rendering data for the terrain.
[0037] Among them, terrain height data is usually a terrain height map, in which the value of each pixel represents the terrain height (altitude) at that location.
[0038] Typically, black (RGB: 0,0,0) represents the lowest point of the terrain (such as sea level or valley floor).
[0039] White (RGB: 255,255,255) represents the highest point of the terrain (such as a mountain peak).
[0040] Gray, which falls between black and white, represents the middle of the height range.
[0041] The terrain erosion parameters control various attributes of the virtual erosion process, such as: rainfall (controlling how much water falls on the terrain surface); erosion rate (controlling how easily water carries away soil); deposition rate (controlling when and where the sediment carried by the water is deposited); and number of iterations (controlling the duration of the simulated erosion process). Erosion simulation is an algorithmic process that simulates the shaping effects of water (rainwater, rivers) and temperature (thermal expansion and contraction, freeze-thaw cycles) on terrain in nature. The algorithm calculates on the terrain height data based on the "terrain erosion parameters" to simulate natural phenomena such as water erosion of gullies and sediment deposition forming riverbanks.
[0042] The target elevation data is the new elevation data obtained after erosion processing. It represents a more natural and realistic terrain morphology after being eroded by natural forces.
[0043] In this embodiment, the target rendering data is the "target height data". The rendering engine reads this final height map, generates the corresponding 3D mesh, and applies textures to it, thereby presenting a realistic terrain.
[0044] In one optional embodiment of this example, the terrain erosion parameters include at least one of hydraulic parameters, thermal parameters, and wind parameters. Based on the terrain erosion parameters, erosion simulation is performed on the terrain height data to obtain target height data, including: Based on at least one of the hydraulic, thermal, and wind parameters, erosion simulation is performed on the terrain height data to obtain the target height data.
[0045] Hydraulic parameters are used to simulate the shaping effect of liquid water (rainfall, rivers) on the Earth's surface and are crucial for the formation of river valleys, river networks, alluvial plains, and other water-based landforms. Hydraulic parameters can include, but are not limited to, the following: Rainfall / Rainfall Intensity: Used to control the amount of rain falling on a certain area per unit of time. It is usually a grayscale map (rainfall map), with white representing heavy rain and gray representing moderate rain. Areas with high rainfall have greater water flow, stronger erosion, and are more likely to form distinct river channels.
[0046] Water flow velocity: Used to influence the kinetic energy and sediment-carrying capacity of water. It is usually treated as a global physical constant or automatically calculated in simulations from slope and water volume. It can affect river morphology; faster flow results in stronger erosion and steeper channels, while slower flow leads to predominantly sedimentation and wider, shallower channels.
[0047] For example, hydraulic parameters include the area of rainfall and the amount of rainfall. In a specified area of rainfall, water volume is added to the terrain (which can be a water field) based on the rainfall; water flows from high to low, and the direction and velocity of the flow are calculated based on the terrain elevation and the amount of water; the flow erodes the riverbed, especially when the flow velocity is high, the erosion is stronger; when the flow velocity decreases, the carried sediment is deposited; long-term water erosion will form a channel upstream, and a riverbed will form downstream due to deposition.
[0048] Thermodynamic parameters are used to simulate physical weathering caused by temperature changes (thermal expansion and contraction) and material slippage under gravity, primarily affecting terrain smoothness and slope stability. These thermodynamic parameters may include, but are not limited to, the following: Temperature field / temperature variation range: This defines the source and intensity of heat. It is usually represented by a grayscale map (thermal map or temperature field map). This map can be obtained in several ways, such as by hand-drawing: directly drawing "sunny slopes" (white, high temperature / strong temperature difference) and "shady slopes" (black, low temperature / weak temperature difference); or by procedural generation: automatically calculated based on slope aspect (south-facing slopes receive more sunlight) and altitude (the higher the altitude, the lower the temperature).
[0049] Surface thermal sensitivity: Defines the degree to which different surface materials (such as rocks and soils) respond to temperature changes. For example, granite and shale will fracture at different rates under the same temperature change. It is typically represented by a grayscale map or parameters tied to the surface type. It determines the proportionality factor by which the temperature field translates into actual erosion efficiency. Areas with high sensitivity are prone to weathering even with small temperature changes.
[0050] For example, terrain evolution is simulated through a temperature-dependent physical simulation process. First, a temperature value is calculated for each terrain unit based on global thermodynamic parameters and terrain height (e.g., following a rule that temperatures decrease with increasing height). Then, this temperature field is used as input to simulate the fracturing and debris sliding processes of rocks due to thermal expansion and contraction using a temperature-dependent diffusion equation. In this equation, the thermal diffusivity is defined as a function of temperature, which makes the diffusion rate with height vary with temperature, thus realistically simulating the physical phenomena of thermal erosion.
[0051] Wind parameters are used to simulate the process of wind transporting sand grains and eroding and depositing them on the earth's surface, primarily shaping aeolian and wind-eroded landforms. Wind parameters can include, but are not limited to, the following: Wind direction and intensity: Wind direction determines the orientation of sand dunes and the direction of wind erosion grooves. Intensity determines the wind's ability to carry sand and its erosive power.
[0052] Erosion threshold: The minimum wind intensity required to initiate the movement of sand grains. Below this threshold, wind will not erode the earth's surface.
[0053] Deposition threshold: The critical wind speed at which sand is deposited. When the wind speed is lower than this value due to obstacles (such as mountains or vegetation), sand particles will be deposited.
[0054] For example, based on the wind direction, the wind speed and direction of each terrain unit (pixel) are calculated; based on the wind speed and terrain height, the ability of the wind to carry sand particles is calculated (usually proportional to the wind speed); as the wind travels, it slows down when it encounters an obstacle (high ground), causing sand particles to be deposited; in low-lying areas or on the leeward side, the wind speed decreases, also causing deposition.
[0055] In practice, application development platforms (such as UE engines) develop terrain generation tools that simulate physical erosion based on wind, water, and heat. The terrain height map is input into the GPU; thermal, water, and wind parameters for each region of the terrain can be specified; the computation shader simulates the erosion process based on these parameters, and after multiple simulation iterations, terrain with natural characteristics is obtained.
[0056] In the embodiments described in this specification, by performing erosion simulation on terrain height data, the generated terrain shape can be made natural and conform to the landform laws of the real world, thereby improving the visual quality of the final rendered image.
[0057] In one optional implementation of this embodiment, the target object includes vegetation, the original object data includes vegetation attribute information, and the influencing factors include at least one environmental parameter of each region in the target scene. Based on the object's original data and influencing factors, determine the target rendering data for the target object, including: Based on vegetation attribute information and at least one first environmental parameter of the first region, vegetation composition information of the first region is determined, wherein the vegetation composition information is used to indicate the vegetation type, vegetation quantity and / or vegetation age of the first region, and the first region is any one of the regions. Based on vegetation composition information, the target rendering data of vegetation in the first region is determined.
[0058] Among them, vegetation attribute information is used to define "what" a type of vegetation is and "what kind of environment it prefers".
[0059] Vegetation attribute information includes, but is not limited to: vegetation type (e.g., pine, oak, cactus), ecological habits (e.g., shade-loving or sun-loving? drought-tolerant or moisture-loving? adaptable to acidic or alkaline soil? what is the suitable growth altitude and temperature range?), and model assets (corresponding 3D models, textures, and other resources in the computer).
[0060] For example, a database records the attributes of "birch trees": they like sunlight, are cold-resistant, and prefer moist soil.
[0061] The environmental parameters of each region in the target scene typically include, but are not limited to: Topographic parameters: elevation, slope, aspect (sunny or shady slope); Climate parameters: temperature, precipitation, and light intensity (usually calculated from slope aspect and solar trajectory); Soil parameters: soil moisture, soil fertility, soil pH; Other factors include distance from the water source and the degree of human interference.
[0062] Example: The environmental parameters of a certain "first area" in the scene may be: altitude 1500 meters, slope 30 degrees, south-facing slope (sufficient sunlight), and dry soil.
[0063] It should be noted that, for efficient processing, the target scene is divided into many small units, and the first region is any one of these units. At least one first environmental parameter refers to the environmental factor data (such as its altitude, slope, soil moisture, etc.) corresponding to this specific unit.
[0064] When an application development platform needs to generate vegetation for a region, it reads at least one environmental parameter of that region (e.g., light intensity, soil moisture), queries the vegetation attribute information database, and matches it with at least one environmental parameter of that region to determine the vegetation whose ecological habits match those of that region.
[0065] In the embodiments described in this specification, by accurately matching vegetation attribute information with environmental parameters of each region, the distribution of vegetation in the scene is ensured to conform to ecological principles, making the final scene an ecosystem that conforms to natural laws. Furthermore, users only need to define the environmental parameters (such as temperature maps) and vegetation attribute information for each region, and the platform can automatically calculate and fill in suitable vegetation for each region in the scene, improving scene generation efficiency.
[0066] In an optional implementation of this embodiment, the vegetation attribute information includes environmental matching degree, which indicates the matching range of the corresponding vegetation type under at least one environmental parameter; based on the vegetation attribute information and at least one first environmental parameter of the first region, the vegetation composition information of the first region is determined, including: Based on the matching range of at least one vegetation type under at least one environmental parameter, and at least one first environmental parameter of the first region, determine the degree of matching between the first region and at least one vegetation type; The vegetation composition information of the first region is determined based on the degree of matching between the first region and at least one vegetation type.
[0067] The environmental fit defines a suitable numerical range for at least one environmental parameter of a vegetation type. This range can be a simple minimum / maximum value or a more complex preference function (e.g., using a Gaussian curve to represent the "optimal range").
[0068] Simple range: [minimum, maximum], scores high within the range and low outside the range.
[0069] Preference function: Defines a center value and a decay rate. The closer to the center value, the higher the matching degree, and the farther away, the lower the matching degree.
[0070] Example location: The vegetation library contains multiple vegetation types, and each type has a predefined environmental matching degree (matching range) for different environmental parameters (temperature, humidity, slope, etc.).
[0071] For the first region in the target scene, the specific values of at least one first environmental parameter were obtained (e.g., temperature = 15°C, humidity = 50%, slope = 10°).
[0072] The platform will iterate through at least one vegetation type (e.g., pine, birch, moss) in the vegetation database. For each vegetation type, the system will compare its matching range with the first environmental parameter of the first region and calculate a matching degree score.
[0073] Calculation example: Actual soil moisture content in the area: 50%.
[0074] Vegetation A (moisture-loving): Matching range [70%, 100%]. 50% is below the minimum requirement, matching degree = 0.
[0075] Vegetation B (Neutral): Matching range [40%, 80%]. 50% falls within the range, so the match level is 1.
[0076] Vegetation C (Drought-resistant): Matching range [0%, 50%]. 50% is at the upper limit of the range, so the matching degree is 1.
[0077] If there are multiple environmental parameters (such as humidity and slope being considered simultaneously), the system will calculate a matching degree for each parameter, and then combine them into a comprehensive matching degree score through weighted averaging or other methods.
[0078] The system now has a list showing the overall matching score for all vegetation types in the first region.
[0079] Based on these scores, the system applies decision rules to generate the final vegetation composition information: Vegetation type: Typically, only vegetation types with a matching degree exceeding a certain threshold are selected (e.g., only those with a score > 0.6). This ensures that only plants adapted to the local environment are planted.
[0080] Vegetation quantity: The higher the matching degree of a vegetation type, the higher its quantity (density) will generally be. For example, plants with a matching degree of 0.9 will grow more densely than plants with a matching degree of 0.7.
[0081] Vegetation age: The degree of matching can directly or indirectly affect vegetation age. In areas with a high degree of matching, plants can be set to be healthier and more mature (older); in areas with a low degree of matching, plants may be set to be stunted and poorly growing (even if they may be young in age).
[0082] In the embodiments described in this specification, by predefining the "matching range" for each vegetation type under various environmental parameters, the platform can calculate the precise "matching degree" based on the actual environmental data of the first region. This ensures that the distribution of vegetation strictly follows ecological laws. For example, in the gradient zone where soil moisture decreases from high to low, vegetation types will exhibit a smooth and natural transition according to their respective moisture "matching ranges," rather than abrupt switching, greatly improving the scientific accuracy and realism of the generated results. Furthermore, the "matching range" is easy to modify and expand. Artists do not need to modify the core algorithm; they can easily simulate the vegetation composition of different geographical regions (such as North American forests and East Asian forests) simply by adjusting the "matching range" of different vegetation types, making the solution highly adaptable and configurable.
[0083] In another optional implementation of this embodiment, instead of using a predefined matching range, a machine learning model is used. This model takes vegetation attribute information and environmental parameters as input and directly outputs the vegetation composition information of the area.
[0084] In an optional implementation of this embodiment, the scene generation method further includes: Determine the initial vegetation distribution information in the first region; If the initial vegetation distribution information indicates that the distribution positions of the first vegetation and the second vegetation overlap, a random offset is determined, and based on the random offset, the distribution positions of the first vegetation and / or the second vegetation are adjusted to obtain the candidate vegetation distribution information in the first region, wherein the first vegetation and the second vegetation are any two vegetation in the first region; based on the vegetation composition information and the candidate vegetation distribution information in the first region, the target rendering data of the vegetation in the first region is determined.
[0085] The initial vegetation distribution information is typically a list containing all vegetation instances, each with its vegetation type and distribution location (X, Y, Z coordinates). Since the locations may be randomly generated based on an algorithm (such as Poisson sampling), or because the model itself has a large canopy, it's easy for two or more vegetation models to visually and geometrically overlap—for example, a branch of one tree might be penetrating the trunk of another, or a shrub might be growing inside a tree trunk. This is highly unrealistic.
[0086] Overlapping distribution locations specifically refer to the intersection of the colliders or bounding boxes of two vegetation instances (first vegetation and second vegetation) in three-dimensional space. The system will identify this situation through physical collision detection or simple distance judgment.
[0087] In this embodiment, a random, minute positional adjustment—a random offset—is introduced to address the overlap problem. This random offset is typically a two-dimensional vector (ΔX, ΔZ) representing a random displacement on the horizontal plane. Sometimes it may also include a very small vertical component ΔY to simulate uneven ground. Its randomness ensures that the adjusted vegetation does not exhibit a regular, rigid arrangement, maintaining a natural feel. Furthermore, the offset is usually limited to a small range to avoid severely disrupting the original distribution density and ecological intent.
[0088] Candidate vegetation distribution information is an intermediate optimization result obtained after performing one (or more) rounds of overlap detection and position offset adjustment on the initial vegetation distribution information.
[0089] In the embodiments described in this specification, by detecting and adjusting the "overlapping distribution positions" of the first and second vegetation, the unrealistic phenomenon of trees, shrubs, and other models embedding and interweaving with each other is eliminated. This optimization of the micro-layout ensures that each plant is independent in the final rendered image, increasing visual credibility. In addition, by introducing "random offsets" for fine-tuning the positions, the vegetation community presents an irregular distribution as if it were growing naturally while avoiding interweaving, enhancing the realism of the scene.
[0090] In an optional implementation of this embodiment, the target rendering data of vegetation in the first region is determined based on the vegetation composition information and candidate vegetation distribution information in the first region, including: If the candidate vegetation distribution information indicates that the distribution locations of the third vegetation and the fourth vegetation overlap, then the number of vegetation in the first region is reduced to obtain the target number of vegetation in the first region. Based on the number of target vegetation in the first region, the candidate vegetation distribution information is adjusted to obtain the target vegetation distribution information; Based on vegetation composition information and target vegetation distribution information, the target rendering data of vegetation in the first region is determined.
[0091] It should be noted that if the vegetation density in certain areas is too high or the vegetation model is very large, overlap cannot be avoided even with offset. The platform will reduce the vegetation density in the area to ensure visual quality.
[0092] After generating candidate vegetation distribution information (i.e., a layout that has undergone one round of random offset adjustment), the platform will perform overlap detection again.
[0093] If any overlap is still detected in the candidate distributions (i.e., "the distribution locations of the third and fourth vegetation types overlap"), the system will initiate a vegetation reduction procedure. The system will reduce the vegetation quantity in the first region. Specific reduction strategies could include: Proportional reduction: All vegetation types are reduced in the same proportion.
[0094] Preferential species: Based on the previously calculated matching degree, vegetation with a lower matching degree is removed first.
[0095] Random removal: Randomly remove a portion of vegetation instances.
[0096] Through this step, the platform obtains the target vegetation quantity for the area.
[0097] The platform re-runs the distribution algorithm (such as Poisson sampling) based on the new, smaller number of target vegetation units. Because the number is reduced, there is more space between the vegetation units in the new layout algorithm, making it easier to generate a non-overlapping layout. This entirely new layout is the target vegetation distribution information.
[0098] In the embodiments of this specification, in the face of the model overlap problem that may still remain after random offset adjustment, by reducing the amount of vegetation and regenerating the layout, it is ensured that the final target rendering data is conflict-free in physical space, fundamentally eliminating any possible visual glitches.
[0099] In another optional implementation of this embodiment, if the candidate vegetation distribution information indicates that the distribution locations of the third vegetation and the fourth vegetation overlap, the location and quantity are not changed. Instead, the visual overlap is reduced by adjusting the shape of the vegetation (e.g., scaling, rotation) while retaining the original distribution density.
[0100] In an optional implementation of this embodiment, the original object data further includes at least one vegetation type generation priority; if the candidate vegetation distribution information indicates that the distribution locations of the third vegetation and the fourth vegetation overlap, then the number of vegetation in the first region is reduced to obtain the target number of vegetation in the first region, including: If the candidate vegetation distribution information indicates that the distribution locations of the third and fourth vegetation overlap, then based on the generation priority of the third and fourth vegetation, the number of the third or fourth vegetation is reduced to obtain the target vegetation quantity in the first region.
[0101] The generation priority is used to quantify the competitiveness of a corresponding vegetation type in the struggle for living space. The higher the priority, the stronger the vegetation is in ecological competition, the more resilient it is, and the less likely it is to be squeezed out.
[0102] By prioritizing vegetation data generation, this simulates the "competitive filtering" principle in nature. When two vegetation instances become irreconcilably conflicted due to spatial resources, the platform acts as "natural selection," eliminating the weaker competitor. Spatial overlap is resolved by removing vegetation with lower competitive priority. This ensures that the final vegetation community is a stable community dominated by dominant species, simulating real-world competition.
[0103] The platform detected overlapping distribution locations between the third and fourth vegetation types in the candidate vegetation distribution information. This indicates that simple fine-tuning of displacement is insufficient, necessitating a more direct "removal" strategy. Instead of immediately deleting one, the platform first queries the generation priority of each vegetation type. Example priority setting: "Dominant tree species," which constitute the main body of the forest, are set to high priority, while "shrubs" or "ground cover plants" under the forest canopy are set to lower priority. The platform compares the generation priorities of the third and fourth vegetation types and removes the instance with the lower priority. For example, if the third vegetation is "pine tree" (priority = high) and the fourth vegetation is "weed" (priority = low), the platform will automatically remove the "weed," thus resolving the overlap issue while preserving the more important pine tree.
[0104] In the embodiments described in this specification, competitive filtering is used to prioritize the preservation of species with high survival priority and eliminate species with low survival priority when removing vegetation. This accurately simulates the "survival of the fittest" law in nature, so that the final vegetation community is no longer a simple set of models, but a community with a stable structure and in accordance with ecological laws after digital survival competition filtering.
[0105] In one optional implementation of this embodiment, the target object includes a building, the original object data includes building description information, and the influencing factors include spatial attribute information of each region in the target scene. The spatial attribute information is used to indicate at least one of the region type and region size of the corresponding region. Based on the object's original data and influencing factors, determine the target rendering data for the target object, including: At least one building area is determined based on the spatial attribute information of each area in the target scene; Based on building description information, determine the building metadata of the target building in the target building area, wherein the target building area is any one of at least one building area; Based on the building metadata of at least one target building in the target building area, determine the target rendering data of the building.
[0106] The building description information describes how the building is broken down into its different components and how these components are assembled together. It specifies the building's structural composition. For example: A high-rise building may consist of a foundation, multiple repeating floor sections, and a roof section.
[0107] Each part can be further subdivided according to rules. For example, the basic part may be a commercial floor or lobby, the floor part may be a residential floor or an office floor, and the roof may be a flat roof or a sloping roof, etc.
[0108] Among these, the spatial attribute information of a region refers to external factors that influence the distribution and attributes of buildings within a scene. Typically, the spatial attribute information of a region includes, but is not limited to: Area type: What is the intended use of this land? Is it planned as a residential area, commercial area, or planting area? This determines whether buildings are needed, and may also determine what style of buildings are required.
[0109] Area size: What is the area and shape of this plot of land? This determines the size and number of buildings that can be accommodated.
[0110] Among them, building areas are continuous areas marked as suitable for building construction after analyzing the spatial attribute information of various areas in the entire target scene. For example, all residential and commercial plots.
[0111] The platform reads the spatial attribute information of the entire target scene. Based on this information (mainly the area type), the system automatically identifies and delineates all building areas.
[0112] Example: The system analyzes a map's planning map, extracts all areas marked "R1" (residential area) and "C2" (commercial area) as building areas, and excludes areas marked "forest", "farmland" and "water area".
[0113] Next, the platform selects a target building area (e.g., a specific residential plot) from all building areas and queries the building description information database to find generation rules that match the area type (e.g., "residential area").
[0114] Based on the rules and specific parameters such as the size of the region, the system generates building metadata for one or more target buildings in the region.
[0115] Example: Input: Target area type = "Residential Area", Area size = "2000 square meters"; Query description information, rule shows: "Residential areas can generate townhouses or small apartments. When the plot area is greater than 1500㎡, townhouses are given priority."; Output: Building metadata = {Type: Townhouse_Model B, Location: (x1, y1, z1), Dimensions: Width 10m x Depth 15m x Height 12m, ...}.
[0116] The platform collects building metadata for all target building areas and binds this metadata (describing what kind of building it is, where it is, and how big it is) to the corresponding specific 3D model assets. Then, it outputs target rendering data for all buildings in the entire scene, which is a complete list including position, rotation, scale, and model references. This data can be directly fed into the engine to render a well-planned and stylistically consistent digital city.
[0117] In the embodiments described in this specification, spatial attribute information (such as area type and size) ensures the rationality of building clusters in macro-planning. For example, high-rise buildings are generated in commercial areas, and low-density buildings are generated in residential areas. At the same time, based on flexibly definable building description information, the system can generate building instances with different shapes, sizes, and combinations in each area, effectively avoiding the repetition and monotony caused by traditional copy-and-paste, and creating a realistic urban scene that is both unified and varied.
[0118] In one optional implementation of this embodiment, based on building description information, the building metadata of the target building in the target building area is determined, including: Based on the spatial attribute information of the target building area, determine the target building description information corresponding to the target building area from at least one building description information; Based on the target building description information, the building resources are assembled to determine the structural attribute information of the target buildings corresponding to the target building area; Based on the structural attribute information of the target building, determine the building metadata of the target building in the target building area.
[0119] Among them, the target building description information is a set of specific "architectural syntax" rules applicable to the current target building area, which is filtered based on the spatial attribute information of the target building area.
[0120] Example: If the target area is a "high-end residential area", then the target building description information may be a set of shape syntax rules for generating "modern villas" or "townhouses".
[0121] Building resources are reusable libraries or asset libraries of basic components required for building construction. They are concrete, parameterized model blocks. Their content may include, but is not limited to: Geometric components: such as wall panels, floors, roofs, and columns of different sizes; Functional components: such as windows, doors, and balconies of various styles; Decorative components: such as railings, moldings, and signs.
[0122] The platform selects appropriate components from the building resource library based on the instructions of the target building description information (syntax rules), and performs positioning, rotation, and scaling to splice them into a complete building structure.
[0123] Structural attribute information describes the final geometric composition of the target building; it is data about which parts (resources) the building consists of and how these parts are arranged in three-dimensional space.
[0124] For example, the platform reads the spatial attribute information of the target building area (e.g., area type = commercial center, area size = large). Then, it queries and matches within a global "rule base" (at least one building description) to find the rule most suitable for the area's conditions. For instance, it might match a set of generation rules called "modern glass curtain wall skyscraper," which is the target building description.
[0125] Next, the instructions in the target building description information will be executed.
[0126] Rule instruction: Generate a basic floor with a height of 4 meters.
[0127] Select a "Glass Curtain Wall Facade_Unit A" and an "Office Building Floor_Standard" component from the building resource library and assemble them according to the rules.
[0128] The facade was vertically divided into three parts, with the middle part replaced by a wall with windows.
[0129] Perform the split and select "Windowed Glass Curtain Wall_Unit B" from the resource library to replace the middle part.
[0130] This process is recursive and iterative, adding more floors, rooftop equipment, entrance canopies, and so on.
[0131] Once all rules have been executed, a complete building structure, precisely assembled from multiple resource components, is generated, and the position, rotation, and scaling information of all its components are recorded as structural attribute information.
[0132] In the embodiments described in this specification, the system dynamically filters the most matching target building description information based on the spatial attribute information of the target building area (such as area type and size), ensuring a high degree of fit between the generated building and its surrounding environment. For example, the system can automatically apply the "townhouse" rule to narrow residential plots and the "skyscraper" rule to open commercial centers. This area awareness capability makes building generation no longer a mechanical copy, but an intelligent and precise creation based on specific site conditions, enhancing the rationality and realism of the generated results.
[0133] In another optional implementation of this embodiment, the building metadata of the target building in the target building area is determined based on the building description information, including: inputting the building description information into a pre-trained building generation model, the model generating the building structure based on the architectural style and spatial constraints; directly outputting the structural attribute information of the target building through the model; and determining the building metadata of the target building based on the output structural attribute information.
[0134] In one optional implementation of this embodiment, the target object includes roads, the original object data includes road attribute information, the influencing factors include regional structure information of the target scene, and spatial attribute information of each region, wherein the spatial attribute information is used to indicate at least one of the region type and region size of the corresponding region; the regional structure information is used to indicate the connection relationship of each region in the target scene; Based on the object's original data and influencing factors, determine the target rendering data for the target object, including: Based on the regional structure information of each region in the target scene, determine whether there is a target road connecting the second region and the third region, where the second region and the third region are any two regions in each region; If there is no target road connecting the second and third regions, then a target road connecting the second and third regions is generated based on the spatial attribute information of the first and second regions, as well as the road attribute information. Based on the target roads in the second and third regions, determine the target rendering data for the roads.
[0135] Road attribute information is a data set that defines the characteristics of a road and the rules governing its generation. It typically includes, but is not limited to: Road types: such as highways, main roads, secondary roads, rural roads, and pedestrian streets.
[0136] Morphological parameters: road baseline width, number of lanes, curvature limits, slope limits, etc.
[0137] Generation rules: Rules for matching different road types with area types (e.g., "Generate a main road between the industrial zone and the port").
[0138] Asset association: Which 3D models, materials, and ancillary facilities (such as streetlights and guardrail models) correspond to different types of roads.
[0139] Among them, the region structure information describes the topological connection relationship between various regions in the target scene.
[0140] For example, the platform reads the region structure information of the entire scene; it iterates through all region pairs and checks whether there is already a connecting road between any two regions (the second region and the third region). The decision logic is: IF: Region structure information indicates that the second region and the third region are adjacent but have no road connection; THEN: "Road needs to be generated".
[0141] Next, for all pairs of areas marked as "requiring road generation," the platform initiates the road generation process. The generation process needs to comprehensively consider the spatial attribute information of the connecting parties (the second and third areas) as well as the road attribute information.
[0142] The region type determines the road type (applying road attribute information). The platform queries the rules in the road attribute information. For example, the rule might be: "Generate a 'main road' when connecting two 'industrial zones' or 'commercial zones'"; "Generate a 'walking path' when connecting a 'residential zone' and a 'park'". Region size and location determine the road path (applying spatial attribute information): The platform calculates an optimal or reasonable path based on the size of the two regions, the relative positions of their center points or entrances, and any potential terrain obstacles. The curvature, slope, etc., of this path are constrained by parameters defined in the road attribute information for the selected road type. Once the path and specific type of the target road are determined, the system converts it into target rendering data that the rendering engine can recognize.
[0143] In the embodiments described in this specification, the connection needs between regions are automatically identified through regional structure information, and missing target roads are dynamically generated accordingly. This avoids the omissions and contradictions that are prone to occur in manual road network planning, ensuring the logical completeness and accessibility of the entire scene. Furthermore, through the synergistic effect of spatial attribute information (such as region type) and road attribute information, the system intelligently determines the level and form of roads. For example, the system automatically generates wide main roads between industrial areas and dense secondary streets within residential areas. This generation logic, closely linked to regional functions, results in a clear and rational hierarchical structure in the final road network, enhancing the planning rationality and visual realism of the scene.
[0144] In an optional implementation of this embodiment, if no target road connects the second region and the third region, a target road connecting the second region and the third region is generated based on the spatial attribute information and road attribute information of the second region and the third region, including: If there is no target road connecting the second and third regions, a primary road connecting the second and third regions is generated based on the spatial attribute information of the second and third regions and the road attribute information. Based on the primary roads, generate secondary roads that connect the primary roads; Based on primary and secondary roads, target roads connecting the second and third areas are determined.
[0145] Primary roads connect large functional blocks such as the second and third zones. Secondary roads connect multiple primary roads to form loops or grids, avoiding the concentration of all traffic on a single arterial road, thereby optimizing the redundancy and efficiency of the overall road network.
[0146] For example, the platform identifies a lack of direct connection between the second and third areas. Therefore, it generates a relatively direct or reasonable primary road between them. At this point, the two areas are connected by a "main artery," but the road network is very fragile. The platform then generates secondary roads with the goal of "optimizing the road network." These secondary roads actively seek out and connect to existing primary roads. At this point, the target road network is a rudimentary, functionally hierarchical road network composed of primary roads and secondary roads connecting them.
[0147] In the embodiments described in this specification, through a two-stage strategy of "first generating primary roads, then generating secondary roads," this solution achieves a structural upgrade from simple paths to a complex road network system. Primary roads serve as the main channels connecting the second and third regions, undertaking core cross-regional transportation functions; secondary roads, through lateral connections and branch extensions, integrate independent primary roads into an interconnected road network system, enhancing the rationality and credibility of the scenario structure.
[0148] In another optional implementation of this embodiment, if there is no target road connecting the second region and the third region, a target road connecting the second region and the third region is generated based on the spatial attribute information of the second region and the third region, as well as the road attribute information. This includes: pre-defining several road patterns (such as grid, ring-radial, etc.), then selecting a pattern according to the spatial attribute information of the two regions, and adjusting the pattern parameters to connect the two regions.
[0149] In one optional implementation of this embodiment, the target object includes weather, the original object data includes at least one weather state, and the influencing factors include spatiotemporal information of each region in the target scene; Based on the object's original data and influencing factors, determine the target rendering data for the target object, including: Based on the historical weather conditions and spatiotemporal information of the fourth region at the previous moment, the target weather conditions of the fourth region at the current moment are determined, where the fourth region is any one of the regions. Based on the target weather state, determine the element parameters of at least one target weather performance element; The target rendering data for weather is determined based on the element parameters of at least one target weather representation element.
[0150] The weather status defines "what kind of weather". For example: sunny, cloudy, overcast, rain, heavy rain, snow, fog, etc., and may include intensity parameters, such as light rain / moderate rain / heavy rain.
[0151] Spatiotemporal information is a key external factor driving weather changes. It encompasses information in both time and space. Time information includes year, month, day, hour, minute, and second. This can be used to simulate seasons, day-night cycles, and the duration of weather events. Spatial information includes the region's latitude and longitude, altitude, and topography (such as mountains and oceans). This can be used to simulate regional climates, such as foggy coastal areas and rainy mountainous regions.
[0152] The target weather state is the final weather type calculated by the platform for the fourth region at the current moment.
[0153] The element parameters of the target weather rendering element are set with specific values for each rendering component, for example: Light: intensity, color, and direction of sunlight; ambient light brightness.
[0154] Skybox: Uses cube maps and color gradients.
[0155] Particle effects: density, size, and falling speed of rain / snow; concentration, height, and color of fog.
[0156] Terrain texture: surface moisture, snow cover.
[0157] For example, the platform uses the fourth region as the processing unit, reads the historical weather status of the region at the previous moment (e.g., it was sunny 2 hours ago) and the current spatiotemporal information (e.g., it is 4 a.m., the season is summer, and the location is coastal); and calculates the target weather status at the current moment according to a set of preset or real meteorological data-based evolution rules.
[0158] For example, the rule is: IF Historical Status = Sunny AND Time = Early Morning AND Season = Summer AND Region = Coastal THEN There is a high probability that it will turn cloudy or foggy.
[0159] Based on this rule, the platform calculates the current target weather condition as light fog.
[0160] Next, visual mapping is performed. Specifically, based on the target weather state (light fog) obtained in the previous step, the corresponding element parameters are searched or calculated in a "visual configuration table".
[0161] Example mapping (light fog): Light intensity reduced by 20%, color leans towards cool gray.
[0162] Skybox: Switches to a hazy sky texture with a light mist.
[0163] Particle effects: Enable a low-concentration, semi-transparent fog particle system, and set the coverage height and concentration.
[0164] Terrain Texture: Slightly increase the humidity map effect on the surface material to simulate dew.
[0165] Then, all the adjusted element parameters are packaged and sent to the various subsystems of the rendering engine. After receiving these unified instructions, the rendering engine will synchronously adjust the lighting system, switch the skybox, control the particle emitter, and modify the shader parameters. Ultimately, the synergistic effect of all these elements perfectly presents the visual perception of the target weather condition of "light fog" on the screen.
[0166] In the embodiments described in this specification, the current weather is calculated by combining the historical weather conditions of the region at the previous moment with the current spatiotemporal information, which can simulate a weather change process that conforms to natural laws. This continuous calculation based on time series makes the weather transition natural and smooth, enhancing the sense of time passage and ecological realism of the scene.
[0167] In some embodiments, the weather status can also be switched in the following ways: Generate a random factor; based on at least one weather state, the random factor, and a preset mapping relationship, determine the target weather state at the current moment, wherein the mapping relationship is used to indicate the correspondence between the random factor in different numerical ranges and at least one weather state.
[0168] In one optional implementation of this embodiment, the application development platform will traverse the terrain grid, calculate the normal vector of each point, and filter out cliff areas.
[0169] When the terrain mesh is very steep, if conventional UV mapping (usually based on horizontal projection) is used, the texture will be stretched because the actual surface area of the steep region is larger than the horizontally projected area. This causes the texture to appear sparse and stretched in the steep regions, looking unnatural.
[0170] In this embodiment, texture stretching is masked by automatically placing models (such as rocks and vegetation) at the edge of the cliff area (i.e., the boundary between steep and flat terrain), while simultaneously increasing visual detail. Specifically, rock meshes are placed in the cliff area according to certain rules (such as random distribution). These rocks will obscure the stretched texture, making the cliff look more natural.
[0171] Step 106: Render the target object based on the target rendering data to generate the target application scene.
[0172] The target rendering data is a structured, complete scene description dataset, specifically including: Instance data: Precisely specifies the rendering properties of each scene object (such as vegetation, buildings, roads, terrain), including its transformation matrix in world space (defining position, rotation, and scaling), the referenced geometry mesh, and surface materials.
[0173] Environmental data: Defines the global state that forms the scene background and atmosphere, including lighting parameters (intensity, color, direction), skybox texture, and post-processing effect parameters (such as particle and shader parameters for simulating weather effects such as rain, snow, and fog).
[0174] The application development platform, acting as the integration execution end, parses and executes the dataset, calls the underlying graphics interface (such as GPU), and synthesizes all the geometry, materials, lighting, and effects into the final sequence of frame images, thus completing the transformation from data to visualization results.
[0175] It should be noted that the generation process of each scene element in the above scene generation method can proceed sequentially according to their dependencies. For example, first, the terrain as the base is generated; then, based on the generated terrain height, slope, environmental factors, and other parameters, vegetation is programmatically distributed. Next, building clusters and road networks are generated; finally, a dynamic weather system is configured for the entire scene.
[0176] In the above scene generation method, each scene element can also be generated independently. Artists with different roles can work independently in their respective modules based on a unified world coordinate system and basic terrain data. They each produce standardized scene asset data (such as topographic maps, vegetation distribution maps, building model sets, road network data, and weather configuration parameters). Finally, all these asset data are imported into the scene graph of the application development platform, where the rendering engine composites and renders them to form a complete and coordinated virtual scene.
[0177] In one optional implementation of this embodiment, the automation capabilities of asset management are further expanded based on the procedural generation of scene elements. Specifically, this solution integrates an automated asset management tool for systematically checking the massive amounts of assets in the project during development. This asset management tool mainly includes automated checks in the following three dimensions: Standardization checks: Verify whether assets meet preset standards, such as checking whether the number of vertices in a 3D model or the resolution of a texture map exceeds a preset performance budget threshold.
[0178] Integrity check: Verify the integrity of the assets, such as whether model materials are missing, whether texture files are missing, etc.
[0179] Reasonableness check: Based on the preset scene design rules, check the reasonableness of the asset space layout, effectively identify and prevent configurations that violate common sense or design constraints, such as preventing the placement of aquatic plant models in desert terrain, which violates common sense or design constraints.
[0180] By using procedural tools to inspect massive amounts of assets, potential rendering errors can be detected in a timely manner, reducing the cost and risk of oversight in manual review and improving the accuracy and efficiency of scene generation.
[0181] In summary, artists can set object raw data and influencing factors in the application development platform. Through this platform, various scene elements for the target application scenario can be automatically generated programmatically based on the object raw data and influencing factors. For example, based on an initial height map and wind, thermal, and hydraulic parameters, terrain is generated through simulation algorithms, replacing the process of artists manually sculpting mountains and ravines with brushes. Similarly, based on vegetation attributes and environmental parameters of each region, vegetation distribution is generated in each area, replacing the work of artists manually placing trees one by one and adjusting their type and size. This means that the artist's responsibility shifts from performing repetitive operations to defining and controlling generation rules (such as setting wind speed and direction, vegetation attributes, and architectural syntax), entrusting the generation of specific, massive amounts of instances to computer algorithms, thus improving the automation level and efficiency of large-scale scene generation. Furthermore, through this programmatic generation technology, physical laws (such as hydraulic erosion) and ecological laws (competitive priority) are transformed into executable algorithms. The resulting scene environment conforms to the natural laws of the real world, eliminating any sense of unrealism and creating an immersive space for players.
[0182] Furthermore, the generation process of all scene elements is developed and run directly within the application development platform. The generated assets (such as heightmaps, instantiated vegetation, and building meshes) are directly converted into target rendering data usable by the engine, without the need for exporting, converting, and re-importing. Artists can see the final rendering effect in real time after adjusting parameters, which further improves the efficiency and accuracy of scene generation. Moreover, the entire generation process is driven by the original object data and influencing factors. Artists can achieve consistent changes in massive amounts of model assets by adjusting a few core parameters, ensuring the uniformity of scene style and making the generation and adjustment of large-scale scenes possible.
[0183] The following is in conjunction with the appendix Figure 2 Taking the application of the scene generation method provided in this specification in a game as an example, the scene generation method will be further explained. Figure 2 The flowchart of a scene generation method provided in one embodiment of this specification is shown, which specifically includes the following steps.
[0184] Step 202: Obtain the scene configuration data of the target game scene.
[0185] Game development platforms (such as Unity or Unreal Engine) read initial data pre-configured by designers or artists. This includes: A basic elevation map: defines the basic outline of the world (such as the prototype of mountains and valleys).
[0186] The environmental parameter configuration table defines the influencing factors (such as soil moisture and light intensity) corresponding to different regional types (such as temperate forest, grassland, and desert), as well as the hydraulic, thermal, and wind parameters of each region.
[0187] A semantic partitioning map is used to mark logical partitions such as urban areas, functional zones, and main road locations.
[0188] Resource Library: Contains all the original data of objects, such as 3D models and vegetation attribute information of different tree species, building description information of various architectural styles, road attribute information of road types, and corresponding art resources such as cliffs and weather effects.
[0189] Step 204: Based on the topographic elevation map, hydraulic parameters, thermal parameters, and wind parameters, the target elevation data is generated and output programmatically using an erosion simulation algorithm.
[0190] The game engine uses an initial height map as a base to simulate virtual natural forces such as flowing water and wind erosion, performing erosion and deposition calculations on the terrain. This process sculpts more realistic ridges, valleys, and plains. Based on the calculated slope, height, and degree of erosion, it automatically assigns corresponding terrain textures to different areas (e.g., rock textures for steep slopes, grass textures for gentle slopes, and sand textures for riverbanks). The output is a richly detailed, visually believable 3D terrain model (mesh) and its accompanying blended textures.
[0191] Step 206: Based on the environmental parameters and vegetation attribute information of each region, determine the vegetation distribution of each region and output the vegetation rendering data.
[0192] Read the terrain data and configured environmental parameters (such as slope, aspect, and height) generated in step 204, and match them with the vegetation attribute information (such as whether a certain tree species prefers sunlight or is drought-resistant) in the resource library.
[0193] On the sunny south-facing slope, the game engine will densely cover sun-loving oak trees.
[0194] In damp river valleys, the game engine generates moisture-loving reed beds.
[0195] The game engine calculates the type, location, size, and density of each type of vegetation (vegetation composition information) and performs collision detection and fine-tuning to prevent trees from overlapping.
[0196] Output a list of target rendering data containing the location, type, and scaling information of all vegetation instances, which is then directly instantiated by the engine.
[0197] Step 208: Based on the regional structure information and road attribute information of each region, generate a road network and output road rendering data.
[0198] The game engine automatically generates a road network based on preset regional structure information (such as mining area A not being connected to town B) and road attribute information (such as the need to use "main roads" to connect industrial areas).
[0199] Step 210: Detect target height data, identify all areas where the slope exceeds the threshold, determine them as cliff areas, and randomly place some rock grids in the cliff areas.
[0200] Step 212: Determine the building area based on the area type indicated by the semantic partitioning map, and generate buildings procedurally in the building area according to the building syntax rules and output the building rendering data.
[0201] The game engine selects the corresponding target building description information (such as the syntax rule for "modern commercial building") based on the spatial attribute information of the area (such as area and location in a commercial district). According to the syntax rule, it selects components such as walls, windows, and roofs from the building resource library, assembles them, and generates a unique building with a reasonable structure.
[0202] Output the building metadata for each building, including the type and spatial transformation information of all its components, for final rendering.
[0203] Step 214: Calculate dynamic weather conditions and output weather rendering data based on at least one weather state and spatiotemporal information.
[0204] The game engine calculates the current target weather condition (such as "light fog on the sea") based on the time and space information of the game world (such as the current time being the evening of autumn in the game and the location being a coastal area) and the historical weather conditions of the previous moment (such as the daytime being sunny).
[0205] Based on the "light fog" status, the game engine automatically adjusts the element parameters of a series of target weather effects: Light: Reduce the intensity of sunlight to make the light softer.
[0206] Skybox: Switch to the hazy twilight skybox.
[0207] Particle effects: Enable and set the concentration and flow speed of fog particles.
[0208] Post-processing: Enable slight depth of field and color filters.
[0209] Output a unified set of target rendering data (i.e., a complete set of shaders and rendering parameters) that drives the visual atmosphere of the entire scene.
[0210] Step 216: Integrate all rendering data, call the graphics engine for unified rendering, and finally generate the target game scene.
[0211] Corresponding to the above method embodiments, this specification also provides embodiments of a scene generation device. Figure 3 A schematic diagram of a scene generation device according to an embodiment of this specification is shown. This scene generation device is applied to an application development platform. Figure 3 As shown, the device includes: The acquisition module 302 is configured to acquire the original object data of the target object in the target application scenario, as well as the influencing factors that affect the generation of the target object, wherein the type of the target object corresponds to the type of the influencing factor; Module 304 is configured to determine the target rendering data of the target object based on the object's original data and influence factors. Rendering module 306 is configured to render the target object based on the target rendering data to generate the target application scene.
[0212] Optionally, the target object includes terrain, the original object data includes terrain height data, and the influencing factors include terrain erosion parameters; the determination module 304 is further configured to: Based on terrain erosion parameters, the terrain height data is eroded to obtain target height data, which is then used as the target rendering data for the terrain.
[0213] Optionally, the target object includes vegetation, the original object data includes vegetation attribute information, and the influencing factors include at least one environmental parameter for each region in the target scene; the determination module 304 is further configured to: Based on vegetation attribute information and at least one first environmental parameter of the first region, vegetation composition information of the first region is determined, wherein the vegetation composition information is used to indicate the vegetation type, vegetation quantity and / or vegetation age of the first region, and the first region is any one of the regions. Based on vegetation composition information, the target rendering data of vegetation in the first region is determined.
[0214] Optionally, the vegetation attribute information includes environmental matching degree, which indicates the matching range of the corresponding vegetation type under at least one environmental parameter; the determination module 304 is further configured to: Based on the matching range of at least one vegetation type under at least one environmental parameter, and at least one first environmental parameter of the first region, determine the degree of matching between the first region and at least one vegetation type; The vegetation composition information of the first region is determined based on the degree of matching between the first region and at least one vegetation type.
[0215] Optionally, module 304 is also configured as follows: Determine the initial vegetation distribution information in the first region; If the initial vegetation distribution information indicates that the distribution positions of the first vegetation and the second vegetation overlap, a random offset is determined, and based on the random offset, the distribution positions of the first vegetation and / or the second vegetation are adjusted to obtain the candidate vegetation distribution information in the first region, wherein the first vegetation and the second vegetation are any two vegetation in the first region; based on the vegetation composition information and the candidate vegetation distribution information in the first region, the target rendering data of the vegetation in the first region is determined.
[0216] Optionally, module 304 is further configured as follows: If the candidate vegetation distribution information indicates that the distribution locations of the third vegetation and the fourth vegetation overlap, then the number of vegetation in the first region is reduced to obtain the target number of vegetation in the first region. Based on the number of target vegetation in the first region, the candidate vegetation distribution information is adjusted to obtain the target vegetation distribution information; Based on vegetation composition information and target vegetation distribution information, the target rendering data of vegetation in the first region is determined.
[0217] Optionally, the object's original data also includes the generation priority of at least one vegetation type; the determination module 304 is further configured to: If the candidate vegetation distribution information indicates that the distribution locations of the third and fourth vegetation overlap, then based on the generation priority of the third and fourth vegetation, the number of the third or fourth vegetation is reduced to obtain the target vegetation quantity in the first region.
[0218] Optionally, the target object includes buildings, the original object data includes building description information, and the influencing factors include spatial attribute information of each region in the target scene. The spatial attribute information is used to indicate at least one of the region type and region size of the corresponding region; the determination module 304 is further configured to: At least one building area is determined based on the spatial attribute information of each area in the target scene; Based on building description information, determine the building metadata of the target building in the target building area, wherein the target building area is any one of at least one building area; Based on the building metadata of at least one target building in the target building area, determine the target rendering data of the building.
[0219] Optionally, module 304 is further configured as follows: Based on the spatial attribute information of the target building area, determine the target building description information corresponding to the target building area from at least one building description information; Based on the target building description information, the building resources are assembled to determine the structural attribute information of the target buildings corresponding to the target building area; Based on the structural attribute information of the target building, determine the building metadata of the target building in the target building area.
[0220] Optionally, the target object includes roads, the original object data includes road attribute information, the influencing factors include regional structure information of the target scene, and spatial attribute information of each region, wherein the spatial attribute information is used to indicate at least one of the region type and region size of the corresponding region; the regional structure information is used to indicate the connection relationship of each region in the target scene; the determining module 304 is further configured to: Based on the regional structure information of each region in the target scene, determine whether there is a target road connecting the second region and the third region, where the second region and the third region are any two regions in each region; If there is no target road connecting the second region and the third region, a target road connecting the second region and the third region is generated based on the spatial attribute information of the first region and the second region, as well as the road attribute information. Based on the target roads in the second and third regions, determine the target rendering data for the roads.
[0221] Optionally, module 304 is further configured as follows: If there is no target road connecting the second and third regions, a primary road connecting the second and third regions is generated based on the spatial attribute information of the second and third regions and the road attribute information. Based on the primary roads, generate secondary roads that connect the primary roads; Based on primary and secondary roads, target roads connecting the second and third areas are determined.
[0222] Optionally, the target object includes weather, the original object data includes at least one weather state, and the influencing factors include spatiotemporal information of each region in the target scene; the determination module 304 is further configured to: Based on the historical weather conditions and spatiotemporal information of the fourth region at the previous moment, the target weather conditions of the fourth region at the current moment are determined, where the fourth region is any one of the regions. Based on the target weather state, determine the element parameters of at least one target weather performance element; The target rendering data for weather is determined based on the element parameters of at least one target weather representation element.
[0223] The above is an illustrative scheme of a scene generation device according to this embodiment. It should be noted that the technical solution of this scene generation device and the technical solution of the scene generation method described above belong to the same concept. For details not described in detail in the technical solution of the scene generation device, please refer to the description of the technical solution of the scene generation method described above.
[0224] Figure 4 A structural block diagram of a computing device 400 according to one embodiment of this specification is shown. The components of the computing device 400 include, but are not limited to, a memory 410 and a processor 420. The processor 420 is connected to the memory 410 via a bus 430, and a database 450 is used to store data.
[0225] The computing device 400 also includes an access device 440, which enables the computing device 400 to communicate via one or more networks 460. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 440 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, or a Near Field Communication (NFC) interface.
[0226] In one embodiment of this specification, the aforementioned components of the computing device 400 and Figure 4 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 4 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0227] The computing device 400 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 400 can also be a mobile or stationary server.
[0228] The processor 420 is configured to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the above-described scene generation method.
[0229] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the scene generation method described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the scene generation method described above.
[0230] An embodiment of this specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the above-described scene generation method.
[0231] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the scene generation method described above belong to the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the scene generation method described above.
[0232] An embodiment of this specification also provides a computer program, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the above-described scene generation method.
[0233] The above is an illustrative scheme of a computer program according to this embodiment. It should be noted that the technical solution of this computer program and the technical solution of the scene generation method described above belong to the same concept. For details not described in detail in the technical solution of the computer program, please refer to the description of the technical solution of the scene generation method described above.
[0234] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0235] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0236] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.
[0237] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0238] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A scene generation method characterized by, The method is applied to an application development platform, and comprises: obtaining object original data of a target object in a target application scenario and an influence factor affecting generation of the target object, wherein a type of the target object corresponds to a type of the influence factor; determining target rendering data of the target object based on the object original data and the influence factor; rendering the target object based on the target rendering data to generate the target application scenario.
2. The method of claim 1, wherein, The target object comprises a terrain, the object original data comprises terrain height data, and the influence factor comprises a terrain erosion parameter. The determining of the target rendering data of the target object based on the object original data and the influence factor comprises: performing erosion processing on the terrain height data based on the terrain erosion parameter to obtain target height data, and taking the target height data as the target rendering data of the terrain.
3. The method of claim 1, wherein, The target object comprises vegetation, the object original data comprises vegetation attribute information, and the influence factor comprises at least one environmental parameter of each region in the target scenario. The determining of the target rendering data of the target object based on the object original data and the influence factor comprises: determining vegetation composition information of a first region based on the vegetation attribute information and at least one first environmental parameter of the first region, wherein the vegetation composition information is used to indicate a vegetation type, a vegetation quantity and / or a vegetation age of the first region, and the first region is any one of the regions; determining target rendering data of vegetation in the first region based on the vegetation composition information.
4. The method of claim 3, wherein, The vegetation attribute information comprises an environmental matching degree, and the environmental matching degree is used to indicate a matching range of a corresponding vegetation type under the at least one environmental parameter; the determining of the vegetation composition information of the first region based on the vegetation attribute information and the at least one first environmental parameter of the first region comprises: determining a matching degree of the first region and the at least one vegetation type based on the matching range of the at least one vegetation type under the at least one environmental parameter and the at least one first environmental parameter of the first region; determining the vegetation composition information of the first region based on the matching degree of the first region and the at least one vegetation type.
5. The method of claim 3, wherein, The method further comprises: determining initial vegetation distribution information in the first region; if the initial vegetation distribution information indicates that a distribution position of first vegetation and second vegetation overlaps, determining a random offset, and adjusting the distribution position of the first vegetation and / or the second vegetation based on the random offset to obtain candidate vegetation distribution information in the first region, wherein the first vegetation and the second vegetation are any two vegetations in the first region; the determining of the target rendering data of vegetation in the first region based on the vegetation composition information and the candidate vegetation distribution information in the first region comprises: determining the target rendering data of vegetation in the first region based on the vegetation composition information and the candidate vegetation distribution information in the first region.
6. The method of claim 5, wherein, The object original data further comprises a generation priority of at least one vegetation type; and the target rendering data of the vegetation in the first region is determined based on the vegetation composition information in the first region and the candidate vegetation distribution information, comprising: If the candidate vegetation distribution information indicates that the distribution positions of the third vegetation and the fourth vegetation overlap, the number of the vegetation of the third vegetation or the fourth vegetation is reduced based on the generation priority of the third vegetation and the fourth vegetation to obtain the target number of the vegetation in the first region; The target vegetation distribution information is obtained by adjusting the candidate vegetation distribution information based on the target number of the vegetation in the first region; The target rendering data of the vegetation in the first region is determined based on the vegetation composition information and the target vegetation distribution information.
7. The method of claim 1, wherein, The target object comprises a building, the object original data comprises building description information, and the influence factor comprises spatial attribute information of each region in the target scene, the spatial attribute information being used to indicate at least one of a region type and a region size of a corresponding region; The target rendering data of the target object is determined based on the object original data and the influence factor, comprising: At least one building region is determined based on the spatial attribute information of each region in the target scene; Building metadata of a target building in a target building region is determined based on the building description information, wherein the target building region is any one of the at least one building region; The target rendering data of the building is determined based on the building metadata of at least one target building in the target building region.
8. The method of claim 7, wherein, The building metadata of the target building in the target building region is determined based on the building description information, comprising: Target building description information corresponding to the target building region is determined from the at least one building description information based on the spatial attribute information of the target building region; Structure attribute information of a target building corresponding to the target building region is determined by assembling building resources based on the target building description information; The building metadata of the target building in the target building region is determined based on the structure attribute information of the target building.
9. The method of claim 1, wherein, The target object comprises a road, the object original data comprises road attribute information, the influence factor comprises region structure information of the target scene and spatial attribute information of each region, wherein the spatial attribute information is used to indicate at least one of a region type and a region size of a corresponding region, and the region structure information is used to indicate a connection relationship between regions in the target scene; The target rendering data of the target object is determined based on the object original data and the influence factor, comprising: Whether there is a target road connecting a second region and a third region is determined based on the region structure information of each region in the target scene, wherein the second region and the third region are any two regions in the regions; If there is no target road connecting the second region and the third region, a primary road connecting the second region and the third region is generated based on spatial attribute information of the second region and the third region and the road attribute information; a secondary road connecting the primary road is generated based on the primary road; a target road connecting the second region and the third region is determined based on the primary road and the secondary road, and target rendering data of the road is determined based on the target road connecting the second region and the third region.
10. The method of claim 1, wherein, The target object includes weather, the object original data includes at least one weather state, and the influence factor includes spatiotemporal information of each region in the target scene; determining target rendering data of the target object based on the object original data and the influence factor includes: determining a target weather state of a fourth region at a current time based on a historical weather state of the fourth region at a previous time and the spatiotemporal information, wherein the fourth region is any one of the regions; determining element parameters of at least one target weather performance element based on the target weather state; determining target rendering data of the weather based on the element parameters of the at least one target weather performance element.
11. A scene generation apparatus, characterized by comprising: Applied to an application development platform, comprising: an acquisition module configured to acquire object original data of a target object in a target application scene and an influence factor affecting generation of the target object, wherein a type of the target object corresponds to a type of the influence factor; a determination module configured to determine target rendering data of the target object based on the object original data and the influence factor; a rendering module configured to render the target object based on the target rendering data to generate the target application scene.
12. A computing device, comprising: comprising: a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions, which realize steps of the scene generation method in any one of claims 1-10 when executed by the processor.
13. A computer-readable storage medium, characterized in that, which stores computer executable instructions, which realize steps of the scene generation method in any one of claims 1-10 when executed by the processor.
14. A computer program product, characterised in that, comprising computer programs / instructions, which realize steps of the scene generation method in any one of claims 1-10 when executed by the processor.