Model animation rendering method and device, computer storage medium, and electronic device
By analyzing the audio frequency bands of the target three-dimensional model and collecting the anchor audio stream, the model driver value is obtained, which solves the problem of model animation and sound disconnection in voice live broadcast, and improves the audience's visual experience.
Patent Information
- Application Number
- CN202310294006.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-22
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2043-03-22
AI Technical Summary
During the live voice broadcast process, the audience's visual experience is poor, and the lack of correlation between the model animation and the anchor's voice in the prior art, resulting in poor animation effects.
By obtaining the model resource data of the target three-dimensional model, analyzing the audio band, collecting the anchor audio stream, analyzing the model driver value, rendering the model animation in the live broadcast room based on the driver value and resource data, and establishing the correlation between sound and animation.
It improves the rendering effect of model animation in the voice live broadcast room, enhances the visual experience of the audience, and realizes the correlation between model animation and anchor sound.
Smart Images

Figure CN116320520B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of model animation rendering, and in particular to a model animation rendering method and device, a computer-readable storage medium, and an electronic device. Background Art
[0002] With the development of live broadcast technology, voice broadcast has become a mainstream live broadcast method. However, during the voice broadcast process, the audience's visual experience is often ignored.
[0003] In related technologies, specific voice files are usually used to drive the display of animations. However, the animation effects displayed in this way have no correlation with the host, and the displayed animation effects are poor, which fails to improve the audience's visual experience in the voice live broadcast room.
[0004] In view of this, there is an urgent need in this field to develop a new model animation rendering method and device.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the Invention
[0006] The purpose of the present disclosure is to provide a model animation rendering method, a model animation rendering device, a computer-readable storage medium and an electronic device, thereby at least to a certain extent overcoming the problem of poor visual experience of viewers in a voice live broadcast room caused by related technologies.
[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by practice of the present disclosure.
[0008] According to a first aspect of an embodiment of the present invention, a model animation rendering method is provided, the method comprising: obtaining model resource data of a target three-dimensional model, parsing a target audio frequency band corresponding to the model attributes of the target three-dimensional model from the model resource data; collecting an audio stream corresponding to a target anchor in a live broadcast room, analyzing the audio stream to obtain model driving values corresponding to different audio frequency bands; determining a target driving value corresponding to the target audio frequency band from the model driving values, and rendering a model animation corresponding to the target three-dimensional model in the live broadcast room based on the target driving value and the model resource data.
[0009] According to a second aspect of an embodiment of the present invention, a method for generating model resource data is provided, the method comprising: importing a target three-dimensional model, and displaying a configuration interface corresponding to the target three-dimensional model; the configuration interface comprising a first configuration area corresponding to model attributes of the target three-dimensional model and a second configuration area corresponding to a target audio frequency band of the model attributes; in response to a first selection operation in the first configuration area, obtaining the model attributes corresponding to the first selection operation; in response to a second selection operation in the second configuration area, obtaining the target audio frequency band corresponding to the second selection operation; and generating model resource data corresponding to the target three-dimensional model based on the model attributes and the target audio frequency band.
[0010] According to a third aspect of an embodiment of the present invention, a model animation rendering device is provided, comprising: a parsing module configured to obtain model resource data of a target three-dimensional model, and parse out a target audio frequency band corresponding to the model attributes of the three-dimensional model from the model resource data; an acquisition module configured to acquire an audio stream corresponding to a target anchor in a live broadcast room, and analyze the audio stream to obtain model driving values corresponding to different audio frequency bands; a rendering module configured to determine a target driving value corresponding to the target audio frequency band from the model driving values, and render a model animation corresponding to the target three-dimensional model in the live broadcast room based on the target driving value and the model resource data.
[0011] According to a fourth aspect of an embodiment of the present invention, a model resource data generating device is provided, the device comprising: an import module configured to import a target three-dimensional model and display a configuration interface corresponding to the target three-dimensional model; the configuration interface comprising a first configuration area corresponding to the model attributes of the target three-dimensional model and a second configuration area corresponding to the target audio frequency band of the model attributes; a first response module configured to respond to a first selection operation in the first configuration area and obtain the model attributes corresponding to the first selection operation; a second response module configured to respond to a second selection operation in the second configuration area and obtain the target audio frequency band corresponding to the second selection operation; and a generation module configured to generate model resource data corresponding to the target three-dimensional model based on the model attributes and the target audio frequency band.
[0012] According to a fifth aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a processor and a memory; wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the method of any of the above exemplary embodiments is implemented.
[0013] According to a sixth aspect of an embodiment of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method in any of the above exemplary embodiments when executed by a processor.
[0014] As can be seen from the above technical solutions, the model animation rendering method, model animation rendering device, computer storage medium, and electronic device in the exemplary embodiments of the present invention have at least the following advantages and positive effects:
[0015] In the method and apparatus provided by the exemplary embodiments of the present disclosure, a model animation corresponding to the target three-dimensional model is rendered in the live broadcast room based on the target model driving value and model resource data. Since the target model driving value is obtained by analyzing the audio stream of the target anchor, on the one hand, there is a correlation between the rendered model animation and the voice of the target anchor; on the other hand, the rendered model animation is an animation of the target three-dimensional model, which improves the rendering effect of the model animation in the voice live broadcast room and enhances the audience's visual experience.
[0016] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and those skilled in the art can derive other drawings based on these drawings without inventive effort.
[0018] Figure 1 The following is a schematic diagram showing a flow chart of a model animation rendering method in an embodiment of the present disclosure;
[0019] Figure 2 A schematic diagram illustrating a process of analyzing an audio stream to obtain model driving values corresponding to different audio frequency bands in a model animation rendering method according to an embodiment of the present disclosure is shown;
[0020] Figure 3 Schematically illustrates a flow chart of dividing an audio stream into frequency domains to obtain initial amplitude data in a model animation rendering method according to an embodiment of the present disclosure;
[0021] Figure 4 A schematic diagram of a process for calculating target amplitude data in an updated amplitude data queue to obtain a model driving value in a model animation rendering method according to an embodiment of the present disclosure is shown;
[0022] Figure 5The following schematically illustrates a flow chart of rendering a model animation corresponding to a target three-dimensional model in a live broadcast room based on a target driving value and model resource data in a model animation rendering method according to an embodiment of the present disclosure;
[0023] Figure 6 The following schematically illustrates a flow chart of rendering a model animation corresponding to a target three-dimensional model in a live broadcast room in a model animation rendering method according to an embodiment of the present disclosure;
[0024] Figure 7 A schematic diagram schematically illustrates a flow chart of a method for generating model resource data in an embodiment of the present disclosure;
[0025] Figure 8 Schematically illustrating a flow chart of changing model resource data in a method for generating model resource data in an embodiment of the present disclosure;
[0026] Figure 9 A device for model animation rendering method in an embodiment of the present disclosure is schematically shown;
[0027] Figure 10 A device for generating model resource data in an embodiment of the present disclosure is schematically shown;
[0028] Figure 11 An electronic device according to an embodiment of the present disclosure is schematically shown;
[0029] Figure 12 A computer-readable storage medium in an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0030] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the present disclosure will be more comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or that other methods, components, devices, steps, etc. may be employed. In other cases, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0031] The terms "a", "an", "the" and "said" are used in this specification to indicate the presence of one or more elements / components / etc.; the terms "including" and "having" are used to express open-ended inclusion and mean that additional elements / components / etc. may exist in addition to the listed elements / components / etc.; the terms "first" and "second" etc. are used only as labels and are not intended to limit the quantity of their objects.
[0032] In addition, the accompanying drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. Identical reference numerals in the drawings represent identical or similar parts, and thus repeated descriptions thereof will be omitted. Some of the blocks shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically separate entities.
[0033] In response to the problems existing in the related art, the present disclosure proposes a model animation rendering method. Figure 1 A flow chart of the model animation rendering method is shown in FIG. Figure 1 As shown, the model animation rendering method includes at least the following steps:
[0034] Step S110: Acquire model resource data of the target three-dimensional model, and parse the model resource data to obtain a target audio frequency band corresponding to the model attributes of the target three-dimensional model.
[0035] Step S120. Collect the audio stream corresponding to the target anchor in the live broadcast room, analyze the audio stream to obtain model driving values corresponding to different audio frequency bands.
[0036] Step S130. Determine a target driving value corresponding to the target audio frequency band in the model driving value, and render a model animation corresponding to the target three-dimensional model in the live broadcast room based on the target driving value and the model resource data.
[0037] In the method and apparatus provided by the exemplary embodiments of the present disclosure, a model animation corresponding to the target three-dimensional model is rendered in the live broadcast room based on the target driving value and model resource data. Since the target driving value is obtained by analyzing the audio stream of the target anchor, on the one hand, there is a correlation between the rendered model animation and the voice of the target anchor; on the other hand, the rendered model animation is an animation of the target three-dimensional model, which improves the rendering effect of the model animation in the live broadcast room and enhances the audience's visual experience.
[0038] The following is a detailed description of each step of the model animation rendering method.
[0039] In step S110 , model resource data of the target three-dimensional model is acquired, and a target audio frequency band corresponding to the model attribute of the target three-dimensional model is parsed from the model resource data.
[0040] In the exemplary embodiments of the present disclosure, the target 3D model is the model that needs to be rendered in the live broadcast room. Unlike a two-dimensional model, the target 3D model is a model with a stereoscopic rendering effect. The target 3D model can be a preset 3D model or a 3D model that has a one-to-one mapping relationship with the host, and this exemplary embodiment does not specifically limit this.
[0041] Model resource data refers to the data necessary to render a target 3D model. Specifically, the model resource data may include the target 3D model stored in a graphical language transmission format, a texture file (used to determine the texture of the target 3D model), and an animation parameter configuration file. The animation parameter configuration file includes the model attributes of the target 3D model and the target audio frequency bands required to calculate the attribute values of the model attributes.
[0042] Based on this, after obtaining the model resource data of the target three-dimensional model, the model resource data can be parsed to determine the model attributes of the target three-dimensional model included in the model resource data and the target audio frequency band required to determine the attribute values of the model attributes.
[0043] In this exemplary embodiment, on the one hand, a target three-dimensional model with a stereoscopic rendering effect is obtained, which helps to subsequently render a model animation with better visual effects; on the other hand, parsing the model resource data can obtain the target audio frequency band corresponding to the model properties of the target three-dimensional model, which lays the foundation for subsequently determining the target driving value and rendering the model animation corresponding to the target three-dimensional model based on the target driving value and the model resource data.
[0044] In step S120, the audio stream corresponding to the target anchor in the live broadcast room is collected, and the audio stream is analyzed to obtain model driving values corresponding to different audio frequency bands.
[0045] In an exemplary embodiment of the present disclosure, whether it is voice live broadcast or video live broadcast, during the live broadcast process, the target anchor will generate voice, and then the terminal can collect these voices to obtain an audio stream corresponding to the target anchor.
[0046] By analyzing the audio stream, the changes in the intensity of the sound emitted by the target anchor can be analyzed. Different audio frequency bands correspond to different sound intensities. For example, the target anchor A is emitting sound in the live voice broadcast room at this time. Then, the sound of the target anchor A is collected to obtain the audio stream L-1 corresponding to the target anchor A. By analyzing the audio stream L-1, the sound frequency corresponding to the audio stream L-1 and the frequency amplitude corresponding to the sound frequency can be obtained. Based on this, the frequency amplitude value belonging to the high audio frequency band, the frequency amplitude value belonging to the mid-audio frequency band, and the frequency amplitude value belonging to the low audio frequency band can be determined among these frequency amplitudes.
[0047] The model-driven value is calculated by calculating the frequency amplitude values belonging to the high audio frequency band, the frequency amplitude values belonging to the mid audio frequency band, and the frequency amplitude values belonging to the low audio frequency band. The model-driven value is composed of three values: the first value is the result of calculating the frequency amplitude values belonging to the low audio frequency band, the second value is the result of calculating the frequency amplitude values belonging to the mid audio frequency band, and the third value is the result of calculating the frequency amplitude values belonging to the high audio frequency band.
[0048] In an alternative embodiment, Figure 2 FIG. 4 shows a flow chart of analyzing the audio stream to obtain the model driving values corresponding to different audio frequency bands in the model animation rendering method. Figure 2 As shown, the method at least includes the following steps: in step S210, the audio stream is divided into frequency bands to obtain initial amplitude data, where the initial amplitude data includes initial amplitude values in different audio frequency bands.
[0049] For example, 30 audio streams are collected per second. By sequentially dividing these 30 audio streams into frequency bands based on the time of collection, 30 sets of initial amplitude data can be obtained. Each set of initial amplitude data includes multiple initial amplitude values in different audio frequency bands. For example, by dividing the 30 audio streams collected per second into frequency bands, the initial amplitude data can be obtained. Specifically, the initial amplitude data can consist of 45 initial amplitude values in different audio frequency bands.
[0050] In step S220 , the initial amplitude values belonging to the same audio frequency band in the initial amplitude data are calculated to obtain target amplitude data, so as to add the target amplitude data into the amplitude data queue.
[0051] The initial amplitude data is composed of initial amplitude values in different audio frequency bands. For example, the initial amplitude data includes initial amplitude values in the low audio frequency band, initial amplitude values in the mid audio frequency band, and initial amplitude values in the high audio frequency band. Calculating the average value of the initial amplitude values in the low audio frequency band yields value N-1, calculating the average value of the initial amplitude values in the mid audio frequency band yields value N-2, and calculating the average value of the initial amplitude values in the high audio frequency band yields value N-3. At this point, the target amplitude data consists of value N-1, value N-2, and value N-3. After calculating the target amplitude data, the target amplitude data is added to the amplitude data queue.
[0052] In step S230 , interpolation processing is performed on the target amplitude data in the amplitude data queue to obtain an updated amplitude data queue.
[0053] After adding the target amplitude data to the amplitude data queue, it needs to be interpolated. This is necessary because Z-1 audio streams are typically acquired per second, and thus Z-1 target amplitude data can be added to the amplitude data queue per second. However, when rendering the model animation corresponding to the target 3D model, the rendering speed is Z-2 frames per second. Since Z-2 differs from Z-1, the rendering quality of the model animation cannot be guaranteed.
[0054] Based on this, it is necessary to perform interpolation processing on the target amplitude data to ensure that there are Z-2 pieces of target amplitude data in the amplitude data queue per second.
[0055] Specifically, the target amplitude data is interpolated as follows: Each time a new target amplitude data C-0 is obtained, the target amplitude data C-0 is calculated with the last target amplitude data in the amplitude data queue to generate target amplitude data C-1. Target amplitude data C-1 and target amplitude data C-0 are then added to the amplitude data queue to obtain an updated amplitude data queue.
[0056] In step S240 , the target amplitude data in the updated amplitude data queue is calculated to obtain model driving values corresponding to different audio frequency bands.
[0057] The target amplitude data includes a target amplitude value. The target amplitude value and its corresponding amplitude threshold are calculated to obtain model driving values corresponding to different audio frequency bands.
[0058] In this exemplary embodiment, the audio stream corresponding to the target anchor is divided into frequency bands, and the initial amplitude values in different audio frequency bands can be obtained, and then the model driving values corresponding to the different audio frequency bands can be obtained, which are used for subsequent rendering of the model animation to establish a connection between the target anchor's voice and the model rendering, thereby enhancing the audience's visual experience in the live broadcast room; on the other hand, the target amplitude data in the amplitude data queue is interpolated so that the updated amplitude data queue meets the requirements of the model animation rendering, thereby ensuring the effect of the model animation rendering.
[0059] In an alternative embodiment, Figure 3 FIG1 shows a flow chart of dividing the audio stream into frequency domain and obtaining the initial amplitude data in the model animation rendering method. Figure 3 As shown, the method includes at least the following steps: in step S310, performing frequency domain analysis on the audio stream to obtain multiple frequencies corresponding to the audio stream and multiple frequency amplitudes corresponding to the multiple frequencies.
[0060] The audio stream collected is typically in the time domain. To divide the audio stream into frequency bands, frequency domain analysis is required to convert the audio stream from the time domain into the frequency domain, thereby obtaining multiple frequencies corresponding to the audio stream and the frequency amplitudes corresponding to the multiple frequencies. Specifically, a fast Fourier transform can be performed on the audio stream to perform frequency domain analysis on the audio stream, or other methods can be used to perform frequency domain analysis on the audio stream, which is not specifically limited in this exemplary embodiment.
[0061] In step S320 , the multiple frequency amplitudes are divided into frequency bands to obtain initial amplitude data; the initial amplitude data includes initial amplitude values in different audio frequency bands.
[0062] After obtaining the multiple frequency amplitudes, the multiple frequency amplitudes can be divided into frequency bands to obtain initial amplitude values in a low audio frequency band, initial amplitude values in a mid audio frequency band, and initial amplitude values in a high audio frequency band. These initial amplitude values in different audio frequency bands constitute initial amplitude data.
[0063] In this exemplary embodiment, on the one hand, frequency domain analysis is performed on the audio stream corresponding to the target host, which helps to obtain multiple frequencies corresponding to the target host's voice and multiple frequency amplitudes corresponding to the frequencies; on the other hand, the multiple frequency amplitudes are divided into frequency bands to obtain initial amplitude data, which makes it possible to subsequently obtain the model driving value corresponding to the target host's audio stream based on the initial amplitude data, establishes a connection between the model driving value and the target host's voice, and improves the effect of the subsequently rendered model animation corresponding to the target three-dimensional model.
[0064] In an alternative embodiment, Figure 4 The figure shows a flow chart of calculating the target amplitude data in the updated amplitude data queue to obtain the model driving value in the model animation rendering method, wherein the target amplitude data includes the target amplitude value, such as Figure 4 As shown, the method at least includes the following steps: in step S410, determining an amplitude threshold corresponding to target amplitude data in the updated amplitude data queue.
[0065] The target amplitude data consists of target amplitude values in different audio frequency bands. The amplitude threshold refers to the critical value used to limit the target amplitude value.
[0066] In step S420 , if the target amplitude value in the target amplitude data is greater than or equal to the amplitude threshold, the target amplitude value is replaced with the first model driving value.
[0067] The first model driving value refers to a preset value. Specifically, the first model driving value can be 1. For example, the amplitude threshold is 200, and the target amplitude data is [D-1, D-2, D-3]. Since D-1 and D-2 are greater than 200, D-1 and D-2 are both replaced with 1.
[0068] In step S430 , if the target amplitude value in the target amplitude data is smaller than the amplitude threshold, the target amplitude value and the amplitude threshold are calculated to obtain a second model driving value.
[0069] When the target amplitude value in the target amplitude data is less than the amplitude threshold, the target amplitude value and the amplitude threshold are divided to obtain the second model driving value.
[0070] For example, since D-3 is less than 200, D-3 and 200 are divided. If the result is 0.5, D-3 is replaced by 0.5. The target amplitude data obtained is [1, 1, 0.5].
[0071] In this exemplary embodiment, the model driving value can be obtained by comparing the target amplitude value with the amplitude threshold, so as to increase the convenience of subsequently calculating the attribute value of the model attribute using the model driving value.
[0072] In step S130, a target driving value corresponding to the target audio frequency band is determined in the model driving value, and a model animation corresponding to the target three-dimensional model is rendered in the live broadcast room based on the target driving value and the model resource data.
[0073] In an exemplary embodiment of the present disclosure, the model driving value specifically includes three values: a driving value corresponding to a low audio frequency band, a driving value corresponding to a mid audio frequency band, and a driving value corresponding to a high audio frequency band. If the target audio frequency band is the high audio frequency band, the driving value corresponding to the high audio frequency band in the model driving value may be determined as the target driving value.
[0074] After determining the target driving value, the target driving value can be used to calculate the attribute value corresponding to the model attribute of the target three-dimensional model, and then based on the obtained calculation results and model resource data, the model animation corresponding to the target three-dimensional model can be rendered in the live broadcast room.
[0075] It is worth noting that the target 3D model can be composed of multiple model nodes, and each model node has corresponding model attributes. Specifically, the model attributes include the rotation attribute of the model node, the scaling attribute of the model node, the offset attribute of the model node, the scaling attribute of the map at the model node, the rotation attribute of the map at the model node, the offset attribute of the map at the model node, the self-luminous intensity attribute of the material at the model node, and the transparency attribute of the material at the model node. This exemplary embodiment does not specifically limit this.
[0076] In an alternative embodiment, Figure 5 The figure shows a flow chart of a model animation rendering method for rendering a model animation corresponding to a target three-dimensional model in a live studio based on a target driving value and model resource data. The model resource data includes a driving value adjustment factor, such as Figure 5 As shown, the method includes at least the following steps: in step S510, a first calculation formula is determined between the current attribute value of the model attribute corresponding to the current frame, the drive value adjustment factor, the target drive value, and the first attribute value of the model attribute corresponding to the first frame; the current frame and the first frame differ by a frame interval.
[0077] The model resource data also includes a driving value adjustment factor, which is used to determine the degree of influence of the target driving value on the attribute value corresponding to the model attribute.
[0078] It's worth noting that every 360-degree rotation returns the model node and its associated texture to their initial positions. Therefore, the rotation properties of the model node and its associated texture can be classified as L-1 type attributes. Similarly, the offset properties of the model node and its associated texture also share these characteristics, and therefore, are also L-1 type attributes.
[0079] Other model attributes do not have the above characteristics and can be classified as type 1 attributes. Regardless of whether they belong to type L-1 attributes or type 1 attributes, the current attribute value can be calculated by determining the first calculation formula.
[0080] For example, for the rotation attribute of the model node, the first calculation formula determined is as shown in formula (1).
[0081] The rotation angle value of the model node in the current frame = the rotation angle value of the model node in the first frame
[0082] +Drive value adjustment factor × target drive value (1)
[0083] The rotation angle value of the model node in the current frame is the current attribute value, and the rotation angle value of the model node in the first frame is the first attribute value. Assume that the model drive value is [1, 1, 0.5]. If the target audio frequency band corresponding to the rotation angle attribute of the model node is the low audio frequency band, then the target drive value in formula (1) is 1.
[0084] In step S520 , the driving value adjustment factor, the target driving value, and the first attribute value are calculated based on the first calculation formula to obtain the current attribute value.
[0085] After the first calculation formula is determined, the driving value adjustment factor, the target driving value, and the first attribute value are substituted into the first calculation formula to calculate the current attribute value of the model attribute corresponding to the current frame.
[0086] For example, the determined target driving value is 1, the first attribute value is 30 degrees, the driving value adjustment factor is the value a, and based on the first calculation formula, the rotation angle value of the model node in the current frame can be calculated to be 30+a.
[0087] In step S530, based on the current attribute values and the model resource data, a model animation corresponding to the target three-dimensional model is rendered in the live broadcast room.
[0088] Among them, after the current attribute value is determined, the model animation corresponding to the target three-dimensional model is rendered in the live broadcast room according to the current attribute value and model resource data.
[0089] For example, the determined current attributes include a rotation angle of 60 degrees and a zoom value of 1.2. If the target 3D model is a 3D flower, the model animation rendered in the live studio is an enlarged 3D flower that is rotated 60 degrees.
[0090] In this exemplary embodiment, based on the first calculation formula, the first attribute value, the target driving value and the driving adjustment factor are calculated to obtain the current attribute value, so that the model animation can be rendered in the live broadcast room based on the current attribute value to improve the audience's visual experience.
[0091] In an alternative embodiment, Figure 6 The flow chart of the model animation rendering method for rendering a model animation corresponding to a target three-dimensional model in a live broadcast room is shown. The model resource data includes a first driving value adjustment factor; the model attribute includes a first type attribute, such as Figure 6 As shown, the method includes at least the following steps: in step S610, determining a first attribute threshold and a second attribute threshold corresponding to the first type of attribute, and determining a threshold difference between the first attribute threshold and the second attribute threshold.
[0092] For the first type of attribute, its attribute value must be within a preset range. The upper limit of the preset range is the first attribute threshold, and the lower limit of the preset range is the second attribute threshold. The threshold difference is the difference between the first attribute threshold and the second attribute threshold.
[0093] In step S620, a second calculation formula is determined among the first attribute threshold, the target drive value, the threshold difference, the first current attribute value of the first type attribute corresponding to the current frame, the second attribute value of the first type attribute corresponding to the second frame, and the first drive value adjustment factor; the current frame and the second frame differ by one frame interval.
[0094] When calculating the first type of attribute, the calculation formula used is the second calculation formula. For example, if the first type of attribute is a scaling attribute of a model node, the second calculation formula is determined as shown in formula (2).
[0095] The scaling value of the model node in the current frame = the minimum scaling value of the model node + the scaling range of the model node × (target drive value × first drive value adjustment factor + (scaling value of the model node in the previous frame - minimum scaling value of the model node) / scaling range of the model node × (1-
[0096] First driving value adjustment factor))(2)
[0097] The scaling value of the model node in the current frame is the first current attribute value, the minimum scaling value of the model node is the second attribute threshold, and the scaling range of the model node is the threshold difference.
[0098] In step S630, based on the second calculation formula, the first attribute threshold, the target driving value, the threshold difference, the second attribute value and the first driving value adjustment factor are calculated to obtain the first current attribute value.
[0099] The first current attribute value can be obtained by calculating the first attribute threshold, the target driving value, the threshold difference, the second attribute value, and the first driving value adjustment factor according to the second calculation formula.
[0100] In step S640, based on the first current attribute value and the model resource data, a model animation corresponding to the target three-dimensional model is rendered in the live broadcast room.
[0101] After the first current attribute value is calculated, a model animation corresponding to the target three-dimensional model is rendered in the live broadcast room according to the first current attribute value.
[0102] In this exemplary embodiment, the first current attribute value is calculated based on the second calculation formula, so that the model animation can be rendered in the live broadcast room based on the first current attribute value to improve the audience's visual experience.
[0103] In this exemplary embodiment, based on the target model driving value and model resource data, a model animation corresponding to the target three-dimensional model is rendered in the live broadcast room. Since the target model driving value is obtained by analyzing the audio stream of the target anchor, on the one hand, there is a correlation between the rendered model animation and the voice of the target anchor; on the other hand, the rendered model animation is an animation of the target three-dimensional model, which improves the rendering effect of the model animation in the voice live broadcast room and enhances the audience's visual experience.
[0104] In response to the problems existing in the related art, the present disclosure proposes a method for generating model resource data. Figure 7 A flow chart of the model resource data generation method is shown in FIG. Figure 7 As shown, the model resource data generation method includes at least the following steps:
[0105] Step S710: Import the target 3D model and display a configuration interface corresponding to the target 3D model; the configuration interface includes a first configuration area corresponding to the model attributes of the target 3D model and a second configuration area corresponding to the target audio frequency band.
[0106] Step S720: In response to a first selection operation performed in the first configuration area, obtain a model attribute corresponding to the first selection operation.
[0107] Step S730: In response to a second selection operation performed in the second configuration area, obtain a target audio frequency band corresponding to the second selection operation.
[0108] In step S740 , model resource data corresponding to the target three-dimensional model is generated based on the model attributes and the target audio frequency band.
[0109] In the method and apparatus provided by the exemplary embodiments of the present disclosure, a configuration interface corresponding to the target three-dimensional model is displayed, and in the configuration interface there is a first configuration area corresponding to the model attributes and a second configuration area corresponding to the target audio frequency band, wherein the target audio frequency band corresponds to the model attributes. This makes it possible to no longer rely on the designer when the model animation needs to be adjusted, but to adjust the rendering effect of the model animation by making corresponding configurations in the configuration interface, thereby increasing the convenience and flexibility of adjusting the rendering effect of the model animation.
[0110] The following describes in detail the various steps of the model resource data generation method.
[0111] In step S710, the target 3D model is imported and a configuration interface corresponding to the target 3D model is displayed; the configuration interface includes a first configuration area corresponding to the model attributes of the target 3D model and a second configuration area corresponding to the target audio frequency band.
[0112] The target three-dimensional model is imported, and a configuration interface may be displayed in the terminal. The configuration interface is used to configure model attributes corresponding to the target three-dimensional model and target audio frequency bands corresponding to the model attributes.
[0113] It is worth noting that there is a first configuration area in the configuration interface for configuring model attributes, and there is also a second configuration area in the configuration interface for configuring a target audio frequency band corresponding to the model attributes.
[0114] In step S720, in response to a first selection operation performed on the first configuration area, a model attribute corresponding to the first selection operation is obtained.
[0115] Among them, the first selection operation is an operation of selecting the model attribute to be configured. The first selection operation can be a click operation, a double-click operation, a long press operation, or any touch operation. This exemplary embodiment does not make any special limitation on this.
[0116] After the first selection operation is performed in the first configuration area, the model attribute corresponding to the first selection operation will be obtained. For example, when the model attribute of the rotation angle of the model node K is clicked in the first configuration area, the model attribute of the rotation angle of the model node K will be obtained.
[0117] In step S730, in response to a second selection operation performed on the second configuration area, a target audio frequency band corresponding to the second selection operation is obtained.
[0118] When the second selection operation is performed in the second configuration area, a target audio frequency band is obtained. For example, when the high frequency band is clicked in the second configuration area, the target audio frequency band is the high frequency band. In this case, there is a corresponding relationship between the high frequency band and the model attribute of the rotation angle of the model node K.
[0119] In step S740 , model resource data corresponding to the target three-dimensional model is generated based on the model attributes and the target audio frequency band.
[0120] Among them, after determining the model attributes and the target audio frequency band, model resource data corresponding to the target three-dimensional model can be generated, so as to render the target three-dimensional model in the live broadcast room according to the model resource data.
[0121] In an alternative embodiment, Figure 8 The flow chart of changing the model resource data in the model resource data generation method is shown as follows: Figure 8 As shown, the method includes at least the following steps: in step S810, in response to a first modification operation in a first configuration area, a modification model attribute corresponding to the first modification operation is obtained.
[0122] The first modification operation refers to an operation for modifying the selected model attribute. When the first modification operation is performed in the first configuration area, the model attribute corresponding to the first modification operation is the modified model attribute.
[0123] In step S820, in response to the second modification operation performed on the second configuration area, a modified target audio frequency band corresponding to the second modification operation is obtained.
[0124] The model attributes may be modified, and the target audio frequency band may also be modified. When a second modification operation is performed in the second configuration area, the target audio frequency band corresponding to the second modification operation is obtained, that is, the modified target audio frequency band.
[0125] In step S830 , the model resource data is modified based on the modification of the model attributes and the modification of the target audio frequency band.
[0126] The model resource data is changed according to the change of the model attributes and the change of the target audio frequency band.
[0127] For example, a click operation is performed in the second configuration area. At this time, the target audio frequency band corresponding to the click operation is the low audio frequency band. Then, based on the model attribute of the rotation angle of the model node K and the low audio frequency band, the model resource data is changed.
[0128] In this exemplary embodiment, a configuration interface corresponding to the target three-dimensional model is displayed, and in the configuration interface there is a first configuration area corresponding to the model attributes and a second configuration area corresponding to the target audio frequency band, wherein the target audio frequency band corresponds to the model attributes. This makes it no longer necessary to rely on the designer when the model animation needs to be adjusted. Instead, the rendering effect of the model animation can be adjusted by making corresponding configurations in the configuration interface, which increases the convenience and flexibility of adjusting the rendering effect of the model animation.
[0129] The model animation rendering method in the embodiment of the present disclosure is described in detail below in conjunction with an application scenario.
[0130] The model resource data corresponding to the target three-dimensional model of the "stereosphere" is obtained. By parsing the model resource data, the model attributes S-1 and S-2 in the target three-dimensional model can be obtained. The target audio frequency band corresponding to the model attribute S-1 (specifically, the low audio frequency band) and the target audio frequency band corresponding to the model attribute S-2 (i.e., the mid-audio frequency band) can also be obtained.
[0131] The audio stream corresponding to anchor G in the live broadcast room is collected and analyzed to obtain the model driving value [1, 0.2, 0.5], where 1 corresponds to the low audio frequency band, 0.2 corresponds to the middle audio frequency band, and 0.5 corresponds to the high audio frequency band.
[0132] Since the target audio frequency band is the mid-audio frequency band, the determined target driving value is 0.2. Based on the target driving value of 0.2 and the model resource data, a model animation corresponding to the "stereoscopic ball" is rendered in the live broadcast room.
[0133] In this application scenario, a model animation corresponding to the target 3D model is rendered in the live broadcast room based on the target model driving value and model resource data. Because the target model driving value is obtained by analyzing the target host's audio stream, on the one hand, there is a correlation between the rendered model animation and the target host's voice; on the other hand, the rendered model animation is an animation of the target 3D model, which improves the rendering effect of the model animation in the voice live broadcast room and enhances the audience's visual experience. The following describes the various steps of the model animation rendering method in detail.
[0134] In addition, in an exemplary embodiment of the present disclosure, a model animation rendering device is also provided. Figure 9 The schematic diagram of the structure of the model animation rendering device is shown in FIG. Figure 9 As shown, the model animation rendering device 900 may include: a parsing module 910, a collection module 920 and a rendering module 930. Among them:
[0135] The parsing module 910 is configured to obtain the model resource data of the target three-dimensional model, and parse the target audio frequency band corresponding to the model attributes of the target three-dimensional model from the model resource data; the acquisition module 920 is configured to acquire the audio stream corresponding to the target anchor in the live broadcast room, and analyze the audio stream to obtain the model driving values corresponding to different audio frequency bands; the rendering module 930 is configured to determine the target driving value corresponding to the target audio frequency band in the model driving value, and render the model animation corresponding to the target three-dimensional model in the live broadcast room based on the target driving value and the model resource data.
[0136] In an exemplary embodiment of the present disclosure, a model resource data generating device is also provided. Figure 10 The schematic diagram of the structure of the model resource data generating device is shown in FIG. Figure 10 As shown, the model resource data generating device 1000 may include: an import module 1010, a first response module 1020, a second response module 1030 and a generation module 1040. Among them:
[0137] The import module 1010 is configured to import the target three-dimensional model and display a configuration interface corresponding to the target three-dimensional model; the configuration interface includes a first configuration area corresponding to the model properties of the target three-dimensional model and a second configuration area corresponding to the target audio frequency band of the model properties; the first response module 1020 is configured to respond to a first selection operation in the first configuration area and obtain the model properties corresponding to the first selection operation; the second response module 1030 is configured to respond to a second selection operation in the second configuration area and obtain the target audio frequency band corresponding to the second selection operation; the generation module 1040 is configured to generate model resource data corresponding to the target three-dimensional model based on the model properties and the target audio frequency band.
[0138] The specific details of the above-mentioned model animation rendering device 900 and model resource data generating device 1000 have been described in detail in the corresponding methods, so they will not be repeated here.
[0139] It should be noted that although several modules or units of the model animation rendering device 900 and the model resource data generating device 1000 are mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units for embodiment.
[0140] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0141] Refer to the following Figure 11 1100 according to this embodiment of the present invention will be described. Figure 11 The electronic device 1100 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present invention.
[0142] like Figure 11 As shown, electronic device 1100 is implemented as a general-purpose computing device. Components of electronic device 1100 may include, but are not limited to, the aforementioned at least one processing unit 1110, the aforementioned at least one storage unit 1120, a bus 1130 connecting various system components (including storage unit 1120 and processing unit 1110), and a display unit 1140.
[0143] The storage unit stores program codes, which can be executed by the processing unit 1110, so that the processing unit 1110 performs the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification.
[0144] The storage unit 1120 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 1121 and / or a cache memory unit 1122 , and may further include a read-only memory unit (ROM) 1123 .
[0145] The storage unit 1120 may also include a program / utility 1124 having a set (at least one) of program modules 1125, such program modules 1125 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include the reality of a network environment.
[0146] The bus 1130 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0147] Electronic device 1100 can also communicate with one or more external devices 1170 (e.g., a keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with electronic device 1100, and / or any device that enables electronic device 1100 to communicate with one or more other computing devices (e.g., a router, modem, etc.). Such communication can occur via input / output (I / O) interface 1150. Furthermore, electronic device 1100 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via network adapter 1160. As shown, network adapter 1160 communicates with other modules of electronic device 1100 via bus 1130. It should be understood that, although not shown, other hardware and / or software modules can be used in conjunction with electronic device 1100, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0148] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
[0149] In exemplary embodiments of the present disclosure, a computer-readable storage medium is also provided, storing a program product capable of implementing the aforementioned methods of this specification. In some possible embodiments, various aspects of the present invention may also be implemented in the form of a program product comprising program code. When the program product is executed on a terminal device, the program code is configured to cause the terminal device to perform the steps according to various exemplary embodiments of the present invention described in the "Exemplary Methods" section of this specification.
[0150] refer to Figure 12 , a program product 1200 for implementing the above-described method according to an embodiment of the present invention is described. The program product 1200 may be a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0151] The program product may be implemented in any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0152] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0153] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0154] The program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and the like, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0155] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow from the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the claims.
Claims
1. A model animation rendering method, characterized in that: The method comprises: Acquiring model resource data of a target three-dimensional model, and parsing a target audio frequency band corresponding to a model attribute of the target three-dimensional model from the model resource data; An audio stream corresponding to a target anchor in a live broadcast room is collected, and the audio stream is divided into frequency bands to obtain initial amplitude data; the initial amplitude data includes initial amplitude values in different audio frequency bands; the initial amplitude values in the initial amplitude data belonging to the same audio frequency band are calculated to obtain target amplitude data, and the target amplitude data is added to an amplitude data queue; the target amplitude data in the amplitude data queue is interpolated to obtain an updated amplitude data queue; the target amplitude data in the updated amplitude data queue is calculated to obtain model driving values corresponding to the different audio frequency bands; A target driving value corresponding to the target audio frequency band is determined from the model driving value, and a model animation corresponding to the target three-dimensional model is rendered in the live broadcast room based on the target driving value and the model resource data.
2. The model animation rendering method according to claim 1, characterized in that: The dividing the audio stream into frequency bands to obtain initial amplitude data includes: Performing frequency domain analysis on the audio stream to obtain a plurality of frequencies corresponding to the audio stream and a plurality of frequency amplitudes respectively corresponding to the plurality of frequencies; The multiple frequency amplitudes are divided into frequency bands to obtain initial amplitude data; the initial amplitude data includes initial amplitude values in different audio frequency bands.
3. The model animation rendering method according to claim 2, characterized in that: The target amplitude data includes a target amplitude value; The calculating the target amplitude data in the updated amplitude data queue to obtain model driving values corresponding to the different audio frequency bands includes: determining an amplitude threshold corresponding to the target amplitude data in the updated amplitude data queue; If the target amplitude value in the target amplitude data is greater than or equal to the amplitude threshold, replacing the target amplitude value with a first model driving value; If the target amplitude value in the target amplitude data is smaller than the amplitude threshold, the target amplitude value and the amplitude threshold are calculated to obtain a second model driving value.
4. The model animation rendering method according to claim 1, characterized in that: The model resource data includes a driving value adjustment factor; The rendering of a model animation corresponding to the target three-dimensional model in the live broadcast room based on the target driving value and the model resource data includes: Determining a first calculation formula between a current attribute value of the model attribute corresponding to a current frame, the drive value adjustment factor, a target drive value, and a first attribute value of the model attribute corresponding to a first frame; the current frame differs from the first frame by a frame interval; Calculating the driving value adjustment factor, the target driving value, and the first attribute value based on the first calculation formula to obtain the current attribute value; Based on the current attribute value and the model resource data, a model animation corresponding to the target three-dimensional model is rendered in the live broadcast room.
5. The model animation rendering method according to claim 4, characterized in that: The driving value adjustment factor also includes a first driving value adjustment factor; the model attribute includes a first type attribute; The method further comprises: Determining a first attribute threshold and a second attribute threshold corresponding to the first type of attribute, and determining a threshold difference between the first attribute threshold and the second attribute threshold; Determining a second calculation formula among the first attribute threshold, the target drive value, the threshold difference, a first current attribute value of the first type attribute corresponding to a current frame, a second attribute value of the first type attribute corresponding to a second frame, and the first drive value adjustment factor; the difference between the current frame and the second frame is one frame interval; Calculating the first attribute threshold, the target driving value, the threshold difference, the second attribute value, and the first driving value adjustment factor based on the second calculation formula to obtain the first current attribute value; Based on the first current attribute value and the model resource data, a model animation corresponding to the target three-dimensional model is rendered in the live broadcast room.
6. The model animation rendering method according to claim 1, characterized in that: The method further comprises: Importing a target three-dimensional model and displaying a configuration interface corresponding to the target three-dimensional model; the configuration interface includes a first configuration area corresponding to model attributes of the target three-dimensional model and a second configuration area corresponding to a target audio frequency band of the model attributes; In response to a first selection operation performed on the first configuration area, obtaining the model attribute corresponding to the first selection operation; In response to a second selection operation performed on the second configuration area, obtaining the target audio frequency band corresponding to the second selection operation; Model resource data corresponding to the target three-dimensional model is generated based on the model attributes and the target audio frequency band.
7. The model animation rendering method according to claim 6, characterized in that: The method further comprises: In response to a first modification operation performed on the first configuration area, obtaining a modification model attribute corresponding to the first modification operation; or In response to a second change operation applied to the second configuration area, obtaining a changed target audio frequency band corresponding to the second change operation; The model resource data is modified based on the modified model attribute and the modified target audio frequency band.
8. A model animation rendering device, characterized in that: include: a parsing module configured to obtain model resource data of a target three-dimensional model, and parse the model resource data to obtain a target audio frequency band corresponding to a model attribute of the three-dimensional model; The acquisition module is configured to acquire an audio stream corresponding to a target anchor in the live broadcast room, divide the audio stream into frequency bands, and obtain initial amplitude data; the initial amplitude data includes initial amplitude values in different audio frequency bands; Calculating the initial amplitude values belonging to the same audio frequency band in the initial amplitude data to obtain target amplitude data, and adding the target amplitude data to an amplitude data queue; interpolating the target amplitude data in the amplitude data queue to obtain an updated amplitude data queue; and calculating the target amplitude data in the updated amplitude data queue to obtain model driving values corresponding to the different audio frequency bands; A rendering module is configured to determine a target driving value corresponding to the target audio frequency band from the model driving value, and render a model animation corresponding to the target three-dimensional model in the live broadcast room based on the target driving value and the model resource data.
9. An electronic device, characterized in that: include: processor; a memory for storing executable instructions of the processor; The processor is configured to perform the method according to any one of claims 1 to 7 by executing the executable instructions.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Control method and device
CN106445460A