Method and device for driving objects in a virtual data environment

By combining unit cubes in the virtual data environment as target cuboids and calling the physical engine to drive the target cuboids, the problem of low operation efficiency of the physical engine in the prior art is solved, and the effect of improving the operation efficiency of the physical engine is achieved.

CN112149298BActive Publication Date: 2025-03-04SHENZHEN MINIPLAY TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010987195.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-18
Publication Date
2025-03-04
Estimated Expiration
2040-09-18

AI Technical Summary

Technical Problem

In the prior art, the physical engine only supports the incoming of regular rigid body data, resulting in an increase in the number of independent virtual rigid bodies, thereby reducing the operating efficiency of the physical engine.

Method used

By obtaining multiple independent unit cubes that make up the target object, and combining the unit cubes filled with independent cuboid space based on sequential traversal, the physical engine is called to drive the target cuboid to drive the target object.

Benefits of technology

The number of independent rigid bodies required to drive by the physical engine is reduced, and the amount of calculation of the physical engine is reduced, thereby improving the operating efficiency of the physical engine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112149298B_ABST
    Figure CN112149298B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method and device for driving an object in a virtual data environment, the method comprising: obtaining a plurality of mutually independent unit cubes constituting a target object; based on a sequential traversal of the plurality of unit cubes, merging at least one unit cube that fills an independent cuboid space to obtain an independent target cuboid constituting the target object; calling a physics engine to drive the target object by driving the target cuboid. The embodiments of the present disclosure can improve the operating efficiency of the physics engine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of virtual object simulation, and in particular to a method and device for driving an object in a virtual data environment. Background Art

[0002] In the field of virtual object simulation, it is often necessary to call a physical engine to drive virtual objects to achieve simulation purposes. For example, in a sandbox game, players can use bricks to freely build buildings in the game, and then the game server needs to call a physical engine to drive the building to achieve the corresponding simulation effect.

[0003] In the prior art, the physics engine only supports the input of regular rigid body data, and then independently controls the virtual rigid body described by the rigid body data. The more independent virtual rigid bodies there are, the more virtual rigid bodies the physics engine needs to independently calculate and drive, resulting in lower operating efficiency of the physics engine. Summary of the invention

[0004] One purpose of the present disclosure is to provide a method and device for driving objects in a virtual data environment, which can improve the operating efficiency of a physics engine.

[0005] According to one aspect of an embodiment of the present disclosure, a method for driving an object in a virtual data environment is disclosed, the method comprising:

[0006] Acquire multiple independent unit cubes constituting the target object;

[0007] Based on a sequential traversal of the plurality of unit cubes, at least one unit cube that fills up the independent cuboid space is merged to obtain an independent target cuboid constituting the target object;

[0008] The physics engine is called to drive the target object by driving the target cuboid.

[0009] According to one aspect of an embodiment of the present disclosure, a device for driving an object in a virtual data environment is disclosed, the device comprising:

[0010] An acquisition module configured to acquire a plurality of mutually independent unit cubes constituting a target object;

[0011] a merging module configured to merge at least one unit cube that fills up the independent cuboid space based on a sequential traversal of the plurality of unit cubes to obtain an independent target cuboid constituting the target object;

[0012] The driving module is configured to call the physical engine to drive the target object by driving the target cuboid.

[0013] In an exemplary embodiment of the present disclosure, the device is configured to: at every preset time period, use the unit cube generated by the user within the time period as a plurality of mutually independent unit cubes constituting the target object.

[0014] In an exemplary embodiment of the present disclosure, the apparatus is configured to: in response to detecting an offline operation of the user, use all unit cubes generated by the user as a plurality of mutually independent unit cubes constituting the target object.

[0015] In an exemplary embodiment of the present disclosure, the apparatus is configured to: simulate each unit cube as a corresponding simulation point, and select an unmerged unit cube as a simulation starting point;

