Method, device, electronic device and storage medium for generating film and television animation
By obtaining room type information to generate camera and furniture animations, synthesize film and television animations, the problem of low user experience in complex scenes is solved, and efficient and immersive film and television animation generation is achieved.
Patent Information
- Application Number
- CN202210163332.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-22
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-02-22
AI Technical Summary
The existing three-dimensional film and television animation generation technology requires users to process animation information based on experience in complex scenes, resulting in a decrease in user experience, increasing costs, and the generated animations are prone to chaos.
By obtaining room type information, generating camera animations and furniture animations, and then synthesizing film and television animations, optimizing user perspectives and furniture layouts, and enhancing immersion.
There is no need for users to manually process the apartment information, saving labor costs, and significantly improving the immersion effect and generation efficiency of film and television animations.
Smart Images

Figure CN114529638B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video processing technology, and more specifically, to a method, device, electronic device and computer-readable storage medium for generating film and television animation. Background Art
[0002] As one of the main applications in the current film and television industry, 3D video animation refers to the technology of processing a series of dynamic image frames and using a real-time rendering tracker to render the output video to achieve the effect of a virtual reality scene.
[0003] In the field of home decoration design, 3D video animation generation technology has become one of the ways for designers to show the design effects of their solutions and allow users to experience the real design effects in virtual scenes. However, when the existing technical solutions are used for complex scenes, users are required to process the animation information based on their experience, which reduces the user experience. In particular, the model animation sequence requirements of complex scenes and the dependency relationship between the animation sequences of models greatly increase the cost of users processing the input model animation information, which can easily cause confusion in the animation generation in the scene and further reduce the user experience. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a method, device, electronic device and computer-readable storage medium for generating film and television animations, which can generate film and television animations with immersive effects based on housing type information input by users, without requiring users to process the housing type information. While saving labor costs, the immersive effect of the generated film and television animations is improved.
[0005] In a first aspect, an embodiment of the present application provides a method for generating a film and television animation, the method comprising:
[0006] Get apartment information;
[0007] generating a camera animation according to the space information in the apartment type information;
[0008] Generate furniture animation according to the furniture information in the apartment information;
[0009] A film and television animation is generated according to the camera animation and the furniture animation.
[0010] In the above implementation process, the apartment type information is first obtained. Unlike the prior art, the embodiment of the present application does not generate film and television animations by processing the apartment type information based on the user's experience, but first generates a camera animation based on the spatial information in the apartment type information, then generates a furniture animation based on the furniture information in the apartment type information, and finally generates a film and television animation based on the camera animation and the furniture animation. The embodiment of the present application takes into account that the main factor affecting the user's immersive experience of watching film and television animations is the user's perspective when observing various objects in the apartment type, and furniture is an important object of attention when the user watches film and television animations. Therefore, the camera animation is first generated and then the furniture animation is generated. On this basis, the film and television animation is generated, thereby enhancing the user's sense of immersion when watching film and television animations.
[0011] Furthermore, the step of generating a camera animation according to the space information in the apartment type information includes:
[0012] Initialize the camera viewing angle parameters;
[0013] Traversing multiple space information in the apartment type information, where the multiple spaces belong to different apartment type areas;
[0014] Obtain the aisle area and entry point in each space information;
[0015] Obtain the apartment area to which the corridor area belongs;
[0016] Constructing a camera motion trajectory according to the entry location point, the apartment area to which the corridor area belongs, and a preset apartment area preview sequence;
[0017] Set the direction of the camera in the camera motion trajectory;
[0018] The camera animation is generated according to the camera motion trajectory.
[0019] In the above implementation process, the camera viewing angle parameters are initialized, multiple spatial information in the apartment information are traversed, the aisle area and the entrance location point in the multiple spatial information are obtained, the camera motion trajectory is constructed according to the above information, the preset apartment area browsing order, and the apartment area to which the multiple spatial information belongs, and finally the camera animation is constructed according to the camera motion trajectory. In particular, after determining the camera motion trajectory, the embodiment of the present application also determines the direction of the camera in the camera motion trajectory, thereby enhancing the user's immersion when watching film and television animations.
[0020] Furthermore, the step of setting the orientation of the camera in the camera motion trajectory includes:
[0021] The orientation of the camera is set according to the current space where the camera is located in the camera motion trajectory.
[0022] In the above implementation process, based on the determination of the camera motion trajectory, the camera orientation in the camera motion trajectory is determined. The camera motion orientation is related to the user's viewing angle when viewing the furniture. Therefore, in order to enhance the sense of immersion, the embodiment of the present application proposes setting the orientation of the camera according to the current space where the camera is located in the camera motion trajectory.
[0023] Furthermore, the step of setting the orientation of the camera according to the current space where the camera is located in the camera motion trajectory includes:
[0024] The current orientation of the camera is set according to the apartment area to which the current space belongs.
[0025] In the above implementation process, based on the proposal of setting the camera orientation according to the current space, the embodiment of the present application proposes setting the camera orientation according to the apartment area to which the current space belongs. This is because users have different focus objects when observing different spaces. Therefore, setting the camera orientation according to the apartment area to which the current space belongs can enhance the user's sense of immersion when watching film and television animations.
[0026] Furthermore, the step of determining the current orientation of the camera according to the apartment area to which the current space belongs includes:
[0027] If the current space is a living room / dining room, the camera orientation corresponding to the first wall of the living room / dining room is set to be perpendicular to the camera motion trajectory, the camera orientation corresponding to the second wall of the living room / dining room is set to be parallel to the camera motion trajectory, and the angle formed by the camera orientation corresponding to the third wall of the living room / dining room and the camera motion trajectory is a first degree;
[0028] If the current space is a bedroom, the camera orientation corresponding to the fourth wall of the bedroom is set to be perpendicular to the camera motion trajectory, and the camera orientation corresponding to the fifth wall of the bedroom is set to be parallel to the camera motion trajectory.
[0029] In the above implementation process, by setting the corresponding camera orientations for different apartment areas, the user's sense of immersion when watching film and television animations can be enhanced.
[0030] Furthermore, the step of generating the camera animation according to the camera motion trajectory comprises:
[0031] A camera rotation animation is added to the camera motion trajectory to obtain the camera animation.
[0032] In the above implementation process, by adding the camera corner animation in the camera motion trajectory, the entire film and television animation can be made more natural when converting in different spaces, which can further enhance the user's immersion when watching the film and television animation.
[0033] Furthermore, the step of generating furniture animation according to the furniture information in the apartment type information includes:
[0034] Obtain all furniture information in the apartment information;
[0035] Obtain the initialization animation template corresponding to all the furniture information;
[0036] Obtaining the visual field angle of the camera;
[0037] Determine the intersection point between each piece of furniture information and the camera motion trajectory;
[0038] Obtain the distance from each piece of furniture information to the intersection point;
[0039] Filtering the furniture information in the non-visualized area in the apartment information according to the distance from each piece of furniture information to the intersection and the visual field angle of the camera to obtain filtered furniture information;
[0040] The furniture animation is obtained according to the initialization animation template corresponding to the filtered furniture information.
[0041] In the above implementation process, a method for generating furniture animation is provided, which filters the furniture information according to the positional relationship between the camera motion trajectory and the furniture information and the camera's visual field angle. This can reduce the size of the generated film and television animation while making the layout of the picture the same as the layout of the furniture in reality, thereby enhancing the user's immersion when watching.
[0042] Furthermore, before the step of obtaining the furniture animation according to the initialization animation template corresponding to the filtered furniture information, the method further includes:
[0043] Traversing the floor-standing furniture in the apartment information;
[0044] Determining the inclusion relationship of the floor-standing furniture;
[0045] Adjusting the template corresponding to the filtered furniture information according to the inclusion relationship of the floor-standing furniture to obtain an adjusted template;
[0046] The step of obtaining the furniture animation according to the initialization animation template corresponding to the filtered furniture information comprises:
[0047] The furniture animation is generated according to the adjustment template.
[0048] In the above implementation process, in order to enhance the immersion of the film and television animation, the initialization animation template is adjusted according to the inclusion relationship of multiple floor-standing furniture to obtain an adjusted template, and the furniture animation is generated according to the adjusted template.
[0049] In a second aspect, an embodiment of the present application provides a video animation generation device, including:
[0050] The acquisition module is used to obtain apartment type information;
[0051] A camera animation generation module, used to generate camera animation according to the space information in the apartment type information;
[0052] A furniture animation generation module, used to generate furniture animation according to the furniture information in the apartment type information;
[0053] The film and television animation generation module generates the film and television animation according to the camera animation and the furniture animation.
[0054] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in any one of the first aspects when executing the computer program.
[0055] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which instructions are stored. When the instructions are executed on a computer, the computer executes the method as described in any one of the first aspects.
[0056] Other features and advantages disclosed in the present application will be described in the following description, or some features and advantages can be inferred or determined without doubt from the description, or can be learned by implementing the above-mentioned technology disclosed in the present application.
[0057] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0059] Figure 1 A schematic diagram of a process for generating a film and television animation according to an embodiment of the present application;
[0060] Figure 2 A schematic diagram of a process for generating a camera animation provided in an embodiment of the present application;
[0061] Figure 3A schematic diagram of a process for generating furniture animation provided in an embodiment of the present application;
[0062] Figure 4 A schematic diagram of the structure of a video animation generating device provided in an embodiment of the present application;
[0063] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0065] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0066] Example 1
[0067] join Figure 1 The present application embodiment provides a method for generating a film and television animation, the method comprising:
[0068] S1: Get apartment information;
[0069] After acquiring the apartment type information, the data type of the apartment type information may be converted so that the converted apartment type information can meet the requirements for generating an animation.
[0070] S2: Generate camera animation based on the spatial information in the apartment type information;
[0071] S3: Generate furniture animation according to furniture information in the apartment information;
[0072] In order to further speed up the generation of film and television animations, the house type information can be classified and sorted according to space before S2.
[0073] S4: Generate film and television animation based on camera animation and furniture animation.
[0074] In the above implementation process, the apartment type information is first obtained. Unlike the prior art, the embodiment of the present application does not generate film and television animations by processing the apartment type information based on the user's experience, but first generates a camera animation based on the spatial information in the apartment type information, then generates a furniture animation based on the furniture information in the apartment type information, and finally generates a film and television animation based on the camera animation and the furniture animation. The embodiment of the present application takes into account that the main factor affecting the user's immersive experience of watching film and television animations is the user's perspective when observing various objects in the apartment type, and furniture is an important object of attention when the user watches film and television animations. Therefore, the camera animation is first generated and then the furniture animation is generated. On this basis, the film and television animation is generated, thereby enhancing the user's sense of immersion when watching film and television animations.
[0075] Example 2
[0076] See also Figure 2 , an embodiment of the present application provides a method for generating a camera animation, comprising:
[0077] S21: Initialize camera viewing angle parameters;
[0078] S22: traverse multiple space information in the apartment type information, where the multiple spaces belong to different apartment type areas;
[0079] S23: Obtaining the aisle area and the entry point in each piece of spatial information;
[0080] S24: Obtain the apartment area to which the corridor area belongs;
[0081] S25: constructing a camera motion trajectory according to the entry location point, the apartment area to which the corridor area belongs, and a preset apartment area preview sequence;
[0082] S26: Set the direction of the camera in the movement trajectory;
[0083] S27: Generate camera animation according to the camera motion trajectory.
[0084] In the above embodiments, the apartment areas include the living room, bedroom, dining room, entrance hall, etc., the aisle area refers to the aisle between multiple spaces, and the entry point refers to the entry point of the bedroom, dining room, living room, etc.
[0085] Specifically, S26 includes: the entry position point and the middle of multiple aisle areas are connected into a line.
[0086] In the above implementation process, the camera parameters are initialized so that the parameters of the initialized camera can be adjusted according to different scene requirements, multiple spatial information in the apartment information are traversed, the aisle area and the entrance location points in the multiple spatial information are obtained, and the camera motion trajectory is constructed according to the apartment area browsing order preset in the above information and the apartment area to which the multiple spatial information belongs, and finally the camera animation is constructed according to the camera motion trajectory. In particular, after determining the camera motion trajectory, the embodiment of the present application also determines the direction of the camera in the camera motion trajectory, thereby enhancing the user's immersion when watching film and television animations.
[0087] Preferably, in order to enhance the immersiveness of the obtained film and television animation, the preset preview order of the apartment area is living room, dining room, bedroom.
[0088] It should be noted that the generation of camera animation in the above embodiment does not necessarily mean the generation of camera animation video, and the relevant information of the camera animation may be stored for subsequent synthesis of film and television animation.
[0089] In a possible implementation, S26 includes:
[0090] Sets the camera's orientation based on its current position in space within the camera's motion trajectory.
[0091] In the above implementation process, based on the proposal of setting the camera orientation according to the current space, the embodiment of the present application proposes setting the camera orientation according to the apartment area to which the current space belongs. This is because users have different focus objects when observing different spaces. Therefore, setting the camera orientation according to the apartment area to which the current space belongs can enhance the user's sense of immersion when watching film and television animations.
[0092] In a possible implementation, the step of setting the orientation of the camera according to the current space where the camera is located in the camera motion trajectory includes: determining the orientation of the current camera according to the apartment area to which the current space belongs.
[0093] In a possible implementation, the step of determining the direction of the current camera according to the apartment area to which the current space belongs includes:
[0094] If the current space is a living room / dining room, determine that the camera orientation corresponding to the first wall of the living room / dining room is perpendicular to the camera motion trajectory, the camera orientation corresponding to the second wall of the living room / dining room is parallel to the camera motion trajectory, and the angle between the camera orientation corresponding to the third wall of the living room / dining room and the camera motion trajectory is the first degree;
[0095] Preferably, the first degree is 60°.
[0096] If the current space is a bedroom, the camera orientation corresponding to the fourth wall of the bedroom is perpendicular to the camera motion trajectory, and the camera orientation corresponding to the fifth wall of the bedroom is parallel to the camera motion trajectory.
[0097] It is understandable that different apartment areas have different numbers of walls in the camera animation, with the living room and dining room corresponding to three walls and the bedroom having two walls.
[0098] In the above implementation process, by setting the corresponding camera orientations for different apartment areas, the user's sense of immersion when watching film and television animations can be enhanced.
[0099] In a possible implementation, the step of generating a camera animation according to the camera motion trajectory includes:
[0100] Add the camera corner animation to the camera motion trajectory to get the camera animation.
[0101] In the above implementation process, by adding the camera corner animation in the camera motion trajectory, the entire film and television animation can be made more natural when converting in different spaces, which can further enhance the user's immersion when watching the film and television animation.
[0102] Example 3
[0103] See also Figure 3 , the embodiment of the present application provides a method for generating furniture animation, including:
[0104] S31: Obtain all furniture information in the apartment information;
[0105] S32: Obtaining the initialization animation template corresponding to all furniture information;
[0106] The content of the template includes: animation name, animation type, animation duration, animation start time, animation end time, animation start position, animation end position, etc.; the types of templates include: descending animation, growing animation, etc. For example, ceiling furniture corresponds to descending animation template, wall furniture corresponds to growing animation template, and floor furniture corresponds to growing animation template.
[0107] S33: Obtain the visual field angle of the camera;
[0108] S34: determining the intersection of each piece of furniture information with the camera motion trajectory;
[0109] S35: Obtain the distance from each piece of furniture information to the intersection point;
[0110] S36: filtering the furniture information in the non-visualized area in the apartment information according to the distance from each piece of furniture information to the intersection point and the visual field angle of the camera to obtain filtered furniture information;
[0111] S37: Obtain furniture animation according to the initialization animation template corresponding to the filtered furniture information.
[0112] In the above implementation process, the embodiment of the present application provides a method for generating furniture animation, which filters the furniture information according to the positional relationship between the camera motion trajectory and the furniture information, and the camera's visual field angle. It can reduce the capacity of the generated film and television animation while making the layout of the picture the same as the layout of the furniture in reality, thereby enhancing the user's immersion when watching.
[0113] It should be noted that the generation of furniture animation in the above embodiment does not necessarily mean the generation of furniture animation video, and the relevant information of the camera animation may be stored for subsequent synthesis of film and television animation.
[0114] In a possible implementation manner, after S36, the method further includes:
[0115] Traverse the floor-standing furniture in the apartment information;
[0116] Determine the inclusion of floor-standing furniture;
[0117] For example, there is a sofa and a table on a carpet, and there is a containment relationship between the table and the carpet, and there is a containment relationship between the sofa and the carpet. If there are a vase and a book on the table, there is a containment relationship between the vase, the book and the table respectively.
[0118] Adjusting the template corresponding to the filtered furniture information according to the inclusion relationship of the floor-standing furniture to obtain an adjusted template;
[0119] S37 includes: generating furniture animation according to the adjustment template. For example, for a table and a vase, the initialization animation templates of the two are both ground-closed animations. If there is an inclusion relationship, the initialization animation template corresponding to the table is ground-closed animation, and the initialization animation template of the vase is adjusted to a growing animation.
[0120] When obtaining the initialization templates corresponding to all furniture, it is not determined whether there is an inclusion relationship between the furniture. Therefore, the initialization templates of the two are ground animations. After it is determined that there is an inclusion relationship between the two, the animation template of the vase needs to be reinitialized, and the initialization animation template of the vase is adjusted to a growth animation. The specific process is as follows: first obtain the growth animation template, then calculate the position information parameters of the vase growth animation and calculate the playback time of the vase growth animation according to the playback time of the table animation, and then modify the parameters corresponding to the growth animation template to obtain the adjustment template corresponding to the vase.
[0121] In order to facilitate the determination of the inclusion relationship, before step S36, the templates corresponding to the furniture may be sorted according to the size of the furniture area to obtain a template sequence.
[0122] In the above implementation process, in order to enhance the immersion of the film and television animation, the initialization animation template is adjusted according to the inclusion relationship of multiple floor-standing furniture to obtain an adjusted template, and the furniture animation is generated according to the adjusted template.
[0123] Based on Embodiments 1 to 3, the present application provides an implementation of S4, including:
[0124] Calculate the camera information of each image frame according to the camera animation and the camera video frequency frame;
[0125] Calculate furniture information of each image frame based on furniture animation and camera video frames;
[0126] Import camera information and furniture information into the ray tracer to generate film and television animations.
[0127] Example 4
[0128] See also Figure 4 , the embodiment of the present application provides a video animation generation device, including:
[0129] Acquisition module 1, used to obtain apartment type information;
[0130] The camera animation generation module 2 is used to generate the camera animation according to the space information in the apartment type information;
[0131] The furniture animation generation module 3 is used to generate furniture animation according to the furniture information in the apartment type information;
[0132] The film and television animation generation module 4 generates film and television animation according to the camera animation and the furniture animation.
[0133] In a possible implementation, the camera animation generation module 2 is also used to initialize the camera viewing angle parameters; traverse multiple spatial information in the apartment type information, and the multiple spatial information belong to different apartment type areas; obtain the aisle area and the entry position point in each spatial information; obtain the apartment type area to which the aisle area belongs; construct a camera motion trajectory according to the entry position point, the apartment type area to which the aisle area belongs, and a preset apartment type area preview sequence; set the direction of the camera in the motion trajectory; and generate a camera animation according to the camera motion trajectory.
[0134] In a possible implementation, the camera animation generation module 2 is further configured to set the direction of the camera in the current space where the camera is located in the motion trajectory.
[0135] In a possible implementation manner, the camera animation generation module 2 is further configured to set the orientation of the current camera according to the apartment area to which the current space belongs.
[0136] In a possible implementation, the camera animation generation module 2 is also used to, if the current space is a living room / dining room, set the camera direction corresponding to the first wall of the living room / dining room to be perpendicular to the camera motion trajectory, the camera direction corresponding to the second wall of the living room / dining room to be parallel to the camera motion trajectory, and the angle between the camera direction corresponding to the third wall of the living room / dining room and the camera motion trajectory to be a first degree; if the current space is a bedroom, set the camera direction corresponding to the fourth wall of the bedroom to be perpendicular to the camera motion trajectory, and the camera direction corresponding to the fifth wall of the bedroom to be parallel to the camera motion trajectory.
[0137] In a possible implementation, the camera animation generation module 2 is further configured to add a camera rotation angle animation to the camera motion trajectory to obtain a camera animation.
[0138] In a possible implementation, the furniture animation generation module 3 is also used to obtain all furniture information in the apartment information; obtain the initialization animation template corresponding to all furniture information; obtain the visual field angle of the camera; determine the intersection of each piece of furniture information and the camera motion trajectory; obtain the distance from each piece of furniture information to the intersection; filter the furniture information in the non-visualized area of the apartment information according to the distance from each piece of furniture information to the intersection and the visual field angle of the camera to obtain the filtered furniture information; and obtain the furniture animation according to the initialization animation template corresponding to the filtered furniture information.
[0139] In a possible implementation, the furniture animation generation module 3 is also used to traverse the floor furniture in the apartment information; determine the inclusion relationship of the floor furniture; adjust the template corresponding to the filtered furniture information according to the inclusion relationship of the floor furniture to obtain an adjusted template; and generate furniture animation according to the adjusted template.
[0140] This application also provides an electronic device, see Figure 5 , Figure 5 A block diagram of an electronic device provided in an embodiment of the present application. The electronic device may include a processor 510, a communication interface 520, a memory 530, and at least one communication bus 540. The communication bus 540 is used to realize direct connection and communication between these components. The communication interface 520 of the electronic device in the embodiment of the present application is used to communicate signaling or data with other node devices. The processor 510 may be an integrated circuit chip with signal processing capabilities.
[0141] The processor 510 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or the processor 510 can also be any conventional processor, etc.
[0142] The memory 530 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc. The memory 530 stores computer-readable instructions, and when the computer-readable instructions are executed by the processor 510, the electronic device may execute the various steps involved in the above-mentioned embodiments.
[0143] Optionally, the electronic device may further include a storage controller and an input / output unit.
[0144] The memory 530, storage controller, processor 510, peripheral interface, input and output unit components are directly or indirectly electrically connected to each other to achieve data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses 540. The processor 510 is used to execute executable modules stored in the memory 530, such as software function modules or computer programs included in the electronic device.
[0145] The input and output unit is used to provide users with the task creation and to create a start optional time period or preset execution time for the task to realize the interaction between the user and the server. The input and output unit can be, but is not limited to, a mouse and a keyboard.
[0146] Understandably, Figure 5 The structure shown is for illustration only, and the electronic device may also include Figure 5 More or fewer components as shown, or with Figure 5 Different configurations shown. Figure 5 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0147] An embodiment of the present application further provides a computer-readable storage medium having instructions stored thereon. When the instructions are run on a computer, the computer program is executed by a processor to implement the method described in the method embodiment. To avoid repetition, it will not be described again here.
[0148] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0149] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0150] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0151] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0152] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0153] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
Claims
1. A method for generating a film and television animation, characterized in that: include: Get apartment information; generating a camera animation according to the space information in the apartment type information; Generate furniture animation according to the furniture information in the apartment information; Generate a film and television animation according to the camera animation and the furniture animation; The step of generating a camera animation according to the space information in the apartment type information comprises: Initialize the camera viewing angle parameters; Traversing multiple space information in the apartment type information, where the multiple space information belongs to different apartment type areas; Obtaining the aisle area and the entry point in each of the spatial information; Obtain the apartment area to which the corridor area belongs; Constructing a camera motion trajectory according to the entry location point, the apartment area to which the corridor area belongs, and a preset apartment area preview sequence; Set the direction of the camera in the camera motion trajectory; The camera animation is generated according to the camera motion trajectory.
2. The method for generating a video animation according to claim 1, characterized in that: The step of setting the orientation of the camera in the camera motion trajectory comprises: The orientation of the camera is set according to the current space where the camera is located in the camera motion trajectory.
3. The method for generating a video animation according to claim 2, characterized in that: The step of setting the orientation of the camera according to the current space where the camera is located in the camera motion trajectory comprises: The current orientation of the camera is set according to the apartment area to which the current space belongs.
4. The method for generating a video animation according to claim 3, characterized in that: The step of setting the current orientation of the camera according to the apartment area to which the current space belongs includes: If the current space is a living room / dining room, the camera orientation corresponding to the first wall of the living room / dining room is set to be perpendicular to the camera motion trajectory, the camera orientation corresponding to the second wall of the living room / dining room is set to be parallel to the camera motion trajectory, and the angle formed by the camera orientation corresponding to the third wall of the living room / dining room and the camera motion trajectory is a first degree; If the current space is a bedroom, the camera orientation corresponding to the fourth wall of the bedroom is set to be perpendicular to the camera motion trajectory, and the camera orientation corresponding to the fifth wall of the bedroom is set to be parallel to the camera motion trajectory.
5. The method for generating a video animation according to claim 1, characterized in that: The step of generating the camera animation according to the camera motion trajectory comprises: A camera rotation animation is added to the camera motion trajectory to obtain the camera animation.
6. The method for generating a video animation according to claim 1, characterized in that: The step of generating furniture animation according to the furniture information in the apartment type information comprises: Obtain all furniture information in the apartment information; Obtain the initialization animation template corresponding to all the furniture information; Obtaining the visual field angle of the camera; Determine the intersection point between each piece of furniture information and the camera motion trajectory; Obtain the distance from each piece of furniture information to the intersection point; Filtering the furniture information in the non-visualized area in the apartment information according to the distance from each piece of furniture information to the intersection and the visual field angle of the camera to obtain filtered furniture information; The furniture animation is obtained according to the initialization animation template corresponding to the filtered furniture information.
7. The method for generating a video animation according to claim 6, characterized in that: Before the step of obtaining the furniture animation according to the initialization animation template corresponding to the filtered furniture information, the method further includes: Traversing the floor-standing furniture in the apartment information; Determining the inclusion relationship of the floor-standing furniture; Adjusting the template corresponding to the filtered furniture information according to the inclusion relationship of the floor-standing furniture to obtain an adjusted template; The step of obtaining the furniture animation according to the initialization animation template corresponding to the filtered furniture information comprises: The furniture animation is generated according to the adjustment template.
8. A video animation generating device, characterized in that: include: The acquisition module is used to obtain apartment type information; A camera animation generation module, used to generate camera animation according to the space information in the apartment type information; A furniture animation generation module, used to generate furniture animation according to the furniture information in the apartment type information; A film and television animation generation module, generating a film and television animation according to the camera animation and the furniture animation; The step of generating a camera animation according to the space information in the apartment type information comprises: Initialize the camera viewing angle parameters; Traversing multiple space information in the apartment type information, where the multiple space information belongs to different apartment type areas; Obtaining the aisle area and the entry point in each of the spatial information; Obtain the apartment area to which the corridor area belongs; Constructing a camera motion trajectory according to the entry location point, the apartment area to which the corridor area belongs, and a preset apartment area preview sequence; Set the direction of the camera in the camera motion trajectory; The camera animation is generated according to the camera motion trajectory.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the film and television animation generation method as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the steps of the method for generating a film and television animation as described in any one of claims 1 to 7.
