CN113672280B - Animation playing program package writing method and device, electronic equipment and storage medium - Google Patents

Animation playing program package writing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113672280B
CN113672280B CN202110992978.0A CN202110992978A CN113672280B CN 113672280 B CN113672280 B CN 113672280B CN 202110992978 A CN202110992978 A CN 202110992978A CN 113672280 B CN113672280 B CN 113672280B
Authority
CN
China
Prior art keywords
animation
skeleton
resource file
writing
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110992978.0A
Other languages
Chinese (zh)
Other versions
CN113672280A (en
Inventor
黄慧
郑红丽
刘朝阳
蔡旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
FAW Group Corp
Original Assignee
FAW Group Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by FAW Group Corp filed Critical FAW Group Corp
Priority to CN202110992978.0A priority Critical patent/CN113672280B/en
Publication of CN113672280A publication Critical patent/CN113672280A/en
Priority to PCT/CN2022/114730 priority patent/WO2023025233A1/en
Application granted granted Critical
Publication of CN113672280B publication Critical patent/CN113672280B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/73Program documentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the invention provides a method, a device, electronic equipment and a storage medium for compiling an animation playing program package, wherein the method comprises the following steps: in the project created through Kanzi Studio, generating a three-dimensional resource file according to the skeleton animation file; writing a control application program for controlling the three-dimensional resource file in an application program object created through a Visio Studio; and writing an animation playing program package according to the three-dimensional resource file, the control application program and the Kanzi engine through an integrated development tool, and importing the animation playing program package into a vehicle-mounted system. By adopting the technical scheme, the user interface fusion of the skeleton animation at the Android end is realized, the requirement of the 3D animation on the display effect is met, the vehicle-mounted application can be met, and the development is more efficient.

Description

Animation playing program package writing method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a method, a device, electronic equipment and a storage medium for compiling an animation playing program package.
Background
Along with the continuous development of intelligent cabins, functions and interfaces of the vehicle-mounted Android (Android) entertainment system are diversified, the design is more attractive, the interface requirements of users on the vehicle-mounted Android application program are also continuously improved, the requirements of users on two-dimensional (2D) interfaces, such as traditional switches, lists and other display forms, can be met, and the requirements on three-dimensional (3D) images can be met for many scenes, so that the vividness, anthropomorphic dummy properties, ornamental value and the like of the animation are displayed, and the vehicle-mounted entertainment system is more colorful. At present, the animation playing of the vehicle-mounted Android application program is often realized by playing sequence frames, and the method utilizes the visual persistence principle of human eyes. However, this method is not suitable for more complex animation because it requires the use of a lot of sequential frame picture resources and the visual effect is not ideal.
Disclosure of Invention
The invention provides a method, a device, electronic equipment and a storage medium for compiling an animation playing program package, which are used for realizing user interface fusion of skeleton animation at an Android end, meeting the requirement of 3D animation on a display effect, and meeting vehicle-mounted application and developing more efficiently.
In a first aspect, an embodiment of the present invention provides a method for writing an animation playing program package, including:
In the project created through Kanzi Studio, generating a three-dimensional resource file according to the skeleton animation file;
writing a control application program for controlling the three-dimensional resource file in an application program object created through a Visio Studio;
And writing an animation playing program package according to the three-dimensional resource file, the control application program and the Kanzi engine through an integrated development tool, and importing the animation playing program package into a vehicle-mounted system.
Further, the generating a three-dimensional resource file according to the skeleton animation file includes:
adjusting the attribute of the skeleton animation corresponding to the skeleton animation file;
layout is carried out on the interface of the skeleton animation after the attribute adjustment, and an animation resource template is generated;
Performing animation rendering on the skeleton animation according to the adjusted attribute;
compiling based on an interface layout result, an animation resource template and an animation rendering result to obtain the three-dimensional resource file.
Further, the adjusting the attribute of the skeleton animation corresponding to the skeleton animation file includes:
Altering the material type of the skeletal animation to a vertex-coloring von willebrand skin;
Adjusting a shader skinned skeleton definition value according to the skeleton number of the skeleton animation;
Adjusting the mixing intensity and specular reflection index of the bone animation.
Further, writing a control application program for controlling the three-dimensional resource file, including:
Declaration and/or definition of the three-dimensional resource file;
establishing a time line of the skeleton animation corresponding to the three-dimensional resource file;
creating an animation player and writing an animation playing method based on the time line;
Establishing a first Java local interface for calling the animation playing method;
and compiling a dynamic link library based on the animation playing method and the first Java local interface to obtain the control application program.
Further, the method further comprises the following steps:
newly building an asset folder in the Android Studio, wherein the asset folder is used for placing the three-dimensional resource file;
And newly establishing a dynamic instruction set file in the Android Studio, wherein the dynamic instruction set file and the dynamic link library are located in the same folder.
Further, writing an animation playing program package according to the three-dimensional resource file, the control application program and the Kanzi engine, wherein the animation playing program package comprises:
Establishing a second Java local interface for calling the animation playing method;
Compiling based on the animation playing method and the second Java local interface to obtain the animation playing program package.
Further, the method further comprises the following steps:
and when receiving a playing instruction, calling the animation playing method through the first Java local interface and the second Java local interface.
In a second aspect, an embodiment of the present invention provides an animation playing package writing device, including:
the resource file generation module is used for generating a three-dimensional resource file according to the skeleton animation file in the project created through Kanzi Studio;
the first writing module is used for writing a control application program for controlling the three-dimensional resource file in an application program object created through a visual Studio;
and the second writing module is used for writing an animation playing program package according to the three-dimensional resource file, the control application program and the Kanzi engine through the integrated development tool and importing the animation playing program package into the vehicle-mounted system.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
one or more processors;
a storage means for storing one or more programs;
The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the animation playback package authoring method of the first aspect.
In a fourth aspect, an embodiment of the present invention further provides a computer readable storage medium, on which a computer program is stored, where the program is executed by a processor to implement the method for writing an animation playing package according to the first aspect.
The embodiment of the invention provides a method, a device, electronic equipment and a storage medium for compiling an animation playing program package, wherein the method comprises the following steps: in the project created through Kanzi Studio, generating a three-dimensional resource file according to the skeleton animation file; writing a control application program for controlling the three-dimensional resource file in an application program object created through a Visio Studio; and writing an animation playing program package according to the three-dimensional resource file, the control application program and the Kanzi engine through an integrated development tool, and importing the animation playing program package into a vehicle-mounted system. By adopting the technical scheme, the user interface fusion of the skeleton animation at the Android end is realized, the requirement of the 3D animation on the display effect is met, the vehicle-mounted application can be met, and the development is more efficient.
Drawings
Fig. 1 is a flowchart of a method for writing an animation playing package according to a first embodiment of the present invention;
fig. 2 is a schematic diagram of a program package for playing back animation according to a second embodiment of the present invention;
Fig. 3 is a schematic structural diagram of an animation playing package writing device according to a third embodiment of the present invention;
Fig. 4 is a schematic hardware structure of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. Furthermore, embodiments of the invention and features of the embodiments may be combined with each other without conflict. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart depicts steps as a sequential process, many of the steps may be implemented in parallel, concurrently, or with other steps. Furthermore, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, and the like.
It should be noted that the concepts of "first," "second," and the like in the embodiments of the present invention are merely used to distinguish between different devices, modules, units, or other objects, and are not intended to limit the order or interdependence of functions performed by the devices, modules, units, or other objects.
For a better understanding of the embodiments of the present invention, the related art will be described below.
Example 1
Fig. 1 is a flowchart of an animation playing package writing method according to an embodiment of the present invention, where the embodiment is applicable to the case of developing an animation playing package by using skeletal animation. Specifically, the method for writing the animation playing program package can be executed by an animation playing program package writing device, and the animation playing program package writing device can be realized in a software and/or hardware mode and is integrated in the electronic equipment. Further, the electronic device includes, but is not limited to: desktop computers, notebook computers, smart phones, servers, and other electronic devices.
As shown in fig. 1, the method specifically includes the following steps:
s110, in the project created through Kanzi Studio, generating a three-dimensional resource file according to the skeleton animation file.
Specifically, the Kanzi platform is a Human-computer Interface (Human MACHINE INTERFACE, HMI) development tool provided for an intelligent cockpit, and comprises Kanzi Studio and Kanzi Studio which are a set of content creation tools running on an electronic device end, and can be used for intuitively designing a design tool of a digital instrument panel of an automobile, and also can be understood as a User Interface (UI) editor, and can display a dynamic 3D image with high quality and real-time rendering by matching with a graphic chip, so that a User enjoys a customizable personalized visual Interface, the coding link can be simplified, and the design efficiency can be improved. kanzi also includes Kanzi engine (Kanzi Engine), i.e., graphics and UI engine that runs on computers, cell phones, and some embedded devices.
In this embodiment, kanzi is used to write an animation playing program package for the imported skeletal animation, and finally put into vehicle-mounted application. Firstly, visual materials are acquired, and in the embodiment, the visual materials mainly refer to bone animation. Skeletal animation is a model animation that has a skeletal structure of interconnected "skeletons" that can be created more easily and quickly by changing the orientation and position of the skeletons to animate the model. A skeletal animation file (FBX format file) is imported Kanzi Studio to create basic functions of the user interface, such as adapting skin for skeletal animation, configuring the position of skeletal animation in the interface, rendering the skeletal animation, etc., through Kanzi Studio, which are stored in the 3D resource file in the form of code. The 3D resource file is kzb format file, and can store Kanzi binary data. On this basis, user interfaces and interactions are implemented using Kanzi Engine's application program interfaces (Application Programming Interface, API) or scripts.
The project created using Kanzi studio contains a tool_project folder for storing all files in the UI design process and an Application folder for storing relevant codes.
S120, writing a control application program for controlling the three-dimensional resource file in an application program object created through the Visio Studio.
Specifically, a control application program is written in a visual Studio based on C++ and is used for controlling a three-dimensional resource file. In Application, a 3D resource file needs to be read, so that service parameters (such as playing time, playing times, playing frame number, etc.) of the skeletal animation are determined, an animation player is built, and an animation playing method is written for the Java program to call. The control application program is obtained after the program written in the Visio Studio is compiled in a cross-platform mode. The 3D resource file is an SO format file and can store compiled codes and data which can be used by other programs.
S130, compiling an animation playing program package according to the three-dimensional resource file, the control application program and the Kanzi engine through an integrated development tool, and importing the animation playing program package into the vehicle-mounted system.
The integrated development tool is mainly an Android Studio, supports Windows, mac, linux and other operating systems, and is built based on a popular Java language integrated development environment. And integrating the Android Studio into a 3D resource file, a control application program and Kanzi engines, and integrating the compiled animation playing program package (APK file) into a vehicle-mounted Android system.
According to the animation playing program package writing method provided by the embodiment of the invention, the Kanzi Studio is utilized to generate the 3D resource file, the Visio Studio is utilized to write the control application program, and the Android integrated development tool is utilized to write the animation playing program package and import the animation playing program package into the vehicle-mounted system, so that the user interface fusion of the skeleton animation at the Android end is realized, the requirement of the 3D animation on the display effect is met, the vehicle-mounted application can be met, and the development is more efficient.
Example two
The embodiment optimizes the animation playing program package on the basis of the embodiment, and specifically describes the animation playing program package writing process. It should be noted that technical details not described in detail in this embodiment may be found in any of the above embodiments.
In this embodiment, in the project created through Kanzi Studio, generating the 3D resource file according to the skeletal animation file includes the following steps:
s2110, adjusting the attribute of the skeleton animation corresponding to the skeleton animation file.
Specifically, by adjusting the attribute of the skeleton animation, the purpose is to create skin materials for the skeleton animation according to the skeleton vertices, so that the skin materials are adapted to the animation display requirements.
S2120, carrying out layout on the interface of the skeleton animation with the adjusted attributes and generating an animation resource template.
Specifically, the interface layout refers to the position where the skeleton animation is arranged to be displayed in the interface, such as the relation, proportion or hierarchy between the skeleton animation and the interface center or the boundary, and the like, and the animation resource template is generated on the basis, so that the skeleton animation has a determined form, and a convenient and reliable 3D resource is provided.
S2130, performing animation rendering on the bone animation according to the adjusted attribute.
For example, vectors of all bones at different points in time are calculated, interpolation and smooth transitions between bone animations at different points in time are performed, etc.
S2140, compiling based on the interface layout result, the animation resource template and the animation rendering result to obtain a 3D resource file.
Optionally, adjusting the attribute of the skeleton animation corresponding to the skeleton animation file includes: altering a material type (MATERIAL TYPE) of the skeletal animation to a vertex-coloring von willebrand skin (VertexPhongTexturedSkinned); adjusting a shader skin skeleton definition value (KANZI _ SHADER _ SKINNING _bone_count) according to a skeleton number of a skeleton animation; the Blend Intensity (Blend Intensity) and specular reflectance index (Specular Exponent) of the skeletal animation were adjusted. On the basis, the display device ensures that the display device has better display effect and meets the display requirement of animation.
In this embodiment, in an Application object (Application) created by a visual Studio, a control Application is written according to a 3D resource file, which specifically includes the following steps:
s2210, declaring and/or defining the 3D resource file.
Specifically, the 3D resource file needs to be declared and/or defined according to information such as a file name, an index and the like on which the file depends. The purpose of declaring 3D resource files is to indicate the type and name of various 3D resources to a program or code; the purpose of defining the 3D resource file is to allocate storage space for various 3D resources or describe specific contents thereof, etc.
S2220, establishing a time line of the skeleton animation corresponding to the 3D resource file.
Specifically, a time line of the skeleton animation is established and used for defining the positions, the postures, the events and the like of the skeleton animation at different moments, so that a basis is provided for displaying the skeleton animation in an interface.
S2230, creating an animation player and writing an animation playing method based on the time line.
Specifically, by establishing an animation player, corresponding APIs in Application can be called according to service requirements to set service parameters (such as playing time, playing times, playing frame numbers and the like), and accordingly, the animation playing method is compiled.
S2240, a first Java local interface for calling the animation playing method is established.
Specifically, a Java local interface (Java NATIVE INTERFACE, JNI) is established in Application, so that an Android Application Java program can successfully call an animation playing method.
S2250, compiling a dynamic link library based on the animation playing method and the first Java local interface to obtain a control application program.
Specifically, the control application program is obtained by compiling a dynamic link library across platforms.
In this embodiment, through an integrated development tool, an animation playing program package is written according to a 3D resource file, a control application program and Kanzi engine and is imported into a vehicle-mounted system, and specifically includes the following steps:
s2310, newly building an asset folder in the Android Studio, wherein the asset folder is used for placing 3D resource files.
S2320, a dynamic instruction set file is newly built in the Android Studio, and the dynamic instruction set file and the dynamic link library are located in the same folder.
Specifically, newly building asset folder Assets under engineering source codes of Android Studio, wherein the asset folder Assets are used for placing 3D resource files; a dynamic instruction set file jniLibs is created and the folders of the instruction set are consistent with the folders of the dynamic link library.
S2330, a second Java native interface for calling the animation playing method is established.
Specifically, the animation playing method is the animation playing method written in S2230, the second JNI corresponds to the first JNI, and the two are invoked by transmitting data.
S2340, compiling based on the animation playing method and the second Java local interface to obtain an animation playing program package.
The animation playing program package is an executable android application program package (Android application package, APK) file.
S2350, when a playing instruction is received, calling an animation playing method through the first Java local interface and the second Java local interface.
Specifically, a service Activity is built at the Android end, kanzi Activity is inherited, a Java program is used for judging when an animation playing method needs to be called through the built JNI, and the animation playing method is called through the JNI when the animation playing method needs to be called. The judging process CAN be realized by combining the signal input of a vehicle controller area network (Controller Area Network, CAN) network, the broadcast of a receiving system, the cross-process communication between other Android applications or services and the application, and the like, so that the mutual access of the bottom business control and the 3D UI is realized.
Fig. 2 is a schematic diagram of a program package for playing back animation according to a second embodiment of the present invention. As shown in fig. 2, in Kanzi APP, the generation or writing of the 3D resource file and the control application is completed; in Android Application, an Android application program is established; and compiling by the Android Studio to obtain an executable program package APK file, and completing the development of the animation playing program package. The method specifically comprises the following steps:
1) Establishing a 3D resource file: the skeletal animation is imported in Kanzi Studio, i.e. the following operations are performed in tool_project:
a) Importing an animation design providing skeletal animation file (xx.fbx) into Kanzi Studio;
b) Changing MATERIAL TYPE of the skeletal animation Material to VertexPhongTexturedSkinned, and adjusting KANZI _ SHADER _ SKINNING _bone_count attribute according to the actual number of skeletons in the skeletal animation file;
c) Adjusting a Blend density attribute in the Material according to the display effect, wherein the Blend density attribute is Specular Exponent;
d) Completing interface layout of skeleton animation, adding an animation resource template, and performing animation rendering according to materials;
e) Compiling to form fawassistant.
2) Writing a control application program: c++ programming is performed in the Visio Studio, i.e., the following operations are performed in Application:
a) Establishing declarations and definitions of 3D resources through aliases or paths
B) Referencing skeletal animation contained in 3D resources by building a timeline
C) Setting up an animation player generally, calling a corresponding API according to service requirements to set service parameters, and writing an animation playing method;
d) The JNI is built, so that an Android application Java program can call an animation playing method;
e) The dynamic link library libkanzi.so is compiled across platforms.
3) And establishing an Android application program: java programming is performed in Android Studio, namely, the following operations are executed in Application:
a) Integrating kanzi interface resources fawassistant.kzb in the Android Studio to control dynamic libraries libkanzi.so and Kanzi engine; newly building asset folder Assets under Android engineering source codes, and placing fawassistant.kzb files; newly building a dynamic instruction set file in the newly built jniLibs, wherein the folder of the instruction set needs to be consistent with a dynamic link library;
b) The JNI is built, so that the Android application Java program can call the animation playing method written in the step 2);
c) And establishing service Activity at the Android end, inheriting Kanzi Activity, judging when an animation playing method needs to be called by using a Java program through the established JNI, and calling through the JNI when the animation playing method needs to be called.
4) And integrating the APK file obtained by compiling into the vehicle-mounted Android system through the Android Studio.
It should be noted that, the interaction between Kanzi C ++ and Android Java depends on JNI defined by both parties, and data is transferred by way of transferring data types.
In this embodiment, kanzi Activity, kanzi Activity are implemented in kanzi engines using SurfaceView as an initialization-time interface while loading 3D resources to SurfaceView. By designing a development program, realizing specific animation by using Kanzi C ++, executing service judgment by using Java at the Android end, and mutually calling by means of a JNI method to realize development of the vehicle-mounted Android3D application program based on the Kanzi engine. And the service Activity of the Android terminal inherits Kanzi Activity and can participate in the interface circulation and call of the application program as the same as other non-3D activities.
According to the animation playing program package writing method provided by the second embodiment of the invention, optimization is performed on the basis of the second embodiment, and 3D skeleton animation is cited in an Android application program through a kanzi engine; the method comprises the steps that 3D resource files are loaded in an Android application program, so that 3D resources are displayed; the method comprises the steps of calling a dynamic link library through JNI in an Android application program to control 3D resources; the response of the Android application program to the user is realized, so that the requirement on the 3D animation display effect is met, the limitation of Android on interface display is overcome, meanwhile, the development mode meets the vehicle-mounted application requirement, and the development is more efficient.
Example III
Fig. 3 is a schematic structural diagram of an animation playing package writing device according to a third embodiment of the present invention. As shown in fig. 3, the animation playing package writing device provided in this embodiment includes:
a resource file generating module 310, configured to generate a three-dimensional resource file according to the skeletal animation file in the project created by Kanzi Studio;
a first writing module 320, configured to write a control application program for controlling the three-dimensional resource file in an application program object created through a Visio Studio;
And the second writing module 330 is configured to write, through an integrated development tool, an animation playing program package according to the three-dimensional resource file, the control application program and the Kanzi engine, and import the animation playing program package into the vehicle-mounted system.
According to the animation playing program package writing device provided by the embodiment of the invention, the user interface fusion of the skeleton animation at the Android end is realized, the requirement of the 3D animation on the display effect is met, the vehicle-mounted application can be met, and the development is more efficient.
On the basis of the above embodiment, the resource file generating module 310 includes:
the attribute adjusting unit is used for adjusting the attribute of the skeleton animation corresponding to the skeleton animation file;
The layout unit is used for laying out the interfaces of the skeleton animation after the attribute adjustment and generating an animation resource template;
The rendering unit is used for performing animation rendering on the skeleton animation according to the adjusted attribute;
And the first compiling unit is used for compiling based on the interface layout result, the animation resource template and the animation rendering result to obtain the three-dimensional resource file.
On the basis of the above embodiment, the attribute adjustment unit is configured to:
Altering the material type of the skeletal animation to a vertex-coloring von willebrand skin;
Adjusting a shader skinned skeleton definition value according to the skeleton number of the skeleton animation;
Adjusting the mixing intensity and specular reflection index of the bone animation.
Based on the above embodiment, the first writing module 320 includes:
The declaration unit is used for declaring and/or defining the three-dimensional resource file;
the time line establishing unit is used for establishing a time line of the skeleton animation corresponding to the three-dimensional resource file;
A first writing unit for creating an animation player and writing an animation playing method based on the time line;
the first establishing unit is used for calling a first Java local interface of the animation playing method;
and the second compiling unit is used for compiling a dynamic link library based on the animation playing method and the first Java local interface to obtain the control application program.
On the basis of the above embodiment, the device further includes:
the first newly-built module is used for newly-building an asset folder in the Android Studio, and the asset folder is used for placing the three-dimensional resource file;
and the second newly-built module is used for newly-building a dynamic instruction set file in the Android Studio, wherein the dynamic instruction set file and the dynamic link library are positioned in the same folder.
Based on the above embodiment, the second writing module 330 includes:
the second establishing unit is used for establishing a second Java local interface for calling the animation playing method;
and the third compiling unit is used for compiling based on the animation playing method and the second Java local interface to obtain the animation playing program package.
On the basis of the above embodiment, the device further includes:
And the calling module is used for calling the animation playing method through the first Java local interface and the second Java local interface when receiving the playing instruction.
The animation playing program package writing device provided by the third embodiment of the invention can be used for executing the animation playing program package writing method provided by any embodiment, and has corresponding functions and beneficial effects.
Example IV
Fig. 4 is a schematic hardware structure of an electronic device according to a fourth embodiment of the present application. Electronic devices include, but are not limited to: desktop computers, notebook computers, smart phones, servers, and other electronic devices. As shown in fig. 4, the electronic device provided by the present application includes a storage device 42, a processor 41, and a computer program stored on the storage device and capable of running on the processor, where the program is executed by the processor 41 to implement the method for writing the animation playing program package.
The electronic device may also include a storage 42; the number of processors 41 in the electronic device may be one or more, one processor 41 being taken as an example in fig. 4; the storage device 42 is used for storing one or more programs; the one or more programs are executed by the one or more processors 41, so that the one or more processors 41 implement the animation playback package writing method as described in the embodiment of the present application.
The electronic device further includes: a communication means 43, an input means 44 and an output means 45.
The processor 41, the storage means 42, the communication means 43, the input means 44 and the output means 45 in the electronic device may be connected by a bus or other means, in fig. 4 by way of example.
The input device 44 is operable to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the electronic device. The output means 45 may comprise a display device such as a display screen.
The communication device 43 may include a receiver and a transmitter. The communication device 43 is provided to perform information transmission and reception communication according to the control of the processor 41.
The storage device 42, which is a computer-readable storage medium, may be configured to store a software program, a computer-executable program, and modules, and program instructions/modules corresponding to the animation play package writing method according to an embodiment of the present application (for example, the resource file generation module 310, the first writing module 320, and the second writing module 330 in the animation play package writing device). The storage device 42 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for a function; the storage data area may store data created according to the use of the electronic device, etc. In addition, the storage device 42 may include a high-speed random access storage device, and may also include a non-volatile storage device, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, storage 42 may further comprise storage remotely located with respect to processor 41, which may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
On the basis of the above-described embodiments, the present embodiment further provides a computer-readable storage medium having stored thereon a computer program which, when executed by an animation play package writing device, implements the animation play package writing method in any of the above-described embodiments of the present invention, the method comprising: in the project created through Kanzi Studio, generating a three-dimensional resource file according to the skeleton animation file; writing a control application program for controlling the three-dimensional resource file in an application program object created through a Visio Studio; and writing an animation playing program package according to the three-dimensional resource file, the control application program and the Kanzi engine through an integrated development tool, and importing the animation playing program package into a vehicle-mounted system.
A storage medium containing computer-executable instructions provided by embodiments of the present invention may employ any combination of one or more computer-readable media, such as a computer-readable signal medium or a storage medium. The computer readable storage medium may be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access Memory device (Random Access Memory, RAM), a Read-Only Memory device (ROM), an erasable programmable Read-Only Memory device (Erasable Programmable Read Only Memory, EPROM), a flash Memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. A computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to: electromagnetic signals, optical signals, or any suitable combination of the preceding. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, radio Frequency (RF), and the like, or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present application may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
From the above description of embodiments, it will be clear to a person skilled in the art that the present invention may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk, or an optical disk of a computer, where the instructions include a number of instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (7)

