CN104537715B - Method for automatically converting FBX three-dimensional model into OBJ three-dimensional model - Google Patents

Method for automatically converting FBX three-dimensional model into OBJ three-dimensional model Download PDF

Info

Publication number
CN104537715B
CN104537715B CN201510010818.6A CN201510010818A CN104537715B CN 104537715 B CN104537715 B CN 104537715B CN 201510010818 A CN201510010818 A CN 201510010818A CN 104537715 B CN104537715 B CN 104537715B
Authority
CN
China
Prior art keywords
fbx
threedimensional model
obj
geological information
information
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.)
Active
Application number
CN201510010818.6A
Other languages
Chinese (zh)
Other versions
CN104537715A (en
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.)
PowerChina Kunming Engineering Corp Ltd
Original Assignee
PowerChina Kunming Engineering Corp 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 PowerChina Kunming Engineering Corp Ltd filed Critical PowerChina Kunming Engineering Corp Ltd
Priority to CN201510010818.6A priority Critical patent/CN104537715B/en
Publication of CN104537715A publication Critical patent/CN104537715A/en
Application granted granted Critical
Publication of CN104537715B publication Critical patent/CN104537715B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/30Circuit design
    • G06F30/36Circuit design at the analogue level
    • G06F30/367Design verification, e.g. using simulation, simulation program with integrated circuit emphasis [SPICE], direct methods or relaxation methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a method for automatically converting an FBX three-dimensional model into an OBJ three-dimensional model, and belongs to the technical field of engineering design. The method comprises the following steps: and 5 steps of data acquisition, geometric information set processing, material information processing, OBJ format output and material library file output. The method is quick and easy to use, a user can add FBX three-dimensional model data through the window to automatically complete the conversion of geometric information and texture information, the automatic conversion of the FBX three-dimensional model is realized, the three-dimensional design result can be completed at one time and can be used for multiple times, and the application is wider.

Description

