CN117635775A - Model special effect realization method and device, computer storage medium and electronic equipment - Google Patents
Model special effect realization method and device, computer storage medium and electronic equipment Download PDFInfo
- Publication number
- CN117635775A CN117635775A CN202210977594.6A CN202210977594A CN117635775A CN 117635775 A CN117635775 A CN 117635775A CN 202210977594 A CN202210977594 A CN 202210977594A CN 117635775 A CN117635775 A CN 117635775A
- Authority
- CN
- China
- Prior art keywords
- model
- special effect
- target
- target special
- processed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000000694 effects Effects 0.000 title claims abstract description 264
- 238000000034 method Methods 0.000 title claims abstract description 60
- 239000000463 material Substances 0.000 claims abstract description 381
- 238000009877 rendering Methods 0.000 claims abstract description 33
- 238000013507 mapping Methods 0.000 claims description 62
- 238000013500 data storage Methods 0.000 claims description 32
- 239000002131 composite material Substances 0.000 claims description 14
- 230000000007 visual effect Effects 0.000 claims description 10
- 239000013077 target material Substances 0.000 claims description 9
- 238000004590 computer program Methods 0.000 claims description 2
- 230000008569 process Effects 0.000 description 9
- 238000012986 modification Methods 0.000 description 7
- 230000004048 modification Effects 0.000 description 7
- 238000012545 processing Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 5
- 238000007726 management method Methods 0.000 description 4
- 230000001965 increasing effect Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T13/00—Animation
- G06T13/20—3D [Three Dimensional] animation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/005—General purpose rendering architectures
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Graphics (AREA)
- Processing Or Creating Images (AREA)
Abstract
The disclosure relates to a model special effect realization method and device, a computer storage medium and electronic equipment, and relates to the technical field of computers, wherein the method comprises the following steps: obtaining a model to be processed, and determining basic materials included in the model to be processed; obtaining target special effect materials, and generating a material storage structure according to basic materials and the target special effect materials included in the to-be-processed model; and performing model rendering according to the basic materials and the target special effect materials included in the material storage structure to obtain a target special effect model. The method reduces the complexity of material superposition in the model and improves the efficiency of generating the target special effect model.
Description
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a model special effect realization method and device, a computer storage medium and electronic equipment.
Background
With the increasing requirements of players on pictures in games, game production cannot be satisfied by using only a single material, and at present, after a target model is produced, a richer effect is realized by adding special effects to the target model.
In the related art, only one texture ball can be added to one model by default, and when special effect textures need to be added to a target model, codes corresponding to the special effect textures need to be added to model texture codes. On one hand, the codes corresponding to the special effect materials are added, so that the materials of the target model are influenced, and the special effect realization process of the target model is complicated; on the other hand, since the code of the special effect material is added in the material code of the target model, the material and the special effect material of the target model cannot be managed respectively, so that modification and iteration can affect the material and the special effect material of the target model.
Therefore, it is desirable to provide a new model effect implementation method.
It should be noted that the information of the present invention in the above background section is only for enhancing the understanding of the background of the present invention and thus may include information that does not form the prior art that is already known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure aims to provide a model effect implementation method, a model effect implementation device, a computer-readable storage medium, and an electronic apparatus, so as to overcome at least to some extent the problem of complexity in a target model effect implementation process in the related art due to limitations and drawbacks of the related art.
According to one aspect of the present disclosure, there is provided a model effect implementation method, including:
obtaining a model to be processed, and determining basic materials included in the model to be processed;
obtaining target special effect materials, and generating a material storage structure according to basic materials and the target special effect materials included in the to-be-processed model;
and performing model rendering according to the basic materials and the target special effect materials included in the material storage structure to obtain a target special effect model.
In an exemplary embodiment of the present disclosure, obtaining a model to be processed, determining a base material included in the model to be processed, includes:
obtaining a model to be processed and a sub-model included in the model to be processed;
and determining a target sub-model included in the sub-model, and acquiring a basic material corresponding to the target sub-model.
In an exemplary embodiment of the present disclosure, obtaining a target special effect material, generating a material storage structure according to a base material included in the model to be processed and the target special effect material, includes:
acquiring a preset special effect material, and determining the target special effect material in the preset special effect material;
constructing a data storage map, and generating a mapping model grid corresponding to the target special effect material through the data storage map;
And generating the material storage structure through the mapping model grid and the basic material.
In one exemplary embodiment of the present disclosure, constructing a data storage map, generating a mapping model grid corresponding to the target special effects material from the data storage map, includes:
acquiring grids of the target sub-model, vertexes and indexes included in the grids of the target sub-model;
multiplexing the vertexes and indexes included in the grid of the target sub-model through handles to construct data storage mapping;
and generating a mapping model grid corresponding to the target special effect material through the target special effect material by utilizing the data storage mapping.
In an exemplary embodiment of the present disclosure, generating the texture storage structure from the mapping model mesh, the base texture, includes:
acquiring a first corresponding relation between grids of the target sub-model and basic materials corresponding to the target sub-model;
obtaining a mapping model grid corresponding to the target special effect material, and generating a second corresponding relation between the mapping model grid and the target special effect material through the mapping model grid;
And generating the material storage structure through the first corresponding relation and the second corresponding relation.
In an exemplary embodiment of the present disclosure, performing model rendering according to the base material and the target special effect material included in the material storage structure to obtain a target special effect model, including:
acquiring a basic material in the first corresponding relation and a target special effect material in the second corresponding relation, and superposing the basic material and the target special effect material to obtain a target material;
and rendering the target material to obtain the target special effect model.
In an exemplary embodiment of the present disclosure, the model special effect implementation method further includes:
generating a visual composite material tool by using the basic material, the target special effect material and a material storage structure generated according to the basic material and the target special effect material; wherein the visual composite tool is placed in a game engine.
According to an aspect of the present disclosure, there is provided a model effect realization apparatus including:
the base material determining module is used for obtaining a to-be-processed model and determining base materials included in the to-be-processed model;
The target special effect material mapping module is used for acquiring target special effect materials and generating a material storage structure according to basic materials and the target special effect materials included in the to-be-processed model;
and the target special effect model generation module is used for carrying out model rendering according to the basic materials and the target special effect materials included in the material storage structure to obtain a target special effect model.
According to an aspect of the present disclosure, there is provided a computer storage medium having stored thereon a computer program which, when executed by a processor, implements the model special effect implementation method according to any of the above-described exemplary embodiments.
According to one aspect of the present disclosure, there is provided an electronic device including:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the model effect implementation method of any of the above-described exemplary embodiments via execution of the executable instructions.
According to the model special effect implementation method provided by the embodiment of the disclosure, a model to be processed is obtained, and basic materials included in the model to be processed are determined; obtaining target special effect materials, and generating a material storage structure according to basic materials and the target special effect materials included in the to-be-processed model; performing model rendering according to the basic materials and the target special effect materials contained in the material storage structure to obtain a target special effect model; on the one hand, a to-be-processed model and target special effect materials are obtained, basic materials in the to-be-processed model are determined, after the basic materials are determined, a material storage structure is generated according to the basic materials and the target special effect materials, and when rendering is carried out, rendering is carried out according to the basic materials and the target special effect materials in the material storage structure, so that the target special effect model is obtained, the problem that codes corresponding to the special effect materials need to be added in model material codes in the related art is solved, and the process of generating the target special effect model is simplified; on the other hand, model rendering is carried out according to the basic materials and the target special effect materials included in the material storage structure, and on the basis of not modifying the basic materials of the target model, the special effect of the model to be processed is realized, and the material multiplexing efficiency is improved; in still another aspect, separate management of the base material and the special effect material of the target model is achieved, so that modification and iteration do not affect the base material and the special effect material of the model.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention. It is evident that the drawings in the following description are only some embodiments of the present invention and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
Fig. 1 schematically shows a flow chart of a method for realizing model effects according to an exemplary embodiment of the invention.
Fig. 2 schematically shows a flow chart of a method for obtaining a model to be processed and determining base materials included in the model to be processed according to an exemplary embodiment of the invention.
FIG. 3 schematically illustrates a flowchart of a method for obtaining target effect materials and generating a material storage structure based on base materials and target effect materials included in a model to be processed according to an exemplary embodiment of the present invention.
FIG. 4 schematically illustrates a method flow diagram for constructing a data storage map by which a mapping model grid corresponding to a target effect material is generated, according to an example embodiment of the present invention.
FIG. 5 schematically illustrates a flow chart of a method of generating the texture storage structure by mapping a model mesh, a base texture, according to an example embodiment of the invention.
FIG. 6 schematically illustrates a schematic diagram of a texture storage structure according to an example embodiment of the invention.
FIG. 7 schematically illustrates a flowchart of a method for model rendering to obtain a target effect model from base materials and target effect materials included in a materials storage structure, according to an example embodiment of the present disclosure.
FIG. 8 schematically illustrates a schematic diagram of a target effect model generated by adding four layers of effect materials to a model to be processed according to an example embodiment of the present disclosure.
Fig. 9 schematically shows a block diagram of a model special effect realization apparatus according to an exemplary embodiment of the present invention.
Fig. 10 schematically shows an electronic device for implementing the model effect implementation method described above according to an exemplary embodiment of the present invention.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known aspects have not been shown or described in detail to avoid obscuring aspects of the invention.
Furthermore, the drawings are merely schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
In the related art, only one material ball can be added to one model by default, and when an artist needs to add special effects to the model, codes of special effect materials corresponding to the special effects are added to codes of basic materials of the model, so that separate management of the basic materials and the special effect materials cannot be realized. In the existing engine, if only one corresponding material of a model grid is modified, but the model grid can directly correspond to a plurality of materials, huge code modification and downtime risks exist. In addition, in order to keep the resources of the updated release version stable in the game engine, the materials of the updated release version are not generally modified and updated, and if the materials are modified on the updated material codes, all the resources using the materials are affected, so that the cost of quality test and the risk of resource rollback are increased.
Based on one or more of the above problems, the present exemplary embodiment first provides a model effect implementation method, which may include the following steps, as shown in fig. 1:
s110, acquiring a model to be processed, and determining basic materials included in the model to be processed;
s120, obtaining target special effect materials, and generating a material storage structure according to basic materials included in the model to be processed and the target special effect materials;
and S130, performing model rendering according to the basic materials and the target special effect materials included in the material storage structure to obtain a target special effect model.
According to the model special effect implementation method, a model to be processed is obtained, and basic materials included in the model to be processed are determined; obtaining target special effect materials, and generating a material storage structure according to basic materials and the target special effect materials included in the to-be-processed model; performing model rendering according to the basic materials and the target special effect materials contained in the material storage structure to obtain a target special effect model; on the one hand, a to-be-processed model and target special effect materials are obtained, basic materials in the to-be-processed model are determined, after the basic materials are determined, a material storage structure is generated according to the basic materials and the target special effect materials, and when rendering is carried out, rendering is carried out according to the basic materials and the target special effect materials in the material storage structure, so that the target special effect model is obtained, the problem that codes corresponding to the special effect materials need to be added in model material codes in the related art is solved, and the process of generating the target special effect model is simplified; on the other hand, model rendering is carried out according to the basic materials and the target special effect materials included in the material storage structure, and on the basis of not modifying the basic materials of the target model, the special effect of the model to be processed is realized, and the material multiplexing efficiency is improved; in still another aspect, separate management of the base material and the special effect material of the target model is achieved, so that modification and iteration do not affect the base material and the special effect material of the model.
Hereinafter, each step involved in the model special effect implementation method of the exemplary embodiment of the present disclosure is explained and illustrated in detail.
First, application scenarios and purposes of the exemplary embodiments of the present disclosure are explained and explained. Specifically, the embodiment of the disclosure can be used for superposing the materials of the model, realizing the special effect of the model, and mainly researching how to improve the efficiency of generating the target special effect model.
In the method, an obtained model to be processed is used as a basis, a target sub-model in the model to be processed is determined, and a basic material of the target sub-model is obtained; the method comprises the steps of obtaining target special effect materials in preset special effect materials, generating a material storage structure according to basic materials of a target sub-model and the target special effect materials, and rendering according to the material storage structure during rendering, so that a target special effect model is obtained, the generation flow of the magic table special effect model is simplified, and the generation efficiency of the target special effect model is improved.
Next, step S110 to step S130 are explained and described further.
In step S110, a model to be processed is acquired, and a base material included in the model to be processed is determined.
In the present exemplary embodiment, the model to be processed is a model to which model materials have been added, and a plurality of sub-models may be included in the model to be processed. For example, in a game character model, the head of the game character may be a sub-model, or the clothing may be a sub-model, and the sub-model is not particularly limited in this exemplary embodiment. One sub-model corresponds to one grid, and each grid corresponds to one material.
Referring to fig. 2, obtaining a model to be processed, and determining base materials included in the model to be processed may include step S210 and step S220:
s210, acquiring a model to be processed and a sub-model included in the model to be processed;
s220, determining a target sub-model included in the sub-model, and obtaining a basic material corresponding to the target sub-model.
Step S210 and step S220 will be further explained and explained below. Specifically, firstly, a model to be processed and a sub-model in the model to be processed are obtained; then, determining a target sub-model with special effects to be added in the sub-models, and acquiring basic materials of the target sub-model after determining the target sub-model.
After the basic material of the target sub-model is obtained, rendering the model to be processed according to the basic material of the target sub-model and the selected target special effect material to obtain the target special effect model.
In step S120, a target special effect material is obtained, and a material storage structure is generated according to the basic material included in the model to be processed and the target special effect material.
In this exemplary embodiment, the target special effect material may be obtained by selecting from a material library, and referring to fig. 3, the target special effect material is obtained, and a material storage structure is generated according to the base material included in the model to be processed and the target special effect material, and may include steps S310-S330:
S310, acquiring a preset special effect material, and determining the target special effect material in the preset special effect material;
s320, constructing a data storage map, and generating a mapping model grid corresponding to the target special effect material through the data storage map;
s330, generating the material storage structure through the mapping model grid and the basic material.
Hereinafter, step S310 to step S330 will be further explained and explained. Specifically, first, a preset special effect material may be obtained from a material library, and then a target special effect material may be determined from the preset special effect material according to needs, where the number of determined target special effect materials may be one or more, and in this example embodiment, the number of determined target special effect materials is not specifically limited. After the target special effect material is obtained, a data storage map can be constructed, and a mapping model grid corresponding to the target special effect material is generated through the data storage map, wherein the data storage map can be constructed through the grid of the target submodel; after the mapping model grid of the target special effect material is obtained, a material storage structure can be generated according to the mapping model grid of the target special effect material, the basic material of the target submodel and the target special effect material.
Further, referring to fig. 4, constructing a data storage map, generating a mapping model grid corresponding to the target special effect material through the data storage map may include steps S410-S430:
s410, acquiring grids of the target sub-model, vertexes and indexes included in the grids of the target sub-model;
s420, multiplexing vertexes and indexes included in the grids of the target submodel through handles, and constructing data storage mapping;
s430, utilizing the data storage mapping, and generating a mapping model grid corresponding to the target special effect material through the target special effect material.
Hereinafter, step S410 to step S430 will be further explained and explained. Specifically, when constructing a data storage model, firstly, a grid of a target sub-model, and vertices and indexes included in the grid of the target sub-model are acquired; after obtaining the vertexes and indexes included in the grids of the target sub-model, multiplexing the vertexes and indexes in the grids of the target sub-model in a handle mode, namely multiplexing the vertexes and indexes of the grids of the target sub-model in a pointer referencing mode to construct a data storage map; and finally, generating a mapping model grid corresponding to the target special effect material through the constructed data storage mapping.
It should be noted that, the grid of the mapping model corresponding to the target special effect material and the grid of the target sub-model contain the same data, but the grid of the target sub-model includes main data, the grid of the mapping model corresponding to the target special effect material references the main data, so that the engine generates a new model mapping grid when loading the target special effect material by constructing the data storage mapping, is compatible with the original data structure, and solves the problems that in the related art, when one model grid is modified to correspond to one grid to correspond to a plurality of materials, huge code modification and downtime risks are generated, and in addition, the burden of memory and calculation is not increased.
In this example embodiment, after the engine loads the target special effects material to generate the mapping model grid corresponding to the target special effects material, the material storage structure may be generated according to the mapping model grid, and referring to fig. 5, the material storage structure may be generated by the mapping model grid and the base material, and may include steps S510-S530:
s510, acquiring a first corresponding relation between grids of the target sub-model and basic materials corresponding to the target sub-model;
S520, obtaining a mapping model grid corresponding to the target special effect material, and generating a second corresponding relation between the mapping model grid and the target special effect material through the mapping model grid;
and S530, generating the material storage structure through the first corresponding relation and the second corresponding relation.
Hereinafter, step S510 to step S530 will be further explained and explained. Specifically, first, a grid of a target sub-model, a basic material corresponding to the grid of the target sub-model, and a first relation between the grid of the target sub-model and the basic material corresponding to the grid of the target sub-model are acquired; then, a mapping model grid corresponding to the target special effect material is obtained, and a second corresponding relation between the mapping model grid and the target special effect material is generated according to a first corresponding relation between the grid of the target sub-model and the basic material; and finally, generating a material storage structure according to the first corresponding relation and the second corresponding relation. When a plurality of target special effects materials exist, a second correspondence between the plurality of mapping model grids and the target special effects materials may be generated according to the first correspondence, as shown in fig. 6. When two target special effect materials exist, the generated material storage structure comprises a first corresponding relation between the target sub-model grids and the basic materials, a second corresponding relation between the model mapping grids and the first target special effect materials and a second corresponding relation between the model mapping grids and the second target special effect materials.
In the present exemplary embodiment, the meaning correspondence between the model mesh and the material is modified to a one-to-many relationship, so that on the premise of not affecting the basic material code, the new modification requirement of the model to be processed is satisfied, and the basic material and the special effect material of the model to be processed can be separately managed.
In step S130, model rendering is performed according to the base material and the target special effect material included in the material storage structure, so as to obtain a target special effect model.
In this exemplary embodiment, after the new material storage structure is generated, a target special effect model may be obtained according to the new material storage structure, and referring to fig. 7, model rendering is performed according to the base material and the target special effect material included in the material storage structure, so as to obtain a target special effect model, which may include step S710 and step S720:
s710, obtaining a basic material in the first corresponding relation and a target special effect material in the second corresponding relation, and superposing the basic material and the target special effect material to obtain a target material;
and S720, rendering the target material to obtain the target special effect model.
Step S710 and step S720 will be further explained and explained below. Specifically, after the texture storage structure is obtained, the basic texture and the target special effect texture included in the texture storage structure can be obtained, and the basic texture and the target special effect texture are overlapped to obtain the target texture; and then rendering the target material to the model to be processed to obtain the target special effect model.
In the embodiment, the basic material and the special effect material are overlapped on the basis of not modifying the basic material code, so that the multiplexing rate of the materials is improved, the branches of the shader are reduced, and the program efficiency is improved.
In this example embodiment, the model special effect implementation method further includes:
generating a visual composite material tool by using the basic material, the target special effect material and a material storage structure generated according to the basic material and the target special effect material; wherein the visual composite tool is placed in a game engine.
Specifically, after the method of adding special effects to the model to be processed is implemented, a visual composite tool may be generated by the method, where the composite tool is located in a game engine, and the game engine may be a NeoX engine or other engines, and in this example embodiment, the game engine is not specifically limited. When the artistic staff performs material superposition through the composite material tool, firstly, a model window is opened in an engine, the composite material tool is opened on the basis that the model material is added into a model to be processed, and special effect materials corresponding to the special effect to be realized and the material ball positions of the special effect materials can be added into the composite material tool; after the special effect material is added, performing model mapping editing, namely determining which sub-model the target special effect material is mapped to, and after the sub-model is determined, clicking and storing the sub-model, so that the special effect can be added to the model to be processed, and the target special effect model can be generated. FIG. 8 shows a target effect model generated by adding four layers of effect materials to a model to be processed without effect.
The model special effect implementation method provided by the example embodiment of the disclosure has at least the following advantages: on the one hand, a to-be-processed model and target special effect materials are obtained, basic materials in the to-be-processed model are determined, after the basic materials are determined, a material storage structure is generated according to the basic materials and the target special effect materials, and when rendering is carried out, rendering is carried out according to the basic materials and the target special effect materials in the material storage structure, so that the target special effect model is obtained, the problem that codes corresponding to the special effect materials need to be added in model material codes in the related art is solved, and the process of generating the target special effect model is simplified; on the other hand, model rendering is carried out according to the basic materials and the target special effect materials included in the material storage structure, and on the basis of not modifying the basic materials of the target model, the special effect of the model to be processed is realized, and the material multiplexing efficiency is improved; in still another aspect, separate management of the base material and the special effect material of the target model is achieved, so that modification and iteration do not affect the base material and the special effect material of the model.
The exemplary embodiment of the present disclosure further provides a model special effect implementation apparatus, which may include, as shown in fig. 9: the base material determination module 910 and the target effect material mapping module 920 generate a target effect model 930. Wherein:
A base material determining module 910, configured to obtain a model to be processed, and determine a base material included in the model to be processed;
the target special effect material mapping module 920 is configured to obtain a target special effect material, and generate a material storage structure according to a base material included in the model to be processed and the target special effect material;
and the target special effect model generating module 930 is configured to perform model rendering according to the base material and the target special effect material included in the material storage structure, so as to obtain a target special effect model.
The specific details of each module in the model special effect implementation device are described in detail in the corresponding model special effect implementation method, so that details are not repeated here.
In an exemplary embodiment of the present disclosure, obtaining a model to be processed, determining a base material included in the model to be processed, includes:
obtaining a model to be processed and a sub-model included in the model to be processed;
and determining a target sub-model included in the sub-model, and acquiring a basic material corresponding to the target sub-model.
In an exemplary embodiment of the present disclosure, obtaining a target special effect material, generating a material storage structure according to a base material included in the model to be processed and the target special effect material, includes:
Acquiring a preset special effect material, and determining the target special effect material in the preset special effect material;
constructing a data storage map, and generating a mapping model grid corresponding to the target special effect material through the data storage map;
and generating the material storage structure through the mapping model grid and the basic material.
In one exemplary embodiment of the present disclosure, constructing a data storage map, generating a mapping model grid corresponding to the target special effects material from the data storage map, includes:
acquiring grids of the target sub-model, vertexes and indexes included in the grids of the target sub-model;
multiplexing the vertexes and indexes included in the grid of the target sub-model through handles to construct data storage mapping;
and generating a mapping model grid corresponding to the target special effect material through the target special effect material by utilizing the data storage mapping.
In an exemplary embodiment of the present disclosure, generating the texture storage structure from the mapping model mesh, the base texture, includes:
acquiring a first corresponding relation between grids of the target sub-model and basic materials corresponding to the target sub-model;
Obtaining a mapping model grid corresponding to the target special effect material, and generating a second corresponding relation between the mapping model grid and the target special effect material through the mapping model grid;
and generating the material storage structure through the first corresponding relation and the second corresponding relation.
In an exemplary embodiment of the present disclosure, performing model rendering according to the base material and the target special effect material included in the material storage structure to obtain a target special effect model, including:
acquiring a basic material in the first corresponding relation and a target special effect material in the second corresponding relation, and superposing the basic material and the target special effect material to obtain a target material;
and rendering the target material to obtain the target special effect model.
In an exemplary embodiment of the present disclosure, the model special effect implementation method further includes:
generating a visual composite material tool by using the basic material, the target special effect material and a material storage structure generated according to the basic material and the target special effect material, so that an art staff realizes the special effect of a target model through the visual composite material tool; wherein the visual composite tool is placed in a game engine.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the invention. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Furthermore, although the steps of the methods of the present invention are depicted in the accompanying drawings in a particular order, this is not required to either imply that the steps must be performed in that particular order, or that all of the illustrated steps be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
In an exemplary embodiment of the present invention, an electronic device capable of implementing the above method is also provided.
Those skilled in the art will appreciate that the various aspects of the invention may be implemented as a system, method, or program product. Accordingly, aspects of the invention may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 1000 according to this embodiment of the present invention is described below with reference to fig. 10. The electronic device 1000 shown in fig. 10 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 10, the electronic device 1000 is embodied in the form of a general purpose computing device. Components of electronic device 1000 may include, but are not limited to: the at least one processing unit 1010, the at least one memory unit 1020, a bus 1030 connecting the various system components (including the memory unit 1020 and the processing unit 1010), and a display unit 1040.
Wherein the storage unit stores program code that is executable by the processing unit 1010 such that the processing unit 1010 performs steps according to various exemplary embodiments of the present invention described in the above section of the "exemplary method" of the present specification. For example, the processing unit 1010 may perform step S110 as shown in fig. 1: obtaining a model to be processed, and determining basic materials included in the model to be processed; s120: obtaining target special effect materials, and generating a material storage structure according to basic materials and the target special effect materials included in the to-be-processed model; s130: and performing model rendering according to the basic materials and the target special effect materials included in the material storage structure to obtain a target special effect model.
The memory unit 1020 may include readable media in the form of volatile memory units such as Random Access Memory (RAM) 10201 and/or cache memory unit 10202, and may further include Read Only Memory (ROM) 10203.
The storage unit 1020 may also include a program/utility 10204 having a set (at least one) of program modules 10205, such program modules 10205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 1030 may be representing one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 1000 can also communicate with one or more external devices 1100 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 1000, and/or with any device (e.g., router, modem, etc.) that enables the electronic device 1000 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 1050. Also, electronic device 1000 can communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 1060. As shown, the network adapter 1060 communicates with other modules of the electronic device 1000 over the bus 1030. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with the electronic device 1000, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present invention may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present invention.
In an exemplary embodiment of the present invention, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible embodiments, the various aspects of the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the invention as described in the "exemplary methods" section of this specification, when said program product is run on the terminal device.
A program product for implementing the above-described method according to an embodiment of the present invention may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Furthermore, the above-described drawings are only schematic illustrations of processes included in the method according to the exemplary embodiment of the present invention, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
Claims (10)
1. The model special effect implementation method is characterized by comprising the following steps of:
obtaining a model to be processed, and determining basic materials included in the model to be processed;
obtaining target special effect materials, and generating a material storage structure according to basic materials and the target special effect materials included in the to-be-processed model;
And performing model rendering according to the basic materials and the target special effect materials included in the material storage structure to obtain a target special effect model.
2. The method for realizing a special effect of a model according to claim 1, wherein obtaining a model to be processed, determining a base material included in the model to be processed, comprises:
obtaining a model to be processed and a sub-model included in the model to be processed;
and determining a target sub-model included in the sub-model, and acquiring a basic material corresponding to the target sub-model.
3. The model special effect implementation method according to claim 2, wherein obtaining a target special effect material, generating a material storage structure according to a base material included in the model to be processed and the target special effect material, includes:
acquiring a preset special effect material, and determining the target special effect material in the preset special effect material;
constructing a data storage map, and generating a mapping model grid corresponding to the target special effect material through the data storage map;
and generating the material storage structure through the mapping model grid and the basic material.
4. The model effect implementation method according to claim 3, wherein constructing a data storage map, generating a mapping model mesh corresponding to the target effect material through the data storage map, includes:
Acquiring grids of the target sub-model, vertexes and indexes included in the grids of the target sub-model;
multiplexing the vertexes and indexes included in the grid of the target sub-model through handles to construct data storage mapping;
and generating a mapping model grid corresponding to the target special effect material through the target special effect material by utilizing the data storage mapping.
5. The method of claim 4, wherein generating the texture storage structure from the mapped model mesh and the base texture comprises:
acquiring a first corresponding relation between grids of the target sub-model and basic materials corresponding to the target sub-model;
obtaining a mapping model grid corresponding to the target special effect material, and generating a second corresponding relation between the mapping model grid and the target special effect material through the mapping model grid;
and generating the material storage structure through the first corresponding relation and the second corresponding relation.
6. The method for realizing a special effect of a model according to claim 4, wherein performing model rendering according to the base material and the target special effect material included in the material storage structure to obtain a target special effect model comprises:
Acquiring a basic material in the first corresponding relation and a target special effect material in the second corresponding relation, and superposing the basic material and the target special effect material to obtain a target material;
and rendering the target material to obtain the target special effect model.
7. The model effect implementation method according to claim 1, characterized in that the model effect implementation method further comprises:
generating a visual composite material tool by using the basic material, the target special effect material and a material storage structure generated according to the basic material and the target special effect material; wherein the visual composite tool is placed in a game engine.
8. A model special effect realization device, characterized by comprising:
the base material determining module is used for obtaining a to-be-processed model and determining base materials included in the to-be-processed model;
the target special effect material mapping module is used for acquiring target special effect materials and generating a material storage structure according to basic materials and the target special effect materials included in the to-be-processed model;
and the target special effect model generation module is used for carrying out model rendering according to the basic materials and the target special effect materials included in the material storage structure to obtain a target special effect model.
9. A computer storage medium having stored thereon a computer program, which when executed by a processor, implements the model effect implementation method of any of claims 1-7.
10. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the model effect implementation method of any one of claims 1-7 via execution of the executable instructions.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210977594.6A CN117635775A (en) | 2022-08-15 | 2022-08-15 | Model special effect realization method and device, computer storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210977594.6A CN117635775A (en) | 2022-08-15 | 2022-08-15 | Model special effect realization method and device, computer storage medium and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117635775A true CN117635775A (en) | 2024-03-01 |
Family
ID=90020420
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210977594.6A Pending CN117635775A (en) | 2022-08-15 | 2022-08-15 | Model special effect realization method and device, computer storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117635775A (en) |
-
2022
- 2022-08-15 CN CN202210977594.6A patent/CN117635775A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2022137193A (en) | Distributed training method and device of deep learning model, electronic apparatus, storage medium and computer program | |
US8843889B2 (en) | Managing application template artifacts in a networked computing environment | |
JP7350923B2 (en) | Deep learning framework operator registration method, equipment, device and storage medium | |
CN110413276B (en) | Parameter editing method and device, electronic equipment and storage medium | |
CN110855482A (en) | Three-dimensional dynamic communication network analog simulation method, system and storage medium | |
CN110968305A (en) | Applet visualization generation method, device, equipment and storage medium | |
CN109766319B (en) | Compression task processing method and device, storage medium and electronic equipment | |
EP3834080B1 (en) | Static reconcilliation of application view hierarchies | |
CN110478898B (en) | Configuration method and device of virtual scene in game, storage medium and electronic equipment | |
CN107526639B (en) | Resource arrangement method, medium, device and computing equipment | |
CN115202729A (en) | Container service-based mirror image generation method, device, equipment and medium | |
CN113835693A (en) | Code generation method and device, electronic equipment and storage medium | |
CN115601523A (en) | Lightweight processing method, system, equipment and storage medium for building information model | |
US20240303413A1 (en) | Document editing method and apparatus, and terminal and non-transitory storage medium | |
CN112807695B (en) | Game scene generation method and device, readable storage medium and electronic equipment | |
CN113778961A (en) | Production management method, device and system for CIM model data | |
CN109697083A (en) | Fixed point accelerated method, device, electronic equipment and the storage medium of data | |
CN110704766A (en) | Interface rendering optimization method and device based on real-time snapshot and electronic equipment | |
CN110555732A (en) | Marketing strategy pushing method and device and marketing strategy operation platform | |
CN117635775A (en) | Model special effect realization method and device, computer storage medium and electronic equipment | |
CN114222317B (en) | Data processing method and device, electronic equipment and storage medium | |
US11640281B2 (en) | Tool for introspection in object-oriented source code | |
CN114943795A (en) | Model rendering method and device, electronic equipment and storage medium | |
CN114692055A (en) | Form processing method and device, storage medium and electronic equipment | |
CN116775174A (en) | Processing method, device, equipment and medium based on user interface frame |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |