CN110097630B - Method and device for generating universal camera in 3D animation production and storage medium - Google Patents

Method and device for generating universal camera in 3D animation production and storage medium Download PDF

Info

Publication number
CN110097630B
CN110097630B CN201910268562.7A CN201910268562A CN110097630B CN 110097630 B CN110097630 B CN 110097630B CN 201910268562 A CN201910268562 A CN 201910268562A CN 110097630 B CN110097630 B CN 110097630B
Authority
CN
China
Prior art keywords
camera
key frame
model
animation
original
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
CN201910268562.7A
Other languages
Chinese (zh)
Other versions
CN110097630A (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.)
Yhkt Entertainment Co ltd
Original Assignee
Yhkt Entertainment 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 Yhkt Entertainment Co ltd filed Critical Yhkt Entertainment Co ltd
Priority to CN201910268562.7A priority Critical patent/CN110097630B/en
Publication of CN110097630A publication Critical patent/CN110097630A/en
Application granted granted Critical
Publication of CN110097630B publication Critical patent/CN110097630B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration

Abstract

The invention discloses a method and a device for generating a universal camera in 3D animation production and a storage medium. Wherein the method comprises: creating a single point camera synchronized with an original camera key frame or key frame set; respectively acquiring gesture data and shooting data of the original camera in each key frame of the original camera; applying the attitude data and the shooting data corresponding to the key frame or the key frame set to the single-point camera as a non-associated camera; storing the unassociated camera. According to the method, the corresponding single-point camera can be created in any scene according to the posture and parameters of the original camera and used for exporting or baking; the problem that the original camera contains other relation conditions after being exported is solved, and the probability of errors when the camera loads other animation software is reduced.

Description