A method of realizing that FBX threedimensional model is automatically converted to OBJ threedimensional model
Technical field
The invention belongs to engineering design technology fields, and in particular to a kind of for designing AutoDESK series platform The method that FBX threedimensional model is automatically converted to OBJ threedimensional model.
Background technique
AutoDESK series platform has become three dimensional design tool popular in the world now, is widely used in making The industries such as industry, engineering construction industry and medium show business are made, every profession and trade user is helped to carry out Design of three-dimensional visualization.
But after user completes Design of three-dimensional visualization, threedimensional model cannot be used directly in other platforms, especially It is that can not be introduced directly into GIS platform to use, even if there is division format to support conversion, but modelling effect after conversion Also it has a greatly reduced quality, and manually to be converted, thus hinder recycling of the three dimensional design achievement in different platform, Working efficiency is reduced, design cost is increased.Therefore how overcome the deficiencies in the prior art is current engineering design technology neck The problem of domain urgent need to resolve.
Summary of the invention
In view of the deficiencies in the prior art, the present invention intends to provide a kind of realization FBX threedimensional model to be automatically converted to OBJ tri- The method of dimension module.
To achieve the goals above, The technical solution adopted by the invention is as follows:
A method of realizing that FBX threedimensional model is automatically converted to OBJ threedimensional model, comprising the following steps:
Step (1) obtains data: load FBX SDK dynamic link library parses and obtains the several of FBX threedimensional model file What information, material information and index, the geological information includes at least one geological information collection;
Step (2), geological information collection processing: to the geological information collection elder generation for the FBX threedimensional model file that step (1) is got It is handled, including trigonometric ratio processing and Conversion of measurement unit is carried out to FBX three-dimensional model geometric information collection;
Step (3), material information processing: at the material information of the FBX threedimensional model file got to step (1) Reason, including material processing and stick picture disposing;
The described material processing refers to the common material information for only retaining FBX threedimensional model, do not retain FBX threedimensional model with The relevant material information of hardware;
When the stick picture disposing refers to acquisition textures, due to the textures of FBX model supports dds format, but after conversion OBJ threedimensional model does not support dds format textures, so the textures by dds format is needed to be converted to the textures of BMP format;
Step (4) output of OBJ format: will handle obtained geological information collection by OBJ threedimensional model file through step (2) Format organization, and be written in obj file, if be sequentially output comprising multiple geological information collection by parsing sequence;
Step (5) output of material library file: will handle obtained material information according to material library file through step (3) Call format output.
It is further preferred that geological information described in step (1) includes vertex, normal and UV coordinate.
It is further preferred that material information described in step (1) includes material and textures.
It is further preferred that index described in step (1) refers to the corresponding relationship of geological information and material information.
It is further preferred that the processing of geological information collection described in step (2) includes the processing on vertex and the processing of normal.
It is further preferred that opposite vertexes and normal are intended to do reference axis when geological information collection described in step (2) is handled Conversion process.
It is further preferred that the processing of vertex described in step (2) is the geometric transformation matrix for directly reading geological information With global transformation matrix, opposite vertexes are coordinately transformed, and obtain the apex coordinate value under global coordinate system.
It is further preferred that the processing of normal described in step (2) is that vertex normal direction is converted to global normal side To.
It is further preferred that Conversion of measurement unit described in step (2) is to be converted to FBX threedimensional model default units inch m。
It is further preferred that the geological information output sequence that each geological information is concentrated presses step when step (4) exports (1) the index output obtained.
It is further preferred that when step (5) exports, it is necessary first to remove duplicate material according to material name, then again Material is exported by Materials Library file format;Textures are copied to again in the textures file where OBJ threedimensional model catalogue, together When textures path is revised as relative path.
Compared with prior art, the present invention has the advantages that:
(1) quick easy-to-use, user can add FBX three-dimensional modeling data by window, be automatically performed geological information and texture The conversion of information;
(2) automatic conversion for realizing FBX threedimensional model enables three dimensional design achievement once to complete, and repeatedly utilizes, It is more widely applied.
Detailed description of the invention
Fig. 1 is that FBX threedimensional model is converted to OBJ threedimensional model technical solution flow chart;
Fig. 2 is FBX file basic organizational structure figure.
Specific embodiment
Below with reference to embodiment, the present invention is described in further detail.
It will be understood to those of skill in the art that the following example is merely to illustrate the present invention, and it should not be regarded as limiting this hair Bright range.In the examples where no specific technique or condition is specified, described technology or conditions according to the literature in the art Or it is carried out according to product description.Reagents or instruments used without specified manufacturer is that can be obtained by purchase Conventional products.
It should be noted that the following files structure:
FBX file structure: FBX format is the three-dimensional data exchange format under AutoDESK house flag, and FBX format is not opened Source, by AutoDESK company provide the SDK based on developing instruments such as C++, come realize the read-write to FBX threedimensional model, modification with And the operation such as conversion.FBX format is all information for carrying out storage model with the structure of Scene Graph/Tree, elementary organization Structure is as shown in Figure 2.
Obj file structure: obj file is Alias | Wavefront company is its a set of 3D modeling based on work station With a kind of standard 3D model file format of animation software exploitation.Its file format structure is simple, supports almost all of three-dimensional Modeling software.Obj file stores vertex, normal and the texture coordinate and material use information of model in the form of plain text.
As shown in Figure 1, the present invention is a kind of method realized FBX threedimensional model and be automatically converted to OBJ threedimensional model, it is described Method mainly comprises the steps that
Step (1) loads FBX SDK dynamic link library, parses and obtain the geological information of FBX threedimensional model file, material Matter information and index, the geological information include at least one geological information collection;
The geological information includes vertex, normal and UV coordinate.The material information includes material and textures.It is described Index refer to the corresponding relationship of geological information and material information.
Step (2), geological information collection processing: to the geological information collection elder generation for the FBX threedimensional model file that step (1) is got It is handled, including trigonometric ratio processing and Conversion of measurement unit is carried out to FBX three-dimensional model geometric information collection;
The geological information collection processing includes the processing on vertex and the processing of normal.
Wherein: first, the processing on vertex: directly reading the geometric transformation matrix and global transformation matrix of geological information, right Vertex is coordinately transformed, and obtains the apex coordinate value under global coordinate system.
It should be noted that since FBX is Y-up right-handed coordinate system, it is also necessary to which opposite vertexes carry out reference axis conversion;
Second, vertex normal direction the processing of normal: is converted into global normal direction.If calculated without normal Normal;
It should be noted that since FBX is Y-up right-handed coordinate system, it is also necessary to carry out reference axis conversion to normal;
Third, Conversion of measurement unit are that FBX threedimensional model default units inch is converted to m.
Step (3), material information processing: at the material information of the FBX threedimensional model file got to step (1) Reason, including material processing and stick picture disposing;
Wherein: first, material processing: only retains the common material information of FBX threedimensional model, do not retain FBX threedimensional model Hardware-related material information;
Second, stick picture disposing: the OBJ tri- when obtaining textures, due to the textures of FBX model supports dds format, but after converting Dimension module does not support dds format textures, so the textures by dds format is needed to be converted to the textures of BMP format;
Step (4) output of OBJ format: will handle obtained geological information collection by OBJ threedimensional model file through step (2) Format organization, and be written in obj file, if be sequentially output comprising multiple geological information collection by parsing sequence;It is each several The geological information output sequence what information is concentrated presses the index output of step (1) acquisition;
Step (5) will handle obtained material information through step (3) and be exported according to the call format of material library file, i.e., It can.
It should be noted that from FBX obtaining three-dimensional model to material information may have many repetitions, need first herein Carry out duplicate removal processing.After removing duplicate material information by material name, so that it may be exported by the format of material library file Material;Textures copy in the textures file where OBJ threedimensional model catalogue, while opposite road is revised as in textures path Diameter.
The basic principles, main features and advantages of the present invention have been shown and described above.The technology of the industry Personnel are it should be appreciated that the present invention is not limited to the above embodiments, and the above embodiments and description only describe this The principle of invention, without departing from the spirit and scope of the present invention, various changes and improvements may be made to the invention, these changes Change and improvement all fall within the protetion scope of the claimed invention.The claimed scope of the invention by appended claims and its Equivalent thereof.

