CN105574916A - Bone creating method and apparatus with bound picture - Google Patents

Bone creating method and apparatus with bound picture Download PDF

Info

Publication number
CN105574916A
CN105574916A CN201510983296.8A CN201510983296A CN105574916A CN 105574916 A CN105574916 A CN 105574916A CN 201510983296 A CN201510983296 A CN 201510983296A CN 105574916 A CN105574916 A CN 105574916A
Authority
CN
China
Prior art keywords
bone
picture
created
width
mouse
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
CN201510983296.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.)
Beijing Egression Epoch Information Technology Co Ltd
Original Assignee
Beijing Egression Epoch Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Egression Epoch Information Technology Co Ltd filed Critical Beijing Egression Epoch Information Technology Co Ltd
Priority to CN201510983296.8A priority Critical patent/CN105574916A/en
Publication of CN105574916A publication Critical patent/CN105574916A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/802D [Two Dimensional] animation, e.g. using sprites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a bone creating method and an apparatus with a bound picture, and relates to the technical field of 2D bone animation. The method includes following steps: in the process of creating a bone by employing a mouse, monitoring a moving event of the mouse in real time; according to a monitoring result, obtaining the length and the angle of the created bone relative to the head position; according to the length and the angle, determining the width and the height of the bone being created; finding an alternative picture whose width and height are matched with the width and the height of the bone being created by reviewing all pictures; and determining the accomplishment of bone creation via the monitoring of the moving event of the mouse, selecting the matching picture matched with the created bone from the alternative pictures, and binding the picture to the created bone. According to the method, a user can create the bone and automatically bind the picture, the operation process of the user is greatly reduced, and the user is greatly facilitated.

Description