Method and device for generating universal camera in 3D animation production and storage medium
Technical Field
The invention relates to the field of three-dimensional modeling, in particular to a generation device of a general camera in 3D animation production.
Background
The charting baking is to render the light energy transmission information in the 3D animation software into a charting; and loading the baked map into a model in the scene. In 3D animation production, in order to ensure the stability and high efficiency of a scene; a baking of a key frame or a set of key frames is required for a camera to be rendered in a scene. The camera generated by baking the key frame or key frame set in the scene file can be further and independently applied to other animation software for a production process. However, when the scene file is numerous and complicated, the camera may be limited by relationship conditions such as other nodes, expressions, constraint relationships, animation layers, transformation nodes and the like; the camera generated by baking the existing key frame or key frame set can be associated with the relationship condition, so that when the camera is imported into other animation software, redundant relationship conditions are included, and loading errors of other animation software are caused.
Disclosure of Invention
The embodiment of the invention at least discloses a generation method of a universal camera in 3D animation production, which can solve the problem that the camera contains other relation conditions after being exported and reduce the probability of errors when the camera loads other animation production software.
The method comprises the following steps:
creating a single point camera that is synchronized with an original camera key frame or key frame set;
respectively acquiring gesture data and shooting data of the original camera in each key frame of the original camera;
applying the attitude data and the shooting data corresponding to the key frame or the key frame set to the single-point camera as a non-associated camera;
storing the unassociated camera.
In some embodiments of the present disclosure, at each key frame of the original camera, the pose data of the original camera is acquired separately and configured to:
creating a locator;
constraining the locator to an original camera;
and respectively acquiring positioning data of the positioner as the attitude data in each key frame of the original camera.
In some embodiments of the present disclosure, the positioning data includes a coordinate position and a rotation angle of the positioner.
In some embodiments of the present disclosure, the shot data includes a film size of the original camera and a camera focal length.
In some embodiments of the present disclosure, the animated model of the unassociated camera at the key frame or the set of key frames is baked on a frame-by-frame basis.
In some embodiments of the present disclosure, baking the animated model of the unassociated camera at the key frame or the set of key frames is configured to:
generating all model nodes of the animation model in the scene;
acquiring the visual field range of the non-associated camera in the animation model in the current key frame;
extracting the model nodes covered by the visual field range in the current key frame;
generating a compression model according to the covered model nodes;
baking the compressed model of the unassociated camera at the current key frame.
In some embodiments of the present disclosure, a compression model is generated from the overlaid model nodes, configured to:
the model nodes are surface point clouds of the animation model;
acquiring the surface point cloud of the animation model covered by the visual field range;
according to any surface point cloud as an origin, extending preset coordinates outside the view range on the surface of the animation model;
and intercepting part of the animation model into the compressed model according to the extended surface point cloud.
The embodiment of the invention at least discloses a storage medium, wherein the storage medium stores at least one program, and the program realizes the steps of the method when being executed by an executor.
The embodiment of the invention at least discloses a generating device of a universal camera in 3D animation production.
The device comprises:
a camera creation module configured to acquire an original camera and create a single point camera that is synchronized with the original camera key frame or key frame set;
a pose synchronization module configured to acquire pose data of the original camera at each key frame;
the parameter synchronization module is configured to acquire shooting data of the original camera in each key frame;
a camera application module configured to apply the pose data and the photographing data corresponding to the key frame or the key frame set to the single-point camera as a non-associated camera;
a camera baking module configured to bake an animated model of the unassociated camera at the key frame or the set of key frames on a frame-by-frame basis.
In some embodiments of the present disclosure, the apparatus includes a camera storage module;
the camera storage module is configured to store the unassociated camera.
In view of the above, other features and advantages of the disclosed exemplary embodiments will become apparent from the following detailed description of the disclosed exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a block diagram of an embodiment generating apparatus;
FIG. 2 is a flow chart of an embodiment generation method.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, as disclosed in the accompanying drawings, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment provides a generation device of a general camera in 3D animation production. The device is put into three-dimensional animation software such as maya and 3Dmax, for example, as a plug-in xp _ exportBakCam. The architecture of xp _ exportbakcam.mel is shown in fig. 1, and includes a camera creation module, a pose synchronization module, a parameter synchronization module, a camera application module, and a camera baking module. After the original camera is configured with a key frame or set of key frames, xp _ exportbakcam.
Mel, the modules described above are executed or partially executed in order.
The camera creation module, when executed, creates single point cameras synchronized to the keyframes or keyframe sets of the selected original cameras, the number of single point cameras configured according to the selection.
When the pose synchronization module is executed, the single-point camera is created, and a locator constrained by the original camera is created, and the locator can record the coordinate position and the rotation angle of the original camera under each key frame, and even other pose-related information, which is not limited in this embodiment.
The parameter synchronization module is executed to record the film size and camera focal length of the original camera at each key frame, and even other parameters related to the camera.
The camera application module is executed after the execution of the three modules, and is used for applying the gesture data and the shooting data of the corresponding original camera to each key frame of the single-point camera, so that the coordinate position, the angle, the shooting parameters and the like of the single-point camera in the scene are consistent with those of the original camera, and the coordinate position, the angle, the shooting parameters and the like are used as relation conditions that the non-associated camera is not associated to other nodes.
The camera baking module is executed after the camera application module is executed, and the animation model of the non-associated camera in the current key frame can be baked one by one.
After the camera application module is executed, a general-purpose camera that can be commonly used in other animation software is stored under the set path by a camera storage module of the animation software. Meanwhile, the camera storage module can store the animation model map baked by the non-associated camera in each key frame under the set path after the animation model of the associated camera is baked.
Further, the camera baking module can perform the following steps when baking the animated model of the non-associated camera at the current key frame.
S100, generating all surface point clouds of the surfaces of the animation models in the scene.
S200, the visual field range of the non-associated camera in the animation model in the current key frame is obtained.
S300, extracting the surface point cloud of the animation model covered by the visual field range in the current key frame.
S400, according to any point cloud of the surface, taking the point cloud of the surface as an origin, extending preset coordinates outside the view range on the surface of the animation model;
s500, intercepting the part of the animation model as the compressed model according to the extended surface point cloud.
Referring to fig. 2, when xp _ exportbakcam.mel is executed in maya, the generation flow of the universal camera in maya is implemented as follows.
S100, a single-point camera synchronized with an original camera key frame or a key frame set is created through a camera creation module;
s200 creates a locator through the pose synchronization module and constrains the locator to the original camera.
S300, respectively acquiring the coordinate position and the rotation angle of the locator as the postures of the original camera such as the posture data and the like at each key frame of the original camera through a posture synchronization module.
S400, parameters of the original camera, such as the film size of the original camera, the camera focal length and the like, are respectively acquired in each key frame of the original camera through a parameter synchronization module.
S500, the gesture data and the shooting data corresponding to the key frame or the key frame set are applied to the single-point camera through a camera application module, and the single-point camera is a non-associated camera.
S600, baking the animation model of the non-associated camera in the key frame or the key frame set frame by frame through a camera baking module.
S700, storing, by the camera storage module of maya, the unassociated camera and the animated mockup map of the unassociated camera baked under each key frame.
In order to further illustrate the embodiments of the invention. The present embodiment discloses a storage medium. Wherein the storage medium stores a plurality of programs that are executable by the executor for performing the steps as described above for xp _ exportBakCam.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1. A method for generating a general camera in 3D animation production is characterized by comprising the following steps:
creating a single point camera that is synchronized with an original camera key frame or key frame set;
respectively acquiring gesture data and shooting data of the original camera in each key frame of the original camera;
applying the attitude data and the shooting data corresponding to the key frame or the key frame set to the single-point camera as a non-associated camera;
baking, frame by frame, an animated model of the unassociated camera at the key frame or the set of key frames;
storing the unassociated camera.
2. The method of generating a universal camera for 3D animation according to claim 1, wherein the pose data of the original camera is acquired separately for each key frame of the original camera, and is configured to: creating a locator;
constraining the locator to an original camera;
and respectively acquiring positioning data of the positioner as the gesture data in each key frame of the original camera.
3. The method of claim 2, wherein the positioning data includes a coordinate position and a rotation angle of the positioner.
4. The method of claim 1, wherein the shot data includes a film size of the original camera and a camera focal length.
5. The method of generating a universal camera for 3D animation according to claim 1, wherein baking the animation model of the unassociated camera at the key frame or the set of key frames is configured to: generating all model nodes of the animation model in the scene;
acquiring the visual field range of the non-associated camera in the animation model in the current key frame;
extracting the model nodes covered by the visual field range in the current key frame;
generating a compression model according to the covered model nodes;
baking the compressed model of the unassociated camera at the current key frame.
6. The method of generating a universal camera for 3D animation according to claim 5, wherein a compression model is generated from the overlaid model nodes, configured to: the model nodes are surface point clouds of the animation model;
acquiring the surface point cloud of the animation model covered by the visual field range; according to any surface point cloud as an origin, extending preset coordinates outside the view range on the surface of the animation model;
and intercepting part of the animation model into the compressed model according to the extended surface point cloud.
7. A storage medium storing at least one program which, when executed by an executor, performs the steps of the method of claim 1.
8. An apparatus for generating a general-purpose camera for 3D animation, the apparatus comprising:
a camera creation module configured to acquire an original camera and create a single point camera that is synchronized with the original camera key frame or key frame set;
a pose synchronization module configured to acquire pose data of the original camera at each key frame;
the parameter synchronization module is configured to acquire shooting data of the original camera in each key frame;
a camera application module configured to apply the pose data and the photographing data corresponding to the key frame or the key frame set to the single-point camera as a non-associated camera;
a camera baking module configured to bake an animated model of the unassociated camera at the key frame or the set of key frames on a frame-by-frame basis.
9. The apparatus for generating a universal camera for 3D animation according to claim 8, wherein the apparatus comprises a camera storage module;
the camera storage module is configured to store the unassociated camera.
CN201910268562.7A 2019-04-04 2019-04-04 Method and device for generating universal camera in 3D animation production and storage medium Active CN110097630B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910268562.7A CN110097630B (en) 2019-04-04 2019-04-04 Method and device for generating universal camera in 3D animation production and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910268562.7A CN110097630B (en) 2019-04-04 2019-04-04 Method and device for generating universal camera in 3D animation production and storage medium

