CN111563968A - Online material replacing method - Google Patents

Online material replacing method Download PDF

Info

Publication number
CN111563968A
CN111563968A CN202010680654.9A CN202010680654A CN111563968A CN 111563968 A CN111563968 A CN 111563968A CN 202010680654 A CN202010680654 A CN 202010680654A CN 111563968 A CN111563968 A CN 111563968A
Authority
CN
China
Prior art keywords
model
baking
materials
simplification
line
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
Application number
CN202010680654.9A
Other languages
Chinese (zh)
Inventor
王帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Qunhe Information Technology Co Ltd
Original Assignee
Hangzhou Qunhe Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hangzhou Qunhe Information Technology Co Ltd filed Critical Hangzhou Qunhe Information Technology Co Ltd
Priority to CN202010680654.9A priority Critical patent/CN111563968A/en
Publication of CN111563968A publication Critical patent/CN111563968A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Graphics (AREA)
  • Databases & Information Systems (AREA)
  • Geometry (AREA)
  • Architecture (AREA)
  • Computer Hardware Design (AREA)
  • Data Mining & Analysis (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses an online material replacement method, which mainly comprises the steps of carrying out offline baking simplification on an original 3D model by applying a baking technology; constructing a corresponding relation between a model component and a material; constructing a material library for material replacement; loading the analyzed and baked model file on a browser end, selecting a part of the model, and then selecting a material to be replaced from a material library; stretching, scaling, translating and other UV operations are performed on the replaced material. The method can complete real-time material replacement of the 3D model on line, constructs an on-line material replacement tool, can be loaded through a browser, does not need any 3D modeling software, and can be accessed through a URL.

Description

Online material replacing method
Technical Field
The invention relates to the field of graphic rendering, in particular to an online material replacement method.
Background
Over the past few decades. The field of computer graphics has been rapidly developed, and particularly, in the last two decades, the rapid development of graphics processors has resulted in various 3D applications, and network transmission technology is changing day by day.
In real life, designers mainly use modeling tools such as 3d max to build a model, and use rendering engines such as VRay to render the model offline.
In order to realize the method for online material replacement of the model, the utilized background technology comprises the following steps:
(1) the real-time rendering technology comprises the following steps: the real-time rendering principle is different from the offline rendering principle, and the material system adopted is also different, for example, the offline rendering material VRayMtl uses parameters such as dispersion, reflection, and gloss, while the rendering parameters used by the PBR metallic/rough workflow, which is widely accepted in industry, are parameters such as baseColor, roughens, metallic, and special.
(2) Baking technology: the method comprises the steps of baking illumination information received by an object to a fixed position in advance, skipping limitation of material parameters received during real-time rendering, calculating a final result in advance, and storing the result in a baking chartlet, so that data are directly read from the baking chartlet for direct display during real-time rendering. The baking method has the defects that the cost is high, the time is very long, the generated baking map is limited by the scene illumination condition and the position of an object, and once the scene light, the direction or the intensity, the position of the object move or the object rotates or the material property is edited, the baking map needs to be baked again to show the rendering result with physical significance after the change.
(3) Cloud storage technology: the traditional storage system does not adopt a distributed file system, and all access pressure cannot be evenly distributed to a plurality of storage nodes, so that an obvious transmission bottleneck exists between the storage system and a computing system, and various subsequent problems such as single-point failure and the like are caused. The cloud storage improves the storage efficiency, waste of storage space is solved through a virtualization technology, data can be automatically redistributed, the utilization rate of the storage space is improved, and meanwhile the cloud storage has the functions of load balancing and fault redundancy. In addition, the cloud storage can realize scale effect and elastic expansion, reduce operation cost and avoid resource waste, and moreover, the loading speed of the cloud storage file is effectively improved by virtue of rapid development of network transmission.
Disclosure of Invention
The invention aims to overcome the defects in the prior art and provide an online material replacement method.
The purpose of the invention is achieved by the following technical scheme: the on-line material replacing method mainly comprises the following steps:
1) performing offline baking simplification on the original 3D model by applying a baking technology;
2) constructing a corresponding relation between a model component and a material;
3) constructing a material library for material replacement, and classifying the materials by combining the texture, the attribute and the practical application of the materials during construction;
4) loading and analyzing the baked model file at a browser end, selecting a part of the model, then selecting a material to be replaced in a material library, changing the part corresponding to the model into a selected material effect, and editing and storing the relationship between the model and the material;
5) and stretching, zooming, translating and other UV operations are carried out on the replaced material to achieve the expected effect of a user, the UV editing of the material is corresponding to scale and multiple parameters of the material, and the variables are stored in the corresponding VRay material when the material is edited.
The sources of the materials in the material library comprise picture files, the materials of other models and RGB values of pure colors.
The offline baking simplification firstly reads a model file, then two processes are separated, wherein the first process is to simplify a triangular patch, combine vertexes and recalculate a normal direction; the second is material conversion, which bakes the material and converts Vlay material to PBR material.
The offline baking simplification converts the model from a high-precision model to a low-precision model, some illumination information of the model is preset in the offline baking simplification process, and meanwhile, some parts of the model which are fine and similar in texture are selectively combined.
Each model after offline baking simplification generates some model files and some material information, each model file represents a part of the model, in addition, the corresponding relation between the part and the material is recorded, each model file corresponds to one material information, and the model, the material and the relation data after offline baking simplification exist in a cloud.
The material information includes a baking map and material parameters.
The material library for constructing the material replacement combines the attributes and the textures of the materials, and the materials are classified in two stages so that a user can conveniently select the materials.
The relation selection of the model and the material also has a mode of directly selecting a target material in a material library and then dragging and dropping the target material to the model component.
The invention has the beneficial effects that: the method can complete the real-time material replacement of the 3D model on line, constructs an on-line material replacement tool, can be loaded through a browser, does not need any 3D modeling software, and can be accessed through a URL (uniform resource locator); interactive, having multiple interactive modes of direct selection and dragging; after the material replacement is carried out on the model in real time, the effect after the material replacement can be displayed in the browser in real time without waiting; the method is general and effective, the effect after the replacement can be displayed in the material replacement tool, and the off-line rendering can be performed in the mainstream rendering tool to display the effect after the material replacement; after the material replacement is carried out on the model, the material on the model can be edited in real time, the editing method comprises the steps of stretching, translating, zooming, rotating and the like of the material, and the operations are also effective in real time.
Drawings
FIG. 1 is a schematic flow chart of the present invention.
FIG. 2 is a diagram illustrating the classification of a material library according to the present invention.
FIG. 3 is a schematic view of the present invention showing the real-time rendering of a sofa with PBR material.
Fig. 4 is a schematic diagram illustrating the effect of replacing the material of two throw pillows in a sofa according to the present invention.
Fig. 5 is a schematic diagram illustrating the effect of editing the material of two throw pillows in a sofa according to the present invention.
Detailed Description
The invention will be described in detail below with reference to the following drawings:
as shown in the attached drawings, the on-line material replacement method mainly comprises the following steps:
1) the method has the advantages that the original 3D model is simplified by off-line baking through the baking technology, online real-time rendering effect can be improved in the baking process, the file size of the model is greatly reduced, the loading speed of the model is improved, the possibility of online material replacement and real-time rendering is provided, the baking process is improved by about several seconds, and the baking process depends on the complexity of the 3D model;
2) building model component and material correspondence relationships that are used in the selection and replacement process, as shown below,
Figure DEST_PATH_IMAGE001
3) the method comprises the steps of constructing a material library for material replacement, wherein when a user replaces the material, the user can select the material from the material library to replace the material freely, classify the material by combining the texture, the attribute, the practical application and the like of the material during construction, and use different types of materials during material replacement, for example, a sofa model uses a large amount of cloth materials during material replacement, a bookcase model uses a large amount of wood board materials during material replacement, and the material creating stage binds the material classification, so that the use and the retrieval of the material during material replacement are facilitated;
4) loading and analyzing the baked model file on a browser end, selecting a part of the model, and then selecting a material to be replaced from a material library, wherein the part corresponding to the model becomes a selected material effect, the material of the material library can be repeatedly used, and the relationship between the model and the material is edited and stored, so that the effect after the material replacement can be displayed by opening the model after the material replacement next time;
5) and stretching, zooming, translating and other UV operations are carried out on the replaced material to achieve the expected effect of a user, the UV editing of the material is corresponding to scale and multiple parameters of the material, and the variables are stored in the corresponding VRay material when the material is edited.
As shown in FIG. 2, the sources of the material in the material library include the picture file, the material of other models, and the RGB values of the pure colors. The material is derived from the existing model, the material on the model is extracted and enters the material library, so that the material can be freely applied to other models, and through the operation, the material derived from the existing model can be applied to other models, for example, a user likes a solid wood material of a table, and can be extracted and applied to chairs and stools; the material is from any local and internet pictures, and in order to facilitate the creation of the material, a set of material creation process is provided, a set of material templates are predefined, different parameters required during creation, such as diffuse reflection maps, Fresnel attributes and the like, are opened according to different templates, so that the advantage that the material can be simply created only by customizing a plurality of parameters (including pictures) is achieved, and in addition, the effect and the efficiency of material creation can be greatly improved; the material is derived from RGB values, and a pure color material can be created by simply defining the color.
The offline baking simplification comprises the steps of firstly reading a model file, then separating two processes, namely simplifying a triangular patch, combining vertexes, and recalculating a normal direction, so that the size of the model can be effectively reduced; the second is texture conversion, which bakes the textures and converts the Vray textures to PBR textures for real-time rendering in the browser. The off-line baking simplification converts a model from a high-precision model to a low-precision model, the storage size of the model can be greatly reduced in the conversion process, the model of dozens to hundreds of MB is usually only a few KB after being simplified, some illumination information on the model is preset in the off-line baking simplification process, so that the limitation of some material parameters required in real-time rendering can be ignored, the final effect is directly calculated and stored on a baking map, and meanwhile, some parts of the model, which are small and similar in texture, are selectively combined, and the combination aims to effectively improve the possibility of selecting the texture in material replacement, especially some parts, which are difficult to select, such as leaves of some plants, screws of doors and the like. Each model after offline baking simplification generates some model files and some material information, each model file represents a part of the model, in addition, the corresponding relation between the part and the material is recorded, each model file corresponds to one material information, and the model after offline baking simplification, the material and the relation data have a cloud end so as to improve the loading speed. The material information comprises a baking map and material parameters, and the baking map is used for displaying.
In the texture tool, a model is selected for loading, and the loading speed is finished instantly because the model is simplified and stored in the cloud. The loading of the model may be divided into three portions of data. The first is model data, and one model is composed of a plurality of parts; second, material data, including baking maps and PBR materials, etc. displayed in the tool; and thirdly, the relation between the model part and the material.
The material library for material replacement is constructed by combining the attributes and the textures of the materials, and the materials are classified in two stages so that a user can conveniently select the materials, wherein the first stage is wood, cloth, metal, leather, stone and the like, and the second stage is subclasses below the first stage, such as logs, pure colored wood, baked wood and the like below the wood. The material can be classified when being created, for example, the material is classified under solid wood or paint, and the classification can be edited again after being created.
The relation selection of the model and the material also has a mode of directly selecting a target material in a material library and then dragging and dropping the target material to the model component.
In fig. 5, the same material is applied to the left two pillows, and then the pattern on the right pillow is stretched by a factor of 3.7, while the left side is maintained in the original ratio.
It should be understood that equivalent substitutions and changes to the technical solution and the inventive concept of the present invention should be made by those skilled in the art to the protection scope of the appended claims.