A kind of bone creation method and device simultaneously binding picture
Technical field
The present invention relates to 2D skeleton cartoon technical field, particularly a kind of bone creation method and device simultaneously binding picture.
Background technology
2D skeleton cartoon class application program provides the function creating bone and editor's skeleton cartoon to animation personnel.This type of application program comprises Spiner, Sprite etc.Before general designer uses such software editing skeleton cartoon, all need to create bone, and the picture of each bone and its correspondence is got up by certain operation binding.
The solution of current trend generally has two kinds.
One first pulls establishment bone, selects the picture that will bind afterwards, and the concrete flow process of such as Spriter. is as follows:
1, father's bone is chosen;
2, pin Alt key, open and create skeletal pattern;
3, pull establishment bone by left mouse button, unclamp Alt key afterwards;
4, press B key and select picture with mouse simultaneously;
5, lift B key, picture has been bound.
Another kind is the picture first selecting to bind, then pulls establishment bone, and such as Spine. idiographic flow is as follows:
1, father's bone is chosen;
2, press establishment Bone Tools, switch to establishment skeletal pattern;
3, press Ctrl, choose the picture that will bind simultaneously;
4, lift Ctrl, pull establishment bone by left mouse button afterwards;
5, lift mouse, bone has created, and picture binding is simultaneously complete, the name of the automatic RNTO picture of bone.
The public shortcoming of these two kinds of common scheme operates more loaded down with trivial details exactly, and the picture that bind must additionally be selected, and can not automatically bind.The operation creating bone can be selected the operation of picture to interrupt, and cannot accomplish without any letup.Select the scheme of picture in addition afterwards, bone cannot rename automatically, needs extra manually renaming.
Summary of the invention
The object of the present invention is to provide a kind of bone creation method and the device of binding picture simultaneously, solve in prior art when creating bone, need the picture of binding additionally to select, the problem that can not automatically bind.
According to an aspect of the present invention, provide a kind of bone creation method simultaneously binding picture, comprise the following steps:
Mouse is being utilized to create in bone processes, the moving event of Real-Time Monitoring mouse;
According to described monitoring result, obtain created bone relative to the length of its head position and angle;
According to described length and angle, determine width and the height of the bone created;
By all pictures in traversal scene, the alternative picture finding its width and height and the width of the described bone created and highly match;
When by monitoring the moving event of mouse and determining that described bone has created, from described alternative picture selection and the bone adaptation created mate picture, and bind it to the bone that described establishment completes.
Preferably, the bone created is sub-bone or root bone.
Preferably, described according to described monitoring result, obtain created bone and comprise relative to the length of its head position and angle:
According to the moving event of monitoring mouse, obtain head position and current location that mouse creates bone;
According to obtained head position and current location, obtain created bone relative to the length of its head position and angle.
Preferably, described by all pictures in traversal scene, find its width and height and the width of the described bone created and the alternative picture that highly matches to comprise:
By all pictures in traversal scene, comprise the upper left corner, width and Rectangular Bounding Volume highly for each picture generates;
Bone is being created relative to the length of its head position and angle whether in the Rectangular Bounding Volume that picture generates described in judgement;
If creating bone described in judging relative to the length of its head position and angle in the Rectangular Bounding Volume that picture generates, then using picture as with the width of the described bone created and the alternative picture that highly matches.
Preferably, have at least one with the width of the described bone created and the alternative picture that highly matches.
Preferably, when only having an alternative picture, then using described alternative picture as with the bone adaptation created mate picture.
Preferably, when more than an alternative picture, then calculate the Rectangular Bounding Volume area of each alternative picture, and using alternative picture minimum for Rectangular Bounding Volume area as with the bone adaptation created mate picture.
According to a further aspect in the invention, provide a kind of bone creation apparatus simultaneously binding picture, comprising:
Acquisition module, for utilizing mouse to create in bone processes, the moving event of Real-Time Monitoring mouse, and according to described monitoring result, is obtaining created bone relative to the length of its head position and angle;
Determination module, for according to described length and angle, determines width and the height of the bone created;
Search module, for by all pictures in traversal scene, the alternative picture finding its width and height and the width of the described bone created and highly match;
Binding module, for when by monitoring the moving event of mouse and determining that described bone has created, from described alternative picture selection and the bone adaptation created mate picture, and bind it to the bone that described establishment completes.
Preferably, the bone created is sub-bone or root bone.
Preferably, have at least one with the width of the described bone created and the alternative picture that highly matches.
Compared with prior art, beneficial effect of the present invention is:
The present invention can realize automatically binding picture while user creates bone, the operating process of a large amount of minimizing user, consider the limitation of Auto-matching algorithm simultaneously, provide the mode of manually binding picture when not interrupting and creating bone simultaneously, automatically rename after achieving binding bone simultaneously, have great convenience for the user.
Accompanying drawing explanation
Fig. 1 is a kind of process flow diagram simultaneously binding the bone creation method of picture that the embodiment of the present invention provides;
Fig. 2 is a kind of schematic diagram simultaneously binding the bone creation apparatus of picture that the embodiment of the present invention provides;
Fig. 3 is the process flow diagram of the bone creation method binding picture while the embodiment of the present invention provides;
Fig. 4 is the schematic diagram of the Rectangular Bounding Volume B of the picture that the embodiment of the present invention provides.
Embodiment
Below in conjunction with accompanying drawing to a preferred embodiment of the present invention will be described in detail, should be appreciated that following illustrated preferred embodiment is only for instruction and explanation of the present invention, is not intended to limit the present invention.
Fig. 1 is a kind of process flow diagram simultaneously binding the bone creation method of picture that the embodiment of the present invention provides, and as shown in Figure 1, comprises the following steps:
Step S101: utilizing mouse to create in bone processes, the moving event of Real-Time Monitoring mouse;
Step S102: according to described monitoring result, obtains created bone relative to the length of its head position and angle;
Step S103: according to described length and angle, determines width and the height of the bone created;
Step S104: by all pictures in traversal scene, the alternative picture finding its width and height and the width of the described bone created and highly match;
Step S105: when by monitoring the moving event of mouse and determining that described bone has created, from described alternative picture selection and the bone adaptation created mate picture, and bind it to the bone that described establishment completes.
Wherein, the bone created is sub-bone or root bone.
Wherein, described according to described monitoring result, obtain created bone and comprise relative to the length of its head position and angle: according to the moving event of monitoring mouse, obtain head position and current location that mouse creates bone; According to obtained head position and current location, obtain created bone relative to the length of its head position and angle.
Wherein, described by all pictures in traversal scene, its width and height and the width of the described bone created and the alternative picture that highly matches is found to comprise: by travel through all pictures in scene, for each picture generation comprises the upper left corner, width and Rectangular Bounding Volume highly; Bone is being created relative to the length of its head position and angle whether in the Rectangular Bounding Volume that picture generates described in judgement; If creating bone described in judging relative to the length of its head position and angle in the Rectangular Bounding Volume that picture generates, then using picture as with the width of the described bone created and the alternative picture that highly matches.
The present invention have at least one with the width of the described bone created and the alternative picture that highly matches.When only having an alternative picture, then using described alternative picture as with the bone adaptation created mate picture; When more than an alternative picture, then calculate the Rectangular Bounding Volume area of each alternative picture, and using alternative picture minimum for Rectangular Bounding Volume area as with the bone adaptation created mate picture.
Fig. 2 is a kind of schematic diagram simultaneously binding the bone creation apparatus of picture that the embodiment of the present invention provides, and as shown in Figure 2, comprising: acquisition module 201, determination module 202, search module 203 and binding module 204.Wherein, described acquisition module 201, for utilizing mouse to create in bone processes, the moving event of Real-Time Monitoring mouse, and according to described monitoring result, is obtaining created bone relative to the length of its head position and angle; Described determination module 202, for according to described length and angle, determines width and the height of the bone created; Describedly search module 203, for by all pictures in traversal scene, the width finding its width and height and the described bone created and the alternative picture highly matched; Described binding module 204, for when by monitoring the moving event of mouse and determining that described bone has created, from described alternative picture selection and the bone adaptation created mate picture, and bind it to the bone that described establishment completes.
Wherein, the bone created is sub-bone or root bone.
Wherein, have at least one with the width of the described bone created and the alternative picture that highly matches.
Fig. 3 is the process flow diagram of the bone creation method binding picture while the embodiment of the present invention provides, and as shown in Figure 3, the drafting of bone has been driven by skeleton data, can show in scene with class triangle.Comprise the following steps:
Step 1, enter establishment skeletal pattern, select father's bone;
Select to create Bone Tools, switch to establishment skeletal pattern.In order to reduce with scene in other operate issuable conflict, devise one and create Bone Tools button, after pressing, establishment skeletal pattern can be switched to.In such a mode, all bones and the map function of picture all disabled, picture also cannot be selected.
The bone of all establishments must have father's bone to exist, if do not select father's bone, then acquiescence selects root bone to be father's bone.
Step 2, create bone and to record current location be bone reference position;
Press mouse and move, starting to create bone.That is, in scene areas, monitor the event that left mouse button is pressed, when left mouse button is pressed, create bone in current location and choose.
Step 3, record mouse current location, calculate and revise length and the angle of bone;
When mouse moves, start to monitor mouse moving event, and according to mouse current location P1 and the initial position P0 creating bone, calculate length L and the angle R of bone, and length and angle are assigned to the bone created, and refresh the display of scene.
L=((P1.x–P0.x) 2+(P1.y–P0.y) 2) 0.5
R=arctan((P1.y–P0.y)/(P1.x–P0.x))
Whether step 4, Ctrl press;
If Ctrl presses, then enter step 6, if Ctrl does not press, then enter step 5.
Step 5: Auto-matching picture;
Intelligent Matching picture in bone constructive process.The following calculation procedure of Intelligent Matching picture process need:
1, all pictures in scene are traveled through, for each picture generates Rectangular Bounding Volume B.
As shown in Figure 4, Rectangular Bounding Volume B comprises upper left corner P0, and wide width, high height.
2, according to Rectangular Bounding Volume B and the transform matrix M of picture, judge that head and the tail 2 P0 and P1 of the bone created are whether in bounding box respectively.Wherein, the transform matrix M of picture is taken out by system API.
Judge a some P whether in the bounding box B that transformation matrix is M algorithm as follows:
1) excursion matrix PM is generated according to P:
X and y of P point is inserted respectively tx and ty of matrix
2) transform matrix M is got against obtaining M -1
3) by the inverse M of the transform matrix M of picture -1the transformation matrix PM being applied to P point obtains the transformation matrix PM ' of the relative Picture Coordinate system of P point
PM’=M -1*PM
4) x and the y value of tx and ty of PM ' being inserted respectively P point generates P ', is the equal of result transform matrix M be applied on P
P’=(PM’.tx,PM’.ty)
5) P ' is judged whether in the scope of bounding box B
P’.x>=P0.x&&P’.x<=(P0.x+width)&&P’.y>=P0.y&&P0.y<=(P0.y+height)
If 3 P0 and P1 are in bounding box, then photo current is added alternative just list.
If only have an element in 4 alternative just list, then as the coupling picture of electing.If more than one element, then elect picture minimum for bounding box B area as coupling picture.
5, coupling picture to be chosen and highlighted, do not have alternative picture then not choose any picture.
Whether step 6, Ctrl press;
If Ctrl presses, then enter step 7, if Ctrl does not press, then enter step 9.
Step 7, enter the artificial choosing figure stage, click picture and complete choosing figure;
Press Ctrl, close Intelligent Matching picture, enter the artificial choosing figure stage, click picture and complete choosing figure.That is, unclamp mouse, if Ctrl is pressed, creates bone processes and suspend, enter and choose picture mode.Under this scheme, when mouse is pressed, only have picture energy selected, and can not bone be created.
Step 8, establishment bone complete, if there is coupling picture, then bind picture to bone, for bone renames.
Unclamp Ctrl, create bone and terminate, the picture of coupling is tied to bone, simultaneously by bone rename.That is, unclamp mouse, if Ctrl is not pressed, creates bone and terminate, the picture of coupling is tied to bone, simultaneously by the name rename of bone according to coupling picture.
In sum, the present invention has following technique effect:
1, operation is directly perceived, What You See Is What You Get;
2, operation is convenient, and with trying one's best, few operation completes binding;
3, operation accurately, not easily produces conflict with other operations;
4, the bone rename for creating that can be intelligent.
Although above to invention has been detailed description, the present invention is not limited thereto, those skilled in the art of the present technique can carry out various amendment according to principle of the present invention.Therefore, all amendments done according to the principle of the invention, all should be understood to fall into protection scope of the present invention.