Publications (2)

Publication Number Publication Date
CN110097630A CN110097630A (en) 2019-08-06
CN110097630B true CN110097630B (en) 2022-06-14

Family

ID=67444342

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910268562.7A Active CN110097630B (en) 2019-04-04 2019-04-04 Method and device for generating universal camera in 3D animation production and storage medium

Country Status (1)

Country Link
CN (1) CN110097630B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106600665A (en) * 2016-12-01 2017-04-26 北京像素软件科技股份有限公司 Camera animation path generating method and device
CN106780675A (en) * 2016-12-01 2017-05-31 厦门幻世网络科技有限公司 A kind of method and apparatus for showing animation
CN106934827A (en) * 2015-12-31 2017-07-07 杭州华为数字技术有限公司 The method for reconstructing and device of three-dimensional scenic
CN108564617A (en) * 2018-03-22 2018-09-21 深圳岚锋创视网络科技有限公司 Three-dimensional rebuilding method, device, VR cameras and the panorama camera of more mesh cameras

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106934827A (en) * 2015-12-31 2017-07-07 杭州华为数字技术有限公司 The method for reconstructing and device of three-dimensional scenic
CN106600665A (en) * 2016-12-01 2017-04-26 北京像素软件科技股份有限公司 Camera animation path generating method and device
CN106780675A (en) * 2016-12-01 2017-05-31 厦门幻世网络科技有限公司 A kind of method and apparatus for showing animation
CN108564617A (en) * 2018-03-22 2018-09-21 深圳岚锋创视网络科技有限公司 Three-dimensional rebuilding method, device, VR cameras and the panorama camera of more mesh cameras