[0016] Starting from the simulation starting point, based on sequential traversal of the simulation points along the first spatial axis, a simulation starting line consisting of continuous unmerged unit cubes including the simulation starting point is obtained;

[0017] Starting from the simulation starting line, based on the sequential traversal of the simulation points along the second spatial axis, a simulation starting rectangular surface composed of continuous unmerged unit cubes containing the simulation starting line is obtained;

[0018] Starting from the simulation starting rectangular surface, based on the sequential traversal of the simulation points along the third spatial axis, a simulation cuboid composed of continuous unmerged unit cubes including the simulation starting rectangular surface is obtained, wherein the first spatial axis, the second spatial axis and the third spatial axis are perpendicular to each other;

[0019] The unit cubes constituting the simulated cuboid are merged.

[0020] In an exemplary embodiment of the present disclosure, the apparatus is configured to use the unmerged unit cube with the earliest generation time as the simulation starting point.

[0021] In an exemplary embodiment of the present disclosure, the apparatus is configured to: based on edge detection of an object composed of unmerged unit cubes, select an unmerged unit cube located at the edge as the simulation starting point.

[0022] In an exemplary embodiment of the present disclosure, the apparatus is configured to: determine the number of contact surfaces between each of the unmerged unit cubes located at the edge and other unmerged unit cubes;

[0023] An unmerged unit cube located at the edge and having the smallest number of contact surfaces is selected as the simulation starting point.

[0024] According to one aspect of an embodiment of the present disclosure, an electronic device for driving an object in a virtual data environment is disclosed, including: a memory storing computer-readable instructions; and a processor reading the computer-readable instructions stored in the memory to execute any one of the methods described above.

[0025] According to one aspect of an embodiment of the present disclosure, a computer program medium is disclosed, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute any one of the methods described above.

[0026] In the disclosed embodiment, for the multiple independent unit cubes constituting the target object, the unit cubes that can be combined into a solid cuboid are combined into a corresponding target cuboid without moving any of the unit cubes, and then the physics engine is called to drive the target object by driving the combined target cuboid. This method reduces the number of independent rigid bodies that the physics engine needs to drive, thereby reducing the amount of calculation of the physics engine and improving the operating efficiency of the physics engine.

[0027] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0028] It is to be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The above and other objects, features and advantages of the present disclosure will become more apparent by describing in detail example embodiments thereof with reference to the attached drawings.

[0030] Figure 1 A flow chart of a method for driving an object in a virtual data environment according to an embodiment of the present disclosure is shown.

[0031] Figure 2 A block diagram of a device for driving an object in a virtual data environment according to an embodiment of the present disclosure is shown.

[0032] Figure 3 A hardware diagram of an electronic device for driving objects in a virtual data environment according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0033] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of the present disclosure will be more comprehensive and complete and the concepts of the example embodiments will be fully conveyed to those skilled in the art. The accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.

[0034] In addition, the described features, structures or characteristics may be combined in one or more example embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the example embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, steps, etc. may be adopted. In other cases, well-known structures, methods, implementations or operations are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0035] Some of the blocks shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0036] The present disclosure provides a method for driving an object in a virtual data environment, specifically, a method for driving a target object composed of a rigid unit cube in a virtual data environment, wherein the target object may be of a regular shape or an irregular shape as a whole.

[0037] Figure 1 A method for driving an object in a virtual data environment according to an embodiment of the present disclosure is shown. As shown in the figure, the method includes:

[0038] Step S110, obtaining a plurality of mutually independent unit cubes constituting the target object;

[0039] Step S120, based on the sequential traversal of the plurality of unit cubes, merging at least one unit cube that fills up the independent cuboid space to obtain an independent target cuboid constituting the target object;

[0040] Step S130: calling a physical engine to drive the target object by driving the target cuboid.