Claims (10)

1. bind a bone creation method for picture simultaneously, it is characterized in that, comprise the following steps:
Mouse is being utilized to create in bone processes, the moving event of Real-Time Monitoring mouse;
According to described monitoring result, obtain created bone relative to the length of its head position and angle;
According to described length and angle, determine width and the height of the bone created;
By all pictures in traversal scene, the alternative picture finding its width and height and the width of the described bone created and highly match;
When by monitoring the moving event of mouse and determining that described bone has created, from described alternative picture selection and the bone adaptation created mate picture, and bind it to the bone that described establishment completes.
2. method according to claim 1, is characterized in that, the bone created is sub-bone or root bone.
3. method according to claim 1, is characterized in that, described according to described monitoring result, obtains created bone and comprises relative to the length of its head position and angle:
According to the moving event of monitoring mouse, obtain head position and current location that mouse creates bone;
According to obtained head position and current location, obtain created bone relative to the length of its head position and angle.
4. method according to claim 3, is characterized in that, described by all pictures in traversal scene, finds its width and height and the width of the described bone created and the alternative picture that highly matches to comprise:
By all pictures in traversal scene, comprise the upper left corner, width and Rectangular Bounding Volume highly for each picture generates;
Bone is being created relative to the length of its head position and angle whether in the Rectangular Bounding Volume that picture generates described in judgement;
If creating bone described in judging relative to the length of its head position and angle in the Rectangular Bounding Volume that picture generates, then using picture as with the width of the described bone created and the alternative picture that highly matches.
5. method according to claim 4, is characterized in that, have at least one with the width of the described bone created and the alternative picture that highly matches.
6. method according to claim 5, is characterized in that, when only having an alternative picture, then using described alternative picture as with the bone adaptation created mate picture.
7. method according to claim 5, it is characterized in that, when more than an alternative picture, then calculate the Rectangular Bounding Volume area of each alternative picture, and using alternative picture minimum for Rectangular Bounding Volume area as with the bone adaptation created mate picture.
8. bind a bone creation apparatus for picture simultaneously, it is characterized in that, comprising:
Acquisition module, for utilizing mouse to create in bone processes, the moving event of Real-Time Monitoring mouse, and according to described monitoring result, is obtaining created bone relative to the length of its head position and angle;
Determination module, for according to described length and angle, determines width and the height of the bone created;
Search module, for by all pictures in traversal scene, the alternative picture finding its width and height and the width of the described bone created and highly match;
Binding module, for when by monitoring the moving event of mouse and determining that described bone has created, from described alternative picture selection and the bone adaptation created mate picture, and bind it to the bone that described establishment completes.
9. device according to claim 8, is characterized in that, the bone created is sub-bone or root bone.
10. device according to claim 8, is characterized in that, have at least one with the width of the described bone created and the alternative picture that highly matches.
CN201510983296.8A 2015-12-24 2015-12-24 Bone creating method and apparatus with bound picture Pending CN105574916A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510983296.8A CN105574916A (en) 2015-12-24 2015-12-24 Bone creating method and apparatus with bound picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510983296.8A CN105574916A (en) 2015-12-24 2015-12-24 Bone creating method and apparatus with bound picture

