A method and system for customizing visualization effects based on object models
By creating data interfaces and interaction methods in the three-dimensional object model, processing data in real time and driving model presentation effects, the problem of poor performance capabilities of object models in the existing technology is solved, and a three-dimensional model presentation and interactive experience that is closer to reality is achieved.
Patent Information
- Application Number
- CN202410085295.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-22
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2044-01-22
AI Technical Summary
The existing three-dimensional modeling technology cannot effectively support the performance of multiple states, the visual presentation of dynamic effects, third-party data access and data-driven model changes, resulting in poor performance capabilities of multiple states of object models and does not support dynamic interaction control of effects.
By creating data interfaces and interaction methods in the three-dimensional object model, the original model data is received and processed in real time, the data obtained by processing drives and controls the presentation effect and state changes of the three-dimensional model, and a three-dimensional scene structure tree is built and dynamically filled to achieve the performance of multiple states and the display of dynamic effects.
It improves the static and dynamic and variable presentation effects and capabilities of the three-dimensional model, enhances the interactive experience of the user controlling the three-dimensional model, and makes the model closer to the real effect.
Smart Images

Figure CN117853661B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of three-dimensional scene production and presentation, and more specifically, to a method and system for customizing visualization effects based on object models. Background Art
[0002] Today we are in the digital age, and 3D modeling technology has been widely used and developed in many fields. 3D modeling technology can provide more accurate and efficient solutions for all walks of life.
[0003] 3D modeling technology is mainly the process of creating, editing and organizing 3D objects through computing software, and generating 3D models, 2D images and animations. At present, 3D modeling technology is widely used in many fields such as the construction industry, industrial design, game development and film and television production. In the construction industry, 3D modeling technology can help designers present design solutions in a more intuitive and comprehensive way, while improving work efficiency and reducing communication costs with customers. In industrial design, 3D modeling technology can quickly complete the construction of product prototypes. At the same time, through engineering analysis, the rationality, safety and stability of product design can be determined, and engineers can be assisted in optimization and improvement. In game development, 3D modeling is mainly used in the creation of scenes, characters, props and other elements in the game, while increasing the interactive ability of objects, so that players get a more immersive gaming experience. In film and television production, with the help of 3D modeling technology, realistic special effects and animation effects can be generated, which can enhance the visual sense of reality and shock of the film.
[0004] Although 3D modeling technology is relatively mature and has been widely used in many industries, it still faces new challenges in some emerging fields. In the era of digital economy, visualization, as a key technology for the digital transformation of most enterprises, is increasingly sought after by enterprises. Visualization technology uses physical data and models to simulate and predict the behavior and performance of the system by establishing corresponding digital models. It can accurately reflect the working status and changes of the physical system, and then connect the real world with the visualized twin world, greatly improving the efficiency, safety and reliability of the system.
[0005] In the field of visualization, 3D models are not only used to display content, but also need to reflect the movement and working status of 3D models through data. This requires that the model not only has the traditional model data capabilities, but also needs data reception and feedback interfaces, data-driven model capabilities, animation performance capabilities, and state effect change capabilities. These capabilities are not available in existing modeling processes and methods.
[0006] In summary, the existing modeling processes, methods and technologies only support the construction of three-dimensional models and simple animation performance, do not support the ability to display multiple states, do not support the visualization of dynamic effects, do not support third-party data access, and do not support the ability to generate state changes and device status feedback through data-driven models.
[0007] Based on this, it is necessary to introduce a new method and system, combine the existing modeling capabilities, add data interfaces, animation effects, data model construction and effect state expression capabilities, and based on the constructed three-dimensional object model, according to the interactive operation of the three-dimensional object model, receive and process the original model data in real time, and use the processed data to drive and control the presentation effect and state change of the three-dimensional model, so as to solve the technical problems existing in the prior art such as poor performance of multiple states of object models, lack of support for dynamic interactive control of effects, and lack of support for data-driven model changes, so as to make the model closer to the real effect, improve the static and dynamic changeable presentation effects and capabilities of the three-dimensional model, and the interactive experience of users controlling the three-dimensional model. Summary of the invention
[0008] In response to the technical problems mentioned above, the present invention provides a method and system for customizing visualization effects based on an object model. Based on a constructed three-dimensional object model, the original model data is received and processed in real time according to the interactive operations of the three-dimensional object model, and the processed data is used to drive and control the presentation effects and state changes of the three-dimensional model, so as to solve the technical problems existing in the prior art such as poor performance of multiple states of object models, lack of support for dynamic interactive control of effects, and lack of support for data-driven model changes, so as to make the model closer to the real effect, improve the static and dynamic variable presentation effects and capabilities of the three-dimensional model, and the interactive experience of users controlling the three-dimensional model.
[0009] The present invention provides a method for customizing visualization effects based on an object model, the method comprising:
[0010] S101, creating and defining a data interface and an interaction method: creating a model structure node of an object model according to a visual object model structure, and defining a data interface and an interaction type of the object model; S102, receiving and processing driving data: receiving original model data based on the data interface, and discretizing the original model data according to a visual model data format to obtain visual model data, and determining the interaction method of model structure nodes at all levels of the object model; S103, model editing and dynamic visualization output: receiving a model visualization custom interaction request in real time, constructing a three-dimensional scene structure tree based on the visual model data and the visual object model structure, obtaining characteristic value parameters of the object model with key frames as a timeline, performing a difference dynamic filling process on the characteristic value parameters, generating effect data, and outputting the effect data based on the three-dimensional scene structure tree and the data interface to display the model visualization dynamic effect; S104, object model data packaging and storage: packaging and storing the original model data and the visual model data according to the visual model data format.
[0011] As described above, in step S101, the step of creating a model structure node of the object model according to the visual object model structure, defining a data interface, and the step of defining the interaction type of the object model further includes: S2-1, creating a model structure node of the object model according to the visual object model structure, and determining and initializing the node type, node level, adjustment parameters, spatial coordinates, key frames, and eigenvalue parameters of the model structure node; S2-2, defining the data interface of the object model, including a model state interface and a result output interface; S2-3, initially setting the interaction state, interaction mode, and interaction range of the model structure nodes of different node levels according to the node type and node level of the model structure node; wherein the visual object model structure includes: nodes, node types, node levels, adjustment parameters, interaction states, spatial coordinates, key frames, and eigenvalue parameters; the node types include: root nodes and child nodes; the node level of the root node is the first level.
[0012] As described above, in step S102, the step of discretizing the original model data according to the visualization model data format further includes: S3-1, calling and using the data model state interface to obtain the original model data according to the external model data import request; S3-2, defining the structure and accuracy of the three-dimensional grid, generating a visualization three-dimensional grid, and discretizing the original model data based on the visualization three-dimensional grid to obtain the discretized basic data; S3-3, extracting effect data, interaction data and interface data from the discretized basic data according to the visualization model data format, and generating the visualization model data from the effect data and the interaction data; S3-4, determining the interaction mode of the model structure nodes at each level of the object model according to the interaction data; wherein the visualization model data format includes: the original model data and secondary editing data; the original model data includes: object, model, grid, structure, material, texture and skeleton; the secondary editing data includes: the effect data, the interaction data and the interface data.
[0013] As described above, the step S3-2 further includes: S3-21, defining the structure of the three-dimensional grid, including grid simplification parameters, grid smoothing parameters, grid cutting parameters and grid compression parameters, and adjusting the accuracy of the three-dimensional grid through the grid simplification parameters, the grid smoothing parameters, the grid cutting parameters and the grid compression parameters; S3-22, creating a grid standard library based on the structure and accuracy of the three-dimensional grid, and generating a visual three-dimensional grid; S3-23, calling the grid standard library, and importing the original model data into the visual three-dimensional grid for discrete classification, and obtaining the discretized original model data, as well as effect data, interaction data and interface data, and then obtaining the discretized basic data.
[0014] As described above, in step S102, the step of determining the interaction mode of the model structure nodes at each level of the object model further includes: based on the original data, acquiring interaction data, creating the model structure nodes of the object model according to the interaction data and the visual object model structure, and determining the node type and node level of the model structure nodes; dividing the model structure nodes into hierarchical structures according to the node type and node level of the model structure nodes, and determining the interaction state, interaction mode and interaction range of the model structure nodes of different hierarchical structures; wherein the model structure nodes belonging to the same hierarchical structure have the same node level; when the model structure node is a root node, and the interaction state of the root node is set to interactive, the interaction state of all child nodes in the substructure corresponding to the root node is also set to interactive; when the interaction mode of the root node is different from the interaction mode of the child node corresponding to the root node, the child node corresponding to the root node supports the interaction mode of the root node while also supporting the interaction mode of the child node; the interaction range is determined according to the interaction mode.
[0015] As described above, the S103 also includes the step of processing the model animation effect, specifically: determining the timeline according to the sequence of the key frames, and obtaining the characteristic value parameters corresponding to the key frames; based on the three-dimensional scene structure tree, determining the key frames and characteristic value parameters corresponding to the model structure nodes of the object model, and generating the effect data; outputting the effect data to the visualization interface corresponding to the three-dimensional scene structure tree through the result output interface for visual dynamic effect display; wherein, the nodes at each level in the three-dimensional scene structure tree correspond one-to-one to the model structure nodes at each level in the object model, and through this one-to-one correspondence, the effect data is output to the three-dimensional scene structure tree for dynamic display, and the state and effect of the visual dynamic effect display of the three-dimensional scene structure tree are defined and controlled in real time through the interaction mode and interaction range of the model structure nodes.
[0016] As described above, in step S103, before outputting the effect data based on the three-dimensional scene structure tree and the data interface to display the model visualization dynamic effect, the step of performing difference dynamic filling processing on the characteristic value parameters further includes: traversing the key frames and characteristic value parameters corresponding to the model structure nodes, determining the key frames with missing characteristic value parameters in the model structure nodes, and the number of key frames; obtaining the characteristic value parameters of the previous frame and the next frame adjacent to the key frame with missing characteristic value parameters, and using the timeline interpolation formula to calculate the characteristic value parameters of the key frame with missing characteristic value parameters; inserting the values of the characteristic value parameters of the key frame with missing characteristic value parameters into the position of the characteristic value parameters of the key frame with missing characteristic value parameters; wherein,
[0017] The timeline interpolation formula is:
[0018] Mx (n) is the value of the eigenvalue parameter of the key frame with the missing eigenvalue parameter, Sum is the number of the key frames, Lx is the value of the eigenvalue parameter of the previous frame adjacent to the key frame, Rx is the value of the eigenvalue parameter of the next frame adjacent to the key frame, and n is an integer greater than or equal to 0 and less than Sum.
[0019] As described above, the S103 also includes a model data processing step, specifically: based on the model state interface, accessing and separating the table of the visualization model data in columns or rows to obtain effect data, interaction data and interface data respectively; according to the usage scenario requirements, converting the formats of the separated effect data, interaction data and interface data into preset data formats respectively, and outputting them to the visualization interface for displaying the model visualization dynamic effect through the result output interface; wherein the preset data format includes integer, floating point, Boolean, string and event type; when the preset data format is an event type, the interaction data and effect data are output through the result output interface, and the interaction event is triggered, and the effect data is used to drive the dynamic update and display of the visualization effect of the object model.
[0020] As described above, step S104 further includes: according to the visualization model data format, encapsulating the original model data, and the edited effect data, interaction data and interface data according to data classification, and generating corresponding binary files; encapsulating and storing the original model data, and the effect data, the interaction data and the interface data again according to the binary files corresponding to the data.
[0021] Accordingly, the present invention also provides a visualization effect customization system based on an object model, the system comprising a model preprocessing module, an effect processing module, an interaction processing module, a data processing module and a data encapsulation storage module; wherein,
[0022] The model preprocessing module is used to create and define a data interface and an interaction mode: according to the structure of the visualized object model, a model structure node of the object model is created, and a data interface and an interaction type of the object model are defined;
[0023] The effect processing module is used to receive and process the driving data: based on the data interface, receive the original model data, and perform data discretization processing on the original model data according to the visual model data format to obtain the visual model data, and determine the interaction mode of the model structure nodes at each level of the object model;
[0024] The interaction processing module is used to receive a model visualization custom interaction request in real time, build a three-dimensional scene structure tree based on the visualization model data and the visualization object model structure, obtain the characteristic value parameters of the object model with key frames as the timeline, perform difference dynamic filling processing on the characteristic value parameters, generate effect data, and output the effect data based on the three-dimensional scene structure tree and the data interface to display the model visualization dynamic effect;
[0025] The data processing module is used to access and separate the table of the visualization model data in columns or rows based on the model state interface, respectively obtain effect data, interaction data and interface data, and convert the formats of the separated effect data, interaction data and interface data into preset data formats according to the use scenario requirements, and output them to the visualization interface for displaying the model visualization dynamic effect through the result output interface;
[0026] The data encapsulation and storage module is used to encapsulate and store the original model data and the visual model data according to the visual model data format.
[0027] By applying the above technical scheme, the present invention realizes a three-dimensional object model based on the construction, receives and processes the original model data in real time according to the interactive operation of the three-dimensional object model, and uses the processed data to drive and control the presentation effect and state change of the three-dimensional model, thereby solving the technical problems existing in the prior art such as poor performance of multiple states of object models, lack of support for dynamic interactive control of effects, and lack of support for data-driven model changes, thereby making the model closer to the real effect, improving the static and dynamic changeable presentation effects and capabilities of the three-dimensional model, and the interactive experience of users controlling the three-dimensional model. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0029] Figure 1 A schematic diagram of a flow chart of a method for customizing visualization effects based on an object model proposed in an embodiment of the present invention is shown;
[0030] Figure 2 A schematic diagram showing a dynamic control flow of a visualization effect customization method based on an object model proposed in an embodiment of the present invention
[0031] Figure 3A structural schematic diagram of a visualization effect customization system based on an object model proposed in an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0033] The present invention provides a method for customizing visualization effects based on an object model, such as Figure 1 As shown, the method comprises the following steps:
[0034] S101, creating and defining a data interface and an interaction method: creating a model structure node of an object model according to a visualized object model structure, and defining a data interface and an interaction type of the object model.
[0035] In this embodiment, in step S101, the step of visualizing the object model structure, creating the model structure node of the object model, and defining the data interface and the interaction type of the object model further includes:
[0036] S2-1, creating a model structure node of the object model according to the visual object model structure, and determining and initializing the node type, node level, adjustment parameter, spatial coordinate, key frame, and eigenvalue parameter of the model structure node;
[0037] S2-2, defining the data interface of the object model, including a model state interface and a result output interface;
[0038] S2-3, initially setting the interaction state, interaction mode and interaction range of the model structure nodes of different node levels according to the node type and node level of the model structure nodes;
[0039] The visual object model structure includes: nodes, node types, node levels, adjustment parameters, interaction states, spatial coordinates, key frames, and eigenvalue parameters;
[0040] The node types include: root node and child node;
[0041] The node level of the root node is the first level.
[0042] In order to enable those skilled in the art to have a deeper understanding of the object model-based visualization effect customization method provided by the present invention, a further supplementary explanation of this step is now provided by taking an actual application scenario as an example. Figure 2 shown.
[0043] Before the original model data is imported, a three-dimensional model editor will be used to create the model structure nodes of the object model based on the original model data and in accordance with the visual object model structure, and the node type, node level, adjustment parameters, spatial coordinates, key frames, and eigenvalue parameters of the model structure nodes will be determined and initialized.
[0044] According to each level of the object model structure, you can set the object's spatial position, rotation, scale, center point, material color, texture map, visibility, transparency, and skeletal animation progress. By modifying the corresponding parameters, you can modify the object's display posture in three-dimensional space, material effects, object visibility, and object movement posture.
[0045] After completing the definition of the three-dimensional scene structure tree, the present invention also sets the animation effect of the model. Specifically, the characteristic parameters of each level of the node in the object model structure are defined using the key frame as the timeline. The characteristic value parameters of a certain characteristic value at the current time point can be recorded through the key frame. Using this method, the changes in characteristic values at multiple different time points can be recorded on the timeline. Then, the interpolation in the middle is dynamically filled in through the timeline interpolation method, thereby presenting a motion effect.
[0046] At the same time, the parameters for modifying the characteristic value parameters and setting the animation effects are prepared and prefabricated according to the effect data standard. These effect data will eventually be integrated into the visual model data format in the repackaging definition.
[0047] S102, receiving and processing driving data: based on the data interface, receiving original model data, and performing data discretization processing on the original model data according to the visual model data format to obtain visual model data, and determining the interaction mode of model structure nodes at each level of the object model.
[0048] In this embodiment, in step S102, the step of performing data discretization processing on the original model data according to the visualization model data format further includes:
[0049] S3-1, according to the external model data import request, calling and using the data model state interface to obtain the original model data;
[0050] S3-2, defining the structure and precision of the three-dimensional grid, generating a visualized three-dimensional grid, and discretizing the original model data based on the visualized three-dimensional grid to obtain discretized basic data;
[0051] S3-3, extracting effect data, interaction data and interface data from the discretized basic data according to the visualization model data format, and generating the visualization model data from the effect data and the interaction data;
[0052] S3-4, determining the interaction mode of the model structure nodes at each level of the object model according to the interaction data;
[0053] in,
[0054] The visual model data format includes: the original model data and the secondary edited data;
[0055] The original model data includes: objects, models, meshes, structures, materials, textures and skeletons;
[0056] The secondary editing data includes: the effect data, the interaction data and the interface data.
[0057] In this embodiment, the step S3-2 further includes:
[0058] S3-21, defining the structure of the three-dimensional grid, including grid simplification parameters, grid smoothing parameters, grid cutting parameters and grid compression parameters, and adjusting the accuracy of the three-dimensional grid by the grid simplification parameters, the grid smoothing parameters, the grid cutting parameters and the grid compression parameters;
[0059] S3-22, creating a grid standard library based on the structure and accuracy of the three-dimensional grid, and generating a visual three-dimensional grid;
[0060] S3-23, calling the grid standard library, and importing the original model data into the visualized three-dimensional grid for discrete classification, respectively obtaining the discretized original model data, as well as effect data, interaction data and interface data, and then obtaining the discretized basic data.
[0061] In this embodiment, in step S102, the step of determining the interaction mode of the model structure nodes at each level of the object model further includes:
[0062] Based on the original data, interactive data is acquired, a model structure node of the object model is created according to the interactive data and the visual object model structure, and a node type and a node level of the model structure node are determined;
[0063] Divide the model structure nodes into hierarchical structures according to the node types and node levels of the model structure nodes, and determine the interaction states, interaction modes and interaction ranges of the model structure nodes of different hierarchical structures;
[0064] in,
[0065] The model structure nodes belonging to the same hierarchical structure have the same node level;
[0066] When the model structure node is a root node, and the interaction state of the root node is set to interactive, the interaction states of all subnodes in the substructure corresponding to the root node are also set to interactive;
[0067] When the interaction mode of the root node is different from the interaction mode of the child node corresponding to the root node, the child node corresponding to the root node supports the interaction mode of the child node while supporting the interaction mode of the root node;
[0068] The interaction range is determined according to the interaction mode.
[0069] In order to enable those skilled in the art to have a deeper understanding of the object model-based visualization effect customization method provided by the present invention, a further supplementary explanation of this step is now provided by taking an actual application scenario as an example. Figure 2 shown.
[0070] Obtain external original model data, and finally convert third-party formats such as OBJ, FBX, STL, 3DS, BIM and other format types into visual model data formats through data analysis, surface reduction and other stages.
[0071] The visualization model data format includes original model data such as objects, models, meshes, structures, materials, textures, skeletons, etc., as well as secondary editing data such as effect data, interaction data, interface data, etc.
[0072] in,
[0073] Object: represents the callable asset content in the current description format;
[0074] Model: The basic unit for building objects. One or more model class attributes make up an object.
[0075] Mesh: represents the basic unit of a model. A model can be composed of one or more meshes; in addition, in order to meet the demand for faster content loading, the present invention also defines a lower-level structure below the mesh, which includes vertex, index, and triangle data.
[0076] Structure: A tree structure for building objects, usually used to describe the interdependence between upper and lower levels.
[0077] Materials: are a set of properties that determine how a mesh surface reflects light and interacts with its surroundings.
[0078] Texturing: is the process of adding detail, color and texture to the surface of a model, which can be done by hand painting, real pictures and texture mapping.
[0079] Skeletal data: A virtual skeleton used to animate (pose and keyframe) a mesh.
[0080] Effect data: When performing secondary processing and editing on the mesh, the effect data constructed due to effect requirements, including the use of plug-ins and the effect parameters of the plug-ins.
[0081] Interaction data: The interactivity data of objects added by editing tools during secondary processing, including the interaction methods of 3D grids and related control parameters.
[0082] Interface data: defines the external interface parameters used by the data, and can also record the internal implementation logic of the parameter conversion process when the data is used.
[0083] In the node of importing external original model data, you can use the third-party model format to load it. Most traditional 3D models have their own data formats, so in the import stage, the model preprocessing module needs to discretize the imported third-party data according to the visual model data format definition standard.
[0084] During discretization, the structure and accuracy of the grid can be defined by 3D geometric discretization. The grid discretization method is implemented by calling the Assimp standard library, which supports setting grid simplification parameters, grid smoothing parameters, grid cutting parameters, and grid compression parameters to generate a visual grid.
[0085] Mesh Simplification Parameters: Used to control the complexity and accuracy of the mesh by adjusting the mesh simplification parameters to reduce the number of vertices and faces when loading.
[0086] Mesh smoothing parameters: By adjusting the mesh smoothing parameters, you can change the curvature and smoothness of the mesh to achieve a more realistic or simplified appearance.
[0087] Mesh cutting parameters: Mesh cutting parameters can affect the division and subdivision of the mesh, thereby changing the detail and accuracy of the mesh.
[0088] Mesh Compression Parameters: By adjusting the mesh compression parameters, you can change the degree to which the mesh data is compressed in order to reduce memory usage and improve performance when loading.
[0089] The discretized objects, models, meshes, structures, materials, textures, bones and other data will be sent to the data as basic data for repackaging.
[0090] In actual visualization application scenarios, since the object model provided by the present invention has the ability to interact, it is necessary to define the interactive scope and interactive mode of the object model.
[0091] The 3D model editor supports creating model structure nodes based on the original model data and the structure of the object model, and defines the interactive range of the model based on the model structure nodes. When defining, the algorithm can meet the definition of the interactive content of the multi-layer structure. The 3D model editor will create model structure nodes based on the original model data and the structure of the model. The interactive mode of each level of objects can be specified in a visual way. Editing the root node can define the entire model as a certain interactive state, and the interactive state can also be defined for the substructure of the object. When the root node and the substructure are defined as different interactive modes at the same time, except for the substructure, other structures support the interactive mode of the root node, and the substructure supports the interactive mode of the subnode. Taking the following node as an example, if the entire root node is defined as click interaction, the entire model will have button attributes; if the first-level node is added with a moving effect at the same time, the entire model will only have the click attribute, and only the first-level node will have the moving attribute effect.
[0092] Common interaction methods or means include clicking, moving, rotating, scaling, etc. These interaction methods or means are actually modifications to the eigenvalues of the model. Moving, rotating, and scaling are all modifications to the eigenvalues of the spatial coordinates of the model nodes.
[0093] Each interaction mode or means has a series of restriction parameters to satisfy the determination of the control influence range. Common influencing factors include interaction availability, double-click effectiveness, movement range limit, rotation range limit, zoom range limit, inertia support, sliding coefficient and other parameters. These parameters match the corresponding interaction mode and can affect the final presentation effect.
[0094] The interaction mode or interaction means can form interaction data according to the bound structural nodes and corresponding parameters, and the interaction data will eventually be integrated into a visual model data format in the repackaging definition.
[0095] S103, model editing and dynamic visualization output: receiving model visualization custom interaction requests in real time, constructing a three-dimensional scene structure tree based on the visualization model data and the visualization object model structure, obtaining characteristic value parameters of the object model with key frames as the timeline, performing difference dynamic filling processing on the characteristic value parameters, generating effect data, and outputting the effect data based on the three-dimensional scene structure tree and the data interface to display the model visualization dynamic effect.
[0096] In this embodiment, the S103 also includes the step of processing the model animation effect, specifically:
[0097] Determine the timeline according to the sequence of the key frames, and obtain characteristic value parameters corresponding to the key frames;
[0098] Based on the three-dimensional scene structure tree, determining key frames and characteristic value parameters corresponding to the model structure nodes of the object model, and generating the effect data;
[0099] Outputting the effect data to the visualization interface corresponding to the three-dimensional scene structure tree through the result output interface for visual dynamic effect display;
[0100] in,
[0101] Each level of nodes in the three-dimensional scene structure tree corresponds one-to-one to each level of model structure nodes in the object model. Through this one-to-one correspondence, the effect data is output to the three-dimensional scene structure tree for dynamic display, and the state and effect of the visual dynamic effect display of the three-dimensional scene structure tree are defined and controlled in real time through the interaction method and interaction range of the model structure nodes.
[0102] In this embodiment, in step S103, before outputting the effect data based on the three-dimensional scene structure tree and the data interface to display the model visualization dynamic effect, the step of dynamically filling the difference of the characteristic value parameters further includes:
[0103] Traversing the key frames and characteristic value parameters corresponding to the model structure nodes, determining the key frames of the model structure nodes that are missing characteristic value parameters, and the number of the key frames;
[0104] Acquire the feature value parameters of the previous frame and the next frame adjacent to the key frame of the missing feature value parameter, and use the timeline interpolation formula to calculate the feature value parameters of the key frame of the missing feature value parameter;
[0105] Inserting the value of the eigenvalue parameter of the key frame with the missing eigenvalue parameter into the position of the eigenvalue parameter of the key frame with the missing eigenvalue parameter;
[0106] in,
[0107] The timeline interpolation formula is:
[0108] Mx (n) is the value of the eigenvalue parameter of the key frame with the missing eigenvalue parameter, Sum is the number of the key frames, Lx is the value of the eigenvalue parameter of the previous frame adjacent to the key frame, Rx is the value of the eigenvalue parameter of the next frame adjacent to the key frame, and n is an integer greater than or equal to 0 and less than Sum.
[0109] In this embodiment, S103 further includes the step of model data processing, specifically:
[0110] Based on the model state interface, access and separate the table data of the visualization model data in columns or rows to obtain effect data, interaction data and interface data respectively;
[0111] According to the use scenario requirements, the formats of the separated effect data, the interaction data and the interface data are converted into preset data formats respectively, and output to the visualization interface for displaying the model visualization dynamic effect through the result output interface;
[0112] in,
[0113] The preset data formats include integer, floating point, Boolean, string and event types;
[0114] When the preset data format is an event type, the interaction data and effect data are output through a result output interface, and the interaction event is triggered, and the effect data is used to drive the dynamic update and display of the visualization effect of the object model.
[0115] In order to enable those skilled in the art to have a deeper understanding of the object model-based visualization effect customization method provided by the present invention, a further supplementary explanation of this step is now provided by taking an actual application scenario as an example. Figure 2 shown.
[0116] Based on the original model data, the space, material, motion state and other characteristic parameter values of the object model are adjusted to achieve the ability to change the effect. When setting, you can use a one-time modification method, or a timeline animation method and performance effect setting.
[0117] After defining the 3D scene structure tree, set the animation effect of the model. Specifically, define the characteristic parameters of each level of the node in the object model structure with the key frame as the timeline. The key frame can record the characteristic value parameters of a certain characteristic value at the current time point. This method can be used to record the changes of characteristic values at multiple different time points on the timeline. Then, through the timeline interpolation method, dynamically fill in the interpolation in the middle to present a motion effect.
[0118] Model data processing has two main functions. The first is to define the object model as an external data interface for data access, transmission and control. The other is to define the internal logical structure of the visual object model.
[0119] The data interface, also called the external interface, includes the model state interface and the result output interface.
[0120] The external interface definition of the object model actually defines the data input and output interface exposed by the model after the visualization model is loaded when the visualization application is built in the upper layer.
[0121] External interfaces usually include several capabilities, namely data transmission, status control, and result output.
[0122] Data transmission is mainly used to control the state of the visualized object model, and is usually used as an input data interface. When data transmission is performed, data is usually transmitted in the form of a table. The present invention provides a separation processing solution for tabular data. By reading and analyzing the table type data format, the data can be separated according to rows and columns to form separate data. The separated independent data can be converted into integer, floating point, Boolean, string, event type, etc. according to different usage scenarios.
[0123] State control data includes interaction data and effect data, which mainly realizes state switching by modifying the characteristic values in the effect data and controlling the animation effect. The characteristic value parameters can be exposed to the external interface through parameter extraction. Depending on the exposed characteristic values, they may be integer, floating point, Boolean, etc.; animation effect control is an event type, through which operations such as playing, pausing, resuming, stopping, and restarting the animation segment can be controlled.
[0124] The result output interface is usually provided to the visualization application as an output parameter. The external input interface can be used to drive the operation status of the visualization model with external table data and state control data. After the drive is completed, the visualization model can also output some calculation results to the outside through internal logical calculations. For details on how to generate external data, see the steps for defining the internal logical structure of visualization below.
[0125] Visualize the internal logical structure definition:
[0126] In addition to being directly bound to the parameters of the object model, the separated data can also be directly used in a variety of mathematical and logical algorithms. In practical applications, the original model data transmitted externally and the control characteristic value parameters of the visual object model are not necessarily the same, so data transformation is required. At the same time, when the data is actually running, the visual model system also needs to monitor the operating status of the visual object model. This status information also needs to be completed through mathematical algorithms and logical judgments to complete the construction of the mathematical model, and finally output the results through the external interface.
[0127] Mathematical algorithms include commonly used mathematical algorithm modules such as addition, subtraction, multiplication, division, exponentiation, and square root. It also supports the writing of complex mathematical algorithms such as expressions and conditional statements. In addition, it also supports the writing of script content. Scripts are written in JavaScript. In addition to the commonly used libraries, they also have the ability to process visual models, add effects, and external data. JavaScript can be used to complete the complex driving of data on models, and at the same time, it can also complete the construction of data models.
[0128] The processed data can be connected through visual connections to complete the connection of data and events. After the connection, all logical nodes will automatically form an algorithm statement after adding and connecting. These data algorithm statements will eventually form algorithm data, and the algorithm data will eventually be integrated into a visual model format in the repackage definition.
[0129] S104, object model data packaging and storage: packaging and storing the original model data and the visual model data according to the visual model data format.
[0130] In this embodiment, step S104 further includes:
[0131] According to the visualization model data format, the original model data, and the edited effect data, interaction data and interface data are packaged according to data classification, and a corresponding binary file is generated;
[0132] The original model data, the effect data, the interaction data and the interface data are packaged and stored again according to the binary files corresponding to the data.
[0133] In order to enable those skilled in the art to have a deeper understanding of the method for customizing visualization effects based on an object model provided by the present invention, further supplementary explanation of this step is now provided by taking an actual application scenario as an example. Figure 2 shown.
[0134] After all editing and production work is completed for the object model, the original model data, as well as the edited effect data, interaction data and interface data are packaged and stored according to data classification according to the visual model data format. When packaging, the packaged data includes original model data such as objects, models, meshes, structures, materials, textures, skeletons, and secondary editing data such as effect data, interaction data, interface data, etc.
[0135] When data enters the data packaging storage module, it needs to go through a data redefinition process. When repackaging, in addition to storing and recording all data information, it is also necessary to consider data security and data reading speed.
[0136] When repackaging and defining the model data, the module uses OSGB technology. OSGB (OpenSceneGraphBinary): OSGB is a binary file format based on OpenSceneGraph (OSG). OSGB files can store geometric information of 3D models, embedded linked texture data (.jpg) and scene layer information. The advantages of OSGB format are fast loading speed, support for level of detail (LOD) technology, ensuring data security, and being suitable for the application of object models in visualization.
[0137] After the data is repackaged, the new model data can be given more functions and data in the effect processing module. When other application software uses the model, they can follow the data packaging scheme provided in the patent to complete the effect addition definition of the visual model.
[0138] By applying the above technical solutions, a constructed three-dimensional object model is realized. According to the interactive operation of the three-dimensional object model, the original model data is received and processed in real time, and the processed data is used to drive and control the presentation effect and state change of the three-dimensional model. The technical problems existing in the prior art such as poor performance of multiple states of object models, lack of support for dynamic interactive control of effects, and lack of support for data-driven model changes are solved, thereby making the model closer to the real effect, improving the static and dynamic changeable presentation effects and capabilities of the three-dimensional model, and the interactive experience of users controlling the three-dimensional model.
[0139] Corresponding to the method for customizing visualization effects based on an object model in one embodiment of the present invention, the present invention also discloses a system for customizing visualization effects based on an object model, such as Figure 3 As shown, the system includes a model preprocessing module, an effect processing module, an interaction processing module, a data processing module and a data encapsulation storage module;
[0140] in,
[0141] The model preprocessing module is used to create and define a data interface and an interaction mode: according to the structure of the visualized object model, a model structure node of the object model is created, and a data interface and an interaction type of the object model are defined;
[0142] The effect processing module is used to receive and process the driving data: based on the data interface, receive the original model data, and perform data discretization processing on the original model data according to the visual model data format to obtain the visual model data, and determine the interaction mode of the model structure nodes at each level of the object model;
[0143] The interaction processing module is used to receive a model visualization custom interaction request in real time, build a three-dimensional scene structure tree based on the visualization model data and the visualization object model structure, obtain the characteristic value parameters of the object model with key frames as the timeline, perform difference dynamic filling processing on the characteristic value parameters, generate effect data, and output the effect data based on the three-dimensional scene structure tree and the data interface to display the model visualization dynamic effect;
[0144] The data processing module is used to access and separate the table of the visualization model data in columns or rows based on the model state interface, respectively obtain effect data, interaction data and interface data, and convert the formats of the separated effect data, interaction data and interface data into preset data formats according to the use scenario requirements, and output them to the visualization interface for displaying the model visualization dynamic effect through the result output interface;
[0145] The data encapsulation and storage module is used to encapsulate and store the original model data and the visual model data according to the visual model data format.
[0146] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0147] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A method for customizing visualization effects based on an object model, characterized in that: The method comprises: S101, creating and defining a data interface and an interaction mode: creating a model structure node of an object model according to a visualized object model structure, and defining a data interface and an interaction type of the object model; S102, receiving and processing driving data: based on the data interface, receiving original model data, and performing data discretization processing on the original model data according to the visual model data format to obtain visual model data, and determining the interaction mode of the model structure nodes at each level of the object model; S103, model editing and dynamic visualization output: receiving a model visualization custom interaction request in real time, constructing a three-dimensional scene structure tree based on the visualization model data and the visualization object model structure, obtaining characteristic value parameters of the object model with key frames as the timeline, performing difference dynamic filling processing on the characteristic value parameters, generating effect data, and outputting the effect data based on the three-dimensional scene structure tree and the data interface to display the model visualization dynamic effect; S104, encapsulating and storing object model data: encapsulating and storing the original model data and the visual model data according to the visual model data format; in, In step S102, the step of performing data discretization processing on the original model data according to the visualization model data format further includes: S3-1, according to the external model data import request, calling and using the data model state interface to obtain the original model data; S3-2, defining the structure and precision of the three-dimensional grid, generating a visualized three-dimensional grid, and discretizing the original model data based on the visualized three-dimensional grid to obtain discretized basic data; S3-3, extracting effect data, interaction data and interface data from the discretized basic data according to the visualization model data format, and generating the visualization model data from the effect data and the interaction data; S3-4, determining the interaction mode of the model structure nodes at each level of the object model according to the interaction data; in, The visual model data format includes: the original model data and the secondary edited data; The original model data includes: objects, models, meshes, structures, materials, textures and skeletons; The secondary editing data includes: the effect data, the interaction data and the interface data; in step S103, before outputting the effect data based on the three-dimensional scene structure tree and the data interface to display the model visualization dynamic effect, the step of performing a difference dynamic filling process on the characteristic value parameter further includes: Traversing the key frames and characteristic value parameters corresponding to the model structure nodes, determining the key frames of the model structure nodes that are missing characteristic value parameters, and the number of the key frames; Acquire the feature value parameters of the previous frame and the next frame adjacent to the key frame of the missing feature value parameter, and use the timeline interpolation formula to calculate the feature value parameters of the key frame of the missing feature value parameter; Inserting the value of the eigenvalue parameter of the key frame with the missing eigenvalue parameter into the position of the eigenvalue parameter of the key frame with the missing eigenvalue parameter; in, The timeline interpolation formula is: Mx (n) is the value of the eigenvalue parameter of the key frame with the missing eigenvalue parameter, Sum is the number of the key frames, Lx is the value of the eigenvalue parameter of the previous frame adjacent to the key frame, Rx is the value of the eigenvalue parameter of the next frame adjacent to the key frame, and n is an integer greater than or equal to 0 and less than Sum.
2. The method according to claim 1, characterized in that In step S101, the step of visualizing the object model structure, creating the model structure node of the object model, and defining the data interface and the interaction type of the object model further includes: S2-1, creating a model structure node of the object model according to the visual object model structure, and determining and initializing the node type, node level, adjustment parameter, spatial coordinate, key frame, and eigenvalue parameter of the model structure node; S2-2, defining the data interface of the object model, including a model state interface and a result output interface; S2-3, initially setting the interaction state, interaction mode and interaction range of the model structure nodes of different node levels according to the node type and node level of the model structure nodes; The visual object model structure includes: nodes, node types, node levels, adjustment parameters, interaction states, spatial coordinates, key frames, and eigenvalue parameters; The node types include: root node and child node; The node level of the root node is the first level.
3. The method according to claim 1, characterized in that The step of S3-2 further includes: S3-21, defining the structure of the three-dimensional grid, including grid simplification parameters, grid smoothing parameters, grid cutting parameters and grid compression parameters, and adjusting the accuracy of the three-dimensional grid by the grid simplification parameters, the grid smoothing parameters, the grid cutting parameters and the grid compression parameters; S3-22, creating a grid standard library based on the structure and accuracy of the three-dimensional grid, and generating a visual three-dimensional grid; S3-23, calling the grid standard library, and importing the original model data into the visualized three-dimensional grid for discrete classification, respectively obtaining the discretized original model data, as well as effect data, interaction data and interface data, and then obtaining the discretized basic data.
4. The method according to claim 1, characterized in that In step S102, the step of determining the interaction mode of the model structure nodes at each level of the object model further includes: Based on the original model data, the interaction data is acquired, a model structure node of the object model is created according to the interaction data and the visual object model structure, and a node type and a node level of the model structure node are determined; Divide the model structure nodes into hierarchical structures according to the node types and node levels of the model structure nodes, and determine the interaction states, interaction modes and interaction ranges of the model structure nodes of different hierarchical structures; in, The model structure nodes belonging to the same hierarchical structure have the same node level; When the model structure node is a root node, and the interaction state of the root node is set to interactive, the interaction states of all subnodes in the substructure corresponding to the root node are also set to interactive; When the interaction mode of the root node is different from the interaction mode of the child node corresponding to the root node, the child node corresponding to the root node supports the interaction mode of the child node while supporting the interaction mode of the root node; The interaction range is determined according to the interaction mode.
5. The method according to claim 1, characterized in that The S103 also includes the step of processing the model animation effect, specifically: Determine the timeline according to the sequence of the key frames, and obtain characteristic value parameters corresponding to the key frames; Based on the three-dimensional scene structure tree, determining key frames and characteristic value parameters corresponding to the model structure nodes of the object model, and generating the effect data; Outputting the effect data to the visualization interface corresponding to the three-dimensional scene structure tree through the result output interface for visual dynamic effect display; in, Each level of nodes in the three-dimensional scene structure tree corresponds one-to-one to each level of model structure nodes in the object model. Through this one-to-one correspondence, the effect data is output to the three-dimensional scene structure tree for dynamic display, and the state and effect of the visual dynamic effect display of the three-dimensional scene structure tree are defined and controlled in real time through the interaction method and interaction range of the model structure nodes.
6. The method according to claim 1, characterized in that The S103 also includes the step of model data processing, specifically: Based on the model state interface, access and separate the table data of the visualization model data in columns or rows to obtain effect data, interaction data and interface data respectively; According to the use scenario requirements, the formats of the separated effect data, the interaction data and the interface data are converted into preset data formats respectively, and output to the visualization interface for displaying the model visualization dynamic effect through the result output interface; in, The preset data formats include integer, floating point, Boolean, string and event types; When the preset data format is an event type, the interaction data and effect data are output through a result output interface, and an interaction event is triggered, and the effect data is used to drive the dynamic update and display of the visualization effect of the object model.
7. The method according to claim 1, characterized in that Step S104 further includes: According to the visualization model data format, the original model data, and the edited effect data, interaction data and interface data are packaged according to data classification, and a corresponding binary file is generated; The original model data, the effect data, the interaction data and the interface data are packaged and stored again according to the binary files corresponding to the data.
8. A system for implementing the method for customizing visualization effects based on object models as claimed in claim 1, characterized in that: The system includes a model preprocessing module, an effect processing module, an interaction processing module, a data processing module and a data encapsulation storage module; in, The model preprocessing module is used to create and define a data interface and an interaction mode: according to the visual object model structure, create a model structure node of the object model, and define a data interface and an interaction type of the object model; The effect processing module is used to receive and process the driving data: based on the data interface, receive the original model data, and perform data discretization processing on the original model data according to the visual model data format to obtain the visual model data, and determine the interaction mode of the model structure nodes at each level of the object model; The interaction processing module is used to receive a model visualization custom interaction request in real time, build a three-dimensional scene structure tree based on the visualization model data and the visualization object model structure, obtain the characteristic value parameters of the object model with key frames as the timeline, perform difference dynamic filling processing on the characteristic value parameters, generate effect data, and output the effect data based on the three-dimensional scene structure tree and the data interface to display the model visualization dynamic effect; The data processing module is used to access and separate the table of the visualization model data in columns or rows based on the model state interface, respectively obtain effect data, interaction data and interface data, and convert the formats of the separated effect data, interaction data and interface data into preset data formats according to the use scenario requirements, and output them to the visualization interface for displaying the model visualization dynamic effect through the result output interface; The data encapsulation and storage module is used to encapsulate and store the original model data and the visual model data according to the visual model data format; The step of performing data discretization processing on the original model data according to the visual model data format further includes: S3-1, according to the external model data import request, calling and using the data model state interface to obtain the original model data; S3-2, defining the structure and precision of the three-dimensional grid, generating a visualized three-dimensional grid, and discretizing the original model data based on the visualized three-dimensional grid to obtain discretized basic data; S3-3, extracting effect data, interaction data and interface data from the discretized basic data according to the visualization model data format, and generating the visualization model data from the effect data and the interaction data; S3-4, determining the interaction mode of the model structure nodes at each level of the object model according to the interaction data; in, The visual model data format includes: the original model data and the secondary edited data; The original model data includes: objects, models, meshes, structures, materials, textures and skeletons; The secondary editing data includes: the effect data, the interaction data and the interface data; Based on the interactive processing module, before outputting the effect data based on the three-dimensional scene structure tree and the data interface to display the model visualization dynamic effect, the step of dynamically filling the difference of the characteristic value parameters further includes: Traversing the key frames and characteristic value parameters corresponding to the model structure nodes, determining the key frames of the model structure nodes that are missing characteristic value parameters, and the number of the key frames; Acquire the feature value parameters of the previous frame and the next frame adjacent to the key frame of the missing feature value parameter, and use the timeline interpolation formula to calculate the feature value parameters of the key frame of the missing feature value parameter; Inserting the value of the eigenvalue parameter of the key frame with the missing eigenvalue parameter into the position of the eigenvalue parameter of the key frame with the missing eigenvalue parameter; in, The timeline interpolation formula is: Mx (n) is the value of the eigenvalue parameter of the key frame with the missing eigenvalue parameter, Sum is the number of the key frames, Lx is the value of the eigenvalue parameter of the previous frame adjacent to the key frame, Rx is the value of the eigenvalue parameter of the next frame adjacent to the key frame, and n is an integer greater than or equal to 0 and less than Sum.
Citation Information
Patent Citations
Visualization method and system for Web end three-dimensional model
CN111125585A
Method and device for generating three-dimensional visual scene, equipment and storage medium
CN116863054A