CN101853162A - Method for rendering editable webpage three-dimensional (Web3D) geometric modeling - Google Patents

Method for rendering editable webpage three-dimensional (Web3D) geometric modeling Download PDF

Info

Publication number
CN101853162A
CN101853162A CN201010188278A CN201010188278A CN101853162A CN 101853162 A CN101853162 A CN 101853162A CN 201010188278 A CN201010188278 A CN 201010188278A CN 201010188278 A CN201010188278 A CN 201010188278A CN 101853162 A CN101853162 A CN 101853162A
Authority
CN
China
Prior art keywords
geometric modeling
data
node
geometric
modeling object
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.)
Granted
Application number
CN201010188278A
Other languages
Chinese (zh)
Other versions
CN101853162B (en
Inventor
石冶砾
陆鑫
雷航
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Electronic Science and Technology of China
Original Assignee
University of Electronic Science and Technology of China
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 University of Electronic Science and Technology of China filed Critical University of Electronic Science and Technology of China
Priority to CN 201010188278 priority Critical patent/CN101853162B/en
Publication of CN101853162A publication Critical patent/CN101853162A/en
Application granted granted Critical
Publication of CN101853162B publication Critical patent/CN101853162B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method for rendering an editable webpage three-dimensional (Web3D) geometric modeling and belongs to the technical field of computer graphics processing. In the method, a geometric modeling object is generated by using a rendering engine geometric modeling workshop and analyzing the geometric modeling in an image node, and rendering for the editable three-dimensional geometric modeling is realized by expanding a JavaScript bottom layer application program interface (API) with a plug-in component on the basis of realizing Web3D by analyzing a data exchange protocol and using the rendering engine based on a scene tree. In the method, two basic Web3D rendering thoughts are combined and the redrawing efficiency of the geometric modeling is improved on the basis that vertex grain editable Web3D geometric modeling rendering is realized. The method belongs to the method for the three-dimensional geometric modeling of a Web rich client and can be applied to the animation industry.

Description

A kind of method for rendering editable webpage three-dimensional (Web 3 D) geometric modeling
Technical field
The invention belongs to the computer graphics disposal technology field, relate to webpage three-dimensional (Web3D) geometric modeling and play up technology, especially a kind of THREE DIMENSION GEOMETRIC MODELING rendering intent of Web rich client can be applicable to the animation industry.
Background technology
Web3D is a complex art in conjunction with three dimensional graphics and browser/server architectural framework (B/S) technology.Its technology overall background relates to three-dimensional picture display technique and web application technology.The three-dimensional image display technology of main flow on computers promptly, the object data that to set up in the three-dimensional data space or geometric model convert the two-dimensional projection and the technique for displaying of simulates real outward appearance in kind to, relate generally to following main flow process: the two-dimensional projection data that is converted to pixel data is operated, shown to geometric model (primitive data), projective transformation, the viewport transform, the segment of setting up the three-dimensional geometry body at mathematical space.The B/S technology is based on the browser/server architectural framework, resolve in the main data of paying close attention to of client (browser end) come, meet certain transport protocol standard from Server Transport, extract the information that browser application can be discerned, and set up the data structure demonstration or handle these information.Owing to the development of rich client technology, the JavaScript language develops in the B/S client application rapidly in recent years.The realization of JavaScript language depends on the basic-level support of browser engine to the JavaScript language, just use the JavaScriptCore module to finish this function such as the WebKit browser engine, otherwise the JavaScript language can't be in browser or other B/S application program the functional interface of other module in the call operation system.
Existing Web 3D technology mainly contains two kinds of implementations: to resolve the Web3D data exchange agreement is the Data Interchange Technology scheme and the Web ES technical scheme of core.The basic process of two kinds of Web3D technical schemes is identical, as shown in Figure 1: when showing three-dimensional picture, 1) three-dimensional picture information sends to client from server end with text formatting, 2) client is obtained 3 D graphic data by resolving the three-dimensional picture information text, 3) will give three-dimensional rendering program (render engine or based on the shape library of rendering pipeline), 4 through the 3 D graphic data after resolving) will be presented in the browser view through the three-dimensional picture after the three-dimensional rendering routine processes.
In first kind of technical scheme, Data Transport Protocol is based upon on the SGML usually, and this kind exchange agreement (as X3D, VRML) has defined the expression mode of THREE DIMENSION GEOMETRIC MODELING when data transmission.Client resolves to the bottom render engine with this kind exchange agreement can recognition data, and by the bottom render engine with graph rendering in browser.And in second kind of technical scheme, the instruction of bottom rendering program directly is defined as script API, directly transmission script instruction in the data transmission procedure.
Scope is narrowed down to the solid modelling aspect, for field towards the animation industry, more than two kinds of technology in the balance of ease for use and dirigibility, play up on the mode of editable THREE DIMENSION GEOMETRIC MODELING data and the efficient and all exist problem.The summit of revising approximate regular geometric body makes the usual way that the complex geometry moulding is three-dimensional cartoon design now.Use first kind of technical scheme, the mode of user's modification regular geometric body only limits to revise the basic parameter in the definition, therefore can't realize summit granularity geometric modeling vertex edit.If use the complex figure node to represent the regular geometric volume data, represent cube as using quadrilateral surface, and then realize editting function that complexity will be very huge.And because this kind mode needs through editor in editing process, data heavily resolve, the geometric modeling object is searched and upgraded, plays up four steps in the render engine, expense is also bigger.
And use Web ES scheme to exist following two problems: first problem be present stage not a technical scheme its bottom technic relization scheme is disclosed, the O3D JavaScript API and the O3D CoreSoftware that write such as the use C++ of O3D; Second problem is the scheme of playing up of revising that disclosed Web ES of present stage scheme does not also propose to adapt to the animation industry requirement, the basic geometric modeling of O3D only provides operation (such as changing cubical length) and a matrix manipulation interface of changing the geometric modeling size to be used for operating simultaneously all summits of geometric modeling, so the geometric modeling editor that can't realize the summit granularity.
Huge change has taken place from invention in webpage (Web) page rendering mode till now.The proposition of webpage three-dimensional (Web3D) technology will be played huge impetus to the development of following three-dimensional cartoon industry.But the Web3D towards the animation industry plays up the demonstration problem that not only needs to solve the three-dimensional geometry data, also need solve the editability problem of three-dimensional data.
Summary of the invention
The object of the present invention is to provide a kind of Web3D geometric modeling rendering intent that carries out summit granularity editor.The present invention is at the render engine that uses based on scene tree, the resolution data exchange agreement is realized on the basis of Web3D, by resolving the geometric modeling in the graphical nodes, use render engine geometric modeling workshop to generate the geometric modeling object, realize that by plug-in unit expansion JavaScript bottom api interface editable THREE DIMENSION GEOMETRIC MODELING plays up.The present invention combines two kinds of basic Web3D and plays up thinking on the basis that granularity editable Web3D geometric modeling in summit is played up realizing, improved the efficient that geometric modeling redraws system.
Technical solution of the present invention is as follows:
A kind of method for rendering editable webpage three-dimensional (Web 3 D) geometric modeling may further comprise the steps:
1. client receives the exchanges data text of the X3D form that comes from server.
2. X3D root node (Root) in the resolution data exchange of texts is created corresponding with it render engine scene tree node as the scene tree root node.
3., create corresponding with it render engine scene tree node if occur group node (Group) in the exchanges data text.
4. if occur space coordinate transformation node (Transform) in the exchanges data text, create corresponding with it render engine scene tree node, and read transformation parameter in the space coordinate transformation node, in this scene tree, generate corresponding geometric modeling transformation matrix.
5., create corresponding with it render engine scene tree node as the scene tree leaf node if occur graphical nodes (Shape) in the exchanges data text.
6. the geometric modeling node in the parsing graphical nodes.If for simple geometry moulding node then use render engine geometric modeling workshop to generate the geometric modeling object, if for complex geometry moulding node then generate the geometric modeling object that does not comprise geometric data according to the parameter in its attribute; Again with the data read in complex geometry moulding node and the child node thereof in the geometric modeling object.The geometric modeling object uses OpenGL VBO (Vertex Buffer Object) as the data storage area.
Cartesian geometry moulding node flow process is divided into resolves simple geometry moulding node and resolves complex geometry moulding node, and process of analysis is as follows respectively:
6.1 resolve simple geometry moulding node
6.1.1 node name (geometric modeling name), node Id, the geometric modeling parameter of simple geometry moulding node being imported into the geometric modeling of ready geometric figure workshop class generates in the interface.
6.1.2 being cut-and-dried geometric modeling object, geometric figure workshop class distributes vertex data.View shape is plane or three-dimensional, and (size) is interpreted as two dimension or three-dimensional with the vertex vector dimension, deposits in the geometric modeling object.Calculate summit quantity (n), the quantity of vertex vector is deposited in the geometric modeling object.The instant whole summits of geometric modeling that generate deposit vertex data in the vertex cache district of geometric modeling object.Statistics vertex data size (b) unit is a byte, and size information is deposited in the geometric modeling object.
6.1.3 being cut-and-dried geometric modeling object, geometric figure workshop class distributes color parameter.Looking color parameter is RGB look or RGBA look, and this acquiescence is used the RGBA look, and (size) is interpreted as the three-dimensional or the four-dimension with the color vector dimension.The geometric figure of workshop class generates interface the color vector dimension is left in the geometric modeling object.Calculating color vector number (being all n mutually with the summit) deposits in the geometric modeling object.The instant whole color vector that generate geometric modeling vertex vector correspondence deposit color data in the geometric modeling object color buffer district in.Calculating color color data size (b) unit is byte, and size information is deposited in the geometric modeling object.
6.1.4 being cut-and-dried geometric modeling object, geometric figure workshop class distributes the normal parameter.The normal parameter is a tri-vector.The geometric figure interface of workshop class leaves normal line vector quantity (n) in the geometric modeling object in.Instant generate geometric modeling vertex vector correspondence whole normal line vectors, deposit in the geometric modeling object.Calculating normal size of data (b) unit is byte, and the normal data size information is deposited in the geometric modeling object.
6.1.5 being cut-and-dried geometric modeling object, geometric figure workshop class distributes the mist coordinate parameters.The mist coordinate parameters is a monodrome.The geometric figure interface of workshop class leaves mist coordinate quantity (n) in the geometric modeling object in.The instant whole mist coordinates that generate geometric modeling vertex vector correspondence deposit in the geometric modeling object.Calculating mist coordinate data size (b) unit is byte, and mist coordinate size information is deposited in the geometric modeling object.
6.1.6 geometric figure workshop class is cut-and-dried geometric modeling object assigns textures coordinate parameters.Texture coordinate uses tri-vector to represent texture coordinate (s, t, r), and wherein r=0 represents acquiescence use 2 d texture.Texture coordinate quantity is left in the geometric modeling object.The instant whole texture coordinate values that generate geometric modeling vertex vector correspondence deposit in the geometric modeling object.Calculating texture coordinate size of data (b) unit is byte, and the texture coordinate size information is deposited in the geometric modeling object.
6.1.7 geometric figure workshop class is cut-and-dried geometric modeling object allocation index.Look the fundamental figure difference, the summit that constitutes geometric modeling is construed to dissimilar polygons, and index represents that the geometric modeling summit constitutes polygonal sequence.Deposit the number of vertex of index quantity, polygon rendering mode, each polygonal element in the geometric modeling object.Computation index size of data (b) unit is a byte, and size information is deposited in the geometric modeling object.
6.2 resolve complex geometry moulding node
6.2.1 generate the geometric modeling object of unallocated geometric modeling data.
6.2.2 read vertex data, the node name of storing in the complex combination node, number of vertex deposited in the geometric modeling object.Use resolver that vertex data, vertex vector dimension, number of vertices, vertex data size (being unit with byte) are deposited in the geometric modeling object.Explain the geometric modeling vertex index according to complex geometry moulding node name, number of vertex, the index data size of index, polygon rendering mode, index number, each polygonal element deposited in the geometric modeling object.
If 6.2.2 there is color node (Color), then read color data, node name, and color data deposited in the geometric modeling object.According to the color node name color node data is interpreted as RGB or RGBA.Deposit color vector interpretive mode, color vector number, color data size in the geometric modeling object.
If 6.2.3 there is normal node (Normal), then read the normal data, and the normal data deposited in the geometric modeling object.The data of resolving and deposit in the geometric modeling object simultaneously also comprise normal line vector number, normal size of data.
If 6.2.4 there is texture coordinate node (TexCoord), then read the texture coordinate data, deposit in the geometric modeling object.The data that deposit the geometric modeling object simultaneously in also comprise texture coordinate interpretive mode, texture coordinate number, data texturing size.
7. the outward appearance node (Appearance) in the parsing graphical nodes reads photometric data in the appearance data, and deposits in the geometric modeling object.
8. after the completing steps 5, the geometric modeling node after parsing finished joins in the scene tree node that generates in the step 3.And this tree node added in the scene tree leaf node key-value pair.If there is the scene tree node that generates in the step 2 in the resolving, then the scene tree node is joined in the node that generates in the step 2.If group node comprises all the other graphical nodes repeating steps 3,4,5,6,7.If group node comprises sub-group node repeating step 2,3,4,5,6,7.Comprising the child node parsing up to all group nodes finishes.
9. behind the completing steps 8 subtree that generates is joined in the scene tree root node.If do not resolve group node in addition, then repeating step 2,3,4,5,6,7,8, resolve up to all nodes of exchange agreement and finish.
10. play up the scene tree that generates in the step 9.Geometric transformation will be from the scene tree root node to the scene leaf nodes multiplies each other continuously, obtains final how much bending moment battle arrays.ModelView matrix multiple with geometric transformation and OpenGL.Geometric modeling data in the geometric modeling object that leaves under the scene tree leaf node are sent to OpenGL by the instruction of OpenGL rendering pipeline play up geometric modeling.Root node is done same operation to the branch of each leaf node.
If the user uses the JavaScript script, certain the geometric modeling object in editor's scene as shown in Figure 2, needs following steps:
11. use the JavaScript script, generation script language plug-in object.
12., then must specify the Id value of geometric modeling object, visit data district, the geometric modeling access method of invoke script language plug-in object if the user need read the geometric modeling object.Call this method system palpus process following steps:
12.1 in scene leaf nodes key-value pair, receive the corresponding geometric modeling object of Suo ZhidingI d value.If there is no this object then returns error message.If have the geometric modeling object then visit the geometric modeling data access interface of geometric modeling object.
12.2 call geometric modeling object data access method, search the geometric data size information that needs visit, if the size of data that need search is zero, then return the sky data.If size of data is non-vanishing, then reading of data district data value turns back to the data value that copies in the script.This method uses the OpenGLMapBuffer method as data access method.
13., then need specify geometric modeling object Id value, visit data district, new data value, the geometric modeling edit methods of invoke script language plug-in object if the user need edit the geometric modeling object.Call this method system and need pass through following steps:
13.1 in scene leaf nodes key-value pair, receive the corresponding geometric modeling object of Suo ZhidingI d value.If there is no this object then returns error message.If have the geometric modeling object then visit the geometric modeling data edition interface of geometric modeling object.
13.2 call the data edition interface of geometric modeling object.Search the geometric data that needs editor, if the data field size that need search is zero then can not edits.If search the data field non-zero, but the total sizes of data (byte number of data in internal memory) that are not equal to new data value then do not allow to revise former data.If search the data field non-zero, and the total size of data that equals new data value then is updated to new data with the data field.
13.3 after finishing the modification of geometric modeling object data, play up the whole scene tree again by JavaScript designated command system.
Use JavaScript script mechanism, do not needing when solving complex geometry moulding editor problem, to have reduced heavily to play up the time overhead of data greatly through resolving X3D data, two steps of search tree (perhaps reorganizing the whole scene tree) again.
Use this method, the script user can utilize simple geometry moulding node to realize oblique pyrometric cone easily, cut the geometrical bodies that distortion produces on geometric substantially basis such as ball of wrong conversion cube, flattening, and does not need to design complicated self-defined X3D node or User Defined node.For Script Programming personnel, can use script interface to realize geometric modeling with craftsmenship with three-dimensional programming experience.This method has kept direct use X3D Interchange Format to play up scene being simple and easy to use these characteristics simultaneously, and non-script user or do not need under the situation of vertex stage data modification then only needs to use and resolves the function that the X3D data exchange agreement is played up geometric modeling.
Description of drawings
Fig. 1 has represented to use the geometric modeling of the Web3D technology of data exchange agreement to play up flow process
Fig. 2 is this method processing flow chart, has represented the flow process of using this method editor and heavily playing up the geometric modeling object.
Fig. 3 is this method software principle figure, has represented organizational structure and software hierarchical relationship for realizing the whole software that this method designs.
Fig. 4 is the memory field synoptic diagram of render engine geometric modeling class, the memory field structural drawing of expression render engine geometric modeling object.Wherein render engine geometric modeling object is positioned at the CPU memory field, and the VBO object is arranged in the OpenGL memory field.
Fig. 5 hierarchical chart when playing up plug-in component operation, detail display the hierarchical structure of software during this method operation.
Embodiment
The object of the present invention is to provide a kind of Web3D geometric modeling rendering intent that carries out summit granularity editor, the present invention is based upon on the geometric modeling class as the geometric modeling data capsule, realizes that by plug-in unit expansion JavaScript bottom api interface editable THREE DIMENSION GEOMETRIC MODELING plays up.The present invention combines two kinds of basic Web3D and plays up thinking on the basis that granularity editable Web3D geometric modeling in summit is played up realizing, improved the efficient that geometric modeling redraws system.Present technique still is based upon the render engine of use based on scene tree, and the resolution data exchange agreement is realized on the method for designing of Web3D.
A kind of method for rendering editable webpage three-dimensional (Web 3 D) geometric modeling may further comprise the steps:
1. client receives the exchanges data text of the X3D form that comes from server.
2. X3D root node (Root) in the resolution data exchange of texts is created corresponding with it render engine scene tree node as the scene tree root node.
3., create corresponding with it render engine scene tree node if occur group node (Group) in the exchanges data text.
4. if occur space coordinate transformation node (Transform) in the exchanges data text, create corresponding with it render engine scene tree node, and read transformation parameter in the space coordinate transformation node, in this scene tree, generate corresponding geometric modeling transformation matrix.
5., create corresponding with it render engine scene tree node as the scene tree leaf node if occur graphical nodes (Shape) in the exchanges data text.
6. the geometric modeling node in the parsing graphical nodes.If for simple geometry moulding node then use render engine geometric modeling workshop to generate the geometric modeling object, if for complex geometry moulding node then generate the geometric modeling object that does not comprise geometric data according to the parameter in its attribute; Again with the data read in complex geometry moulding node and the child node thereof in the geometric modeling object.The geometric modeling object uses OpenGL VBO (Vertex Buffer Object) as the data storage area.
Cartesian geometry moulding node flow process is divided into resolves simple geometry moulding node and resolves complex geometry moulding node, and process of analysis is as follows respectively:
6.1 resolve simple geometry moulding node
6.1.1 node name (geometric modeling name), node Id, the geometric modeling parameter of simple geometry moulding node being imported into the geometric modeling of ready geometric figure workshop class generates in the interface.
6.1.2 being cut-and-dried geometric modeling object, geometric figure workshop class distributes vertex data.View shape is plane or three-dimensional, and (size) is interpreted as two dimension or three-dimensional with the vertex vector dimension, deposits in the geometric modeling object.Calculate summit quantity (n), the quantity of vertex vector is deposited in the geometric modeling object.The instant whole summits of geometric modeling that generate deposit vertex data in the vertex cache district of geometric modeling object.Statistics vertex data size (b) unit is a byte, and size information is deposited in the geometric modeling object.
6.1.3 being cut-and-dried geometric modeling object, geometric figure workshop class distributes color parameter.Looking color parameter is RGB look or RGBA look, and this acquiescence is used the RGBA look, and (size) is interpreted as the three-dimensional or the four-dimension with the color vector dimension.The geometric figure of workshop class generates interface the color vector dimension is left in the geometric modeling object.Calculating color vector number (being all n mutually with the summit) deposits in the geometric modeling object.The instant whole color vector that generate geometric modeling vertex vector correspondence deposit color data in the geometric modeling object color buffer district in.Calculating color color data size (b) unit is byte, and size information is deposited in the geometric modeling object.
6.1.4 being cut-and-dried geometric modeling object, geometric figure workshop class distributes the normal parameter.The normal parameter is a tri-vector.The geometric figure interface of workshop class leaves normal line vector quantity (n) in the geometric modeling object in.Instant generate geometric modeling vertex vector correspondence whole normal line vectors, deposit in the geometric modeling object.Calculating normal size of data (b) unit is byte, and the normal data size information is deposited in the geometric modeling object.
6.1.5 being cut-and-dried geometric modeling object, geometric figure workshop class distributes the mist coordinate parameters.The mist coordinate parameters is a monodrome.The geometric figure interface of workshop class leaves mist coordinate quantity (n) in the geometric modeling object in.The instant whole mist coordinates that generate geometric modeling vertex vector correspondence deposit in the geometric modeling object.Calculating mist coordinate data size (b) unit is byte, and mist coordinate size information is deposited in the geometric modeling object.
6.1.6 geometric figure workshop class is cut-and-dried geometric modeling object assigns textures coordinate parameters.Texture coordinate uses tri-vector to represent texture coordinate (s, t, r), and wherein r=0 represents acquiescence use 2 d texture.Texture coordinate quantity is left in the geometric modeling object.The instant whole texture coordinate values that generate geometric modeling vertex vector correspondence deposit in the geometric modeling object.Calculating texture coordinate size of data (b) unit is byte, and the texture coordinate size information is deposited in the geometric modeling object.
6.1.7 geometric figure workshop class is cut-and-dried geometric modeling object allocation index.Look the fundamental figure difference, the summit that constitutes geometric modeling is construed to dissimilar polygons, and index represents that the geometric modeling summit constitutes polygonal sequence.Deposit the number of vertex of index quantity, polygon rendering mode, each polygonal element in the geometric modeling object.Computation index size of data (b) unit is a byte, and size information is deposited in the geometric modeling object.
6.2 resolve complex geometry moulding node
6.2.1 generate the geometric modeling object of unallocated geometric modeling data.
6.2.2 read vertex data, the node name of storing in the complex combination node, number of vertex deposited in the geometric modeling object.Use resolver that vertex data, vertex vector dimension, number of vertices, vertex data size (being unit with byte) are deposited in the geometric modeling object.Explain the geometric modeling vertex index according to complex geometry moulding node name, number of vertex, the index data size of index, polygon rendering mode, index number, each polygonal element deposited in the geometric modeling object.
If 6.2.2 there is color node (Color), then read color data, node name, and color data deposited in the geometric modeling object.According to the color node name color node data is interpreted as RGB or RGBA.Deposit color vector interpretive mode, color vector number, color data size in the geometric modeling object.
If 6.2.3 there is normal node (Normal), then read the normal data, and the normal data deposited in the geometric modeling object.The data of resolving and deposit in the geometric modeling object simultaneously also comprise normal line vector number, normal size of data.
If 6.2.4 there is texture coordinate node (TexCoord), then read the texture coordinate data, deposit in the geometric modeling object.The data that deposit the geometric modeling object simultaneously in also comprise texture coordinate interpretive mode, texture coordinate number, data texturing size.
7. the outward appearance node (Appearance) in the parsing graphical nodes reads photometric data in the appearance data, and deposits in the geometric modeling object.
8. after the completing steps 5, the geometric modeling node after parsing finished joins in the scene tree node that generates in the step 3.And this tree node added in the scene tree leaf node key-value pair.If there is the scene tree node that generates in the step 2 in the resolving, then the scene tree node is joined in the node that generates in the step 2.If group node comprises all the other graphical nodes repeating steps 3,4,5,6,7.If group node comprises sub-group node repeating step 2,3,4,5,6,7.Comprising the child node parsing up to all group nodes finishes.
9. behind the completing steps 8 subtree that generates is joined in the scene tree root node.If do not resolve group node in addition, then repeating step 2,3,4,5,6,7,8, resolve up to all nodes of exchange agreement and finish.
10. play up the scene tree that generates in the step 9.Geometric transformation will be from the scene tree root node to the scene leaf nodes multiplies each other continuously, obtains final how much bending moment battle arrays.ModelView matrix multiple with geometric transformation and OpenGL.Geometric modeling data in the geometric modeling object that leaves under the scene tree leaf node are sent to OpenGL by the instruction of OpenGL rendering pipeline play up geometric modeling.Root node is done same operation to the branch of each leaf node.
If the user uses the JavaScript script, certain the geometric modeling object in editor's scene then needs following steps:
11. use the JavaScript script, generation script language plug-in object.
12., then must specify the Id value of geometric modeling object, visit data district, the geometric modeling access method of invoke script language plug-in object if the user need read the geometric modeling object.Call this method system palpus process following steps:
12.1 in scene leaf nodes key-value pair, receive the corresponding geometric modeling object of Suo ZhidingI d value.If there is no this object then returns error message.If have the geometric modeling object then visit the geometric modeling data access interface of geometric modeling object.
12.2 call geometric modeling object data access method, search the geometric data size information that needs visit, if the size of data that need search is zero, then return the sky data.If size of data is non-vanishing, then reading of data district data value turns back to the data value that copies in the script.This method uses the OpenGLMapBuffer method as data access method.
13., then need specify geometric modeling object Id value, visit data district, new data value, the geometric modeling edit methods of invoke script language plug-in object if the user need edit the geometric modeling object.Call this method system and need pass through following steps:
13.1 in scene leaf nodes key-value pair, receive the corresponding geometric modeling object of Suo ZhidingI d value.If there is no this object then returns error message.If have the geometric modeling object then visit the geometric modeling data edition interface of geometric modeling object.
13.2 call the data edition interface of geometric modeling object.Search the geometric data that needs editor, if the data field size that need search is zero then can not edits.If search the data field non-zero, but the total sizes of data (byte number of data in internal memory) that are not equal to new data value then do not allow to revise former data.If search the data field non-zero, and the total size of data that equals new data value then is updated to new data with the data field.
13.3 after finishing the modification of geometric modeling object data, play up the whole scene tree again by JavaScript designated command system.

