CN104036547B - Method and device for three-dimensional brush to generate network module in real time based on Leap Motion control - Google Patents

Method and device for three-dimensional brush to generate network module in real time based on Leap Motion control Download PDF

Info

Publication number
CN104036547B
CN104036547B CN201410306480.4A CN201410306480A CN104036547B CN 104036547 B CN104036547 B CN 104036547B CN 201410306480 A CN201410306480 A CN 201410306480A CN 104036547 B CN104036547 B CN 104036547B
Authority
CN
China
Prior art keywords
brush
dimensional
data
density value
frame
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
CN201410306480.4A
Other languages
Chinese (zh)
Other versions
CN104036547A (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.)
Tsinghua University
Original Assignee
Tsinghua 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 Tsinghua University filed Critical Tsinghua University
Priority to CN201410306480.4A priority Critical patent/CN104036547B/en
Publication of CN104036547A publication Critical patent/CN104036547A/en
Application granted granted Critical
Publication of CN104036547B publication Critical patent/CN104036547B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention relates to a method and device for a three-dimensional brush to generate a network module in real time based on Leap Motion control. The method comprises the steps that the geometrical parameter of the three-dimensional brush is defined; the position of a handle of a current frame is captured as the position of the brush, and the density value and the normal vector of the vertex of a space lattice combined with the geometric parameter of the three-dimensional brush; if updating is needed, data which is newly calculated by the frame are written into current texture; current texture data are read and the lattice is generated. According to the method, volume data in the moving process of the brush are captured through the hand position captured by Leap Motion and the geometric parameter of the three-dimensional brush, the dynamic volume data are subjected to network module visualization, the real-time interaction effect is achieved through GPU acceleration methods like rendering the volume data to the texture, and the advantages of being visible and efficient are achieved. The invention further discloses a device for the three-dimensional brush to generate the network module in real time based on Leap Motion control.

Description

