CN104794316A - Method for disassembling and combining 3D models - Google Patents

Method for disassembling and combining 3D models Download PDF

Info

Publication number
CN104794316A
CN104794316A CN201510258254.8A CN201510258254A CN104794316A CN 104794316 A CN104794316 A CN 104794316A CN 201510258254 A CN201510258254 A CN 201510258254A CN 104794316 A CN104794316 A CN 104794316A
Authority
CN
China
Prior art keywords
model
numbering
module
combination
sub
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
CN201510258254.8A
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.)
Fuzhou University
Original Assignee
Fuzhou University
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 Fuzhou University filed Critical Fuzhou University
Priority to CN201510258254.8A priority Critical patent/CN104794316A/en
Publication of CN104794316A publication Critical patent/CN104794316A/en
Pending legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention relates to a method for disassembling and combining 3D models. The method comprises the following steps: firstly, introducing the 3D models into a virtual reality scene; recording main number IDs of the introduced 3D models, wherein the established 3D models have ID numbers with attributes of selves, and each sub-model has an independent sub-number ID; at the same time recording secondary number IDs of sub-modules adjacent to each sub-module on each sub-module; disassembling and moving any module of the 3D model to any position; after being disassembled, updating the secondary number IDs of the sub-modules adjacent to each sub-module in real time; recording layer by layer, and moving and combining module groups which are arranged randomly by using a mouse; and in the moving and combination process, firstly performing collision detection so as to detect whether the a module collides a specific sub-module or not, if collision happens, integrally combining the two collided modules so as to form a new module, at the same time updating the secondary number ID of the new module, subsequently by taking the new module as a whole, achieving collision and combination with other modules, and finally achieving disassembling and intelligent combination of the 3D model.

Description