Claims (1)

1. method for rendering editable webpage three-dimensional (Web 3 D) geometric modeling may further comprise the steps:
1. client receives the exchanges data text of the X3D form that comes from server;
2. X3D root node in the resolution data exchange of texts is created corresponding with it render engine scene tree node as the scene tree root node;
3., create corresponding with it render engine scene tree node if group node occurs in the exchanges data text;
4. if the space coordinate transformation node occurs in the exchanges data text, create corresponding with it render engine scene tree node, and read the transformation parameter in the space coordinate transformation node, in this scene tree, generate corresponding geometric modeling transformation matrix;
5., create corresponding with it render engine scene tree node as the scene tree leaf node if graphical nodes occurs in the exchanges data text;
6. the geometric modeling node in the parsing graphical nodes; If for simple geometry moulding node then use render engine geometric modeling workshop to generate the geometric modeling object, if for complex geometry moulding node then generate the geometric modeling object that does not comprise geometric data according to the parameter in its attribute; Again with the data read in complex geometry moulding node and the child node thereof in the geometric modeling object; The geometric modeling object uses OpenGL VBO as the data storage area;
The concrete process of analysis of geometric modeling node is:
6.1 resolve simple geometry moulding node;
6.1.1 node name, node Id, the geometric modeling parameter of simple geometry moulding node being imported into the geometric modeling of ready geometric figure workshop class generates in the interface;
6.1.2 being cut-and-dried geometric modeling object, geometric figure workshop class distributes vertex data; View shape is plane or three-dimensional, and the vertex vector dimension is interpreted as two dimension or three-dimensional, deposits in the geometric modeling object; Calculate summit quantity, the quantity of vertex vector is deposited in the geometric modeling object; The instant whole summits of geometric modeling that generate deposit vertex data in the vertex cache district of geometric modeling object; Statistics vertex data size unit is a byte, and size information is deposited in the geometric modeling object;
6.1.3 being cut-and-dried geometric modeling object, geometric figure workshop class distributes color parameter; Looking color parameter is RGB look or RGBA look, and this acquiescence is used the RGBA look, and the color vector dimension is interpreted as the three-dimensional or the four-dimension; The geometric figure of workshop class generates interface the color vector dimension is left in the geometric modeling object; Calculating the color vector number deposits in the geometric modeling object; The instant whole color vector that generate geometric modeling vertex vector correspondence deposit color data in the geometric modeling object color buffer district in; Calculating color color data size unit is byte, and size information is deposited in the geometric modeling object;
6.1.4 being cut-and-dried geometric modeling object, geometric figure workshop class distributes the normal parameter; The normal parameter is a tri-vector; The geometric figure interface of workshop class leaves normal line vector quantity in the geometric modeling object in; Instant generate geometric modeling vertex vector correspondence whole normal line vectors, deposit in the geometric modeling object; Calculating normal size of data unit is byte, and the normal data size information is deposited in the geometric modeling object;
6.1.5 being cut-and-dried geometric modeling object, geometric figure workshop class distributes the mist coordinate parameters; The mist coordinate parameters is a monodrome; The geometric figure interface of workshop class leaves mist coordinate quantity in the geometric modeling object in; The instant whole mist coordinates that generate geometric modeling vertex vector correspondence deposit in the geometric modeling object; Calculating mist coordinate data size unit is byte, and mist coordinate size information is deposited in the geometric modeling object;
6.1.6 geometric figure workshop class is cut-and-dried geometric modeling object assigns textures coordinate parameters; Texture coordinate uses tri-vector to represent texture coordinate (s, t, r), and wherein r=0 represents acquiescence use 2 d texture; Texture coordinate quantity is left in the geometric modeling object; The instant whole texture coordinate values that generate geometric modeling vertex vector correspondence deposit in the geometric modeling object; Calculating texture coordinate size of data unit is byte, and the texture coordinate size information is deposited in the geometric modeling object;
6.1.7 geometric figure workshop class is cut-and-dried geometric modeling object allocation index; Look the fundamental figure difference, the summit that constitutes geometric modeling is construed to dissimilar polygons, and index represents that the geometric modeling summit constitutes polygonal sequence; Deposit the number of vertex of index quantity, polygon rendering mode, each polygonal element in the geometric modeling object; Computation index size of data unit is a byte, and size information is deposited in the geometric modeling object;
6.2 resolve complex geometry moulding node;
6.2.1 generate the geometric modeling object of unallocated geometric modeling data;
6.2.2 read vertex data, the node name of storing in the complex combination node, number of vertex deposited in the geometric modeling object; Use resolver that vertex data, vertex vector dimension, number of vertices, vertex data size are deposited in the geometric modeling object; Explain the geometric modeling vertex index according to complex geometry moulding node name, number of vertex, the index data size of index, polygon rendering mode, index number, each polygonal element deposited in the geometric modeling object;
If 6.2.2 there is the color node, then read color data, node name, and color data deposited in the geometric modeling object.According to the color node name color node data is interpreted as RGB or RGBA; Deposit color vector interpretive mode, color vector number, color data size in the geometric modeling object;
If, then read the normal data, and the normal data are deposited in the geometric modeling object 6.2.3 there is the normal node; The data of resolving and deposit in the geometric modeling object simultaneously also comprise normal line vector number, normal size of data;
If, then read the texture coordinate data, deposit in the geometric modeling object 6.2.4 there is the texture coordinate node; The data that deposit the geometric modeling object simultaneously in also comprise texture coordinate interpretive mode, texture coordinate number, data texturing size;
7. the outward appearance node in the parsing graphical nodes reads photometric data in the appearance data, and deposits in the geometric modeling object;
8. after the completing steps 5, the geometric modeling node after parsing finished joins in the scene tree node that generates in the step 3; And this tree node added in the scene tree leaf node key-value pair; If there is the scene tree node that generates in the step 2 in the resolving, then the scene tree node is joined in the node that generates in the step 2; If group node comprises all the other graphical nodes repeating steps 3,4,5,6,7, if group node comprises sub-group node repeating step 2,3,4,5,6,7; Comprising the child node parsing up to all group nodes finishes;
9. behind the completing steps 8 subtree that generates is joined in the scene tree root node; If do not resolve group node in addition, then repeating step 2,3,4,5,6,7,8, resolve up to all nodes of exchange agreement and finish;
10. play up the scene tree that generates in the step 9; Geometric transformation will be from the scene tree root node to the scene leaf nodes multiplies each other continuously, obtains final how much bending moment battle arrays; ModelView matrix multiple with geometric transformation and OpenGL; Geometric modeling data in the geometric modeling object that leaves under the scene tree leaf node are sent to OpenGL by the instruction of OpenGL rendering pipeline play up geometric modeling; Root node is done same operation to the branch of each leaf node;
If the user uses the JavaScript script, certain the geometric modeling object in editor's scene then needs following steps:
11. use the JavaScript script, generation script language plug-in object;
12., then must specify the Id value of geometric modeling object, visit data district, the geometric modeling access method of invoke script language plug-in object if the user need read the geometric modeling object; Specifically comprise the steps:
12.1 in scene leaf nodes key-value pair, receive the corresponding geometric modeling object of Suo ZhidingI d value; If there is no this object then returns error message; If have the geometric modeling object then visit the geometric modeling data access interface of geometric modeling object;
12.2 call geometric modeling object data access method, search the geometric data size information that needs visit, if the size of data that need search is zero, then return the sky data; If size of data is non-vanishing, then reading of data district data value turns back to the data value that copies in the script; Use the OpenGLMapBuffer method as data access method;
13., then need specify geometric modeling object Id value, visit data district, new data value, the geometric modeling edit methods of invoke script language plug-in object if the user need edit the geometric modeling object; Specifically comprise the steps:
13.1 in scene leaf nodes key-value pair, receive the corresponding geometric modeling object of Suo ZhidingI d value; If there is no this object then returns error message; If have the geometric modeling object then visit the geometric modeling data edition interface of geometric modeling object;
13.2 call the data edition interface of geometric modeling object; Search the geometric data that needs editor, if the data field size that need search is zero then can not edits; If search the data field non-zero, but the total size of data that is not equal to new data value does not then allow to revise former data; If search the data field non-zero, and the total size of data that equals new data value then is updated to new data with the data field;
13.3 after finishing the modification of geometric modeling object data, play up the whole scene tree again by JavaScript designated command system.
CN 201010188278 2010-06-01 2010-06-01 Method for rendering editable webpage three-dimensional (Web3D) geometric modeling Expired - Fee Related CN101853162B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010188278 CN101853162B (en) 2010-06-01 2010-06-01 Method for rendering editable webpage three-dimensional (Web3D) geometric modeling

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010188278 CN101853162B (en) 2010-06-01 2010-06-01 Method for rendering editable webpage three-dimensional (Web3D) geometric modeling