The method that three-dimensional brush based on Leap Motion controls generates network model in real time With device
Technical field
Leap Motion are based on the present invention relates to man-machine interaction and volume visualization technical field, more particularly to one kind The three-dimensional brush of control generates the method and apparatus of network model in real time.
Background technology
With the increase of three-dimensional content demand, D modeling tool by development for many years had it is relatively broad should With the demand to different field there has also been targetedly solution, but moulding mechanism and interaction aspect also have various deficiencies.
Existing moulding system interactive operation aspect is broadly divided into two kinds:Moulding based on parameter and based on summit Moulding.The first formative method is highly dependent on parametrization, so being highly suitable for the machinery and work of height rule and parametrization Industry production process, art field is not suitable for but, irregular because design is typically free, it is difficult to parameter Change;Second formative method free degree is higher, but modeling process is not very directly perceived and cumbersome, and user can only be by rule Then body cumbersome ground summit modification obtains oneself desired shape.
In the creation of plane, artistic creation method most rapidly and efficiently is exactly to be scribbled on planar medium using brush, Threedimensional model also should by this way create the most natural and quick, this body that also exactly main flow modeling is short of Test.More free threedimensional model creation mode is made that in research field explore to a certain degree, in order to avoid abstract Parametrization and cumbersome vertex operations, paper pen scribble also begins to be introduced in three-dimensional as people's most intuitively design and creation pattern In model creation process.Igarashi et al. proposed the algorithm based on generation threedimensional model of freely scribbling in 2007, passed through Two-dimensional silhouette is drawn on painting canvas, then corresponding three-dimensional grid is generated by the profile.Rivers et al. it is also proposed a kind of logical The rendering of 2 d vector images under different visual angles is crossed, the algorithm of rotatable three-dimensional cartoon model is obtained.These are with two-dimentional sketch Algorithm to create threedimensional model allows the creation of threedimensional model freer to a certain extent, but now all of model system System completes operation all on the input medium of two dimension, causes in three-dimensional software, in order to complete the cognition of input/output medium Correspondence, can only be corresponding by the dimension that three dimensions to two-dimensional screen is projected with 2-d input device is operated, so in a perspective Under angle, when being only possible to the operation of two dimensions most intuitively, such result is exactly will to an operation for three dimensional object Completed by continually changing the angle of form projection, or XYZ coordinate is such as intuitively shown using some visions auxiliary Axle, by the operation for clicking on the reference axis of diagram to complete correspondence dimension, so a kind of complete three-dimensional input mode could be most straight See the cognition that ground completes three-dimensional manipulating.
The content of the invention
The technical problems to be solved by the invention are in view of the shortcomings of the prior art, how to be captured by Leap Motion Hand position and the geometric parameter of three-dimensional brush catch volume data in brush moving process, and dynamic volume data is carried out into net The visual key issue of lattice model.
For this purpose, the present invention proposes a kind of three-dimensional brush based on Leap Motion controls generates grid mould in real time The method of type, including specific following steps:
S1:The geometric parameter of the three-dimensional brush of definition;
S2:Capture present frame hand position calculates space networks as brush position with reference to the three-dimensional brush geometric parameter The density value and normal vector on lattice summit, wherein, the density value is an one-dimensional floating number, and the normal vector is that a three-dimensional is floated Point vector;
S3:Judge whether the data of present frame need to update, if necessary to update, then into step S5, if need not Update and then enter step S4;
S4:The data of previous frame are write into current texture;
S5:The data that this frame is newly calculated write current texture;
S6:Read the current texture data and generate grid.
Specifically, the three-dimensional brush is a parameter brush, is moved in combination with brush by Define Brush geometric parameter Dynamic path, generates solid.
Specifically, the step S1 is further included:Geometric parameter definition is carried out to three-dimensional brush shape and Brush Size.
Specifically, using the hand position of Leap Motion equipment capture as three-dimensional brush geometry position in the step S2 Put, by mobile palm come moving three dimension brush, and calculate space lattice top under present frame brush position and brush geometric parameter The density value and normal vector of point.
Specifically, the Data Comparison in the density value and previous frame that calculate present frame in the step S3, if upper one The density value on frame space lattice summit is more than the density value of present frame, then the data by present frame in the point are stored in respective pixel, Previous frame data are directly otherwise stored in texture.
Specifically, calculate space lattice vertex density value and the mess generation stage is accelerated using GPU to algorithm.
For this purpose, generating network in real time the invention allows for a kind of three-dimensional brush based on Leap Motion controls The device of model, including:
Definition module, the geometric parameter for defining three-dimensional brush;
Trapping module, for capturing present frame hand position as brush position;
Computing module, the density value and normal direction on space lattice summit are calculated for combining the three-dimensional brush geometric parameter Amount, wherein, the density value is an one-dimensional floating number, and the normal vector is a three-dimensional floating point vector;
Whether judge module, the data for judging present frame need to update;
Writing module, the data for present frame need not update, then the data of previous frame are write into current texture, currently The data of frame need to update, then the data for newly calculating this frame write current texture;
Generation mesh module, for reading the current texture data and generating grid.
A kind of three-dimensional brush based on Leap Motion controls disclosed in this invention generates the side of grid model in real time The geometric parameter of method, the hand position captured by Leap Motion and three-dimensional brush catches the body number in brush moving process According to, and dynamic volume data is carried out into grid model visualization, real-time, interactive has been reached by the GPU accelerated methods such as render to texture Effect, have directly perceived and efficient advantage concurrently.The invention also discloses a kind of three-dimensional brush reality based on Leap Motion controls The device of Shi Shengcheng grid models.
Brief description of the drawings
The features and advantages of the present invention can be more clearly understood from by reference to accompanying drawing, accompanying drawing is schematical without that should manage Solution is to carry out any limitation to the present invention, in the accompanying drawings:
Fig. 1 shows that a kind of three-dimensional brush based on Leap Motion controls in the embodiment of the present invention generates net in real time The step of method of lattice model flow chart;
Fig. 2 shows that a kind of three-dimensional brush based on Leap Motion controls in the embodiment of the present invention generates net in real time The structure chart of the device of lattice model.
Specific embodiment
Below in conjunction with accompanying drawing, embodiments of the present invention is described in detail.
As shown in figure 1, generating grid mould in real time the invention provides a kind of three-dimensional brush based on Leap Motion controls The method of type, including specific following steps:
Step S1:The geometric parameter of the three-dimensional brush of definition.Wherein, three-dimensional brush is a parameter brush, by defining pen Brush geometric parameter generates solid in combination with brush mobile route, i.e., can be more convenient by changing the geometric parameter of brush The base shape of ground control generation solid, reaches intuitively solid generating process, and define three with reference to path is moved freely The geometric parameter for tieing up brush is to carry out geometric parameter definition to three-dimensional brush shape and Brush Size.
For example, being studied and being realized with most basic soccer star's brush in the present invention, other shapes brush can also lead to Change brush form parameter is crossed to complete.Specifically, by taking spherical brush as an example, Brush Size is spherical radius, so its is several What parameter is brush position P and brush radius R.
Step S2:Capture present frame hand position calculates space networks as brush position with reference to three-dimensional brush geometric parameter The density value and normal vector on lattice summit, will Leap Motion equipment capture hand position as three-dimensional brush geometric position, By mobile palm come moving three dimension brush, and calculate space lattice summit under present frame brush position and brush geometric parameter Density value and normal vector, wherein, density value is an one-dimensional floating number, and normal vector is a three-dimensional floating point vector.
Specifically, each summit is required for 4 floating numbers to store parameter related to volume data at the point, so should These data are stored with the texture of RGBA forms, each pixel is made up of tetra- floating numbers of R/G/B/A, the data on each summit Storage is in one pixel.
Further, in order to reach the frame per second of real-time, interactive, space lattice vertex density value and mess generation stage are calculated Algorithm is accelerated using GPU.Specifically, it is that space lattice density value is calculated using GLSL, and render to texture, in net Lattice generation phase is completed using geometric coloration.
For example, the present invention is with spherical brush example, for spherical brush, brush parameter includes position vector O and spheroid half Footpath R, has position vector Pv for any vertex v of any spatial voxel, then the density value D of vertex v is represented by:
D=| Pv-O |-R
The normal vector on spherical brush surface is always by the position of centre of sphere pointing space point, so the normal direction at any vertex v Measure N computational methods be:
N=normalize (Pv-O))
Step S3:Judge whether the data of present frame need to update, if necessary to update, then into step S5, if not Need to update and then enter step S4.
Specifically, the Data Comparison in the density value and previous frame that calculate present frame in step S3, if previous frame is empty Between grid vertex density value more than present frame density value, then the point data need update, by present frame the point data Respective pixel is stored in, previous frame data are directly otherwise stored in texture.
Step S4:The data of previous frame are write into current texture.
Step S5:The data that this frame is newly calculated write current texture.
Step S6:Read current texture data and generate grid.
As shown in Fig. 2 generating network in real time the invention also discloses a kind of three-dimensional brush based on Leap Motion controls The device 10 of model, including:Definition module 101, trapping module 102, computing module 103, judge module 104, writing module 105 And generation mesh module 106.
Specifically, definition module 101 is used to define the geometric parameter of three-dimensional brush;Trapping module 102 is used to capture current Frame hand position is used as brush position;Computing module 103 is used to combine three-dimensional brush geometric parameter calculating space lattice summit Density value and normal vector, wherein, density value is an one-dimensional floating number, and normal vector is a three-dimensional floating point vector;Judge module 104 are used to judge whether the data of present frame need to update;The data that writing module 105 is used for present frame need not update, then The data of previous frame are write into current texture, the data of present frame need to update, then the data write-in for newly calculating this frame is current Texture;Generation mesh module 106 is used to read current texture data and generates grid.
A kind of three-dimensional brush based on Leap Motion controls disclosed in this invention generates the side of grid model in real time The geometric parameter of method, the hand position captured by Leap Motion and three-dimensional brush catches the body number in brush moving process According to, and dynamic volume data is carried out into grid model visualization, real-time, interactive has been reached by the GPU accelerated methods such as render to texture Effect, have directly perceived and efficient advantage concurrently.The invention also discloses a kind of three-dimensional brush reality based on Leap Motion controls The device of Shi Shengcheng grid models.
Embodiment of above is merely to illustrate the present invention, and not limitation of the present invention, about the common of technical field Technical staff, without departing from the spirit and scope of the present invention, can also make a variety of changes and modification, therefore all Equivalent technical scheme falls within scope of the invention, and scope of patent protection of the invention should be defined by the claims.
Although being described in conjunction with the accompanying embodiments of the present invention, those skilled in the art can not depart from this hair Various modifications and variations are made in the case of bright spirit and scope, such modification and modification are each fallen within by appended claims Within limited range.