[0041] In the disclosed embodiment, for the multiple independent unit cubes constituting the target object, the unit cubes that can be combined into a solid cuboid are combined into a corresponding target cuboid without moving any of the unit cubes, and then the physics engine is called to drive the target object by driving the combined target cuboid. This method reduces the number of independent rigid bodies that the physics engine needs to drive, thereby reducing the amount of calculation of the physics engine and improving the operating efficiency of the physics engine.

[0042] It should be noted that in the embodiments of the present disclosure, the cube is a special rectangular parallelepiped.

[0043] The disclosed embodiments are mainly applied to scenarios where virtual three-dimensional objects interact with users. For example, after a user logs in to a virtual three-dimensional object control system through a terminal, the system generates and schedules unit cubes to build a target object, and then the cloud server of the system calls a physical engine to drive the target object. Driving the target object includes driving the target object to interact with other objects and driving the target object to move according to preset actions.

[0044] It should be noted that, for the purpose of facilitating the explanation of the embodiments of the present disclosure, in the subsequent description of the embodiments of the present disclosure, the cloud server is exemplarily taken as the execution entity, and the application scenario is exemplarily taken as the user identified by the cloud server generating and scheduling unit cubes to build a target object to be driven.

[0045] In one embodiment, obtaining multiple independent unit cubes constituting the target object includes: every preset time period, using the unit cube generated by the user in the time period as the multiple independent unit cubes constituting the target object.

[0046] In this embodiment, the cloud server regards each unit cube generated in each time period as a target object.

[0047] Specifically, the user continuously generates and schedules unit cubes while online. Every preset time period, the cloud server takes the unit cubes generated by the user in the time period as a whole to obtain the target object in the time period.

[0048] For example, if the preset time period is 5 minutes, the user generates and schedules cube bricks as the basic unit of virtual construction, builds the foot area from 00:00:00 to 00:05:00, builds the mountainside area from 00:05:00 to 00:10:00, and builds the mountaintop area from 00:10:00 to 00:15:00, thus obtaining a mountain composed of multiple cube bricks.

[0049] In the process of user construction, with 00:00:00 as the starting time, the cloud server regards all the cubic bricks contained in the foot area as a target object A at 00:05:00, and merges the cubic bricks in the foot area that can be merged into a solid cuboid into a corresponding target cuboid, and then calls the physical engine to drive the target cuboid in the foot area to drive the target object A. Similarly, the cloud server regards all the cubic bricks contained in the mountainside area as a target object B at 00:10:00, and drives the target object B in the same way; at 00:15:00, all the cubic bricks contained in the mountaintop area as a target object C, and drives the target object C in the same way.

[0050] The advantage of this embodiment is that the target object is determined in stages and the unit cubes therein are merged, so that the driving of the target object can meet the demand of real-time driving while improving the operating efficiency of the physical engine.

[0051] In one embodiment, the method further includes: in response to detecting an offline operation of the user, treating all unit cubes generated by the user as a plurality of mutually independent unit cubes constituting the target object.

[0052] In this embodiment, after the user goes offline, the cloud server integrates multiple target objects obtained periodically into one target object.

[0053] Specifically, in response to detecting the user's offline operation, the cloud server takes all the unit cubes generated during the user's online period as a whole to obtain a target object composed of all the unit cubes.

[0054] For example, a user logs in at 00:00:00 and goes offline at 00:15:00. By generating and scheduling cube bricks as the basic unit of virtual construction, the foot of the mountain is built from 00:00:00 to 00:05:00, the middle of the mountain is built from 00:05:00 to 00:10:00, and the top of the mountain is built from 00:10:00 to 00:15:00, thus obtaining a mountain composed of multiple cube bricks.

[0055] At 00:05:00, the cloud server regards all the cubic bricks contained in the mountainside area as a target object A and drives the target object A; at 00:10:00, the cloud server regards all the cubic bricks contained in the mountainside area as a target object B and drives the target object B; at 00:15:00, the cloud server regards all the cubic bricks contained in the mountaintop area as a target object C and drives the target object C.