A kind of 3D model splits the method with combination
Technical field
The present invention relates to the operation of the virtual reality scenario 3D model that is applicable to (to be particularly directed to field of play) in field of human-computer interaction and control flexibly, being specifically related to a kind of 3D model and splitting the method with combination.
Background technology
Along with further investigation and the application of virtual reality technology, further developing of three-dimensional visualization display technique and human-computer interaction technology, various 3D model can import in dotted line reality scene by people, and render model true to nature by Rendering.In game, in design of Simulation, on the basis of human-computer interaction technology, need to carry out necessary fractionation and combination to the 3D model in virtual scene, to strengthen the sense of reality of man-machine interaction, excitement and feeling of freshness.By the combination operation to the fractionation of 3D model and comparatively intelligence, can give and to play and the design structure of 3D model bring convenience the shortening with fabrication cycle.To be split by man-machine interaction at present and to combine 3D Model Identification efficiency lower, calculation of complex, poor real, intelligent not.
Summary of the invention
A kind of 3D model is the object of the present invention is to provide to split the method with combination.
For achieving the above object, technical scheme of the present invention is: a kind of 3D model splits the method with combination, comprises the steps,
Step S1: import 3D model: import each 3D model in virtual reality scenario, each 3D model has respective mother numbering ID, and each submodule corresponding to each 3D model has respective son numbering ID;
Step S2: split 3D model: split each 3D model by mouse, in split process, each submodule record mother numbering ID of 3D model and the son numbering ID of all submodules adjacent with it belonging to it, and distribute in the numbering ID store list of each submodule stored in one;
Step S3: collision detection: carry out collision detection to be combined two submodules, collides successfully if judge, then performs step S4; Otherwise, repeat step S3;
Step S4: combination 3D model: two submodules of collision are according to the numbering ID stored in the numbering ID store list of self, judge whether the submodule collided with it is submodule adjacent with it, if, then two sub-block combiner become a new module, upgrade the son numbering ID of new module simultaneously, continue to combine next time; If not, then two submodules do not combine.
In embodiments of the present invention, in described step S1, described 3D model adopts 3ds Max software to build, and the importing of described 3D model adopts third party to increase income storehouse Assimp.
In embodiments of the present invention, described step S1 also needs to be played up 3D model by OpenGL after importing 3D model.
In embodiments of the present invention, the collision detection of described step S3 adopts enclosure body strategy collision checking method.
Compared to prior art, the present invention has following beneficial effect: this method by importing the method for 3D model in virtual scene, and to increase income storehouse analytic model form with Assimp, by OpenGL, it is played up, to the 3D model construction initialization numbering ID list under original state, each module is made to maintain the female numbering ID and all submodule numbering ID adjacent with it of record, utilize the Collision Detection of enclosure body strategy, accelerate collision detection speed, module stores list is utilized to realize the combination of adjacent block, by the present invention and method, realize a kind of 3D model to split and combination, reduce the complicacy of calculating, real-time is stronger, block combiner judges that speed is fast, automatically can identify and adjacent module is combined, there is stronger operability and practicality.
Accompanying drawing explanation
Fig. 1 is the inventive method process flow diagram.
Embodiment
Below in conjunction with accompanying drawing, technical scheme of the present invention is specifically described.
As shown in Figure 1, a kind of 3D model of the present invention splits the method with combination, comprises the steps,
Step S1: import 3D model: import each 3D model in virtual reality scenario, each 3D model has respective mother numbering ID, and each submodule corresponding to each 3D model has respective son numbering ID; Described 3D model adopts 3ds Max software to build, and the importing of described 3D model adopts third party to increase income storehouse Assimp; After importing 3D model, also need to be played up 3D model by OpenGL;
Step S2: split 3D model: split each 3D model by mouse, in split process, each submodule record mother numbering ID of 3D model and the son numbering ID of all submodules adjacent with it belonging to it, and distribute in the numbering ID store list of each submodule stored in one;
Step S3: collision detection: carry out collision detection to be combined two submodules, collides successfully if judge, then performs step S4; Otherwise, repeat step S3; Described collision detection adopts enclosure body strategy collision checking method;
Step S4: combination 3D model: two submodules of collision are according to the numbering ID stored in the numbering ID store list of self, judge whether the submodule collided with it is submodule adjacent with it, if, then two sub-block combiner become a new module, upgrade the son numbering ID of new module simultaneously, continue to combine next time; If not, then two submodules do not combine.
It is below the specific embodiments of the inventive method.
First 3D model imports in virtual reality scenario by this method, all has No. ID of oneself attribute and each submodule also has independently son numbering ID by the 3D model of 3D MAX software building.The mother numbering ID of record 3D model after importing, each submodule also records the son numbering ID of each module adjacent with it simultaneously.The operational blocks which partition system of model can be split by mouse and move to optional position, the son numbering ID of the module that each submodule real-time update is adjacent with it after splitting, by that analogy, record layer by layer.There is unique identiflication number in each module group.Pass through mouse, combination is moved to the module group of placing arbitrarily, in the process of mobile combination, is first collided by the submodule whether collision detection is concrete with certain, if collided, collide two block combiner are integrated, form new module, upgrade the son numbering ID of new module, afterwards by new module integrally simultaneously, realize combining with the collision of other modules, in like manner by that analogy, final realization is to the fractionation of 3D model and intelligences combination, and specific implementation step is as follows:
(1) 3D model is imported
Concrete steps comprise: 3D model adopts the model of 3ds Max software building, use the third party storehouse Assimp (Open Asset Import Library) that increases income to import model file, finally utilize three-dimensional picture developing instrument OpenGL to play up 3D model.
1. 3D Studio MAX is that a very outstanding three-dimensional model builds software, and the advantage of OpenGL is not set up three-dimensional model, does not provide the high-level command of setting up three-dimensional model yet.Three-dimensional model then very simple is set up compared to OpenGL, 3D Studio MAX.3DS model has oneself data structure, can be stored therein by three-dimensional model information, and convenient importing is extracted with data.
2. 3DS file structure is made up of block, in main block, contain again respective sub-block.Block is a region with hierarchical structure, and 3DS file has main piece of one No. ID, represents the beginning of 3DS file, also has No. ID of each submodule.To increase income storehouse analytic model form with Assimp, model data is imported, completes the foundation of virtual environment 3D model framework.
3. the 3D model imported by Assimp only has the framework of model usually, does not have concrete model vivid effect, needs to be played up it by OpenGL, makes it have better effect.
(2) the female numbering ID of record and son numbering ID
When initialization imports 3D model, each 3D model has unique numbering ID, in order to distinguish other 3D models.With Assimp increase income storehouse read 3D model time, the numbering ID of each submodule can also be read.Distribute numbering ID store list, for storing the numbering ID of all modules adjacent with concrete submodule to during initialization each submodule.
(3) mouse splits 3D model
Utilize mouse ray to pick up method, mouse can be realized the pickup of concrete module is split.In the process split, each submodule still records the numbering ID of each module adjacent with oneself.As when after fractionation first module, the numbering ID of each module that the individual module record of fractionation is adjacent with it, remaining part records the numbering ID of each module adjacent with it equally.
(4) the female numbering ID and adjacent submodule numbering ID of submodule record
In the process split, in order to characterize the concrete attaching problem of this concrete submodule, needing to embody female numbering ID in the ID list of each module, also namely belonging to which concrete 3D model, follow-up combination will avoid occurring that module such as not to mate at the problem.
(5) collision detection
Before carrying out block combiner, first need to judge whether collide between two modules to be combined, the module of only colliding just likely is combined into a new entirety.3D model is all be made up of a lot of data, triangle grid data is huge, travel through seriously consuming time one by one, serious reduction collision detection speed, this method also will adopt enclosure body strategy, and the spherical enclosure body of antithetical phrase module construction or box-like enclosure body, in collision detection process, change the traversal one by one of two module each data the collision detection of two enclosure bodies into, thus greatly reduce calculated amount.The collision detection of enclosure body, is included in inside enclosure body by forming all data points of submodule, judges whether collision by the position relationship of spherical enclosure body central point, radius or box-like enclosure body center, radius.
(6) intelligences combination submodule
Utilize enclosure body strategy collision checking method, when mouse mover module combines, after judging to collide successfully, two submodules of collision all can according to the numbering ID list of oneself, each No. ID is compared one by one with No. D, the module I of collision, if the module numbering ID collided with it is in the numbering ID list of correspondence, be then exactly originally adjacent module both proving, a new entirety can be combined into; If the module numbering ID collided with it is not in the numbering ID list of correspondence, be then not just adjacent module originally both proving, both can not be combined into a new entirety, do not combine automatically repelling.
Be more than preferred embodiment of the present invention, all changes done according to technical solution of the present invention, when the function produced does not exceed the scope of technical solution of the present invention, all belong to protection scope of the present invention.

