Disclosure of Invention
The invention aims to provide a cloud exhibition three-dimensional modeling and rendering method based on artificial intelligence so as to solve the problems in the background technology.
In order to achieve the above purpose, the invention provides an artificial intelligence-based cloud exhibition three-dimensional modeling and rendering method, which comprises the following steps:
s1, building a spatial structure of an exhibition through a three-dimensional modeling technology, and setting a plurality of fixed-point light sources in the building process;
s2, modeling a display area in the modeled exhibition, and after the modeling is completed, matching the fixed-point light source with the display area to determine the light projection intensity;
s3, modeling the exhibited product, carrying out matching display on the exhibited product and the corresponding display area after the modeling is completed, and carrying out light intensity connection with the fixed point light source after the matching is completed;
s4, establishing a participant model, and setting a projection light source for a visual view angle of the participant.
As a further improvement of the technical scheme, the fixed point light sources and the projection light sources supplement light to the modeled exhibit, and the plurality of fixed point light sources control the light intensity inside the exhibit in the process of supplementing light to the exhibit.
As a further improvement of the technical scheme, three states exist in the projection light source for supplementing light to the exhibits:
state one: the projection light source is turned off, and light supplementing operation is carried out on the exhibited articles through the fixed-point light source;
state two: the projection light source is turned on, and the display is supplemented according to the visual angle of the participants;
state three: the projection light source is turned on, light is supplemented to the exhibited item according to the position selected by the participant, and the viewing angle of the visual angle of the participant is in an unfixed state in the light supplementing process of the projection light source.
As a further improvement of the technical scheme, the fixed-point light sources are visible rays of masses, the projection light sources and the participants perform one-to-one display, and the projection light sources among the participants do not perform the display.
As a further improvement of the technical scheme, in S2, when modeling the display area, the fixed point light sources between two adjacent display areas do not carry out complementary light, and the light intensity of each position inside the display area is the same.
As a further improvement of the technical scheme, when participants watch a plurality of exhibits in the exhibition, the LOD model generation algorithm is adopted to calculate the distance change of the viewing angle of the observation of the exhibits.
As a further improvement of the technical scheme, a geometric element deleting algorithm is adopted when the LOD model generating algorithm displays products with different distances, the model is gridded, the original modeling model is simplified through the distances and the viewing angles of the participants, and the vertexes are deleted.
As a further improvement of the technical scheme, the geometrical element deletion algorithm comprises the following steps:
a1, calculating local geometric and topological characteristics of each given vertex in the triangular mesh, and classifying the vertices;
a2, deleting the vertex when the distance from the point to the average plane is smaller than a given error value;
a3, carrying out local triangularization on the cavity left after the vertex is deleted;
a4, repeating the operations of A1, A2 and A3 until no vertex which can be deleted exists in the triangle mesh.
As a further improvement of the technical scheme, after the geometric element deleting algorithm deletes the vertexes, the grid simplifying algorithm is adopted to calculate the original model, so that the remote exhibit image is displayed, and the algorithm steps are as follows:
b1, calculating an error matrix Q of each vertex in the original model;
b2, selecting effective folding vertex pairs;
b3, for each vertex pair (v 1 ,v 2 ) Calculate the optimal for replacing v 1 ,v 2 New vertex v';
b4, placing all vertexes in the pile according to the folding cost sequence, and placing the minimum cost at the top;
b5 repeatedly connecting the vertex pairs (v 1 ,v 2 ) Output from the heap, fold, modify the cost of the affected vertex pairs.
Compared with the prior art, the invention has the beneficial effects that:
1. in this artificial intelligence based cloud exhibition three-dimensional modeling and rendering method, carry out light filling to the exhibit through the fixed point light source that sets up to make projection light source carry out the adjustment of projection angle, make the participant change the brightness degree of exhibit through adjusting projection light source's angle, make the participant realize the omnidirectional of exhibit through the different angles of projection and watch, improve the effect that the participant watched the exhibit in the cloud exhibition.
2. According to the cloud exhibition three-dimensional modeling and rendering method based on artificial intelligence, distance control is carried out on the modeled exhibits in the exhibition through the LOD model algorithm, so that the definition of the same exhibit is different when the participants watch the same exhibit at different distances, the participants feel that the participants watch the exhibits in the real world, the authenticity of the exhibited in the cloud exhibition is improved, and the effect of the participants watching the exhibits is improved.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1: the invention provides a cloud exhibition three-dimensional modeling and rendering method based on artificial intelligence, referring to fig. 1, comprising the following steps:
s1, building a spatial structure of an exhibition through a three-dimensional modeling technology, and setting a plurality of fixed-point light sources in the building process;
s2, modeling a display area in the modeled exhibition, and after the modeling is completed, matching the fixed-point light source with the display area to determine the light projection intensity;
when modeling the display area, the fixed point light sources between two adjacent display areas do not carry out complementary light, so that the phenomenon that light rays between the two display areas are mutually staggered to carry out staggered illumination on the exhibited product is avoided, the operation intensity of the system on light projection is increased, and meanwhile, the light intensity at each position inside the display area is the same, so that the fixed point light sources form an effect of comprehensively illuminating the display area;
in the process of supplementing light to the exhibits, the plurality of fixed-point light sources control the overall light intensity in the exhibit, so that the influence on the viewing of the exhibits due to the overlarge light intensity in the exhibit is avoided;
s3, modeling the exhibited item, carrying out matching display on the exhibited item and a corresponding display area after the modeling is completed, and carrying out light intensity connection with the fixed point light source after the matching is completed, so that the fixed point light source and the projection light source carry out light supplementing on the modeled exhibited item, and a participant can clearly watch the exhibited item;
s4, establishing a participant model, and setting a projection light source for a visual view angle of the participant.
Wherein, projection light source is in three kinds of states to the light filling of exhibit:
state one: the projection light source is turned off, the light supplementing operation is carried out on the exhibited item through the fixed point light source, and the exhibited item is watched by the participator through the light of the fixed point light source, so that the light on the exhibited item is not changed along with the change of the viewing angle of the participator when the exhibited item is watched in the state;
state two: the projection light source is turned on, the exhibited item is supplemented with light according to the visual angle of the participator, the exhibited item is irradiated by the cooperation of the fixed-point light source, so that the exhibited item has the intensity difference of light, at the moment, the projection light source moves along with the light of the participator, so that the exhibited item has different viewing feelings under different viewing angles of the participator, and the effect of the viewer on the exhibited item is improved;
state three: the projection light source is turned on, light is supplemented to the exhibited item according to the position selected by the participant, and in the light supplementing process of the projection light source, the viewing angle of the visual view angle of the participant is in an unfixed state, at the moment, the irradiation direction of the projection light source is fixed by the participant, so that the projection light source supplements the exhibited item by a fixed angle, and the visual view angle of the participant in the state can move, so that the participant can view the state displayed by the exhibited item when the projection light source supplements the exhibited item by a fixed light;
the participants control and adjust the irradiation angle of the projection light source according to the self conditions, so that the participants are convenient for watching the exhibits.
Meanwhile, if the projection light source of each participant irradiates the exhibit, the quantity of light on the exhibit is too much, the effect of watching the exhibit by each participant can be affected, in order to solve the problems, the fixed point light source is set to be the masses visible light, and the fixed point light source is the light which can be seen by each participant entering the exhibition, meanwhile, the illumination light source is also provided for the exhibition, the projection light source and the participants perform one-to-one exhibition, the projection light sources among the participants do not perform the exhibition, so that the light irradiated by the projection light source can only be seen by the participants, the situation that the participants cannot clearly watch the exhibit due to the fact that a plurality of projection light sources appear on the same exhibit can not appear, and the effect of watching the exhibit by the participants in the cloud exhibition can be enhanced.
Meanwhile, in an exhibition, in order to improve the integrity of the view of the exhibition, a plurality of display areas are built together, the display areas are mutually combined to form a large area, and a large area is formed, so that different distances exist between a plurality of exhibits and participants in the display area, if the same display proportion is set for the exhibits, the participants easily see unreal feeling, in order to reduce the unreal feeling of the cloud exhibition in view of the exhibits, the reality of the view of the exhibits is improved, when the participants view the plurality of exhibits in the exhibition, the viewing angle of the exhibits is calculated by adopting an LOD model generation algorithm, and when the viewing point of the participants is close to the object, the detail of the model which can be observed is abundant; when the view point is far away from the model, the observed details are gradually blurred, and the LOD model is built, so that the data volume and complexity can be effectively reduced, the real-time processing of the three-dimensional scene is realized, the definition of the participants watching the exhibits is continuously processed in the moving process of the participants, and the reality of the participants watching the exhibits is enhanced.
Meanwhile, when participants watch the exhibits at different distances in the exhibition, corresponding details are selected according to the viewing angles watched by the participants to display, so that the excessive operation intensity of the system caused by the excessive emphasis on the details is reduced, meanwhile, the definition of watching the exhibits at different distances is also different, and the authenticity of exhibition demonstration is improved.
The LOD model generation algorithm is used for gridding the model by adopting a geometric element deletion algorithm when displaying products with different distances, simplifying an original modeling model by the distances and the viewing angles of participants, and deleting vertexes.
The geometrical element deletion algorithm comprises the following steps:
a1, calculating local geometric and topological characteristics of each given vertex in the triangular mesh, and classifying the vertices;
a2, deleting the vertex when the distance from the point to the average plane is smaller than a given error value;
a3, carrying out local triangularization on the cavity left after the vertex is deleted;
a4, repeating the operations of A1, A2 and A3 until no vertex which can be deleted exists in the triangle mesh.
After the geometric element deleting algorithm deletes the vertex, the grid simplifying algorithm is adopted to calculate the original model, so that the remote exhibit image is displayed, and the algorithm steps are as follows:
b1, calculating an error matrix Q of each vertex in the original model;
b2, selecting effective folding vertex pairs;
b3, for each vertex pair (v 1 ,v 2 ) Calculate the optimal for replacing v 1 ,v 2 New vertex v';
b4, placing all vertexes in the pile according to the folding cost sequence, and placing the minimum cost at the top;
b5 repeatedly connecting the vertex pairs (v 1 ,v 2 ) Output from the heap, fold, modify the cost of the affected vertex pairs.
In the algorithm, the key is that the calculation of the vertex error matrix Q in B1 and the selection of the new vertex v' position in B3 have various methods, and the error matrix calculation mainly adopts the square sum of the distances from the point to the relevant planes as error measurement, and the specific formula is as follows:
in three-dimensional Euclidean space, a plane is expressed as
The planar normal is->
And has->
Point->
The square of the distance to the plane is
For a triangle set associated with a vertex, the quadratic error measure of that vertex +.>
Wherein->
The triplet +.>
Wherein->
,/>
,/>
Q is called an error matrix,>
also known as secondary errors.
Regarding the selection of the position of the new vertex v ', an optimal selection method is adopted, namely, the space position v' is calculated, so that the error cost caused by folding operation is minimized, v 'can be searched on the connection line of two points, and v' can also be searched in the whole space, the minimum error cost can be obtained by the method, and the new vertex coordinate is as follows
。/>