Publications (2)

Publication Number Publication Date
CN101853162A true CN101853162A (en) 2010-10-06
CN101853162B CN101853162B (en) 2013-01-09

Family

ID=42804671

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010188278 Expired - Fee Related CN101853162B (en) 2010-06-01 2010-06-01 Method for rendering editable webpage three-dimensional (Web3D) geometric modeling

Country Status (1)

Country Link
CN (1) CN101853162B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102004784A (en) * 2010-11-25 2011-04-06 北京播思软件技术有限公司 Electricity-saving method of handheld terminal browser
CN102542613A (en) * 2010-12-31 2012-07-04 新奥特(北京)视频技术有限公司 Three-dimensional picture and text editing method
CN103135973A (en) * 2011-11-30 2013-06-05 腾讯科技(深圳)有限公司 Rendering method and device for graphic image in interface engine
CN103544051A (en) * 2012-07-17 2014-01-29 中兴通讯股份有限公司 Operation method and device
CN103985150A (en) * 2014-05-21 2014-08-13 联想(北京)有限公司 Image processing method and electronic equipment
CN106251385A (en) * 2016-07-20 2016-12-21 南京师范大学 The stratification graphical configuration method that script drives
CN106469466A (en) * 2016-08-31 2017-03-01 浙江科澜信息技术有限公司 A kind of construction method of three-dimensional pipeline model Connector model
CN107256265A (en) * 2017-06-14 2017-10-17 成都四方伟业软件股份有限公司 A kind of search-engine results data visualization methods of exhibiting and system
CN107464276A (en) * 2017-08-02 2017-12-12 上海湃睿信息科技有限公司 The embedded Web 3D systems and its implementation of cloud management model are locally rendered based on Thingworx
CN109165311A (en) * 2018-07-23 2019-01-08 广州都市圈网络科技有限公司 Ladder special topic drawing generating method
CN109410346A (en) * 2018-11-01 2019-03-01 中德(珠海)人工智能研究院有限公司 A kind of system and method for online editing three-dimensional building model
CN112764749A (en) * 2021-01-18 2021-05-07 电子科技大学 Method and system for generating software functional interface group

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002021451A1 (en) * 2000-09-07 2002-03-14 Neochi Llc Method and system for simultaneously creating and using multiple virtual reality programs
CN1299244C (en) * 2005-06-02 2007-02-07 中国科学院力学研究所 System and method for building three-dimentional scene dynamic model and real-time simulation
CN100388318C (en) * 2005-11-28 2008-05-14 北京航空航天大学 State set based shader three-dimensional graph drawing frame and drawing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002021451A1 (en) * 2000-09-07 2002-03-14 Neochi Llc Method and system for simultaneously creating and using multiple virtual reality programs
CN1299244C (en) * 2005-06-02 2007-02-07 中国科学院力学研究所 System and method for building three-dimentional scene dynamic model and real-time simulation
CN100388318C (en) * 2005-11-28 2008-05-14 北京航空航天大学 State set based shader three-dimensional graph drawing frame and drawing method

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102004784A (en) * 2010-11-25 2011-04-06 北京播思软件技术有限公司 Electricity-saving method of handheld terminal browser
CN102542613A (en) * 2010-12-31 2012-07-04 新奥特(北京)视频技术有限公司 Three-dimensional picture and text editing method
CN103135973A (en) * 2011-11-30 2013-06-05 腾讯科技(深圳)有限公司 Rendering method and device for graphic image in interface engine
CN103135973B (en) * 2011-11-30 2018-05-01 腾讯科技(深圳)有限公司 Graph image rendering intent and device in a kind of interface engine
CN103544051A (en) * 2012-07-17 2014-01-29 中兴通讯股份有限公司 Operation method and device
CN103985150B (en) * 2014-05-21 2017-03-01 联想(北京)有限公司 A kind of image processing method and electronic equipment
CN103985150A (en) * 2014-05-21 2014-08-13 联想(北京)有限公司 Image processing method and electronic equipment
CN106251385B (en) * 2016-07-20 2019-01-18 南京师范大学 The stratification graphical configuration method of script driving
CN106251385A (en) * 2016-07-20 2016-12-21 南京师范大学 The stratification graphical configuration method that script drives
CN106469466A (en) * 2016-08-31 2017-03-01 浙江科澜信息技术有限公司 A kind of construction method of three-dimensional pipeline model Connector model
CN107256265A (en) * 2017-06-14 2017-10-17 成都四方伟业软件股份有限公司 A kind of search-engine results data visualization methods of exhibiting and system
CN107464276A (en) * 2017-08-02 2017-12-12 上海湃睿信息科技有限公司 The embedded Web 3D systems and its implementation of cloud management model are locally rendered based on Thingworx
CN109165311A (en) * 2018-07-23 2019-01-08 广州都市圈网络科技有限公司 Ladder special topic drawing generating method
CN109410346A (en) * 2018-11-01 2019-03-01 中德(珠海)人工智能研究院有限公司 A kind of system and method for online editing three-dimensional building model
CN109410346B (en) * 2018-11-01 2024-03-19 中德(珠海)人工智能研究院有限公司 System and method for editing three-dimensional building model on line
CN112764749A (en) * 2021-01-18 2021-05-07 电子科技大学 Method and system for generating software functional interface group