Claims (4)

1. 3D model splits the method with combination, it is characterized in that: comprise the steps,
Step S1: import 3D model: import each 3D model in virtual reality scenario, each 3D model has respective mother numbering ID, and each submodule corresponding to each 3D model has respective son numbering ID;
Step S2: split 3D model: split each 3D model by mouse, in split process, each submodule record mother numbering ID of 3D model and the son numbering ID of all submodules adjacent with it belonging to it, and distribute in the numbering ID store list of each submodule stored in one;
Step S3: collision detection: carry out collision detection to be combined two submodules, collides successfully if judge, then performs step S4; Otherwise, repeat step S3;
Step S4: combination 3D model: two submodules of collision are according to the numbering ID stored in the numbering ID store list of self, judge whether the submodule collided with it is submodule adjacent with it, if, then two sub-block combiner become a new module, upgrade the son numbering ID of new module simultaneously, continue to combine next time; If not, then two submodules do not combine.
2. a kind of 3D model according to claim 1 splits the method with combination, it is characterized in that: in described step S1, and described 3D model adopts 3ds Max software to build, and the importing of described 3D model adopts third party to increase income storehouse Assimp.
3. a kind of 3D model according to claim 1 splits the method with combination, it is characterized in that: described step S1 also needs to be played up 3D model by OpenGL after importing 3D model.
4. a kind of 3D model according to claim 1 splits the method with combination, it is characterized in that: the collision detection of described step S3 adopts enclosure body strategy collision checking method.
CN201510258254.8A 2015-05-20 2015-05-20 Method for disassembling and combining 3D models Pending CN104794316A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510258254.8A CN104794316A (en) 2015-05-20 2015-05-20 Method for disassembling and combining 3D models

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510258254.8A CN104794316A (en) 2015-05-20 2015-05-20 Method for disassembling and combining 3D models

Publications (1)

Publication Number Publication Date
CN104794316A true CN104794316A (en) 2015-07-22

Family

ID=53559107

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510258254.8A Pending CN104794316A (en) 2015-05-20 2015-05-20 Method for disassembling and combining 3D models

Country Status (1)

