Data processing method, device and equipment of virtual scene, storage medium and program product
By simplifying the 3D mesh model and merging texture images in the virtual scene, the problem of slow rendering speed in the virtual scene is solved, and the rendering efficiency is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2026-04-23
- Publication Date
- 2026-07-31
AI Technical Summary
The large number of 3D mesh models and the complex hierarchical structure in virtual scenes result in slow rendering speed and low efficiency.
Each 3D mesh model is simplified, geometric features are extracted and layout adjustment parameters are determined, texture layout is adjusted, texture images are merged to generate a composite texture image, and finally, rendering is performed based on the simplified mesh model and the composite texture image.
It significantly improves the rendering speed and processing efficiency of objects in virtual scenes, and reduces the resource call and processing pressure during the rendering process.
Smart Images

Figure CN122089925B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a data processing method, apparatus, device, storage medium, and program product for virtual scenes. Background Technology
[0002] In the field of virtual scene construction, it is typically necessary to handle a large number of virtual scene resources, including 3D mesh models and textures. As the scale of virtual scenes increases, the number of 3D mesh models contained within them becomes enormous, and the hierarchical structure becomes highly complex. The associated texture and other data also have a large volume, resulting in slow rendering speeds and low efficiency for various objects within the virtual scene. Summary of the Invention
[0003] This application provides a data processing method, apparatus, electronic device, computer-readable storage medium, and computer program product for virtual scenes, which can improve the rendering efficiency of virtual scenes.
[0004] The technical solution of this application embodiment is implemented as follows: This application provides a data processing method for a virtual scene, including: Obtain the first three-dimensional mesh model of each of the multiple objects included in the virtual scene, and obtain the texture image corresponding to each of the first three-dimensional mesh models; Each of the first three-dimensional mesh models is simplified to obtain a second three-dimensional mesh model for each object, wherein the second three-dimensional mesh model of each object includes fewer model faces than the first three-dimensional mesh model. Extract the first geometric feature of each of the first three-dimensional mesh models, and determine the layout adjustment parameters of each of the first three-dimensional mesh models based on each of the first geometric features; Based on each of the layout adjustment parameters, the texture layout of each of the first three-dimensional mesh models is adjusted to obtain each adjusted texture layout, and multiple adjusted texture layouts are combined and arranged to obtain a combined texture layout. Multiple texture images are combined according to the combined texture layout to obtain a combined texture image; The multiple objects are rendered based on multiple second three-dimensional mesh models and the combined texture image.
[0005] This application embodiment also provides a data processing device for a virtual scene, including: The acquisition module is used to acquire the first three-dimensional mesh model of each of the multiple objects included in the virtual scene, and to acquire the texture image corresponding to each of the first three-dimensional mesh models; A simplification module is used to perform model simplification processing on each of the first three-dimensional mesh models to obtain a second three-dimensional mesh model for each object, wherein the second three-dimensional mesh model of each object includes fewer model faces than the first three-dimensional mesh model. The determination module is used to extract the first geometric features of each of the first three-dimensional mesh models, and determine the layout adjustment parameters of each of the first three-dimensional mesh models based on each of the first geometric features; The adjustment module is used to adjust the texture layout of each of the first three-dimensional mesh models based on each of the layout adjustment parameters, to obtain each adjusted texture layout, and to combine and arrange multiple adjusted texture layouts to obtain a combined texture layout. A combination module is used to combine multiple texture images according to the combined texture layout to obtain a combined texture image; A rendering module is used to render the multiple objects based on multiple second three-dimensional mesh models and the combined texture image.
[0006] This application also provides an electronic device, including: Memory is used to store executable instructions for a computer; The processor, when executing computer-executable instructions stored in the memory, implements the data processing method for the virtual scene provided in the embodiments of this application.
[0007] This application also provides a computer-readable storage medium storing computer-executable instructions or computer programs, which, when executed by a processor, implement the data processing method for a virtual scene provided in this application.
[0008] This application also provides a computer program product, including computer-executable instructions or a computer program, which, when executed by a processor, implements the data processing method for a virtual scene provided in this application.
[0009] The embodiments of this application have the following beneficial effects: On the one hand, by simplifying each first 3D mesh model, a second 3D mesh model with fewer model faces is obtained, effectively reducing the geometric computational complexity of the 3D mesh model in the virtual scene. On the other hand, by extracting the first geometric features to determine the layout adjustment parameters to adjust the texture layout, multiple adjusted texture layouts are combined and arranged to obtain a combined texture layout, and multiple texture images are combined according to the combined texture layout to obtain a combined texture image, integrating complex and discrete texture data into unified combined texture data. Finally, multiple objects are rendered based on multiple second 3D mesh models and combined texture images. By reducing the number of model faces and merging texture images, the resource call and processing pressure during the rendering process is effectively reduced, significantly improving the rendering speed and processing efficiency of various objects in the virtual scene. Attached Figure Description
[0010] Figure 1 This is a schematic diagram of the architecture of the data processing system for virtual scenes provided in the embodiments of this application; Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application; Figure 3 This is a first flowchart illustrating the data processing method for a virtual scene provided in an embodiment of this application; Figure 4 This is a schematic diagram of the second process of the data processing method for virtual scenes provided in the embodiments of this application; Figure 5 This is a schematic diagram of the third process of the data processing method for a virtual scene provided in the embodiments of this application; Figure 6 This is a schematic diagram of the fourth process of the data processing method for a virtual scene provided in the embodiments of this application; Figure 7 This is a schematic diagram of the material baking process provided in the embodiments of this application; Figure 8 This is a schematic diagram of the data flow between the rendering engine and the 3D data processing engine provided in the embodiments of this application; Figure 9 This is a schematic diagram showing the data processing interface of the virtual scene provided in the embodiments of this application; Figure 10 This is a schematic diagram illustrating the combined arrangement of multiple texture layouts provided in the embodiments of this application; Figure 11 This is a schematic diagram illustrating the first effect of the data processing method for a virtual scene provided in this application embodiment; Figure 12 This is a schematic diagram illustrating the second effect of the data processing method for virtual scenes provided in the embodiments of this application; Figure 13 This is a schematic diagram of the fifth process of the data processing method for virtual scenes provided in the embodiments of this application.
[0011] It should be noted that the terms "first" and "second" mentioned above are only used to distinguish between different options and do not represent the degree of superiority or inferiority of the options or their priority in the implementation process. Detailed Implementation
[0012] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0013] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0014] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0015] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of a larger module or unit that includes the functionality of the module or unit.
[0016] Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the embodiments of this application is for the purpose of describing the embodiments of this application only and is not intended to limit this application.
[0017] In the implementation of this application, the collection and processing of relevant data should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.
[0018] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.
[0019] 1) Client: An application running on an electronic device that provides various services, such as a client that supports virtual scenes (like game scenes).
[0020] 2) In response to, used to indicate the conditions or states on which the operation performed depends. When the conditions or states on which it depends are met, one or more operations performed may be performed in real time or with a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations are performed.
[0021] 3) A 3D mesh model is a data structure used in computer graphics to represent the spatial geometry of a 3D object, typically composed of vertices, edges, and polygonal faces (such as triangular faces). In this application, the 3D mesh model serves as a fundamental digital asset containing geometric features in a virtual scene, providing raw physical dimensions and spatial coordinate data for subsequent geometric analysis, feature extraction, and polygon count optimization. In some embodiments, the 3D mesh model may be, for example, but not limited to, a file (such as FBX format) exported by a rendering engine containing static mesh components and their spatial transformation relationships, or may refer to an unoptimized first 3D mesh model in the virtual scene and a target second 3D mesh model generated after simplification.
[0022] 4) Texture image: A two-dimensional pixel data matrix overlaid on the surface of an object such as a 3D mesh model to present the physical appearance details of the material. It typically contains channel information characterizing color, lighting, or surface micro-geometric features. In this application, the texture image is used to store static physically rendered attributes extracted and converted from complex material instances through material baking, providing base color, normals, and other surface rendering parameters for the 3D mesh model. In some embodiments, the texture image is, for example, but not limited to, a two-dimensional image containing base color (BaseColor) channel data generated by performing a scene component traversal-based baking architecture on the material instances of the 3D mesh model, or a set of sub-pixel blocks recording independent material properties such as roughness, metallicity, and self-illumination.
[0023] 5) Combining texture images: Multiple independent texture images are extracted at the pixel level, scaled, resampled, and merged through channels to reassemble into a high-dimensional or large-size unified two-dimensional image data set. In this application, the combined texture image is used to carry the unified material properties corresponding to multiple three-dimensional mesh models within the same processing batch. By integrating the rendering parameters of multiple objects in a single image data, the texture memory usage and the number of drawing calls during computer operation are significantly reduced.
[0024] 6) Texture layout, the coordinate distribution structure of the mapping relationship between the surface of the 3D mesh model and the 2D parametric space, determines how 2D pixel data is wrapped and rendered onto the surface of the 3D object. In this application, texture layout is used to indicate the specific position and mapping ratio of the texture image or combined texture image corresponding to the 3D mesh model in the 2D parametric space, providing a basic reference for pixel block extraction, scaling processing, and coordinate transformation.
[0025] 7) Combined texture layout: Within the global two-dimensional parameterized space, the total two-dimensional parameterized space distribution structure is generated by planning and integrating the positions of multiple independent texture layouts. In this application, the combined texture layout is used as a global coordinate framework to guide the compact stitching of pixel blocks extracted from multiple texture layouts. By eliminating distribution gaps and avoiding coordinate overlap, the utilization rate of the two-dimensional parameterized space is optimized, and accurate positional mapping relationships are provided for generating the combined texture image.
[0026] 8) UV islands refer to independent clusters of polygons on the surface of a 3D mesh model that are unfolded in a two-dimensional parametric space composed of the U-axis and V-axis while maintaining topological continuity. In this application, UV islands are generated by analyzing the surface features of the 3D mesh model, and the UV islands are adaptively scaled and rearranged according to the geometric importance of the volume and surface area of the 3D mesh model, thereby constructing an optimized UV layout (i.e., a combined texture layout) to support efficient resampling and seamless integration of subsequent pixel regions. Therefore, UV islands can also be understood as the aforementioned independent texture layout.
[0027] 9) Polygon reduction: Based on computer graphics algorithms, this is a topological data reduction process that removes redundant vertices by using specific mesh simplification techniques while maintaining the core shape and visual features of the 3D mesh model. In this application, polygon reduction is the core processing method for reducing the data complexity of the 3D mesh model. It adaptively removes redundant polygons based on the model patch density and model contour change values of the first 3D mesh model, reducing the total amount of polygon data while maintaining the original spatial contour fidelity of the 3D object, thereby improving rendering performance.
[0028] 10) Combined layout: Within a defined two-dimensional planar target area, a specific location planning algorithm is used to perform spatial translation, compact positioning, and reorganization of coordinate calculations for multiple discrete two-dimensional geometric boundaries or distribution structures. In this application, combined layout is used to reorganize and position multiple adjusted texture layouts based on two-dimensional boundary features and layout constraint rules, aiming to eliminate distribution gaps between coordinate data and strictly constrain spatial overlap, thereby outputting an efficient and standardized combined texture layout within a unified texture space.
[0029] 11) Batching, in the field of computer graphics rendering, is a rendering performance optimization technique that groups multiple independent geometric objects with similar rendering states or sharing underlying rendering resources into a single rendering batch, which is then processed uniformly by the graphics application programming interface (API). In this application, batching is used to integrate scattered digital assets in a virtual scene. By merging the texture images of multiple 3D mesh models belonging to the same cluster into a combined texture image, and using this combined texture image to dynamically create a unified material instance, multiple independent 3D objects can share the same set of physical rendering parameters, thereby significantly reducing the number of rendering engine calls and texture memory usage in the underlying graphics pipeline.
[0030] 12) Game Assets: Digital content resources used in the game development process, including but not limited to 3D models, texture maps, materials, animations, etc.
[0031] 13) UV Unwrapping: The process of mapping and optimizing the surface of a three-dimensional mesh model to a two-dimensional parametric space.
[0032] 14) Material Baking is a computer graphics preprocessing method that pre-computes the node network and rendering attribute information of highly complex material shaders and converts the output into standard two-dimensional pixel data (multi-channel texture image data). In this application, material baking is used to parse and solidify the initial material instances (containing basic color, normals, and other physically rendered attribute channels) bound to 3D mesh models (e.g., composite mesh components) in a virtual scene, which contain complex hierarchical logic or custom material parameter values, into static texture images. This conversion process eliminates the complex material node calculations in the real-time rendering stage, providing a unified and standardized underlying image data foundation for subsequent combination, arrangement, and batch processing.
[0033] This application provides a data processing method, apparatus, electronic device, computer-readable storage medium, and computer program product for virtual scenes, which can improve the rendering efficiency of virtual scenes. The following is a detailed description of the embodiments of this application based on the above explanation of the terms and concepts used.
[0034] The following describes the data processing system for virtual scenes provided in the embodiments of this application. See also: Figure 1 , Figure 1This is a schematic diagram of the architecture of a virtual scene data processing system provided in an embodiment of this application. To support an exemplary application, the virtual scene data processing system 100 includes: a server 200, a network 300, and a terminal 400. The terminal 400 is connected to the server 200 via the network 300, which can be a wide area network (WAN), a local area network (LAN), or a combination of both, using wireless or wired links for data transmission.
[0035] Here, terminal 400 (e.g., running a client that supports data processing for virtual scenes) responds to data processing instructions for the virtual scene by sending a data processing request to the server. This data processing request requests optimization processing of object data (such as 3D mesh models, texture images, etc.) of objects in the virtual scene. Server 200 responds to the data processing request by obtaining the first 3D mesh models of each of the multiple objects included in the virtual scene, and obtaining the texture image corresponding to each first 3D mesh model. Each first 3D mesh model is then simplified to obtain a second 3D mesh model for each object, wherein the second 3D mesh model of each object includes fewer model faces than the first 3D mesh model. The first three-dimensional mesh model includes the number of model faces; the first geometric feature of each first three-dimensional mesh model is extracted, and the layout adjustment parameters of each first three-dimensional mesh model are determined based on each first geometric feature; the texture layout of each first three-dimensional mesh model is adjusted based on each layout adjustment parameter to obtain each adjusted texture layout, and multiple adjusted texture layouts are combined and arranged to obtain a combined texture layout; multiple texture images are combined according to the combined texture layout to obtain a combined texture image; multiple second three-dimensional mesh models and combined texture images are sent to the terminal 400; the terminal 400 renders multiple objects based on the multiple second three-dimensional mesh models and combined texture images returned by the server 200.
[0036] The virtual scene data processing method provided in this application embodiment is implemented by an electronic device. For example, it can be implemented by a terminal alone, by a server alone, or by a terminal and a server working together. The electronic device implementing the virtual scene data processing method provided in this application embodiment can be various types of terminals or servers. The server (e.g., server 200) can be an independent 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. The terminal (e.g., terminal 400) can be a laptop, tablet, desktop computer, smartphone, smart voice interaction device (e.g., smart speaker), smart home appliance (e.g., smart TV), smartwatch, vehicle terminal, wearable device, virtual reality (VR) device, aircraft, etc., but is not limited to these. The terminal and server can be connected directly or indirectly through wired or wireless communication, and this application embodiment does not impose any restrictions on this.
[0037] In some embodiments, the terminal or server can implement the data processing method for the virtual scene provided in this application by running various computer-executable instructions or computer programs. For example, computer-executable instructions can be microprogram-level commands, machine instructions, or software instructions. Computer programs can be native programs or software modules in an operating system; they can be native applications (APPs), i.e., programs that need to be installed in the operating system to run, such as game APPs; or they can be applets that can be embedded in any APP, i.e., programs that only need to be downloaded to a browser environment to run. In summary, the aforementioned computer-executable instructions can be any form of instruction, and the aforementioned computer programs can be any form of application, module, or plugin.
[0038] The following describes an electronic device for implementing a data processing method for virtual scenes, as provided in an embodiment of this application. See also... Figure 2 , Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 500 provided in this embodiment can be a terminal or a server. Figure 2As shown, electronic device 500 includes at least one processor 510, memory 550, at least one network interface 520, and user interface 530. The various components in electronic device 500 are coupled together via a bus system 540. It is understood that the bus system 540 is used to implement communication between these components. In addition to a data bus, the bus system 540 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in… Figure 2 The general labeled all buses as Bus System 540.
[0039] The processor 510 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.
[0040] User interface 530 includes one or more output devices 531 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 530 also includes one or more input devices 532, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0041] Memory 550 may be removable, non-removable, or a combination thereof. Memory 550 may include one or more storage devices physically located away from processor 510. Memory 550 may include volatile memory or non-volatile memory, or both. Non-volatile memory may be read-only memory (ROM), and volatile memory may be random access memory (RAM). The memory 550 described in this application embodiment is intended to include any suitable type of memory.
[0042] In some embodiments, memory 550 is capable of storing data to support various operations. Examples of such data include programs, modules, and data structures, or subsets or supersets thereof, as illustrated below. Operating system 551 includes system programs for handling various basic system services and performing hardware-related tasks, such as a framework layer, core library layer, driver layer, etc., for implementing various basic services and handling hardware-based tasks; network communication module 552 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 including Bluetooth, Wireless Fidelity (Wi-Fi), and Universal Serial Bus (USB); presentation module 553 is used to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 531 associated with user interface 530 (e.g., a display screen, a speaker, etc.); input processing module 554 is used to detect and translate one or more user inputs or interactions from one or more input devices 532.
[0043] In some embodiments, the data processing device for virtual scenes provided in this application can be implemented in software. Figure 2 A data processing device 555 for a virtual scene stored in memory 550 is shown. It can be software in the form of programs and plug-ins, including the following software modules: acquisition module 5551, simplification module 5552, determination module 5553, adjustment module 5554, combination module 5555, and rendering module 5556. These modules are logical and can therefore be arbitrarily combined or further divided according to the functions they implement. The functions of each module will be described below.
[0044] The following describes the data processing method for virtual scenes provided in the embodiments of this application. As mentioned above, the data processing method for virtual scenes provided in the embodiments of this application is implemented by an electronic device, such as a server or terminal alone, or a server and terminal working together. Therefore, the executing entity of each step will not be described again below. See Figure 3 , Figure 3 This is a first flowchart illustrating the data processing method for a virtual scene provided in this application embodiment. The data processing method for a virtual scene provided in this application embodiment includes: Step 101: Obtain the first three-dimensional mesh model of each of the multiple objects included in the virtual scene, and obtain the texture image corresponding to each first three-dimensional mesh model.
[0045] Regarding step 101, the multiple objects included in the virtual scene refer to digital assets containing geometric and material information constructed in a computer graphics environment; the first 3D mesh model refers to the initial 3D geometric data in the virtual scene without subsequent optimization processing, encompassing single static mesh volumes and composite mesh components with complex hierarchical relationships; the texture image refers to 2D image data generated by converting complex material parameters (material data) through a baking process, including 2D image data containing physical rendering attribute channels such as base color and normals. In some embodiments, the data export process is triggered by the rendering engine to export the selected object as the first 3D mesh model (such as a file in FBX file format), while simultaneously baking the material instances associated with the object into standard texture images.
[0046] Step 102: Perform model simplification processing on each first 3D mesh model to obtain the second 3D mesh model of each object.
[0047] In this case, the second 3D mesh model of each object includes fewer model patches than the first 3D mesh model.
[0048] For step 102, model simplification refers to the process of reducing the number of polygonal faces (i.e., model faces, usually triangular faces) in the 3D mesh model based on geometric feature analysis in 3D space. Therefore, through model simplification, the second 3D mesh model includes fewer model faces than the first 3D mesh model. The second 3D mesh model refers to the 3D geometric data generated after model simplification that contains fewer model faces (relative to the first 3D mesh model) and maintains the 3D contour features of the first 3D mesh model.
[0049] In some embodiments, step 102, "performing model simplification processing on each first three-dimensional mesh model to obtain a second three-dimensional mesh model for each object," can be achieved by performing the following processing on each first three-dimensional mesh model: determining a simplification index value for the first three-dimensional mesh model based on the second geometric features of the first three-dimensional mesh model; if the simplification index value is less than the simplification index threshold, performing model simplification processing on the first three-dimensional mesh model using a first model simplification method to obtain a second three-dimensional mesh model; if the simplification index value is greater than or equal to the simplification index threshold, performing model simplification processing on the first three-dimensional mesh model using a second model simplification method to obtain a second three-dimensional mesh model; wherein the number of model faces removed by the first model simplification method is less than the number of model faces removed by the second model simplification method.
[0050] Here, the second geometric feature refers to the metric data used to calculate the distribution of geometric details in three-dimensional space, including the number of model patches contained in the first three-dimensional mesh model and its own volume data; the simplification index value refers to the value calculated by the second geometric feature to quantify the density of geometric details per unit volume (also known as model patch density or surface density); the simplification index threshold refers to the preset reference limit used to distinguish different geometric detail densities and trigger different model simplification methods; the first model simplification method refers to the conservative patch removal strategy adopted for lower density features (i.e., the simplification index value is less than the simplification index threshold); the second model simplification method refers to the aggressive patch removal strategy adopted for higher density features (i.e., the simplification index value is greater than or equal to the simplification index threshold).
[0051] Specifically, the number of model faces and the model volume contained in the first 3D mesh model are obtained as the second geometric feature. Then, the ratio of the number of model faces to the model volume in the first 3D mesh model is calculated, and this ratio is determined as the simplification index value of the first 3D mesh model to quantify the geometric detail density of the first 3D mesh model in 3D space. If the simplification index value is less than the simplification index threshold, the first 3D mesh model is simplified using the first model simplification method to obtain the second 3D mesh model. If the simplification index value is greater than or equal to the simplification index threshold, the first 3D mesh model is simplified using the second model simplification method to obtain the second 3D mesh model. By executing the above adaptive model simplification method allocation rules, it is ensured that the number of model faces removed by the first model simplification method is less than the number of model faces removed by the second model simplification method.
[0052] By applying the above embodiments and introducing a simplified index value based on the second geometric feature, the geometric detail density of the first 3D mesh model in 3D space is accurately quantified. Adaptive matching of the simplified index threshold between the first and second model simplification methods avoids the loss of visual features caused by uniform facet reduction. Shape features are preserved for low-density models, while the data volume is significantly reduced for high-density models. This achieves a balance between optimization efficiency and visual fidelity while reducing the amount of model facet data.
[0053] In some embodiments, the step "determining a simplified index value of the first three-dimensional mesh model based on the second geometric features of the first three-dimensional mesh model" can be achieved by performing the following steps: obtaining a first number of model patches included in the first three-dimensional mesh model, and obtaining a first volume of the three-dimensional bounding volume of the first three-dimensional mesh model, wherein the second geometric features include the first number and the first volume; determining the model patch density of the first three-dimensional mesh model based on the first number and the first volume, and using the model patch density as a simplified index value of the first three-dimensional mesh model.
[0054] Here, the first quantity refers to the total number of polygonal patches (model patches) contained in the first three-dimensional mesh model that constitute geometric features; the three-dimensional bounding volume refers to the smallest spatial structure in three-dimensional space used to contain the geometric boundary of the first three-dimensional mesh model; the first volume refers to the spatial capacity occupied by the three-dimensional bounding volume in three-dimensional space, which can also be understood as the model volume of the first three-dimensional mesh model; the model patch density refers to the ratio between the first quantity and the first volume, used to quantify the density of geometric details per unit volume.
[0055] Specifically, the geometric data of the first 3D mesh model is analyzed, and the total number of polygonal faces constituting the first 3D mesh model is counted as the first quantity. Simultaneously, a 3D bounding volume enclosing the outer contour of the first 3D mesh model is constructed, and the space occupied by the 3D bounding volume is calculated as the first volume. The first quantity and the first volume are established as the second geometric features describing the first 3D mesh model. Using the obtained second geometric features, the first quantity is divided by the first volume to obtain the model face density of the first 3D mesh model. The model face density is used as a simplified index value for evaluating the degree of face reduction.
[0056] By applying the above embodiments, a quantitative evaluation standard based on three-dimensional objective physical properties is constructed by extracting the first quantity and the first volume to calculate the model patch density. Using the model patch density directly as a simplification index value can accurately reflect the complexity of geometric details within a unit space. This mechanism provides a reliable data-driven foundation for subsequent model simplification methods matched to different geometric density levels, ensuring that the polygon patch removal ratio highly matches the actual geometric features, and improving the scientific rigor and accuracy of three-dimensional mesh data optimization.
[0057] In some embodiments, the following steps may also be performed: for each model facet included in the first three-dimensional mesh model, determine the numerical value of the model contour change of the first three-dimensional mesh model after removing the model facet from the first three-dimensional mesh model. Based on this, "simplifying the first three-dimensional mesh model using a first model simplification method to obtain a second three-dimensional mesh model" can be achieved by performing the following steps: removing model facets whose model contour change values are less than the model contour change threshold from the model facets included in the first three-dimensional mesh model to obtain a second three-dimensional mesh model. Correspondingly, the step "simplifying the first three-dimensional mesh model using a second model simplification method to obtain a second three-dimensional mesh model" can be achieved by performing the following steps: determining a second quantity based on the simplification index value; removing the second quantity of first model facets from the model facets included in the first three-dimensional mesh model to obtain a second three-dimensional mesh model, wherein the model contour change values of the first model facets are all less than the model contour change values of the second model facets, and the second model facets are the model facets in the first three-dimensional mesh model other than the first model facets.
[0058] Here, the model contour change value refers to the evaluation index used to quantify the degree of deformation of the overall geometric shape after removing a specific polygonal facet; the model contour change threshold refers to the preset deformation tolerance reference limit, used to distinguish redundant faces (model contour change value is less than the model contour change threshold) from critical faces (model contour change value is not less than the model contour change threshold); the second quantity refers to the total number of faces to be reduced based on the simplified index value; the first model facet refers to the candidate facet to be removed with a relatively small model contour change value and a weak impact on the overall shape features; the second model facet refers to the facet to be retained with a relatively large model contour change value and a key role in maintaining the original shape features.
[0059] Specifically, the process iterates through each facet of the first 3D mesh model, simulating and calculating the change in the model contour after removing the currently analyzed facet, to assess the impact of the facet on the visual contour. As a relatively conservative first model simplification strategy, facets with contour changes less than a threshold are identified and removed from the first 3D mesh model. This removes redundant data with minimal impact on the visual contour while maintaining the original shape features, resulting in a second 3D mesh model. The specific implementation of simplifying the first 3D mesh model using the second model simplification method to obtain the second 3D mesh model is as follows. As a relatively proactive strategy, the second model simplification method sorts the model patches included in the first 3D mesh model in descending order according to the model contour change value. From the model patches included in the first 3D mesh model, the second number of first model patches that are ranked last in descending order are extracted and removed. The model simplification process is completed to obtain the second 3D mesh model. This ensures that the model contour change value of the first model patch is less than the model contour change value of the second model patch. While reducing the amount of data, the patch structure that plays a decisive role in the geometric shape is retained first.
[0060] By applying the above embodiments, a precise visual feature evaluation mechanism is established by quantifying the model contour change values corresponding to model facets. In the first model simplification method, redundant facets are removed based on the model contour change threshold. In the second model simplification method, first model facets with smaller model contour change values are precisely removed based on the simplification index value. This adaptive mechanism overcomes the defect of traditional uniform simplification, which easily leads to the loss of visual features. It maintains the original three-dimensional geometric shape while reducing the amount of polygon data, achieving a balance between data optimization efficiency and visual fidelity.
[0061] Step 103: Extract the first geometric feature of each first three-dimensional mesh model, and determine the layout adjustment parameters of each first three-dimensional mesh model based on each first geometric feature.
[0062] For step 103, the first geometric feature refers to the metric data used to quantify the physical properties of the first 3D mesh model in 3D space, including the surface area and volume data of the first 3D mesh model; the layout adjustment parameter refers to the numerical index used to control the mapping proportion and arrangement weight of the first 3D mesh model in the 2D parametric space (i.e., texture space), including the scaling ratio determined based on the first geometric feature. Specifically, in the 3D data processing engine, the geometric quantities (surface area and volume data) of each first 3D mesh model are obtained as the first geometric feature, and then the relative proportion of the geometric quantity of each first 3D mesh model in the total geometric quantity of multiple first 3D mesh models is calculated, thereby determining the layout adjustment parameter based on the relative proportion. For example, for first 3D mesh models with a relative proportion higher than the proportion threshold, a layout adjustment parameter for scaling up is assigned to preserve surface details; for first 3D mesh models with a relative proportion not higher than the proportion threshold, a layout adjustment parameter for scaling down is assigned. In this way, by constructing a dynamic scaling mechanism based on the first geometric feature, the layout adjustment parameter of each first 3D mesh model is determined, maintaining the balance of visual details between objects while improving the utilization of the 2D parametric space (i.e., texture space).
[0063] In some embodiments, the first geometric feature is the model geometry of the first three-dimensional mesh model; based on this, step 103, "determining the layout adjustment parameters of each first three-dimensional mesh model based on each first geometric feature", can be achieved by performing the following steps: determining the total model geometry of multiple first three-dimensional mesh models, and performing the following processing for each first three-dimensional mesh model: determining the proportion of the model geometry of the first three-dimensional mesh model relative to the total model geometry; determining the texture space weight of the first three-dimensional mesh model based on the proportion of the first three-dimensional mesh model, wherein the texture space weight and the proportion are positively correlated; and using the texture space weight as the layout adjustment parameter of the first three-dimensional mesh model.
[0064] Here, model geometry refers to the metric data used to quantify the physical dimensional characteristics of the model of the first 3D mesh, including at least one of model surface area and model volume; total model geometry refers to the sum of the model geometry of multiple first 3D mesh models within the same processing batch; proportion refers to the mathematical ratio of the model geometry of a single first 3D mesh model to the total model geometry; texture space weight refers to the mapping area allocation coefficient assigned to a specific first 3D mesh model in the two-dimensional parameterized space (i.e., texture space).
[0065] Specifically, in the first case, the model geometry is only the model surface area. The total model geometry is determined by summing the surface areas of multiple first 3D mesh models, and the proportion of each first 3D mesh model is determined by dividing its surface area by the total model geometry. In the second case, the model geometry is only the model volume. The total model geometry is determined by summing the volumes of multiple first 3D mesh models, and the proportion of each first 3D mesh model is determined by dividing its volume by the total model geometry. In the third case, the model geometry includes both the model surface area and the model volume. The total model geometry, which includes both the total model surface area and the total model volume, is determined by summing the surface areas and volumes of multiple first 3D mesh models. The proportion of each first 3D mesh model is determined by combining the first ratio of its surface area to the total model surface area and the second ratio of its volume to the total model volume, through comprehensive calculation, such as by weighted averaging of the first and second ratios.
[0066] Continuing, the obtained proportions are used to calculate texture space weights, i.e., there is a positive correlation between texture space weights and proportions: for core first 3D mesh models with a higher proportion, a higher texture space weight is assigned so that they obtain a larger proportion of the area in subsequent mappings; for auxiliary first 3D mesh models with a lower proportion, a lower texture space weight is assigned. The determined texture space weight values are directly extracted and assigned as layout adjustment parameters used to control texture layout scaling.
[0067] By applying the above embodiments, an objective evaluation mechanism based on model geometry is constructed by extracting the model surface area and / or model volume as model geometric quantities. Utilizing the rule that proportion is positively correlated with texture space weight, dynamic allocation of the two-dimensional parametric space (i.e., texture space) based on geometric importance (i.e., proportion) is achieved. This ensures that the core 3D mesh model obtains a larger proportion of the mapped area to maintain texture details, while assisting the 3D mesh model to correspondingly reduce the mapping proportion. This significantly improves the utilization rate of the two-dimensional parametric space while maintaining a balance of visual details among different 3D mesh models.
[0068] Step 104: Based on each layout adjustment parameter, adjust the texture layout of each first 3D mesh model to obtain each adjusted texture layout, and combine and arrange multiple adjusted texture layouts to obtain a combined texture layout.
[0069] For step 104, texture layout refers to the coordinate distribution structure of the surface of the first 3D mesh model mapped to the 2D parameterized space, which is an independent texture layout of the first 3D mesh model; adjusted texture layout refers to the new coordinate distribution structure recalculated and generated according to a specific scaling scale (i.e., the layout adjustment parameters mentioned above); combined arrangement processing refers to the process of planning and integrating the positions of multiple independent 2D coordinate distribution structures in the same target space; combined texture layout refers to the total 2D coordinate distribution structure generated after planning and integrating the positions of multiple independent 2D coordinate distribution structures in the same target space (i.e., the global texture layout after integrating and arranging multiple independent texture layouts). In some embodiments, the layout adjustment parameters are used as the calculation basis for the dynamic scaling mechanism, and the scaling operation of the 2D coordinate region is performed on the original texture layout of each first 3D mesh model. In this way, the area of the texture layout is enlarged or reduced according to the layout adjustment parameters, and each adjusted texture layout is generated while maintaining the balance of visual details. Multiple adjusted texture layouts are obtained and combined within a defined two-dimensional parameterized space. This involves compactly splicing and recombining the multiple adjusted texture layouts, eliminating distribution gaps and avoiding spatial overlap, and generating a combined texture layout that covers multiple first three-dimensional mesh models, thereby achieving efficient utilization of the two-dimensional parameterized space.
[0070] In some embodiments, step 104, "adjusting the texture layout of each first three-dimensional mesh model based on each layout adjustment parameter to obtain each adjusted texture layout," can be achieved by performing the following steps: scaling the texture layout of each first three-dimensional mesh model based on each layout adjustment parameter to obtain each scaled texture layout; correspondingly, step 104, "combining and arranging multiple adjusted texture layouts to obtain a combined texture layout," can be achieved by performing the following steps: creating a texture space; combining and arranging multiple scaled texture layouts within the texture space to obtain a combined texture layout.
[0071] Here, scaling refers to the geometric transformation operation of enlarging or reducing the texture layout according to a given scaling factor (i.e., layout adjustment parameter); the scaled texture layout refers to the new texture layout generated after the geometric transformation operation of area enlargement or reduction; texture space refers to the global two-dimensional planar area used to carry and accommodate multiple new texture layouts.
[0072] Specifically, using each layout adjustment parameter, the original texture layout of each first 3D mesh model is scaled in two-dimensional coordinate regions. This involves calculating the area scaling factor determined by the layout adjustment parameters to generate the corresponding scaled texture layout. A two-dimensional planar region with defined boundaries is initialized to create a texture space. Multiple scaled texture layouts are then imported into this space and combined. Position optimization rules are used to plan and move the positions of these scaled texture layouts, resulting in compact stitching and recombination within the texture space. This eliminates gaps and avoids coordinate overlap, ultimately generating a combined texture layout that covers multiple scaled texture layouts of the first 3D mesh models.
[0073] By applying the above embodiments and scaling based on layout adjustment parameters, a mechanism for adaptively adjusting the two-dimensional coordinate mapping space (i.e., texture layout) according to geometric features is established, ensuring the balance of visual details among different 3D mesh models. Within a uniformly created texture space, the scaled texture layout is combined and arranged. Through compact stitching that eliminates gaps and avoids overlaps, the utilization rate within the created texture space is improved. This provides a precise coordinate distribution framework for subsequent pixel-level stitching of texture images, supports batch processing of multiple 3D mesh models, and improves the efficiency of texture memory planning.
[0074] In some embodiments, the step "combining and arranging multiple scaled texture layouts in the texture space to obtain a combined texture layout" can be achieved by performing the following steps: extracting the two-dimensional boundary features of each scaled texture layout; determining the position of each scaled texture layout in the texture space based on the two-dimensional boundary features and arrangement constraint rules, wherein the arrangement constraint rules are used to constrain the non-overlapping of each scaled texture layout in the texture space; and placing each scaled texture layout in the texture space according to each position to obtain a combined texture layout.
[0075] Here, two-dimensional boundary features refer to geometric attribute data used to describe the shape and size of the outer contour of the area occupied in a two-dimensional planar space; layout constraint rules refer to preset calculation conditions used to control the position planning of multiple scaled texture layouts within a specified space to avoid conflicts; position refers to the specific coordinate data determined in the texture space.
[0076] Specifically, the two-dimensional geometry of each generated scaled texture layout is analyzed to extract two-dimensional boundary features defining its outer contour. Using these boundary features, position planning calculations are performed within the texture space. Arrangement constraint rules are introduced as detection conditions to perform position boundary collision detection and movement calculations, ensuring that each scaled texture layout does not overlap within the texture space and eliminating distribution gaps, thereby determining the precise position of each scaled texture layout within the texture space. Based on the coordinate data of each calculated position, each corresponding scaled texture layout is translated and placed into the texture space. Through compact stitching, a combined texture layout containing multiple scaled texture layouts with no overlapping areas is generated.
[0077] By applying the above embodiments, a rigorous two-dimensional spatial positioning planning mechanism is constructed by extracting two-dimensional boundary features and combining them with arrangement constraint rules to determine positions. Arrangement constraint rules ensure that each scaled texture layout does not overlap and eliminates distribution gaps, achieving compact stitching of multiple adjusted texture layouts. This avoids pixel conflicts and overlay problems in texture mapping, significantly improving the utilization rate of texture space and providing a precise coordinate arrangement foundation for subsequently outputting high-quality visually detailed composite texture images.
[0078] Step 105: Combine multiple texture images according to the combined texture layout to obtain a combined texture image.
[0079] For step 105, "combination" refers to a pixel-level data processing operation that merges specific pixel blocks of a texture image based on a combined texture layout; the combined texture image refers to two-dimensional image data containing specific pixel blocks of multiple texture images after merging. In some embodiments, firstly, specific pixel blocks of the texture images are extracted based on the texture layout, and then the specific pixel blocks of multiple texture images are re-merged strictly according to the combined texture layout to obtain the combined texture image.
[0080] In some embodiments, before performing step 105, "combining multiple texture images according to a combined texture layout to obtain a combined texture image," the following step may also be performed: constructing a positional mapping relationship from each texture layout to the combined texture layout; based on this, see [reference needed]. Figure 4Step 105, "Combining multiple texture images according to a combined texture layout to obtain a combined texture image," can be achieved by executing the following steps 1051-1053: Step 1051, extracting pixel blocks from each texture image based on each texture layout; Step 1052, scaling the pixel blocks extracted from each texture layout based on the adjustment parameters of each layout to obtain the target pixel blocks corresponding to each texture layout; Step 1053, combining the target pixel blocks corresponding to multiple texture layouts according to the combined texture layout based on the position mapping relationship to obtain a combined texture image.
[0081] Here, the positional mapping relationship refers to the pixel spatial correspondence established between the original texture layout and the recombined combined texture layout; a pixel block refers to a set of image data corresponding to a specific coordinate boundary range extracted from the original texture image; and the target pixel block refers to a new image that meets the recombined size requirements after resolution adjustment and resampling calculation. Specifically, a precise correspondence is established between the two-dimensional coordinates of the original texture layout and the two-dimensional coordinates of the combined texture layout, constructing a positional mapping relationship from each texture layout to the combined texture layout.
[0082] For step 1051, pixel-level operations are performed using an image processing tool library. Based on the coordinate boundary range defined by each texture layout, image data containing material features is extracted as pixel blocks from each corresponding input texture image.
[0083] For step 1052, the two-dimensional area of the pixel block extracted from each texture layout is scaled and the image is resampled using the scaling ratio value contained in each layout adjustment parameter, so as to obtain the target pixel block corresponding to each texture layout that matches the combined texture layout.
[0084] For step 1053, based on the predetermined position mapping relationship, the target pixel blocks corresponding to multiple texture layouts are combined according to the position of each texture layout planned in the combined texture layout to obtain a combined texture image.
[0085] By applying the above embodiments, and through the construction of positional mapping relationships and combined with image resampling calculations, precise pixel-level conversion of image data between different two-dimensional coordinate distributions is achieved, ensuring that visual details are not lost after scaling. Through the combination of texture images, while significantly reducing texture memory usage, lightweight and visually high-fidelity underlying data support is provided for efficient batch rendering of large-scale objects.
[0086] In some embodiments, see Figure 5Step 1052, "Based on each layout adjustment parameter, scale the pixel blocks extracted from each texture layout to obtain the target pixel block corresponding to each texture layout," can be achieved by performing the following processing on the pixel blocks extracted from each texture layout: Step 201, using layout adjustment parameters, scale the first size of the pixel block to obtain the second size; Step 202, create a first blank pixel block with the second size; Step 203, for each blank pixel in the first blank pixel block, determine the pixel coordinates of the blank pixel in the pixel block, and determine multiple pixels in the neighborhood of the pixel coordinates. Based on the color values of the multiple pixels, determine the target color value of the blank pixel; Step 204, fill the first blank pixel block with the target color value of each blank pixel to obtain the target pixel block.
[0087] Here, the first size refers to the original resolution size of the pixel block before performing two-dimensional area scaling; the second size refers to the target resolution size of the pixel block after scaling calculation; the first blank pixel block refers to the two-dimensional image data matrix with the second size that has not been assigned color data during initialization; the blank pixel refers to the basic image data unit in the first blank pixel block that needs to have its color data calculated and filled; the pixel coordinates refer to the two-dimensional coordinate data used to determine the position of a specific pixel in the two-dimensional image matrix; the color value refers to the channel data that characterizes the visual features and material properties of the image data unit; and the target color value refers to the color channel data of the new image data unit generated after resampling calculation.
[0088] For step 201, obtain the scaling ratio included in the layout adjustment parameters. Apply the obtained scaling ratio to the first size of the pixel block, and perform area enlargement or reduction calculation on the first size through product operation to complete the scaling process, and calculate the second size that satisfies the scaled texture layout.
[0089] For step 202, based on the second size, initialize a two-dimensional image data matrix with a corresponding resolution size, and establish a first blank pixel block that does not contain any material color features.
[0090] For step 203, each blank pixel in the first blank pixel block is traversed, and the pixel coordinates of each blank pixel in the pixel block are determined through inverse spatial mapping calculation. Using the determined pixel coordinates as the reference center, multiple pixels in the neighborhood of the pixel coordinates are found and determined. The color values contained in these multiple pixels are extracted, resampling interpolation calculation is performed, and the target color value that the current blank pixel should have after scaling is calculated and determined by combining the color values of these multiple pixels. The inverse spatial mapping calculation process includes: extracting the two-dimensional row and column positions of the blank pixel in the first blank pixel block as the target coordinates; obtaining the scaling ratio between the first size and the second size; using the scaling ratio to perform inverse scaling conversion on the horizontal and vertical coordinates of the extracted target coordinates to obtain the precise position of the target coordinates in the pixel block, and determining this precise position as the pixel coordinates of the blank pixel in the pixel block, thereby providing an accurate spatial positioning reference for the subsequent extraction of the color values of neighboring pixels.
[0091] For step 204, the calculated target color value for each blank pixel is precisely written into and filled into the corresponding blank pixel position in the first blank pixel block. After completing the value filling process for all blank pixels, a target pixel block containing complete resampled image data and having a second size is generated.
[0092] By applying the above embodiments, a precise image pixel-level resampling mechanism is established by introducing a first blank pixel block and calculating the target color value based on the color values of multiple neighboring pixels. The second size is determined using layout adjustment parameters, and combined with inverse coordinate mapping and comprehensive calculation of neighboring pixels, effectively eliminating pixel distortion during image scaling. This ensures that the target pixel block can fully retain the visual properties of the original material, achieving adaptive adjustment of the two-dimensional image size while maintaining high fidelity of the material parameters to the greatest extent possible.
[0093] In some embodiments, the texture image includes N sub-texture images for each material attribute, the pixel block includes a sub-pixel block extracted from each sub-texture image, and the target pixel block includes a target sub-pixel block obtained by scaling each sub-pixel block, where N is an integer greater than 1. Based on this, before executing step 1053 "combining the target pixel blocks corresponding to multiple texture layouts according to the combined texture layout based on the position mapping relationship to obtain a combined texture image", the following processing can be performed on the target pixel blocks corresponding to each texture layout: constructing a second blank pixel block with N color channels, wherein the color channels and material attributes correspond one-to-one; writing the target sub-pixel blocks of each material attribute included in the target pixel block into the color channels corresponding to the material attributes in the second blank pixel block to obtain the aggregated pixel block corresponding to the texture layout. Based on this, step 1053 "combining the target pixel blocks corresponding to multiple texture layouts according to the combined texture layout based on the position mapping relationship to obtain a combined texture image" can be achieved by executing the following steps: combining the aggregated pixel blocks corresponding to multiple texture layouts according to the combined texture layout based on the position mapping relationship to obtain a combined texture image.
[0094] Here, material properties refer to data describing the physical rendering characteristics of a 3D object surface, such as roughness, metallicity, and self-illumination; sub-texture image refers to 2D image data that stores a specific material property separately in a texture image; sub-pixel block refers to a set of local 2D image data extracted from a sub-texture image with a single material property; target sub-pixel block refers to a set of 2D image data with a new resolution generated after scaling and resampling a sub-pixel block with a single material property; color channel refers to the color layer structure in image data used to independently store specific numerical information; second blank pixel block refers to an initialized 2D image data matrix containing multiple color channels and not filled with material feature data; aggregated pixel block refers to a multi-channel combined 2D image data set generated by writing multiple target sub-pixel blocks with different material properties into their corresponding color channels.
[0095] Specifically, a two-dimensional image data matrix containing N independent color channels is initialized to generate a second blank pixel block, and a one-to-one correspondence is established between each color channel and various material properties such as roughness, metallicity, and self-illumination. Target sub-pixel blocks corresponding to each material property are extracted from the target pixel block. Based on the established one-to-one correspondence, the pixel data of the target sub-pixel blocks corresponding to each material property are written into the dedicated color channel of the second blank pixel block. After multi-channel texture merging processing, the scattered material property data are integrated to generate aggregated pixel blocks corresponding to the texture layout. Using a pre-constructed position mapping relationship, the aggregated pixel blocks corresponding to the generated multiple texture layouts are combined according to the combined texture layout to obtain a combined texture image containing multi-channel material properties.
[0096] It should be noted that the composite texture image includes 2D image data obtained by writing sub-texture images corresponding to multiple material properties into different color channels to generate aggregated pixel blocks, and then arranging them according to the composite texture layout. Furthermore, since the texture image itself includes a base color texture image and a normal texture image, the composite texture image also includes a base color composite texture image obtained by scaling and repositioning pixel blocks extracted from multiple base color texture images according to the composite texture layout, and a normal composite texture image obtained by scaling and repositioning pixel blocks extracted from multiple normal texture images according to the composite texture layout. In this way, a base color composite texture image, a normal composite texture image, and a multi-material property aggregated composite texture image can be obtained, reducing the number of texture files while providing a complete and independent set of physical material parameter data for batch rendering of multiple 3D objects.
[0097] By applying the above embodiments, a second blank pixel block with N color channels is constructed, and multiple target sub-pixel blocks with independent material properties are written to their corresponding color channels, achieving multi-channel texture merging. This integrates discrete material properties into aggregated pixel blocks, significantly reducing the number of texture images, substantially lowering texture memory usage, optimizing data reading efficiency, and providing lightweight data support for efficient batch rendering of objects.
[0098] Step 106: Render multiple objects based on multiple second 3D mesh models and combined texture images.
[0099] For step 106, rendering refers to the computer graphics processing process in the rendering engine that combines the second-dimensional mesh model with the two-dimensional composite texture image, calculates and generates the final image through the graphics pipeline. In some embodiments, multiple material instances corresponding to objects are dynamically created based on a preset material template. The composite texture image is used to provide rendering parameters for the material instances. The color information contained in the composite texture image is precisely connected to the base color input node, and the surface detail information contained in the composite texture image is connected to the normal input node. At the same time, the multi-channel merged material properties in the composite texture image are decoupled, and the separated different channel data are connected to the material property input slots corresponding to roughness, metallicity, and self-illumination, respectively. After completing the connection and configuration of the material node data, the automatic binding of multiple second-dimensional mesh models with corresponding material instances is realized. Thus, using the multiple second-dimensional mesh models bound to material instances, graphics drawing operations are performed in the rendering engine to complete the rendering of multiple objects.
[0100] In some embodiments, the following steps may be performed before step 103: obtaining the expected number of material instances to be created during rendering; clustering multiple first three-dimensional mesh models based on each first geometric feature to obtain the expected number of clusters, wherein each cluster includes multiple first three-dimensional mesh models. Based on this, steps 103-105 are all processed for each cluster, namely: Step 103 includes: for each cluster, determining the layout adjustment parameters of each first 3D mesh model in the cluster based on the first geometric features of each first 3D mesh model in the cluster; Step 104 includes: for each cluster, adjusting the texture layout of each first 3D mesh model in the cluster based on the layout adjustment parameters corresponding to the cluster, obtaining the adjusted texture layout of each first 3D mesh model in the cluster; combining and arranging the adjusted texture layouts of each first 3D mesh model in the cluster to obtain the combined texture layout corresponding to the cluster; Step 105 includes: for each cluster, combining the texture images corresponding to multiple first 3D mesh models in the cluster according to the combined texture layout corresponding to the cluster, obtaining the combined texture image corresponding to the cluster. Based on this, Step 106 includes: rendering multiple objects based on multiple second 3D mesh models and the combined texture images corresponding to the desired number of clusters.
[0101] Here, the expected number refers to the preset total number of material instances to be generated during the rendering stage, used as the center number for cluster analysis; a cluster refers to a data set divided after clustering processing, where multiple first 3D mesh models within the same data set have high consistency in visual proportion and 2D parametric space mapping requirements. In some embodiments, the expected number is obtained and determined as the cluster center number. The first geometric features (i.e., volume and surface area) of the first 3D mesh model are extracted to construct the corresponding feature vector. Based on this feature vector, a clustering algorithm is used to cluster multiple first 3D mesh models, grouping first 3D mesh models with similar first geometric features into the same cluster to obtain the expected number of clusters, each cluster including multiple first 3D mesh models. Thus, the multiple first 3D mesh models included in each cluster are combined into a batch for processing in steps 103-105, realizing batch processing based on clusters.
[0102] By applying the above embodiments, multiple first 3D mesh models are divided into a desired number of clusters based on the first geometric features, establishing a data-driven classification foundation and ensuring that models within the same cluster have high consistency in geometric features. For each cluster, independent texture layout adjustment, texture layout combination, and texture image combination are performed (i.e., steps 103-105). Rendering multiple objects using the combined texture images corresponding to each cluster only requires creating the desired number of material instances (one-to-one with the combined texture images). This integrates the scattered material data (i.e., the material data corresponding to each first 3D mesh model) into the desired number of material instances, significantly reducing the number of runtime drawing calls and texture memory usage, and significantly improving rendering frame rate stability and batch processing efficiency.
[0103] In some embodiments, step 101, "obtaining the first three-dimensional mesh model of each of the multiple objects included in the virtual scene, and obtaining the texture image corresponding to each first three-dimensional mesh model," can be achieved by performing the following steps: generating multiple first three-dimensional mesh models through a rendering engine, performing material baking on the material instance of each first three-dimensional mesh model to obtain each texture image, and generating a relational description file, wherein the relational description file describes the correspondence between each first three-dimensional mesh model and each texture image; obtaining the relational description file through a three-dimensional data processing engine via a data channel established between the rendering engine and the three-dimensional data processing engine, and obtaining multiple first three-dimensional mesh models based on the relational description file, and obtaining the texture image corresponding to each first three-dimensional mesh model.
[0104] Here, the rendering engine refers to the computer program used to create 3D scenes, process material logic, and generate graphical images. A material instance is a data object that inherits from a parent material and can have its specific rendering parameters modified to present different surface appearances. Material baking is the process of calculating and converting the complex node network and dynamic rendering attributes of a material instance into a static 2D image. A relation description file is a metadata file, such as a JSON file, used to record and declare the mapping relationships between multiple first-level 3D mesh models and their corresponding texture images. The data channel refers to the cross-platform interactive link established between the rendering engine and the 3D data processing engine to achieve lossless data transmission and parsing.
[0105] Specifically, the data export process is triggered in the rendering engine to generate multiple first 3D mesh models containing object geometry data, such as FBX format files. Material baking is performed on the material instances of each first 3D mesh model to obtain each texture image. Simultaneously, a relationship description file is generated, recording the correspondence between the data and describing the relationship between each first 3D mesh model and each texture image. Next, the 3D data processing engine reads and parses the relationship description file through the data channel established between the rendering engine and the 3D data processing engine. Based on the declarative metadata-driven mechanism in the relationship description file, the multiple first 3D mesh models output by the rendering engine are accurately obtained, and the texture image corresponding to each first 3D mesh model is synchronously obtained based on the recorded correspondence, completing the cross-platform data acquisition operation.
[0106] By applying the above embodiments and establishing a data channel and generating a relational description file, cross-platform automated lossless transmission of 3D mesh data and texture images was achieved, resolving the data consistency issue in dual-engine collaboration. This eliminates the intermediary step of manual data transfer, improving the automation and stability of data acquisition while maintaining lossless visual quality.
[0107] In some embodiments, after step 105 "combining multiple texture images according to a combined texture layout to obtain a combined texture image", the following steps may also be performed: using a 3D data processing engine, updating the relation description file based on each second 3D mesh model and the combined texture image to obtain a target relation description file, wherein the target relation description file describes the correspondence between each second 3D mesh model and the combined texture image; using a rendering engine, when it is detected that multiple second 3D mesh models, combined texture images, and target relation description files have been generated, obtaining multiple second 3D mesh models, combined texture images, and target relation description files from the 3D data processing engine; based on this, step 106 "rendering multiple objects based on multiple second 3D mesh models and combined texture images" can be achieved by performing the following steps: using a rendering engine, rendering multiple objects based on multiple second 3D mesh models, combined texture images, and target relation description files.
[0108] Here, the target relationship description file refers to the modified metadata file used to record the new mapping relationship between the optimized 3D geometric data (i.e., the second 3D mesh model) and the merged 2D image data (i.e., the combined texture image). Detection refers to the process of using automated scripts to identify the target file generation status in real time. Acquisition refers to the operation of importing the generated data and associated information into the target environment.
[0109] Specifically, after the 3D data processing engine completes the batching operation, it extracts the identification information of each generated second 3D mesh model and combined texture image. Based on each second 3D mesh model and combined texture image, it updates the original relational description file, updating the data pointers of the relational description file to the second 3D mesh model and combined texture image, thus obtaining the target relational description file. This target relational description file precisely describes the correspondence between each second 3D mesh model and combined texture image. An automated script-based detection mechanism is used to monitor the data processing status of the 3D data processing engine through the rendering engine. When multiple second 3D mesh models, combined texture images, and target relational description files are detected, a data backhaul mechanism is triggered, automatically importing and retrieving these multiple second 3D mesh models, combined texture images, and target relational description files from the 3D data processing engine. The rendering engine then parses the mapping relationships (i.e., correspondences) recorded in the target relational description files and renders multiple objects based on these multiple second 3D mesh models, combined texture images, and target relational description files. During the rendering process, the corresponding material instance is dynamically created based on the target relationship description file and the preset material template. The channel data in the combined texture image is precisely connected to the input slot corresponding to the material instance, and the optimized second-dimensional mesh model and the material instance are effectively integrated and automatically bound. Then, the graphics drawing operation is performed in the rendering engine to output the screen.
[0110] By applying the above embodiments, a declarative virtual scene data (such as game assets) reconstruction mechanism is constructed by updating and generating the target relationship description file, ensuring semantic consistency of data during cross-platform interaction. Data acquisition is triggered by an automated script detection mechanism, and automated binding and rendering are achieved in conjunction with the target relationship description file, avoiding errors caused by manually configuring material links. This forms an end-to-end fully automated closed loop from optimization to integration, significantly improving the batch processing efficiency of virtual scene data and the stability of large-scale production.
[0111] In some embodiments, the number of combined texture images is multiple. A combined texture image is obtained by combining texture images corresponding to the first three-dimensional mesh models included in a cluster. The cluster is obtained by clustering multiple first three-dimensional mesh models. The step "rendering multiple objects based on multiple second three-dimensional mesh models, combined texture images, and target relationship description files" can be achieved by performing the following steps: parsing the target relationship description file to obtain the target correspondence between each second three-dimensional mesh model and each combined texture image; creating a material instance corresponding to each combined texture image based on each combined texture image; binding the material instance corresponding to each combined texture image and the second three-dimensional mesh model corresponding to each combined texture image based on the target correspondence; and rendering multiple objects based on each second three-dimensional mesh model with a bound material instance.
[0112] Here, target correspondence refers to the precise mapping connection between the optimized 3D geometric data (i.e., the second 3D mesh model) and the merged 2D image data (the combined texture image corresponding to the cluster) generated by its respective cluster batch; creating a material instance refers to the instantiation process of a data object that is dynamically generated in the rendering engine based on a preset data template and receives combined texture image input to control the appearance of the model surface; binding refers to the linking operation of assigning and applying the material instance with configured rendering parameters to the corresponding 3D mesh data surface.
[0113] Specifically, when there are multiple composite texture images, each composite texture image is obtained by combining texture images corresponding to the first 3D mesh models included in a cluster. The clustering is achieved by clustering multiple first 3D mesh models. The mapping labels recorded in the target relationship description file are read and parsed to obtain the target correspondence between each second 3D mesh model and each composite texture image. Based on the rendering parameters carried by each composite texture image, a material instance corresponding to each composite texture image is dynamically created using a preset material template. During creation, the base color image contained in the composite texture image is precisely connected to the base color input node, the normal image is connected to the normal input node, and different channels in the multi-channel aggregated image are decoupled and connected to the material input slots corresponding to roughness, metallicity, and self-illumination. Based on the target correspondence, the material instance corresponding to each composite texture image and the second 3D mesh model corresponding to each composite texture image are bound together, completing the automatic integration of the optimized model and material instance. Using the rendering engine's graphics pipeline, multiple objects are rendered based on each second 3D mesh model bound with material instances. Thus, multiple objects are rendered through the rendering engine based on multiple second 3D mesh models, composite texture images, and target relationship description files.
[0114] By applying the above embodiments, the target correspondence is extracted by parsing the target relationship description file, ensuring accurate matching of multi-batch clustered 3D mesh models during the reconstruction stage. Material instances are automatically created based on combined texture images, and the connections between various material channels are decoupled. Combined with an automated binding mechanism, an end-to-end closed loop from combined texture images to material reconstruction is constructed. This eliminates the risk of errors from manual material linking, significantly reducing the total number of material instances and the number of rendering calls, while ensuring high fidelity of visual features and improving the reliability of batch optimization.
[0115] In some embodiments, the step "perform material baking on each material instance of the first 3D mesh model to obtain each texture image" can be achieved by performing the following processing on each first 3D mesh model: obtaining the hierarchical topology of the first 3D mesh model, and extracting multiple mesh components and the local spatial transformation relationship of each mesh component based on the hierarchical topology; performing pose reconstruction processing on multiple mesh components based on each local spatial transformation relationship to obtain a composite mesh component; obtaining the initial material instance associated with each mesh component, and performing material baking on the composite mesh component based on multiple initial material instances to obtain a texture image.
[0116] Here, hierarchical topology refers to the organizational structure describing the parent-child nesting and subordinate relationships among multiple components within a 3D mesh model; mesh components refer to the basic static geometric units that constitute a complete 3D mesh model; local spatial transformation relationships refer to the translation, rotation, and scaling parameters of mesh components relative to their parent nodes or the world origin within the hierarchical topology; pose reconstruction processing refers to the process of combining and restoring the positions of scattered mesh components in a unified 3D coordinate system based on spatial transformation parameters; composite mesh components refer to unified geometric data containing a complete hierarchical structure formed after position restoration and combination processing; and initial material instances refer to the original material data objects that are bound to the basic static geometric units before the baking operation and contain unmerged rendering attributes.
[0117] Specifically, the hierarchical topology of the first 3D mesh model is obtained. A recursive component acquisition mechanism is used to parse the hierarchical topology and extract multiple mesh components included in the first 3D mesh model. Simultaneously, the local spatial transformation relationship corresponding to each mesh component in the hierarchical topology is obtained. Then, based on the translation, rotation, and scaling parameters contained in each local spatial transformation relationship, pose reconstruction processing is performed on multiple mesh components in a unified 3D coordinate space to restore and merge the complete geometric shape of the object, resulting in a composite mesh component. The initial material instance associated with each mesh component is obtained, and the extracted material information is incorporated into a unified baking process. Based on the surface rendering attributes provided by multiple initial material instances, global material baking processing is performed on the reconstructed composite mesh component, converting the material information of the composite geometry into static 2D image data to obtain a texture image.
[0118] By applying the above embodiments and acquiring the hierarchical topology and local spatial transformation relationships, and performing pose reconstruction processing, the limitation of rendering engines in processing single static mesh component baking is overcome. This allows for the automatic identification and processing of complete objects containing complex hierarchical nesting relationships, ensuring that the spatial transformation relationships and initial material instance information of all mesh components are fully incorporated into the calculation. While maintaining the overall visual effect without loss of quality, the complex materials of composite objects are successfully converted into unified texture images suitable for batch processing, improving the automation level of baking complex virtual scene data.
[0119] In some embodiments, see Figure 6The step "Bake the composite mesh component with materials based on multiple initial material instances to obtain a texture image" can be achieved by executing the following steps 301-304: Step 301: Determine the first node that supports custom material parameter values from the material tree of each initial material instance, and extract the static material parameter values associated with the first node from each initial material instance; Step 302: Generate temporary material instances that match each initial material instance, wherein the temporary material instances include a second node that matches the first node; Step 303: Input the static material parameter values into the second node of each temporary material instance to obtain the target material instance corresponding to each temporary material instance; Step 304: Bind multiple target material instances to the composite mesh component, and bake the composite mesh component with multiple target material instances to obtain a texture image.
[0120] Here, the material tree refers to the hierarchical node network structure that represents the internal rendering logic and parameter passing relationships of a material; custom material parameter values (Custom Primitive Data) refer to rendering data such as dynamic scalar or vector parameters passed to the material through the mesh component; the first node refers to a specific logical unit in the material tree used to receive custom material parameter value input; static material parameter values refer to rendering parameters in fixed numerical form parsed and extracted from the dynamic runtime environment; temporary material instances refer to transitional material data objects generated in real time during the baking execution phase to carry static parameters; the second node refers to the logical unit in the temporary material instance used to receive and fix static values; and the target material instance refers to the final material data object generated after the static parameter replacement is completed, used to perform baking calculations.
[0121] For step 301, the material tree of each initial material instance is parsed using runtime material instance dynamic parsing technology. From the material tree of each initial material instance, the first node that supports custom material parameter values is accurately identified and determined, a corresponding parameter mapping table is established, and the static material parameter values associated with the first node are extracted from each initial material instance.
[0122] For step 302, temporary material instances are created and generated in real time, each matching the initial material instance. These temporary material instances include a second node that matches the first node. Here, "matching" refers to a one-to-one correspondence between the temporary and initial material instances in terms of the logical structure of the material tree nodes, rendering attribute configurations, and visual output characteristics. In practice, this matching relationship is manifested in the temporary material instance copying and inheriting the basic rendering network data of the initial material instance. Simultaneously, the first node within the initial material instance, used to receive dynamically customized material parameter values, is reconstructed into a second node within the temporary material instance specifically designed to carry static material parameter values. By establishing this matching relationship, it is ensured that the temporary material instance, after node replacement, can output a surface rendering effect consistent with the initial material instance during material baking, thus achieving a lossless conversion from dynamic to static data while maintaining the original visual characteristics.
[0123] For step 303, based on the established parameter mapping table, the extracted static material parameter values are input into the second node of each temporary material instance, and the dynamic input is replaced with fixed static parameter values to complete the data conversion from dynamic to static, thereby obtaining the target material instance corresponding to each temporary material instance.
[0124] For step 304, multiple target material instances containing static parameters are bound to the reconstructed composite mesh component, and the composite mesh component with multiple target material instances bound is subjected to material baking to obtain visual features and convert them into two-dimensional image data, finally obtaining a texture image.
[0125] See Figure 7 First, the material tree of the initial material instance is parsed to identify the first node that supports custom material parameter values (Custom Primitive Data), and the static material parameter values associated with this first node are extracted. Simultaneously, a temporary material instance with a matching inheritance relationship to the initial material instance is generated. The material tree of this temporary material instance includes a second node that matches the first node. Next, the extracted static material parameter values are input into the second node of the temporary material instance along the data flow path, completing the static parameter replacement and obtaining the corresponding target material instance. Finally, the generated target material instance is bound to a composite mesh component, and material baking is performed on the composite mesh component with the bound target material instance, converting the material information into static two-dimensional image data to obtain the texture image.
[0126] By applying the above embodiments, the first node is determined through parsing the material tree and static material parameter values are extracted. Combined with the second node of a temporary material instance, numerical replacement is completed, thus constructing a static material parameter preprocessing mechanism. This avoids the technical challenge of correctly obtaining dynamic custom material parameter values during the baking process, ensuring a high degree of visual consistency for the target material instance. Material baking is then applied to the composite mesh component bound to the target material instance, enabling complex materials containing dynamic parameters to be successfully converted into static textures, laying a data foundation for subsequent model batching and performance optimization.
[0127] like Figure 8 The diagram illustrates the architecture of a cross-platform dual-engine collaborative and data interaction system. First, the rendering engine generates a first 3D mesh model (FBX) and its corresponding texture image (PBR), simultaneously generating a relational description file (JSON). This file objectively records and indicates the logical correspondence between the first 3D mesh model and the texture image. Next, the 3D data processing engine retrieves the first 3D mesh model and texture image from the rendering engine via a data channel established between the two. Then, the 3D data processing engine performs data optimization and reconstruction to obtain a second 3D mesh model with reduced polygon count, an aggregated texture image, and associated material instances. Based on this reconstruction, the original relational description file is updated, generating a target relational description file (JSON file). Finally, the target relational description file is sent back to the rendering engine via the data channel, driving the rendering engine to automatically bind and render the material instances of the second 3D mesh model and the aggregated texture image based on the guidance of the target relational description file.
[0128] By applying the embodiments described above, on the one hand, each first 3D mesh model is simplified to obtain a second 3D mesh model with fewer facets than the first 3D mesh model, effectively reducing the geometric computational complexity of the 3D mesh model in the virtual scene. On the other hand, first geometric features are extracted to determine layout adjustment parameters to adjust the texture layout. Multiple adjusted texture layouts are combined to obtain a combined texture layout, and multiple texture images are combined according to the combined texture layout to obtain a combined texture image, integrating complex and discrete texture data into unified combined texture data. Finally, multiple objects are rendered based on multiple second 3D mesh models and combined texture images. By reducing the number of facets and merging texture images, the resource access and processing pressure during the rendering process is effectively reduced, significantly improving the rendering speed and processing efficiency of various objects in the virtual scene.
[0129] The following uses a virtual scene as an example to illustrate an exemplary application of this application in a real-world application scenario.
[0130] While related technologies provide a basic workflow for game development, the material baking and polygon reduction tools in game engines are general-purpose post-processing solutions that only support basic static models and standard materials. They cannot handle complex hierarchical models (Actors) or advanced materials with custom parameters. Furthermore, polygon reduction often leads to over-smoothing of critical details and does not automatically reconstruct UVs and bake textures, resulting in uncontrollable low-poly quality. Moreover, the tools in the workflow are isolated from each other, failing to form an automated pipeline, resulting in a large amount of manual work (e.g., artists need to repeatedly reconstruct and reduce polygons in 3D processing software and manually stitch texture atlases in image processing software to support batch processing). This fragmented process, highly dependent on manual labor, not only consumes a lot of time but also causes quality fluctuations in game assets due to individual skill differences, reducing the production efficiency and iteration speed of large-scale, high-quality game assets.
[0131] Based on this, embodiments of this application provide a method for processing virtual scene data (i.e., game assets) to at least solve the aforementioned problems. First, the procedural modeling engine (i.e., the aforementioned 3D data processing engine) and the rendering engine are integrated through a deeply integrated plugin to achieve cross-platform automated game asset processing pipeline. Simultaneously, a general-purpose material baking system is developed within the rendering engine, supporting one-click texture baking for complex Actor levels and advanced material nodes, overcoming the limitations of the rendering engine's native functionality. Furthermore, by introducing an intelligent UV unwrapping algorithm based on geometric feature analysis and a UV island arrangement strategy that adapts to model proportions, combined with automatic texture atlas generation technology, efficient batch preparation of game assets is achieved. A fully automated processing flow from polygon reduction optimization and UV rearrangement to material baking is also established. Through intelligent resource management and game asset dependency maintenance, the visual fidelity of game assets is maintained while significantly improving production efficiency, providing a stable and reliable game asset optimization solution for large-scale game development.
[0132] The following section will first describe the embodiments of this application from the product perspective. These embodiments are applicable to game asset processing developed using rendering engines, especially for projects with a large demand for batch processing and polygon reduction. Using these embodiments can save significant manpower costs.
[0133] like Figure 9 As shown, developers can see tool panel 90 in the rendering engine application. In the "Set Surface Reduction and Merging Parameters" function area 91 of tool panel 90, they can set the surface reduction and merging parameters (such as surface reduction ratio, output texture size, output material ball number (i.e. batch result)) according to their needs. Subsequently, the game assets will be optimized based on the set surface reduction and merging parameters.
[0134] like Figure 10The image shows a comparison of the effects before and after UV intelligent adjustment using the embodiments of this application. Figure 10 The middle part (1) shows the UV island arrangement effect before UV intelligent adjustment. Figure 10 The middle part (2) shows the UV island arrangement effect after UV intelligent adjustment. As can be seen, intelligently adjusting the scaling scale of the UV islands and rearranging them according to the volume ratio of the three-dimensional mesh model in three-dimensional space can improve the utilization rate of texture space and reduce the waste of texture space.
[0135] Regarding model optimization, the embodiments of this application possess visual fidelity capabilities that meet preset indicators. For example... Figure 11 As shown, where, Figure 11 The middle part (1) shows the visual effect before face reduction and batch processing. Figure 11 The middle part (2) shows the rendering effect after reducing the number of faces and batch processing. It can be seen that in this embodiment of the application, the number of model faces is reduced from 70,000 to 20,000 and the number of material spheres is reduced from 27 to 5, while the two still maintain a highly consistent visual effect. This optimization, which is achieved while ensuring that the image quality (i.e. the visual effect) remains unchanged, brings a significant improvement to the game performance.
[0136] Extensive testing has demonstrated that the embodiments of this application exhibit good stability and practicality. For example... Figure 12 As shown in the middle section (1), even when the number of model faces is reduced from 23,000 to 16,000 and then to 12,000, the visual effect remains highly consistent; as Figure 12 As shown in the middle section (2), even when the number of model faces is reduced from 71,000 to 19,000 and then to 12,000, the visual effect remains highly consistent. Thus, it is evident that the embodiments of this application can output stable and reliable optimization results for scenarios of varying complexity, meeting the needs of game development.
[0137] Next, we will describe the embodiments of this application from a technical perspective. This application's embodiments achieve fully automated processing from model polygon reduction and UV optimization to material batching by deeply integrating the procedural modeling engine and rendering engine, while developing automated processing plugins and intelligent algorithm modules. Ultimately, this significantly improves game performance while ensuring visual quality. Figure 13 The process of an embodiment of this application is illustrated, specifically including the establishment of a cross-platform data channel, a material baking system, model geometric feature analysis, UV adaptive layout algorithm, and batching. These are described below.
[0138] (1) Establishment of a cross-platform data channel. This embodiment establishes a cross-platform data channel with FBX files (i.e., the file of the first 3D mesh model mentioned above) and JSON metadata as its core, realizing an automated game asset optimization process between the rendering engine and the procedural modeling engine. The data channel first exports the 3D mesh model of the selected object as an FBX file through the rendering engine plugin, and bakes complex material instances into a set of standard PBR texture maps (including channels such as BaseColor and Normal), and generates a JSON metadata file (i.e., the relationship description file mentioned above) that records the corresponding relationships. On the procedural modeling engine side, after reading these files, the system performs intelligent polygon reduction, texture merging and UV rearrangement optimization, and re-baks and merges the scattered textures into a unified texture atlas according to the optimized new UV layout, and updates the JSON metadata file to point to the optimized new game asset. Finally, the rendering engine plugin automatically imports the optimized FBX file and texture atlas, and automatically creates material instances and completes binding according to the updated JSON metadata. This channel architecture, driven by declarative metadata files, successfully solves the problem of data semantic consistency in cross-platform collaboration by converting the rendering engine's unique material logic into general texture data. It forms a complete automated closed loop from deconstruction, optimization to reconstruction, avoiding the manual intermediary links in the traditional process.
[0139] (2) Material Baking System. This application embodiment overcomes the limitations of the rendering engine's native functions by configuring plugins, achieving comprehensive material baking support for Actor levels and Static Meshes. Unlike the rendering engine's built-in baking tools, which can only handle single Static Meshes, this application embodiment develops a baking architecture based on scene component traversal. This architecture can automatically identify and process complete Actors with complex hierarchical relationships. Through a recursive component acquisition mechanism, all static mesh components under an Actor and their spatial transformation relationships are uniformly incorporated into the baking process, ensuring that the material information of composite assets can be completely and accurately baked to the target texture.
[0140] To address the complexities of dynamic material parameters driven by Custom Primitive Data (a vertex-level data channel in rendering engines that allows passing custom scalar or vector parameters to materials via mesh components), a unique static preprocessing mechanism for material parameters was designed. During the baking initialization phase, runtime material instance dynamic parsing technology accurately identifies all input nodes in the material tree connected to Custom Primitive Data and creates corresponding parameter mapping tables. During baking execution, specially processed temporary material instances are generated in real-time, replacing the dynamic Custom Primitive Data input with static parameter values extracted from the original material instance. This crucial step maintains complete consistency in the material's visual effect while avoiding the technical challenge of correctly acquiring dynamic data during baking. This intelligent dynamic-to-static conversion strategy ensures that even highly complex dynamic materials (i.e., complexity exceeding a preset threshold) achieve baking results completely consistent with real-time rendering. Thus, while maintaining lossless visual quality, complex materials containing dynamic parameters are successfully converted into static texture sets suitable for batch processing, providing data support for subsequent model batching and performance optimization.
[0141] (3) Model geometric feature analysis. This application embodiment deeply utilizes the procedural modeling capabilities of the procedural modeling engine to establish an intelligent analysis and processing pipeline based on multi-dimensional geometric metrics. This process achieves accurate model optimization and batch preprocessing through two key steps: First, in the face reduction optimization stage, a face reduction evaluation index is introduced, namely the ratio of the number of facets to the volume (facet density). This index can effectively quantify the geometric detail density of the model in three-dimensional space. For models with low facet density (i.e., fewer triangles per unit volume), the system adopts a relatively conservative face reduction strategy, removing only redundant triangles that have the least impact on the visual contour, thereby reducing the number of facets while preserving the original shape features of the model to the greatest extent. For models with high facet density, a more aggressive face reduction operation is implemented. Through this adaptive face reduction mechanism based on geometric characteristics, the problem of visual feature loss caused by traditional uniform face reduction is successfully solved, achieving a good balance between optimization efficiency and visual fidelity.
[0142] Secondly, in the batch preprocessing stage, the preset final number of material spheres is used as the number of cluster centers (K value) to drive the improved K-means clustering algorithm to intelligently cluster all models. The volume and surface area of each model are used as the feature vectors required for clustering to calculate similarity. Models with similar geometric features are automatically merged into the same processing batch. This clustering result not only significantly reduces the number of independent assets that need to be processed later, but also establishes a scientific classification basis for subsequent UV layout rearrangement and texture merging. It ensures that the models in each cluster have a high degree of consistency in visual proportion and texture requirements, thus providing a data-driven decision basis for the entire asset optimization process. This enables the entire process from face reduction to batching to be intelligently processed based on the objective geometric attributes of the models.
[0143] (4) UV adaptive layout algorithm and batching. The embodiments of this application implement a complete texture-driven game asset optimization process: First, based on the results of the previous stage clustering analysis, intelligent UV recombination is performed on all models in the same cluster. This process is not a simple uniform layout, but rather the UV space weight that each model should receive is accurately calculated based on the relative proportion of the surface area and volume of each model in the total geometry of the cluster. Core models with a higher surface area / volume ratio will obtain a larger proportion of UV area to maintain texture details, while auxiliary models with a lower proportion will have their UV ratio reduced accordingly. Through this dynamic scaling mechanism based on geometric importance, the visual detail balance between different models is ensured while optimizing the texture space utilization.
[0144] After completing the UV layout rearrangement, precise pixel-level operations are performed on the original texture by comparing the mapping relationship between the old and new UV layouts: First, the pixel regions corresponding to the UV islands of each model in the original texture map are extracted. Then, the pixel blocks are intelligently scaled and resampled according to the scaling ratio (i.e., the UV space weights mentioned above). Finally, all the processed pixel blocks are reassembled into the final output texture according to the new UV layout. In this process, a multi-channel texture merging technique is also implemented, which merges the three material properties of roughness, metallicity, and self-illumination into a single RME map through a specific channel allocation scheme. In the end, each model only needs to output an FBX file containing optimized geometric data and three core texture maps: a BaseColor map containing color information, a Normal map containing surface details, and a multi-channel unified RME map.
[0145] During the post-upload phase of the optimized game assets, an automated script automatically imports the generated FBX and three texture sets into the rendering engine after detecting that the procedural modeling engine has completed the batching operation. Based on the preset material template, the script dynamically creates corresponding material instances, precisely connects the BaseColor map to the base color input, and the Normal map to the normal input. At the same time, the different channels in the RME map are decoupled and connected to the material slots corresponding to roughness, metallicity, and emissivity, respectively. Finally, the optimized model and material instances are automatically bound together, forming an end-to-end automated batching solution from UV optimization and texture merging to game asset reconstruction.
[0146] The following will explain... Figure 13 The embodiments of this application include: 1. Initiating the game asset optimization process; 2. Baking material instances of a specified scene using the rendering engine plugin to obtain the original PBR texture map; 3. Exporting the original FBX model and the original PBR texture map; 4. Generating a JSON metadata file to record the correspondence between the original FBX model and the texture map; 5. Performing geometric feature analysis on the model; 6. Clustering the model; 7. Performing intelligent polygon reduction processing on the model to obtain a new FBX model; 8. Adaptively arranging the old UV layout; 9. Generating a texture atlas based on the new UV layout after arrangement, including BaseColor / Normal / RME; 10. Updating the original FBX model to the new FBX model and updating the original texture map to the texture atlas; 11. Updating the JSON metadata file; 12. The rendering engine plugin automatically imports the new FBX model and texture atlas; 13. Automatically creating material instances and linking them to the texture atlas; 14. Automatically binding the model and material instances; 15. Optimization complete: the number of model faces decreases, and the number of material spheres decreases.
[0147] By applying the embodiments described above, a fully automated game asset optimization pipeline has been constructed, resulting in significant benefits: First, the traditional manual processes of model reduction, UV arrangement, and material batching are integrated into a single automated process, reducing the optimization time for a single scene from several days to several hours, increasing production efficiency by over 300%. Second, through a geometric feature-based intelligent reduction algorithm and a proportionally adaptive UV arrangement technology, the number of model faces is reduced by 60%-80%, and the number of material spheres is reduced by over 80%, while maintaining the visual fidelity required for game development, effectively resolving the contradiction between optimization quality and performance improvement. Third, the multi-channel texture merging technology and automated game asset binding mechanism not only reduce texture memory usage by 70% but also avoid linking errors that may occur due to manual operation, ensuring the reliability of game asset management. Finally, through a standardized processing flow, optimized game assets of uniform quality are output, reducing the number of rendering calls during game runtime by over 50%, significantly improving frame rate stability, and providing reliable technical support for the efficient development and stable operation of large-scale games.
[0148] The following description continues to illustrate the exemplary structure of the virtual scene data processing device 555 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2 As shown, the software modules in the virtual scene data processing device 555 stored in the memory 550 may include: an acquisition module 5551, used to acquire first three-dimensional mesh models of each of the multiple objects included in the virtual scene, and acquire texture images corresponding to each first three-dimensional mesh model; a simplification module 5552, used to perform model simplification processing on each first three-dimensional mesh model to obtain a second three-dimensional mesh model of each object, wherein the number of model patches included in the second three-dimensional mesh model of each object is less than the number of model patches included in the first three-dimensional mesh model; and a determination module 5553, used to extract each first three-dimensional mesh model... The first geometric feature of the grid model is used to determine the layout adjustment parameters of each first three-dimensional mesh model based on each first geometric feature; the adjustment module 5554 is used to adjust the texture layout of each first three-dimensional mesh model based on each layout adjustment parameter to obtain each adjusted texture layout, and to combine and arrange multiple adjusted texture layouts to obtain a combined texture layout; the combination module 5555 is used to combine multiple texture images according to the combined texture layout to obtain a combined texture image; the rendering module 5556 is used to render the multiple objects based on multiple second three-dimensional mesh models and the combined texture image.
[0149] In some embodiments, the simplification module 5552 is further configured to perform the following processing for each of the first three-dimensional mesh models: determining a simplification index value for the first three-dimensional mesh model based on the second geometric features of the first three-dimensional mesh model; if the simplification index value is less than a simplification index threshold, performing model simplification processing on the first three-dimensional mesh model using a first model simplification method to obtain a second three-dimensional mesh model; if the simplification index value is greater than or equal to the simplification index threshold, performing model simplification processing on the first three-dimensional mesh model using a second model simplification method to obtain a second three-dimensional mesh model; wherein the number of model faces removed by the first model simplification method is less than the number of model faces removed by the second model simplification method.
[0150] In some embodiments, the simplification module 5552 is further configured to obtain a first number of model patches included in the first three-dimensional mesh model and obtain a first volume of the three-dimensional bounding volume of the first three-dimensional mesh model, wherein the second geometric feature includes the first number and the first volume; based on the first number and the first volume, determine the model patch density of the first three-dimensional mesh model, and use the model patch density as the simplification index value of the first three-dimensional mesh model.
[0151] In some embodiments, the simplification module 5552 is further configured to, for each model facet included in the first three-dimensional mesh model, determine the model contour change value of the first three-dimensional mesh model after removing the model facet from the first three-dimensional mesh model; the simplification module 5552 is further configured to, from the model facets included in the first three-dimensional mesh model, remove model facets whose model contour change value is less than the model contour change threshold to obtain the second three-dimensional mesh model; the simplification module 5552 is further configured to, based on the simplification index value, determine a second quantity; remove the second quantity of first model facets from the model facets included in the first three-dimensional mesh model to obtain the second three-dimensional mesh model, wherein the model contour change value of the first model facets is less than the model contour change value of the second model facets, and the second model facets are model facets in the first three-dimensional mesh model other than the first model facets.
[0152] In some embodiments, the determining module 5553 is further configured to, before determining the layout adjustment parameters of each first 3D mesh model based on each first geometric feature, obtain the expected number of material instances to be created during rendering; perform clustering processing on multiple first 3D mesh models based on each first geometric feature to obtain the expected number of clusters, wherein each cluster includes multiple first 3D mesh models; the determining module 5553 is further configured to, for each cluster, determine the layout adjustment parameters of each first 3D mesh model in the cluster based on the first geometric feature of each first 3D mesh model in the cluster; the adjusting module 5554 is further configured to, for each The clustering module 5554 is further configured to adjust the texture layout of each of the first three-dimensional mesh models in the clustering cluster based on the layout adjustment parameters corresponding to each clustering cluster, thereby obtaining the adjusted texture layout of each of the first three-dimensional mesh models in the clustering cluster; the adjustment module 5555 is further configured to combine and arrange the adjusted texture layout of each of the first three-dimensional mesh models in the clustering cluster for each clustering cluster, thereby obtaining the combined texture layout corresponding to the clustering cluster; the combination module 5555 is further configured to combine the texture images corresponding to multiple first three-dimensional mesh models in the clustering cluster according to the combined texture layout corresponding to the clustering cluster for each clustering cluster, thereby obtaining the combined texture image corresponding to the clustering cluster.
[0153] In some embodiments, the first geometric feature is the model geometry of the first three-dimensional mesh model; the determining module 5553 is further configured to determine the total model geometry of a plurality of first three-dimensional mesh models, and for each first three-dimensional mesh model, perform the following processing respectively: determining the proportion of the model geometry of the first three-dimensional mesh model relative to the total model geometry; determining the texture space weight of the first three-dimensional mesh model based on the proportion of the first three-dimensional mesh model, wherein the texture space weight and the proportion are positively correlated; and using the texture space weight as the layout adjustment parameter of the first three-dimensional mesh model.
[0154] In some embodiments, the adjustment module 5554 is further configured to scale the texture layout of each of the first three-dimensional mesh models based on each of the layout adjustment parameters to obtain each scaled texture layout; the adjustment module 5554 is further configured to create a texture space; and combine and arrange multiple scaled texture layouts into the texture space to obtain the combined texture layout.
[0155] In some embodiments, the adjustment module 5554 is further configured to extract two-dimensional boundary features of each scaled texture layout; determine the position of each scaled texture layout in the texture space based on the two-dimensional boundary features and arrangement constraint rules, wherein the arrangement constraint rules are used to constrain the non-overlapping of each scaled texture layout in the texture space; and place each scaled texture layout in the texture space according to each position to obtain the combined texture layout.
[0156] In some embodiments, the combining module 5555 is further configured to, before combining the multiple texture images according to the combined texture layout to obtain the combined texture image, construct a positional mapping relationship from each texture layout to the combined texture layout; the combining module 5555 is further configured to, based on each texture layout, extract pixel blocks from each texture image; based on each layout adjustment parameter, scale the pixel blocks extracted from each texture layout to obtain target pixel blocks corresponding to each texture layout; and based on the positional mapping relationship, combine the target pixel blocks corresponding to multiple texture layouts according to the combined texture layout to obtain the combined texture image.
[0157] In some embodiments, the combination module 5555 is further configured to perform the following processing on each pixel block extracted from the texture layout: scaling the first size of the pixel block using the layout adjustment parameters to obtain a second size; creating a first blank pixel block with the second size; for each blank pixel point included in the first blank pixel block, determining the pixel coordinates of the blank pixel point in the pixel block, and determining a plurality of pixels located in the neighborhood of the pixel coordinates; determining the target color value of the blank pixel point based on the color values of the plurality of pixels; filling the first blank pixel block with the target color value of each blank pixel point to obtain the target pixel block.
[0158] In some embodiments, the texture image includes N sub-texture images for each material attribute, the pixel block includes a sub-pixel block extracted from each sub-texture image, and the target pixel block includes a target sub-pixel block obtained by scaling each sub-pixel block, where N is an integer greater than 1; the combination module 5555 is further configured to, before combining the target pixel blocks corresponding to multiple texture layouts according to the combined texture layout based on the position mapping relationship to obtain the combined texture image, perform the following processing on each target pixel block corresponding to the texture layout: construct a second blank pixel block with N color channels, wherein the color channels correspond one-to-one with the material attributes; write the target sub-pixel blocks of each material attribute included in the target pixel block into the color channels corresponding to the material attributes in the second blank pixel block to obtain the aggregated pixel block corresponding to the texture layout; the combination module 5555 is further configured to, based on the position mapping relationship, combine the aggregated pixel blocks corresponding to multiple texture layouts according to the combined texture layout to obtain the combined texture image.
[0159] In some embodiments, the acquisition module 5551 is further configured to generate multiple first three-dimensional mesh models through a rendering engine, perform material baking processing on the material instance of each first three-dimensional mesh model to obtain each texture image, and generate a relational description file, wherein the relational description file describes the correspondence between each first three-dimensional mesh model and each texture image; acquire the relational description file through a three-dimensional data processing engine via a data channel established between the rendering engine and the three-dimensional data processing engine, and acquire multiple first three-dimensional mesh models based on the relational description file, and acquire the texture image corresponding to each first three-dimensional mesh model.
[0160] In some embodiments, the combination module 5555 is further configured to, after combining the multiple texture images according to the combined texture layout to obtain a combined texture image, update the relationship description file based on each second three-dimensional mesh model and the combined texture image through the three-dimensional data processing engine to obtain a target relationship description file, wherein the target relationship description file describes the correspondence between each second three-dimensional mesh model and the combined texture image; and, when the rendering engine detects the generation of multiple second three-dimensional mesh models, the combined texture image, and the target relationship description file, obtain multiple second three-dimensional mesh models, the combined texture image, and the target relationship description file from the three-dimensional data processing engine; the rendering module 5556 is further configured to render the multiple objects based on the multiple second three-dimensional mesh models, the combined texture image, and the target relationship description file through the rendering engine.
[0161] In some embodiments, the number of combined texture images is multiple, and each combined texture image is obtained by combining texture images corresponding to the first three-dimensional mesh models included in a cluster. The cluster is obtained by clustering multiple first three-dimensional mesh models. The rendering module 5556 is further configured to parse the target relationship description file to obtain the target correspondence between each second three-dimensional mesh model and each combined texture image; create a material instance corresponding to each combined texture image based on each combined texture image; bind the material instance corresponding to each combined texture image and the second three-dimensional mesh model corresponding to each combined texture image based on the target correspondence; and render the multiple objects based on each second three-dimensional mesh model with the bound material instance.
[0162] In some embodiments, the acquisition module 5551 is further configured to perform the following processing for each of the first three-dimensional mesh models: acquire the hierarchical topology of the first three-dimensional mesh model, and based on the hierarchical topology, extract the multiple mesh components included in the first three-dimensional mesh model and the local spatial transformation relationship of each mesh component; based on each local spatial transformation relationship, perform pose reconstruction processing on the multiple mesh components to obtain a composite mesh component; acquire the initial material instance associated with each mesh component, and perform material baking processing on the composite mesh component based on the multiple initial material instances to obtain the texture image.
[0163] In some embodiments, the acquisition module 5551 is further configured to: determine a first node supporting custom material parameter values from the material tree of each initial material instance; extract the static material parameter values associated with the first node from each initial material instance; generate temporary material instances matching each initial material instance, wherein the temporary material instances include a second node matching the first node; input the static material parameter values into the second node of each temporary material instance to obtain a target material instance corresponding to each temporary material instance; bind multiple target material instances to the composite mesh component; and perform material baking processing on the composite mesh component bound with multiple target material instances to obtain the texture image.
[0164] It should be noted that the description of the device embodiments in this application is similar to the description of the method embodiments described above, and has similar beneficial effects as the method embodiments, so it will not be repeated here. Any technical details not covered in the data processing device for virtual scenes provided in the embodiments of this application can be understood based on the description of the technical details in the above method embodiments.
[0165] This application also provides a computer program product, which includes computer-executable instructions or a computer program stored in a computer-readable storage medium. The processor of an electronic device reads the computer-executable instructions or computer program from the computer-readable storage medium and executes the computer-executable instructions or computer program, causing the electronic device to perform the data processing method for a virtual scene provided in this application.
[0166] This application also provides a computer-readable storage medium storing computer-executable instructions or computer programs. When the computer-executable instructions or computer programs are executed by a processor, the processor will execute the data processing method for the virtual scene provided in this application.
[0167] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.
[0168] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
[0169] As an example, computer-executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files that store one or more modules, subroutines, or code sections).
[0170] As an example, computer-executable instructions can be deployed to execute on a single electronic device, or on multiple electronic devices located at one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network.
[0171] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A data processing method for a virtual scene, characterized in that, The method includes: Obtain the first three-dimensional mesh model of each of the multiple objects included in the virtual scene, and obtain the texture image corresponding to each of the first three-dimensional mesh models; Each of the first three-dimensional mesh models is simplified to obtain a second three-dimensional mesh model for each object, wherein the second three-dimensional mesh model of each object includes fewer model faces than the first three-dimensional mesh model. Extract the model geometry of each of the first three-dimensional mesh models, and determine the total model geometry of the multiple first three-dimensional mesh models; For each of the first three-dimensional mesh models, the proportion of the model geometry of the first three-dimensional mesh model relative to the total model geometry is determined, and based on the proportion of the first three-dimensional mesh model, the texture space weight of the first three-dimensional mesh model is determined, and the texture space weight is used as the layout adjustment parameter of the first three-dimensional mesh model, wherein the texture space weight and the proportion are positively correlated. Based on each of the layout adjustment parameters, the texture layout of each of the first three-dimensional mesh models is adjusted to obtain each adjusted texture layout, and multiple adjusted texture layouts are combined and arranged to obtain a combined texture layout. Multiple texture images are combined according to the combined texture layout to obtain a combined texture image; The multiple objects are rendered based on multiple second three-dimensional mesh models and the combined texture image.
2. The method as described in claim 1, characterized in that, The step of simplifying each of the first three-dimensional mesh models to obtain a second three-dimensional mesh model for each object includes: For each of the first 3D mesh models, the following processing is performed: Based on the second geometric features of the first three-dimensional mesh model, the simplified index values of the first three-dimensional mesh model are determined; If the simplification index value is less than the simplification index threshold, the first model simplification method is used to simplify the first three-dimensional mesh model to obtain the second three-dimensional mesh model. If the simplification index value is greater than or equal to the simplification index threshold, the first three-dimensional mesh model is simplified using the second model simplification method to obtain the second three-dimensional mesh model. The number of model faces removed by the first model simplification method is less than the number of model faces removed by the second model simplification method.
3. The method as described in claim 2, characterized in that, The step of determining the simplified index value of the first three-dimensional mesh model based on the second geometric features of the first three-dimensional mesh model includes: Obtain a first number of model patches included in the first three-dimensional mesh model, and obtain a first volume of the three-dimensional bounding volume of the first three-dimensional mesh model, wherein the second geometric feature includes the first number and the first volume; Based on the first quantity and the first volume, the model patch density of the first three-dimensional mesh model is determined, and the model patch density is used as the simplified index value of the first three-dimensional mesh model.
4. The method as described in claim 2, characterized in that, The method further includes: For each model patch included in the first three-dimensional mesh model, determine the numerical value of the change in the model contour of the first three-dimensional mesh model after removing the model patch from the first three-dimensional mesh model; The step of simplifying the first three-dimensional mesh model using a first model simplification method to obtain the second three-dimensional mesh model includes: Remove model patches whose model contour change values are less than the model contour change threshold from the model patches included in the first three-dimensional mesh model to obtain the second three-dimensional mesh model; The step of simplifying the first three-dimensional mesh model using a second model simplification method to obtain the second three-dimensional mesh model includes: The second quantity is determined based on the simplified index value; The second three-dimensional mesh model is obtained by removing the second number of first model patches from the model patches included in the first three-dimensional mesh model, wherein the model contour change values of the first model patches are all less than the model contour change values of the second model patches, and the second model patches are the model patches in the first three-dimensional mesh model other than the first model patches.
5. The method as described in claim 1, characterized in that, Before determining the total model geometry of the plurality of the first three-dimensional mesh models, the method further includes: Get the expected number of material instances to be created during rendering; Based on each of the model geometric quantities, the plurality of first three-dimensional mesh models are clustered to obtain the desired number of clusters, wherein each cluster includes a plurality of first three-dimensional mesh models; Determining the total model geometry of the plurality of first 3D mesh models includes: For each cluster, determine the total model geometry of the multiple first 3D mesh models in the cluster; For each of the first 3D mesh models, the proportion of the model geometry of the first 3D mesh model relative to the total model geometry is determined, and based on the proportion of the first 3D mesh model, the texture space weight of the first 3D mesh model is determined, and the texture space weight is used as a layout adjustment parameter for the first 3D mesh model, including: For each of the aforementioned clusters, the following processing is performed: For each of the first three-dimensional mesh models in the cluster, the proportion of the model geometry of the first three-dimensional mesh model relative to the total model geometry of the cluster is determined, and based on the proportion of the first three-dimensional mesh model in the cluster, the texture space weight of the first three-dimensional mesh model in the cluster is determined, and the texture space weight is used as the layout adjustment parameter of the first three-dimensional mesh model in the cluster. The step of adjusting the texture layout of each of the first 3D mesh models based on each of the layout adjustment parameters to obtain each adjusted texture layout includes: For each cluster, based on each layout adjustment parameter corresponding to the cluster, the texture layout of each first three-dimensional mesh model in the cluster is adjusted to obtain the adjusted texture layout of each first three-dimensional mesh model in the cluster. The process of combining and arranging multiple adjusted texture layouts to obtain a combined texture layout includes: For each cluster, the adjusted texture layout of each of the first three-dimensional mesh models in the cluster is combined and arranged to obtain the combined texture layout corresponding to the cluster. The step of combining multiple texture images according to the combined texture layout to obtain a combined texture image includes: For each cluster, according to the combined texture layout corresponding to the cluster, the texture images corresponding to multiple first three-dimensional mesh models in the cluster are combined to obtain the combined texture image corresponding to the cluster.
6. The method as described in claim 1, characterized in that, The extraction of model geometry for each of the first 3D mesh models includes: Extract at least one of the model surface area and model volume for each of the first three-dimensional mesh models; Determining the total model geometry of the plurality of first 3D mesh models includes: When the model geometry is equal to the model surface area, the model surface areas of multiple first three-dimensional mesh models are summed to obtain the total model geometry. When the model geometry is equal to the model volume, the model volumes of multiple first 3D mesh models are summed to obtain the total model geometry. When the model geometry includes the model surface area and the model volume, the model surface areas of multiple first three-dimensional mesh models are summed to obtain the total model surface area, and the model volumes of multiple first three-dimensional mesh models are summed to obtain the total model volume, and the total model surface area and the total model volume are used as the total model geometry. Determining the proportion of the model geometry of the first 3D mesh model relative to the total model geometry includes: When the model geometry is equal to the model surface area, the proportion is obtained by dividing the model surface area of the first three-dimensional mesh model by the total model geometry. When the model geometry is equal to the model volume, the proportion is obtained by dividing the model volume of the first 3D mesh model by the total model geometry. When the model geometry includes the model surface area and the model volume, the proportion is determined by combining the first ratio of the model surface area of the first three-dimensional mesh model to the total model surface area and the second ratio of the model volume to the total model volume.
7. The method as described in claim 1, characterized in that, The step of adjusting the texture layout of each of the first 3D mesh models based on each of the layout adjustment parameters to obtain each adjusted texture layout includes: Based on each of the layout adjustment parameters, the texture layout of each of the first three-dimensional mesh models is scaled to obtain each scaled texture layout; The process of combining and arranging multiple adjusted texture layouts to obtain a combined texture layout includes: Create texture space; Multiple scaled texture layouts are combined and arranged within the texture space to obtain the combined texture layout.
8. The method as described in claim 7, characterized in that, The step of combining and arranging multiple scaled texture layouts within the texture space to obtain the combined texture layout includes: Extract the two-dimensional boundary features of each scaled texture layout; Based on the two-dimensional boundary features and arrangement constraint rules, the position of each scaled texture layout in the texture space is determined, wherein the arrangement constraint rules are used to constrain the overlap between each scaled texture layout in the texture space. According to each of the aforementioned positions, each scaled texture layout is placed within the texture space to obtain the combined texture layout.
9. The method as described in claim 1, characterized in that, Before combining the multiple texture images according to the combined texture layout to obtain the combined texture image, the method further includes: Construct a positional mapping relationship from each of the texture layouts to the combined texture layouts; The step of combining multiple texture images according to the combined texture layout to obtain a combined texture image includes: Based on each of the texture layouts, pixel blocks are extracted from each of the texture images; Based on each of the layout adjustment parameters, the pixel blocks extracted from each of the texture layouts are scaled to obtain the target pixel blocks corresponding to each texture layout; Based on the position mapping relationship, the target pixel blocks corresponding to multiple texture layouts are combined according to the combined texture layout to obtain the combined texture image.
10. The method as described in claim 9, characterized in that, The step of scaling the pixel blocks extracted from each texture layout based on each layout adjustment parameter to obtain the target pixel block corresponding to each texture layout includes: For each pixel block extracted from the texture layout, the following processing is performed: Using the layout adjustment parameters, the first size of the pixel block is scaled to obtain the second size; Create a first blank pixel block with the second size; For each blank pixel in the first blank pixel block, determine the pixel coordinates of the blank pixel in the pixel block, and determine multiple pixels in the neighborhood of the pixel coordinates. Based on the color values of the multiple pixels, determine the target color value of the blank pixel. The target color value of each blank pixel is filled into the first blank pixel block to obtain the target pixel block.
11. The method as described in claim 9, characterized in that, The texture image includes N sub-texture images for each material attribute, the pixel block includes a sub-pixel block extracted from each sub-texture image, and the target pixel block includes a target sub-pixel block obtained by scaling each of the sub-pixel blocks, where N is an integer greater than 1. Before combining the target pixel blocks corresponding to multiple texture layouts according to the combined texture layout to obtain the combined texture image based on the position mapping relationship, the method further includes: For each target pixel block corresponding to the texture layout, the following processing is performed: Construct a second blank pixel block with N color channels, wherein the color channels correspond one-to-one with the material properties; Write the target sub-pixel block of each material attribute included in the target pixel block into the color channel corresponding to the material attribute in the second blank pixel block to obtain the aggregated pixel block corresponding to the texture layout; The step of combining the target pixel blocks corresponding to multiple texture layouts according to the combined texture layout based on the position mapping relationship to obtain the combined texture image includes: Based on the position mapping relationship, the aggregated pixel blocks corresponding to multiple texture layouts are combined according to the combined texture layout to obtain the combined texture image.
12. The method according to any one of claims 1-11, characterized in that, The step of obtaining the first 3D mesh model of each of the multiple objects included in the virtual scene, and obtaining the texture image corresponding to each first 3D mesh model, includes: The rendering engine generates multiple first 3D mesh models, and performs material baking on the material instance of each first 3D mesh model to obtain each texture image, and generates a relation description file, wherein the relation description file describes the correspondence between each first 3D mesh model and each texture image; The relationship description file is obtained through the 3D data processing engine via the data channel established between the rendering engine and the 3D data processing engine. Based on the relationship description file, multiple first 3D mesh models are obtained, and the texture image corresponding to each first 3D mesh model is obtained.
13. The method as described in claim 12, characterized in that, After combining the multiple texture images according to the combined texture layout to obtain the combined texture image, the method further includes: The three-dimensional data processing engine updates the relation description file based on each second three-dimensional mesh model and the combined texture image to obtain a target relation description file, wherein the target relation description file describes the correspondence between each second three-dimensional mesh model and the combined texture image; When the rendering engine detects the generation of multiple second 3D mesh models, the combined texture image, and the target relationship description file, it obtains multiple second 3D mesh models, the combined texture image, and the target relationship description file from the 3D data processing engine. The rendering of the multiple objects based on multiple second-dimensional mesh models and the combined texture image includes: The rendering engine renders the multiple objects based on multiple second 3D mesh models, the combined texture image, and the target relationship description file.
14. The method as described in claim 13, characterized in that, The number of combined texture images is multiple, and each combined texture image is obtained by combining texture images corresponding to the first 3D mesh models included in a cluster. The cluster is obtained by clustering multiple first 3D mesh models. The rendering of the multiple objects based on multiple second 3D mesh models, the combined texture images, and the target relationship description file includes: Parse the target relationship description file to obtain the target correspondence between each of the second three-dimensional mesh models and each of the combined texture images; Based on each of the combined texture images, a material instance corresponding to each of the combined texture images is created; Based on the target correspondence, the material instance corresponding to each of the combined texture images and the second three-dimensional mesh model corresponding to each of the combined texture images are bound together; The plurality of objects are rendered based on each of the second 3D mesh models bound to the material instance.
15. The method as described in claim 12, characterized in that, The step of performing material baking on each material instance of the first 3D mesh model to obtain each texture image includes: For each of the first 3D mesh models, the following processing is performed: Obtain the hierarchical topology of the first three-dimensional mesh model, and based on the hierarchical topology, extract the multiple mesh components included in the first three-dimensional mesh model and the local spatial transformation relationship of each mesh component; Based on each of the local spatial transformation relationships, pose reconstruction processing is performed on multiple mesh components to obtain a composite mesh component; Obtain the initial material instance associated with each mesh component, and perform material baking on the composite mesh component based on multiple initial material instances to obtain the texture image.
16. The method as described in claim 15, characterized in that, The step of baking the composite mesh component based on multiple initial material instances to obtain the texture image includes: From the material tree of each initial material instance, determine the first node that supports custom material parameter values, and extract the static material parameter values associated with the first node from each initial material instance; A temporary material instance matching each of the initial material instances is generated, wherein the temporary material instance includes a second node matching the first node; Input the static material parameter value into the second node of each temporary material instance to obtain the target material instance corresponding to each temporary material instance; Multiple target material instances are bound to the composite mesh component, and the composite mesh component with multiple target material instances bound is subjected to material baking to obtain the texture image.
17. A data processing device for a virtual scene, characterized in that, The device includes: The acquisition module is used to acquire the first three-dimensional mesh model of each of the multiple objects included in the virtual scene, and to acquire the texture image corresponding to each of the first three-dimensional mesh models; A simplification module is used to perform model simplification processing on each of the first three-dimensional mesh models to obtain a second three-dimensional mesh model for each object, wherein the second three-dimensional mesh model of each object includes fewer model faces than the first three-dimensional mesh model. The determination module is used to extract the model geometry of each first 3D mesh model and determine the total model geometry of multiple first 3D mesh models; for each first 3D mesh model, the module determines the proportion of the model geometry of the first 3D mesh model relative to the total model geometry, and based on the proportion of the first 3D mesh model, determines the texture space weight of the first 3D mesh model, and uses the texture space weight as a layout adjustment parameter of the first 3D mesh model, wherein the texture space weight and the proportion are positively correlated; The adjustment module is used to adjust the texture layout of each of the first three-dimensional mesh models based on each of the layout adjustment parameters, to obtain each adjusted texture layout, and to combine and arrange multiple adjusted texture layouts to obtain a combined texture layout. A combination module is used to combine multiple texture images according to the combined texture layout to obtain a combined texture image; A rendering module is used to render the multiple objects based on multiple second three-dimensional mesh models and the combined texture image.
18. The apparatus as claimed in claim 17, characterized in that, The simplification module is further configured to perform the following processing for each of the first three-dimensional mesh models: determine the simplification index value of the first three-dimensional mesh model based on the second geometric features of the first three-dimensional mesh model; When the simplification index value is less than the simplification index threshold, the first model simplification method is used to simplify the first three-dimensional mesh model to obtain the second three-dimensional mesh model; when the simplification index value is greater than or equal to the simplification index threshold, the second model simplification method is used to simplify the first three-dimensional mesh model to obtain the second three-dimensional mesh model; wherein, the number of model faces removed by the first model simplification method is less than the number of model faces removed by the second model simplification method.
19. The apparatus as claimed in claim 17, characterized in that, The combination module is further configured to, before combining multiple texture images according to the combined texture layout to obtain a combined texture image, construct a positional mapping relationship from each texture layout to the combined texture layout; the combination module is further configured to, based on each texture layout, extract pixel blocks from each texture image; based on each layout adjustment parameter, scale the pixel blocks extracted from each texture layout to obtain target pixel blocks corresponding to each texture layout; and based on the positional mapping relationship, combine the target pixel blocks corresponding to multiple texture layouts according to the combined texture layout to obtain the combined texture image.
20. An electronic device, characterized in that, The electronic device includes: Memory is used to store executable instructions for a computer; A processor, when executing computer-executable instructions stored in the memory, implements the data processing method for the virtual scene according to any one of claims 1 to 16.
21. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that, When the computer-executable instructions or computer program are executed by a processor, the data processing method for the virtual scene as described in any one of claims 1 to 16 is implemented.
22. A computer program product comprising computer-executable instructions or a computer program, characterized in that, When the computer-executable instructions or computer program are executed by a processor, the data processing method for the virtual scene as described in any one of claims 1 to 16 is implemented.