[0056] In response to the user's offline operation, the cloud server regards all the cube bricks generated by the user from 00:00:00 to 00:15:00 as a whole, that is, the entire mountain as the target object. Then, the cube bricks in the entire mountain that can be combined into a solid cuboid are combined into a corresponding target cuboid, and then the physics engine is called to drive the entire mountain by driving the target cuboid in the entire mountain.

[0057] The advantage of this embodiment is that, by re-merging all unit cubes after the user goes offline, the number of independent rigid bodies required to be driven when driving the target object is further reduced, thereby further improving the operating efficiency of the physics engine.

[0058] In one embodiment, based on sequential traversal of the plurality of unit cubes, merging at least one of the unit cubes that fills up the independent cuboid space includes:

[0059] Simulate each unit cube as a corresponding simulation point, and select an unmerged unit cube as the simulation starting point;

[0060] Starting from the simulation starting point, based on sequential traversal of the simulation point along the first spatial axis, a simulation starting line consisting of continuous unmerged unit cubes including the simulation starting point is obtained;

[0061] Starting from the simulation starting line, based on the sequential traversal of the simulation points along the second spatial axis, a simulation starting rectangular surface consisting of continuous unmerged unit cubes containing the simulation starting line is obtained;

[0062] Starting from the simulation starting rectangular surface, based on the sequential traversal of the simulation points along the third spatial axis, a simulation cuboid composed of continuous unmerged unit cubes including the simulation starting rectangular surface is obtained, wherein the first spatial axis, the second spatial axis and the third spatial axis are perpendicular to each other;

[0063] Merge the unit cubes that make up the simulated cuboid.

[0064] In this embodiment, the unit cube is traversed sequentially by gradually exploring along the spatial axis in a hierarchical manner from point to line to surface and then to volume.

[0065] Specifically, the three spatial axes of the space where the unit cube is located are respectively parallel to the three intersecting edges of the unit cube, the X axis, the Y axis and the Z axis. Obviously, the X axis, the Y axis and the Z axis are perpendicular to each other. The X axis is the length, the Y axis is the width, and the Z axis is the height.

[0066] The cloud server simulates each unit cube that constitutes the target object as a corresponding simulation point, and selects an unmerged unit cube as the simulation starting point.

[0067] Starting from the simulation starting point, the simulation points are sequentially traversed along the positive direction of the X-axis, and the simulation points are sequentially traversed along the negative direction of the X-axis. From point to line, a simulation starting line composed of continuous unmerged unit cubes and including the simulation starting point can be obtained according to the traversed simulation points. Preferably, the simulation points are traversed continuously while being sequentially traversed along the positive direction of the X-axis, and the traversal is stopped once a blank position causing an interruption is traversed, or once a merged unit cube is traversed, so as to obtain the simulation starting line with the longest length in the positive direction of the X-axis; similarly, the simulation starting line with the longest length in the negative direction of the X-axis can be obtained.

[0068] Starting from the simulation starting line, the simulation points are sequentially traversed along the positive direction of the Y axis, and the simulation points are sequentially traversed along the negative direction of the Y axis. From line to surface, a simulation starting rectangular surface composed of continuous unmerged unit cubes containing the simulation starting line can be obtained according to the traversed simulation points. Preferably, the simulation starting rectangular surface with the largest width in the positive direction of the Y axis and the simulation starting rectangular surface with the largest width in the negative direction of the Y axis can be obtained.

[0069] Starting from the simulation starting rectangular surface, the simulation points are traversed sequentially along the Z axis square direction, and the simulation points are traversed sequentially along the negative direction of the Z axis. From the surface to the body, a simulated cuboid composed of continuous unmerged unit cubes containing the simulation starting rectangular surface can be obtained according to the traversed simulation points. Preferably, the simulated cuboid with the maximum height in the positive direction of the Z axis and the simulated cuboid with the maximum height in the negative direction of the Z axis can be obtained. Obviously, the simulated cuboid is filled with unmerged unit cubes.