Publications (1)

Publication Number Publication Date
CN105574916A true CN105574916A (en) 2016-05-11

Family

ID=55885002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510983296.8A Pending CN105574916A (en) 2015-12-24 2015-12-24 Bone creating method and apparatus with bound picture

Country Status (1)

Country Link
CN (1) CN105574916A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070268293A1 (en) * 2006-05-19 2007-11-22 Erick Miller Musculo-skeletal shape skinning
CN101079154A (en) * 2007-03-02 2007-11-28 腾讯科技(深圳)有限公司 Role animation realization method and system
KR20130118040A (en) * 2012-04-19 2013-10-29 이용범 Ball jointed doll
CN103927779A (en) * 2013-12-30 2014-07-16 华侨大学 Method for generating two-dimensional animation on basis of configuration

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070268293A1 (en) * 2006-05-19 2007-11-22 Erick Miller Musculo-skeletal shape skinning
CN101079154A (en) * 2007-03-02 2007-11-28 腾讯科技(深圳)有限公司 Role animation realization method and system
KR20130118040A (en) * 2012-04-19 2013-10-29 이용범 Ball jointed doll
CN103927779A (en) * 2013-12-30 2014-07-16 华侨大学 Method for generating two-dimensional animation on basis of configuration

Similar Documents

Publication Publication Date Title
US7440691B2 (en) 360-° image photographing apparatus
EP2843625B1 (en) Method for synthesizing images and electronic device thereof
CN103472985B (en) A kind of user&#39;s edit methods of three-dimensional shopping platform display interface
CN104765905B (en) Plan view and the first visual angle split screen synchronous display method based on BIM and system
CN110162236B (en) Display method and device between virtual sample boards and computer equipment
US20120128205A1 (en) Apparatus for providing spatial contents service and method thereof
CN105975142A (en) Method and device for icon moving
CN106658139A (en) Focus control method and device
CN105227867A (en) A kind of image processing method and electronic equipment
CN105635256A (en) Multimedia synchronization method, device and system
US20140142900A1 (en) Information processing apparatus, information processing method, and program
CN112256163B (en) Screen configuration method, device and system for spliced display screen
CN105574916A (en) Bone creating method and apparatus with bound picture
CN112612463A (en) Graphical programming control method, system and device
CN109213980A (en) A kind of method and apparatus and computer readable storage medium for editing PowerPoint
CN102147697A (en) Visual effect display method and electronic device
CN115524990A (en) Intelligent household control method, device, system and medium based on digital twins
CN105260121A (en) Terminal control method, terminal control device and terminal
CN117149889A (en) Graph data processing method and related device
CN112328155B (en) Input device control method and device and electronic device
CN104572157A (en) Information processing method and electronic equipment
KR20180116708A (en) Method and apparatus for providing contents for layered hologram
CN106204116A (en) A kind of method and system showing user preferences
US9185261B2 (en) Input device and image processing method thereof
CN103035028B (en) A kind of method and device realizing interactive application scene

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160511