Claims (7)

1. a kind of method that three-dimensional brush based on Leap Motion controls generates grid model in real time, it is characterised in that including Specific following steps:
S1:The geometric parameter of the three-dimensional brush of definition;
S2:Capture present frame hand position calculates space lattice top as brush position with reference to the three-dimensional brush geometric parameter The density value and normal vector of point, wherein, the density value is an one-dimensional floating number, the normal vector be a three-dimensional floating-point to Amount;
S3:Judge whether the data of present frame need to update, if necessary to update, then into step S5, if need not update Then enter step S4;
S4:The data of previous frame are write into current texture;
S5:The data that this frame is newly calculated write current texture;
S6:Read the current texture data and generate grid.
2. the method for claim 1, it is characterised in that the three-dimensional brush is a parameter brush, by defining pen Brush geometric parameter generates solid in combination with brush mobile route.
3. the method for claim 1, it is characterised in that the step S1 is further included:To three-dimensional brush shape and Brush Size carries out geometric parameter definition.
4. the method for claim 1, it is characterised in that the hand for capturing Leap Motion equipment in the step S2 Portion position as three-dimensional brush geometric position, by mobile palm come moving three dimension brush, and calculate present frame brush position and The density value and normal vector on space lattice summit under brush geometric parameter.
5. the method for claim 1, it is characterised in that the density value and upper for calculating present frame in the step S3 Data Comparison in frame, if the density value on previous frame space lattice summit exists present frame more than the density value of present frame The data of the point are stored in respective pixel, and previous frame data directly otherwise are stored in into texture.
6. the method for claim 1, it is characterised in that calculating space lattice vertex density value and mess generation stage makes Algorithm is accelerated with GPU.
7. a kind of three-dimensional brush based on Leap Motion controls generates the device of grid model in real time, it is characterised in that bag Include:
Definition module, the geometric parameter for defining three-dimensional brush;
Trapping module, for capturing present frame hand position as brush position;
Computing module, the density value and normal vector on space lattice summit are calculated for combining the three-dimensional brush geometric parameter, its In, the density value is an one-dimensional floating number, and the normal vector is a three-dimensional floating point vector;
Whether judge module, the data for judging present frame need to update;
Writing module, the data for present frame need not update, then the data of previous frame are write into current texture, present frame Data need to update, then the data for newly calculating this frame write current texture;
Generation mesh module, for reading the current texture data and generating grid.
CN201410306480.4A 2014-06-30 2014-06-30 Method and device for three-dimensional brush to generate network module in real time based on Leap Motion control Active CN104036547B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410306480.4A CN104036547B (en) 2014-06-30 2014-06-30 Method and device for three-dimensional brush to generate network module in real time based on Leap Motion control

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410306480.4A CN104036547B (en) 2014-06-30 2014-06-30 Method and device for three-dimensional brush to generate network module in real time based on Leap Motion control

