CN111210525A - Method, platform, equipment and readable storage medium for interactive editing of three-dimensional model - Google Patents

Method, platform, equipment and readable storage medium for interactive editing of three-dimensional model Download PDF

Info

Publication number
CN111210525A
CN111210525A CN201811384978.7A CN201811384978A CN111210525A CN 111210525 A CN111210525 A CN 111210525A CN 201811384978 A CN201811384978 A CN 201811384978A CN 111210525 A CN111210525 A CN 111210525A
Authority
CN
China
Prior art keywords
interaction
rendering
request
dimensional model
model
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.)
Pending
Application number
CN201811384978.7A
Other languages
Chinese (zh)
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201811384978.7A priority Critical patent/CN111210525A/en
Publication of CN111210525A publication Critical patent/CN111210525A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering

Abstract

The invention provides a method, a platform, equipment and a readable storage medium for interactive editing of a three-dimensional model. The method comprises the following steps: obtaining a model rendering request, wherein the model rendering request comprises rendering parameters; rendering the three-dimensional model in the HTML5 page by adopting a WebGL technology according to the rendering parameters in the model rendering request; obtaining a model interactive editing request, wherein the interactive editing request comprises: interaction type and interaction parameter; setting the interaction between the three-dimensional model and the user according to the interaction type and the interaction parameters corresponding to the interaction type; obtaining a model issuing request, wherein the issuing request comprises: issuing an identifier of the platform; and according to the publishing request, publishing the three-dimensional model on a publishing platform corresponding to the identifier of the publishing platform through pre-stored configuration information for interface docking. The method can support various application platforms, the steps of issuing on each application platform are simple, one-key issuing can be realized, and resource consumption is reduced.

Description