Claims (8)

1. An on-line material replacement method is characterized in that: the method mainly comprises the following steps:
1) performing offline baking simplification on the original 3D model by applying a baking technology;
2) constructing a corresponding relation between a model component and a material;
3) constructing a material library for material replacement, and classifying the materials by combining the texture, the attribute and the practical application of the materials during construction;
4) loading and analyzing the baked model file at a browser end, selecting a part of the model, then selecting a material to be replaced in a material library, changing the part corresponding to the model into a selected material effect, and editing and storing the relationship between the model and the material;
5) and stretching, zooming, translating and other UV operations are carried out on the replaced material to achieve the expected effect of a user, the UV editing of the material is corresponding to scale and multiple parameters of the material, and the variables are stored in the corresponding VRay material when the material is edited.
2. The on-line material replacement method according to claim 1, wherein: the sources of the materials in the material library comprise picture files, the materials of other models and RGB values of pure colors.
3. The on-line material replacement method according to claim 1, wherein: the offline baking simplification firstly reads a model file, then two processes are separated, wherein the first process is to simplify a triangular patch, combine vertexes and recalculate a normal direction; the second is material conversion, which bakes the material and converts Vlay material to PBR material.
4. The on-line material replacement method according to claim 1 or 3, wherein: the offline baking simplification converts the model from a high-precision model to a low-precision model, some illumination information of the model is preset in the offline baking simplification process, and meanwhile, some parts of the model which are fine and similar in texture are selectively combined.
5. The on-line material replacement method according to claim 4, wherein: each model after offline baking simplification generates some model files and some material information, each model file represents a part of the model, in addition, the corresponding relation between the part and the material is recorded, each model file corresponds to one material information, and the model, the material and the relation data after offline baking simplification exist in a cloud.
6. The on-line material replacement method according to claim 5, wherein: the material information includes a baking map and material parameters.
7. The on-line material replacement method according to claim 1, wherein: the material library for constructing the material replacement combines the attributes and the textures of the materials, and the materials are classified in two stages so that a user can conveniently select the materials.
8. The on-line material replacement method according to claim 1, wherein: the relation selection of the model and the material also has a mode of directly selecting a target material in a material library and then dragging and dropping the target material to the model component.
CN202010680654.9A 2020-07-15 2020-07-15 Online material replacing method Pending CN111563968A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010680654.9A CN111563968A (en) 2020-07-15 2020-07-15 Online material replacing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010680654.9A CN111563968A (en) 2020-07-15 2020-07-15 Online material replacing method