1. An animation playing program package writing method, which is characterized by comprising the following steps:
In the project created through Kanzi Studio, generating a three-dimensional resource file according to the skeleton animation file;
writing a control application program for controlling the three-dimensional resource file in an application program object created through a Visio Studio;
through an integrated development tool, an animation playing program package is written according to the three-dimensional resource file, the control application program and the Kanzi engine and is imported into a vehicle-mounted system;
The generating the three-dimensional resource file according to the skeleton animation file comprises the following steps:
adjusting the attribute of the skeleton animation corresponding to the skeleton animation file;
layout is carried out on the interface of the skeleton animation after the attribute adjustment, and an animation resource template is generated;
Performing animation rendering on the skeleton animation according to the adjusted attribute;
compiling based on an interface layout result, an animation resource template and an animation rendering result to obtain the three-dimensional resource file;
writing a control application program for controlling the three-dimensional resource file, comprising:
Declaration and/or definition of the three-dimensional resource file;
establishing a time line of the skeleton animation corresponding to the three-dimensional resource file;
creating an animation player and writing an animation playing method based on the time line;
Establishing a first Java local interface for calling the animation playing method;
Compiling a dynamic link library based on the animation playing method and the first Java local interface to obtain the control application program;
writing an animation playing program package according to the three-dimensional resource file, the control application program and the Kanzi engine, wherein the animation playing program package comprises the following components:
Establishing a second Java local interface for calling the animation playing method;
Compiling based on the animation playing method and the second Java local interface to obtain the animation playing program package.
2. The method of claim 1, wherein adjusting the properties of the skeletal animation corresponding to the skeletal animation file comprises:
Altering the material type of the skeletal animation to a vertex-coloring von willebrand skin;
Adjusting a shader skinned skeleton definition value according to the skeleton number of the skeleton animation;
Adjusting the mixing intensity and specular reflection index of the bone animation.
3. The method as recited in claim 1, further comprising:
newly building an asset folder in the Android Studio, wherein the asset folder is used for placing the three-dimensional resource file;
And newly establishing a dynamic instruction set file in the Android Studio, wherein the dynamic instruction set file and the dynamic link library are located in the same folder.
4. The method as recited in claim 1, further comprising:
and when receiving a playing instruction, calling the animation playing method through the first Java local interface and the second Java local interface.
5. An animation playing package writing device, comprising:
the resource file generation module is used for generating a three-dimensional resource file according to the skeleton animation file in the project created through Kanzi Studio;
the first writing module is used for writing a control application program for controlling the three-dimensional resource file in an application program object created through a visual Studio;
the second writing module is used for writing an animation playing program package according to the three-dimensional resource file, the control application program and the Kanzi engine through an integrated development tool and importing the animation playing program package into the vehicle-mounted system;
The resource file generation module comprises:
the attribute adjusting unit is used for adjusting the attribute of the skeleton animation corresponding to the skeleton animation file;
The layout unit is used for laying out the interfaces of the skeleton animation after the attribute adjustment and generating an animation resource template;
The rendering unit is used for performing animation rendering on the skeleton animation according to the adjusted attribute;
The first compiling unit is used for compiling based on an interface layout result, an animation resource template and an animation rendering result to obtain the three-dimensional resource file;
the first writing module includes:
The declaration unit is used for declaring and/or defining the three-dimensional resource file;
the time line establishing unit is used for establishing a time line of the skeleton animation corresponding to the three-dimensional resource file;
A first writing unit for creating an animation player and writing an animation playing method based on the time line;
the first establishing unit is used for calling a first Java local interface of the animation playing method;
the second compiling unit is used for compiling a dynamic link library based on the animation playing method and the first Java local interface to obtain the control application program;
the second writing module includes:
the second establishing unit is used for establishing a second Java local interface for calling the animation playing method;
and the third compiling unit is used for compiling based on the animation playing method and the second Java local interface to obtain the animation playing program package.
6. An electronic device, comprising:
one or more processors;
a storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the animation playback package authoring method of any one of claims 1-4.
7. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the animation playing package authoring method of any one of claims 1-4.
CN202110992978.0A 2021-08-27 2021-08-27 Animation playing program package writing method and device, electronic equipment and storage medium Active CN113672280B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110992978.0A CN113672280B (en) 2021-08-27 2021-08-27 Animation playing program package writing method and device, electronic equipment and storage medium
PCT/CN2022/114730 WO2023025233A1 (en) 2021-08-27 2022-08-25 Method and apparatus for writing animation playback program package, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110992978.0A CN113672280B (en) 2021-08-27 2021-08-27 Animation playing program package writing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113672280A CN113672280A (en) 2021-11-19
CN113672280B true CN113672280B (en) 2024-07-26