[0070] After obtaining the simulated cuboid, the cloud server merges the unit cubes contained in the simulated cuboid, that is, merges the unmerged unit cubes that fill the simulated cuboid.

[0071] It can be seen that the simulated cuboid obtained by sequential traversal in this embodiment is filled with unmerged unit cubes, and contains neither blank positions nor merged unit cubes. After being merged, the unmerged unit cubes are determined to be merged unit cubes, so as not to interfere with the merging of other unmerged unit cubes, so that each target cuboid obtained by merging the unit cubes that form the simulated cuboid is independent of each other.

[0072] Since the target cuboid is obtained by merging at least one unit cube, and generally speaking, most target cuboids are obtained by merging at least two unit cubes, generally speaking, the number of target cuboids is less than the number of unit cubes, thereby reducing the number of independent rigid bodies that the physics engine needs to calculate and drive, and improving the operating efficiency of the physics engine.

[0073] In one embodiment, selecting an unmerged unit cube as the simulation starting point includes: selecting the unmerged unit cube with the earliest generation time as the simulation starting point.

[0074] In this embodiment, the cloud server records the generation time of each unit cube, and when selecting the simulation starting point, the unmerged unit cube with the earliest generation time is used as the simulation starting point.

[0075] In one embodiment, selecting an unmerged unit cube as the simulation starting point includes: based on edge detection of an object composed of unmerged unit cubes, selecting an unmerged unit cube located at the edge as the simulation starting point.

[0076] In this embodiment, the cloud server uses the unmerged unit cube located at the edge as the simulation starting point. Specifically, the cloud server performs edge detection on the object composed of all unmerged unit cubes, thereby determining which unmerged unit cubes are located at the edge of the object, and then uses one of the unmerged unit cubes located at the edge as the simulation starting point.

[0077] The advantage of this embodiment is that if an unmerged unit cube is located at the edge, it means that the contact area between the unmerged unit cube and other unmerged unit cubes is less than 6, so when performing sequential traversal using it as the simulation starting point, the number of directions that need to be considered is correspondingly less than 6. Therefore, by selecting an unmerged unit cube located at the edge as the simulation starting point, the number of directions that need to be considered during sequential traversal is reduced, thereby improving the efficiency of sequential traversal.

[0078] In one embodiment, selecting an unmerged unit cube located at an edge as the simulation starting point includes:

[0079] Determine the number of contact surfaces between each unmerged unit cube located at the edge and other unmerged unit cubes;

[0080] An unmerged unit cube located at the edge with the smallest number of contact surfaces is selected as the starting point of the simulation.

[0081] In this embodiment, the cloud server selects a simulation starting point from the unmerged unit cubes located at the edge according to the number of contact surfaces with other unmerged unit cubes. Specifically, after the cloud server determines which unmerged unit cubes are located at the edge, it determines the number of contact surfaces between each unmerged unit cube located at the edge and other unmerged unit cubes, and then selects an unmerged unit cube located at the edge with the smallest number of contact surfaces as the simulation starting point.

[0082] The advantage of this embodiment is that by selecting an unmerged unit cube located at the edge with the smallest number of contact surfaces with other unmerged unit cubes as the simulation starting point, the number of directions that need to be considered during sequential traversal is minimized, thereby further improving the efficiency of sequential traversal.

[0083] It should be noted that the above embodiments of selecting the simulation starting point are only exemplary descriptions and should not limit the functions and scope of use of the present disclosure. It is understandable that when selecting the simulation starting point, an unmerged unit cube can be randomly selected as the simulation starting point, an unmerged unit cube located at the edge can be randomly selected as the simulation starting point, or an unmerged unit cube located at the edge with the earliest generation time can be used as the simulation starting point.

[0084] Figure 2 A device for driving an object in a virtual data environment according to an embodiment of the present disclosure is shown, the device comprising:

