Data processing method and device, equipment and computer readable storage medium
By generating and mapping contour models of texture information, the problem of blurred display of objects in distant scenes was solved, improving the rendering efficiency and display effect of virtual scene space.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2024-12-18
- Publication Date
- 2026-06-19
AI Technical Summary
In virtual scene space, the reduction of polygons in high-precision models of distant scene objects results in blurred display, affecting user experience.
The outline model is generated by stretching the cross-sectional mesh model based on the preset attribute information of scene objects, and the texture information of the facade is obtained from the high-precision model and mapped onto the outline model. Finally, the mapped outline model is rendered in the virtual scene space.
It improves the display effect of scene objects in the virtual scene space, while reducing the rendering burden on the computer and improving rendering efficiency.
Smart Images

Figure CN122240584A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more specifically to a data processing method, apparatus, device, and computer-readable storage medium. Background Technology
[0002] Virtual scene spaces often involve various scene objects, such as buildings, bushes, and trees. When displaying this virtual scene space, it is necessary to consider the distance between each scene object and the camera, and to render and display each scene object accordingly.
[0003] In related technologies, when the camera is far from a scene object, considering that the distant scene object is not the focus of the current rendering, a polygon reduction operation is often performed on the high-precision model of the scene object to obtain a low-precision model, thereby reducing the amount of computer rendering computation. However, this polygon reduction operation will cause the distant scene object to appear blurry. Compared with its high-precision model, the building outlines and sharpness will be greatly reduced, affecting the user experience.
[0004] Therefore, improving the display effect of various scene objects in the virtual scene space is an urgent problem to be solved. Summary of the Invention
[0005] To address the aforementioned technical problems, embodiments of this application provide a data processing method, apparatus, device, and computer-readable storage medium.
[0006] The technical solution adopted in this application is as follows:
[0007] A data processing method, comprising:
[0008] Based on the preset attribute information of the scene object, the cross-sectional mesh model corresponding to the scene object is stretched to obtain the contour model corresponding to the scene object.
[0009] Obtain the high-precision model corresponding to the scene object, and generate the texture information corresponding to each facade based on the modeling data corresponding to each facade of at least one facade in the high-precision model;
[0010] The texture information of each facade is mapped onto the corresponding facade in the outline model to obtain the mapped outline model;
[0011] The mapped outline model is rendered onto the location of the scene object in the virtual scene space to display the mapped outline model.
[0012] A data processing apparatus, comprising:
[0013] The processing unit is used to stretch the cross-sectional mesh model corresponding to the scene object based on the preset attribute information of the scene object to obtain the contour model corresponding to the scene object.
[0014] The acquisition unit is used to acquire the high-precision model corresponding to the scene object, and generate the texture information corresponding to each facade based on the modeling data corresponding to each facade in the high-precision model;
[0015] A mapping unit is used to map the texture information of each facade onto the corresponding facade in the outline model to obtain the mapped outline model.
[0016] The rendering unit is used to render the mapped outline model to the position of the scene object in the virtual scene space, so as to display the mapped outline model.
[0017] In one embodiment of this application, based on the foregoing scheme, the processing unit is further configured to determine the target view for generating texture information from the modeling data corresponding to each facade; under the target view corresponding to each facade, perform sampling processing on the modeling data corresponding to each facade to obtain image sampling data associated with each facade; and generate texture information corresponding to each facade based on the image sampling data of each facade.
[0018] In one embodiment of this application, based on the foregoing scheme, the acquisition unit is further configured to acquire sampling configuration information; the processing unit is further configured to perform sampling configuration processing on the modeling data corresponding to each facade based on the sampling configuration information to obtain the configured modeling data corresponding to each facade; wherein, the sampling configuration processing includes at least setting the sampling light and resolution of the modeling data corresponding to each facade; and performing sampling processing on the configured modeling data corresponding to each facade from the target viewpoint corresponding to each facade to obtain image sampling data associated with each facade.
[0019] In one embodiment of this application, based on the foregoing scheme, the processing unit is further configured to stretch each of the cross-sectional mesh models corresponding to the scene object based on the preset attribute information to obtain at least one contour sub-model; if the number of contour sub-models is at least two, then the at least two contour sub-models are spliced together to obtain the contour model corresponding to the scene object.
[0020] In one embodiment of this application, based on the foregoing scheme, the processing unit is further configured to stitch together the at least two contour sub-models to obtain a candidate contour model; detect hidden surfaces in the candidate contour model, wherein the hidden surfaces are the interfaces between different contour sub-models; and delete the hidden surfaces in the candidate contour model to obtain the contour model corresponding to the scene object.
[0021] In one embodiment of this application, based on the foregoing scheme, the processing unit is further configured to detect the geometric information of the bottom surface of the scene object in the virtual scene space if at least one cross-sectional mesh model preset for the scene object is not obtained; and to stretch the geometric information of the bottom surface of the scene object based on the preset attribute information to obtain the contour model corresponding to the scene object.
[0022] In one embodiment of this application, based on the foregoing scheme, the processing unit is further configured to, if it is detected that the scene object is contained in the screen displaying the virtual scene space, detect the line-of-sight distance between the screen and the scene object in the virtual scene space; and render the mapped contour model to the position corresponding to the scene object based on the line-of-sight distance.
[0023] In one embodiment of this application, based on the foregoing scheme, the rendering unit is further configured to render the mapped contour model to the position corresponding to the scene object if the viewing distance is greater than a preset viewing distance threshold; and to output the high-precision model corresponding to the scene object to the position corresponding to the scene object if the viewing distance is less than or equal to the preset viewing distance threshold.
[0024] In one embodiment of this application, based on the foregoing scheme, the processing unit is further configured to, if other scene objects are detected within a preset distance range corresponding to the location of the scene object, merge the mapped contour model of the scene object with the mapped contour models of the other scene objects to obtain a merged mapped contour model; the rendering unit is further configured to, if the screen displaying the virtual scene space contains the merged mapped contour model, generate a rendering instruction for rendering the merged mapped contour model and send it to the rendering module, so that the rendering module renders the merged mapped contour model based on the rendering instruction to display the merged mapped contour model.
[0025] A data processing device includes a processor and a memory, wherein the memory stores computer-readable instructions, and the computer-readable instructions are executed by the processor to implement the data processing method described above.
[0026] A computer-readable storage medium having stored computer-readable instructions thereon, which, when executed by a computer's processor, cause the computer to perform the data processing method described above.
[0027] A computer program product includes computer-readable instructions that, when executed by a processor, implement the data processing method described above.
[0028] In the above technical solutions:
[0029] Based on the preset attribute information of scene objects, the cross-sectional mesh model corresponding to the scene object can be stretched to obtain its corresponding contour model. Then, a high-precision model of the scene object is obtained, and texture information is generated for the modeling data corresponding to each facade of at least one facade of the high-precision model. Next, the textures of each facade are mapped onto the corresponding facade of the contour model to obtain the mapped contour model. Finally, the mapped contour model is rendered at the location of the scene object in the virtual scene space to display the mapped contour model.
[0030] On one hand, the outline model of the scene object is generated, and then the texture information of each face is generated from the high-precision model of the scene object and mapped onto the outline model. In this way, the generated mapped outline model retains the detailed information of various modeling data on each facade of the high-precision model. Compared with the face reduction processing of the high-precision model in related technologies, this application improves the display effect of various scene objects in the virtual scene space.
[0031] On the other hand, the amount of rendering data corresponding to texture information is significantly reduced compared to the amount of rendering data corresponding to modeling data in high-precision models. This allows for effective reduction of the computer's rendering burden and a substantial improvement in rendering efficiency for virtual scene spaces, while ensuring the display quality of each facade of scene objects.
[0032] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0033] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:
[0034] Figure 1 This is a schematic diagram of a data processing system involved in this application;
[0035] Figure 2 This is a flowchart illustrating a data processing method according to an exemplary embodiment;
[0036] Figure 3 This is a flowchart illustrating a data processing method according to another exemplary embodiment;
[0037] Figure 4a This is a schematic diagram of a contour model generation process involved in this application;
[0038] Figure 4b This is a schematic diagram of another contour model generation process involved in this application;
[0039] Figure 5 This is a flowchart illustrating a data processing method according to another exemplary embodiment;
[0040] Figure 6 This is a flowchart illustrating a data processing method according to another exemplary embodiment;
[0041] Figure 7 This is a schematic diagram illustrating the line-of-sight distance between an image and objects in a scene, as described in this application.
[0042] Figure 8 This is a block diagram illustrating a data processing apparatus according to an exemplary embodiment;
[0043] Figure 9 This is a schematic diagram of the structure of a computer system for a data processing device according to an exemplary embodiment. Detailed Implementation
[0044] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments identical to those described in this application. Rather, they are merely examples of apparatuses and methods identical to some aspects of this application as detailed in the appended claims.
[0045] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in at least one hardware module or integrated circuit, or in different network and / or processor devices and / or microcontroller devices.
[0046] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily need to be performed in the described order. For example, some operations / steps can be broken down, while others can be integrated or partially integrated; therefore, the actual execution order may change depending on the specific circumstances.
[0047] It should be noted that "multiple" as mentioned in this application refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0048] Before introducing the technical solutions of the embodiments of this application, let's first introduce the technical terms involved in the embodiments of this application.
[0049] Imposter is a technique in 3D rendering that uses simple 2D images or minimally simplified 3D geometry instead of complex 3D models to reduce rendering overhead and improve performance. Typically, when viewing objects from a distance, the visual importance of detail decreases; in such cases, imposter can simplify rendering without significantly impacting image quality.
[0050] High-precision models are 3D models composed of numerous geometric details. They have a high face count and typically include complex polygons, rich textures, and fine structural details. These models are primarily used to emphasize visual detail and realism, and are widely used in film and television special effects, 3D modeling demonstrations, and virtual reality scenes that require a high degree of fidelity to the real world. High-precision models can meticulously represent every minute detail of an object, but their computational and rendering resources are significant, and they are generally used only in environments where performance allows.
[0051] Low-precision models are 3D models generated by simplifying or omitting some geometric details, reducing the number of polygons, and lowering texture resolution. Their purpose is to reduce computational complexity and rendering burden. Although low-precision models may lack the realism and detail of high-precision models, they can load and render quickly, and are widely used in real-time rendering, 3D scenes on mobile devices, or long-distance visual representations. Low-precision models achieve a good balance between optimizing performance and ensuring basic visual effects, making them an indispensable component in large-scale scenes.
[0052] Polygon reduction is a simplification process performed on 3D models with a high polygon count. In 3D modeling, to achieve detailed rendering, models are often constructed to be very complex, containing a large number of geometric faces. However, in certain scenarios, such as when the model is in the background or in performance-critical applications, these high-precision models can impose a significant performance burden. Polygon reduction, through specific algorithms and tools, reduces the number of faces in the model while preserving as much of its original shape and key features as possible. This reduces the model's complexity, optimizing rendering efficiency, balancing visual effects and performance, and accelerating data transfer and loading. This process is like slimming down the model, allowing it to participate more efficiently in graphics rendering and other related processes without affecting the overall visual appeal.
[0053] Mesh grids play a crucial role in 3D modeling. They are structures composed of vertices, edges, and faces. Vertices have attributes such as position, normals, and UVs. Position determines the model's orientation in 3D space, normals are used for lighting calculations to give the model appropriate shading, and UVs are used for texture mapping. Edges connect vertices, defining the boundaries of the model's surface. Faces are generally triangles; numerous faces are pieced together, like building blocks, to construct the shape and structure of an object. Mesh grids can represent everything from simple geometric shapes to complex objects, such as game characters or scene models in movies, all built using mesh grids to construct their basic shapes.
[0054] Procedural Content Generation (PCG) is a technology that uses algorithms and programmatic rules to automatically or semi-automatically construct various digital content, such as game content, virtual environments, and works of art. It has a unique operating model and wide application in the field of digital content creation. Its generation process relies primarily on carefully designed mathematical algorithms, logical rules, and specific data structures as the foundation for shaping various types of content. For example, when generating terrain, fractal algorithms may be used to shape natural landforms such as mountains and rivers, and the complexity and diversity of the terrain can be controlled by adjusting the algorithm parameters. This generation method is not simply fully automated; it has a certain degree of flexibility. It can achieve completely independent content generation by the program, such as the vast and randomly changing terrains and endless levels in some sandbox games, all automatically created by the program. Alternatively, a semi-automatic mode can be used, where a template framework of key elements is first set manually, and then the program enriches and expands upon this framework, creating diverse variations.
[0055] In related technologies, when the camera is far from a scene object, considering that the distant scene object is not the focus of the current rendering, a polygon reduction operation is often performed on the high-precision model of the scene object to obtain a low-precision model, thereby reducing the amount of computer rendering computation. However, this polygon reduction operation will cause the distant scene object to appear blurry. Compared with its high-precision model, the building outlines and sharpness will be greatly reduced, affecting the user experience.
[0056] Based on this, embodiments of this application propose a system installation method, a system installation device, a system installation equipment, a computer-readable storage medium, and a computer program product. In these embodiments, a cross-sectional mesh model corresponding to a scene object can be stretched based on preset attribute information to obtain its corresponding contour model. Then, a high-precision model of the scene object is obtained, and texture information is generated for the modeling data corresponding to each facade of at least one facade in the high-precision model. Next, the textures of each facade are mapped onto the corresponding facade of the contour model to obtain the mapped contour model. Finally, the mapped contour model is rendered to the location of the scene object in the virtual scene space to display the mapped contour model. On the one hand, by generating the contour model of the scene object and then generating texture information for each face from the high-precision model of the scene object and mapping it onto the contour model, the generated mapped contour model retains the detailed information of various modeling data on each facade of the high-precision model. Compared to the reduction of the face size of the high-precision model in related technologies, this application improves the display effect of various scene objects in the virtual scene space. On the other hand, the amount of rendering data corresponding to texture information is significantly reduced compared to the amount of rendering data corresponding to modeling data in high-precision models. This allows for effective reduction of the computer's rendering burden and a substantial improvement in rendering efficiency for virtual scene spaces, while ensuring the display quality of each facade of scene objects.
[0057] Please see Figure 1 , Figure 1 This application provides a data processing system, which can be found in the embodiments of this application. Figure 1 , Figure 1 The data processing system shown may include multiple terminal devices 110 and multiple servers 120, wherein a communication connection is established between any terminal device and any server. Terminal devices 110 may include any one or more of smartphones, tablets, laptops, desktop computers, smart in-vehicle devices, and smart wearable devices. Various applications (APPs) related to virtual scene spaces may run within terminal devices 110, such as 3D games, 3D modeling previews, film and television production scenes, virtual reality scenes, and digital twin scenes.
[0058] Server 120 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Terminal device 110 and server 120 can communicate directly or indirectly via wired or wireless communication; this application does not impose any restrictions on this.
[0059] The terminal devices involved in this application can establish a connection with a server and access the server to download software or applications used to support the operation of specific virtual scene spaces. These applications may include 3D games, urban planning software, map simulation software, and other software or apps capable of displaying 3D virtual scene spaces. Terminal devices include smartphones, personal computers, professional graphics workstations, and other devices with network access and data processing capabilities.
[0060] After downloading and launching the corresponding software on their terminal device, users can enter the virtual scene space associated with that software. A virtual scene space is a digital spatial environment constructed using computer technology, capable of simulating and presenting real or pre-set scenes virtually. Virtual scene spaces can utilize various computer graphics techniques, such as 3D modeling, texture mapping, and lighting simulation, to create the geometric shapes and appearances of various objects, terrains, and environmental elements. These elements are arranged according to a specific spatial coordinate system, forming an overall environment with a sense of space and hierarchy. Just as different objects are distributed in specific geographical locations in the real world, virtual buildings, mountains, rivers, etc., in a virtual scene space also have clear relative positional relationships. Users can actively explore and experience the virtual scene space through terminal devices, such as using a mouse, keyboard, gamepad, or interactive actions of VR devices, such as rotating, panning, zooming the camera view, or manipulating virtual characters to move and manipulate objects within it.
[0061] Virtual scene spaces have strong domain adaptability and can be widely used in many fields, such as 3D games, 3D urban planning, and 3D simulation scenes.
[0062] In the specific implementation of this application, user-related data is involved, such as the pinyin sequence, target text, and input process data entered by the user. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.
[0063] Please see Figure 2 , Figure 2 This is a flowchart illustrating a data processing method according to an exemplary embodiment. The method can be applied to... Figure 2 The implementation environment is shown, and the method is specifically executed by a computer. This computer may include a terminal device or a server. Of course, this method can also be applied to other implementation environments, and there is no limitation on the entity executing the method.
[0064] The following section will use a computer as an example to illustrate this data processing method in detail. Figure 2 As shown, in an exemplary embodiment, the method includes at least the following steps:
[0065] S210. Based on the preset attribute information of the scene object, stretch the cross-sectional mesh model corresponding to the scene object to obtain the contour model corresponding to the scene object.
[0066] Scene objects refer to 3D models or their logical representations that serve as basic elements or entities within a computer-generated 3D virtual scene space, used to represent specific visual effects or interactive functions. Scene objects can be elements in the natural environment (such as trees, hills, and water bodies), man-made structures (such as buildings, furniture, and vehicles), or dynamic characters or specific props (such as people and animals). These objects typically possess geometric shapes, texture maps, physical properties, and behavioral logic to enhance the immersion and realism of the scene.
[0067] The preset attribute information may include at least the height of the scene object, or the height of each component of the scene object. The computer can generate a contour model that matches the total height of the scene object based on the preset attribute information. When generating the contour model of the scene object, the computer can also obtain at least one cross-sectional mesh model corresponding to the scene object. This cross-section can be the top cross-section or the bottom cross-section of the scene object. Based on the cross-sectional mesh model and the preset attribute information, the computer can generate the contour model of the scene object.
[0068] A contour model, in particular, is a simplified 3D model generated by simplifying the geometry of a complex model, retaining only its basic shape or boundary features. This contour model primarily represents the overall outline or external structure of an object, without involving internal details or subtle features. Contour models have relatively little geometric data and typically consist of large areas of planes or simple curved surfaces.
[0069] It should be noted that a low-precision model is obtained by reducing the geometric structure, surface material texture, and other features of a high-precision model. This typically results in the loss of some less important geometric details from the high-precision model, such as small geometric edges or complex surfaces. The low-precision model also reduces some surface material texture features and resolution from the high-precision model, but it still retains some features.
[0070] The contour model preserves the shape and boundary features of scene objects, omitting internal and surface details, but without losing the basic outlines and shapes of the scene objects. The contour model ensures that even in the case of extreme simplification, the appearance contours of scene objects remain easily recognizable. In the embodiments of this application, the contour model can be understood as a geometric cube whose interior and surface do not contain the modeling data or surface details corresponding to the high-precision model, only displaying the minimalist contours corresponding to the high-precision model.
[0071] When generating the outline model of a scene object, the computer can obtain the corresponding cross-sectional mesh model. The number, shape, and size of the cross-sectional mesh model can be determined based on the shape of the scene object.
[0072] When there is only one cross-sectional mesh model, the computer can obtain the preset attribute information of the scene object. At this time, the preset attribute information only includes the height corresponding to the cross-sectional mesh model. The computer can stretch the cross-sectional mesh model to that height to obtain the minimalist outline model corresponding to the scene object.
[0073] When there are at least two cross-sectional mesh models, the preset attribute information can include the height corresponding to each cross-sectional mesh model, allowing the computer to stretch each cross-sectional mesh model to the corresponding height and generate a geometric cube corresponding to each cross-sectional mesh model. In this way, by piecing together the geometric cubes corresponding to each cross-sectional mesh model according to a specific positional relationship, the outline model corresponding to the scene object can be obtained.
[0074] This method generates contour models that significantly reduce computational and rendering burdens while maintaining object shape recognition accuracy. Therefore, it is often used in long-distance displays, performance optimization, or low-resource scenarios. It can be combined with texture information extracted from high-precision models to enhance visual effects through texture mapping, while avoiding the resource overhead associated with high-precision models.
[0075] S220. Obtain the high-precision model corresponding to the scene object, and generate the texture information corresponding to each facade based on the modeling data corresponding to each facade of at least one facade in the high-precision model.
[0076] The computer can extract modeling data for each facade from at least one facade in the high-precision model corresponding to the scene object, and generate texture information for each facade based on this data. The high-precision model, as a high-precision representation of the scene object, contains rich geometric details and texture data, and can accurately reflect the appearance characteristics of the scene object.
[0077] Texture information can be generated by baking the facade of a high-precision model. Baking can also be referred to as sampling. In an exemplary embodiment, the computer first determines the target viewpoint corresponding to each facade, such as a viewing direction orthogonal to the facade's normal. Then, the computer samples the geometric features and texture information of the facade as displayed in the high-precision model from this target viewpoint. During sampling, appropriate sampling settings can be made according to those skilled in the art. For example, the sampling light and resolution can be set to generate high-quality texture information. Texture information is typically stored in the form of a two-dimensional image and can include various texture attributes such as color, normals, and lighting.
[0078] During texture generation, the resolution can be adjusted according to rendering requirements. For example, for scene objects with fewer exterior textures, the sampling resolution can be appropriately reduced to further reduce the consumption of computing and storage resources. At the same time, texture information generated from high-precision models can more completely preserve the detailed textures of each exterior surface of the high-precision model, such as windows, door frames, or decorative patterns, thus reproducing the appearance of the high-precision model on the outline model.
[0079] It should be noted that at least one facade in this embodiment can be a portion or all of the facades of the high-precision model. Generating texture information for each facade is to map it onto the outline model, resulting in a mapped outline model. Generally, the computer generates texture information for all facades of a scene object so that the mapped outline model can be observed from any angle, displaying the texture information of each facade at the corresponding angle and showcasing the surface material, texture, and other information of the scene object.
[0080] Optionally, in a virtual scene space, some scene objects may have their facades partially obscured by the terrain when viewed from a distance due to their unique geographical location (such as being backed by cliffs, mountains, or dense forests), only becoming visible when viewed up close. In this special case, generating texture information for all facades would be a waste of resources. Therefore, the computer can use visibility detection methods to determine which facades will not be observed from a distance, thereby avoiding the generation of texture information for these facades and reducing the consumption of storage and rendering resources.
[0081] Specifically, the computer can detect the geographical environment and facade visibility of scene objects, determining whether they will be obscured by other terrain features or obstacles from a distance. Next, after facade visibility detection, facades not visible from a distance are marked as "non-visible facades," while facades visible from a distance are marked as "visible facades." The computer then stores the markings for each facade and generates corresponding texture information for each visible facade.
[0082] For example, suppose a building is located below a cliff, with its back pressed against the cliff. When viewed from a distance, the cliff completely obscures the back of the building, and the user can only see the front, sides, and top. Therefore, when generating texture information, the computer will detect the exterior facade of the back of the building as a "non-visible surface" and will not generate texture information for it.
[0083] Alternatively, the computer can also detect the lighting conditions of all facades of the objects in the scene. In some cases, facades may be in shadow or poorly lit environments for extended periods, making it difficult to observe their details. If a facade is detected to be in shadow for a long time, the generation of texture information for that facade can be skipped, or only a simplified texture (such as a grayscale texture) can be generated. In this way, generating texture information based on lighting conditions can also reduce the waste of storage and rendering resources.
[0084] This method efficiently converts high-precision models of scene objects into texture information for multiple facades, laying the foundation for mapping the texture information onto the outline model. It also enables the effective extraction and compression of geometric details of the high-precision model, greatly reducing the amount of rendering data required for subsequent computer rendering. This improves the computer's rendering efficiency in virtual scene space and avoids issues such as screen stuttering and blurring.
[0085] S230. Map the texture information of each facade to the corresponding facade in the outline model to obtain the mapped outline model.
[0086] The computer needs to combine the generated texture information for each facade with the outline model to complete the texture mapping operation. Texture mapping refers to the process of mapping texture information onto the various surfaces of the outline model, thereby providing the outline model with visual details that match the various facades of the high-precision model. The computer can project and attach the corresponding texture information onto the facades of the outline model according to the geometry of the facades.
[0087] Optionally, to improve rendering efficiency, the computer can optimize the mapped contour model. For example, the computer can simplify redundant texture data, reducing the amount of video memory used; at the same time, it can compress texture information to further reduce storage and transmission overhead. In some cases, the resolution of the texture information can also be dynamically adjusted to adapt to different display conditions or rendering requirements.
[0088] By mapping texture information onto the outline model, the appearance features of the high-precision model can be preserved while significantly reducing subsequent rendering overhead. The mapped outline model not only has a geometric structure highly similar to the high-precision model, but also reproduces the visual effect of the high-precision model through texture information, thus enabling computers to render more efficiently in scenes displayed at a distance.
[0089] S240. Render the mapped outline model onto the location of the scene object in the virtual scene space to display the mapped outline model.
[0090] If the computer detects that the scene object is present in the image displayed in the virtual scene space, it needs to output the mapped outline model to a specified location in the virtual scene space and perform a rendering operation to display the rendered mapped outline model to the user.
[0091] It should be noted that the number of scene objects in a virtual scene space can be at least two. To ensure the display effect of scene objects closer to the screen, the computer can directly render high-precision models of these scene objects to their corresponding positions. In this way, the most detailed display effects of these scene objects can be shown to the user.
[0092] For scene objects that are far from the screen, there is no need to display too much detail. However, in order to ensure the display effect, the computer can render the mapped outline models of these scene objects to their respective positions.
[0093] Therefore, the computer can set a preset viewing distance threshold. If the viewing distance is greater than the preset viewing distance threshold, the mapped contour model is rendered to the position corresponding to the scene object. If the viewing distance is less than or equal to the preset viewing distance threshold, the high-precision model corresponding to the scene object is output to the position corresponding to the scene object.
[0094] Therefore, for scene objects with "non-visible surfaces" from a distance, their corresponding mapped outline models may have parts of their facades lacking texture information. From a distance, these parts of the facades are not visible and will not be displayed in the image, thus not affecting the user experience. However, when the user moves the viewing distance from the scene object to a position within a preset viewing distance threshold, the computer dynamically switches the mapped outline model to a high-precision model, making these non-visible surfaces visible to the user.
[0095] Optionally, when determining the geographical environment and facade visibility of scene objects, the computer can choose to use a preset viewing distance threshold as a standard. At this distance, the computer can perform facade visibility detection from various perspectives of the scene object, thereby marking each facade of the scene object as either visible or not.
[0096] When rendering the mapped outline model, the computer first positions the mapped outline model to its corresponding position in the virtual scene space based on the position, orientation, and scale information of the scene objects. For example, the computer can use the three-dimensional spatial coordinates and orientation vectors of the scene objects to precisely align the outline model to the position and orientation of the scene objects.
[0097] Next, the computer needs to perform lighting calculations and material processing on the mapped contour model. Based on the type of light source set in the virtual scene space (such as point light, parallel light, ambient light, etc.) and the intensity and direction of the light, the computer calculates the shadows, brightness, and reflection effects of the contour model. Simultaneously, the texture information mapped onto the contour model is combined with the lighting effects to enhance the object's realism. For example, texture details in the texture map may be more prominent in highlight areas, while in shadow areas, texture details may appear dimmer.
[0098] Using this method, a computer can generate a corresponding outline model of a scene object based on its preset attribute information. Then, it acquires a high-precision model of the scene object and generates texture information for the modeling data corresponding to each facade of at least one facade in the high-precision model. Next, the texture information of each facade is mapped onto the corresponding facade of the outline model, resulting in the mapped outline model. Finally, the mapped outline model is rendered onto the location of the scene object in the virtual scene space to display the mapped outline model.
[0099] On one hand, the outline model of the scene object is generated, and then the texture information of each face is generated from the high-precision model of the scene object and mapped onto the outline model. This generated mapped outline model retains the detailed information of various modeling data on each facade of the high-precision model. In related technologies, for scene objects far from the screen, the computer performs polygon reduction processing on the high-precision model of the scene object, downgrading it to a low-precision model before rendering it to the corresponding position of the scene object. This results in the loss of a large amount of detail in the scene object, potentially causing blurring and unclear outlines, reducing visual effects and affecting user experience. This application, however, maps the texture information of the high-precision model onto the outline model, preserving the detailed information of each facade, thereby improving the display effect of various scene objects in the virtual scene space.
[0100] On the other hand, the amount of rendering data corresponding to texture information is significantly reduced compared to the amount of rendering data corresponding to modeling data in high-precision models. This allows for the effective reduction of the computer's rendering burden while ensuring the display effect of each facade of scene objects, greatly improving the rendering efficiency of the virtual scene space. The computer can then render the corresponding images more efficiently, resulting in higher frame rates and enhanced user experience.
[0101] In one embodiment of this application, another data processing method is provided, which can be executed by a computer. For example... Figure 3 As shown, the data processing method may include S310 to S330 and S220 to S240. That is, S310 to S330 are... Figure 2 The specific implementation method of S210 is shown.
[0102] The following describes S310 to S330:
[0103] S310. Obtain at least one cross-sectional mesh model corresponding to the scene object.
[0104] The computer needs to obtain at least one cross-sectional mesh model corresponding to the scene object as the basis for generating the contour model. A cross-sectional mesh model refers to a planar or curved cross-section obtained by cutting or truncating the geometry of the scene object. The direction of the cross-section can be selected as needed; it can be the top or bottom cross-section of the scene object.
[0105] For example, such as Figure 4a This is a schematic diagram illustrating a contour model generation process related to this application. Figure 4a In the scene, object 1 is a building consisting of only a cube, and its corresponding cross-sectional mesh model can be as follows: Figure 4aAs shown in the center, the cross-sectional mesh model matches the top view of scene object 1. This cross-sectional mesh model can be pre-set by someone skilled in the art, or generated by someone skilled in the art through procedural content generation (PCG).
[0106] In one embodiment of this application, the number of cross-sectional mesh models of a scene object can be at least two. This is likely because the scene object may be composed of different cubes; therefore, the computer needs to obtain the cross-sectional mesh model corresponding to each cubic part of the scene object separately. Figure 4b The diagram shown illustrates another contour model generation process involved in this application. Figure 4b In the scene, object 2 is clearly layered, and it can be seen that it is composed of three cubes, let's say cube 1, cube 2, and cube 3. Therefore, the computer will obtain the cross-sectional mesh models corresponding to these three cubes, namely cross-sectional mesh model 1, cross-sectional mesh model 2, and cross-sectional mesh model 3.
[0107] S320. Based on the preset attribute information, stretch the mesh model of each cross section corresponding to the scene object to obtain at least one contour sub-model.
[0108] This preset attribute information includes the height information corresponding to each cross-sectional mesh model, which can also be called the scale value. If the current scene object corresponds to only one cross-sectional mesh model, then stretching the cross-sectional mesh model can obtain the outline model of the scene object.
[0109] Computers can use an extrusion operation to expand a cross-sectional mesh model into a 3D contour sub-model or contour model with a certain depth. The extrusion operation involves stretching each cross-sectional mesh model perpendicular to the cross-section based on preset attribute information (such as the height of scene objects), thereby generating a 3D contour sub-model or contour model with height and a certain geometric shape. The generated contour sub-model or contour model only retains the external shape of the scene objects, excluding details, thus reducing the computational load during subsequent rendering.
[0110] If the structure of a scene object is complex, containing at least two cross-sectional mesh models, the computer can extrude each cross-sectional mesh model separately to generate multiple contour sub-models. These contour sub-models can differ in geometry, such as having different heights and shapes, and together they form the final contour model.
[0111] It should be noted that the exterior of the outline model also has a specific material, which is a default minimalist material that can be set by those skilled in the art to avoid introducing complex materials that could affect computer performance.
[0112] like Figure 4a As shown, scene object 1 has only one cross-sectional mesh model. The computer can then stretch this cross-sectional mesh model perpendicular to the cross-section to obtain the outline model corresponding to scene object 1 on the right. From... Figure 4a As can be seen, the outline model of scene object 1 consists of only a cube, and each exterior surface is a flat and smooth plane, without showing the special material details of each exterior surface.
[0113] like Figure 4b As shown, scene object 2 is composed of 3 cubes, therefore it has 3 cross-sectional mesh models. The computer needs to perform extrusion operations according to the preset attribute information corresponding to each cross-sectional mesh model. For example, the cross-sectional mesh model 1 of cube 1 is extruded by 40 meters, the cross-sectional mesh model 2 of cube 2 is extruded by 15 meters, the cross-sectional mesh model 3 of cube 3 is extruded by 8 meters, and so on. In this way, the contour sub-models corresponding to each cross-sectional mesh model can be obtained, namely contour sub-model 1, contour sub-model 2, and contour sub-model 3.
[0114] This method allows computers to generate outline models of scene objects while preserving their main shape features, without needing to focus on the material details of each facade. Compared to high-precision models, this significantly reduces the complexity of the model.
[0115] S330. If the number of contour sub-models is at least two, then at least two contour sub-models are spliced together to obtain the contour model corresponding to the scene object.
[0116] Specifically, S330 may include S331 to S333, which are described below:
[0117] S331. At least two contour sub-models are spliced together to obtain candidate contour models.
[0118] The computer stitches together at least two contour sub-models according to certain rules to form a candidate contour model. The stitching operation merges the various contour sub-models into a complete candidate contour model based on their position, order, structure, and other dimensions. These contour sub-models may overlap or share boundaries in some parts. Through stitching, the computer automatically determines the appropriate connection method based on the geometry of the scene objects.
[0119] S332. Detect hidden surfaces in the candidate contour model. Hidden surfaces are the interfaces between different contour sub-models.
[0120] Candidate contour models retain the geometric appearance of scene objects, but they may contain hidden surfaces. Hidden surfaces are interfaces that cannot be seen in the rendering process due to the boundaries or overlaps between different contour sub-models during the stitching process. These surfaces are usually located inside or at the boundaries of the contour sub-models and are not directly exposed to the viewer's perspective in the virtual scene space. Therefore, rendering these interfaces is redundant, and the computer can remove these hidden surfaces, thus reducing the rendering load on the computer.
[0121] When detecting hidden faces, computers can identify these faces by calculating the relative positions, normal vectors, and geometric overlaps between contour sub-models.
[0122] For example, in Figure 4b In the scene, there are hidden surfaces between contour sub-model 1 and contour sub-model 2, and there are also hidden surfaces between contour sub-model 2 and contour sub-model 3. The computer can delete these hidden surfaces to obtain the contour model corresponding to scene object 2.
[0123] By detecting hidden faces, the computer can ensure that these invalid hidden faces are not rendered, thereby further optimizing the rendering process and reducing useless computation and resource consumption.
[0124] S333. Delete the hidden faces in the candidate contour model to obtain the contour model corresponding to the scene object.
[0125] After detecting hidden faces, the computer needs to delete or ignore them, removing these unnecessary faces from the candidate contour model to obtain a more concise and accurate contour model.
[0126] For example, such as Figure 4b The outline model of scene object 2 shown is composed of 3 cubes, each cube has 12 faces, so the outline model has a total of 36 faces. After deleting the hidden faces between outline sub-model 1 and outline sub-model 2, and between outline sub-model 2 and outline sub-model 3, the number of faces will be reduced by 4. Finally, the number of faces of the outline model will be reduced from 36 to 32.
[0127] In this method, by deleting hidden faces, the computer effectively removes redundant parts of the contour model without changing the visible parts of the model, further reducing the computational load during subsequent rendering and avoiding the rendering overhead of invalid faces. Furthermore, this also optimizes the model's geometry, making the final contour model more efficient during rendering.
[0128] In one embodiment of this application, when acquiring at least one preset cross-sectional mesh model for a scene object, there may be cases where the model cannot be acquired. If the preset at least one cross-sectional mesh model for the scene object is not acquired, the geometric information of the bottom surface of the scene object in the virtual scene space is detected. Then, the computer can stretch the geometric information of the bottom surface of the scene object based on preset attribute information to obtain the contour model corresponding to the scene object.
[0129] It should be noted that the outline model of scene objects can be generated using PCG.
[0130] Optionally, either a computer or a human can perform quality checks on the outline models of scene objects generated by the computer. When dealing with special scene objects whose generated effects are not ideal, outline models can be created manually to ensure that each scene object meets the expected visual effects and quality standards.
[0131] This method transforms the complex geometric structures of scene objects into simplified outline models, greatly reducing the computational burden during rendering and improving the computer's rendering efficiency in virtual scene spaces.
[0132] In one embodiment of this application, another data processing method is provided, which can be executed by a computer. For example... Figure 5 As shown, the data processing method may include S210, S510 to S540, and S230 to S240. That is, S510 to S540 are... Figure 2 The specific implementation method of S220 is shown.
[0133] The following describes S510 to S540:
[0134] S510: Obtain the high-precision model corresponding to the scene object.
[0135] Using a high-precision model during texture generation makes the texture information more accurate, preserves the material details of each facade of the high-precision model, and presents a clearer pattern.
[0136] S520. Determine the target viewpoint for generating texture information from the modeling data corresponding to each facade.
[0137] Since the scene objects are three-dimensional shapes, each facade will present different modeling data when viewed from different angles. Therefore, when generating texture information, an angle perpendicular to the current facade should be selected as the target angle. This ensures more accurate texture information and avoids distortion caused by incorrect angles. In other words, the computer can select the angle corresponding to the front view of each facade for texture extraction and generation.
[0138] S530. Under the target viewpoint corresponding to each facade, the modeling data corresponding to each facade is sampled to obtain image sampling data associated with each facade.
[0139] Specifically, S530 may include S531 to S533, and the project describes S531 to S533 as follows:
[0140] S531. Obtain sampling configuration information.
[0141] The computer first needs to acquire configuration information about the sampling process. Sampling configuration information refers to the parameters and requirements that need to be set to generate high-quality image sampling data. This information may involve sampling strategies for different facades, the required amount of light, resolution settings, etc. Acquiring this configuration information can rely on user settings or be automatically generated based on the characteristics of scene objects.
[0142] The sampling light settings refer to configuring the number and direction of the sampling lights. Light sampling affects the lighting and shadow effects of the final image, so it's important to configure the sampling lights appropriately. Resolution settings refer to setting the sampling resolution, including the level of detail in the texture.
[0143] By acquiring sampling configuration information, the computer can prepare for subsequent sampling processing, ensuring that the sampling processing of each facade meets the rendering requirements and performance specifications.
[0144] S532. Based on the sampling configuration information, perform sampling configuration processing on the modeling data corresponding to each facade to obtain the configured modeling data corresponding to each facade; wherein, the sampling configuration processing includes at least setting the sampling light and resolution for the modeling data corresponding to each facade.
[0145] After acquiring the sampling configuration information, the computer performs sampling configuration processing on the modeling data corresponding to each facade based on this information. The purpose of the sampling configuration processing is to preprocess the modeling data for each facade to ensure the quality and efficiency of the sampling.
[0146] Specifically, the computer needs to set the appropriate number and distribution of sampling rays for each facade based on the sampling configuration information. For example, the number of rays can be adjusted according to the complexity of the target facade and the required level of detail. Complex facades may require more ray sampling to ensure lighting and shadow effects during rendering. Furthermore, for each facade, the computer also adjusts the resolution based on the sampling configuration information. Higher resolution results in richer texture details but also increases computational resource consumption. In some cases, to improve rendering efficiency, the computer can use lower resolution settings for simpler facades, reducing the subsequent rendering resource usage.
[0147] After sampling and configuration processing, the modeling data corresponding to each facade will be appropriately adjusted and optimized. The configured modeling data includes light sampling, resolution and other configuration parameters to prepare for the subsequent sampling process.
[0148] S533. Under the target viewpoint corresponding to each facade, the configured modeling data corresponding to each facade is sampled and processed to obtain image sampling data associated with each facade.
[0149] The computer determines the coordinate system of the viewpoint based on the target viewpoint of each facade, which is usually orthogonal to the facade normal. At this point, the target viewpoint determines the sampling direction and observation angle, ensuring that the sampled data accurately reflects the geometric features of the facade.
[0150] The computer samples the modeling data configured for each facade, collecting lighting, texture, and other relevant image data from the facade surface based on parameters such as the quantity, distribution, and resolution of the sampled light rays. After this process, each facade yields image sampling data, typically stored as a two-dimensional image, containing attributes such as texture, normals, and lighting.
[0151] By sampling the configured modeling data corresponding to each facade, image sampling data associated with each facade can be obtained. This image sampling data will serve as the basis for subsequent processing to obtain texture information, providing data support for generating high-quality virtual scene images.
[0152] S540: Generate texture information for each facade based on the image sampling data of each facade.
[0153] In one embodiment of this application, the generated texture information may include the following types: a base color map, a normal map, and a map that combines representations of metallic, roughness, and specular (MRS) properties. These texture information can be fused together to accurately represent the appearance details of scene objects.
[0154] It should be noted that the above-mentioned different types of texture information can all be generated by a computer based on the image sampling data associated with each facade. Furthermore, the type of texture information corresponding to each facade can be set by those skilled in the art, and this application embodiment does not impose any limitations.
[0155] This method allows texture information to comprehensively cover the visual texture of scene objects, providing crucial support for subsequent rendering. Because texture information can include multiple types of textures blended together, it can not only represent delicate visual details but also improve rendering efficiency through optimization, resulting in better display of scene objects in the virtual environment.
[0156] In one embodiment of this application, another data processing method is provided, which can be executed by a computer. For example... Figure 6 As shown, the data processing method may include S210 to S230 and S610 to S620. That is, S610 to S620 are... Figure 2 The specific implementation method of S240 is shown.
[0157] The following describes S610 to S620:
[0158] S610. If it is detected that the screen displaying the virtual scene space contains scene objects, then the line-of-sight distance between the screen and the scene objects in the virtual scene space is detected.
[0159] The virtual scene space is displayed through a virtual camera within the computer, which observes the virtual scene space. The line-of-sight distance refers to the straight-line distance from the virtual camera (or observer's) position to the position of an object within the virtual scene space. The computer only detects the line-of-sight distance between an object and the screen when the object appears in the frame.
[0160] By detecting the line-of-sight distance between the image and scene objects in the virtual scene space, the computer can quickly determine how each scene object needs to be rendered, thus improving rendering efficiency.
[0161] S620. Based on the viewing distance, render the mapped contour model to the position corresponding to the scene object to display the mapped contour model.
[0162] Specifically, S620 may include S621 to S622, which are described below:
[0163] S621. If the viewing distance is greater than the preset viewing distance threshold, the mapped contour model will be rendered to the position corresponding to the scene object.
[0164] The computer compares the viewing distance between the image and scene objects with a preset viewing distance threshold. If the viewing distance is greater than the threshold, it indicates a large viewing distance. To reduce rendering overhead, the computer renders a mapped outline model to the corresponding position of the scene object. For example... Figure 7 The diagram shown illustrates the line-of-sight distance between an image and scene objects, as described in this application. Figure 7 In this scenario, assuming the preset viewing distance threshold is 50 meters and the viewing distance is 80 meters, the computer will use the mapped contour model of the scene object to render the corresponding position of the scene object.
[0165] In one embodiment of this application, during rendering, the computer's central processing unit (CPU) sends a drawing call to the graphics processing unit (GPU) to perform the rendering.
[0166] Optionally, since the CPU sends a rendering instruction (i.e. drawing instruction) to the GPU every time it renders, in order to avoid the computer still generating rendering instructions for each scene object separately when multiple scene objects in the picture need to be rendered with their mapped outline models, which would increase the number of rendering instructions, the computer can merge the mapped outline models of adjacent scene objects.
[0167] Specifically, if other scene objects are detected within a preset distance range corresponding to the location of a scene object, the mapped outline models of the scene objects are merged with the mapped outline models of the other scene objects to obtain a merged mapped outline model. If the screen displaying the virtual scene space contains the merged mapped outline model, a rendering instruction for rendering the merged mapped outline model is generated and sent to the rendering module, so that the rendering module can render the merged mapped outline model based on the rendering instruction to display the merged mapped outline model. The rendering module is the GPU. Furthermore, the computer can also segment and mark each mapped outline model in the merged mapped outline model. This allows the computer to select a portion of the mapped outline models in the merged mapped outline model, generate rendering instructions for the selected mapped outline models, and send them to the GPU via the CPU. For example, the computer merges the mapped outline models of scene objects 3, 4, 5, 6, and 7 to obtain the merged mapped outline model. Then, the computer marks the mapped outline models corresponding to scene objects 3, 4, 5, 6, and 7 within the merged mapped outline model. Suppose we need to render the mapped outline models of scene objects 3, 5, and 7. The computer can generate a rendering instruction for the merged mapped outline model, specifying that only scene objects 3, 5, and 7 should be rendered. This reduces the number of rendering instructions and improves the GPU's rendering efficiency.
[0168] In this method, for scene objects that are far from the screen, the computer renders their mapped outline models to the corresponding positions, which preserves the detailed information of each facade. This ensures the display effect of each scene object in the virtual scene space while greatly reducing the rendering pressure on the computer.
[0169] S622. If the line-of-sight distance is less than or equal to the preset line-of-sight distance threshold, the high-precision model corresponding to the scene object will be output to the position corresponding to the scene object.
[0170] If the viewing distance is less than or equal to a preset viewing distance threshold, it indicates that the viewing distance is too close. In order to provide the user with the most detailed image, the computer will render a high-precision model of the scene object to its corresponding position. Figure 7 In this scenario, assuming the preset viewing distance threshold is 50 meters and the viewing distance is 40 meters, the computer will use a high-precision model corresponding to the scene object to render to the position corresponding to the scene object.
[0171] Alternatively, the computer can merge high-precision models of at least two scene objects within a certain area into a larger high-precision model, resulting in a modular high-precision model. This allows the graphics processor to render at least two high-precision models together.
[0172] This method allows the computer to flexibly select the position of the rendered outline model or high-precision model on the scene object based on the viewing distance between the screen and the scene object, thereby meeting the rendering requirements under different viewing distances.
[0173] Figure 8 This is a block diagram illustrating a data processing apparatus according to an embodiment of this application. Figure 8 As shown, this data processing device can be applied to a computer, and the device includes:
[0174] A data processing apparatus, comprising:
[0175] The processing unit 810 is used to stretch the cross-sectional mesh model corresponding to the scene object based on the preset attribute information of the scene object to obtain the contour model corresponding to the scene object.
[0176] The acquisition unit 820 is used to acquire the high-precision model corresponding to the scene object, and generate the texture information corresponding to each facade based on the modeling data corresponding to each facade of at least one facade in the high-precision model.
[0177] Mapping unit 830 is used to map the texture information of each facade onto the corresponding facade in the outline model to obtain the mapped outline model;
[0178] Rendering unit 840 is used to render the mapped outline model to the position of scene objects in the virtual scene space to display the mapped outline model.
[0179] In one embodiment of this application, based on the aforementioned scheme, the processing unit 810 is further configured to determine the target view for generating texture information from the modeling data corresponding to each facade; under the target view corresponding to each facade, sample the modeling data corresponding to each facade to obtain image sampling data associated with each facade; and generate texture information corresponding to each facade based on the image sampling data of each facade.
[0180] In one embodiment of this application, based on the aforementioned scheme, the acquisition unit 820 is further configured to acquire sampling configuration information; the processing unit 810 is further configured to perform sampling configuration processing on the modeling data corresponding to each facade based on the sampling configuration information, to obtain the configured modeling data corresponding to each facade; wherein, the sampling configuration processing includes at least setting the sampling light and resolution for the modeling data corresponding to each facade; and, under the target viewpoint corresponding to each facade, performing sampling processing on the configured modeling data corresponding to each facade to obtain image sampling data associated with each facade.
[0181] In one embodiment of this application, based on the aforementioned scheme, the processing unit 810 is further configured to stretch each cross-sectional mesh model corresponding to the scene object based on preset attribute information to obtain at least one contour sub-model; if the number of contour sub-models is at least two, then the at least two contour sub-models are spliced together to obtain the contour model corresponding to the scene object.
[0182] In one embodiment of this application, based on the aforementioned scheme, the processing unit 810 is further configured to stitch together at least two contour sub-models to obtain a candidate contour model; detect hidden surfaces in the candidate contour model, where the hidden surfaces are the interfaces between different contour sub-models; and delete the hidden surfaces in the candidate contour model to obtain the contour model corresponding to the scene object.
[0183] In one embodiment of this application, based on the aforementioned scheme, the processing unit 810 is further configured to detect the geometric information of the bottom surface of the scene object in the virtual scene space if at least one cross-sectional mesh model preset for the scene object is not obtained; and to stretch the geometric information of the bottom surface of the scene object based on the preset attribute information to obtain the contour model corresponding to the scene object.
[0184] In one embodiment of this application, based on the foregoing scheme, the processing unit 810 is further configured to detect the line-of-sight distance between the screen and the scene object in the virtual scene space if it is detected that the screen displaying the virtual scene space contains scene objects; and to render the mapped contour model to the position corresponding to the scene object based on the line-of-sight distance.
[0185] In one embodiment of this application, based on the aforementioned scheme, the rendering unit 840 is further configured to render the mapped contour model to the position corresponding to the scene object if the viewing distance is greater than a preset viewing distance threshold; and to output the high-precision model corresponding to the scene object to the position corresponding to the scene object if the viewing distance is less than or equal to the preset viewing distance threshold.
[0186] In one embodiment of this application, based on the aforementioned scheme, the processing unit 810 is further configured to, if other scene objects are detected within a preset distance range corresponding to the location of the scene object, merge the mapped contour model of the scene object with the mapped contour models of other scene objects to obtain a merged mapped contour model; the rendering unit 840 is further configured to, if the screen displaying the virtual scene space contains the merged mapped contour model, generate a rendering instruction for rendering the merged mapped contour model and send it to the rendering module, so that the rendering module renders the merged mapped contour model based on the rendering instruction to display the merged mapped contour model.
[0187] It should be noted that the apparatus provided in the foregoing embodiments and the method provided in the foregoing embodiments belong to the same concept, and the specific way in which each module and unit performs operations has been described in detail in the method embodiments.
[0188] Embodiments of this application also provide a data processing device, including: at least one processor; and a memory for storing at least one program, which, when executed by the at least one processor, causes the electronic device to perform the aforementioned data processing method.
[0189] Figure 9 This is a schematic diagram of the structure of a computer system suitable for implementing the data processing apparatus of the present application.
[0190] It should be noted that, Figure 9 The computer system 900 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0191] like Figure 9 As shown, the computer system 900 includes a Central Processing Unit (CPU) 901, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on programs stored in Read-Only Memory (ROM) 902 or programs loaded from storage portion 908 into Random Access Memory (RAM) 903. The RAM 903 also stores various programs and data required for system operation. The CPU 901, ROM 902, and RAM 903 are interconnected via a bus 904. An Input / Output (I / O) interface 905 is also connected to the bus 904.
[0192] The following components are connected to I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to I / O interface 905 as needed. Removable media 911, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 910 as needed so that computer programs read from them can be installed into storage section 908 as needed.
[0193] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 909, and / or installed from removable medium 911. When the computer program is executed by central processing unit (CPU) 901, it performs various functions defined in the system of this application.
[0194] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. For example, a computer-readable medium can be an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable medium may include, but are not limited to: an electrical connection having at least one wire, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0195] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains at least one executable instruction for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0196] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0197] Another aspect of this application provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the data processing method as described above. This computer-readable medium may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into the electronic device.
[0198] Another aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable medium. A processor of a computer device reads the computer instructions from the computer-readable medium and executes the computer instructions, causing the computer device to perform the data processing methods provided in the various embodiments described above.
[0199] The above description is merely a preferred exemplary embodiment of this application and is not intended to limit the implementation of this application. Those skilled in the art can easily make corresponding modifications or alterations based on the main concept and spirit of this application. Therefore, the scope of protection of this application should be determined by the scope of protection claimed in the claims.
Claims
1. A data processing method, characterized in that, include: Based on the preset attribute information of the scene object, the cross-sectional mesh model corresponding to the scene object is stretched to obtain the contour model corresponding to the scene object. Obtain the high-precision model corresponding to the scene object, and generate the texture information corresponding to each facade based on the modeling data corresponding to each facade of at least one facade in the high-precision model; The texture information of each facade is mapped onto the corresponding facade in the outline model to obtain the mapped outline model; The mapped outline model is rendered onto the location of the scene object in the virtual scene space to display the mapped outline model.
2. The method according to claim 1, characterized in that, The step of generating texture information corresponding to each facade based on the modeling data corresponding to each facade of at least one facade in the high-precision model includes: Determine the target perspective for generating texture information from the modeling data corresponding to each facade; From the target viewpoint corresponding to each facade, the modeling data corresponding to each facade is sampled to obtain image sampling data associated with each facade; Based on the image sampling data of each facade, the corresponding texture information for each facade is generated.
3. The method according to claim 2, characterized in that, The step involves sampling the modeling data corresponding to each facade from the target viewpoint, to obtain image sampling data associated with each facade, including: Obtain sampling configuration information; Based on the sampling configuration information, the modeling data corresponding to each facade is processed by sampling configuration to obtain the configured modeling data corresponding to each facade; wherein, the sampling configuration processing includes at least setting the sampling light and the resolution of the modeling data corresponding to each facade; From the target viewpoint corresponding to each facade, the configured modeling data corresponding to each facade is sampled to obtain image sampling data associated with each facade.
4. The method according to claim 1, characterized in that, The number of the cross-sectional mesh models is at least one; the step of stretching the cross-sectional mesh model corresponding to the scene object based on the preset attribute information of the scene object to obtain the contour model corresponding to the scene object includes: Based on the preset attribute information, each cross-sectional mesh model corresponding to the scene object is stretched to obtain at least one contour sub-model. If the number of contour sub-models is at least two, then at least two contour sub-models are spliced together to obtain the contour model corresponding to the scene object.
5. The method according to claim 4, characterized in that, The step of stitching together at least two contour sub-models to obtain the contour model corresponding to the scene object includes: The at least two contour sub-models are spliced together to obtain a candidate contour model; Detect hidden surfaces in the candidate contour model, where the hidden surfaces are the interfaces between different contour sub-models; The hidden faces in the candidate contour model are deleted to obtain the contour model corresponding to the scene object.
6. The method according to claim 1, characterized in that, The process of generating the contour model corresponding to the scene object based on the preset attribute information of the scene object includes: If at least one cross-sectional mesh model for the scene object is not obtained, the geometric information of the bottom surface of the scene object in the virtual scene space is detected. Based on the preset attribute information, the geometric information of the bottom surface of the scene object is stretched to obtain the contour model corresponding to the scene object.
7. The method according to claim 1, characterized in that, The step of rendering the mapped contour model onto the corresponding position of the scene object in the virtual scene space includes: If the scene object is detected to be included in the screen displaying the virtual scene space, then the line-of-sight distance between the screen and the scene object in the virtual scene space is detected. Based on the line-of-sight distance, the mapped contour model is rendered onto the position corresponding to the scene object.
8. The method according to claim 7, characterized in that, The step of rendering the scene object to its corresponding position based on the viewing distance includes: If the line-of-sight distance is greater than a preset line-of-sight distance threshold, the mapped contour model is rendered to the position corresponding to the scene object. If the line-of-sight distance is less than or equal to the preset line-of-sight distance threshold, then the high-precision model corresponding to the scene object is output to the position corresponding to the scene object.
9. The method according to claim 1, characterized in that, The step of rendering the mapped contour model onto the location of the scene object in the virtual scene space to display the mapped contour model includes: If other scene objects are detected within a preset distance range of the location corresponding to the scene object, the mapped contour model of the scene object is merged with the mapped contour models of the other scene objects to obtain a merged mapped contour model. If the screen displayed in the virtual scene space contains the merged mapped outline model, a rendering instruction for rendering the merged mapped outline model is generated and sent to the rendering module, so that the rendering module renders the merged mapped outline model based on the rendering instruction to display the merged mapped outline model.
10. A data processing apparatus, characterized in that, include: The processing unit is used to stretch the cross-sectional mesh model corresponding to the scene object based on the preset attribute information of the scene object to obtain the contour model corresponding to the scene object. The acquisition unit is used to acquire the high-precision model corresponding to the scene object, and generate the texture information corresponding to each facade based on the modeling data corresponding to each facade of at least one facade in the high-precision model. A mapping unit is used to map the texture information of each facade onto the corresponding facade in the outline model to obtain the mapped outline model. The rendering unit is used to render the mapped outline model to the position of the scene object in the virtual scene space to display the mapped outline model.
11. A data processing device, characterized in that, include: Memory, which stores computer-readable instructions; A processor reads computer-readable instructions stored in memory to perform the method of any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, It stores computer-readable instructions that, when executed by the computer's processor, cause the computer to perform the method of any one of claims 1 to 9.
13. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the method as described in any one of claims 1 to 9.