Method, platform, equipment and readable storage medium for interactive editing of three-dimensional model
Technical Field
The embodiment of the invention relates to the technical field of graphic processing, in particular to a method, a platform, equipment and a readable storage medium for interactive editing of a three-dimensional model.
Background
With the development of economy, the internet technology has also been developed dramatically. The daily services offered to people have moved from off-line to on-line. People make online shopping, order meals, etc. through the internet. When people shop online through the internet, a large amount of commodities are displayed on an internet platform. The specialization, individuation and reality of the commodities are particularly important. Because the three-dimensional model can be transmitted to the consumer more comprehensively, more detailedly and more lifelike commodity information from multiple angles, the purchasing desire and the purchasing accuracy of the consumer can be improved.
In the prior art, before an application platform issues a three-dimensional model, the three-dimensional model needs to be established and edited by animation through 3D MAX modeling software, the three-dimensional model is developed interactively through other local software, and finally, the application platform can be issued only after a user of the application platform performs steps such as platform configuration and compiling.
Therefore, in the method for interactive editing of a three-dimensional model in the prior art, although operations such as interactive editing can be performed, each application platform needs to be used only by installing corresponding configuration, and the steps of compiling and publishing on each application platform are complex, so that the requirement on the technical level of an application platform user is high, and the resource consumption is high.
Disclosure of Invention
The embodiment of the invention provides a three-dimensional model interactive editing method, a platform, equipment and a readable storage medium. The method solves the technical problems that although the three-dimensional model interactive editing method in the prior art can perform operations such as interactive editing, each application platform can be used only by installing corresponding configuration, the steps of compiling and releasing on each application platform are complex, the requirement on the technical level of an application platform user is high, and the resource consumption is high.
A first aspect of an embodiment of the present invention provides a method for interactive editing of a three-dimensional model, including: obtaining a model rendering request, wherein the model rendering request comprises rendering parameters; rendering the three-dimensional model in the HTML5 page by adopting a WebGL technology according to the rendering parameters in the model rendering request; obtaining a model interactive editing request, wherein the interactive editing request comprises: interaction type and interaction parameter; setting the interaction between the three-dimensional model and a user according to the interaction type and the interaction parameters corresponding to the interaction type; obtaining a model issuing request, wherein the issuing request comprises: issuing an identifier of the platform; and according to the release request, releasing the three-dimensional model on a release platform corresponding to the identifier of the release platform through pre-stored configuration information for interface docking.
A second aspect of the embodiments of the present invention provides a platform for interactive editing of a three-dimensional model, including: a rendering request obtaining module, configured to obtain a model rendering request, where the model rendering request includes a rendering parameter; the rendering module is used for rendering the three-dimensional model in the HTML5 page by adopting a WebGL technology according to the rendering parameters in the model rendering request; an interactive editing request obtaining module, configured to obtain a model interactive editing request, where the interactive editing request includes: interaction type and interaction parameter; the interaction setting module is used for setting the interaction between the three-dimensional model and a user according to the interaction type and the interaction parameters corresponding to the interaction type; a release request obtaining module, configured to obtain a model release request, where the release request includes: issuing an identifier of the platform; and the publishing module is used for publishing the three-dimensional model on a publishing platform corresponding to the identifier of the publishing platform through pre-stored configuration information for interface docking according to the publishing request.
A third aspect of embodiments of the present invention provides an electronic device, including: a memory, a processor, and a computer program; wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any of the first aspects.
A fourth aspect of embodiments of the present invention provides a computer-readable storage medium having a computer program stored thereon, the computer program being executable by a processor to implement the method according to any one of the first aspect.
Based on the aspects, the embodiment of the invention obtains the model rendering request, wherein the model rendering request comprises rendering parameters; rendering the three-dimensional model in the HTML5 page by adopting a WebGL technology according to the rendering parameters in the model rendering request; obtaining a model interactive editing request, wherein the interactive editing request comprises: interaction type and interaction parameter; setting the interaction between the three-dimensional model and the user according to the interaction type and the interaction parameters corresponding to the interaction type; obtaining a model issuing request, wherein the issuing request comprises: issuing an identifier of the platform; and according to the publishing request, publishing the three-dimensional model on a publishing platform corresponding to the identifier of the publishing platform through pre-stored configuration information for interface docking. Because the rendering and interaction setting of the three-dimensional model are directly carried out on the HTML5 page, and the publishing of the HTML5 page is carried out on different publishing platforms according to the preset configuration information, various application platforms can be supported, the publishing steps on each application platform are simple, the one-key publishing can be realized, and the resource consumption is reduced.
It should be understood that what is described in the summary above is not intended to limit key or critical features of embodiments of the invention, nor is it intended to limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
Fig. 1 is a flowchart of a method for interactive editing of a three-dimensional model according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for interactive editing of a three-dimensional model according to a second embodiment of the present invention;
fig. 3 is a flowchart of step 201 in the method for interactive editing of a three-dimensional model according to the second embodiment of the present invention;
fig. 4 is a flowchart of step 202 in the method for interactive editing of a three-dimensional model according to the second embodiment of the present invention;
fig. 5 is a schematic diagram of a line-plane graph after step 202c is executed by the method for interactively editing a three-dimensional model according to the second embodiment of the present invention;
fig. 6 is a schematic diagram of a line-plane graph after step 202d is executed by the method for interactively editing a three-dimensional model according to the second embodiment of the present invention;
fig. 7 is a flowchart of step 203 of the method for interactive editing of a three-dimensional model according to the second embodiment of the present invention;
fig. 8 is a schematic diagram of an interactive editing interface of hotspot interaction in the method for interactively editing a three-dimensional model according to the second embodiment of the present invention;
FIG. 9 is a first flowchart of step 204 of a method for interactive editing of a three-dimensional model according to a second embodiment of the present invention;
FIG. 10 is a second flowchart of step 204 of the method for interactive editing of a three-dimensional model according to the second embodiment of the present invention;
fig. 11 is a schematic structural diagram of a three-dimensional model interactive editing platform according to a third embodiment of the present invention;
fig. 12 is a schematic structural diagram of a platform for interactive editing of a three-dimensional model according to a fourth embodiment of the present invention;
fig. 13 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and the embodiments of the present invention are illustrative only and are not intended to limit the scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, and in the above-described drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used are interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In order to clearly understand the technical solution of the present invention, the following explains the algorithm involved in the embodiments of the present invention:
WebGL techniques: the English full name is: web Graphics Library, a 3D Graphics technology. This drawing technology standard allows JavaScript and OpenGL ES 2.0 to be combined together, and WebGL can provide hardware 3D accelerated rendering for HTML5Canvas by adding one JavaScript binding of OpenGL ES 2.0. 3D scenes and 3D models can be displayed more smoothly in a browser by means of a system display card, and complicated navigation and data visualization can be created. The WebGL technical standard eliminates the trouble of developing a web page-specific rendering plug-in, can be used to create web site pages with complex 3D structures, and can even be used to design 3D web games.
OpenGL ES: (English-language full-name: OpenGL for Embedded Systems) is a subset of OpenGL three-dimensional graphics APIs. The API is generalized by the Khronos group definition, which is a graphics software and hardware industry association that focuses primarily on open standards in the graphics and multimedia areas.
JavaScript: is an transliterated scripting language, which is a dynamic type, weak type, prototype-based language, with built-in support types. Its interpreter, called JavaScript engine, is a part of the browser, a scripting language widely used on clients, and was originally used on HTML (an application under the standard universal markup language) web pages to add dynamic functionality to the HTML web pages.
An application scenario of the three-dimensional model interactive editing method according to the embodiment of the present invention is described below. The embodiment of the invention can be applied to interactive display of the three-dimensional model of the commodity in a three-dimensional mode in the HTML5 page, and can improve the purchasing desire and the purchasing accuracy of the consumer because the three-dimensional model can transmit more comprehensive, more detailed and more vivid commodity information to the consumer from multiple angles. The three-dimensional model interactive editing method provided by the embodiment of the invention is also applied to interactive display of three-dimensional models of characters or objects in a web game or interactive display of three-dimensional models in other scenes, and the application scene of the three-dimensional model interactive editing method is not limited in the embodiment of the invention.
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
Example one
Fig. 1 is a flowchart of a three-dimensional model interactive editing method according to an embodiment of the present invention, and as shown in fig. 1, an execution subject of the embodiment of the present invention is a three-dimensional model interactive editing platform, the three-dimensional model interactive editing platform may be integrated in an electronic device, and the electronic device may be a computer, a notebook computer, a server, and other devices with independent computing and processing capabilities. The method for interactive editing of a three-dimensional model provided by the embodiment includes the following steps.
Step 101, obtaining a model rendering request, wherein the model rendering request comprises rendering parameters.
Specifically, in this embodiment, the manner of obtaining the model rendering request may be: the platform for interactive editing of the three-dimensional model can preset a model editing interface for a user, and the user sets rendering parameters through the model editing interface, for example, the setting of values in the selected rendering parameters and the like can be included. And then, the user clicks the determined icon to generate a model rendering request, and rendering parameters are included in the model rendering request. The model rendering request may be obtained in other manners, which are not limited in this embodiment.
The rendering of the model may include multiple stages, each stage having a corresponding rendering parameter, and the rendering parameters are not limited in this embodiment.
And step 102, rendering the three-dimensional model in the HTML5 page by adopting a WebGL technology according to the rendering parameters in the model rendering request.
In this embodiment, the three-dimensional model is pre-stored, and the three-dimensional model to be processed is acquired from the storage area. The three-dimensional model may be based on a three-dimensional model of a triangular patch.
Specifically, in this embodiment, the WebGL may provide hardware 3D accelerated rendering for the HTML5Canvas, and the three-dimensional model is rendered in the HTML5 page by using the WebGL technology, where the rendering process may include: the method comprises the steps of performing vertex coloring by adopting a vertex shader according to vertex coloring parameters, performing primitive assembly on vertices to generate a line-surface graph, performing rasterization on the line-surface graph, performing fragment coloring by adopting a fragment shader according to the fragment coloring parameters, and the like. Other rendering processes may also be included, which is not limited in this embodiment.
Step 103, obtaining a model interactive editing request, wherein the interactive editing request comprises: interaction type and interaction parameters.
Specifically, in this embodiment, after rendering the three-dimensional model, an interaction mode between the three-dimensional model and the user may be set. Firstly, a model interactive editing request is obtained, and the mode for obtaining the model interactive editing request can be as follows: the platform for interactive editing of the three-dimensional model can preset an interactive editing interface corresponding to each interaction type for a user, the user sets interaction parameters through the interactive editing interface corresponding to each interaction type, and the interaction types can include: hotspot interaction, three-dimensional interaction, and the like. For the hot spot interaction, the user can interact with the hot spot through a mouse or a touch screen through a two-dimensional label on the three-dimensional model, and for the three-dimensional interaction, the user can interact with the hot spot through the three-dimensional model and the mouse or the touch screen. The interaction parameters for each interaction type are different. In this embodiment, the interaction parameter is not limited.
In this embodiment, the manner of obtaining the model interactive editing request may also be other manners, which is not limited in this embodiment.
And 104, setting the interaction between the three-dimensional model and the user according to the interaction type and the interaction parameters corresponding to the interaction type.
Specifically, in this embodiment, for the hotspot interaction type, the setting of the interaction mode between the tag in the three-dimensional model and the user according to the interaction parameter of the hotspot interaction type may include, in the interaction process with the user, setting of a conversion policy of a three-dimensional sheet panel corresponding to the tag, setting of a ray pickup interaction policy of the tag and the interaction medium corresponding to the three-dimensional sheet panel, setting of a trigger policy of a tag event, and the like, in order to make the tag all face the user when the three-dimensional model changes in shape.
The interactive medium may be a mouse or a finger.
Specifically, in this embodiment, for the three-dimensional interaction type, setting an interaction mode between the three-dimensional model and the user according to the interaction parameter of the three-dimensional interaction type may include: setting a ray picking interaction strategy of the three-dimensional model and the interaction medium, setting a trigger strategy of a three-dimensional model event, and the like.
Step 105, obtaining a model issuing request, wherein the issuing request comprises: and issuing the identification of the platform.
Specifically, in this embodiment, the manner of obtaining the model issue request may be: the platform for interactive editing of the three-dimensional model can preset a model release interface for a user, the user sets release parameters through the model release interface, and the release parameters comprise: and issuing the identification of the platform.
It should be noted that the manner of obtaining the model issue request may be other manners, which is not limited in this embodiment.
And 106, according to the publishing request, publishing the three-dimensional model on a publishing platform corresponding to the identifier of the publishing platform through pre-stored configuration information which is subjected to interface docking.
In this embodiment, configuration information for interfacing between all the publishing platforms and the platform interactively edited by the three-dimensional model is stored in advance, and the configuration information includes: the interface type adopted by each platform and the configuration parameters for interface docking with the interface of each platform.
Specifically, in this embodiment, after the publishing request is obtained, according to the publishing platform identifier in the publishing request, the interface and the configuration information of the corresponding publishing platform are obtained from the configuration information, the interface docking between the publishing platform and the platform for interactively editing the three-dimensional model is completed, and the three-dimensional model is published on the publishing platform corresponding to the identifier of the publishing platform.
In the method for interactively editing a three-dimensional model provided by the embodiment, a model rendering request is obtained, and the model rendering request includes rendering parameters; rendering the three-dimensional model in the HTML5 page by adopting a WebGL technology according to the rendering parameters in the model rendering request; obtaining a model interactive editing request, wherein the interactive editing request comprises: interaction type and interaction parameter; setting the interaction between the three-dimensional model and the user according to the interaction type and the interaction parameters corresponding to the interaction type; obtaining a model issuing request, wherein the issuing request comprises: issuing an identifier of the platform; and according to the publishing request, publishing the three-dimensional model on a publishing platform corresponding to the identifier of the publishing platform through pre-stored configuration information for interface docking. Because the three-dimensional model rendering and interaction setting are directly carried out on the HTML5 page, and the HTML5 page is published on different publishing platforms according to the preset configuration information, various application platforms can be supported, the publishing steps on each application platform are simple, a user does not need to specially install a configuration file, the one-key publishing can be realized, and the resource consumption is reduced.
Example two
Fig. 2 is a flowchart of a three-dimensional model interactive editing method provided in the second embodiment of the present invention, and as shown in fig. 2, the three-dimensional model interactive editing method provided in this embodiment is further detailed in steps 101 to 104 on the basis of the three-dimensional model interactive editing method provided in the first embodiment of the present invention, and further includes obtaining a graph processing performance index of a publishing platform corresponding to an identifier of the publishing platform; if the graphic processing performance index meets the graphic processing acceleration condition, accelerating the graphic processing of the release platform according to a preset acceleration strategy, and encrypting the resource data of the HTML5 page; and if the resource data are operated, decrypting the resource data. The method for interactive editing of a three-dimensional model provided by the embodiment includes the following steps.
Step 201, a model rendering request is obtained, wherein the model rendering request includes rendering parameters.
Further, in this embodiment, fig. 3 is a flowchart of step 201 in the method for interactively editing a three-dimensional model according to the second embodiment of the present invention, as shown in fig. 3, in this embodiment, step 201 obtains a model rendering request, where the model rendering request includes rendering parameters, and specifically includes:
step 201a, detecting a rendering parameter setting operation of a user on a model editing interface.
Step 201b, generating a model rendering request according to the rendering parameter setting operation.
Further, in this embodiment, when the user renders the three-dimensional model, a model editing interface is opened, and the model editing interface includes: a name of each rendering stage and rendering parameters of each rendering stage. And according to the three-dimensional model rendering process, selecting rendering parameters corresponding to each rendering stage, and if the rendering parameter setting operation of a user on the model editing interface is detected, generating a model rendering request according to the rendering parameter setting operation. Rendering parameters are included in the rendering request.
Wherein the rendering stage comprises: a first rendering phase and a second rendering phase. The first rendering stage is a self-rendering stage of the three-dimensional model, and comprises the following steps: vertex shading phase, fragment shading phase, etc. The second rendering stage is a rendering stage of the three-dimensional model in the scene.
The rendering parameters corresponding to the vertex coloring stage are as follows: and vertex coloring parameters, wherein rendering parameters corresponding to the fragment coloring stage are as follows: fragment coloring parameters. The rendering parameters corresponding to the second rendering stage are as follows: and (4) scene configuration parameters.
And step 202, rendering the three-dimensional model in the HTML5 page by adopting a WebGL technology according to the rendering parameters in the model rendering request.
Further, fig. 4 is a flowchart of step 202 in the method for interactively editing the three-dimensional model according to the second embodiment of the present invention, and as shown in fig. 4, in this embodiment, the step 202 of rendering the three-dimensional model in the HTML5 page by using the WebGL technology according to the rendering parameter in the model rendering request includes the following steps.
Step 202a, vertex coordinates of the three-dimensional model are obtained.
Further, in the present embodiment, the three-dimensional model is a three-dimensional model based on a triangular patch, so the three-dimensional model includes a plurality of vertices. Coordinates of vertices in the three-dimensional model may be obtained from a cache.
In step 202b, a vertex shader is used to color the vertex according to the vertex coordinates and the vertex coloring parameters.
In this embodiment, the vertex coloring parameters may include: size of vertex, color parameter.
In this embodiment, a vertex shader is created first, a graphics card that supports an editable vertex shader is used to create the vertex shader, the created vertex shader is saved, and a corresponding interface is called when the vertex shader is used. And the vertex shader colors each vertex according to the vertex coordinates and the vertex coloring parameters of the three-dimensional model. The size, coordinates and color of each vertex of the three-dimensional model can be determined after being rendered by the vertex shader.
And step 202c, carrying out primitive assembling on the top points to generate a line-surface graph.
Further, fig. 5 is a schematic diagram of a line-plane graph after the step 202c is executed by the method for interactively editing a three-dimensional model according to the second embodiment of the present invention, as shown in fig. 5, in this embodiment, primitive assembling is to restore each vertex 511 after vertex coloring into a grid structure according to an original connection relationship. The mesh is composed of vertices 511 and indices, and the vertices 511 are connected together according to the indices to form a line-and-plane graph 51.
Step 202d, performing rasterization processing on the line graph.
Further, fig. 6 is a schematic diagram of the line-plane graph after the step 202d is executed by the method for interactively editing the three-dimensional model according to the second embodiment of the present invention, as shown in fig. 6, in this embodiment, after the line-plane graph 51 is rasterized, a line-plane graph is formed, and then the pixel points 61 are formed on the line-plane graph.
Step 202e, fragment shader is adopted to perform fragment shading on the rasterized line fragment graph according to the fragment shading parameters, so as to complete the first rendering of the three-dimensional model.
Wherein the fragment coloring parameters comprise: material parameters, light parameters, etc.
Further, in this embodiment, the fragment shader parameters are input into the fragment shader, the fragment shader performs shading on each pixel point in the rasterized line fragment graph to complete fragment shading, and after the fragment shading of the three-dimensional model is completed, the first rendering operation on the three-dimensional model is completed.
Step 202f, the three-dimensional model after fragment coloring is set into the scene.
Further, a setting scene of the three-dimensional model is created, and the three-dimensional model after fragment coloring is set in the scene.
And step 202g, performing second rendering on the three-dimensional model in the scene according to the scene configuration parameters.
And further, opening a model editing interface of the second rendering stage and selecting scene configuration parameters. Wherein the scene configuration parameters at least include: light parameters and camera parameters. And performing second rendering operation on the three-dimensional model in the scene according to the scene configuration parameters.
Step 203, obtaining a model interactive editing request, where the interactive editing request includes: interaction type and interaction parameters.
Further, fig. 7 is a flowchart of step 203 in the method for interactive editing of a three-dimensional model according to the second embodiment of the present invention, as shown in fig. 7, in this embodiment, step 203 obtains a model interactive editing request, which specifically includes the following steps.
Step 203a, detecting an interaction parameter setting operation of a user on an interaction editing interface corresponding to a certain interaction type.
Wherein the interaction types at least include: a hotspot interaction type and a three-dimensional interaction type. The hotspot interaction type is a type of interaction with a user by adopting a two-dimensional label arranged on the three-dimensional model. The three-dimensional interaction type is a type of interaction between the three-dimensional model and a user.
And step 203b, generating a corresponding interactive editing request according to the interactive parameter setting operation.
Further, in this embodiment, when the user edits the interaction between the three-dimensional model and the user, the interactive editing interface is opened. Each type of interactive editing interface is included in the interactive editing interface. And each type of interactive editing interface comprises corresponding interactive parameters. If the interaction parameter setting operation of the user on the interaction editing interface corresponding to a certain interaction type is detected, generating a corresponding interaction editing request according to the interaction parameter setting operation, wherein the interaction editing request comprises the interaction parameter corresponding to the interaction type.
Fig. 8 is a schematic view of an interactive editing interface of hotspot interaction in the three-dimensional model interactive editing method provided in the second embodiment of the present invention, and as shown in fig. 8, the interactive editing interface of hotspot interaction at least includes: tag style picture, tag location, interaction parameters of the tag event. There are a plurality of selectable tab style pictures in the tab style picture. And self-defining of the tag style picture can be performed according to the style self-defining icon. The position of the added label can be input at the label position, and a plurality of selectable label events are included in the label events, for example, the label events can be: text, pictures, links, audio, 3D presentations, etc. And self-defining of the tag event can be carried out according to the event self-defining icon.
As shown in fig. 8, in the interactive editing interface of hotspot interaction, the thickness of the label line may be set.
And 204, setting the interaction between the three-dimensional model and the user according to the interaction type and the interaction parameters corresponding to the interaction type.
Further, in this embodiment, fig. 9 is a first flowchart of step 204 in the method for interactive editing of a three-dimensional model according to the second embodiment of the present invention, as shown in fig. 9, in this embodiment, if the interaction type is a hotspot interaction type, step 204 includes the following steps.
Step 2041a, rendering the label style picture and pasting the label style picture to the three-dimensional sheet panel.
Wherein the three-dimensional sheet panel is the same sheet panel as the label style picture but can be arranged in the three-dimensional model.
Further, in this embodiment, a three-dimensional sheet panel is generated according to the label style picture, the label style picture is rendered, and the label style picture is pasted on the three-dimensional sheet panel.
The rendering mode of the tag style picture is a rendering mode of a two-dimensional picture, and a specific rendering method is not limited in this embodiment.
And 2041b, setting the coordinate position of each vertex of the three-dimensional sheet panel according to the label position.
Further, in this embodiment, when setting the tag position, not only the planar position of the tag but also the depth position in the three-dimensional model is included. And setting the coordinate position of each vertex of the three-dimensional sheet panel according to the position of the label.
And the coordinate position of each vertex of the three-dimensional sheet panel is the coordinate position of each vertex of the three-dimensional sheet panel in the three-dimensional model.
Step 2041c, a conversion strategy of the three-dimensional sheet panel when the three-dimensional model form changes is set, so that the label style picture corresponding to the three-dimensional sheet panel is just opposite to the user.
Further, in this embodiment, when the user interacts with the tag in the three-dimensional model, the tag style picture corresponding to the three-dimensional sheet panel is required to always face the user. However, when the three-dimensional model interacts with the user to perform interaction with a change in form such as movement and rotation, it is necessary to change the deformation of each vertex of the three-dimensional sheet panel according to a conversion strategy, so that the deformation of each vertex is adapted to the movement, the angular rotation, and the like. The conversion strategy can be to set a conversion matrix corresponding to each deformation, and through the conversion matrix, when the three-dimensional model and the user interact to perform interaction such as movement and rotation, the label style picture corresponding to the three-dimensional sheet panel is just opposite to the user.
In this embodiment, the conversion policy may be in other manners, which is not limited in this embodiment.
And 2041d, setting a ray picking interaction strategy of the label and the interaction medium corresponding to the three-dimensional sheet panel.
The interactive medium may be a mouse, a finger, etc.
Further, in this embodiment, the ray is an endless line emitted from a point in the three-dimensional world in one direction, and the emission is stopped when the ray collides with another object in the emission trajectory.
In this embodiment, the ray picking interaction strategy may be set to ray picking based on a three-dimensional space, and may also be set to ray picking based on an image space. Preferably, in the present embodiment, ray picking based on three-dimensional space is employed.
Step 2041e, a trigger policy for the tag event is set.
Further, in this embodiment, the trigger policy of the tag event may be set according to the state of the interactive medium. If the interactive medium is a mouse, the click state of the mouse is set as a trigger policy of the tag event, or the mouse moves through the tag sample picture in a floating state within a preset time period as the trigger policy of the tag event, which is not limited in this embodiment.
Further, in this embodiment, as shown in fig. 10, fig. 10 is a second flowchart of step 204 in the method for interactively editing a three-dimensional model according to the second embodiment of the present invention, and in this embodiment, if the interaction type is a three-dimensional interaction type, the interaction parameters at least include: the three-dimensional model event, step 204, includes the following steps.
Step 2042a, a ray picking interaction strategy of the three-dimensional model and the interaction medium is set.
Further, in the present embodiment, the ray picking interaction strategy may be set to ray picking based on a three-dimensional space, and may also be set to ray picking based on an image space. Preferably, in the present embodiment, ray picking based on three-dimensional space is employed.
In this embodiment, a basic principle of a ray picking algorithm based on a three-dimensional space is described by taking an interactive medium as a mouse as an example. The basic principle of the ray picking algorithm based on the three-dimensional space is as follows: the method comprises the steps of obtaining screen coordinates, converting camera focal point coordinates into the screen coordinates, taking the camera focal point Z-axis values as Z-axis values of a mouse, converting mouse coordinates into world coordinates, transmitting a ray M to the world coordinate position where the mouse is located through the camera position, and obtaining a line segment AB through the ray M and intersection points A and B of a near section and a far section of a projection space. Judging whether the ray M is vertically realized, if so, enabling the ray M not to intersect with the projection space, acquiring a three-dimensional model in a scene, acquiring a conversion matrix of the three-dimensional model, converting the points AB into local coordinates by using the conversion matrix, calculating a bounding box of the three-dimensional model, and interpreting the relative positions of the rest of the points AB. If the intersection is detected, the object is selected.
And 2042b, setting a trigger strategy of the three-dimensional model event.
Further, in this embodiment, the trigger policy of the tag event may be set according to the state of the interactive medium. If the interactive medium is a mouse, the mouse click state is set as a trigger policy of the tag event, or the mouse moves through the three-dimensional model in a floating state within a preset time period as a trigger policy of the tag event, which is not limited in this embodiment.
Further, in this embodiment, the three-dimensional model event includes: and customizing the animation event. The method for interactively editing a three-dimensional model provided by this embodiment further includes the following scheme when editing a custom animation event.
First, an animation editing interface is displayed to a user.
Specifically, in this embodiment, after the user selects the custom animation event in the three-dimensional model event, an animation editing interface is displayed to the user.
And secondly, detecting the setting operation of the animation parameters of the animation editing interface by the user.
And for each custom animation event, the identification information of the custom animation object is included. The user may select the identification of the object of the custom animation in the animation editing interface. And setting animation parameters through a time axis selection editing interface and an attribute editing interface in the animation editing interface.
Further, animation editing data is generated according to the operation of the animation parameters.
In this embodiment, a time event point corresponding to each frame of the custom animation may be added to the time axis in the time axis selection editing interface, parameters such as the size, the position, the rotation direction, and the like of the three-dimensional model may be set on each frame of the time event point, animation editing data may be generated according to the parameters on each frame of the time event point, and the animation editing data may be a parameter configuration file on each frame of the time event point.
And finally, if the user-defined animation event is triggered to be played, playing the user-defined animation event by adopting a slow motion algorithm according to the data edited by the animation.
Further, in this embodiment, if the interactive medium triggers the playing of the custom animation event, the custom animation event is played by using a slow motion algorithm according to the parameter configuration file at each frame time event point.
Among them, the slow motion is a concept related to animation. Animation is the movement of an element by changing its properties with the frequency of movement. The slow motion is the change of the animation realized by modifying the numerical value increased each time to increase the elements in an irregular way. The elements in this embodiment are three-dimensional models.
In this embodiment, the basic principle of the slow motion algorithm is as follows: the change of the animation execution time can be expressed as 0 → d, and the constant d is extracted to become d (0 → 1), and the change part is (0 → 1) and is marked as the change of the x axis. The total variation and the starting value of the animation are known, and the variation can be expressed as b → b + c, and the variation is extracted as b + c (0 → 1), and the variation part is also (0 → 1) and is marked as y-axis variation. t is used to indicate the current point in time of the event, which is changed to indicate the percentage of animation completion, i.e., t/d. By the above transformation, it is necessary to construct the x-axis interval as [0,1 ]]The y-axis interval is also [0,1 ]]I.e. a linear or non-linear relationship passing through the points (0,0) and (1,1), the linear relationship being y ═ x, and the non-linear relationship being y ═ x2,y=x3,y=x4,y=x5,y=(x-1)5+1,y=1-(x-1)4,y=(x-1)3+1,y=2*x-x2
Figure BDA0001872771550000141
Step 205, obtaining a model issuing request, where the issuing request includes: and issuing the identification of the platform.
In this embodiment, the implementation manner of step 205 is the same as that of step 105 in the first embodiment of the present invention, and is not described in detail here.
Step 206, acquiring a graph processing performance index of the release platform corresponding to the identifier of the release platform; and if the graphic processing performance index meets the graphic processing acceleration condition, accelerating the graphic processing of the release platform according to a preset acceleration strategy.
Further, in this embodiment, a performance index of the graphics processing of the publishing platform, that is, a performance index of the GPU, corresponding to the identifier of the publishing platform is obtained.
The performance index of the GPU may include an index of graphics rendering capability of the GPU, and may further include: GPU polygon generation capability index.
Further, in this embodiment, the graph processing performance index is compared with a preset acceleration threshold, and if the graph processing performance index is smaller than the preset performance index threshold, the graph processing acceleration condition is met, and the graph processing of the publishing platform is accelerated according to a preset acceleration policy.
The preset performance index threshold is a performance index value that does not need to be accelerated, and the value of the preset performance index threshold is not limited in this embodiment.
The preset acceleration strategy can be used for accelerating GPU rendering or reducing the JavaScript calling amount by realizing a high-level object.
And step 207, according to the publishing request, publishing the three-dimensional model on a publishing platform corresponding to the identifier of the publishing platform through pre-stored configuration information for interface docking.
In this embodiment, the implementation manner of step 207 is the same as the implementation manner of step 106 in the first embodiment of the present invention, and details are not repeated here.
In the method for interactively editing a three-dimensional model provided in this embodiment, a model rendering request is obtained, where the model rendering request includes rendering parameters, and a WebGL technology is used to render the three-dimensional model in an HTML5 page according to the rendering parameters in the model rendering request, so as to obtain a model interactive editing request, where the interactive editing request includes: the interaction type and the interaction parameter are set, the interaction between the three-dimensional model and the user is set according to the interaction type and the interaction parameter corresponding to the interaction type, and a model issuing request is obtained, wherein the issuing request comprises: the method comprises the steps of issuing an identifier of a platform, and acquiring a graph processing performance index of the issuing platform corresponding to the identifier of the issuing platform; if the graphic processing performance index meets the graphic processing acceleration condition, the graphic processing of the publishing platform is accelerated according to a preset acceleration strategy, and the three-dimensional model is published on the publishing platform corresponding to the identifier of the publishing platform through the pre-stored configuration information for interface docking according to the publishing request, so that the method not only can support various application platforms, has simple publishing steps on each application platform, does not need a user to specially install configuration files, can realize one-key publishing, reduces resource consumption, but also can accelerate the graphic processing according to the graphic processing performance of each application platform, and improves the publishing speed of the three-dimensional model of the application platform.
According to the method for interactively editing the three-dimensional model, when the interaction between the three-dimensional model and the user is set according to the interaction type and the interaction parameters corresponding to the interaction type, hot spot interaction and three-dimensional interaction can be simultaneously set, a user-defined animation event can be set in the three-dimensional interaction setting, the user can better interact with the three-dimensional model, and the three-dimensional model can be displayed more vividly and more accurately.
Further, in this embodiment, before issuing the three-dimensional model on the issuing platform corresponding to the identifier of the issuing platform through the pre-stored configuration information for performing interface docking according to the issuing request, the method further includes:
the resource data of the HTML5 page is encrypted. And if the resource data are operated, decrypting the resource data.
The resource data of the HTML5 page includes: rendering the three-dimensional model, and interactively setting all data of the release setting.
Further, in this embodiment, in order to protect the security of the resource data of the HTML5 page, the resource data of the HTML5 page is encrypted, and if it is detected that the resource data of the HTML5 page needs to be run, the corresponding decryption algorithm is automatically used for decryption.
In this embodiment, the encryption and decryption algorithms are not limited in this embodiment.
The method for interactively editing the three-dimensional model provided by this embodiment encrypts the resource data of the HTML5 page. If the resource data is operated, the resource data is decrypted, so that the safety of the resource data of the HTML5 page can be effectively protected.
EXAMPLE III
Fig. 11 is a schematic structural diagram of a three-dimensional model interactive editing platform according to a third embodiment of the present invention, and as shown in fig. 11, the three-dimensional model interactive editing platform 11 according to the third embodiment includes: the system comprises a rendering request acquisition module 1101, a rendering module 1102, an interactive editing request acquisition module 1103, an interactive setting module 1104, a publishing request acquisition module 1105 and a publishing module 1106.
The rendering request obtaining module 1101 is configured to obtain a model rendering request, where the model rendering request includes a rendering parameter. And the rendering module 1102 is configured to render the three-dimensional model in the HTML5 page by using the WebGL technology according to the rendering parameters in the model rendering request. An interactive editing request obtaining module 1103, configured to obtain a model interactive editing request, where the interactive editing request includes: interaction type and interaction parameters. And the interaction setting module 1104 is configured to set interaction between the three-dimensional model and the user according to the interaction type and the interaction parameter corresponding to the interaction type. A publishing request obtaining module 1105, configured to obtain a model publishing request, where the publishing request includes: and issuing the identification of the platform. The publishing module 1106 is configured to publish the three-dimensional model on a publishing platform corresponding to the identifier of the publishing platform according to the publishing request through the pre-stored configuration information for interface docking.
In the platform for interactive editing of a three-dimensional model provided in this embodiment, the rendering request obtaining module obtains a model rendering request, where the model rendering request includes rendering parameters. And the rendering module renders the three-dimensional model in the HTML5 page by adopting a WebGL technology according to the rendering parameters in the model rendering request. The interactive editing request acquisition module acquires a model interactive editing request, wherein the interactive editing request comprises: interaction type and interaction parameters. And the interaction setting module sets the interaction between the three-dimensional model and the user according to the interaction type and the interaction parameters corresponding to the interaction type. The issuing request acquisition module acquires a model issuing request, wherein the issuing request comprises: and issuing the identification of the platform. And the publishing module publishes the three-dimensional model on a publishing platform corresponding to the identifier of the publishing platform through prestored configuration information for interface docking according to the publishing request. Because the three-dimensional model rendering and interaction setting are directly carried out on the HTML5 page, and the HTML5 page is published on different publishing platforms according to the preset configuration information, various application platforms can be supported, the publishing steps on each application platform are simple, a user does not need to specially install a configuration file, the one-key publishing can be realized, and the resource consumption is reduced.
Example four
Fig. 12 is a schematic structural diagram of a three-dimensional model interactive editing platform according to a fourth embodiment of the present invention, and as shown in fig. 12, the three-dimensional model interactive editing platform 12 according to the fourth embodiment of the present invention further includes, on the basis of the three-dimensional model interactive editing platform according to the third embodiment of the present invention: a custom animation setting module 1201, a graphics processing performance index obtaining module 1202, an acceleration module 1203, and an encryption and decryption module 1204.
Further, the rendering request obtaining module 1101 is specifically configured to: detecting the rendering parameter setting operation of a user on a model editing interface; and generating a model rendering request according to the rendering parameter setting operation.
Further, the rendering module 1102 is specifically configured to: acquiring vertex coordinates of the three-dimensional model; coloring the vertex by adopting a vertex coloring device according to the vertex coordinate and the vertex coloring parameter; assembling the primitives on the top points to generate a line-surface graph; performing rasterization processing on the line-surface graph; and performing fragment coloring on the rasterized line fragment graph by using a fragment coloring device according to the fragment coloring parameters so as to finish the first rendering of the three-dimensional model.
Further, the rendering module 1102 is further configured to set the fragment-colored three-dimensional model into a scene; and performing second rendering on the three-dimensional model in the scene according to the scene configuration parameters.
Further, the interaction types include at least: a hotspot interaction type and a three-dimensional interaction type;
the interactive editing request obtaining module 1103 is specifically configured to: detecting interaction parameter setting operation of a user on an interaction editing interface corresponding to a certain interaction type; and generating a corresponding interactive editing request according to the interactive parameter setting operation.
Further, if the interaction type is a hotspot interaction type, the interaction parameters at least include: tag style picture, tag location, tag event.
The interaction setting module 1104 is specifically configured to: rendering the label style picture and pasting the label style picture to a three-dimensional sheet panel; setting the coordinate position of each vertex of the three-dimensional sheet panel according to the position of the label; setting a conversion strategy of the three-dimensional sheet panel when the three-dimensional model form changes so that a label style picture corresponding to the three-dimensional sheet panel is opposite to a user; setting a ray picking interaction strategy of a label and an interaction medium corresponding to the three-dimensional sheet panel; and setting a trigger strategy of the tag event.
Further, if the interaction type is a three-dimensional interaction type, the interaction parameters at least include: a three-dimensional model event.
The interaction setting module 1104 is specifically configured to: setting a ray picking interaction strategy of the three-dimensional model and an interaction medium; and setting a trigger strategy of the three-dimensional model event.
Further three-dimensional model events include: and customizing the animation event. The custom animation setting module 1201 is configured to display an animation editing interface to a user, detect a setting operation of the user on animation parameters of the animation editing interface, generate animation editing data according to the setting operation of the animation parameters, and play a custom animation event by using a slow motion algorithm according to the animation editing data if the custom animation event is triggered to be played.
Further, the graphics processing performance index obtaining module 1202 is configured to obtain a graphics processing performance index of the publishing platform corresponding to the identifier of the publishing platform. The acceleration module 1203 is configured to accelerate the graphics processing of the publishing platform according to a preset acceleration policy if the graphics processing performance indicator satisfies the graphics processing acceleration condition.
Further, the encryption and decryption module 1204 is configured to encrypt the resource data of the HTML5 page, and decrypt the resource data if the resource data is executed.
The platform for interactive editing of a three-dimensional model provided in this embodiment may execute the technical solution of the embodiment of the method shown in fig. 2.
In the platform for interactive editing of a three-dimensional model provided in this embodiment, the rendering request obtaining module obtains a model rendering request, where the model rendering request includes rendering parameters, the rendering module renders the three-dimensional model in the HTML5 page by using the WebGL technology according to the rendering parameters in the model rendering request, and the interactive editing request obtaining module obtains a model interactive editing request, where the interactive editing request includes: the interaction setting module sets interaction between the three-dimensional model and a user according to the interaction type and the interaction parameters corresponding to the interaction type, and the issuing request acquiring module acquires a model issuing request which comprises: the graphics processing performance index acquisition module acquires a graphics processing performance index of the publishing platform corresponding to the identifier of the publishing platform; if the graphic processing performance index meets the graphic processing acceleration condition, the acceleration module accelerates the graphic processing of the publishing platform according to a preset acceleration strategy, and the publishing module publishes the three-dimensional model on the publishing platform corresponding to the identifier of the publishing platform through the pre-stored configuration information for interface docking according to the publishing request.
In the platform for interactive editing of three-dimensional models provided by this embodiment, the encryption and decryption module encrypts the resource data of the HTML5 page. If the resource data is operated, the resource data is decrypted, so that the safety of the resource data of the HTML5 page can be effectively protected.
EXAMPLE five
Fig. 13 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention, and as shown in fig. 13, a terminal device according to this embodiment includes: memory 1301, processor 1302, and computer programs.
The computer program is stored in the memory 1301 and configured to be executed by the processor 1302 to implement the method for interactive editing of a three-dimensional model according to the first embodiment of the present invention or the method for interactive editing of a three-dimensional model according to the second embodiment of the present invention.
The related description may be understood by referring to the related description corresponding to the steps in fig. 1 to fig. 10, and will not be described herein too much.
The electronic device provided by the embodiment comprises: memory, processor and computer programs.
The computer program is stored in the memory and configured to be executed by the processor to implement the method for interactively editing the three-dimensional model according to the first embodiment of the present invention or the method for interactively editing the three-dimensional model according to the second embodiment of the present invention, because the rendering and interaction setting of the three-dimensional model are directly performed on the HTML5 page, and the distribution of the HTML5 page is performed on different distribution platforms according to the preset configuration information, various application platforms can be supported, the distribution steps on the application platforms are simple, one-touch distribution can be implemented, and the resource consumption is reduced.
EXAMPLE six
The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the method for interactively editing the three-dimensional model provided in the first embodiment of the present invention or the method for interactively editing the three-dimensional model provided in the second embodiment of the present invention.
In the computer-readable storage medium provided by this embodiment, a model rendering request is obtained, where the model rendering request includes rendering parameters; rendering the three-dimensional model in the HTML5 page by adopting a WebGL technology according to the rendering parameters in the model rendering request; obtaining a model interactive editing request, wherein the interactive editing request comprises: interaction type and interaction parameter; setting the interaction between the three-dimensional model and the user according to the interaction type and the interaction parameters corresponding to the interaction type; obtaining a model issuing request, wherein the issuing request comprises: issuing an identifier of the platform; and according to the publishing request, publishing the three-dimensional model on a publishing platform corresponding to the identifier of the publishing platform through pre-stored configuration information for interface docking. Because the three-dimensional model rendering and interaction setting are directly carried out on the HTML5 page, and the HTML5 page is published on different publishing platforms according to the preset configuration information, various application platforms can be supported, the publishing steps on each application platform are simple, a user does not need to specially install a configuration file, the one-key publishing can be realized, and the resource consumption is reduced.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of modules is merely a division of logical functions, and an actual implementation may have another division, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
Modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be arranged according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware form, and can also be realized in a form of hardware and a software functional module.
Program code for implementing the methods of the present invention may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Further, while operations are depicted in a particular order, this should be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (13)