Claims (6)

1. a kind of method realized FBX threedimensional model and be automatically converted to OBJ threedimensional model, which comprises the following steps:
Step (1) obtains data: load FBX SDK dynamic link library, parses and obtain the geometry letter of FBX threedimensional model file Breath, material information and index, the geological information include at least one geological information collection;
Step (2) processing of geological information collection: first carries out the geological information collection for the FBX threedimensional model file that step (1) is got Processing, including trigonometric ratio processing and Conversion of measurement unit are carried out to FBX three-dimensional model geometric information collection;The geological information Ji Chu When reason, opposite vertexes and normal are intended to do reference axis conversion process;The vertex processing is the geometry for directly reading geological information Transition matrix and global transformation matrix, opposite vertexes are coordinately transformed, and obtain the apex coordinate value under global coordinate system;At normal Reason is that vertex normal direction is converted to global normal direction;
Step (3), material information processing: handling the material information for the FBX threedimensional model file that step (1) is got, Including material processing and stick picture disposing;
The material processing refers to the common material information for only retaining FBX threedimensional model, does not retain FBX threedimensional model and hardware Relevant material information;
When the stick picture disposing refers to acquisition textures, the textures by dds format is needed to be converted to the textures of BMP format;
Step (4) output of OBJ format: will handle obtained geological information collection by OBJ threedimensional model file format through step (2) Tissue, and be written in obj file, if be sequentially output comprising multiple geological information collection by parsing sequence;
Step (5) output of material library file: will handle obtained material information according to the format of material library file through step (3) It is required that output;
When step (5) exports, it is necessary first to remove duplicate material according to material name, then be exported again by Materials Library file format Material;Textures are copied to again in the textures file where OBJ threedimensional model catalogue, while phase is revised as in textures path To path.
2. the method according to claim 1 realized FBX threedimensional model and be automatically converted to OBJ threedimensional model, feature exist In geological information described in step (1) includes vertex, normal and UV coordinate.
3. the method according to claim 1 realized FBX threedimensional model and be automatically converted to OBJ threedimensional model, feature exist In material information described in step (1) includes material and textures.
4. the method according to claim 1 realized FBX threedimensional model and be automatically converted to OBJ threedimensional model, feature exist In index described in step (1) refers to the corresponding relationship of geological information and material information.
5. the method according to claim 1 realized FBX threedimensional model and be automatically converted to OBJ threedimensional model, feature exist In Conversion of measurement unit described in step (2) is that FBX threedimensional model default units inch is converted to m.
6. the method according to claim 1 realized FBX threedimensional model and be automatically converted to OBJ threedimensional model, feature exist In when step (4) exports, the geological information output sequence that each geological information is concentrated presses the index output of step (1) acquisition.
CN201510010818.6A 2015-01-09 2015-01-09 Method for automatically converting FBX three-dimensional model into OBJ three-dimensional model Active CN104537715B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510010818.6A CN104537715B (en) 2015-01-09 2015-01-09 Method for automatically converting FBX three-dimensional model into OBJ three-dimensional model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510010818.6A CN104537715B (en) 2015-01-09 2015-01-09 Method for automatically converting FBX three-dimensional model into OBJ three-dimensional model

Publications (2)

Publication Number Publication Date
CN104537715A CN104537715A (en) 2015-04-22
CN104537715B true CN104537715B (en) 2018-12-04

Family

ID=52853234

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510010818.6A Active CN104537715B (en) 2015-01-09 2015-01-09 Method for automatically converting FBX three-dimensional model into OBJ three-dimensional model

Country Status (1)