Publications (1)

Publication Number Publication Date
CN111563968A true CN111563968A (en) 2020-08-21

Family

ID=72072785

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010680654.9A Pending CN111563968A (en) 2020-07-15 2020-07-15 Online material replacing method

Country Status (1)

Country Link
CN (1) CN111563968A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113626902A (en) * 2021-08-18 2021-11-09 杭州群核信息技术有限公司 Material modeling system based on PBR material

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107590862A (en) * 2017-09-14 2018-01-16 深圳市彬讯科技有限公司 A kind of system for orienting Fast rendering threedimensional model
CN107680153A (en) * 2017-09-14 2018-02-09 深圳市彬讯科技有限公司 It is a kind of that drawing method is rendered based on threedimensional model replacement appointed part material
CN111275802A (en) * 2020-01-19 2020-06-12 杭州群核信息技术有限公司 VRAY-based PBR material rendering method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107590862A (en) * 2017-09-14 2018-01-16 深圳市彬讯科技有限公司 A kind of system for orienting Fast rendering threedimensional model
CN107680153A (en) * 2017-09-14 2018-02-09 深圳市彬讯科技有限公司 It is a kind of that drawing method is rendered based on threedimensional model replacement appointed part material
CN111275802A (en) * 2020-01-19 2020-06-12 杭州群核信息技术有限公司 VRAY-based PBR material rendering method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
郭亚红等: "一种基于OpenGL Performer的实时纹理替换方法", 《电脑知识与技术(学术交流)》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113626902A (en) * 2021-08-18 2021-11-09 杭州群核信息技术有限公司 Material modeling system based on PBR material
CN113626902B (en) * 2021-08-18 2024-02-20 杭州群核信息技术有限公司 Material modeling system based on PBR material