Also Published As

Publication number Publication date
CN110097630A (en) 2019-08-06

Similar Documents

Publication Publication Date Title
CN109658365B (en) Image processing method, device, system and storage medium
CN108563742B (en) Method for automatically creating artificial intelligence image recognition training material and labeled file
US20230186434A1 (en) Defocus operations for a virtual display with focus and defocus determined based on camera settings
CN110415323B (en) Fusion deformation coefficient obtaining method, fusion deformation coefficient obtaining device and storage medium
US11232595B1 (en) Three-dimensional assembly for motion capture calibration
US11010952B1 (en) Method and user interface for generating tangent vector fields usable for generating computer-generated imagery
CN110097630B (en) Method and device for generating universal camera in 3D animation production and storage medium
US11682156B2 (en) Method for controlling digital feather growth between two manifolds in a computer simulated creature
US11443450B2 (en) Analyzing screen coverage of a target object
US20220051478A1 (en) Method for Generating Splines Based on Surface Intersection Constraints in a Computer Image Generation System
US11282233B1 (en) Motion capture calibration
CN111640056B (en) Model adaptive deformation method and system
US20220076451A1 (en) Motion capture calibration using a three-dimensional assembly
US20220076452A1 (en) Motion capture calibration using a wand
WO2022264519A1 (en) Information processing device, information processing method, and computer program
WO2023028777A1 (en) Method and apparatus for automatically generating labeled image, and computer storage medium
CN117974897A (en) AI simulation method, system, device and medium based on digital twin
WO2022055370A1 (en) Motion capture calibration using a three-dimensional assembly
WO2023026089A1 (en) A three-dimensional assembly for motion capture calibration
CN117916764A (en) Apparatus, method and computer program for modeling images captured by anamorphic lenses

Legal Events

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