Publications (2)

Publication Number Publication Date
CN104036547A CN104036547A (en) 2014-09-10
CN104036547B true CN104036547B (en) 2017-05-24

Family

ID=51467305

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410306480.4A Active CN104036547B (en) 2014-06-30 2014-06-30 Method and device for three-dimensional brush to generate network module in real time based on Leap Motion control

Country Status (1)

Country Link
CN (1) CN104036547B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110163942B (en) * 2018-07-18 2023-02-14 腾讯科技(深圳)有限公司 Image data processing method and device
CN109448078B (en) * 2018-10-19 2022-11-04 珠海金山数字网络科技有限公司 Image editing system, method and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101609564A (en) * 2009-07-09 2009-12-23 杭州力孚信息科技有限公司 A kind of method for manufacturing three-dimensional grid model of sketch formula input
CN101799937A (en) * 2010-03-23 2010-08-11 南京大学 Method for creating three-dimensional model by using sketch
CN102354345A (en) * 2011-10-21 2012-02-15 北京理工大学 Medical image browse device with somatosensory interaction mode
CN102509357A (en) * 2011-09-28 2012-06-20 中国科学院自动化研究所 Pencil sketch simulating and drawing system based on brush stroke

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101609564A (en) * 2009-07-09 2009-12-23 杭州力孚信息科技有限公司 A kind of method for manufacturing three-dimensional grid model of sketch formula input
CN101799937A (en) * 2010-03-23 2010-08-11 南京大学 Method for creating three-dimensional model by using sketch
CN102509357A (en) * 2011-09-28 2012-06-20 中国科学院自动化研究所 Pencil sketch simulating and drawing system based on brush stroke
CN102354345A (en) * 2011-10-21 2012-02-15 北京理工大学 Medical image browse device with somatosensory interaction mode

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Ryan Schmidt et al..Sketching and Composing Widgets for 3D Manipulation.《COMPUTER GRAPHICS FORUM》.2008,第27卷(第2期),第301-310页. *
关然 等.基于计算机视觉的手势检测识别技术.《计算机应用与软件》.2013,第30卷(第1期),第155-159页. *
柳杨.基于Wifi和体感交互的演示系统设计与实现.《电子技术应用》.2013,第39卷(第4期),第121-123页. *