Country Link
CN (1) CN104794316A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106228851A (en) * 2016-08-30 2016-12-14 刘锦宏 A kind of automobile detachable virtual reality Training Methodology
CN106600688A (en) * 2016-12-12 2017-04-26 合肥华耀广告传媒有限公司 Virtual reality system based on three-dimensional modeling technology
CN108305329A (en) * 2017-12-28 2018-07-20 深圳市创梦天地科技股份有限公司 A kind of method and terminal of structure model
CN112835621A (en) * 2021-01-13 2021-05-25 西安飞蝶虚拟现实科技有限公司 Cross-platform virtual reality resource processing method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060092156A1 (en) * 2003-01-16 2006-05-04 1914 Holding Company Method and system for converting engineering data into 3D modeling data
CN103679792A (en) * 2013-12-24 2014-03-26 Tcl集团股份有限公司 Rendering method and system for three-dimensional models
CN103885788A (en) * 2014-04-14 2014-06-25 焦点科技股份有限公司 Dynamic WEB 3D virtual reality scene construction method and system based on model componentization

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060092156A1 (en) * 2003-01-16 2006-05-04 1914 Holding Company Method and system for converting engineering data into 3D modeling data
CN103679792A (en) * 2013-12-24 2014-03-26 Tcl集团股份有限公司 Rendering method and system for three-dimensional models
CN103885788A (en) * 2014-04-14 2014-06-25 焦点科技股份有限公司 Dynamic WEB 3D virtual reality scene construction method and system based on model componentization

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
何广鹏: "3D游戏实时图形渲染框架的设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
博客园: "opengl教程(22)用开源库装入模型", 《URL:HTTP://WWW.CNBLOGS.COM/MIKEWOLF2002/ARCHIVE/2013/01/27/2879067.HTML》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106228851A (en) * 2016-08-30 2016-12-14 刘锦宏 A kind of automobile detachable virtual reality Training Methodology
CN106600688A (en) * 2016-12-12 2017-04-26 合肥华耀广告传媒有限公司 Virtual reality system based on three-dimensional modeling technology
CN108305329A (en) * 2017-12-28 2018-07-20 深圳市创梦天地科技股份有限公司 A kind of method and terminal of structure model
CN108305329B (en) * 2017-12-28 2022-02-22 深圳市创梦天地科技有限公司 Model building method and terminal
CN112835621A (en) * 2021-01-13 2021-05-25 西安飞蝶虚拟现实科技有限公司 Cross-platform virtual reality resource processing method and system
CN112835621B (en) * 2021-01-13 2024-04-02 西安飞蝶虚拟现实科技有限公司 Cross-platform virtual reality resource processing method and processing system

Similar Documents

Publication Publication Date Title
CN107844635B (en) System for realizing BIM information and traffic simulation information integration and integration method thereof
CN102609991B (en) Volume-reduction optimization method for three-dimensional solid model
CN104794316A (en) Method for disassembling and combining 3D models
CN102426424B (en) Visual emulation method of near-space flying vehicle based on distributed framework
CN106846442A (en) Three-dimensional crowd's scene generating method based on Unity3D
CN108630053A (en) A kind of three-dimensional animation assembly teaching method and device based on virtual reality technology
CN103236088B (en) Three-dimensional geological structure modeling method and system based on composite grid
CN104966320B (en) A kind of pattern-painting automatic generation method based on three rank Bezier curves
CN104599319B (en) A kind of Real-time Generation of 3D scenes
CN103281480B (en) Background video system of stage
CN107832558A (en) Digital stage intention scene intelligent generation method
CN112632683A (en) Digital twin city space positioning method and device based on illusion engine and storage medium
CN109710357A (en) A kind of method and system based on Unity3D engine implementation server operation
CN104658033A (en) Method and device for global illumination rendering under multiple light sources
CN102521860A (en) Skeletal animation implementation method
CN109472104A (en) A kind of 500KV substation VR Construction simulation method and device
CN105957149A (en) Urban three-dimensional model data preprocessing method suitable for high-efficiency rendering
CN107134004A (en) A kind of method and device that spheroid motion is simulated in Flash animations
CN105183624B (en) A kind of emulation back method based on Data Matching
CN107918665A (en) A kind of system and method for Fast rendering and the CAD information inquiry of threedimensional model
CN104834552B (en) A kind of driving simulator obtains the quick interception engine of traffic environment information
CN107515966A (en) A kind of radar simulator system layering construction method based on DDS
CN102411792A (en) Multilevel dynamic loading-unloading method for virtual simulation scene
Hu et al. A rapid development method of virtual assembly experiments based on 3d game engine
CN106021750A (en) Generation method and generation system for simulation scene and reconstruction unit thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate 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: 20150722