Similar Documents

Publication Publication Date Title
US6570578B1 (en) System for automatic generation of selective partial renderings of complex scenes
US9240073B2 (en) File format for representing a scene
US10372308B2 (en) Predictive material editor
US7836086B2 (en) Layering and referencing of scene description
US8584084B2 (en) System for library content creation
CN107103638A (en) A kind of Fast rendering method of virtual scene and model
US20060209067A1 (en) Hybrid hardware-accelerated relighting system for computer cinematography
US5710878A (en) Method for facilitating material application for a group of objects of a computer graphic
KR100503789B1 (en) A rendering system, rendering method, and recording medium therefor
CN101124582A (en) Automated derivative view rendering system
US10394221B2 (en) 3D printing using 3D video data
US11282292B2 (en) Method based on unique metadata for making direct modifications to 2D, 3D digital image formats quickly and rendering the changes on AR/VR and mixed reality platforms in real-time
Gershbein et al. A fast relighting engine for interactive cinematic lighting design
Kim et al. Dynamic deep octree for high‐resolution volumetric painting in virtual reality
Fu et al. Interactive design and preview of colored snapshots of indoor scenes
CN111563968A (en) Online material replacing method
Zhang et al. When a tree model meets texture baking: an approach for quality-preserving lightweight visualization in virtual 3D scene construction
CN104050693B (en) Programmed segmentation of scenes
Chang et al. Texture tiling on 3d models using automatic polycube-maps and wang tiles
Moioli Introducing Blender 3.0
US7474928B2 (en) Hybrid vector/raster based paint
CN113626902A (en) Material modeling system based on PBR material
Ohkawara et al. Illumination-aware digital image compositing for full-length human figures
Ribelles et al. Buildup: interactive creation of urban scenes from large photo collections
O'Connor Mastering mental ray: Rendering Techniques for 3D and CAD Professionals

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200821