CN112704872A - Scene data synchronization method, device, system and storage medium - Google Patents

Scene data synchronization method, device, system and storage medium Download PDF

Info

Publication number
CN112704872A
CN112704872A CN202110024555.XA CN202110024555A CN112704872A CN 112704872 A CN112704872 A CN 112704872A CN 202110024555 A CN202110024555 A CN 202110024555A CN 112704872 A CN112704872 A CN 112704872A
Authority
CN
China
Prior art keywords
scene
sub
file
resources
format
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
CN202110024555.XA
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.)
Perfect World Beijing Software Technology Development Co Ltd
Original Assignee
Perfect World Beijing Software Technology Development 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 Perfect World Beijing Software Technology Development Co Ltd filed Critical Perfect World Beijing Software Technology Development Co Ltd
Priority to CN202110024555.XA priority Critical patent/CN112704872A/en
Publication of CN112704872A publication Critical patent/CN112704872A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/35Details of game servers
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/50Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers
    • A63F2300/53Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers details of basic data processing
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/6009Methods for processing data by generating or executing the game program for importing or creating game content, e.g. authoring tools during game development, adapting content to different platforms, use of a scripting language to create content

Abstract

The invention provides a scene data synchronization method, a device, a system and a storage medium, wherein the method comprises the following steps: the second client receives a sub-scene file which is sent by the server and edited by at least one first client and has a designated general format, wherein the designated general format is a file format which is common to all the clients; extracting scene resources from the received sub-scene files through an engine editor, and converting the extracted scene resources into an engine internal format; and constructing a scene structure and generating a scene object based on the scene resources in the internal format of the engine and the scene tree in the sub-scene file. The invention can ensure the loading performance of the scene resources, effectively support the expansion and modification of the clients, collaboratively edit the scene resources by the first clients and synchronously push the edited sub-scene files to other clients, improve the editing efficiency of the scene resources and promote the relevance among different clients.

Description