Family

ID=78546720

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110992978.0A Active CN113672280B (en) 2021-08-27 2021-08-27 Animation playing program package writing method and device, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN113672280B (en)
WO (1) WO2023025233A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113672280B (en) * 2021-08-27 2024-07-26 中国第一汽车股份有限公司 Animation playing program package writing method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103606180A (en) * 2013-11-29 2014-02-26 广州菲动软件科技有限公司 Rendering method and device of 3D skeletal animation
AU2020200471A1 (en) * 2020-01-23 2021-08-12 Bhattacharya, Srimanta MR Web Application Builder

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106649541A (en) * 2016-10-26 2017-05-10 广东小天才科技有限公司 Animation playing and generating method and device
WO2018226621A1 (en) * 2017-06-05 2018-12-13 Umajin Inc. Methods and systems for an application system
CN107291468B (en) * 2017-06-21 2021-03-19 深圳Tcl新技术有限公司 Method for playing power-on/power-off animation, terminal and computer readable storage medium
CN111722843A (en) * 2019-03-18 2020-09-29 苏州欧菲光科技有限公司 HMI system, HMI component thereof, HMI component development method and vehicle-mounted display equipment
CN110134392B (en) * 2019-04-30 2022-08-09 延锋伟世通电子科技(南京)有限公司 Kanzi-based sequence frame animation playing method
CN110554873B (en) * 2019-08-20 2023-06-30 上海沣沅星科技有限公司 System, computer device and storage medium for realizing man-machine interaction interface
CN111522620B (en) * 2020-07-06 2020-10-30 延锋伟世通电子科技(南京)有限公司 Full liquid crystal instrument of quick demonstration and high frame rate of rendering based on two process HMI
CN112099789A (en) * 2020-09-08 2020-12-18 中国第一汽车股份有限公司 Human-computer interaction design method, device, equipment and storage medium
CN113672280B (en) * 2021-08-27 2024-07-26 中国第一汽车股份有限公司 Animation playing program package writing method and device, electronic equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103606180A (en) * 2013-11-29 2014-02-26 广州菲动软件科技有限公司 Rendering method and device of 3D skeletal animation
AU2020200471A1 (en) * 2020-01-23 2021-08-12 Bhattacharya, Srimanta MR Web Application Builder

