Summary of the invention
The present invention can be by setting in the 3D scene, put role, stage property, adjustment video camera, record all kinds of key frames, the game video that creates is carried out live preview, adjust, calculation, it is more efficient, real-time and interactive that game video is taken, and solves the long problem of game video fabrication cycle.
The invention discloses a kind of 3D game video camera system, it comprises scene editor module, time shaft editor module and post-processed module, its Scene editor module comprises that the role edits submodule, stage property editor submodule and video camera and adjusts submodule, the time shaft editor module comprises key frame editor submodule, and the post-processed module is used for by graph and image processing technological adjustment picture.
Preferably, the role edits submodule and comprises role's assembling function parts, and it is used for independent assortment role's parts, fast creation role.
Preferably, time shaft records the time point that one or more key frames and key frame are triggered, the preview of arbitrary time 3D scene effect and the editor of all kinds of key frames are all undertaken by time shaft, with motion, in real time calculation of operation and the generation 3D game video of realizing role and video camera, key frame has recorded an operation and the data relevant with this operation, and the incidental operation of this key frame is performed when key frame is triggered.
Preferably, according to above-mentioned 3D game video camera system, wherein key frame editor submodule comprises the following functions parts: role's key frame, role group, video camera displacement key frame, wherein role group is one or more replisomes of role master's mould, all key frames and the profile of each replisome copy role master mould, replisome is different in the position in space from role master's mould, and position, wide-angle and the video camera Y-axis of video camera displacement key frame record video camera is around the anglec of rotation of X-axis.
Preferably, role's key frame functional part further comprises role's displacement key frame, role action key frame, role express one's feelings key frame, role bindings key frame.
Preferably, role's displacement key frame role displacement key frame record role's volume coordinate, realization role's displacement, Rotation and Zoom, role action key frame record role's body action, realize role's action playback, express one's feelings key frame record role's expression action of role, realize role's expression playback, the role bindings key frame is processed the dependence between role and the role, within default a period of time role bindings to another role.
Preferably, the role action key frame comprises at least a default or by user-defined bone action data, described bone action data comprises reverse movement (IK) bone and/or propulsion (FK) bone, wherein the IK bone comprises bone constraint and the control of IK bone, contain the role action key frame of IK bone control by the relative displacement of IK technical notes IK master's bone and IK root bone, the role action key frame that contains the control of FK bone records role's sub-bone with respect to the rotation of father's bone.
The invention also discloses the method that a kind of 3D game video is taken, it may further comprise the steps:
The taking lens that in the 3D map of game, calls scene, role, stage property and can freely control; Put and editor's role and stage property; Edit key frame at time shaft; And carry out post-processed.
Preferably, the step at time shaft editor key frame further comprises: editor's role displacement key frame, editor's role action key frame, editor's role expression key frame, editor's role binding key frame.
Preferably, editor's role displacement key frame comprises the volume coordinate that records the role, rotation, convergent-divergent, realize role's movement, editor's role action key frame comprises the body action that records the role, realize role's action playback, record role's the step of body action comprise call at least a default or by user-defined bone action data, described bone action data comprises reverse movement (IK) bone and/or propulsion (FK) bone, wherein the IK bone comprises bone constraint and the control of IK bone, contain the role action key frame of IK bone control by the relative displacement of IK technical notes IK master's bone and IK root bone, the role action key frame that contains the control of FK bone records role's sub-bone with respect to the rotation of father's bone, editor's role expression key frame comprises the expression action of recording the role, realize role's expression playback, editor's role binding key frame comprises the dependence between processing angle look and the role, within default a period of time role bindings to another role.
According to 3D game video camera system of the present invention and method thereof, can be applicable to personal computer, video game machine, portable digital device (for example portable game or smart mobile phone) or any suitable digital device.
Embodiment
3D game video camera system of the present invention can be arranged in the concrete game by the mode of game plug-in unit.
Among one embodiment of 3D game video camera system, comprise scene editor module, time shaft editor module and post-processed module, its Scene editor module can comprise that video camera adjustment submodule, stage property editor submodule and role edit submodule.
Video camera is adjusted the basic controlling that submodule can be realized video camera, can comprise allowing freely to control camera lens, show focal length and recording camera position.Move freely under the camera mode, can use specific key on the computer keyboard, the mobile camera that gets off on for example coming all around with W, S, A, D, Q, E respectively, and control translational speed with for example "+", "-", and mouse can be used for rotary camera; For showing focal length, can use mouse roller adjusting focal length distance, it is clear to produce the focal length place under depth of field state, and the effect that slowly blur in other places can make the focal length direction rotation simultaneously; For the record camera position, when cancellation is freely controlled camera lens, automatically be recorded in the rearmost position of freely controlling camera lens.Present embodiment can provide the further editting function submodule of video camera, to realize visual range, wide-angle, to tilt, move freely adjustment and the scene set animation of the speed of video camera.In stage property editor submodule, can select to load stage property and the resource of adding scene to, for example map resource, model resource and special efficacy resource, and when placing, carry out moving horizontally, horizontally rotating and bi-directional scaling up and down.Edit in the submodule the role, can select to load the role who adds scene to, the role edits cocoa and comprises model, material, modification pinup picture details, the with oneself operation of stage property, action and expression etc.
For the time shaft editor module, time shaft is the carrier of key frame, and time shaft has recorded key frame and at which time point has been triggered.3D scene effect by time shaft arbitrary time of easily preview, and create, revise, delete all kinds of key frames, realize motion, the in real time calculation of operation of role and video camera and generate the 3D game video, key frame has recorded an operation and the data relevant with this operation, and the incidental operation of this key frame is performed when key frame is triggered.Present embodiment provides the time shaft editor panel, and 10 frames are 1 second on the time shaft.Can change video camera, role's movement velocity by key frame distance on the change time shaft.Wherein all information are all preserved with key frame.Preferably, the panel concrete function can comprise following part,
The time shaft slide block: the position that displays the play, also can directly drag and play the location modification, can also cooperate shortcut to move and copy key frame;
Drag the renewal video camera: in situation about not choosing, drag change in location and action that the time shaft slide block can only be seen the role.Choose and to show simultaneously that video camera changes the final effect of more complete intuitively preview time shaft animation;
Vertical bar: intuitively show role's single motion duration;
From the beginning play: all play whole time shaft animation since the first frame by playing at every turn;
Play: reproduction time axle animation;
Frame number represents frame: show current time axle slide block place frame position;
Time shaft scale: drag to turn fast and enter other frames;
Preserve: preserve current time axle animation (camera lens, role animation, front two kinds comprehensive);
Read: read the time shaft animation of having preserved;
Remove: remove all data of current time axle.
The time shaft editor module comprises key frame editor submodule, and key frame editor submodule can comprise the following functions parts: video camera displacement key frame, role's key frame, role group.
For video camera displacement key frame, this 3D game video camera system can adopt the operation technique of What You See Is What You Get, namely in the position that the user adjusts key frame is set, then adds a key frame at the replacing lens location again, system can generate camera motion curve or straight line automatically.Can manually change interpolation type curve, the straight line of video camera key frame, generate respectively the camera lens of dynamic change and the camera lens of even variation, and can judge the video camera effect by path curves intuitively.Position, wide-angle and the video camera Y-axis of video camera displacement key frame record video camera is around the anglec of rotation of X-axis.
For role's key frame, it further can comprise role's displacement key frame, role action key frame, role express one's feelings key frame, role bindings key frame.
For the position key frame, by being that displacement, rotation, convergent-divergent texts can appear in key frame 2 of time shaft different positions being set.The position key frame information can comprise: fit in ground, the role shows, absolute world coordinates, model size, towards and tilt.Wherein, fit in ground: whether in place the moving past in the journey of model fits with ground, chooses more true to nature in the time of personage's proper motion.Fit on the special circumstances cancellation ground of driving sword flight.The role shows: cancellation is chosen the role and is disappeared, and can do feature by this and divide mirror, also can make the phantom camera lens that the role constantly disappears and manifests.Absolute coordinates: the absolute position of the map at role place.
Role's action key frame comprises role's various bone action datas, can change broadcasting speed, can separately go up lower part of the body combination action or double, wherein upper and lower extremities action can be added respectively upper body and the lower part of the body moves to make up new element, drink such as being seated, double priority is the highest, can cover upper lower part of the body action key frame separately.Editor to the action key frame also can comprise keyword filtration: it can find the action of wanting fast, and for example light merit action is filtered: punching, left and right, move back, jumping, whirlwind; Circulation and single: refer to respectively move repeat playing and single play, it is motionless in last action to fix.Choose above various parameters and just can add the action key frame.
The role action key frame comprises at least a default or by user-defined bone action data, described bone action data can comprise propulsion (FK) bone and/or reverse movement (IK) bone, wherein the FK bone is by making the action of individual character to the trickle adjustment of bone, adjust the role and reach certain attitude, need one by one the angle of rotation of associated bone to be regulated.In the IK bone, reach identical effect, only need to drag terminal bone.Give an example, if will do an arm to the action of front raise, in FK, need to regulate two bones of ancon and shoulder and realize, and in IK, then only need to be set to shoulder by IK root bone, then drag wrist to the dead ahead, can realize that arm is to the effect of front raise.The IK bone comprises that bone retrains and the control of IK bone, the first step: generate the bone constraint, because the bone of any animal all is (the impossible 360 degree all-direction rotations) that limit rotation is arranged, so in order to prevent strange attitude.So will give the certain constraint of these bones.Second step: add the control of IK bone, just as adding the control of FK bone, carry out the IK bone and regulate, also need certain bone is joined in the IK control table.Contain the role action key frame of IK bone control by the relative displacement of IK technical notes IK master's bone and IK root bone, the role action key frame that contains the control of FK bone records role's sub-bone with respect to the rotation of father's bone.
Expression key frame record role's expression action realizes role's expression playback.
For the role bindings key frame, the dependence that it is used for solving between role and the role was bonded to the role on another role within a certain period, for example the people was bundled at once, realized riding.
About role group, it is used for making the scene that needs a large amount of same role, for example contains tens of, hundreds of even thousands of above roles' fight scene.Wherein role group is one or more replisomes of role master's mould, all key frames and the profile of each replisome copy role master mould, replisome is different in the position in space from role master's mould, and position, wide-angle and the video camera Y-axis of video camera displacement key frame record video camera is around the anglec of rotation of X-axis.Can create like a cork grand scene thus.
The post-processed module is used for by graph and image processing technological adjustment picture, and preferably, it can use the technology such as DOF, HDR, BLOOM, GODRAY, HSI.