[0085] An acquisition module 210 is configured to acquire a plurality of mutually independent unit cubes constituting a target object;

[0086] A merging module 220 is configured to merge at least one unit cube that fills up the independent cuboid space based on a sequential traversal of the plurality of unit cubes to obtain an independent target cuboid constituting the target object;

[0087] The driving module 230 is configured to call the physical engine to drive the target object by driving the target cuboid.

[0088] In an exemplary embodiment of the present disclosure, the device is configured to: at every preset time period, use the unit cube generated by the user within the time period as a plurality of mutually independent unit cubes constituting the target object.

[0089] In an exemplary embodiment of the present disclosure, the apparatus is configured to: in response to detecting an offline operation of the user, use all unit cubes generated by the user as a plurality of mutually independent unit cubes constituting the target object.

[0090] In an exemplary embodiment of the present disclosure, the apparatus is configured to: simulate each unit cube as a corresponding simulation point, and select an unmerged unit cube as a simulation starting point;

[0091] Starting from the simulation starting point, based on sequential traversal of the simulation points along the first spatial axis, a simulation starting line consisting of continuous unmerged unit cubes including the simulation starting point is obtained;

[0092] Starting from the simulation starting line, based on the sequential traversal of the simulation points along the second spatial axis, a simulation starting rectangular surface composed of continuous unmerged unit cubes containing the simulation starting line is obtained;

[0093] Starting from the simulation starting rectangular surface, based on the sequential traversal of the simulation points along the third spatial axis, a simulation cuboid composed of continuous unmerged unit cubes including the simulation starting rectangular surface is obtained, wherein the first spatial axis, the second spatial axis and the third spatial axis are perpendicular to each other;

[0094] The unit cubes constituting the simulated cuboid are merged.

[0095] In an exemplary embodiment of the present disclosure, the apparatus is configured to use the unmerged unit cube with the earliest generation time as the simulation starting point.

[0096] In an exemplary embodiment of the present disclosure, the apparatus is configured to: based on edge detection of an object composed of unmerged unit cubes, select an unmerged unit cube located at the edge as the simulation starting point.

[0097] In an exemplary embodiment of the present disclosure, the apparatus is configured to: determine the number of contact surfaces between each of the unmerged unit cubes located at the edge and other unmerged unit cubes;

[0098] An unmerged unit cube located at the edge and having the smallest number of contact surfaces is selected as the simulation starting point.

[0099] Reference below Figure 3 The electronic device 30 for driving an object in a virtual data environment according to an embodiment of the present disclosure is described. Figure 3 The electronic device 30 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0100] like Figure 3As shown, the electronic device 30 is in the form of a general computing device. The components of the electronic device 30 may include but are not limited to: at least one processing unit 310, at least one storage unit 320, and a bus 330 connecting different system components (including the storage unit 320 and the processing unit 310).

[0101] The storage unit stores program codes, which can be executed by the processing unit 310, so that the processing unit 310 performs the steps according to various exemplary embodiments of the present invention described in the description of the exemplary method described above in this specification. For example, the processing unit 310 can perform the following steps: Figure 3 The steps shown in .

[0102] The storage unit 320 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 3201 and / or a cache memory unit 3202 , and may further include a read-only memory unit (ROM) 3203 .

[0103] The storage unit 320 may also include a program / utility 3204 having a set (at least one) of program modules 3205, such program modules 3205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0104] Bus 330 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0105] The electronic device 30 may also communicate with one or more external devices 400 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 30, and / or may communicate with any device that enables the electronic device 30 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 350. The input / output (I / O) interface 350 is connected to a display unit 340. Furthermore, the electronic device 30 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 360. As shown, the network adapter 360 communicates with other modules of the electronic device 30 via a bus 330. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 30, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0106] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0107] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is further provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer executes the method described in the above method embodiment.