Also Published As

Publication number Publication date
WO2023025233A1 (en) 2023-03-02
CN113672280A (en) 2021-11-19

Similar Documents

Publication Publication Date Title
US12079626B2 (en) Methods and systems for creating applications using scene trees
US20190065028A1 (en) Agent-based platform for the development of multi-user virtual reality environments
US8739120B2 (en) System and method for stage rendering in a software authoring tool
US20130127849A1 (en) Common Rendering Framework and Common Event Model for Video, 2D, and 3D Content
CN116302366B (en) Terminal development-oriented XR application development system, method, equipment and medium
CN110825467A (en) Rendering method, rendering apparatus, hardware apparatus, and computer-readable storage medium
CN113672280B (en) Animation playing program package writing method and device, electronic equipment and storage medium
WO2023230423A1 (en) Combining content in a preview state
US9495788B2 (en) Apparatus and method for developing robot contents
US20240177390A1 (en) Avatar dance animation system
CN113095053A (en) Webpage table customizing method and device
CN104503663A (en) 3D man-machine interaction desktop system
CN111367561A (en) Software program remote development method and device
US8587601B1 (en) Sharing of three dimensional objects
CN115878115A (en) Page rendering method, device, medium and electronic equipment
CN111199519B (en) Method and device for generating special effect package
CN110554900B (en) Method, system, device and medium for presenting human-computer interface effect based on GPU
CN113419650A (en) Data moving method and device, storage medium and electronic equipment
CN117009029B (en) XR application and content running method, device and storage medium
CN116339737B (en) XR application editing method, device and storage medium
CN117193720A (en) Animation realization method and device, electronic equipment and storage medium
CN115623147A (en) Video production template generation method and related device
CN117009029A (en) XR application and content running method, device and storage medium
CN118153529A (en) Interactive content generation and display method and device and electronic equipment
CN117671204A (en) Interactive business application loading method and device of meta universe

Legal Events

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