Method and device for generating 3D medal, terminal and computer readable storage medium
By associating 3D models with configuration files, the 3D models during the rendering process can be dynamically adjusted and updated, solving the problem of low efficiency in virtual badge generation in existing technologies and realizing flexible generation and efficient updating of 3D badges.
Patent Information
- Application Number
- CN202110181364.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-08
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2041-02-08
AI Technical Summary
Existing virtual badges are usually in the form of 2D images, which cannot flexibly add, delete or replace the rendered object model, resulting in low generation efficiency.
By associating 3D models with configuration files, it is possible to dynamically adjust and update the 3D models to be rendered during the rendering process, including adding, deleting or replacing them, reducing tedious operations.
It enables flexible generation of 3D badges, improving generation efficiency and flexibility, and can adjust and update badge effects in real time according to user needs.
Smart Images

Figure CN114943792B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of three-dimensional model, in particular to a 3D medal generation method, a 3D medal generation device, a terminal and a non-volatile computer readable storage medium. BACKGROUND
[0002] Some terminal devices currently have a system of encouraging users, which usually issues a virtual medal corresponding to an achievement when the user achieves the achievement. The existing virtual medal is usually in the form of a 2D picture, and there is no 3D virtual medal. When generating a 3D medal by rendering a 3D model, it is often necessary to determine in advance which models to render, and then write some constants in the code, and then pass the constants into the shader for rendering, so that the object models to be rendered cannot be flexibly added, deleted or replaced. SUMMARY
[0003] The present application provides a 3D medal generation method, a 3D medal generation device, a terminal and one or more non-volatile computer readable storage media storing a computer program.
[0004] The 3D medal generation method of the present application includes: obtaining a resource file, the resource file including a 3D model and a configuration file of the 3D model, the configuration file including a name of a 3D model to be displayed and parameters of the 3D model to be displayed; obtaining the 3D model to be displayed and the parameters of the 3D model to be displayed according to the name of the 3D model to be displayed in the configuration file; and rendering the 3D model according to the parameters of the 3D model to be displayed to generate a 3D medal.
[0005] The 3D medal generation device of the present application includes: a first obtaining module, a second obtaining module and a first rendering module. The first obtaining module is configured to obtain a resource file, the resource file including a 3D model and a configuration file of the 3D model, the configuration file including a name of the 3D model to be displayed and parameters of the 3D model to be displayed. The second obtaining module is configured to obtain the 3D model to be displayed and the parameters of the 3D model to be displayed according to the name of the 3D model to be displayed in the configuration file. The first rendering module is configured to render the 3D model according to the parameters of the 3D model to be displayed to generate the 3D medal.
[0006] The terminal of the embodiment of the present application comprises a shell and a 3D medal generation device, the 3D medal generation device comprises a first acquisition module, a second acquisition module, and a first rendering module. The first acquisition module is configured to acquire a resource file, the resource file comprising a 3D model and a configuration file of the 3D model, the configuration file comprising a name of the 3D model to be displayed and parameters of the 3D model to be displayed. The second acquisition module is configured to acquire the 3D model to be displayed and the parameters of the 3D model to be displayed according to the name of the 3D model to be displayed in the configuration file. The first rendering module is configured to perform rendering processing on the 3D model according to the parameters of the 3D model to be displayed, so as to generate the 3D medal.
[0007] The terminal of the embodiment of the present application comprises a shell and one or more processors, and the one or more processors are configured to acquire a resource file, the resource file comprising a 3D model and a configuration file of the 3D model, the configuration file comprising a name of the 3D model to be displayed and parameters of the 3D model to be displayed, acquire the 3D model to be displayed and the parameters of the 3D model to be displayed according to the name of the 3D model to be displayed in the configuration file, and perform rendering processing on the 3D model according to the parameters of the 3D model to be displayed, so as to generate the 3D medal.
[0008] The 3D medal generation method, the 3D medal generation device, the terminal, and the non-volatile computer readable storage medium of the embodiment of the present application can associate a 3D model through a configuration file, so as to realize addition, deletion, or replacement of a 3D model to be rendered by adjusting the configuration file during rendering, and can realize updating of a generated 3D medal by updating the configuration file during the rendering processing, thereby reducing cumbersome operations and improving the generation efficiency of the 3D medal.
[0009] Additional aspects and advantages of the embodiments of the present application will be in part apparent and in part pointed out hereinafter in the description of the embodiments of the present application. BRIEF DESCRIPTION OF DRAWINGS
[0010] The above and / or additional aspects and advantages of the present application will become apparent and be readily appreciated from the description of the embodiments, taken in conjunction with the following drawings in which:
[0011] Figure 1 is a flowchart of a generation method of some embodiments of the present application;
[0012] Figure 2 is a structural schematic diagram of a generation device of some embodiments of the present application;
[0013] Figure 3 is a structural schematic diagram of a terminal of some embodiments of the present application;
[0014] Figure 4 is a flowchart of a generation method of the prior art;
[0015] Figure 5 is a scenario diagram of a generation method of some embodiments of the present application;
[0016] Figure 6 is a scenario diagram of a generation method of some embodiments of the present application;
[0017] Figure 7 is a scenario diagram of a generation method of some embodiments of the present application;
[0018] Figure 8 is a scenario diagram of a generation method of some embodiments of the present application;
[0019] Figure 9 is a flowchart of a generation method of some embodiments of the present application;
[0020] Figure 10 is a flowchart of a generation method of some embodiments of the present application;
[0021] Figure 11 is a flowchart of a generation method of some embodiments of the present application;
[0022] Figure 12 is a flowchart of a generation method of some embodiments of the present application;
[0023] Figure 13 is a scenario diagram of a generation method of some embodiments of the present application;
[0024] Figure 14 is a flowchart of a generation method of some embodiments of the present application;
[0025] Figure 15 is a connection state diagram of a computer-readable storage medium and a processor of some embodiments of the present application. DETAILED DESCRIPTION
[0026] Embodiments of the present application are described in detail below with reference to the attached drawing figures, wherein the same or like reference numerals are used throughout the figures to refer to the same or like elements or elements with the same or similar functionality. The embodiments described below are exemplary and are not intended to limit the present application, as defined by the claims.
[0027] In the description of the present application, it needs to be understood that the terms "thickness", "upper", "top", "bottom", "inner", "outer", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, which is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the indicated device or element must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation of the present application. In addition, the terms "first", "second" are only for description purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise explicitly specified and limited.
[0028] In the description of the present application, it needs to be understood that unless otherwise explicitly specified and limited, the terms "mounting", "connecting", "connection" should be understood in a broad sense, for example, it can be fixed connection, or detachable connection, or integral connection; it can be mechanical connection, or electrical connection or can communicate with each other; it can be directly connected, or indirectly connected through an intermediate medium, or the internal communication of two elements or the interaction relationship between two elements.
[0029] The following disclosure provides many different embodiments or examples for implementing different structures of the present application. In order to simplify the disclosure of the present application, the components and arrangements of specific examples are described below. Of course, they are only examples and the purpose is not to limit the present application. In addition, the present application can repeatedly refer to numbers and / or letters in different examples, and such repetition is for the purpose of simplification and clarity, and in itself does not indicate the relationship between the various embodiments and / or arrangements discussed. In addition, the present application provides examples of various specific processes and materials, but those skilled in the art can realize the application of other processes and / or the use of other materials.
[0030] Please refer to Figures 1 to 3 The present application provides a 3D medal generation method. The production method comprises:
[0031] 01: obtaining a resource file, the resource file comprising a 3D model and a configuration file of the 3D model, the configuration file comprising the name of the 3D model to be displayed and the parameters of the 3D model to be displayed;
[0032] 02: obtaining the 3D model to be displayed and the parameters of the 3D model to be displayed according to the name of the 3D model to be displayed in the configuration file; and
[0033] 03: rendering the 3D model according to the parameters of the 3D model to be displayed to generate a 3D medal.
[0034] Please refer to Figure 2 The embodiment of the application further provides a 3D medal generation device 200, which can be applied to Figure 3 the terminal 1000 shown in the figure. The generation device 200 includes a first acquisition module 211, a second acquisition module 212, and a first rendering module 213, which are respectively used to execute the methods in 01, 02, and 03. That is, the first acquisition module 211 is used to acquire a resource file, the resource file including a 3D model and a configuration file of the 3D model, the configuration file including the name of the 3D model to be displayed and the parameters of the 3D model to be displayed. The second acquisition module 212 is used to acquire the 3D model to be displayed and the parameters of the 3D model to be displayed according to the name of the 3D model to be displayed in the configuration file. The first rendering module 213 is used to perform rendering processing on the 3D model according to the parameters of the 3D model to be displayed, so as to generate a 3D medal.
[0035] Please refer to Figure 3 The embodiment of the application further provides a terminal 1000, which can include a housing 100 and the above-mentioned generation device 200. Or, the terminal 1000 can include a housing 100 and one or more processors 30, which are used to execute the methods in 01, 02, and 03. That is, the one or more processors 30 are used to acquire a resource file, the resource file including a 3D model and a configuration file of the 3D model, the configuration file including the name of the 3D model to be displayed and the parameters of the 3D model to be displayed, acquire the 3D model to be displayed and the parameters of the 3D model to be displayed according to the name of the 3D model to be displayed in the configuration file, and perform rendering processing on the 3D model according to the parameters of the 3D model to be displayed, so as to generate a 3D medal.
[0036] The terminal 1000 includes a mobile phone, a tablet computer, a notebook computer, a television, a smart watch, a game console, a smart bracelet, a smart helmet, and the like. The application software of these terminal products often has a user incentive system, and a corresponding virtual medal is issued to the user when the user achieves a certain achievement to encourage the user. For example, the terminal 1000 is installed with an application software of the sports and health type, and when the user swims once a week and continuously for 3 months without interruption, the user is awarded a “swimming master” medal. The existing virtual medal is often in the form of a 2D picture, and the embodiment of the application can provide a 3D medal to the user to cater to the user's preference. The 3D medal can be pre-designed, or a 3D model is provided to the user, the user adjusts the 3D model or the parameters of the 3D model, and the software generates a 3D medal by rendering the 3D model according to the user's design.
[0037] The program for processing rendering, such as a rendering module or a rendering processing software, can extract data from the resource file to render the 3D model according to the extracted data. The resource file includes the 3D models (both the 3D models to be displayed and the 3D models not to be displayed) and the configuration files of the 3D models. The configuration file includes the names of the 3D models to be displayed and the parameters of the 3D models to be displayed, and the resource file also includes the parameters of all the 3D models (both the 3D models to be displayed and the 3D models not to be displayed). The program for processing rendering can process the 3D models according to the parameters of the 3D models to generate the 3D medal. The 3D models for generating the 3D medal can include one or more, such as 1, 2, 3, 4, 5, etc. models to generate the 3D medal, which is not limited herein.
[0038] Referring to Figure 4 The conventional method for generating the rendered 3D model is to set the 3D models to be rendered in advance, the program for processing rendering searches and extracts the 3D models set in advance, and processes the 3D models set in advance to generate the rendered 3D model, such as the 3D medal. If the 3D models to be rendered are to be changed, such as to be added, deleted, or replaced, the rendering program needs to be exited, the 3D models to be rendered need to be set again, and the rendering program needs to be started again to process rendering, which is very cumbersome.
[0039] Referring to Figure 5In the embodiments of the present application, the 3D models that can be added, deleted or replaced are all arranged in the resource file, and the configuration file records the names and parameters of all the 3D models. In the configuration file, it can be set which 3D models need to be displayed and which 3D models do not need to be displayed, and the parameters of each 3D model can be set. After starting the rendering program, the rendering program reads the names of the 3D models that need to be displayed in the configuration file, loads the corresponding 3D models according to the names of the 3D models that need to be displayed, and renders the 3D models according to the parameters of the 3D models to generate the 3D medal. In this way, when it is needed to add or delete the 3D models to be rendered, it is not necessary to exit the rendering program, and it is only needed to change the names of the 3D models that need to be displayed in the configuration file. During the rendering process, only the 3D models that need to be displayed will be rendered. For example, the original setting of the configuration file is to display model A and not to display model B. The configuration file can be modified to display model B and not to display model A, and the models displayed in the rendering program will also change with the modification of the configuration file, realizing the operation of adding model B and deleting model A. When it is needed to replace the 3D models to be rendered, it is also not necessary to exit the rendering program, and it is only needed to change the names of the 3D models that need to be displayed in the configuration file or replace a certain 3D model in the resource file with a 3D model that needs to be replaced. For example, it is needed to replace model A in the form of a cylinder with model B in the form of a prism. In an embodiment, the configuration file can be modified to set not to display model A and to display model B, and the position parameters of model B in the configuration file are replaced with the position parameters of model A, so that model A in the form of a cylinder is replaced with model B in the form of a prism. In another embodiment, a 3D model in the form of a cylinder with the name of "model A" can be found in the resource file, and a 3D model in the form of a prism is used to replace the 3D model A in the form of a cylinder. In this way, model A in the rendering program will be replaced with the 3D model A in the form of a prism.
[0040] In summary, the method for generating the 3D medal in the embodiments of the present application associates the 3D models through the configuration file, so that the addition, deletion or replacement of the 3D models to be rendered can be realized by adjusting the configuration file during rendering, which reduces the cumbersome operation and improves the generation efficiency of the 3D medal.
[0041] Further description will be made in combination with the accompanying drawings.
[0042] Please refer to Figure 6 In some embodiments, the 3D models include component models and skybox models. The component models are used to independently constitute a model, or multiple component models jointly constitute the same model. The skybox model is equivalent to the background environment of the 3D medal, such as Figure 6As shown, the modeling AB composed of the component model A and the component model B is housed inside the skybox model C, and the 3D medal I can be generated after rendering the component model A, the component model B, and the skybox model C at a first perspective, and the 3D medal II can be generated after rendering the component model A, the component model B, and the skybox model C at a second perspective.
[0043] Referring to Figure 7 In some embodiments, the resource file further includes a map, and the color, pattern, and material of the map can cover the surface of the 3D model. For example, Figure 7 As shown, after applying the stripe map a to the model A originally without a map, the model A becomes a model with a striped surface.
[0044] Referring to Figure 8 In some embodiments, the parameters of the 3D model include at least one of a gamma correction value, a metalness, a roughness, a map parameter, an albedo, an ambient occlusion value, and a position coordinate. The parameters of the 3D model can further include other rendering-related parameters such as hue, saturation, contrast, grayscale, blur, zoom level, etc., which are not listed here.
[0045] The map parameter includes a map file name and a position to set which map is applied to the 3D model and where the map is applied to the 3D model. The gamma correction value, the metalness, the roughness, the albedo, and the ambient occlusion value affect the color performance and texture of the 3D model after rendering. The position coordinate of the 3D model affects the position of the 3D model in the generated 3D medal, and the translation and rotation of the 3D model can be achieved by modifying the position coordinate parameter of the 3D model.
[0046] In some embodiments, each 3D model corresponds to its own parameters. Any number of models can be set as a model set, and the parameters of the model set are set. When the parameters of the model set change, the parameters corresponding to all the 3D models included in the model set also change synchronously. For example, model A and model B are set as model set AB, metalness a corresponds to model A, metalness b corresponds to model B, and metalness ab corresponds to model AB. When the metalness ab changes, the metalness a and the metalness b also change together, such as when the metalness ab changes to 100, the metalness a also changes to 100, and the metalness b also changes to 100.
[0047] Referring to Figure 9 In some embodiments, the method for generating a 3D medal further includes:
[0048] 04: updating the configuration file; and
[0049] 05: In the process of currently performing the rendering processing, rendering the 3D model according to the parameters of the 3D model to be displayed in the updated configuration file to generate an updated 3D medal.
[0050] Referring to Figure 2 In some embodiments, the 3D medal generation apparatus 200 further comprises an updating module 214 and a second rendering module 215. The updating module 214 is configured to perform the method in 04. The second rendering module 215 is configured to perform the method in 05. That is, the updating module 214 is configured to update the configuration file. The second rendering module 215 is configured to, in the process of currently performing the rendering processing, render the 3D model according to the parameters of the 3D model to be displayed in the updated configuration file to generate an updated 3D medal.
[0051] Referring to Figure 3 In some embodiments, the one or more processors 30 are further configured to perform the methods in 04 and 05. That is, the one or more processors 30 are further configured to update the configuration file and, in the process of currently performing the rendering processing, render the 3D model according to the parameters of the 3D model to be displayed in the updated configuration file to generate an updated 3D medal.
[0052] After generating the 3D medal, if the 3D medal is not satisfactory, the effect of the generated 3D medal can be adjusted by updating the configuration file. Specifically, the name of the 3D model to be displayed in the configuration file can be updated and / or the parameters of the 3D model can be updated to obtain an updated configuration file. After the configuration file is updated, the rendering program can generate an updated 3D medal according to the updated configuration file in real time, thereby dynamically adjusting the effect of the 3D medal. The updating of the name of the 3D model includes at least one of adding the name of the 3D model, deleting the name of the 3D model, or replacing the name of the 3D model. The updating of the parameters of the 3D model includes at least one of updating the gamma correction value, the metalness, the roughness, the mapping parameter, the albedo, the ambient occlusion value, and the position coordinate.
[0053] For example, the current configuration file is: display model A, do not display model B, metal a = 100, metal b = 100. Among them, metal a corresponds to model A, and metal b corresponds to model B. At this time, the preview interface displays the generated 3D medal as model A with metal a = 100. The first update is made to the configuration file. The first updated configuration file is: display model A, do not display model B, metal a = 200, metal b = 100. At this time, the preview interface displays the generated 3D medal as model A with metal a = 200. The second update is made to the configuration file. The second updated configuration file is: do not display model A, display model B, metal a = 200, metal b = 100. At this time, the preview interface displays the generated 3D medal as model B with metal a = 200. If the user is satisfied with the 3D medal generated according to the second updated configuration file, the 3D medal can be output.
[0054] Referring to Figure 10 In some embodiments, the method for generating a 3D medal further comprises:
[0055] 06: In the process of rendering the 3D model according to the parameters of the 3D model to be displayed in the updated configuration file, the updated configuration file is reset to the configuration file before the update, and the 3D model is rendered according to the parameters of the 3D model to be displayed in the configuration file before the update to return the 3D medal before the update.
[0056] Referring to Figure 2 In some embodiments, the 3D medal generation device 200 further comprises a reset module 216. The reset module 216 is used to execute the method in 06. That is, the reset module 216 is used to reset the updated configuration file to the configuration file before the update in the process of rendering the 3D model according to the parameters of the 3D model to be displayed in the updated configuration file, and render the 3D model according to the parameters of the 3D model to be displayed in the configuration file before the update to return the 3D medal before the update.
[0057] Referring to Figure 3 In some embodiments, the one or more processors 30 are further used to execute the method in 06. That is, the one or more processors 30 are further used to reset the updated configuration file to the configuration file before the update in the process of rendering the 3D model according to the parameters of the 3D model to be displayed in the updated configuration file, and render the 3D model according to the parameters of the 3D model to be displayed in the configuration file before the update to return the 3D medal before the update.
[0058] If the effect of the updated 3D medal is not satisfactory, instead of adjusting the names of the 3D models to be displayed and / or the parameters of the 3D models in the configuration file one by one to the state before the update, the updated configuration file can be reset to the configuration file before the update to return the 3D medal before the update, so as to reduce the cumbersome operation and improve the generation efficiency of the 3D medal.
[0059] Referring to Figure 11 In some embodiments, the method for generating the 3D medal further comprises:
[0060] 07: saving the updated configuration file; and
[0061] 08: in the next rendering process, rendering the 3D model according to the parameters of the 3D model to be displayed in the updated configuration file to generate the 3D medal.
[0062] Referring to Figure 2 In some embodiments, the device 200 for generating the 3D medal further comprises a storage module 217 and a third rendering module 218. The storage module 217 is used to execute the method in 07. The third rendering module 218 is used to execute the method in 08. That is, the storage module 217 is used to save the updated configuration file. The third rendering module 218 is used to, in the next rendering process, render the 3D model according to the parameters of the 3D model to be displayed in the updated configuration file to generate the 3D medal.
[0063] Referring to Figure 3 In some embodiments, the one or more processors 30 are further used to execute the methods in 07 and 08. That is, the one or more processors 30 are further used to save the updated configuration file and, in the next rendering process, render the 3D model according to the parameters of the 3D model to be displayed in the updated configuration file to generate the 3D medal.
[0064] Referring to Figure 9 After the configuration file is updated and the updated 3D medal is generated, the updated configuration file can be kept, for example, saved as “configuration file 1”. After the current rendering is completed and the rendering program is exited, in the next rendering using the rendering program, the 3D model can be rendered according to the initial configuration file or according to the configuration file 1. Alternatively, the current rendering has not been completed, the configuration file is updated again after the “configuration file 1” is saved, and the updated 3D medal is generated. If the effect of the latest updated 3D medal is not satisfactory, in addition to resetting the configuration file to the initial configuration file, the configuration file can also be reset to the configuration file 1, so as to generate the 3D medal by rendering the 3D model according to the configuration file 1.
[0065] Please see Figure 11 In some implementations, the method for generating 3D medals further includes:
[0066] 09: Displays the name of the 3D badge / model, and the parameters of the 3D model; and
[0067] 010: When the parameters of the 3D model are dynamically adjusted, the 3D model is re-rendered according to the adjusted parameters to dynamically generate and display the updated 3D badge.
[0068] Please see Figure 2 In some embodiments, the 3D medal generation apparatus 200 further includes a display module 219 and a fourth rendering module 220. The display module 219 executes the method described in 09. The fourth rendering module 220 executes the method described in 010. That is, the display module 219 displays the name of the 3D medal and the 3D model, as well as the parameters of the 3D model. The fourth rendering module 220, when the parameters of the 3D model are dynamically adjusted, re-renders the 3D model according to the adjusted parameters to dynamically generate and display the updated 3D medal.
[0069] Please see Figure 3 In some embodiments, terminal 1000 further includes display 40 for executing the method in 09. One or more processors 30 are also configured to execute the method in 010. That is, display 40 is configured to display the 3D badge, the name of the 3D model, and the parameters of the 3D model. One or more processors 30 are also configured to re-render the 3D model according to the adjusted parameters of the 3D model when the parameters of the 3D model are dynamically adjusted, so as to dynamically generate and display the updated 3D badge.
[0070] Please see Figure 12 The rendering interface displays a 3D badge, the name of the 3D model, and the parameters of the 3D model. These parameters can be dynamically adjusted. When the 3D model's parameters are dynamically adjusted, for example, by dragging the metallization 'a' adjustment bar from 100 to 150, the displayed 3D badge also changes in real time according to the dynamic parameter changes. In other words, while the parameters are dynamically adjusted, the 3D model is rendered in real time to generate a 3D badge corresponding to the dynamic parameters, allowing for a quick preview of the 3D badge and enabling flexible, multiple adjustments to the 3D badge's rendering effect.
[0071] Please see Figure 13 In some implementations, the method for generating 3D medals further includes:
[0072] 011: Add parameters for the 3D badge to the configuration file. These parameters include the display angle and position coordinates.
[0073] 012: Adjusting the display angle and / or the position coordinates of the 3D medal according to the user input.
[0074] Referring to Figure 2 In some embodiments, the 3D medal generation apparatus 200 further comprises an adding module 221 and an adjusting module 222. The adding module 221 is configured to perform the method in 011. The adjusting module 222 is configured to perform the method in 012. That is, the adding module 221 is configured to add the parameters of the 3D medal in the configuration file, the parameters of the 3D medal comprising the display angle and the position coordinates. The adjusting module 222 is configured to adjust the display angle and / or the position coordinates of the 3D medal according to the user input.
[0075] Referring to Figure 3 In some embodiments, the one or more processors 30 are further configured to perform the methods in 011 and 012. That is, the one or more processors 30 are further configured to add the parameters of the 3D medal in the configuration file, the parameters of the 3D medal comprising the display angle and the position coordinates, and adjust the display angle and / or the position coordinates of the 3D medal according to the user input.
[0076] Referring to Figure 6 For example, the current view angle is a first view angle, the component model A, the component model B and the skybox model C have a first angle and a first position coordinates when the first view angle, and the 3D medal I can be generated after the component model A, the component model B and the skybox model C are rendered at the first view angle. The configuration file can be adjusted, and the configuration file is updated as follows: the component model A, the component model B and the skybox model C have a second angle and a second position coordinates, the view angle at this time is a second view angle, and the 3D medal II can be generated after the component model A, the component model B and the skybox model C are rendered at the second view angle. In this way, the 3D medal with different view angle effects can be obtained, and the user's selection is enriched.
[0077] Referring to Figure 13 The embodiments of the present application also provide a non-volatile computer readable storage medium 400 containing a computer program 401. When the computer program 401 is executed by the one or more processors 30, the one or more processors 30 perform the 3D medal generation method of any of the above embodiments. The non-volatile computer readable storage medium 400 can be arranged in the terminal 1000, or can be arranged in a cloud server or other device, at this time, the terminal 1000 can communicate with the cloud server or other device to obtain the corresponding computer program 410.
[0078] Referring to Figure 3For example, when the computer program 401 is executed by one or more processors 30, the one or more processors 30 are caused to perform the methods in 01, 02, 03, 04, 05, 06, 07, 08, 09, 010, 011 and 012. For example, the following generation methods are performed:
[0079] 01: Obtain a resource file, the resource file including a 3D model and a configuration file of the 3D model, the configuration file including a name of the 3D model to be displayed and parameters of the 3D model to be displayed;
[0080] 02: Obtain the 3D model to be displayed and the parameters of the 3D model to be displayed according to the name of the 3D model to be displayed in the configuration file; and
[0081] 03: Perform rendering processing on the 3D model according to the parameters of the 3D model to be displayed, to generate a 3D medal.
[0082] 04: Update the configuration file; and
[0083] 05: In the process of currently performing the rendering processing, perform rendering processing on the 3D model according to the parameters of the 3D model to be displayed in the updated configuration file, to generate an updated 3D medal.
[0084] 07: Save the updated configuration file; and
[0085] 08: In the process of next time performing the rendering processing, perform rendering processing on the 3D model according to the parameters of the 3D model to be displayed in the updated configuration file, to generate a 3D medal.
[0086] In summary, the generation method of the 3D medal, the generation device 200 of the 3D medal, the terminal 1000 and the non-volatile computer readable storage medium of the embodiments of the present application can associate the 3D model through the configuration file, so that the 3D model to be rendered can be added, deleted or replaced by adjusting the configuration file during rendering, and the generated 3D medal can be updated by updating the configuration file during the rendering processing, thereby reducing the cumbersome operation and improving the generation efficiency of the 3D medal.
[0087] In the description of the present specification, the description with reference to the terms "certain embodiments", "one embodiment", "some embodiments", "illustrative embodiments", "example", "specific example" or "some examples" means that the specific features, structures, materials or characteristics described in connection with the described embodiments or examples are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily mean the same embodiment or example. Moreover, the described specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0088] Furthermore, the terms "first", "second", etc. are used only for descriptive purposes and are not to be construed as indicating or implying relative importance or an ordered ranking of indicated technical features. Thus, a feature defined with "first", "second" may or may not include at least one of the features. In the description of the application, the meaning of "plurality" is at least two, for example two, three, unless explicitly specified otherwise.
[0089] Although the embodiments of the present application have been shown and described above, it is to be understood that the above-described embodiments are merely exemplary, and are not to be construed as limiting the present application, and that changes, modifications, substitutions and variations can be made by those skilled in the art without departing from the scope of the present application, which is defined by the appended claims and their equivalents.
Claims
1. A method for generating a 3D badge, wherein the 3D badge is applied to a user incentive system set in application software in a terminal, characterized in that, include: Obtain resource files, including a 3D model and a configuration file for the 3D model; The 3D model includes component models and a skybox model. At least one component model is used to form the shape of the 3D badge. The skybox model is the background environment of the 3D badge. The at least one component model is housed inside the skybox model. The 3D badge is generated after rendering from different perspectives. The configuration file includes the name of the 3D model to be displayed and the parameters of the 3D model to be displayed. The resource file is displayed on the terminal's display interface. Based on the name of the 3D model to be displayed in the configuration file, the parameters of the 3D model to be displayed and the 3D model to be displayed are obtained. By changing the name of the 3D model displayed in the configuration file in the resource file, the parameters of the 3D model to be displayed, the 3D model not to be displayed, and the 3D model corresponding to the 3D model to be displayed in the resource file are set. By changing the parameters of at least one 3D model corresponding to the 3D model displayed in the configuration file, the parameters of the 3D model are set. and The 3D model is rendered according to the parameters of the 3D model to be displayed in order to generate the 3D badge.
2. The generation method according to claim 1, characterized in that, The resource file also includes textures; the parameters of the 3D model include at least one of gamma correction value, metallicity, roughness, texture parameters, albedo, ambient occlusion value, and position coordinates.
3. The generation method according to claim 1, characterized in that, Also includes: Update the configuration file; and During the current rendering process, the 3D model is rendered according to the parameters of the 3D model to be displayed as described in the updated configuration file, in order to generate an updated 3D badge.
4. The generation method according to claim 3, characterized in that, Also includes: Save the updated configuration file; and During the next rendering process, the 3D model is rendered according to the parameters of the 3D model to be displayed as described in the updated configuration file to generate a 3D badge.
5. The generation method according to claim 1, characterized in that, Also includes: Displays the name of the 3D badge, the 3D model, and the parameters of the 3D model; and When the parameters of the 3D model are dynamically adjusted, the 3D model is re-rendered according to the adjusted parameters to dynamically generate and display the updated 3D badge.
6. A 3D medal generation apparatus, wherein the 3D medal is applied to a user incentive system set in application software in a terminal, characterized in that, include: The first acquisition module is used to acquire resource files; the 3D model includes component models and skybox models, at least one of the component models is used to form the shape of the 3D badge, the skybox model is the background environment of the 3D badge, the at least one component model is contained inside the skybox model, and the 3D badge is generated after rendering processing from different perspectives; the resource files include the 3D model and the configuration file of the 3D model, the configuration file includes the name of the 3D model to be displayed and the parameters of the 3D model to be displayed; The second acquisition module is used to display the resource file on the display interface of the terminal, and to acquire the 3D model to be displayed and its parameters according to the name of the 3D model to be displayed in the configuration file. By changing the name of the 3D model displayed in the configuration file in the resource file, the parameters of the 3D model to be displayed, the 3D model not to be displayed, and the 3D model corresponding to the 3D model to be displayed in the resource file are set. By changing the parameters of at least one 3D model corresponding to the 3D model displayed in the configuration file, the parameters of the 3D model are set. and The first rendering module is used to render the 3D model according to the parameters of the 3D model to be displayed, so as to generate the 3D medal.
7. The generating apparatus according to claim 6, characterized in that, The resource file also includes textures; the parameters of the 3D model include at least one of gamma correction value, metallicity, roughness, texture parameters, albedo, ambient occlusion value, and position coordinates.
8. The generating apparatus according to claim 6, characterized in that, Also includes: The update module is used to update the configuration file; and The second rendering module is used to render the 3D model according to the parameters of the 3D model to be displayed as described in the updated configuration file during the current rendering process, so as to generate an updated 3D badge.
9. The generating apparatus according to claim 8, characterized in that, Also includes: The storage module is used to save the updated configuration files; and The third rendering module is used to render the 3D model according to the parameters of the 3D model to be displayed as described in the updated configuration file during the next rendering process, so as to generate a 3D badge.
10. The generating apparatus according to claim 6, characterized in that, Also includes: The display module is used to display the 3D medal, the name of the 3D model, and the parameters of the 3D model; and The fourth rendering module is used to re-render the 3D model according to the adjusted parameters of the 3D model when the parameters of the 3D model are dynamically adjusted, so as to dynamically generate and display the updated 3D medal.
11. A terminal, characterized in that, The method comprises a housing and a generating apparatus as described in any one of claims 6-10, the generating apparatus being installed within the housing; or comprises a housing and one or more processors, the one or more processors being used to perform the generating method as described in any one of claims 1-5.
12. One or more non-volatile computer-readable storage media storing a computer program that, when executed by one or more processors, implements the generation method according to any one of claims 1 to 5.
Citation Information
Patent Citations
A rendering method and device
CN109448089A