Summary of the invention
It is an object of the present invention to provide a kind of for loading the new solution of virtual reality scenario.
According to the first aspect of the invention, a kind of virtual reality scenario loading method is provided:
In response to the load request to destination virtual reality scene, the exclusive model money in current virtual reality scene is deleted
Source retains common model resource and scene camera, wherein the exclusive model resource is in corresponding virtual reality scenario
Exclusive model resource, the common model resource are in all virtual reality scenarios involved in current virtual practical application
The model resource for all including;
The exclusive model resource of the destination virtual reality scene is loaded, for according to the only of the target reality scene
There are model resource, the common model resource and the scene camera that the target virtual reality scene is presented.
Optionally, the virtual reality scenario loading method, further includes:
When loading initial virtual reality scenario, common model resource and scene camera described in dynamically load.
Optionally, the virtual reality scenario loading method, further includes:
Classify to the model resource for including in all virtual reality scenarios involved in current virtual practical application, with
Determine that include in each virtual reality scenario involved in the common model resource and current virtual practical application owns
Exclusive model resource.
Optionally, the virtual reality scenario loading method, further includes:
The step of executing the load destination virtual reality scene before, to involved in current virtual practical application
The model resource for including in all virtual reality scenarios and the scene camera carry out Prefab encapsulation.
In one example, the exclusive of the load destination virtual reality scene is executed by way of asynchronous load
The step of model resource.
According to the second aspect of the invention, a kind of virtual reality scenario loading equipemtn is provided, comprising:
Resource processing unit, for deleting current virtual reality in response to the load request to destination virtual reality scene
Exclusive model resource in scene retains common model resource and scene camera, wherein the exclusive model resource is pair
Exclusive model resource in the virtual reality scenario answered, the common model resource are involved in current virtual practical application
The model resource for all including in all virtual reality scenarios;
Resource loading unit, for loading the exclusive model resource of the destination virtual reality scene, for according to institute
The target void is presented in exclusive model resource, the common model resource and the scene camera for stating target reality scene
Quasi- reality scene.
Optionally, the virtual reality scenario loading equipemtn, further includes:
Initial loading unit, for common model resource described in the dynamically load when loading initial virtual reality scenario with
And scene camera.
Optionally, the virtual reality scenario loading equipemtn, further includes:
Resource classification unit, for the mould for including in all virtual reality scenarios involved in current virtual practical application
Type resource is classified, with each virtual reality involved in the determination common model resource and current virtual practical application
All exclusive model resources for including in scene.
Optionally, the virtual reality scenario loading equipemtn, further includes:
Resource Encapsulation unit, the step of executing the load destination virtual reality scene before, for current void
The model resource and the scene camera for including in all virtual reality scenarios involved in quasi- practical application carry out
Prefab encapsulation.
In one example, the resource loading unit by way of asynchronous load for executing the load mesh
The step of marking the exclusive model resource of virtual reality scenario.
It was found by the inventors of the present invention that in the prior art, adding for virtual reality scenario not yet can be shortened in the presence of one kind
The time is carried to avoid there is the virtual reality scenario loading method of blank screen phenomenon and equipment.Therefore, the skill of the invention to be realized
Art task or never expect the technical problem to be solved is that those skilled in the art or it is not expected that, therefore this hair
Bright is a kind of new technical solution.
By referring to the drawings to the detailed description of exemplary embodiment of the present invention, other feature of the invention and its
Advantage will become apparent.
Specific embodiment
Carry out the various exemplary embodiments of detailed description of the present invention now with reference to attached drawing.It should also be noted that unless in addition having
Body explanation, the unlimited system of component and the positioned opposite of step, numerical expression and the numerical value otherwise illustrated in these embodiments is originally
The range of invention.
Be to the description only actually of at least one exemplary embodiment below it is illustrative, never as to the present invention
And its application or any restrictions used.
Technology, method and apparatus known to person of ordinary skill in the relevant may be not discussed in detail, but suitable
In the case of, the technology, method and apparatus should be considered as part of specification.
It is shown here and discuss all examples in, any occurrence should be construed as merely illustratively, without
It is as limitation.Therefore, other examples of exemplary embodiment can have different values.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined in a attached drawing, then in subsequent attached drawing does not need that it is further discussed.
<hardware configuration>
Fig. 1 is the block diagram for showing the hardware configuration for the computer system 1000 that the embodiment of the present invention may be implemented.
As shown in Figure 1, computer system 1000 includes computer 1110.Computer 1110 includes via system bus 1121
The processing unit 1120 of connection, system storage 1130, fixed non-volatile memory interface 1140, mobile non-volatile memories
Device interface 1150, user input interface 1160, network interface 1170, video interface 1190 and peripheral interface 1195.
System storage 1130 includes ROM (read-only memory) and RAM (random access memory).BIOS (basic input
Output system) it resides in ROM.Operating system, application program, other program modules and certain program datas reside in RAM.
The fixed non-volatile memory of such as hard disk is connected to fixed non-volatile memory interface 1140.It is fixed non-easy
The property lost memory for example can store an operating system, application program, other program modules and certain program datas.
The mobile nonvolatile memory of such as floppy disk drive and CD-ROM drive, which is connected to, moves non-volatile deposit
Memory interface 1150.For example, floppy disk can be inserted into floppy disk drive and CD (CD) can be inserted into CD-ROM
In driver.
The input equipment of such as mouse and keyboard is connected to user input interface 1160.
Computer 1110 can be connected to remote computer 1180 by network interface 1170.For example, network interface 1170
LAN connection to remote computer can be passed through.Alternatively, network interface 1170 may be coupled to modem (modulator-
Demodulator) and modem via wide area network be connected to remote computer 1180.
Remote computer 1180 may include the memory of such as hard disk, can store remote application.
Video interface 1190 is connected to monitor.
Peripheral interface 1195 is connected to printer and loudspeaker.
Computer system 1000 shown in FIG. 1 is only explanatory, and is never intended to the limitation present invention, its application
Or purposes.Using in an embodiment of the present invention, the memory 1120 of computer 1100 for storing instruction, described instruction
It is operated for controlling the processor 1110 to execute any one virtual reality scenario provided in an embodiment of the present invention and add
Support method.Although showing multiple devices to computer 1100 in Fig. 1, the present invention can only relate to part therein
Device, for example, web page server 1100 pertains only to processor 1110 and storage device 1120 etc..Technical staff can be according to this hair
Bright disclosed conceptual design instruction.How control processor is operated for instruction, this is it is known in the art that therefore herein no longer in detail
Description.
<embodiment>
A kind of virtual reality scenario loading method is provided in the present embodiment, as shown in Figure 2, comprising:
Step S2100 is deleted in current virtual reality scene in response to the load request to destination virtual reality scene
Exclusive model resource retains common model resource and scene camera, wherein the exclusive model resource is corresponding virtual
Exclusive model resource in reality scene, the common model resource are all virtual involved in current virtual practical application
The model resource for all including in reality scene.
In the present embodiment, the virtual reality scenario is (such as empty by display equipment in current virtual practical application
The display screen etc. of quasi- real world devices) scene that is presented to user.The virtual reality applications be can by such as mobile phone, can
The application run on the terminal devices such as wearable device, tablet computer, for example, the audio-visual broadcasting of reality-virtualizing game, virtual reality is answered
With program, the impression of user's virtual reality can be provided.
The virtual reality scenario is generated generally according to various scene developing instrument platforms, including various model resources and
Scene camera (Camera), the model resource are various building of may relate to of virtual reality scenario in virtual reality scenario
It builds, personage, vegetation, machinery, animal, mountains and rivers, river, the corresponding threedimensional model resource such as landscape.In one example, the scene
Developing instrument platform can be Unity3D, Unity3D be by Unity Technologies is developed one allow user easily to open
Hair creation 3 D video game, building visualization, the types interaction content such as realtime three dimensional animation it is multi-platform comprehensive
Development of games tool is the professional game engine integrated comprehensively.
In the present embodiment, the various model resources for including in the virtual reality scenario, can be according to practical application need
It asks and is divided into common model resource and exclusive model resource.For example, the exclusive model resource is corresponding virtual reality field
Exclusive model resource in scape, the common model resource are all virtual reality fields involved in current virtual practical application
The model resource for all including in scape.Therefore, in one example, virtual reality scenario loading method provided in the present embodiment
Further include: classify to the model resource for including in all virtual reality scenarios involved in current virtual practical application, with
Determine that include in each virtual reality scenario involved in the common model resource and current virtual practical application owns
Exclusive model resource.For example, classified by the Tag (label) carried to the model resource for including in virtual reality scenario,
The model resource for including in all virtual reality scenarios involved in current virtual practical application is labeled as to share mould by Tag
Type resource, other model resources pass through Tag labeled as exclusive model resource.
In step S2100, delete current virtual reality scene in exclusive model resource, retain common model resource with
And scene camera, specifically, the scene life cycle mechanism that can be defined and virtual reality scenario is defined in the prior art
Different mechanism is realized.What scene life cycle mechanism in the prior art defined is the model for including in virtual reality scenario
Resource and scene camera scene life cycle having the same when scene life cycle reaches, such as need to terminate current
Virtual reality scenario, when load destination virtual reality scene realizes scene hop, the model that includes in current virtual reality scene
Resource and scene camera can be destroyed all, and when loading destination virtual reality scene, it is existing to need to reload destination virtual
Whole model resources that real field scape includes, thus there may be the processing for the terminal device for being limited to operation virtual reality applications
Ability, the load time too long experience for causing blank screen influence user occur.Scene life cycle mechanism is current virtual reality field
The intrinsic mechanism of the developing instrument platform (such as Unity3D) of scape, and in embodiments of the present invention, it can be existing to destination virtual
After being divided into common model resource and exclusive model resource comprising model resource in real field scape, common model resource and scene are taken the photograph
Camera no longer realizes the mechanism of scene life cycle, allows to jump to destination virtual reality scene load implement scene
When, common model resource and scene camera can be retained, avoid repeating to load the common model resource shortening scene load time,
Retain scene camera to avoid there is blank screen.
After step S2100, S2200 is entered step, loads the exclusive model resource of the destination virtual reality scene,
For being according to the exclusive model resource of the target reality scene, the common model resource and the scene camera
The existing destination virtual reality scene.
Through virtual reality scenario loading method as shown in Figure 2, when loading destination virtual reality scene, it may not be necessary to
Load common model resource and scene camera are repeated, shortens the time of load destination virtual reality scene, also, retain
Scene camera can avoid the occurrence of blank screen phenomenon.Promote user experience.
And the common model resource and scene camera can be stored in corresponding virtual reality applications or transport
In the terminal device of the corresponding virtual reality applications of row, it can also be stored in remote server or cloud server.Work as mesh
When marking the initial virtual reality scenario that virtual reality scenario is current virtual reality applications, need to load the common model
Resource and scene camera.Therefore, in one example, the virtual reality scenario loading method provided in the present embodiment also wraps
It includes: when loading initial virtual reality scenario, common model resource and scene camera described in dynamically load.
And in one example, while step S2100 can also be performed, step S2200 is executed, is realized in user to void
It, can be by the destination virtual reality field of the destination virtual reality scene of user's request of loading when quasi- reality scene interacts operation
Exclusive model resource carries out asynchronous load backup by way of multithreading in scape, further shortens destination virtual reality scene
Load time gives user without waiting for the user experience for just realizing scene hop.Therefore, virtual provided in the present embodiment
Reality scene loading method can also include: that the load destination virtual reality field is executed by way of asynchronous load
The step of exclusive model resource of scape.
In addition, in one example, virtual reality scenario loading method provided in embodiment, can also include:
Before the step of executing the load destination virtual reality scene, to all virtual existing involved in current virtual practical application
The model resource for including in real field scape and the scene camera carry out Prefab encapsulation.For example, by Unit3D to virtual
The model resource and the scene camera (Camera) for including in reality scene carry out Prefab encapsulation.So it can simplify
The loading procedure of virtual reality scenario shortens the load time of virtual reality scenario.
It is existing in load destination virtual by virtual reality scenario loading method provided in above-described the present embodiment
When real field scape, it may not be necessary to repeat load common model resource and scene camera, shorten load destination virtual reality field
The time of scape, also, retain scene camera, blank screen phenomenon can be avoided the occurrence of.Promote user experience.
In the present embodiment, a kind of virtual reality scenario loading equipemtn 3000 is also provided, as shown in figure 3, including Energy Resources Service
Manage unit 3100 and resource loading unit 3200, optionally, further include initial loading unit 3300, resource classification unit 3400 with
And Resource Encapsulation unit 3500, any one virtual reality scenario loading method for implementing to provide in the present embodiment, herein
It repeats no more.
Virtual reality scenario loading equipemtn 3000, comprising:
Resource processing unit 3100, for deleting current virtual in response to the load request to destination virtual reality scene
Exclusive model resource in reality scene retains common model resource and scene camera, wherein the exclusive model resource
It is model resource exclusive in corresponding virtual reality scenario, the common model resource is involved in current virtual practical application
And all virtual reality scenarios in all include model resource;
Resource loading unit 3200, for loading the exclusive model resource of the destination virtual reality scene, to be used for root
The mesh is presented according to the exclusive model resource of the target reality scene, the common model resource and the scene camera
Mark virtual reality scenario.
Optionally, the virtual reality scenario loading equipemtn 3000, further includes:
Initial loading unit 3300, for the money of common model described in the dynamically load when loading initial virtual reality scenario
Source and scene camera.
Optionally, the virtual reality scenario loading equipemtn 3000, further includes:
Resource classification unit 3400, for including in all virtual reality scenarios involved in current virtual practical application
Model resource classify, with virtual each of involved in the determination common model resource and current virtual practical application
All exclusive model resources for including in reality scene.
Optionally, the virtual reality scenario loading equipemtn 3000, further includes:
Resource Encapsulation unit 3400, for the step of executing the load destination virtual reality scene before, to working as
The model resource for including in all virtual reality scenarios involved in preceding virtual reality applications and the scene camera carry out
Prefab encapsulation.
Optionally, the resource loading unit 3200 by way of asynchronous load for executing the load target
The step of exclusive model resource of virtual reality scenario.
In the present embodiment, the virtual reality scenario loading equipemtn 3000 can there are many entity device forms, such as
Can be used as functional unit may be embodied in virtual reality applications, and it is described virtual included in running to can also be used as functional unit
In the virtual reality device of practical application, it can be included in partial function unit in virtual reality applications and remaining function
Unit includes the form run in the virtual reality device of the virtual reality applications.As long as implementing empty in the present embodiment
The entity device of function possessed by quasi- reality scene loading equipemtn 3000, the protection scope disclosed by the embodiment of the present invention
Among.
<example>
It gives one example below with reference to Fig. 4, further illustrates virtual scene loading method in the present embodiment.In Fig. 4 institute
Show in method, comprising the following steps:
Step S401, to the model resource for including in all virtual reality scenarios involved in current virtual practical application with
And scene camera carries out Prefab encapsulation, for example, carrying out Prefab to model resource and scene camera by Unity3D
Encapsulation, scene camera can be the Camera in Unity3D, carry out Prefab envelope to model resource and scene camera
After dress, S402 is entered step;
Step S402, certainly to the model resource for including in all virtual reality scenarios involved in current virtual practical application
The Tag (label) of band classifies, the model that will include in all virtual reality scenarios involved in current virtual practical application
Resource is labeled as common model resource by Tag, and other model resources pass through Tag labeled as exclusive model resource, later
Enter step S403;
Step S403 judges whether to need to load destination virtual reality scene: showing if receiving user and loading destination virtual
The request of real field scape enters step S404, otherwise, if receiving the request for stopping load virtual reality scenario, such as user behaviour
Current virtual practical application is exited, is terminated;
Step S404, judge load destination virtual reality scene whether be current virtual application initial virtual reality
Otherwise scene, enters step S406 if so, entering step S405;
Step S405, dynamically load common model resource and scene camera, step S407;
Step S406 deletes the exclusive model resource in current virtual reality scene, retains common model resource and field
Scape video camera, enters step S407;
Step S407, the exclusive model resource of asynchronous load destination virtual reality scene, therefore, step S407 can be with step
Rapid S405 or step S406 is carried out simultaneously, can be according to institute after the exclusive model resource of carrying target virtual reality scenario
The target void is presented in exclusive model resource, the common model resource and the scene camera for stating target reality scene
Quasi- reality scene goes back to step S403 later, judges whether to need to load next destination virtual reality scene, if it is desired,
Subsequent step is then continued to execute, otherwise, is terminated.
In this example, by the model resource for including in virtual reality scenario involved in current virtual practical application
Prefab encapsulation is carried out with scene camera, can simplify the loading procedure of virtual reality scenario to shorten load virtual reality field
The time of scape, also, by being drawn to the model resource for including in virtual reality scenario involved in current virtual practical application
Divide common model resource and exclusive model resource, only deletes current virtual reality scene when loading destination virtual reality scene
Exclusive model resource, and retain common model resource and scene camera, it may not be necessary to repeat load common model resource and
Scene camera, shortens the time of load destination virtual reality scene, and avoids the occurrence of blank screen phenomenon.In addition, by asynchronous
The exclusive resource for loading destination virtual reality scene can further shorten the time of load destination virtual reality scene, provide
User is without waiting for the experience that can load jumped destination virtual reality scene.
Attached drawing is had been combined above and describes the embodiment of the present invention, according to the present embodiment, in load destination virtual reality
When scene, the exclusive model resource in current virtual reality scene is deleted, retains common model resource and scene camera, makes
May not necessarily repeat load common model resource and scene camera, shorten load destination virtual reality scene when
Between, also, retain scene camera, blank screen phenomenon can be avoided the occurrence of.Promote user experience.
It will be appreciated by those skilled in the art that virtual reality scenario loading equipemtn can be realized by various modes
3000.For example, can realize virtual reality scenario loading equipemtn 3000 by instruction configuration processor.For example, can will refer to
Order is stored in the ROM, and when starting the device, and instruction is read in programming device from ROM and realizes virtual reality field
Scape loading equipemtn 3000.For example, virtual reality scenario loading equipemtn 3000 can be cured in dedicated devices (such as ASIC).
Virtual reality scenario loading equipemtn 3000 can be divided into mutually independent unit, or they can be merged into reality
It is existing.Virtual reality scenario loading equipemtn 3000 can be realized by one of above-mentioned various implementations, or can be led to
The combinations of two or more modes crossed in above-mentioned various implementations is realized.
It is well known by those skilled in the art that the development of the electronic information technology with such as large scale integrated circuit technology
With the trend of hardware and software, clearly to divide computer system soft and hardware boundary has seemed relatively difficult.Because appointing
What operation can be realized with software, can also be realized by hardware.The execution of any instruction can be completed by hardware, equally may be used
To be completed by software.Hardware implementations or software implement scheme are used for a certain machine function, depend on price, speed
The Non-technical factors such as degree, reliability, memory capacity, change cycle.Therefore, for the ordinary skill of electronic information technical field
For personnel, mode more direct and that a technical solution is explicitly described is each operation described in the program.Knowing
In the case where road institute operation to be performed, those skilled in the art can directly set based on the considerations of to the Non-technical factor
Count out desired product.
The present invention can be system, method and/or computer program product.Computer program product may include computer
Readable storage medium storing program for executing, containing for making processor realize the computer-readable program instructions of various aspects of the invention.
Computer readable storage medium, which can be, can keep and store the tangible of the instruction used by instruction execution equipment
Equipment.Computer readable storage medium for example can be-- but it is not limited to-- storage device electric, magnetic storage apparatus, optical storage
Equipment, electric magnetic storage apparatus, semiconductor memory apparatus or above-mentioned any appropriate combination.Computer readable storage medium
More specific example (non exhaustive list) includes: portable computer diskette, hard disk, random access memory (RAM), read-only deposits
It is reservoir (ROM), erasable programmable read only memory (EPROM or flash memory), static random access memory (SRAM), portable
Compact disk read-only memory (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanical coding equipment, for example thereon
It is stored with punch card or groove internal projection structure and the above-mentioned any appropriate combination of instruction.Calculating used herein above
Machine readable storage medium storing program for executing is not interpreted that instantaneous signal itself, the electromagnetic wave of such as radio wave or other Free propagations lead to
It crosses the electromagnetic wave (for example, the light pulse for passing through fiber optic cables) of waveguide or the propagation of other transmission mediums or is transmitted by electric wire
Electric signal.
Computer-readable program instructions as described herein can be downloaded to from computer readable storage medium it is each calculate/
Processing equipment, or outer computer or outer is downloaded to by network, such as internet, local area network, wide area network and/or wireless network
Portion stores equipment.Network may include copper transmission cable, optical fiber transmission, wireless transmission, router, firewall, interchanger, gateway
Computer and/or Edge Server.Adapter or network interface in each calculating/processing equipment are received from network to be counted
Calculation machine readable program instructions, and the computer-readable program instructions are forwarded, for the meter being stored in each calculating/processing equipment
In calculation machine readable storage medium storing program for executing.
Computer program instructions for executing operation of the present invention can be assembly instruction, instruction set architecture (ISA) instructs,
Machine instruction, machine-dependent instructions, microcode, firmware instructions, condition setup data or with one or more programming languages
The source code or object code that any combination is write, the programming language include the programming language-of object-oriented such as
Smalltalk, C++ etc., and conventional procedural programming languages-such as " C " language or similar programming language.Computer
Readable program instructions can be executed fully on the user computer, partly execute on the user computer, be only as one
Vertical software package executes, part executes on the remote computer or completely in remote computer on the user computer for part
Or it is executed on server.In situations involving remote computers, remote computer can pass through network-packet of any kind
It includes local area network (LAN) or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as benefit
It is connected with ISP by internet).In some embodiments, by utilizing computer-readable program instructions
Status information carry out personalized customization electronic circuit, such as programmable logic circuit, field programmable gate array (FPGA) or can
Programmed logic array (PLA) (PLA), the electronic circuit can execute computer-readable program instructions, to realize each side of the invention
Face.
Referring herein to according to the method for the embodiment of the present invention, the flow chart of device (system) and computer program product and/
Or block diagram describes various aspects of the invention.It should be appreciated that flowchart and or block diagram each box and flow chart and/
Or in block diagram each box combination, can be realized by computer-readable program instructions.
These computer-readable program instructions can be supplied to general purpose computer, special purpose computer or other programmable datas
The processor of processing unit, so that a kind of machine is produced, so that these instructions are passing through computer or other programmable datas
When the processor of processing unit executes, function specified in one or more boxes in implementation flow chart and/or block diagram is produced
The device of energy/movement.These computer-readable program instructions can also be stored in a computer-readable storage medium, these refer to
It enables so that computer, programmable data processing unit and/or other equipment work in a specific way, thus, it is stored with instruction
Computer-readable medium then includes a manufacture comprising in one or more boxes in implementation flow chart and/or block diagram
The instruction of the various aspects of defined function action.
Computer-readable program instructions can also be loaded into computer, other programmable data processing units or other
In equipment, so that series of operation steps are executed in computer, other programmable data processing units or other equipment, to produce
Raw computer implemented process, so that executed in computer, other programmable data processing units or other equipment
Instruct function action specified in one or more boxes in implementation flow chart and/or block diagram.
The flow chart and block diagram in the drawings show the system of multiple embodiments according to the present invention, method and computer journeys
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
One module of table, program segment or a part of instruction, the module, program segment or a part of instruction include one or more use
The executable instruction of the logic function as defined in realizing.In some implementations as replacements, function marked in the box
It can occur in a different order than that indicated in the drawings.For example, two continuous boxes can actually be held substantially in parallel
Row, they can also be executed in the opposite order sometimes, and this depends on the function involved.It is also noted that block diagram and/or
The combination of each box in flow chart and the box in block diagram and or flow chart, can the function as defined in executing or dynamic
The dedicated hardware based system made is realized, or can be realized using a combination of dedicated hardware and computer instructions.It is right
For those skilled in the art it is well known that, by hardware mode realize, by software mode realize and pass through software and
It is all of equal value that the mode of combination of hardware, which is realized,.
Various embodiments of the present invention are described above, above description is exemplary, and non-exclusive, and
It is not limited to disclosed each embodiment.Without departing from the scope and spirit of illustrated each embodiment, for this skill
Many modifications and changes are obvious for the those of ordinary skill in art field.The selection of term used herein, purport
In principle, the practical application or to the technological improvement in market for best explaining each embodiment, or make the art its
Its those of ordinary skill can understand each embodiment disclosed herein.The scope of the present invention is defined by the appended claims.