Also Published As

Publication number Publication date
CN104036547A (en) 2014-09-10

Similar Documents

Publication Publication Date Title
CN104183005B (en) Graphics processing unit and rendering intent based on segment
CN105378796B (en) Scalable volume 3D reconstruct
CN102779358B (en) Method and device for designing a geometrical three-dimensional modeled object
CN105678683B (en) A kind of two-dimensional storage method of threedimensional model
CN104361632B (en) A kind of triangle gridding filling-up hole method based on Hermite RBFs
CN104123747B (en) Multimode touch-control three-dimensional modeling method and system
CN105654545A (en) Construction and hierarchical display control method for 3D interactive villa type
JP2002352273A (en) System and method for interactively editing graphics object
CN107146287B (en) Two-dimensional projection image to threedimensional model mapping method
JP2002324250A (en) Method for editing graphics object by using computer implemented tool
JP2002329215A (en) Method for generating adaptively sampled distance field of object
JP2012190428A (en) Stereoscopic image visual effect processing method
JP2002334346A (en) Method for converting range data of object to model of the object
JP2002334347A (en) Method for converting adaptive sample distance field of graphic model to triangle model
Eyiyurekli et al. Interactive free-form level-set surface-editing operators
CN104036547B (en) Method and device for three-dimensional brush to generate network module in real time based on Leap Motion control
Petkov et al. Interactive visibility retargeting in vr using conformal visualization
CN102693065A (en) Method for processing visual effect of stereo image
CN104463937B (en) Animation producing method and device based on irregularly shaped object
CN108898679A (en) A kind of method of component serial number automatic marking
US8952968B1 (en) Wave modeling for computer-generated imagery using intersection prevention on water surfaces
Spillmann et al. Robust tetrahedral meshing of triangle soups
JP2002324252A (en) Method for modeling graphics object
JP2002352270A (en) Method for correcting adaptively sampled distance
Qi Computer aided design simulation of 3D garden landscape based on virtual reality

Legal Events

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