Also Published As

Publication number Publication date
CN101853162B (en) 2013-01-09

Similar Documents

Publication Publication Date Title
CN101853162B (en) Method for rendering editable webpage three-dimensional (Web3D) geometric modeling
US9934602B2 (en) System, method and device for three-dimensional modeling
US8612040B2 (en) Automated derivative view rendering system
JP2002319038A (en) Method for processing 2d image mapped onto 3d object
CN112989482B (en) BIM model data generation method and device and building method and device
CN111179391A (en) Three-dimensional animation production method, system and storage medium
Miao et al. SymmSketch: Creating symmetric 3D free-form shapes from 2D sketches
US11605200B2 (en) System for optimizing a 3D mesh
Mudge et al. 3d modeling for non-expert users with the castle construction kit v0. 5
Kazmi et al. Efficient sketch‐based creation of detailed character models through data‐driven mesh deformations
CN111815746A (en) Method for generating hair data based on USD system
CN107066926A (en) Positioned using the 3D objects of descriptor
Shen et al. Research of VR modeling technology based on VRML and 3DSMAX
Fu et al. Easyvrmodeling: Easily create 3d models by an immersive vr system
US9582247B1 (en) Preserving data correlation in asynchronous collaborative authoring systems
Chen et al. Research on 3D modeling in scene simulation based on Creator and 3dsmax
CN116583881A (en) Data stream, apparatus and method for volumetric video data
Wang et al. LVDIF: a framework for real-time interaction with large volume data
CN100464335C (en) Transfer method from three-dimensional solid to standard technical layout in microelectromechanical system
Zawadzki et al. Hybrid of shape grammar and morphing for procedural modeling of 3d caves
KR102467152B1 (en) BIM visualizing system and method using web environment
WO2023179091A1 (en) Three-dimensional model rendering method and apparatus, and device, storage medium and program product
Yan et al. 3D visual design for mobile search result on 3G mobile phone
Guo et al. Motion capture technology and its applications in film and television animation
US20240062453A1 (en) Generation of tight world space bounding regions

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130109

Termination date: 20150601

EXPY Termination of patent right or utility model