1. A method for interactive editing of a three-dimensional model, comprising:
obtaining a model rendering request, wherein the model rendering request comprises rendering parameters;
rendering the three-dimensional model in the HTML5 page by adopting a WebGL technology according to the rendering parameters in the model rendering request;
obtaining a model interactive editing request, wherein the interactive editing request comprises: interaction type and interaction parameter;
setting the interaction between the three-dimensional model and a user according to the interaction type and the interaction parameters corresponding to the interaction type;
obtaining a model issuing request, wherein the issuing request comprises: issuing an identifier of the platform;
and according to the release request, releasing the three-dimensional model on a release platform corresponding to the identifier of the release platform through pre-stored configuration information for interface docking.
2. The method according to claim 1, wherein the obtaining of the model rendering request, the model rendering request including rendering parameters, specifically includes:
detecting the rendering parameter setting operation of a user on a model editing interface;
and generating a model rendering request according to the rendering parameter setting operation.
3. The method of claim 2, wherein the rendering the three-dimensional model in the HTML5 page by using the WebGL technique according to the rendering parameters in the model rendering request specifically includes:
acquiring vertex coordinates of the three-dimensional model;
adopting a vertex shader to color the vertex according to the vertex coordinates and the vertex coloring parameters;
assembling the primitives on the vertexes to generate a line-surface graph;
performing rasterization processing on the line-surface graph;
and performing fragment shading on the rasterized line fragment graph by using a fragment shader according to the fragment shading parameters so as to finish the first rendering of the three-dimensional model.
4. The method of claim 3, wherein after fragment shading the rasterized line fragment pattern with a fragment shader according to fragment shading parameters to complete the first rendering of the three-dimensional model, further comprising:
setting the three-dimensional model after fragment coloring into a scene;
and performing second rendering on the three-dimensional model in the scene according to the scene configuration parameters.
5. The method of claim 1, wherein the interaction types comprise at least: a hotspot interaction type and a three-dimensional interaction type;
the acquiring of the model interactive editing request specifically includes:
detecting interaction parameter setting operation of a user on an interaction editing interface corresponding to a certain interaction type;
and generating a corresponding interactive editing request according to the interactive parameter setting operation.
6. The method of claim 5, wherein if the interaction type is a hotspot interaction type, the interaction parameters at least comprise: a tag style picture, a tag location, a tag event;
the setting of the interaction between the three-dimensional model and the user according to the interaction type and the interaction parameters corresponding to the interaction type specifically comprises:
rendering the label style picture and pasting the label style picture to a three-dimensional sheet panel;
setting the coordinate positions of all vertexes of the three-dimensional sheet panel according to the label positions;
setting a conversion strategy of the three-dimensional sheet panel when the three-dimensional model is changed in shape, so that a label style picture corresponding to the three-dimensional sheet panel is opposite to the user;
setting a ray picking interaction strategy of a label and an interaction medium corresponding to the three-dimensional sheet panel;
and setting a trigger strategy of the label event.
7. The method according to claim 5, wherein if the interaction type is a three-dimensional interaction type, the interaction parameters at least comprise: a three-dimensional model event;
the setting of the interaction between the three-dimensional model and the user according to the interaction type and the interaction parameters corresponding to the interaction type specifically comprises:
setting a ray picking interaction strategy of the three-dimensional model and an interaction medium;
and setting a trigger strategy of the three-dimensional model event.
8. The method of claim 6 or 7, wherein the three-dimensional model event comprises: customizing the animation event;
the method further comprises the following steps:
displaying an animation editing interface to a user;
detecting the setting operation of a user on animation parameters of the animation editing interface;
generating animation editing data according to the setting operation of the animation parameters;
and if the user-defined animation event is triggered to be played, playing the user-defined animation event by adopting a slow motion algorithm according to the data edited by the animation.
9. The method according to claim 1, wherein before publishing the three-dimensional model on a publishing platform corresponding to the identifier of the publishing platform according to the publishing request by using pre-stored configuration information for interface docking, the method further comprises:
acquiring a graph processing performance index of the release platform corresponding to the identifier of the release platform;
and if the graphic processing performance index meets the graphic processing acceleration condition, accelerating the graphic processing of the release platform according to a preset acceleration strategy.
10. The method according to claim 1, wherein before publishing the three-dimensional model on a publishing platform corresponding to the identifier of the publishing platform according to the publishing request by using pre-stored configuration information for interface docking, the method further comprises:
encrypting the resource data of the HTML5 page;
and if the resource data is operated, decrypting the resource data.
11. A platform for interactive editing of three-dimensional models, comprising:
a rendering request obtaining module, configured to obtain a model rendering request, where the model rendering request includes a rendering parameter;
the rendering module is used for rendering the three-dimensional model in the HTML5 page by adopting a WebGL technology according to the rendering parameters in the model rendering request;
an interactive editing request obtaining module, configured to obtain a model interactive editing request, where the interactive editing request includes: interaction type and interaction parameter;
the interaction setting module is used for setting the interaction between the three-dimensional model and a user according to the interaction type and the interaction parameters corresponding to the interaction type;
a release request obtaining module, configured to obtain a model release request, where the release request includes: issuing an identifier of the platform;
and the publishing module is used for publishing the three-dimensional model on a publishing platform corresponding to the identifier of the publishing platform through pre-stored configuration information for interface docking according to the publishing request.
12. An electronic device, comprising: a memory, a processor, and a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1-10.
13. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program is stored which is executed by a processor to implement the method according to any of claims 1-10.
CN201811384978.7A 2018-11-20 2018-11-20 Method, platform, equipment and readable storage medium for interactive editing of three-dimensional model Pending CN111210525A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811384978.7A CN111210525A (en) 2018-11-20 2018-11-20 Method, platform, equipment and readable storage medium for interactive editing of three-dimensional model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811384978.7A CN111210525A (en) 2018-11-20 2018-11-20 Method, platform, equipment and readable storage medium for interactive editing of three-dimensional model