Country Link
CN (1) CN104537715B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106600700B (en) * 2015-10-20 2020-01-17 星际空间(天津)科技发展有限公司 Three-dimensional model data processing system
CN106067184A (en) * 2016-05-27 2016-11-02 美屋三六五(天津)科技有限公司 A kind of threedimensional model processing method and processing device
CN107424212B (en) * 2017-07-31 2020-09-18 东风设计研究院有限公司 DGRVT file format and data integration system and method based on same
CN110021070B (en) * 2018-01-10 2023-03-31 阿里巴巴集团控股有限公司 Method, equipment and system for converting FBX three-dimensional model into glTF three-dimensional model
CN108628945B (en) * 2018-03-29 2021-10-15 成都明镜视觉科技有限公司 Method for automatically converting fbx model file into fbs model file
CN108710739B (en) * 2018-05-11 2022-04-22 北京建筑大学 Method and system for building information model lightweight and three-dimensional scene visualization
CN108959707B (en) * 2018-05-31 2022-09-20 武汉虹信技术服务有限责任公司 Unity-based BIM model texture material visualization method
CN109671156A (en) * 2018-12-27 2019-04-23 成都四方伟业软件股份有限公司 Threedimensional model loading method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103353866A (en) * 2013-05-13 2013-10-16 河南大学 Three-dimensional model file format conversion method supporting XNA technology
CN104199659A (en) * 2014-08-28 2014-12-10 无锡梵天信息技术股份有限公司 Method and device for exporting model information capable of being identified by 3DMAX

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2627093A3 (en) * 2012-02-13 2013-10-02 Thomson Licensing Method and device for inserting a 3D graphics animation in a 3D stereo content
CN103942748B (en) * 2014-05-13 2017-07-11 英华达(上海)科技有限公司 A kind of guard method of threedimensional model file and its system
CN104112017B (en) * 2014-07-21 2018-09-28 无锡梵天信息技术股份有限公司 One kind is based on implementation method derived from 3DMAX script models

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103353866A (en) * 2013-05-13 2013-10-16 河南大学 Three-dimensional model file format conversion method supporting XNA technology
CN104199659A (en) * 2014-08-28 2014-12-10 无锡梵天信息技术股份有限公司 Method and device for exporting model information capable of being identified by 3DMAX

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"基于FBX SDK的FBX模型解析与加载";丁丁当当;《http://blog.sina.com.cn/s/blog_4a657c5a01014da9.html》;20120425;第1、4、5节 *
Building Information Modeling (BIM)-based daylighting simulationand analysis;Sandeep Kota 等;《Energy and Buildings》;20141031;第81卷;391-403 *
影视制作中的多层纹理贴图与OBJ/MTL格式;吴志勇 等;《现代电影技术》;20111231(第3期);21-25,8 *

Also Published As

Publication number Publication date
CN104537715A (en) 2015-04-22

Similar Documents

Publication Publication Date Title
CN104537715B (en) Method for automatically converting FBX three-dimensional model into OBJ three-dimensional model
CN104750913B (en) Method for automatically converting DWG three-dimensional model into X three-dimensional model
CN110245368A (en) A kind of the structuring processing and storage method of BIM data
CN104035754A (en) XML (Extensible Markup Language)-based custom code generation method and generator
CN110489692B (en) WebGL instantiation-based method and system for realizing component-level operation
CN110021070B (en) Method, equipment and system for converting FBX three-dimensional model into glTF three-dimensional model
CN106844610B (en) Distributed structured three-dimensional point cloud image processing method and system
CN106709985B (en) Virtual sacrifice three-dimensional scene generation method and device
CN102129718A (en) Undistorted heterogeneous CAD model conversion method
CN108920432B (en) Method and device for converting 3D PDF file, terminal equipment and storage medium
CN103353866A (en) Three-dimensional model file format conversion method supporting XNA technology
CN108628945B (en) Method for automatically converting fbx model file into fbs model file
KR101817298B1 (en) Method for generating 3D picture
CN111695183A (en) BIM model lightweight derivation method and system
CN107229426B (en) BIM model data compression and restoration method and device
US7730388B2 (en) Converting an enhanced metafile into a chronologically independent object property list for conversion into a PDF document
Jayaram et al. Reorganizing CAD assembly models (as-designed) for manufacturing simulations and planning (as-built)
CN105335141A (en) Image processing method and apparatus
CN111199086A (en) Three-dimensional geometric discretization processing system
CN111949722A (en) BIM model lightweight method and system based on Revit
CN108257201B (en) Method for pasting two-dimensional pattern on surface of three-dimensional industrial model
EP2715564B1 (en) Mesh sequence file format
Liu et al. A convenient part library based on SolidWorks platform
Ebeling et al. OSLC based approach for product appearance structuring
CN113434919A (en) Geometric model reconstruction method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant