CN104036547A - 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
CN104036547A
CN104036547A CN201410306480.4A CN201410306480A CN104036547A CN 104036547 A CN104036547 A CN 104036547A CN 201410306480 A CN201410306480 A CN 201410306480A CN 104036547 A CN104036547 A CN 104036547A
Authority
CN
China
Prior art keywords
brush
dimensional
data
frame
density value
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.)
Granted
Application number
CN201410306480.4A
Other languages
Chinese (zh)
Other versions
CN104036547B (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

Landscapes

  • Processing Or Creating Images (AREA)

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 frame 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; 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 and apparatus of the real-time generating network model of three-dimensional brush of controlling based on Leap Motion
Technical field
The present invention relates to man-machine interaction and volume visualization technical field, relate in particular to a kind of method and apparatus of the real-time generating network model of three-dimensional brush of controlling based on Leap Motion.
Background technology
Along with the increase of three-dimensional content demand, D modeling tool has had application comparatively widely through development for many years, and the demand of different field has also been had to solution targetedly, but moulding mechanism and mutual aspect also have various deficiencies.
Existing moulding system interactive operation aspect is mainly divided into two kinds: be main moulding taking parameter as main moulding with taking summit.The first formative method height depends on parametrization, so be highly suitable for height rule and parameterized machinery and industrial processes, is not but suitable for art field, because design normally freely, irregular, is difficult to parameterized; The second formative method degree of freedom is higher, but modeling process is very not directly perceived and loaded down with trivial details, and user can only be by obtaining to the amendment of summit, loaded down with trivial details ground of regular body the shape of oneself wanting.
In the creation of plane, artistic creation method is the most rapidly and efficiently used brush to scribble on planar medium exactly, and three-dimensional model also should be created nature and quick the most, this experience that also main flow modeling is short of just by this way.Three-dimensional model creation mode is more freely made to a certain degree and having been explored in the field of study, for fear of abstract parametrization and loaded down with trivial details vertex operations, paper pen is scribbled as people's design and creation pattern the most intuitively, also starts to be introduced in three-dimensional model constructive process.The algorithm that the people such as Igarashi proposed based on the generating three-dimensional models of freely scribbling in 2007, by draw two-dimensional silhouette on painting canvas, then generates corresponding 3D grid [14] by this profile.The people such as Rivers have also proposed a kind of by rendering of 2 d vector images under different visual angles, obtain the algorithm [15] of rotatable three-dimensional cartoon model.These algorithms that create three-dimensional model with two-dimentional sketch allow the creation of three-dimensional model freer to a certain extent, but all model systems are all carried out complete operation on two-dimentional input media now, cause in three-dimensional software, in order to complete the cognition correspondence of input/output medium, can only three dimensions is corresponding with the dimension of 2-d input device operation to two-dimensional screen projection, so under a perspective view, only may have the operation of two dimensions time the most intuitively, such result is exactly will complete by the angle of changing continually form projection the operation of a three dimensional object, or utilize some visions auxiliary such as showing intuitively XYZ coordinate axle, complete the operation of corresponding dimension by clicking illustrated coordinate axis, so a kind of input mode of full three-dimensional could complete the cognition of three-dimensional manipulating the most intuitively.
Summary of the invention
Technical matters to be solved by this invention is, for the deficiencies in the prior art, the hand position of how to catch by Leap Motion and the geometric parameter of three-dimensional brush catch the volume data in brush moving process, and dynamic body data are carried out to the visual key issue of grid model.
For this purpose, the present invention proposes a kind of method of the real-time generating mesh model of three-dimensional brush of controlling based on Leap Motion, comprise concrete following steps:
S1: the geometric parameter that defines three-dimensional brush;
S2: catch present frame frame hand position as brush position, in conjunction with density value and the normal vector of described three-dimensional brush geometric parameter computer memory grid vertex, wherein, described density value is an one dimension floating number, and described normal vector is a three-dimensional floating point vector;
S3: whether the data that judge present frame need to upgrade, if need to upgrade, enter step S5, if do not need to upgrade, enter step S4;
S4: the data of previous frame are write to current texture;
S5: new this frame data of calculating are write to current texture;
S6: read described data texturing generating mesh.
Particularly, described three-dimensional brush is a parameter brush, simultaneously in conjunction with brush mobile route, generates solid by Define Brush geometric parameter.
Particularly, described step S1 further comprises: three-dimensional brush shape and Brush Size are carried out to geometric parameter definition.
Particularly, the hand position of in described step S2, Leap Motion equipment being caught is as three-dimensional geometry brush position, carry out moving three dimension brush by mobile palm, and calculate described in present frame density value and the normal vector on space lattice summit under brush position and brush geometric parameter.
Particularly, Data Comparison in density value and the previous frame in described step S3, present frame being calculated, if the density value of pre-set space grid vertex is greater than the density value of present frame, deposits present frame in respective pixel in the data of this point, otherwise directly deposit previous frame data in texture.
Particularly, computer memory grid vertex density value and grid generation phase use GPU to accelerate algorithm.
For this purpose, the invention allows for a kind of device of the real-time generating network model of three-dimensional brush of controlling based on Leap Motion, comprising:
Definition module, for defining the geometric parameter of three-dimensional brush;
Trapping module, for catching present frame frame hand position as brush position;
Computing module, for density value and normal vector in conjunction with described three-dimensional brush geometric parameter computer memory grid vertex, wherein, described density value is an one dimension floating number, described normal vector is a three-dimensional floating point vector;
Judge module, for judging whether the data of present frame need to upgrade;
Writing module, does not need to upgrade for the data of present frame, the data of previous frame is write to current texture, and the data of present frame need to upgrade, and new this frame data of calculating is write to current texture;
Generating mesh module, for reading described data texturing generating mesh.
The method of a kind of real-time generating mesh model of three-dimensional brush of controlling based on Leap Motion disclosed in this invention, the hand position of catching by Leap Motion and the geometric parameter of three-dimensional brush catch the volume data in brush moving process, and it is visual that dynamic body data are carried out to grid model, reach the effect of real-time, interactive by GPU accelerated methods such as render to textures, had directly perceived and efficient advantage concurrently.The invention also discloses a kind of device of the real-time generating mesh model of three-dimensional brush of controlling based on Leap Motion.
Brief description of the drawings
Can more clearly understand the features and advantages of the present invention by reference to accompanying drawing, accompanying drawing is schematically to should not be construed as the present invention is carried out to any restriction, in the accompanying drawings:
Fig. 1 shows the flow chart of steps of the method for a kind of real-time generating mesh model of three-dimensional brush of controlling based on Leap Motion in the embodiment of the present invention;
Fig. 2 shows the structural drawing of the device of a kind of real-time generating mesh model of three-dimensional brush of controlling based on Leap Motion in the embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing, embodiments of the present invention is described in detail.
As shown in Figure 1, the invention provides a kind of method of the real-time generating mesh model of three-dimensional brush of controlling based on Leap Motion, comprise concrete following steps:
Step S1: the geometric parameter that defines three-dimensional brush.Wherein, three-dimensional brush is a parameter brush, by Define Brush geometric parameter simultaneously in conjunction with brush mobile route, generate solid, can control more easily by the geometric parameter of change brush the base shape that generates solid, reach solid generative process intuitively in conjunction with moving freely path, and the geometric parameter that defines three-dimensional brush is for to carry out geometric parameter definition to three-dimensional brush shape and Brush Size.
For example, in the present invention, study and realize with the most basic soccer star's brush, other shape brushes also can complete by change brush form parameter.Particularly, taking spherical brush as example, Brush Size is spherical radius, so its geometric parameter is brush position P and brush radius R.
Step S2: catch present frame frame hand position as brush position, in conjunction with density value and the normal vector of three-dimensional brush geometric parameter computer memory grid vertex, the hand position of catching by Leap Motion equipment is as three-dimensional geometry brush position, carry out moving three dimension brush by mobile palm, and calculate density value and the normal vector on space lattice summit under present frame brush position and brush geometric parameter, wherein, density value is an one dimension floating number, and normal vector is a three-dimensional floating point vector.
Particularly, each summit needs 4 floating numbers to store this some place parameter relevant with volume data, so should store these data with the texture of RGBA form, each pixel is made up of tetra-floating numbers of R/G/B/A, and the data on each summit are stored in a pixel.
Further, in order to reach the frame per second of real-time, interactive, computer memory grid vertex density value and grid generation phase use GPU to accelerate algorithm.Particularly, for carry out computer memory mesh-density value with GLSL, and render to texture, complete by geometric coloration at grid generation phase.
For example, the present invention is with spherical brush example, and for spherical brush, brush parameter comprises position vector O and radius of sphericity R, has position vector Pv for any vertex v of any space voxel, and the density value D of vertex v can be expressed as so:
D=|Pv-O|-R
The position that the normal vector on spherical brush surface is always put by centre of sphere pointing space, so the computing method of the normal vector N at vertex v place are arbitrarily:
N=normalize(Pv-O))
Step S3: whether the data that judge present frame need to upgrade, if need to upgrade, enter step S5, if do not need to upgrade, enter step S4.
Particularly, Data Comparison in density value and the previous frame in step S3, present frame being calculated, if the density value of pre-set space grid vertex is greater than the density value of present frame, these data need to upgrade, deposit present frame in respective pixel in the data of this point, otherwise directly deposit previous frame data in texture.
Step S4: the data of previous frame are write to current texture.
Step S5: new this frame data of calculating are write to current texture.
Step S6: read data texturing generating mesh.
As shown in Figure 2, the device 10 that the invention also discloses a kind of real-time generating network model of three-dimensional brush of controlling based on Leap Motion, comprising: definition module 101, trapping module 102, computing module 103, judge module 104, writing module 105 and generating mesh module 106.
Particularly, definition module 101 is for defining the geometric parameter of three-dimensional brush; Trapping module 102 is for catching present frame frame hand position as brush position; Computing module 103 is for density value and normal vector in conjunction with three-dimensional brush geometric parameter computer memory grid vertex, and wherein, density value is an one dimension floating number, and normal vector is a three-dimensional floating point vector; Judge module 104 is for judging whether the data of present frame need to upgrade; Writing module 105 does not need to upgrade for the data of present frame, the data of previous frame is write to current texture, and the data of present frame need to upgrade, and new this frame data of calculating is write to current texture; Generating mesh module 106 is for reading data texturing generating mesh.
The method of a kind of real-time generating mesh model of three-dimensional brush of controlling based on Leap Motion disclosed in this invention, the hand position of catching by Leap Motion and the geometric parameter of three-dimensional brush catch the volume data in brush moving process, and it is visual that dynamic body data are carried out to grid model, reach the effect of real-time, interactive by GPU accelerated methods such as render to textures, had directly perceived and efficient advantage concurrently.The invention also discloses a kind of device of the real-time generating mesh model of three-dimensional brush of controlling based on Leap Motion.
Above embodiment is only for illustrating the present invention; and be not limitation of the present invention; the those of ordinary skill in relevant technologies field; without departing from the spirit and scope of the present invention; can also make a variety of changes and modification; therefore all technical schemes that are equal to also belong to category of the present invention, and scope of patent protection of the present invention should be defined by the claims.
Although described by reference to the accompanying drawings embodiments of the present invention, but those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, such amendment and modification all fall into by within claims limited range.

Claims (7)

1. a method for the real-time generating mesh model of three-dimensional brush of controlling based on Leap Motion, is characterized in that, comprises concrete following steps:
S1: the geometric parameter that defines three-dimensional brush;
S2: catch present frame frame hand position as brush position, in conjunction with density value and the normal vector of described three-dimensional brush geometric parameter computer memory grid vertex, wherein, described density value is an one dimension floating number, and described normal vector is a three-dimensional floating point vector;
S3: whether the data that judge present frame need to upgrade, if need to upgrade, enter step S5, if do not need to upgrade, enter step S4;
S4: the data of previous frame are write to current texture;
S5: new this frame data of calculating are write to current texture;
S6: read described data texturing generating mesh.
2. the method for claim 1, is characterized in that, described three-dimensional brush is a parameter brush, simultaneously in conjunction with brush mobile route, generates solid by Define Brush geometric parameter.
3. the method for claim 1, is characterized in that, described step S1 further comprises: three-dimensional brush shape and Brush Size are carried out to geometric parameter definition.
4. the method for claim 1, it is characterized in that, the hand position of in described step S2, Leap Motion equipment being caught is as three-dimensional geometry brush position, carry out moving three dimension brush by mobile palm, and calculate described in present frame density value and the normal vector on space lattice summit under brush position and brush geometric parameter.
5. the method for claim 1, it is characterized in that, Data Comparison in density value and the previous frame in described step S3, present frame being calculated, if the density value of pre-set space grid vertex is greater than the density value of present frame, deposit present frame in respective pixel in the data of this point, otherwise directly deposit previous frame data in texture.
6. the method for claim 1, is characterized in that, computer memory grid vertex density value and grid generation phase use GPU to accelerate algorithm.
7. a device for the real-time generating mesh model of three-dimensional brush of controlling based on Leap Motion, is characterized in that, comprising:
Definition module, for defining the geometric parameter of three-dimensional brush;
Trapping module, for catching present frame frame hand position as brush position;
Computing module, for density value and normal vector in conjunction with described three-dimensional brush geometric parameter computer memory grid vertex, wherein, described density value is an one dimension floating number, described normal vector is a three-dimensional floating point vector;
Judge module, for judging whether the data of present frame need to upgrade;
Writing module, does not need to upgrade for the data of present frame, the data of previous frame is write to current texture, and the data of present frame need to upgrade, and new this frame data of calculating is write to current texture;
Generating mesh module, for reading described data texturing generating mesh.
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 true CN104036547A (en) 2014-09-10
CN104036547B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109448078A (en) * 2018-10-19 2019-03-08 珠海金山网络游戏科技有限公司 A kind of image editing system, method and apparatus
CN110163942A (en) * 2018-07-18 2019-08-23 腾讯科技(深圳)有限公司 A kind of image processing method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101609564B (en) * 2009-07-09 2011-06-15 杭州力孚信息科技有限公司 Method for manufacturing three-dimensional grid model by draft input
CN101799937B (en) * 2010-03-23 2011-08-31 南京大学 Method for creating three-dimensional model by using sketch
CN102509357B (en) * 2011-09-28 2014-04-23 中国科学院自动化研究所 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

Cited By (4)

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

Also Published As

Publication number Publication date
CN104036547B (en) 2017-05-24

Similar Documents

Publication Publication Date Title
CN102779358B (en) Method and device for designing a geometrical three-dimensional modeled object
AU2017213540B2 (en) 3d sculpting
CN104361632B (en) A kind of triangle gridding filling-up hole method based on Hermite RBFs
CN101609564B (en) Method for manufacturing three-dimensional grid model by draft input
CN104123747A (en) Method and system for multimode touch three-dimensional modeling
CN108744520B (en) Method and device for determining placement position of game model and electronic equipment
CN102693065A (en) Method for processing visual effect of stereo image
Vyatkin Method of binary search for image elements of functionally defined objects using graphics processing units
CN104036547A (en) Method and device for three-dimensional brush to generate network module in real time based on Leap Motion control
CN103729878A (en) Three-dimensional graph implementation method based on WPF and three-dimensional character implementation method based on WPF
CN104537704B (en) A kind of feather real-time dynamic creation method of birds human trunk model
Wang et al. An improving algorithm for generating real sense terrain and parameter analysis based on fractal
Weier et al. Generating and rendering large scale tiled plant populations
Cho et al. 3D volume drawing on a potter's wheel
CN104102792B (en) A kind of Simulation Methods of filling mining
Kil et al. 3D warp brush modeling
CN109979007A (en) A kind of geometric modeling method and apparatus of building body
CN104143204A (en) Moving least square two-dimensional character deformation method considering topological structure
McMullen et al. Procedural generation of terrain within highly customizable javascript graphics utilities for webgl
Lei et al. Haptic decorating on the surface of virtual clay model
CN103985150B (en) A kind of image processing method and electronic equipment
CN109191551A (en) It is a kind of based on triangle adjacency information along threedimensional model surface moving algorithm
Ozbay et al. ANovel APPROACH TO SMOOTHING ON 3D STRUCTURED ADAPTIVE MESH OF THE KINECT-BASED MODELS
US11941499B2 (en) Training using rendered images
Wang et al. Lightweight collision detection algorithm in Web3D robot simulation platform

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