Publications (1)

Publication Number Publication Date
CN111210525A true CN111210525A (en) 2020-05-29

Family

ID=70789176

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811384978.7A Pending CN111210525A (en) 2018-11-20 2018-11-20 Method, platform, equipment and readable storage medium for interactive editing of three-dimensional model

Country Status (1)

Country Link
CN (1) CN111210525A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111798553A (en) * 2020-07-13 2020-10-20 重庆大学 WebGL-based three-dimensional model rendering method, system and related device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201540593U (en) * 2009-09-21 2010-08-04 潘建 Mutual information generating system
CN103106680A (en) * 2013-02-16 2013-05-15 赞奇科技发展有限公司 Implementation method for three-dimensional figure render based on cloud computing framework and cloud service system
CN104933753A (en) * 2015-07-09 2015-09-23 上海苗实信息科技有限公司 Three-dimensional virtual roaming scene construction platform based on Internet
US20160078506A1 (en) * 2014-09-12 2016-03-17 Onu, Llc Configurable online 3d catalog
CN105590342A (en) * 2014-11-14 2016-05-18 上海上大海润信息系统有限公司 System for constructing three-dimensional exhibit display scene

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201540593U (en) * 2009-09-21 2010-08-04 潘建 Mutual information generating system
CN103106680A (en) * 2013-02-16 2013-05-15 赞奇科技发展有限公司 Implementation method for three-dimensional figure render based on cloud computing framework and cloud service system
US20160078506A1 (en) * 2014-09-12 2016-03-17 Onu, Llc Configurable online 3d catalog
CN105590342A (en) * 2014-11-14 2016-05-18 上海上大海润信息系统有限公司 System for constructing three-dimensional exhibit display scene
CN104933753A (en) * 2015-07-09 2015-09-23 上海苗实信息科技有限公司 Three-dimensional virtual roaming scene construction platform based on Internet

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111798553A (en) * 2020-07-13 2020-10-20 重庆大学 WebGL-based three-dimensional model rendering method, system and related device

