CN108876925B - Virtual reality scene processing method and device - Google Patents

Virtual reality scene processing method and device Download PDF

Info

Publication number
CN108876925B
CN108876925B CN201710320055.4A CN201710320055A CN108876925B CN 108876925 B CN108876925 B CN 108876925B CN 201710320055 A CN201710320055 A CN 201710320055A CN 108876925 B CN108876925 B CN 108876925B
Authority
CN
China
Prior art keywords
dimensional model
compressed file
file
compressed
model group
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.)
Active
Application number
CN201710320055.4A
Other languages
Chinese (zh)
Other versions
CN108876925A (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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710320055.4A priority Critical patent/CN108876925B/en
Publication of CN108876925A publication Critical patent/CN108876925A/en
Application granted granted Critical
Publication of CN108876925B publication Critical patent/CN108876925B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a virtual reality scene processing method and device. One embodiment of the method comprises: receiving a loading request for a target virtual reality scene, wherein the target virtual reality scene comprises a three-dimensional model group sequence, each three-dimensional model group in the three-dimensional model group sequence corresponds to a compressed file, and the compressed file corresponding to each three-dimensional model group in the three-dimensional model group sequence is generated by packaging and compressing the model files of each three-dimensional model included in the three-dimensional model group; acquiring a configuration file of the target virtual reality scene, wherein the configuration file comprises Uniform Resource Locators (URLs) of all compressed files; and according to the sequence of each three-dimensional model group in the three-dimensional model group sequence, based on the URL, executing the downloading and rendering operation aiming at each compressed file in parallel. The embodiment improves the processing efficiency of the virtual reality scene.

Description

Virtual reality scene processing method and device
Technical Field
The application relates to the technical field of computers, in particular to the technical field of internet, and particularly relates to a virtual reality scene processing method and device.
Background
VR (Virtual Reality) technology is a computer simulation system that can create and experience Virtual worlds, which uses computers to create a simulated environment, which is a systematic simulation of multi-source information-fused, interactive three-dimensional dynamic views and physical behaviors to immerse users in the environment.
A VR scene created by a VR technology generally includes a plurality of three-dimensional models (a three-dimensional model is a polygonal representation of an object and is generally displayed by a computer or other video devices, and a displayed object may be an entity in the real world or may be an imaginary object). However, if the VR scene is updated, the model file pre-stored in the storage medium needs to be updated, and after the update is completed, the updated model file is loaded and rendered. The loading and rendering of three-dimensional models by the above methods is generally inefficient, easily increasing the time cost for the user.
Disclosure of Invention
The present application aims to provide an improved virtual reality scene processing method and apparatus to solve the technical problems mentioned in the above background.
In a first aspect, an embodiment of the present application provides a method for processing a virtual reality scene, where the method includes: receiving a loading request for a target virtual reality scene, wherein the target virtual reality scene comprises a three-dimensional model group sequence, each three-dimensional model group in the three-dimensional model group sequence corresponds to a compressed file, and the compressed file corresponding to each three-dimensional model group in the three-dimensional model group sequence is generated by packaging and compressing the model files of each three-dimensional model included in the three-dimensional model group; acquiring a configuration file of the target virtual reality scene, wherein the configuration file comprises a Uniform Resource Locator (URL) of each compressed file; and according to the sequence of each three-dimensional model group in the three-dimensional model group sequence, based on the URL, parallelly executing the downloading and rendering operation aiming at each compressed file.
In some embodiments, the performing, in parallel, the downloading and rendering operations for each of the compressed files based on the URL includes: and for each compressed file in the compressed files, downloading the compressed file according to the URL of the compressed file, and when the compressed file is downloaded, if the rendering operation aiming at each compressed file is not currently executed, rendering each model file included in the compressed file and downloading a first target compressed file, wherein the first target compressed file is the compressed file which is downloaded in sequence from each compressed file.
In some embodiments, the performing, in parallel, the downloading and rendering operations for each of the compressed files based on the URL includes: and when the downloading of the compressed file is finished, if the currently executed rendering operation aiming at each compressed file exists, downloading the first target compressed file.
In some embodiments, the performing, in parallel, the downloading and rendering operations for each of the compressed files based on the URL includes: and rendering a second target compressed file when rendering of each model file included in the compressed file is completed, wherein the second target compressed file is a compressed file which is downloaded in the compressed files, downloaded in sequence and is not rendered, and the compressed files are downloaded.
In some embodiments, the three-dimensional model group sequence is generated by performing three-dimensional model group division based on the number of vertices or the number of faces of each three-dimensional model included in the target virtual reality scene, the configuration file is created after the three-dimensional model group sequence is generated, and the configuration file further includes at least one of the following compressed files: file name, hash value, name of three-dimensional model indicated by each included model file.
In a second aspect, the present application provides a virtual reality scene processing apparatus, including: a receiving unit, configured to receive a loading request for a target virtual reality scene, where the target virtual reality scene includes a three-dimensional model group sequence, each three-dimensional model group in the three-dimensional model group sequence corresponds to a compressed file, and the compressed file corresponding to each three-dimensional model group in the three-dimensional model group sequence is generated by packing and compressing the model files of each three-dimensional model included in the three-dimensional model group; an obtaining unit, configured to obtain a configuration file of the target virtual reality scene, where the configuration file includes a uniform resource locator URL of each of the compressed files; and the processing unit is configured to execute the downloading and rendering operation aiming at each compressed file in parallel based on the URL according to the sequence of each three-dimensional model group in the three-dimensional model group sequence.
In some embodiments, the processing unit is further configured to: and for each compressed file in the compressed files, downloading the compressed file according to the URL of the compressed file, and when the compressed file is downloaded, if the rendering operation aiming at each compressed file is not currently executed, rendering each model file included in the compressed file and downloading a first target compressed file, wherein the first target compressed file is the compressed file which is downloaded in sequence from each compressed file.
In some embodiments, the processing unit is further configured to: and when the downloading of the compressed file is finished, if the currently executed rendering operation aiming at each compressed file exists, downloading the first target compressed file.
In some embodiments, the processing unit is further configured to: and rendering a second target compressed file when rendering of each model file included in the compressed file is completed, wherein the second target compressed file is a compressed file which is downloaded in the compressed files, downloaded in sequence and is not rendered, and the compressed files are downloaded.
In some embodiments, the three-dimensional model group sequence is generated by performing three-dimensional model group division based on the number of vertices or the number of faces of each three-dimensional model included in the target virtual reality scene, the configuration file is created after the three-dimensional model group sequence is generated, and the configuration file further includes at least one of the following compressed files: file name, hash value, name of three-dimensional model indicated by each included model file.
In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; storage means for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method as described in any implementation manner of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method as described in any implementation manner of the first aspect.
According to the virtual reality scene processing method and device provided by the embodiment of the application, when a loading request for a target virtual reality scene is received, a configuration file of the target virtual reality scene is obtained so as to obtain a Uniform Resource Locator (URL) of a compressed file corresponding to each three-dimensional model group in a three-dimensional model group sequence included in the target virtual reality scene, and then downloading and rendering operations of each compressed file are executed in parallel based on the URL according to the sequence of each three-dimensional model group in the three-dimensional model group sequence. Therefore, the acquisition of the configuration file of the target virtual reality scene is effectively utilized so as to obtain the URL of the latest compressed file, the downloading and rendering can be realized at the same time by executing the downloading and rendering operation of each compressed file in parallel, the total time for downloading and rendering each compressed file is shortened, the time cost of a user is further reduced, and the processing efficiency of the virtual reality scene is greatly improved.
Moreover, by a remote loading mode (namely downloading the compressed file based on the URL of the compressed file), the target virtual reality scene can be quickly loaded whether the target virtual reality scene is updated or not.
Compared with the prior art, for the same compressed files such as the compressed files B1 and B2, assuming that the time taken for downloading the compressed files B1 and B2 is td1 and td2, and the time taken for rendering the compressed files B1 and B2 is tr1 and tr2, when td2 is less than tr1, the total time taken for downloading and rendering the compressed files B1 and B2 by using the virtual reality scene processing method and device provided by the embodiment of the application can be td1+ tr1+ tr2, so that the time td2 is saved. When td2 is greater than tr1, the total time taken for downloading and rendering the compressed files B1 and B2 by using the virtual reality scene processing method and device provided by the embodiment of the application can be td1+ td2+ tr2, so that the time tr1 is saved. And the total time taken to download and render the compressed files B1, B2 using the prior art is typically td1+ td2+ tr1+ tr 2. Therefore, compared with the prior art, the virtual reality scene processing method and the virtual reality scene processing device provided by the embodiment of the application save a large amount of time due to the parallel downloading and rendering.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a virtual reality scene processing method according to the present application;
FIG. 3 is a schematic diagram of an application scenario of a virtual reality scenario processing method according to the application;
FIG. 4 is a schematic diagram of a virtual reality scene processing apparatus according to an embodiment of the present application;
FIG. 5 is a schematic block diagram of a computer system suitable for use in implementing an electronic device according to embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 shows an exemplary system architecture 100 to which embodiments of the virtual reality scene processing method or virtual reality scene processing apparatus of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include virtual reality devices 101, 102, a network 103, and a server 104. The network 103 is used to provide a medium for communication links between the virtual reality devices 101, 102 and the server 104. Network 103 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may interact with the server 104 over the network 103 using the virtual reality devices 101, 102 to receive or send messages or the like.
The virtual reality devices 101, 102 may be various types of virtual reality devices including, but not limited to, mobile handset-based experience-type head-up devices (Cardboard, etc.), personal computer-based host computing advanced head-up devices (Vive, Oculus, etc.), integrated virtual reality devices, and so forth. The virtual reality devices 101, 102 may have installed thereon various client applications for rendering the virtual reality scene.
The server 104 may be a server providing various services, such as a background server providing support for the virtual reality devices 101 and 102, and the background server may store a configuration file of a virtual reality scene that can be presented by the virtual reality devices 101 and 102, a model file of each three-dimensional model included in the virtual reality scene, and the like.
It should be noted that the virtual reality scene processing method provided in the embodiment of the present application is generally executed by the virtual reality devices 101 and 102, and accordingly, the virtual reality scene processing apparatus is generally disposed in the virtual reality devices 101 and 102.
It should be understood that the number of virtual reality devices, networks, servers in fig. 1 is merely illustrative. There may be any number of virtual reality devices, networks, servers, as desired for implementation.
With continued reference to fig. 2, a flow 200 of one embodiment of a virtual reality scene processing method according to the present application is shown. The virtual reality scene processing method comprises the following steps:
step 201, a loading request for a target virtual reality scene is received.
In this embodiment, the electronic device (e.g., the virtual reality devices 101 and 102 shown in fig. 1) on which the virtual reality scene processing method operates may receive a load request for the target virtual reality scene from the local. The target virtual reality scene may include a three-dimensional model group sequence, and each three-dimensional model group in the three-dimensional model group sequence corresponds to a compressed file. The compressed file corresponding to each three-dimensional model group in the sequence of three-dimensional model groups may be generated by packing and compressing model files of respective three-dimensional models included in the three-dimensional model group. The target virtual reality scenario may be, for example, a virtual travel scenario, a virtual shopping scenario, or the like. The three-dimensional models included in the three-dimensional model group in the sequence of three-dimensional model groups may be three-dimensional models corresponding to various buildings, people, vegetation, machinery, animals, mountains, rivers, landscapes and the like which may be involved in the target virtual reality scene.
Step 202, obtaining a configuration file of the target virtual reality scene.
In this embodiment, after receiving the loading request, the electronic device may obtain the configuration file of the target virtual reality scene from a server (e.g., the server 104 shown in fig. 1) in a wired connection manner or a wireless connection manner. The configuration file may include URLs of compressed files corresponding to the three-dimensional model groups in the sequence of three-dimensional model groups.
In some optional implementation manners of this embodiment, the electronic device may be preset with an interface for acquiring the configuration file, and the electronic device may acquire the configuration file through the interface.
And step 203, according to the sequence of each three-dimensional model group in the three-dimensional model group sequence, based on the URL of the compressed file, executing the downloading and rendering operation of the compressed file corresponding to each three-dimensional model group in the three-dimensional model group sequence in parallel.
In this embodiment, the electronic device may perform, in parallel, downloading and rendering operations for compressed files respectively corresponding to each three-dimensional model group in the three-dimensional model group sequence based on URLs of the compressed files included in the configuration file according to the sequence of each three-dimensional model group in the three-dimensional model group sequence. For example, the electronic device may be pre-configured with a thread for downloading a compressed file and a thread for rendering the compressed file, which have software and hardware resources. The electronic device may invoke the thread for downloading the compressed files to perform asynchronous downloading operations on the compressed files based on the URLs of the compressed files. And if the downloaded compressed file exists in the downloading process, calling the thread for rendering the compressed file to perform rendering operation on the downloaded compressed file. Thus, the download and rendering are performed simultaneously, and the total time for downloading and rendering each compressed file can be greatly shortened. It should be noted that the electronic device may download each compressed file into the memory of the electronic device. For each of the compressed files, the electronic device may decompress the compressed file before performing a rendering operation on the compressed file.
It should be noted that rendering in Computer Graphics (CG) generally refers to a process of generating an image from a model by software. A model is a description of a three-dimensional object in a well-defined language or data structure, which includes geometric, viewpoint, texture, and lighting information. The electronic device may be provided with a renderer in advance, and the electronic device may render the model file included in each of the compressed files through the renderer. The renderer can be constructed based on an Application Programming Interface (API), and is rendered by a rasterization method suitable for a hardware architecture. The Graphics API may be, for example, OpenGL (Open Graphics Library), which refers to a specialized Graphics program interface that defines a cross-programming language, cross-platform programming interface specification. The method is used for three-dimensional images (two-dimensional images can also be used), and is a bottom layer graphic library which is powerful and convenient to call.
In some optional implementation manners of this embodiment, for each of the compressed files, the electronic device may download the compressed file according to the URL of the compressed file, and when the downloading of the compressed file is completed, if there is no rendering operation currently being performed on each compressed file, the electronic device may render each model file included in the compressed file and download a first target compressed file, where the first target compressed file is a compressed file of each compressed file that is downloaded sequentially (e.g., only sequentially) next to the compressed file. As an example, the three-dimensional model groups included in the three-dimensional model group sequence are a1, a2, and A3 in this order, and the compressed files corresponding to the three-dimensional model groups a1, a2, and A3 are B1, B2, and B3, respectively. The electronic device may first download the compressed file B1 according to the URL of the compressed file B1, when the download of the compressed file B1 is completed, the electronic device may determine that no rendering operation is currently performed on the compressed files B1, B2, and B3, and the electronic device may render each model file in the compressed file B1 and download a first target compressed file (for example, the compressed file B2 whose download order is next to the compressed file B1).
In some optional implementation manners of this embodiment, for each of the compressed files, when the downloading of the compressed file is completed, if there is a rendering operation currently being performed on each of the compressed files, the first target compressed file is downloaded. As an example, the three-dimensional model groups included in the three-dimensional model group sequence are a1, a2, and A3 in sequence, the compressed files corresponding to the three-dimensional model groups a1, a2, and A3 are B1, B2, and B3, and for the compressed file B2, when the downloading of the compressed file B2 is completed, if the rendering operation on the model files in the compressed file B1 is still performed currently, the electronic device may then download a first target compressed file (for example, the compressed file B3 whose downloading sequence is next to the compressed file B2).
In some optional implementation manners of this embodiment, for each of the compressed files, when rendering of each model file included in the compressed file is completed, the electronic device may render the second target compressed file. The second target compressed file is a compressed file that has been downloaded, is next to (e.g., next to) the compressed file in the downloading order, and is not rendered, among the compressed files. As an example, the three-dimensional model groups included in the three-dimensional model group sequence are a1, a2, and A3, and the compressed files corresponding to the three-dimensional model groups a1, a2, and A3 are B1, B2, and B3, and assuming that the compressed file B2 is downloaded in the process of rendering each model file included in the compressed file B1, when the rendering of the compressed file B1 is completed, the electronic device may render the compressed file B2.
In some optional implementation manners of this embodiment, when receiving the loading request, the electronic device may present an empty scene to a user, and for each of the compressed files, when rendering of each model file in the compressed file is completed, the electronic device may present, in the empty scene, each three-dimensional model in the three-dimensional model group corresponding to the compressed file. Or when the rendered model file exists in the compressed file, the electronic device may present a three-dimensional model corresponding to the rendered model file in the empty scene.
In some optional implementations of this embodiment, the three-dimensional model group sequence may be generated by performing three-dimensional model group division based on a number of vertices or a number of faces of each three-dimensional model included in the target virtual reality scene, the configuration file may be created after the three-dimensional model group sequence is generated, and the configuration file may further include at least one of the following compressed files: file name, hash value, name of three-dimensional model indicated by each included model file.
In some optional implementations of this embodiment, the three-dimensional model group sequence and the configuration file may be generated by a development end in remote communication connection with the server end. The development end may locally store a vertex range set or a face set in advance. If the development end stores the vertex range set in advance, after the target virtual reality scene is created, for each vertex range in the vertex range set, the electronic device may classify three-dimensional models, in which the number of vertices in each three-dimensional model included in the target virtual reality scene is within the vertex range, into the same three-dimensional model group. The development end can combine the obtained three-dimensional model groups into a three-dimensional model group sequence. As an example, the set of vertex number ranges described above may include the vertex number ranges "< 5000", "[ 5000, 20000)", "≧ 20000", where [5000, 20000) denotes that the endpoint 5000 is included but the endpoint 20000 is not included. The objects corresponding to the three-dimensional models in the target virtual reality scene are walls, ceilings, floors, exhibition stands, wallpaper, lamp decorations, mobile phones, computers and cameras. Assuming that the number of vertices of the three-dimensional models respectively corresponding to the wall surface, the ceiling and the floor of the object is less than 5000, the number of vertices of the three-dimensional models respectively corresponding to the exhibition stand, the wallpaper and the lighting is between [5000, 20000), and the number of vertices of the three-dimensional models respectively corresponding to the mobile phone, the computer and the camera of the object is greater than 20000, the development end can classify the three-dimensional models respectively corresponding to the wall surface, the ceiling and the floor of the object into the same three-dimensional model group, such as the three-dimensional model group a. The development end can classify three-dimensional models respectively corresponding to the object exhibition stand, the wallpaper and the lamp decoration into the same three-dimensional model group, such as a three-dimensional model group B. The development end can classify three-dimensional models respectively corresponding to the mobile phone, the computer and the camera into the same three-dimensional model group, such as the three-dimensional model group C. The development end may form the three-dimensional model group A, B, C into a three-dimensional model group sequence P, and each three-dimensional model group included in the three-dimensional model group sequence P may be a three-dimensional model group a, a three-dimensional model group B, and a three-dimensional model group C in sequence.
Here, when the development side stores the set of surface number ranges in advance, the development side may classify three-dimensional models, each of which has a surface number within the surface number range, among three-dimensional models included in the target virtual reality scene into the same three-dimensional model group for each surface number range in the set of surface number ranges, and may group the obtained three-dimensional models into a three-dimensional model group sequence.
It should be noted that, after the development end generates the three-dimensional model group sequence, for each three-dimensional model group in the three-dimensional model group sequence, the development end may pack and compress the model files of each three-dimensional model included in the three-dimensional model group to generate a compressed file corresponding to the three-dimensional model group. For example, for the three-dimensional model group a in which the three-dimensional models respectively corresponding to the wall surface, the ceiling, and the floor of the object are located, the compressed file corresponding to the three-dimensional model group a may be named as "layers. The development end may upload each generated compressed file to the server. The development end may further create a configuration file for the target virtual reality scene, and write a file name, a hash value, a URL of each generated compressed file, a name of a three-dimensional model indicated by each included model file, and the like into the configuration file. The development end may also set a version number, e.g., 1.0, for the configuration file. When the target virtual reality scene is updated, the development end may further update the three-dimensional model group sequence included in the target virtual reality scene and the compressed file corresponding to the three-dimensional model group in the three-dimensional model group sequence, and may further write update information (for example, a file name, a hash value, a version number, a URL, and the like of the updated compressed file) into the configuration file.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the virtual reality scenario processing method according to the present embodiment. In the application scenario of fig. 3, as indicated by reference numeral 301, a user may perform a preset operation on a virtual reality device to trigger a load request on a target virtual reality scenario, where the target virtual reality scenario may include a sequence P of three-dimensional model groups, each three-dimensional model group included in the sequence P of three-dimensional model groups is sequentially a three-dimensional model group a1, a2, A3, and a compressed file corresponding to each three-dimensional model group a1, a2, A3 is B1, B2, B3. As indicated by reference numeral 302, the virtual reality device may receive the loading request and obtain a configuration file of the target virtual reality scene, wherein the configuration file includes URLs of the compressed files B1, B2, and B3. Then, as shown by reference numeral 303, the virtual reality device may perform downloading and rendering operations for the compressed files B1, B2, and B3 in parallel based on the URLs of the compressed files B1, B2, and B3 in the order of the three-dimensional model groups a1, a2, and A3.
The method provided by the embodiment of the application effectively utilizes the acquisition of the configuration file of the target virtual reality scene so as to obtain the URL of the latest compressed file, and the downloading and rendering operations of the compressed files are executed in parallel, so that the downloading and the rendering can be realized at the same time, the total time for downloading and rendering the compressed files is shortened, the time cost of a user is further reduced, and the processing efficiency of the virtual reality scene is greatly improved.
With further reference to fig. 4, as an implementation of the method shown in the above-mentioned figures, the present application provides an embodiment of a virtual reality scene processing apparatus, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 4, the virtual reality scene processing apparatus 400 according to the present embodiment includes: a receiving unit 401, an obtaining unit 402 and a processing unit 403. The receiving unit 401 is configured to receive a loading request for a target virtual reality scene, where the target virtual reality scene includes a three-dimensional model group sequence, each three-dimensional model group in the three-dimensional model group sequence corresponds to a compressed file, and the compressed file corresponding to each three-dimensional model group in the three-dimensional model group sequence is generated by packing and compressing the model files of each three-dimensional model included in the three-dimensional model group; the obtaining unit 402 is configured to obtain a configuration file of the target virtual reality scene, where the configuration file includes a uniform resource locator URL of each of the compressed files; and the processing unit 403 is configured to execute, in parallel, downloading and rendering operations for each of the compressed files based on the URLs according to the sequence of each of the three-dimensional model groups in the three-dimensional model group sequence.
In the present embodiment, in the virtual reality scene processing apparatus 400: the specific processing of the receiving unit 401, the obtaining unit 402, and the processing unit 403 and the technical effects thereof can refer to the related descriptions of step 201, step 202, and step 203 in the corresponding embodiment of fig. 2, which are not described herein again.
In some optional implementations of this embodiment, the processing unit 403 may be further configured to: and for each compressed file in the compressed files, downloading the compressed file according to the URL of the compressed file, and when the compressed file is downloaded, if the rendering operation aiming at each compressed file is not currently executed, rendering each model file included in the compressed file and downloading a first target compressed file, wherein the first target compressed file is the compressed file which is downloaded in sequence from each compressed file.
In some optional implementations of this embodiment, the processing unit 403 may be further configured to: and when the downloading of the compressed file is finished, if the currently executed rendering operation aiming at each compressed file exists, downloading the first target compressed file.
In some optional implementations of this embodiment, the processing unit 403 may be further configured to: and rendering a second target compressed file when rendering of each model file included in the compressed file is completed, wherein the second target compressed file is a compressed file which is downloaded in the compressed files, downloaded in sequence and is not rendered, and the compressed files are downloaded.
In some optional implementations of this embodiment, the three-dimensional model group sequence is generated by performing three-dimensional model group division based on a number of vertices or a number of faces of each three-dimensional model included in the target virtual reality scene, the configuration file is created after the three-dimensional model group sequence is generated, and the configuration file further includes at least one of the following compressed files: file name, hash value, name of three-dimensional model indicated by each included model file.
The device provided by the embodiment of the application effectively utilizes the acquisition of the configuration file of the target virtual reality scene, so as to obtain the URL of the latest compressed file, and the downloading and rendering operations of the compressed files can be executed in parallel, so that the downloading and the rendering can be realized at the same time, the total time for downloading and rendering the compressed files is shortened, the time cost of a user is further reduced, and the processing efficiency of the virtual reality scene is greatly improved.
Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use in implementing the electronic device of an embodiment of the present application. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input section 506 including a three-dimensional mouse, a motion capture device, an eye tracker, a force feedback device, and the like; an output portion 507 including, for example, a three-dimensional sound system as well as stereo sound in unconventional terms, a 3D presentation system, a large projection system (e.g., CAVE), a head-mounted display (e.g., head-mounted stereoscopic display, etc.), and the like; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the method of the present application when executed by the Central Processing Unit (CPU) 501. It should be noted that the computer readable medium mentioned above in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a receiving unit, an obtaining unit, and a processing unit. Where the names of the units do not in some cases constitute a limitation of the units themselves, for example, a receiving unit may also be described as a "unit that receives a load request for a target virtual reality scene".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a loading request for a target virtual reality scene, wherein the target virtual reality scene comprises a three-dimensional model group sequence, each three-dimensional model group in the three-dimensional model group sequence corresponds to a compressed file, and the compressed file corresponding to each three-dimensional model group in the three-dimensional model group sequence is generated by packaging and compressing the model files of each three-dimensional model included in the three-dimensional model group; acquiring a configuration file of the target virtual reality scene, wherein the configuration file comprises a Uniform Resource Locator (URL) of each compressed file; and according to the sequence of each three-dimensional model group in the three-dimensional model group sequence, based on the URL, parallelly executing the downloading and rendering operation aiming at each compressed file.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (12)

1. A virtual reality scene processing method is characterized by comprising the following steps:
receiving a loading request for a target virtual reality scene, wherein the target virtual reality scene comprises a three-dimensional model group sequence, each three-dimensional model group in the three-dimensional model group sequence corresponds to a compressed file, and the compressed file corresponding to each three-dimensional model group in the three-dimensional model group sequence is generated by packaging and compressing the model files of each three-dimensional model included in the three-dimensional model group;
acquiring a configuration file of the target virtual reality scene, wherein the configuration file comprises a Uniform Resource Locator (URL) of each compressed file;
and according to the sequence of each three-dimensional model group in the three-dimensional model group sequence, based on the URL, parallelly executing the downloading and rendering operation aiming at each compressed file.
2. The method of claim 1, wherein the performing, in parallel, the downloading and rendering operations for each of the compressed files based on the URL comprises:
and for each compressed file in the compressed files, downloading the compressed file according to the URL of the compressed file, and when the compressed file is downloaded, if the rendering operation aiming at each compressed file is not currently executed, rendering each model file included in the compressed file and downloading a first target compressed file, wherein the first target compressed file is the compressed file in the compressed files, and the downloading sequence of the first target compressed file is next to that of the compressed file.
3. The method of claim 2, wherein the performing, in parallel, the downloading and rendering operations for each of the compressed files based on the URL comprises:
and when the compressed file is downloaded, if the currently executed rendering operation aiming at each compressed file exists, downloading the first target compressed file.
4. The method of claim 2, wherein the performing, in parallel, the downloading and rendering operations for each of the compressed files based on the URL comprises:
and when the rendering of each model file included in the compressed file is completed, rendering a second target compressed file, wherein the second target compressed file is a compressed file which is downloaded in the compressed files, downloaded in sequence and is not rendered, and the compressed file is downloaded.
5. The method according to any one of claims 1 to 4, wherein the sequence of three-dimensional model groups is generated by three-dimensional model group division based on the number of vertices or faces of each three-dimensional model included in the target virtual reality scene, the configuration file is created after the sequence of three-dimensional model groups is generated, and the configuration file further includes at least one of the following compressed files: file name, hash value, name of three-dimensional model indicated by each included model file.
6. A virtual reality scene processing apparatus, the apparatus comprising:
the device comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is configured to receive a loading request for a target virtual reality scene, the target virtual reality scene comprises a three-dimensional model group sequence, each three-dimensional model group in the three-dimensional model group sequence corresponds to a compressed file, and the compressed file corresponding to each three-dimensional model group in the three-dimensional model group sequence is generated by packing and compressing the model files of each three-dimensional model included in the three-dimensional model group;
the acquisition unit is used for acquiring a configuration file of the target virtual reality scene, wherein the configuration file comprises a Uniform Resource Locator (URL) of each compressed file;
and the processing unit is configured to execute the downloading and rendering operation aiming at each compressed file in parallel based on the URL according to the sequence of each three-dimensional model group in the three-dimensional model group sequence.
7. The apparatus of claim 6, wherein the processing unit is further configured to:
and for each compressed file in the compressed files, downloading the compressed file according to the URL of the compressed file, and when the compressed file is downloaded, if the rendering operation aiming at each compressed file is not currently executed, rendering each model file included in the compressed file and downloading a first target compressed file, wherein the first target compressed file is the compressed file in the compressed files, and the downloading sequence of the first target compressed file is next to that of the compressed file.
8. The apparatus of claim 7, wherein the processing unit is further configured to:
and when the compressed file is downloaded, if the currently executed rendering operation aiming at each compressed file exists, downloading the first target compressed file.
9. The apparatus of claim 7, wherein the processing unit is further configured to:
and when the rendering of each model file included in the compressed file is completed, rendering a second target compressed file, wherein the second target compressed file is a compressed file which is downloaded in the compressed files, downloaded in sequence and is not rendered, and the compressed file is downloaded.
10. The apparatus according to any one of claims 6 to 9, wherein the sequence of three-dimensional model groups is generated by three-dimensional model group division based on the number of vertices or faces of each three-dimensional model included in the target virtual reality scene, the configuration file is created after the sequence of three-dimensional model groups is generated, and the configuration file further includes at least one of the following compressed files: file name, hash value, name of three-dimensional model indicated by each included model file.
11. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN201710320055.4A 2017-05-09 2017-05-09 Virtual reality scene processing method and device Active CN108876925B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710320055.4A CN108876925B (en) 2017-05-09 2017-05-09 Virtual reality scene processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710320055.4A CN108876925B (en) 2017-05-09 2017-05-09 Virtual reality scene processing method and device

Publications (2)

Publication Number Publication Date
CN108876925A CN108876925A (en) 2018-11-23
CN108876925B true CN108876925B (en) 2022-03-04

Family

ID=64287863

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710320055.4A Active CN108876925B (en) 2017-05-09 2017-05-09 Virtual reality scene processing method and device

Country Status (1)

Country Link
CN (1) CN108876925B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111598976B (en) 2019-02-01 2023-08-22 华为技术有限公司 Scene recognition method and device, terminal and storage medium
CN116013130B (en) * 2023-01-19 2024-01-30 扬州浩海蓝生海洋装备有限公司 VR simulation-based deep sea Christmas tree operation method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103021023A (en) * 2012-12-05 2013-04-03 上海创图网络科技发展有限公司 Three-dimensional scene construction method based on browser
CN103631565A (en) * 2013-11-13 2014-03-12 北京像素软件科技股份有限公司 Loading method and device for scene resources
CN105187896A (en) * 2015-09-09 2015-12-23 北京暴风科技股份有限公司 Multi-segment media file playing method and system
CN105426549A (en) * 2015-12-29 2016-03-23 北京金山安全软件有限公司 Method and device for reading webpage resources and electronic equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100157021A1 (en) * 2006-11-15 2010-06-24 Abraham Thomas G Method for creating, storing, and providing access to three-dimensionally scanned images
US9934610B2 (en) * 2013-05-31 2018-04-03 Facebook, Inc. Techniques for rendering and caching graphics assets

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103021023A (en) * 2012-12-05 2013-04-03 上海创图网络科技发展有限公司 Three-dimensional scene construction method based on browser
CN103631565A (en) * 2013-11-13 2014-03-12 北京像素软件科技股份有限公司 Loading method and device for scene resources
CN105187896A (en) * 2015-09-09 2015-12-23 北京暴风科技股份有限公司 Multi-segment media file playing method and system
CN105426549A (en) * 2015-12-29 2016-03-23 北京金山安全软件有限公司 Method and device for reading webpage resources and electronic equipment

Also Published As

Publication number Publication date
CN108876925A (en) 2018-11-23

Similar Documents

Publication Publication Date Title
US11170579B2 (en) Hybrid rendering
TWI543108B (en) Crowd-sourced video rendering system
CN106846497B (en) Method and device for presenting three-dimensional map applied to terminal
US9367950B1 (en) Providing virtual reality experiences based on three-dimensional designs produced using three-dimensional design software
WO2016040153A1 (en) Environmentally mapped virtualization mechanism
CN114494328B (en) Image display method, device, electronic equipment and storage medium
US20180276870A1 (en) System and method for mass-animating characters in animated sequences
CN112316433A (en) Game picture rendering method, device, server and storage medium
CN108876925B (en) Virtual reality scene processing method and device
CN110930492B (en) Model rendering method, device, computer readable medium and electronic equipment
CN112423111A (en) Graphic engine and graphic processing method suitable for player
CN115775310A (en) Data processing method and device, electronic equipment and storage medium
CN110288523B (en) Image generation method and device
US10754498B2 (en) Hybrid image rendering system
RU2810701C2 (en) Hybrid rendering
CN112930556A (en) System and method for integrating third party geometry for visualization of large data sets
Abdallah et al. 3D web-based shape modelling: building up an adaptive architecture
WO2014108214A1 (en) Client-server system for a web-based furniture shop
CN117745984A (en) AR picture generation and display method and device, electronic equipment and storage medium
CN114417204A (en) Information generation method and device and electronic equipment
CN116059643A (en) Game rendering method, game rendering device and storage medium
CN114723862A (en) Rendering method, device and system
CN114138385A (en) BIM model display method and device, computer equipment and storage medium
CN117714738A (en) Video processing method and related equipment
CN118262022A (en) Scene generation method, device and storage medium in metaspace

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
GR01 Patent grant
GR01 Patent grant