Scene data synchronization method, device, system and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method, an apparatus, a system, and a storage medium for synchronizing scene data.
Background
Data typically used by game engines primarily includes resources and scenes. The resources are from files such as grids, animations, pictures, etc., and commonly used formats include fbx, obj, png, etc. Scenes are display environments built by using the resources, and game objects using the resources are generally organized into a scene tree structure. Some formats only correspond to one resource, and some formats correspond to a plurality of resources and scenes. The resources and scenes are generated by Digital Content Creation software DCC (Digital Content Creation), such as software maya for generating grid and animation resources, software photoshop for generating picture resources, and the like. In general, originally generated scenes and resources are not directly used, but the resources are sorted and converted, and scenes of real application are built in an editor.
However, the existing resource formats have many problems in use, such as low efficiency of fbx format analysis, no animation data in obj format, poor standardization of dae format, no scene information in general resource files, and difficulty in applying one resource format to various game data efficiently and comprehensively. Different resource formats cannot be compatible with each other, and writing corresponding conversion tools for different resources brings repeated and complicated workload. Secondly, formats on the market are relatively solidified, flexible adjustment cannot be achieved, the formats are difficult to expand, and maintenance is inconvenient. At present, the DCC does not optimize the resource and scene manufacturing process and the storage file in the aspect of collaborative editing. In addition, the prior art does not realize the intercommunication of data among different tools or engines, cannot realize synchronous modification and display, and cannot realize that a scene built in a certain engine or DCC is directly used by another engine or DCC.
Disclosure of Invention
In view of the foregoing, the present invention is provided to provide a method, an apparatus, a system, and a storage medium for synchronizing scene data, which overcome the foregoing problems or at least partially solve the foregoing problems, and can ensure the performance of loading scene resources, effectively support extension and modification of clients, and improve the capability of collaborative editing of scene resources. Moreover, timely synchronization of scene data among clients is effectively realized, and relevance among different clients is promoted.
According to an aspect of the embodiments of the present invention, there is provided a method for synchronizing scene data, where multiple clients use multiple sub-scene files of a same scene in a server, and any client may be a first client or a second client, the method including:
the second client receives a sub-scene file which is sent by the server and edited by at least one first client and has a specified general format, wherein the specified general format is a file format which is general for each client;
extracting scene resources from the received sub-scene files through an engine editor, and converting the extracted scene resources into an engine internal format;
and constructing a scene structure and generating a scene object based on the scene resources in the internal format of the engine and the scene tree in the sub-scene file.
Optionally, the scene resources contained in the sub-scene file adopt an extensible resource object storage structure;
the resource object comprises an object name and object content, wherein the object content comprises object attributes and reference relations with other objects.
Optionally, the receiving, by the sub-scene file, an editing operation mode of at least a first client includes: and at least one of a defining operation, an rewriting operation and a reference relation setting operation of the resource objects in the sub-scene file is edited.
Optionally, the extracting, by the engine editor, the scene resource from the received sub-scene file, and converting the extracted scene resource into an engine internal format includes:
extracting scene resources from the received sub-scene files through an engine editor, and storing the extracted scene resources into the newly generated sub-scene files;
and converting the scene resources in the newly generated sub-scene file into an engine internal format.
Optionally, converting the scene resources in the newly generated sub-scene file into an engine internal format includes:
adopting a parallelization tool to convert scene resources in the newly generated sub-scene file into an engine internal format; or
And converting the scene resources in the newly generated sub-scene file into an engine internal format by adopting a multithreading mode.
Optionally, constructing a scene structure and generating a scene object based on the scene resources in the engine internal format and the scene tree in the sub-scene file, including:
and creating a scene structure of the engine editor based on the scene resources in the engine internal format and the scene tree in the sub-scene file, and generating a scene object by using the scene resources in the engine internal format.
Optionally, creating a scene structure of an engine editor based on the scene resources in the engine internal format and the scene tree in the sub-scene file, includes:
restoring the scene tree in the sub-scene file into an engine editor; wherein each level node in the scene tree in the sub-scene file corresponds to a resource object;
the engine editor creates a scene structure of the engine editor based on the scene resources of the engine internal format and the scene tree.
Optionally, the sub-scene file is saved in a server in a text format or a two-level system format, wherein,
the sub-scene files in the text format are stored according to the logical relationship of the scenes;
the scene data in the sub-scene file with the two-level system format comprises three data of a scene structure, a resource default value and a resource time information value, and the priority is the scene structure, the resource default value and the resource time information value from high to low in sequence.
According to another aspect of the embodiments of the present invention, there is also provided a device for synchronizing scene data, where multiple clients use multiple sub-scene files of the same scene in a server, and any client may be a first client or a second client, and the device is applied to the second client, and includes:
the receiving module is suitable for receiving a sub-scene file which is sent by a server and edited by at least one first client and has a specified general format, wherein the specified general format is a file format which is general for each client;
the conversion module is suitable for extracting scene resources from the received sub-scene files through the engine editor and converting the extracted scene resources into an engine internal format;
and the construction generation module is suitable for constructing a scene structure and generating a scene object based on the scene resources in the internal format of the engine and the scene tree in the sub-scene file.
According to another aspect of the embodiments of the present invention, there is also provided a system for synchronizing scene data, including: a server and a plurality of clients, the plurality of clients using a plurality of sub-scene files of the same scene in the server, any of the clients may be a first client or a second client, wherein,
any first client executes editing operation on the sub-scene files, converts the edited sub-scene files into sub-scene files in a specified general format and uploads the sub-scene files to the server, wherein the specified general format is a file format which is common to all the clients;
the server pushes the received sub-scene file in the specified general format edited by the first client to at least one second client;
the second client extracts scene resources from the received sub-scene files through the engine editor, converts the extracted scene resources into an engine internal format, and constructs a scene structure and generates a scene object based on the scene resources of the engine internal format and the scene tree in the sub-scene files.
According to yet another aspect of the embodiments of the present invention, there is also provided a computer storage medium storing computer program code which, when run on a computing device, causes the computing device to perform the method of synchronizing scene data as arbitrarily implemented above.
According to still another aspect of the embodiments of the present invention, there is also provided a computing device including: a processor; a memory storing computer program code; the computer program code, when executed by the processor, causes the computing device to perform the method of synchronization of scene data as arbitrarily embodied above.
In the embodiment of the invention, after the sub-scene file is edited by at least one first client and stored as the sub-scene file in the specified general format, the edited sub-scene file in the specified general format can be synchronized to a second client by the server, the scene resource in the sub-scene file is converted into the internal format of the engine by the engine editor of the second client, and then the scene structure can be constructed and the scene object can be generated based on the scene resource in the internal format of the engine and the scene tree in the sub-scene file. Therefore, the universal format data synchronized among different clients in the embodiment of the invention can be compatible with all clients, the loading performance of the scene resources is ensured, the expansion and modification of the clients can be effectively supported, the scene resources are cooperatively edited by a plurality of first clients, the editing efficiency of the scene resources is improved, and the cooperative editing capability of the scene resources is also effectively improved by adopting the universal format data. Moreover, by synchronously pushing the sub-scene files edited by any client to other clients, the scene data is effectively synchronized among the clients in time, and the relevance among different clients is promoted.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
The above and other objects, advantages and features of the present invention will become more apparent to those skilled in the art from the following detailed description of specific embodiments thereof, taken in conjunction with the accompanying drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 shows a flow diagram of a synchronization method of scene data according to an embodiment of the invention;
FIG. 2 is a diagram illustrating a structure of scene data according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a synchronization process for scene data according to an embodiment of the invention;
fig. 4 is a schematic structural diagram illustrating a synchronization apparatus of scene data according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram illustrating a system for synchronizing scene data according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above 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 is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or 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, 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 solve the above technical problem, an embodiment of the present invention provides a method for synchronizing scene data. In the method, a plurality of clients can apply a plurality of sub-scene files which are stored in a server and belong to the same game scene, and any client can be used as a first client or a second client. Fig. 1 is a flowchart illustrating a scene data synchronization method according to an embodiment of the present invention. Referring to fig. 1, the synchronization method of scene data includes steps S102 to S106.
And step S102, the second client receives the sub-scene file which is sent by the server and edited by at least one first client and has the appointed universal format, and the appointed universal format is a file format which can be commonly used by all the clients.
In the embodiment of the present invention, the specified common Format may be u3f (Universal 3D Format) Format. After the first client edits any sub-scene file, the edited sub-scene file can be saved as a sub-scene file in the u3f format, and the second client can edit and modify the sub-scene file in the u3f format. The number of the second clients receiving the sub-scene file in the common format pushed by the server in this embodiment may also be multiple, which is not specifically limited in this embodiment of the present invention.
And step S104, extracting scene resources from the received sub-scene files through the engine editor, and converting the extracted scene resources into an engine internal format.
And step S106, constructing a scene structure and generating a scene object based on the scene resources in the internal format of the engine and the scene tree in the sub-scene file.
In the embodiment of the invention, after the sub-scene file is edited by at least one first client and stored as the sub-scene file in the specified general format, the edited sub-scene file in the specified general format can be synchronized to a second client by the server, the scene resource in the sub-scene file is converted into the internal format of the engine by the engine editor of the second client, and then the scene structure can be constructed and the scene object can be generated based on the scene resource in the internal format of the engine and the scene tree in the sub-scene file.
Therefore, the universal format data synchronized among different clients in the embodiment of the invention can be compatible with all clients, the loading performance of the scene resources is ensured, the expansion and modification of the clients can be effectively supported, the scene resources are cooperatively edited by a plurality of first clients, the editing efficiency of the scene resources is improved, and the cooperative editing capability of the scene resources is also effectively improved by adopting the universal format data. Moreover, by synchronously pushing the sub-scene files edited by any client to other clients, the scene data is effectively synchronized among the clients in time, and the relevance among different clients is promoted.
The embodiment of the invention can be applied to the production of the scene file, namely the production link of the scene file in the game production process, and the scene file in the game can be produced and edited cooperatively through a plurality of clients. For example, in the game production process, a plurality of sub-scene files contained in the scene file of the same game scene can be produced and edited cooperatively by different clients, and different clients can produce and edit different sub-scene files, so that the production efficiency of the whole scene file is effectively improved, and the production efficiency of the whole game is improved.
The client of the embodiment of the invention can adopt maya software, a client based on an Engine Unity and a client based on a Unreal Engine universal Engine, any client can be used as a first client or a second client, and any client can edit the sub-scene file and also can receive the sub-scene file in a specified universal format edited by other clients synchronized by the server.
In the embodiment of the invention, the scene resources contained in the sub-scene file adopt an extensible resource object storage structure, namely, the resource objects BaseObject are taken as specific units for resource storage. Each resource object BaseObject contains an object name and object content, the resource object may contain various basic resource types, and the object content may specifically include a plurality of object attributes and reference relationships with other objects. The object attributes may include attributes such as a vertex position attribute, a vertex normal attribute, a vertex color attribute, and the like, and the values of the object attributes include a resource default value and a value corresponding to time.
Now, taking grid Mesh resources derived from the resource object BaseObject as an example, a Mesh resource object storage structure is introduced.
Figure BDA0002889744050000071
Where Define is a key indicating a Mesh type (a type derived from BaseObject) defining an object name "Cube", Float3 indicates a vector whose type of attribute is a set of three floating point data floats, and the type of attribute includes a vertex position points, a vertex normal, and a vertex color. Samples represents a set of values with time information, where each value is a time to a set of vertex data.
The resource object BaseObject of the embodiment of the invention is a parent class, and the Mesh is a subclass. Of course, the resource object BaseObject may also derive other sub-classes, such as a spatial transform object, a material object, a camera object, a light object, a particle object, a terrain object, and so on. The resource object derived from BaseObject may include a parent attribute or an attribute unique to the resource object. The embodiment of the present invention does not specifically limit the types and attributes of the resource objects.
The embodiment of the invention can adopt a tree hierarchy structure on the whole scene configuration, and each hierarchy node is a resource object BaseObject. The resource object BaseObject may represent a node of a space transformation object, may also represent a node of a resource used for rendering, such as a grid resource Mesh, a Material resource, a bone resource skeeleton, an Animation resource, and may also represent other types of nodes such as a camera and a light, and may even extend nodes such as a special effect and a terrain, such as a particle system.
In one embodiment, the nodes of a portion of the hierarchy in the tree hierarchy are defined as follows:
Figure BDA0002889744050000081
define is a keyword and represents object names defining resource objects, and each object name corresponds to one node. The hierarchy nodes in the above embodiments include a node of a spatial transformation resource with an object name of "Building", a node of a spatial transformation resource with an object name of "House 1", a mesh node with an object name of "Chair", a mesh node with an object name of "Floor", a node of a spatial transformation resource with an object name of "House 2", and the like.
In addition, referring to fig. 2, each scene object in the overall game scene SubScene implemented by the present invention may be used as a root node RootSubScene of a sub-scene. The sub-scene file contains a sub-scene structure and a pure resource file, and the sub-scene structure references the pure resource file. Fig. 2 shows the sub-scene structure SubScene1 and the sub-scene structure SubScene2, the resource file ResourceFile1, the resource file ResourceFile2, the resource file ResourceFile 3. And the sub scene structure SubScene1 references resource file ResourceFile1 and resource file ResourceFile2, and the sub scene structure SubScene2 references resource file ResourceFile2 and resource file ResourceFile 3. Since the resources and the scene structures contained in different scenes are different, the reference relationship of the scene structure to the resources may be determined according to actual requirements, which is not specifically limited in the embodiment of the present invention.
In the embodiment of the present invention, a plurality of sub-Scene files SubScene of a Scene may be combined to represent a complete Scene or level. Moreover, the sub-scene files are relatively independent, the editor of one first client can operate one sub-scene file independently, and a plurality of first clients can collaboratively edit a plurality of sub-scene files by adopting a plurality of editing modes.
In this embodiment, the editing manner for the resource object in the sub-scene file may include at least one of a definition operation (Define), an Overwrite operation (Overwrite), and a Reference setting operation (Reference).
The definition operation may refer to the definition operation of the resource object (object name is Cube) in the above embodiment.
The rewriting operation corresponds to the defining operation, and one resource object in the sub-scene file is rewritten, namely the resource object BaseObject is redefined.
When the resource object reference relation is set, the reference information of the referenced resource object BaseObject can be directly added, and other referenced resource objects do not need to be completely copied, so that the reference efficiency can be improved, and the reference mode can be used for the reference of the scene node to the resource object.
The rewriting operation of the resource object will now be described by taking the Mesh resource derived from the rewriting resource object BaseObject as an example.
Figure BDA0002889744050000091
Figure BDA0002889744050000101
Wherein, Overwrite represents the Mesh type with the name of Charr 2 rewritten, and the suffix ss in building.ss is the abbreviation of SubScene, which represents the sub-scene file. </building/House 1/Charr > is a full path of a Charr node in a sub-scene file, and the full path is used as a unique identifier of a certain node. This embodiment overwrites the vertex position data.
In addition, the editing operation of the sub-scene file in the embodiment of the invention can also comprise adding a tangent attribute to the resource object and configuring an algorithm for calculating the tangent. Topology attributes may also be added to attributes of the resource object, such as removing vertex color attributes, adding an association with another object Material, and so forth. The editing mode of the sub-scene file is not particularly limited in the embodiment of the invention. The editors of the plurality of first clients can simultaneously and cooperatively work, so that the editing efficiency of the scene data can be improved.
In addition, before editing the sub-scene file, the embodiment of the invention can also traverse and analyze the attribute of the resource object in the sub-scene file through the data format analyzer, and the attribute of the resource object in the sub-scene file can be analyzed through the data format analyzer, so that the follow-up editing and expansion of the sub-scene file can be facilitated.
In an embodiment of the present invention, a client plug-in may be used to convert the format of the scene data into the specified general format of the embodiment of the present invention. Because each client using the sub-scene file of the same scene has respective characteristics, and the own data formats of different clients are not communicated, the embodiment of the invention respectively sets corresponding client plug-ins for the clients using the sub-scene file of the same scene. The client plug-in may convert formatted data such as FBX, OBJ, DAE, etc. to the universal u3f format. The embodiment of the invention can effectively realize the contact of each client by converting the scene data into the appointed universal format through the client plug-in.
Each client plug-in can be used as an independent client and logs in a server, the server maintains the connection with the client plug-in, the client can map the file of the server to a local disk through the corresponding plug-in and can edit the sub-scene file.
For example, referring to fig. 3, the clients using the same game scene in the embodiment of the present invention are maya software, an Engine Unity-based client, and a ghost Engine non-Engine (UE) -based client, respectively. The plug-in Maya plug-in set for the Maya software may convert the data format of the Maya software into the u3f format, the plug-in Unity plug-in set for the engine Unity-based client may convert the data format of the Unity client into the u3f format, and the plug-in UE plug-in set for the UE client may convert the data format of the UE client into the u3f format. Any client can be used as a first client to edit the sub-scene file, and can also be used as a second client to receive the edited sub-scene file.
In the embodiment, it is assumed that the UE client edits the sub-scene file, and after the UE client maps the sub-scene file stored in the server to the local disk and edits the sub-scene file, the UE plug-in converts the edited sub-scene file into the sub-scene file in the u3f format, and then feeds back the sub-scene file in the u3f format to the server and stores the sub-scene file in the server. And the server pushes the sub-scene file in the u3f format to Maya software through a plug-in Maya plug-in and pushes the sub-scene file to a Unity client through a Unity plug-in. Therefore, the maya software and the Unity client can update the locally mapped sub-scene file according to the obtained new sub-scene file. Furthermore, the maya software and the Unity client can convert the scene resources in the received sub-scene file into an engine internal format through respective engine editors, and reconstruct the scene structure based on the resources of the engine internal format and the scene tree and generate the scene object.
Therefore, the embodiment of the present invention provides a solution (Universal Data solution, uds) for providing collaborative editing preview for clients based on a specified general format (e.g., u3f format), that is, any client edits sub-scene files and converts the sub-scene files into general format sub-scene files to upload to a server, and the server synchronizes the edited sub-scene files in the specified general format to all connected clients, thereby implementing intercommunication of scene Data among different clients, that is, implementing synchronous update and display of scene Data among different clients.
In an embodiment of the present invention, the sub-scene file stored in the server may adopt a text format or a two-level system format. And storing the sub-scene files in the text format according to the logical relationship of the scenes. The scene data in the sub-scene file in the two-level system format comprises three data of a scene structure, a resource default value and a resource time information value, and the priority is the scene structure, the resource default value and the resource time information value from high to low in sequence. The secondary system format can enable the memory space occupied by the sub-scene file to be smaller, and can also ensure that the minimum amount of data can be obtained most efficiently when the data is loaded by setting the priority level of the data.
In the embodiment of the present invention, the sub-scene file received by the second client includes a resource and a scene tree, and the second client may convert the scene resource and create the scene structure again according to the resource and the scene tree. Therefore, when the second client may extract the scene resource from the received sub-scene file through the engine editor and convert the extracted scene resource into the engine internal format, the second client may extract the scene resource from the received sub-scene file through the engine editor and save the extracted scene resource into the newly generated sub-scene file. And further, converting the scene resources in the newly generated sub-scene file into an engine internal format.
The scene resources of this embodiment are saved in units of resource objects, and thus it is possible to extract resource objects from the sub-scene file and save the extracted resource objects to the newly generated sub-scene file. The resource data is relatively fixed and can be reused by different sub-scenes, so that after a new sub-scene file is extracted, the resource data can be conveniently used by other sub-scenes.
When the scene resources in the newly generated sub-scene file are converted into the internal format of the engine, the embodiment of the invention can adopt a parallelization tool to convert the scene resources in the newly generated sub-scene file into the internal format of the engine, and the parallelization tool is not specifically limited by the embodiment of the invention.
In addition, the embodiment of the invention can also adopt a multithreading mode to convert the scene resources in the newly generated sub-scene file into an engine internal format in parallel. The efficiency of converting the scene resources into the internal format of the engine can be effectively improved by adopting a parallelization tool or a multithreading mode.
The embodiment of the present invention does not limit the specific manner of converting the scene resources in the newly generated sub-scene file into the internal format of the engine.
In the embodiment of the present invention, when a scene structure is constructed based on the scene resources in the engine internal format and the scene tree in the sub-scene file and a scene object is generated, the scene structure of the engine editor may be created based on the scene resources in the engine internal format and the scene tree in the sub-scene file, and then the scene object is generated using the scene resources in the engine internal format. The embodiment may restore the scene tree in the sub-scene file into the engine editor, and then create a scene structure of the engine editor based on the scene resources and the scene tree of the internal format of the engine through the engine editor. In connection with the above embodiment, each level node in the scene tree in the sub-scene file may correspond to a resource object.
In the embodiment of the present invention, the second client-side created scene structure may be a structure of a certain game level, that is, the game level is edited, and the scene structure is not specifically limited in the embodiment of the present invention. After the scene structure is constructed and the scene object is generated, the scene structure and the scene object can be saved in corresponding sub-scene files for use in game runtime.
The invention adopts the engine editor of the special engine to convert the received sub-scene files in the general format into the internal format of the engine, and re-edits the scene data in the scene files in the internal format of the engine, thereby being capable of communicating the relationship between the client and the special engine based on the data in the specified general format (u3f file format).
Based on the same inventive concept, the embodiment of the invention also provides a scene data synchronization device. The multiple clients use multiple sub-scene files of the same scene in the server, any client can be a first client or a second client, and the synchronization device of the scene data is applied to the second client. The scene data synchronization apparatus is used to implement the foregoing embodiments and preferred embodiments, and the description already made is omitted here. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 4 is a schematic structural diagram illustrating a scene data synchronization apparatus according to an embodiment of the present invention. Referring to fig. 4, the synchronization apparatus of scene data includes a receiving module 410, a converting module 420, and a construction generating module 430.
The receiving module 410 is adapted to receive a sub-scene file in a designated general format, which is sent by the server and edited by at least one first client, where the designated general format is a file format common to all the clients.
The specified common format may be in the u3f format. After the first client edits any sub-scene file, the edited sub-scene file can be saved as a sub-scene file in the u3f format, and the second client can edit and modify the sub-scene file in the u3f format. The second client of the embodiment receiving the sub-scene file pushed by the server in the common format may also be a plurality of second clients.
The conversion module 420 is adapted to extract scene resources from the received sub-scene file through the engine editor, and convert the extracted scene resources into an engine internal format.
And the construction generation module 430 is adapted to construct a scene structure and generate a scene object based on the scene resources in the internal format of the engine and the scene tree in the sub-scene file.
The embodiment of the invention has the advantages that the synchronous universal format data among different clients can be compatible with all clients, the loading performance of the scene resources is ensured, the expansion and modification of the clients can be effectively supported, the scene resources are cooperatively edited by a plurality of first clients, the editing efficiency of the scene resources is improved, and the cooperative editing capability of the scene resources is also effectively improved by adopting the universal format data. Moreover, by synchronously pushing the sub-scene files edited by any client to other clients, the scene data is effectively synchronized among the clients in time, and the relevance among different clients is promoted.
In an optional embodiment of the present invention, the scene resources included in the sub-scene file adopt an extensible resource object storage structure; the resource object contains an object name and object content, wherein the object content comprises object attributes and reference relationships with other objects.
In an alternative embodiment of the present invention, the editing operation mode of the sub-scene file receiving at least the first client includes: and at least one editing operation of a defining operation, an rewriting operation and a reference relation setting operation of the resource object in the sub-scene file.
In an optional embodiment of the present invention, the converting module 420 is further adapted to extract scene resources from the received sub-scene file through the engine editor, and store the extracted scene resources into the newly generated sub-scene file; and converting the scene resources in the newly generated sub-scene file into an engine internal format.
In an optional embodiment of the present invention, the converting module 420 is further adapted to convert the scene resources in the newly generated sub-scene file into an engine internal format by using a parallelization tool; or a multithreading mode is adopted to convert the scene resources in the newly generated sub-scene file into an engine internal format.
In an optional embodiment of the present invention, the construction generating module 430 is further adapted to create a scene structure of the engine editor based on the scene resources in the engine internal format and the scene tree in the sub-scene file, and generate the scene object by using the scene resources in the engine internal format.
In an optional embodiment of the present invention, the construction generation module 430 is further adapted to restore the scene tree in the sub-scene file to the engine editor; each level node in a scene tree in the sub-scene file corresponds to a resource object; the engine editor creates a scene structure of the engine editor based on the scene resources and the scene tree of the internal format of the engine.
In an optional embodiment of the present invention, the sub-scene file is stored in the server in a text format or a two-level format, wherein the sub-scene file in the text format is stored according to a logical relationship of the scene; the scene data in the sub-scene file in the two-level system format comprises three data of a scene structure, a resource default value and a resource time information value, and the priority is the scene structure, the resource default value and the resource time information value from high to low in sequence.
Based on the same inventive concept, an embodiment of the present invention further provides a system for synchronizing scene data, and fig. 5 illustrates a schematic structural diagram of the system for synchronizing scene data according to an embodiment of the present invention. Referring to fig. 5, the scene data synchronization system includes a server and a plurality of clients (e.g., client 1, client 2, and client 3 in fig. 5), where the plurality of clients use a plurality of sub-scene files of the same scene in the server, and any of the clients may be a first client or a second client.
Any first client executes editing operation on the sub-scene files, converts the edited sub-scene files into sub-scene files in a specified general format and uploads the sub-scene files to the server, wherein the specified general format is a file format which is common to all clients.
The specified common format for this embodiment may be in the u3f format. The embodiment of the invention can adopt the client plug-in arranged for the first client to convert the edited sub-scene file into the appointed general format. Moreover, a plurality of sub-scene files can be edited by a plurality of first clients cooperatively, and one sub-scene file can be edited by one client, so that the editing efficiency of the sub-scene files can be improved.
And the server pushes the received sub-scene file in the specified general format edited by the first client to at least one second client.
The second client extracts scene resources from the received sub-scene files through the engine editor, converts the extracted scene resources into an engine internal format, constructs a scene structure based on the scene resources of the engine internal format and the scene trees in the sub-scene files, and generates scene objects.
The embodiment of the invention has the advantages that the synchronous universal format data among different clients can be compatible with all clients, the loading performance of the scene resources is ensured, the expansion and modification of the clients can be effectively supported, the scene resources are cooperatively edited by a plurality of first clients, the editing efficiency of the scene resources is improved, and the cooperative editing capability of the scene resources is also effectively improved by adopting the universal format data. Moreover, by synchronously pushing the sub-scene files edited by any client to other clients, the scene data is effectively synchronized among the clients in time, and the relevance among different clients is promoted.
Based on the same inventive concept, embodiments of the present invention further provide a computer storage medium, where computer program codes are stored, and when the computer program codes are run on a computing device, the computing device is caused to execute the method for synchronizing scene data according to any of the above embodiments.
Based on the same inventive concept, an embodiment of the present invention further provides a computing device, including: a processor; a memory storing computer program code; the computer program code, when executed by the processor, causes the computing device to perform the method of synchronization of scene data of any of the embodiments above.
It is clear to those skilled in the art that the specific working processes of the above-described systems, devices, modules and units may refer to the corresponding processes in the foregoing method embodiments, and for the sake of brevity, further description is omitted here.
In addition, the functional units in the embodiments of the present invention may be physically independent of each other, two or more functional units may be integrated together, or all the functional units may be integrated in one processing unit. The integrated functional units may be implemented in the form of hardware, or in the form of software or firmware.
Those of ordinary skill in the art will understand that: the integrated functional units, if implemented in software and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computing device (e.g., a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention when the instructions are executed. And the aforementioned storage medium includes: u disk, removable hard disk, Read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disk, and other various media capable of storing program code.
Alternatively, all or part of the steps of implementing the foregoing method embodiments may be implemented by hardware (such as a computing device, e.g., a personal computer, a server, or a network device) associated with program instructions, which may be stored in a computer-readable storage medium, and when the program instructions are executed by a processor of the computing device, the computing device executes all or part of the steps of the method according to the embodiments of the present invention.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments can be modified or some or all of the technical features can be equivalently replaced within the spirit and principle of the present invention; such modifications or substitutions do not depart from the scope of the present invention.

Claims (12)

1. A scene data synchronization method is characterized in that a plurality of clients use a plurality of sub-scene files of the same scene in a server, any client can be a first client or a second client, and the method comprises the following steps:
the second client receives a sub-scene file which is sent by the server and edited by at least one first client and has a specified general format, wherein the specified general format is a file format which is general for each client;
extracting scene resources from the received sub-scene files through an engine editor, and converting the extracted scene resources into an engine internal format;
and constructing a scene structure and generating a scene object based on the scene resources in the internal format of the engine and the scene tree in the sub-scene file.
2. The method of claim 1,
scene resources contained in the sub-scene file adopt an extensible resource object storage structure;
the resource object comprises an object name and object content, wherein the object content comprises object attributes and reference relations with other objects.
3. The method of claim 2, wherein receiving the editing operation mode of the at least first client from the sub-scene file comprises: and at least one of a defining operation, an rewriting operation and a reference relation setting operation of the resource objects in the sub-scene file is edited.
4. The method of claim 1, wherein extracting scene resources from the received sub-scene file through an engine editor, and converting the extracted scene resources into an engine internal format comprises:
extracting scene resources from the received sub-scene files through an engine editor, and storing the extracted scene resources into the newly generated sub-scene files;
and converting the scene resources in the newly generated sub-scene file into an engine internal format.
5. The method of claim 4, wherein converting the scene resources in the newly generated sub-scene file to an engine internal format comprises:
adopting a parallelization tool to convert scene resources in the newly generated sub-scene file into an engine internal format; or
And converting the scene resources in the newly generated sub-scene file into an engine internal format by adopting a multithreading mode.
6. The method of claim 1, wherein constructing a scene structure and generating scene objects based on the scene resources in the engine internal format and a scene tree in a sub-scene file comprises:
and creating a scene structure of the engine editor based on the scene resources in the engine internal format and the scene tree in the sub-scene file, and generating a scene object by using the scene resources in the engine internal format.
7. The method of claim 2, wherein creating a scene structure of an engine editor based on scene resources in the engine internal format and a scene tree in a sub-scene file comprises:
restoring the scene tree in the sub-scene file into an engine editor; wherein each level node in the scene tree in the sub-scene file corresponds to a resource object;
the engine editor creates a scene structure of the engine editor based on the scene resources of the engine internal format and the scene tree.
8. The method of claim 1,
the sub-scene file is saved in the server in a text format or a two-level format, wherein,
the sub-scene files in the text format are stored according to the logical relationship of the scenes;
the scene data in the sub-scene file with the two-level system format comprises three data of a scene structure, a resource default value and a resource time information value, and the priority is the scene structure, the resource default value and the resource time information value from high to low in sequence.
9. A scene data synchronization device is characterized in that a plurality of clients use a plurality of sub-scene files of the same scene in a server, any client can be a first client or a second client, and the device is applied to the second client and comprises the following steps:
the receiving module is suitable for receiving a sub-scene file which is sent by a server and edited by at least one first client and has a specified general format, wherein the specified general format is a file format which is general for each client;
the conversion module is suitable for extracting scene resources from the received sub-scene files through the engine editor and converting the extracted scene resources into an engine internal format;
and the construction generation module is suitable for constructing a scene structure and generating a scene object based on the scene resources in the internal format of the engine and the scene tree in the sub-scene file.
10. A system for synchronizing scene data, comprising: a server and a plurality of clients, the plurality of clients using a plurality of sub-scene files of the same scene in the server, any of the clients may be a first client or a second client, wherein,
any first client executes editing operation on the sub-scene files, converts the edited sub-scene files into sub-scene files in a specified general format and uploads the sub-scene files to the server, wherein the specified general format is a file format which is common to all the clients;
the server pushes the received sub-scene file in the specified general format edited by the first client to at least one second client;
the second client extracts scene resources from the received sub-scene files through the engine editor, converts the extracted scene resources into an engine internal format, and constructs a scene structure and generates a scene object based on the scene resources of the engine internal format and the scene tree in the sub-scene files.
11. A computer storage medium storing computer program code which, when run on a computing device, causes the computing device to perform a method of synchronization of scene data as claimed in any of claims 1-8.
12. A computing device, comprising: a processor; a memory storing computer program code; the computer program code, when executed by the processor, causes the computing device to perform the method of synchronization of scene data of any of claims 1-8.
CN202110024555.XA 2021-01-08 2021-01-08 Scene data synchronization method, device, system and storage medium Pending CN112704872A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110024555.XA CN112704872A (en) 2021-01-08 2021-01-08 Scene data synchronization method, device, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110024555.XA CN112704872A (en) 2021-01-08 2021-01-08 Scene data synchronization method, device, system and storage medium

Publications (1)

Publication Number Publication Date
CN112704872A true CN112704872A (en) 2021-04-27

Family

ID=75548612

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110024555.XA Pending CN112704872A (en) 2021-01-08 2021-01-08 Scene data synchronization method, device, system and storage medium

Country Status (1)

Country Link
CN (1) CN112704872A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113470092A (en) * 2021-06-30 2021-10-01 完美世界(北京)软件科技发展有限公司 Terrain rendering method and device, electronic equipment and storage medium
CN115170707A (en) * 2022-07-11 2022-10-11 上海哔哩哔哩科技有限公司 3D image implementation system and method based on application program framework

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101067827A (en) * 2007-06-14 2007-11-07 上海创图网络科技发展有限公司 Three-dimensional web page realizing method based on browser
CN103973791A (en) * 2014-05-08 2014-08-06 江苏物联网研究发展中心 Rapid uniform storage system of internet of things
CN107820610A (en) * 2016-12-14 2018-03-20 深圳中兴力维技术有限公司 A kind of implementation method and its device of Multi-stage electronic map
CN109710357A (en) * 2018-12-24 2019-05-03 曙光信息产业(北京)有限公司 A kind of method and system based on Unity3D engine implementation server operation
CN109947549A (en) * 2019-03-15 2019-06-28 佛山市小云科技有限公司 A method of it is automatically the directly available model resource of UE4 by 3D Max model conversion
US10430921B1 (en) * 2019-02-19 2019-10-01 Umajin Inc. Multi-user application system environment engine
CN110705219A (en) * 2019-10-21 2020-01-17 网易(杭州)网络有限公司 Game data processing method and device, storage medium and electronic equipment
CN111324381A (en) * 2020-02-17 2020-06-23 腾讯科技(深圳)有限公司 Development system, development method, development apparatus, computer device, and storage medium
CN111475477A (en) * 2019-01-23 2020-07-31 北京二六三企业通信有限公司 File format conversion method, client and format conversion server
CN111931466A (en) * 2020-10-12 2020-11-13 北京联想协同科技有限公司 Document processing method and device
CN112074872A (en) * 2018-05-04 2020-12-11 微软技术许可有限责任公司 Generating and providing platform-independent scene files in an intermediate format

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101067827A (en) * 2007-06-14 2007-11-07 上海创图网络科技发展有限公司 Three-dimensional web page realizing method based on browser
CN103973791A (en) * 2014-05-08 2014-08-06 江苏物联网研究发展中心 Rapid uniform storage system of internet of things
CN107820610A (en) * 2016-12-14 2018-03-20 深圳中兴力维技术有限公司 A kind of implementation method and its device of Multi-stage electronic map
CN112074872A (en) * 2018-05-04 2020-12-11 微软技术许可有限责任公司 Generating and providing platform-independent scene files in an intermediate format
CN109710357A (en) * 2018-12-24 2019-05-03 曙光信息产业(北京)有限公司 A kind of method and system based on Unity3D engine implementation server operation
CN111475477A (en) * 2019-01-23 2020-07-31 北京二六三企业通信有限公司 File format conversion method, client and format conversion server
US10430921B1 (en) * 2019-02-19 2019-10-01 Umajin Inc. Multi-user application system environment engine
CN109947549A (en) * 2019-03-15 2019-06-28 佛山市小云科技有限公司 A method of it is automatically the directly available model resource of UE4 by 3D Max model conversion
CN110705219A (en) * 2019-10-21 2020-01-17 网易(杭州)网络有限公司 Game data processing method and device, storage medium and electronic equipment
CN111324381A (en) * 2020-02-17 2020-06-23 腾讯科技(深圳)有限公司 Development system, development method, development apparatus, computer device, and storage medium
CN111931466A (en) * 2020-10-12 2020-11-13 北京联想协同科技有限公司 Document processing method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113470092A (en) * 2021-06-30 2021-10-01 完美世界(北京)软件科技发展有限公司 Terrain rendering method and device, electronic equipment and storage medium
CN113470092B (en) * 2021-06-30 2022-05-10 完美世界(北京)软件科技发展有限公司 Terrain rendering method and device, electronic equipment and storage medium
CN115170707A (en) * 2022-07-11 2022-10-11 上海哔哩哔哩科技有限公司 3D image implementation system and method based on application program framework
CN115170707B (en) * 2022-07-11 2023-04-11 上海哔哩哔哩科技有限公司 3D image implementation system and method based on application program framework

Similar Documents

Publication Publication Date Title
US8612040B2 (en) Automated derivative view rendering system
CN108897567B (en) Method, device, equipment and storage medium for loading files by software based on Unity
JP2016505930A (en) System, method, and apparatus for collaborative CAX editing
CN112704872A (en) Scene data synchronization method, device, system and storage medium
CN108597032B (en) Method and system for importing building information model into Unity3D for display
WO2014130735A1 (en) System and methods for multi-user cax editing data consistency
KR102359485B1 (en) Animation Content Production System, Method and Computer program
US20170024447A1 (en) System, method, and apparatus for collaborative editing of common or related computer based software output
CN116340260A (en) Building model data rendering method and device, electronic equipment and readable storage medium
CN113094028A (en) Windows desktop program development framework, method and related components
CN104091367B (en) Three-dimensional scenic storage method and device based on OGRE
CN116414316B (en) Illusion engine rendering method based on BIM model in digital city
CN111857757B (en) Container cloud-based efficient deployment method for aerial image processing service
CN116756796A (en) BIM data light weight method and system
CN117077256A (en) Method for converting rvt format into b3d format, plug-in and system thereof
CN115904372A (en) Data processing method and device
CN113450463A (en) Preform converting method and apparatus
CN115409926A (en) Distributed rendering method
US11289125B1 (en) Digital conformation of media content
CN111599014B (en) Method, system and medium for rendering OBJ file analysis surface based on Unity3D
CN116168188B (en) Fusion method, system and equipment for large-range inclined three-dimensional data
CN111177431B (en) Microstation-based digital photo management method, device, processor and storage medium
CN115035265B (en) Sketchup scene-to-three-dimensional geospatial conversion method, terminal and storage medium
CN113730920B (en) Method and system for presetting component synchronization attribute
CN115512047A (en) Coordinate conversion method of multi-structure live-action three-dimensional model

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
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20210427

Assignee: Beijing Xuanguang Technology Co.,Ltd.

Assignor: Perfect world (Beijing) software technology development Co.,Ltd.

Contract record no.: X2022990000514

Denomination of invention: A method, device, system and storage medium for synchronizing scene data

License type: Exclusive License

Record date: 20220817

EE01 Entry into force of recordation of patent licensing contract