Three-dimensional model display method and device, storage medium and electronic equipment
By receiving the 3D model update command, acquiring data and replacing the image area, the updated 3D model is directly generated, which solves the problem of low efficiency of 3D model veneer image replacement in the existing technology, and achieves efficient image replacement and user experience improvement.
Patent Information
- Application Number
- CN202410711916.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2024-09-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology requires overall re-rendering and coloring when replacing the 3D model veneer image, which results in high computing pressure, low efficiency, and affects the user experience.
By receiving the 3D model update command, the 3D model data is obtained, the replaceable image area is determined, and the target image is directly replaced to generate updated 3D model data to avoid overall re-rendering.
It improves the efficiency of 3D model veneer image replacement, saves resource consumption and time costs, reduces device computing power pressure, and improves user experience.
Smart Images

Figure CN118587397A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of three-dimensional model processing technology, and in particular to a three-dimensional model display method, device, storage medium and electronic device. Background Art
[0002] With the development of the times and the advancement of science and technology, 3D model construction technology has gradually become more mature and widely used in various fields. For example, in the field of architectural design, by building three-dimensional architectural models that are close to reality, designers and engineers can better complete and optimize architectural designs; in the field of film and television entertainment, by building realistic three-dimensional special effects models and adding them to the creation, film and television or game works can achieve better visual effects.
[0003] At present, with the increasing number of users' diversified demands for three-dimensional models, designers often need to expand the design of various types of veneer images or texture styles for the constructed three-dimensional models when designing three-dimensional models. When the designer or user wants to replace a part of the surface mapping of the three-dimensional model and obtain the overall model visual effect after the mapping is replaced (for example: users use online virtual fitting to choose clothes, modify the appearance and clothing of characters in game software, etc.), the current technology often requires the three-dimensional model after the replacement of the mapping to be re-rendered and colored as a whole. This method is very demanding on the graphics computing capabilities of the model-bearing device, which not only brings great computing pressure to the device, but also seriously affects the efficiency of model construction, increases time consumption, and even affects the user experience when the modeling efficiency is too delayed.
[0004] Therefore, how to efficiently display three-dimensional models while meeting diverse needs is a crucial issue. Summary of the invention
[0005] This specification provides a three-dimensional model display method, device, storage medium and electronic device to partially solve the above-mentioned problems existing in the prior art.
[0006] This manual adopts the following technical solutions:
[0007] This specification provides a three-dimensional model display method, including:
[0008] Receive a 3D model update instruction;
[0009] According to the three-dimensional model update instruction, acquiring three-dimensional model data corresponding to the three-dimensional model;
[0010] Determining a preset replaceable image area in the three-dimensional model according to the three-dimensional model data;
[0011] Acquire a target image, and replace the original image corresponding to the replaceable image area with the target image to obtain updated three-dimensional model data;
[0012] The updated three-dimensional model is displayed according to the updated three-dimensional model data.
[0013] Optionally, the step of replacing the original image corresponding to the replaceable image area with the target image to obtain updated three-dimensional model data specifically includes:
[0014] Determining, according to the three-dimensional model data, original image address information corresponding to the original image in the three-dimensional model data;
[0015] According to the target image, determining target image address information corresponding to the target image;
[0016] The original image address information is replaced with the target image address information, and the three-dimensional model data is updated to obtain the updated three-dimensional model data.
[0017] Optionally, the step of replacing the original image corresponding to the replaceable image area with the target image to obtain updated three-dimensional model data specifically includes:
[0018] Determining, according to the three-dimensional model data, original image address information corresponding to the original image in the three-dimensional model data;
[0019] Determining an image file corresponding to the original image according to the original image address information;
[0020] According to the target image, the image file corresponding to the original image is replaced with the image file corresponding to the target image, so that the original image address information points to the image file corresponding to the target image, and the updated three-dimensional model data is obtained.
[0021] Optionally, the step of replacing the original image corresponding to the replaceable image area with the target image to obtain updated three-dimensional model data specifically includes:
[0022] In a case where there are a plurality of preset replaceable image regions in the three-dimensional model, determining, according to the three-dimensional model data, an image region identifier corresponding to each replaceable image region in the three-dimensional model in the three-dimensional model data;
[0023] Obtaining a target image region identifier corresponding to the target image;
[0024] Determining a target replacement image region corresponding to the target image from among the replaceable image regions according to the target image region identifier and image region identifiers corresponding to the replaceable image regions in the three-dimensional model data;
[0025] The original image corresponding to the target replacement image area is replaced with the target image to obtain the updated three-dimensional model data.
[0026] Optionally, the step of replacing the original image corresponding to the replaceable image area with the target image to obtain updated three-dimensional model data specifically includes:
[0027] In a case where there are multiple preset replaceable image areas in the three-dimensional model, determining image size information corresponding to each replaceable image area in the three-dimensional model according to the three-dimensional model data, wherein for each replaceable image area, the image size information includes: image resolution information of an image corresponding to the replaceable image area and image aspect ratio information corresponding to the replaceable image area;
[0028] According to the target image, determining target image size information corresponding to the target image;
[0029] Determining a target replacement image region corresponding to the target image from among the replaceable image regions according to the target image size information and the image size information corresponding to the replaceable image regions;
[0030] The original image corresponding to the target replacement image area is replaced with the target image to obtain the updated three-dimensional model data.
[0031] Optionally, the step of displaying the updated three-dimensional model according to the updated three-dimensional model data specifically includes:
[0032] According to the updated 3D model data, determining other parts of the 3D model except the part of the 3D model corresponding to the replaceable image area in the 3D model as fixed 3D models; and according to the updated 3D model data, determining replaceable 3D model data corresponding to the replaceable image area in the updated 3D model data, and rendering and generating the replaceable 3D model corresponding to the replaceable image area based on the replaceable 3D model data;
[0033] The updated three-dimensional model is generated and displayed according to the replaceable three-dimensional model and the fixed three-dimensional model.
[0034] Optionally, the generating of a fixed three-dimensional model specifically includes:
[0035] When the three-dimensional model update instruction is obtained, the fixed three-dimensional model data corresponding to the fixed three-dimensional model is determined from the obtained three-dimensional model data;
[0036] Rendering and generating the fixed three-dimensional model based on the fixed three-dimensional model data, and storing the fixed three-dimensional model in a preset storage space;
[0037] Generating and displaying an updated three-dimensional model according to the replaceable three-dimensional model and the fixed three-dimensional model specifically includes:
[0038] When it is determined that the generation of the replaceable three-dimensional model is completed, reading the fixed three-dimensional model from the storage space;
[0039] The updated three-dimensional model is generated and displayed according to the replaceable three-dimensional model and the fixed three-dimensional model.
[0040] This specification provides a three-dimensional model display device, including:
[0041] A receiving module, used for receiving a 3D model update instruction;
[0042] An acquisition module, used for acquiring three-dimensional model data corresponding to the three-dimensional model according to the three-dimensional model update instruction;
[0043] A determination module, configured to determine a preset replaceable image area in the three-dimensional model according to the three-dimensional model data;
[0044] An updating module, used for acquiring a target image, and replacing an original image corresponding to the replaceable image area with the target image, to obtain updated three-dimensional model data;
[0045] A display module is used to display the updated three-dimensional model according to the updated three-dimensional model data.
[0046] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned three-dimensional model display method is implemented.
[0047] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned three-dimensional model display method when executing the program.
[0048] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:
[0049] It can be seen from the above method that in the 3D model display method provided in this specification, according to the received 3D model update instruction, the 3D model data corresponding to the 3D model is obtained. Then, according to the 3D model data, the pre-set replaceable image area in the 3D model is determined. Next, the target image is obtained, and the original image corresponding to the replaceable image area in the 3D model is replaced with the target image, thereby obtaining the updated 3D model data. Finally, according to the updated 3D model data, the updated 3D model corresponding to the target image is generated and displayed.
[0050] From the above content, it can be seen that the 3D model display method provided in this specification can directly replace the to-be-replaced veneer image of the replaceable image area in the 3D model with the acquired target image when facing the need to replace only the veneer image of the 3D model, thereby avoiding the re-rendering and coloring of the entire 3D model according to the target image, thereby efficiently updating and generating the 3D model corresponding to the target image. The method provided in this specification can greatly save the resource consumption and time cost of 3D model modeling when replacing the veneer image, effectively improve the modeling efficiency when meeting the need to replace the map, reduce the computing pressure of the device displaying the 3D model, and the low-latency response speed can also improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:
[0052] Figure 1 A schematic diagram of a flow chart of a three-dimensional model display method provided in this specification;
[0053] Figure 2a , Figure 2b This is a schematic diagram of an example of a three-dimensional model display method provided in this specification;
[0054] Figure 3 A schematic diagram of a three-dimensional model display device provided in this specification;
[0055] Figure 4 A method provided in this specification corresponding to Figure 1 Schematic diagram of the structure of an electronic device. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0057] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.
[0058] Figure 1 A schematic diagram of a three-dimensional model display method provided in this specification includes the following steps:
[0059] S101: receiving a 3D model update instruction.
[0060] S102: Acquire three-dimensional model data corresponding to the three-dimensional model according to the three-dimensional model update instruction.
[0061] At present, 3D modeling technology has become increasingly mature and has demonstrated great application value and convenience in various fields. With the widespread application and popularization of this technology, the upper limit of diversified demands for the construction of 3D models has gradually increased. For example, when performing diversified designs and veneer image replacements for the decent images of 3D models (such as online fittings, game character skinning, etc.), the current modeling technology often requires re-rendering and coloring of the entire 3D model, which consumes a lot of computing resources and time costs, seriously affecting the modeling efficiency when meeting diversified needs. If there is a serious modeling delay, it will also affect the user's immediate experience and satisfaction. Therefore, how to efficiently display 3D models while meeting diverse needs is an urgent problem to be solved.
[0062] To this end, this specification provides a three-dimensional model display method, wherein the execution subject used by the method provided in this specification can be a terminal device such as a desktop computer or a laptop computer with a graphics processing unit, or a server. In addition, the execution subject of this specification can also be a subject in the form of software, such as a client installed in a terminal device with a graphics processing unit. For the sake of convenience, this specification only takes the terminal device as the execution subject to describe the provided three-dimensional model display method.
[0063] Based on this, a terminal device that applies the three-dimensional model display method provided in this specification can determine the original image of the replaceable image area in the three-dimensional model based on the acquired three-dimensional model data and the target image, and replace the original image with the target image to generate and display an updated three-dimensional model corresponding to the target image.
[0064] Among them, the application scenario of the terminal device replacing the veneer image for the three-dimensional model can be determined according to actual needs. For example, in the field of architectural design, the terminal device can change and replace the veneer image on the surface of the three-dimensional model of the building according to the designer's different veneer image requirements, so that the designer can efficiently obtain diversified design information for the building; for example, in the role skin changing and dressing scenario in the game field, the terminal device can replace the texture of the three-dimensional model corresponding to the game character according to the user's choice and modification of the external decoration of the game character. While reducing the image processing pressure of the user's device through this method, it can also improve the construction efficiency of different veneer image models, enhance the user experience and fluency, and facilitate users to design game characters according to their own preferences.
[0065] In this specification, a terminal device may receive a three-dimensional model update instruction, and then obtain three-dimensional model data corresponding to the three-dimensional model according to the three-dimensional model update instruction.
[0066] Among them, the specific form of the 3D model update instruction mentioned above is not strictly limited in this specification. It can be similar to the user sending the 3D model update instruction to the terminal device by touching the pre-set model update control, or the user directly selects the whole or part of the area to be updated in the 3D model through the corresponding operation means (manual touch, cursor selection, etc.). Such operation can also be regarded as sending the 3D model update instruction to the terminal device. The specific form and sending method of the 3D model update instruction can be flexibly set according to the actual application scenario.
[0067] After receiving the 3D model update instruction, the terminal device can determine the corresponding 3D model according to the 3D model update instruction, thereby obtaining the 3D model data corresponding to the 3D model. Similarly, in this specification, the specific model type of the 3D model and the data format of the corresponding 3D model data will not be strictly limited. The model type of the 3D model can be a 3D model in the glTF format (Graphics Library Transmission Format) commonly used in the current 3D modeling field, and its corresponding 3D model data can be a JSON file type. The specific model type and the data format of the 3D model data can be flexibly selected according to the actual application scenario.
[0068] S103: Determine a preset replaceable image area in the three-dimensional model according to the three-dimensional model data.
[0069] S104: Acquire a target image, and replace the original image corresponding to the replaceable image area with the target image to obtain updated three-dimensional model data.
[0070] In this specification, the terminal device may determine, based on the acquired three-dimensional model data, the distribution of the pre-set replaceable image areas in the three-dimensional model corresponding to the three-dimensional model data.
[0071] It should be noted in advance that in this specification, when the 3D model undergoing texture update is initially constructed, it can be pre-set that the veneer images of some veneer areas of the 3D model can be replaced and modified, i.e., the replaceable image areas mentioned above. Taking the glTF format 3D model mentioned above as an example, when the glTF 3D model is constructed, the replaceable image areas can be pre-set in the corresponding JSON file (in the 3D model data) (e.g., presetting one or more backup images / texture variants, etc.).
[0072] Specifically, the terminal device can perform traversal analysis based on the acquired 3D model data, determine the image address information corresponding to each image in the 3D model, and determine the region type identifier corresponding to each image address information, and the region type identifier can indicate whether the corresponding image address information is a pre-set replaceable image region. The pre-set replaceable image region in the 3D model is determined according to each region type identifier.
[0073] Furthermore, after determining the replaceable image area in the three-dimensional model, the terminal device can obtain the target image and replace the original image corresponding to the replaceable image area with the obtained target image, thereby updating the three-dimensional model data to obtain the updated three-dimensional model data. The target image can be obtained by the user actively transmitting the target image to the terminal device, such as an architect adding a new design pattern to a certain area of the three-dimensional model of a building, or the user selects one of several veneer images displayed in the display interface of the terminal device as the target image, such as in an online virtual fitting scene, the user determines a clothing image as the target image based on several clothing images pre-set in the terminal device. The specific method and means of obtaining the target image are not strictly limited in this specification and can be flexibly adjusted according to the actual application scenario.
[0074] Specifically, the terminal device can determine the original image address information of the original image corresponding to the replaceable image area in the three-dimensional model data based on the unupdated three-dimensional model data. Then, the terminal device can determine the target image address information corresponding to the target image based on the acquired target image. Next, the terminal device can replace the original image address information in the three-dimensional model data with the target image address information corresponding to the target image, thereby updating the three-dimensional model data to obtain the updated three-dimensional model data. Among them, the specific form of the image address information is not strictly limited in this specification, and can be data in a similar form such as a uniform resource identifier (URI). Taking the three-dimensional model in glTF format as an example, the terminal device can determine the URI of the original image corresponding to the replaceable image area in this glTF model in the three-dimensional model data by traversing the JSON file corresponding to the glTF model, that is, the three-dimensional model data, and use this as the original image address information of this glTF model.
[0075] In addition to the above-mentioned method of replacing the image address information to replace the image corresponding to the replaceable image area, in this specification, the terminal device can also determine the image file corresponding to the original image stored in the storage space according to the determined original image address information. Then, according to the acquired target image, the image file corresponding to the original image is replaced with the image file corresponding to the target image, and the three-dimensional model data corresponding to the changed image file is used as the updated three-dimensional model data. Through the above-mentioned image file change process, the original image address information in the three-dimensional model data is changed from pointing to the image file corresponding to the original image to pointing to the image file corresponding to the target image, so as to replace the original image corresponding to the replaceable image area with the target image.
[0076] In addition, it should be noted that in this specification, when there are multiple replaceable image areas preset in the three-dimensional model, the terminal device can determine the image area identifier corresponding to each replaceable image area in the three-dimensional model data according to the unupdated three-dimensional model data. Then, the target image area identifier corresponding to the target image is obtained, and according to the target image area identifier, a replaceable image area matching the target image area identifier is determined from each replaceable image area as the target replacement image area. Then, the terminal device can replace the original image of the target replacement image area with the target image through the above-mentioned method.
[0077] For example, suppose there are three replaceable image areas in a certain three-dimensional model, and the corresponding image area identifiers are "01", "02" and "03" respectively. The terminal device obtains the target image area identifier "02" corresponding to the target image according to the target image. The terminal device can regard the replaceable image area with the image area identifier "02" in the three-dimensional model as the target replacement image area, and replace the original image corresponding to the area with the target image. As for the specific acquisition and determination process of the target image area identifier, it can be an additional mark made by the user when inputting the target image. For example, the architect can mark or number the part of the building map that needs to be replaced when inputting the target image, and the terminal device can determine the target replacement image area according to the obtained marking information. In addition, the target image itself can also be bound to a fixed target image area identifier, and the terminal device can directly obtain it when the user inputs the target image. For example, in a virtual fitting scene, when the user selects the target image, it will be divided into fixed different human body parts, such as hats, glasses, etc. corresponding to head clothing, and shirts, jackets, etc. corresponding to upper body clothing. After receiving the target image selected by the user, the terminal device can directly determine the corresponding target replacement image area according to the target image area identifier (ie, the decorated human body part) corresponding to the target image.
[0078] In addition to the above method of determining a target replacement image region from a plurality of replaceable image regions according to the image region identifier, in this specification, the terminal device may also determine the target replacement image region according to image size information.
[0079] Specifically, the terminal device can determine the image size information corresponding to each replaceable image area based on the unupdated three-dimensional model data. For each replaceable image area, the image size information can specifically include: image resolution information corresponding to the replaceable image area, image aspect ratio information corresponding to the replaceable image area. Then, the terminal device can determine the target image size information corresponding to the target image based on the acquired target image. Then, based on the target image size information, determine the replaceable image area that matches the target image size information as the target replacement image area. Then, the terminal device can replace the original image corresponding to the target replacement image area with the target image, and determine the updated three-dimensional model data.
[0080] S105: Displaying an updated three-dimensional model according to the updated three-dimensional model data.
[0081] In this specification, the terminal device can generate and display the updated three-dimensional model based on the updated three-dimensional model data obtained in the above steps.
[0082] It should be noted in advance that when the 3D model update instruction is initially obtained, the terminal device can directly determine the 3D model data corresponding to the other parts of the 3D model except the replaceable image area in the 3D model from the obtained 3D model data as the fixed 3D model data. Then, the terminal device can render and generate the fixed 3D model in the unupdated 3D model based on the obtained fixed 3D model data, that is, the other 3D models in the unupdated 3D model except the part of the 3D model corresponding to the replaceable image area. The terminal device can store the generated fixed 3D model in a preset storage space for use in the subsequent overall 3D model update process.
[0083] Specifically, the terminal device can determine the replaceable 3D model data corresponding to the replaceable image area in the updated 3D model data according to the updated 3D model data, and generate a replaceable 3D model corresponding to the replaceable image area based on the replaceable 3D model data rendering. Since the image corresponding to the replaceable image area has been changed by updating the 3D model data in the previous step, the replaceable 3D model generated here is the updated partial 3D model corresponding to the target image.
[0084] Then, after the terminal device determines that the replaceable 3D model corresponding to the target image is generated, the terminal device can directly read the previously generated fixed 3D model from the storage space. Then, the terminal device can generate an updated 3D model based on the fixed 3D model and the replaceable 3D model and display it.
[0085] It should be noted that the generation and determination process of the above-mentioned fixed three-dimensional model can also be directly based on the unupdated three-dimensional model data, and the unupdated three-dimensional model is split to determine other three-dimensional models except for the replaceable image area. The specific method of generating and storing the fixed three-dimensional model can be adjusted according to the actual application situation.
[0086] In addition, when there are multiple replaceable image areas preset in the three-dimensional model, the terminal device can, after receiving the three-dimensional model update instruction, separately and independently save the three-dimensional models corresponding to each replaceable image area and the fixed three-dimensional model. After the terminal device generates the replaceable three-dimensional model, it determines the three-dimensional models corresponding to other replaceable image areas from the storage space according to the replaceable three-dimensional model, and then the terminal device can generate and display the updated three-dimensional model according to the three-dimensional models corresponding to other replaceable image areas, the fixed three-dimensional model and the generated replaceable three-dimensional model. Of course, after receiving the three-dimensional model update instruction, the terminal device can only generate and store the fixed three-dimensional model, and after generating the replaceable three-dimensional model, generate the three-dimensional models corresponding to other replaceable image areas according to the updated three-dimensional model data, and then generate and display the updated three-dimensional model.
[0087] In order to facilitate understanding of the overall process and practical application effects of the three-dimensional model display method mentioned in this specification, the following is an introduction and explanation with multiple example schematic diagrams of the three-dimensional model display method. Figure 2a and Figure 2b shown.
[0088] Figure 2a , Figure 2b This is a schematic diagram of an example of a three-dimensional model display method provided in this specification.
[0089] like Figure 2a As shown in the figure, the 3D model is "a 3D rectangular model with six sides covered with flower patterns", and the replaceable image area of the 3D model is Figure 2a After the terminal device receives the 3D model update instruction, it can receive Figure 2a The three-dimensional model data corresponding to the three-dimensional model shown in the figure is determined according to the three-dimensional model data. Figure 2a The front part of the three-dimensional model shown in is a preset replaceable image area. Then, the terminal device can obtain the target image (such as Figure 2a The “duck” image shown in ), and the image of the front part of the 3D model, that is, the original image corresponding to the replaceable image area, is replaced with the target image, so as to generate and display the updated 3D model according to the updated 3D model data, such as Figure 2b as shown in .
[0090] From the above content, it can be seen that the 3D model display method provided in this specification can directly replace the to-be-replaced veneer image of the replaceable image area in the 3D model with the acquired target image, thereby efficiently generating and displaying the 3D model corresponding to the target image. The method provided in this specification can be applied to the scene of replacing a certain part of the veneer image of the 3D model, which greatly saves the resource consumption and time cost of remodeling the entire model, effectively improves the modeling efficiency when realizing the replacement of the map, thereby improving the feedback speed of the device displaying the 3D model in response to the user's replacement map operation, and optimizing the user experience.
[0091] The above are one or more implementation methods of this specification. Based on the same idea, this specification also provides a corresponding three-dimensional model display device, such as Figure 3 shown.
[0092] Figure 3 A schematic diagram of a three-dimensional model display device provided in this specification, including:
[0093] A receiving module 301 is used to receive a 3D model update instruction;
[0094] An acquisition module 302 is used to acquire three-dimensional model data corresponding to the three-dimensional model according to the three-dimensional model update instruction;
[0095] A determination module 303, configured to determine a preset replaceable image region in the three-dimensional model according to the three-dimensional model data;
[0096] An updating module 304 is used to obtain a target image, and replace the original image corresponding to the replaceable image area with the target image to obtain updated three-dimensional model data;
[0097] The display module 305 is used to display the updated three-dimensional model according to the updated three-dimensional model data.
[0098] Optionally, the update module 304 is specifically used to determine, based on the three-dimensional model data, original image address information corresponding to the original image in the three-dimensional model data; determine, based on the target image, target image address information corresponding to the target image; replace the original image address information with the target image address information, update the three-dimensional model data, and obtain the updated three-dimensional model data.
[0099] Optionally, the update module 304 is specifically used to determine, based on the three-dimensional model data, the original image address information corresponding to the original image in the three-dimensional model data; determine, based on the original image address information, the image file corresponding to the original image; and, based on the target image, replace the image file corresponding to the original image with the image file corresponding to the target image so that the original image address information points to the image file corresponding to the target image, thereby obtaining the updated three-dimensional model data.
[0100] Optionally, the update module 304 is specifically used to, when there are multiple pre-set replaceable image areas in the three-dimensional model, determine, based on the three-dimensional model data, an image area identifier corresponding to each replaceable image area in the three-dimensional model; obtain a target image area identifier corresponding to the target image; determine, from the various replaceable image areas, a target replacement image area corresponding to the target image, based on the target image area identifier and the image area identifiers corresponding to each replaceable image area in the three-dimensional model data; and replace the original image corresponding to the target replacement image area with the target image to obtain the updated three-dimensional model data.
[0101] Optionally, the update module 304 is specifically used to determine, according to the three-dimensional model data, image size information corresponding to each replaceable image area in the three-dimensional model when there are multiple pre-set replaceable image areas in the three-dimensional model, and for each replaceable image area, the image size information includes: image resolution information corresponding to the replaceable image area, image aspect ratio information corresponding to the replaceable image area; determine, according to the target image, target image size information corresponding to the target image; determine, from the various replaceable image areas, a target replacement image area corresponding to the target image according to the target image size information and the image size information corresponding to each replaceable image area; and replace the original image corresponding to the target replacement image area with the target image to obtain the updated three-dimensional model data.
[0102] Optionally, the display module 305 is specifically used to determine, based on the updated three-dimensional model data, partial three-dimensional models in the three-dimensional model except for the partial three-dimensional model corresponding to the replaceable image area, as fixed three-dimensional models, and to determine, based on the updated three-dimensional model data, replaceable three-dimensional model data corresponding to the replaceable image area in the updated three-dimensional model data, and to generate a replaceable three-dimensional model corresponding to the replaceable image area based on the rendering of the replaceable three-dimensional model data; and to generate and display the updated three-dimensional model based on the replaceable three-dimensional model and the fixed three-dimensional model.
[0103] Optionally, the display module 305 is specifically used to, when the 3D model update instruction is obtained, determine the fixed 3D model data corresponding to the fixed 3D model from the obtained 3D model data; render and generate the fixed 3D model based on the fixed 3D model data, and save the fixed 3D model in a preset storage space;
[0104] The display module 305 is specifically used to, when it is determined that the replaceable 3D model is generated, read the fixed 3D model from the storage space; and generate and display the updated 3D model according to the replaceable 3D model and the fixed 3D model.
[0105] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 The three-dimensional model display method provided.
[0106] This manual also provides Figure 4 The one shown corresponds to Figure 1 A schematic diagram of the electronic device. Figure 4As shown, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 The three-dimensional model display method.
[0107] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0108] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0109] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0110] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0111] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0112] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0113] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0114] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0115] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0116] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0117] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0118] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0119] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0120] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0121] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0122] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.
Claims
1. A three-dimensional model display method, It is characterized in that include: Receive a 3D model update instruction; According to the three-dimensional model update instruction, acquiring three-dimensional model data corresponding to the three-dimensional model; Determining a preset replaceable image area in the three-dimensional model according to the three-dimensional model data; Acquire a target image, and replace the original image corresponding to the replaceable image area with the target image to obtain updated three-dimensional model data; The updated three-dimensional model is displayed according to the updated three-dimensional model data.
2. The method according to claim 1, It is characterized in that The step of replacing the original image corresponding to the replaceable image area with the target image to obtain updated three-dimensional model data specifically includes: Determining, according to the three-dimensional model data, original image address information corresponding to the original image in the three-dimensional model data; According to the target image, determining target image address information corresponding to the target image; The original image address information is replaced with the target image address information, and the three-dimensional model data is updated to obtain the updated three-dimensional model data.
3. The method according to claim 1, It is characterized in that The step of replacing the original image corresponding to the replaceable image area with the target image to obtain updated three-dimensional model data specifically includes: Determining, according to the three-dimensional model data, original image address information corresponding to the original image in the three-dimensional model data; Determining an image file corresponding to the original image according to the original image address information; According to the target image, the image file corresponding to the original image is replaced with the image file corresponding to the target image, so that the original image address information points to the image file corresponding to the target image, and the updated three-dimensional model data is obtained.
4. The method according to claim 1, It is characterized in that The step of replacing the original image corresponding to the replaceable image area with the target image to obtain updated three-dimensional model data specifically includes: In a case where there are a plurality of preset replaceable image regions in the three-dimensional model, determining, according to the three-dimensional model data, an image region identifier corresponding to each replaceable image region in the three-dimensional model in the three-dimensional model data; Obtaining a target image region identifier corresponding to the target image; Determining a target replacement image region corresponding to the target image from among the replaceable image regions according to the target image region identifier and image region identifiers corresponding to the replaceable image regions in the three-dimensional model data; The original image corresponding to the target replacement image area is replaced with the target image to obtain the updated three-dimensional model data.
5. The method according to claim 1, It is characterized in that The step of replacing the original image corresponding to the replaceable image area with the target image to obtain updated three-dimensional model data specifically includes: In the case where there are multiple preset replaceable image areas in the three-dimensional model, determining image size information corresponding to each replaceable image area in the three-dimensional model according to the three-dimensional model data, wherein for each replaceable image area, the image size information includes: image resolution information corresponding to the replaceable image area and image aspect ratio information corresponding to the replaceable image area; According to the target image, determining target image size information corresponding to the target image; Determining a target replacement image region corresponding to the target image from among the replaceable image regions according to the target image size information and the image size information corresponding to the replaceable image regions; The original image corresponding to the target replacement image area is replaced with the target image to obtain the updated three-dimensional model data.
6. The method according to claim 1, It is characterized in that The step of displaying the updated three-dimensional model according to the updated three-dimensional model data specifically includes: According to the updated 3D model data, determining other parts of the 3D model except the part of the 3D model corresponding to the replaceable image area in the 3D model as fixed 3D models; and according to the updated 3D model data, determining replaceable 3D model data corresponding to the replaceable image area in the updated 3D model data, and rendering and generating the replaceable 3D model corresponding to the replaceable image area based on the replaceable 3D model data; The updated three-dimensional model is generated and displayed according to the replaceable three-dimensional model and the fixed three-dimensional model.
7. The method according to claim 6, It is characterized in that The generating of the fixed three-dimensional model specifically comprises: When the three-dimensional model update instruction is obtained, the fixed three-dimensional model data corresponding to the fixed three-dimensional model is determined from the obtained three-dimensional model data; Rendering and generating the fixed three-dimensional model based on the fixed three-dimensional model data, and storing the fixed three-dimensional model in a preset storage space; Generating and displaying an updated three-dimensional model according to the replaceable three-dimensional model and the fixed three-dimensional model specifically includes: When it is determined that the generation of the replaceable three-dimensional model is completed, reading the fixed three-dimensional model from the storage space; The updated three-dimensional model is generated and displayed according to the replaceable three-dimensional model and the fixed three-dimensional model.
8. A three-dimensional model display device, It is characterized in that include: A receiving module, used for receiving a 3D model update instruction; An acquisition module, used for acquiring three-dimensional model data corresponding to the three-dimensional model according to the three-dimensional model update instruction; A determination module, configured to determine a preset replaceable image area in the three-dimensional model according to the three-dimensional model data; An updating module, used for acquiring a target image, and replacing an original image corresponding to the replaceable image area with the target image, to obtain updated three-dimensional model data; A display module is used to display the updated three-dimensional model according to the updated three-dimensional model data.
9. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Rendering plotting method for replacing specific part material based on three-dimensional model
CN107680153A
3D model real-time rendering method and device and storage medium
CN111191060A
Ceramic tile space display method and system
CN111275809A
Target library updating method and device, electronic equipment and machine readable storage medium
CN111522570A
Transformer substation three-dimensional live-action model inspection method based on local scene updating
CN112465959A