[0108] According to one embodiment of the present disclosure, a program product for implementing the method in the above method embodiment is also provided, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0109] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0110] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0111] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0112] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as JAVA, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0113] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0114] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0115] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0116] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.

Claims

1. A method for driving an object in a virtual data environment, characterized in that: The method comprises: Acquire multiple independent unit cubes constituting the target object; Simulate each unit cube as a corresponding simulation point, and select an unmerged unit cube as the simulation starting point; Starting from the simulation starting point, based on sequential traversal of the simulation points along the first spatial axis, a simulation starting line consisting of continuous unmerged unit cubes including the simulation starting point is obtained; Starting from the simulation starting line, based on the sequential traversal of the simulation points along the second spatial axis, a simulation starting rectangular surface composed of continuous unmerged unit cubes containing the simulation starting line is obtained; Starting from the simulation starting rectangular surface, based on the sequential traversal of the simulation points along the third spatial axis, a simulation cuboid composed of continuous unmerged unit cubes including the simulation starting rectangular surface is obtained, wherein the first spatial axis, the second spatial axis and the third spatial axis are perpendicular to each other; Merging the unit cubes constituting the simulation cuboid to obtain independent target cuboids constituting the target object; The physics engine is called to drive the target object by driving the target cuboid.

2. The method according to claim 1, characterized in that Acquiring a plurality of mutually independent unit cubes constituting the target object includes: at every preset time period, taking a unit cube generated by a user within the time period as the plurality of mutually independent unit cubes constituting the target object.

3. The method according to claim 2, characterized in that The method further includes: in response to detecting an offline operation of the user, taking all unit cubes generated by the user as a plurality of mutually independent unit cubes constituting the target object.

4. The method according to claim 1, characterized in that: Selecting an unmerged unit cube as a simulation starting point includes: selecting an unmerged unit cube with the earliest generation time as the simulation starting point.

5. The method according to claim 1, characterized in that: Selecting an unmerged unit cube as a simulation starting point includes: based on edge detection of an object composed of unmerged unit cubes, selecting an unmerged unit cube located at an edge as the simulation starting point.

6. The method according to claim 5, characterized in that Selecting an unmerged unit cube located at the edge as the simulation starting point includes: Determine the number of contact surfaces between each of the unmerged unit cubes located at the edge and other unmerged unit cubes; An unmerged unit cube located at the edge and having the smallest number of contact surfaces is selected as the simulation starting point.

7. A device for driving an object in a virtual data environment, characterized in that: The device comprises: An acquisition module configured to acquire a plurality of mutually independent unit cubes constituting a target object; Merge module, configured as: Simulate each unit cube as a corresponding simulation point, and select an unmerged unit cube as the simulation starting point; Starting from the simulation starting point, based on sequential traversal of the simulation points along the first spatial axis, a simulation starting line consisting of continuous unmerged unit cubes including the simulation starting point is obtained; Starting from the simulation starting line, based on the sequential traversal of the simulation points along the second spatial axis, a simulation starting rectangular surface composed of continuous unmerged unit cubes containing the simulation starting line is obtained; Starting from the simulation starting rectangular surface, based on the sequential traversal of the simulation points along the third spatial axis, a simulation cuboid composed of continuous unmerged unit cubes including the simulation starting rectangular surface is obtained, wherein the first spatial axis, the second spatial axis and the third spatial axis are perpendicular to each other; Merging the unit cubes constituting the simulation cuboid to obtain independent target cuboids constituting the target object; The driving module is configured to call the physical engine to drive the target object by driving the target cuboid.

8. An electronic device for driving an object in a virtual data environment, characterized in that: include: a memory storing computer-readable instructions; The processor reads the computer readable instructions stored in the memory to execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: Computer readable instructions are stored thereon, and when the computer readable instructions are executed by a processor of a computer, the computer is caused to execute the method of any one of claims 1-6.

Citation Information

Patent Citations

  • Virtual reality scene modeling method and device

    CN105894570A