Similar Documents

Publication Publication Date Title
US6717599B1 (en) Method, system, and computer program product for implementing derivative operators with graphics hardware
WO2018196738A1 (en) Information presentation method, terminal, and storage medium
Parisi Programming 3D Applications with HTML5 and WebGL: 3D Animation and Visualization for Web Pages
US8566736B1 (en) Visualization of value resolution for multidimensional parameterized data
Anyuru Professional WebGL programming: developing 3D graphics for the Web
KR101911906B1 (en) Apparatus for 3D object creation and thereof Method
CN109584377B (en) Method and device for presenting augmented reality content
US20170213394A1 (en) Environmentally mapped virtualization mechanism
KR101523328B1 (en) Method of providing pose-library for three-dimensional animation character, apparatus performing the same and storage media storing the same
KR20220013410A (en) Initial viewing angle control and presentation method and system based on 3D point cloud
EP1922700B1 (en) 2d/3d combined rendering
KR20010104652A (en) Method and apparatus for interfacing with intelligent three-dimensional components
CN111210525A (en) Method, platform, equipment and readable storage medium for interactive editing of three-dimensional model
US10650569B2 (en) Browser-based texture map generation and application
CN110990106A (en) Data display method and device, computer equipment and storage medium
KR20190023486A (en) Method And Apparatus for Providing 3D Fitting
Nagashree et al. Markerless Augmented Reality Application for Interior Designing
KR20190074562A (en) 3D printing system using 3D modeling authoring tool based on VR technology
CN110930499B (en) 3D data processing method and device
Bocevska et al. Implementation of interactive augmented reality in 3D assembly design presentation
Mendes et al. IMAGO visualization System: an interactive web-based 3D visualization system for cultural heritage applications
KR20210046967A (en) Method, apparatus and computer readable recording medium of rroviding authoring platform for authoring augmented reality contents
Sharma et al. Design and Development of Mobile Augmented Reality
Berinstein et al. Game development tool essentials
CN111737205B (en) Rendering method of 3D model in Power BI component

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