Virtual reality interaction method and device, electronic equipment and medium
By adjusting the occlusion plane in the virtual reality space, the problem of target objects being occluded is solved, and the interactive method of eliminating occlusion is realized without changing the perspective or scene is realized, simplifying the virtual reality interaction process.
Patent Information
- Application Number
- CN202510241952.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-02-28
AI Technical Summary
In virtual reality space, the target object may be obscured by other objects, and the prior art requires users to change their perspective or scenes to eliminate occlusion, increasing the complexity of the interactive process.
By obtaining the user's focus area, adjusting the spatial position of the occlusion plane, so that the obstacle object is located outside the accommodating space, and displaying it with transparency greater than the preset transparency threshold, achieving visibility of the target object.
Without changing the original perspective or scene, users can eliminate occlusion, simplify the interaction process, and improve interaction efficiency.
Smart Images

Figure CN120215697A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of virtual reality technology, and in particular, to a virtual reality interaction method, device, electronic device and medium. Background Art
[0002] Virtual Reality (VR) refers to combining the real and the virtual through computer devices and other means to create a virtual environment for human-computer interaction, which can be implemented using a head-mounted VR device. When a user interacts with a target object in a virtual reality space (three-dimensional space), the target object generally needs to be visible. When there are many objects in the virtual reality space, the target object that the user wants to interact with may be blocked by other objects. In current technologies, in the case where the target object is blocked, in order to interact with the target object, the user can move the blocking object away (if the blocking object can be moved), or move the user's perspective to see the target object (if the application scenario supports moving the user's perspective), that is, by changing the user's perspective or modifying the scene to eliminate the obstacle caused by the blocking object. However, with this processing method, after the user finishes interacting with the target object, the user needs to restore the original perspective or scene, which increases the complexity of the interaction process. Summary of the Invention
[0003] The purpose of the embodiments of the present application is to provide a virtual reality interaction method, device, electronic device and medium, so that the user can eliminate the interaction obstacle caused by object occlusion without changing the original perspective or scene.
[0004] In a first aspect, the embodiments of the present application provide a virtual reality interaction method, which is applied to a virtual reality interaction device. The method includes:
[0005] Obtain a focus area of the user when using the virtual reality interaction device. The focus area is a containment space enclosed by multiple planes, and the containment space includes multiple objects, and the multiple objects include a target object;
[0006] In response to a first operation of the user, adjust the spatial position of a blocking plane among the multiple planes so that an obstacle object is located outside the containment space. The obstacle object is an object among the multiple objects that blocks the target object, and the blocking plane is the plane that faces the user and is closest to the user among the multiple planes. The display state of the obstacle object located outside the containment space is a target display state, and the target display state is a display state with a first transparency, and the first transparency is greater than a preset transparency threshold.
[0007] In some embodiments, after adjusting the spatial position of the occlusion plane among the multiple planes in response to the user's first operation so that the obstacle object is located outside the accommodation space, the method further includes:
[0008] In response to the user's second operation, determine the target object among the multiple objects in the accommodation space.
[0009] In some embodiments, both the first operation and the second operation are triggered by the user's gesture;
[0010] Alternatively, the first operation is triggered by the user through a handheld controller, and the second operation is triggered by the user's gesture. The handheld controller is communicatively connected to the virtual reality interaction device;
[0011] Alternatively, both the first operation and the second operation are triggered by the user through the handheld controller.
[0012] In some embodiments, the determining the target object among the multiple objects in the accommodation space in response to the user's second operation includes:
[0013] Map the position coordinates corresponding to the indication point controlled by the user's second operation to the occlusion plane to obtain remapped coordinates, where the indication point is located in the accommodation space;
[0014] Multiply the position coordinates corresponding to the focus center by a first weight to obtain a first product, and multiply the remapped coordinates by a second weight to obtain a second product, where the sum of the first weight and the second weight is a preset value, and the focus center is the geometric center of the occlusion plane;
[0015] Add the first product and the second product to obtain the target position coordinates of the user's indication point;
[0016] Determine the target object among the multiple objects in the accommodation space according to the target position coordinates of the indication point.
[0017] In some embodiments, the determining the target object among the multiple objects in the accommodation space according to the target position coordinates of the indication point includes:
[0018] Determine the multiple objects in the accommodation space as candidate objects;
[0019] According to the position coordinates of each candidate object and the target position coordinates of the indication point, determine the distance and relative angle between each candidate object and the indication point;
[0020] Determine the target score of each candidate object according to the distance and relative angle between each candidate object and the indication point;
[0021] Determine the candidate object with the highest target score among the multiple candidate objects as the target object.
[0022] In some embodiments, the determining the target score of each candidate object according to the distance and relative angle between each candidate object and the indication point includes:
[0023] Calculate the target score of each candidate object according to the following expression:
[0024] G obj = μ / D + A cos(Kα);
[0025] S obj (t) = λS obj (t - 1) + (1 - λ)G obj / β;
[0026] where μ is the first weight, D is the distance between the candidate object and the indication point, α is the relative angle between the candidate object and the indication point, A and K are preset angle coefficients, β is a preset scaling coefficient, G obj is the initial score, S obj (t) is the target score of the candidate object, λ is a preset time viscosity coefficient, S obj (t - 1) is the target score of the candidate object in the previous frame, and t is the sequence number of the current frame of the candidate object.
[0027] In some embodiments, if both the first operation and the second operation are triggered by the user's gesture, the first weight is less than the second weight;
[0028] If the first operation is triggered by the user through a handheld controller and the second operation is triggered by the user's gesture, the first weight is greater than a first value, where the first value is the value of the first weight in the first input mode, and the handheld controller is communicatively connected to the virtual reality interaction device;
[0029] If both the first operation and the second operation are triggered by the user through the handheld controller, the first weight is 0.
[0030] In a second aspect, an embodiment of the present application provides a device, a virtual reality interaction device. The device is applied to a virtual reality interaction device, and the device includes:
[0031] An acquisition module, configured to acquire a focus area of a user when using the virtual reality interaction device, where the focus area is an accommodation space enclosed by multiple planes, the accommodation space includes multiple objects, and the multiple objects include a target object;
[0032] An adjustment module, configured to, in response to a first operation of the user, adjust a spatial position of an occlusion plane among the multiple planes, so that an obstacle object is located outside the accommodation space, where the obstacle object is an object among the multiple objects that occludes the target object, the occlusion plane is the plane that faces the user and is closest to the user among the multiple planes, and a display state of the obstacle object located outside the accommodation space is a target display state, and the target display state is a display state with a first transparency, and the first transparency is greater than a preset transparency threshold.
[0033] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0034] A memory, configured to store instructions; and
[0035] A processor, configured to call the instructions from the memory and be capable of implementing the virtual reality interaction method provided in the first aspect of the embodiments of the present application when executing the instructions.
[0036] In a fourth aspect, an embodiment of the present application provides a machine-readable storage medium, where instructions are stored on the machine-readable storage medium, and when the instructions are executed by a processor, the processor is enabled to implement the virtual reality interaction method according to the first aspect of the embodiments of the present application.
[0037] In the embodiments of the present application, when a user uses a virtual reality interaction device, a focus area is generated, and the focus area correspondingly includes an accommodation space of a target object that the user expects to interact with. After the processor of the virtual reality interaction device acquires the focus area of the user, the accommodation space is determined, and the occlusion plane of the accommodation space is determined. Subsequently, in response to a first operation of the user, that is, an occlusion plane adjustment operation, the spatial position of the occlusion plane is adjusted, so that an obstacle object that occludes the target object is excluded from the accommodation space, and the obstacle object excluded from the accommodation space is displayed in a state with a first transparency greater than a preset transparency threshold, so that the occluded target object is visible. In this way, the user can eliminate the occlusion of the obstacle object and see through the target object to perform interaction actions without changing the original viewing angle or scene. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 is a schematic flowchart of the virtual reality interaction method provided in the embodiments of the present application;
[0039] Figure 2 AND Figure 3It is a schematic diagram of the third - perspective process simulation of the occlusion plane adjustment process provided by an embodiment of the present application;
[0040] Figure 4 It is a schematic diagram of the visual effect of the focus area provided by an embodiment of the present application;
[0041] Figure 5 and Figure 6 It is a schematic diagram of the first - perspective process simulation of the object selection process provided by an embodiment of the present application;
[0042] Figure 7 It is a schematic diagram of three interactive input modes provided by an embodiment of the present application;
[0043] Figure 8 It is a schematic diagram of the process for determining the coordinate of the target position of the indication point provided by an embodiment of the present application;
[0044] Figure 9 It is a schematic diagram of the structure of a virtual - reality interaction device provided by an embodiment of the present application;
[0045] Figure 10 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0046] Next, the technical solutions in the embodiments of the present application will be clearly described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope protected by the present application.
[0047] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same category, and the number of objects is not limited. For example, the first object can be one or multiple. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally indicates an "or" relationship between the associated objects before and after.
[0048] Next, in conjunction with the accompanying drawings, the virtual - reality interaction method, device, electronic device, and medium provided by the embodiments of the present application will be described in detail through specific embodiments and their application scenarios.
[0049] Please refer to Figure 1 , which is a schematic flowchart of the virtual - reality interaction method provided by an embodiment of the present application. This method is applied to a virtual - reality interaction device. AsFigure 1 As shown in the figure, the virtual reality interaction method includes the following steps S100 to S200.
[0050] Step S100: Obtain the focus area of the user when using the virtual reality interaction device. The focus area is an accommodation space enclosed by multiple planes, and the accommodation space includes multiple objects, and the multiple objects include a target object.
[0051] Figure 2 And Figure 3 is a schematic diagram of the third - perspective process simulation of the occlusion plane adjustment process provided by an embodiment of the present application. Please refer to it together with Figures 1 - 3 In the virtual display interaction method provided by an embodiment of the present application, the first step of the processor of the virtual reality interaction device is to obtain the focus area of the user when using the virtual reality interaction device. The focus area can be understood as the area where the user expects to perform interactions, that is, a rough focus range determined by the processor according to the user's state when using the virtual reality interaction device. The focus area is also an accommodation space enclosed by multiple planes, including multiple objects that can interact with the user. That is to say, the accommodation space includes the target object that the user expects to interact with.
[0052] Exemplarily, as Figure 2 And Figure 3 shown in the figure, the virtual display interaction device is a head - mounted device. The processor determines the user's viewing angle according to the user's head movement (determining the head movement by collecting head rotation data), and determines the corresponding frustum A in the virtual display space according to the user's viewing angle. The size of the frustum A can be adjusted according to the user's operation. This frustum A includes the accommodation space B (i.e., the focus area) containing the target object.
[0053] Step S200: In response to the user's first operation, adjust the spatial position of the occlusion plane among the multiple planes so that the obstacle object is located outside the accommodation space. The obstacle object is an object among the multiple objects that occludes the target object. The occlusion plane is the plane that faces the user and is the closest to the user among the multiple planes. The display state of the obstacle object located outside the accommodation space is the target display state, and the target display state is a display state with a first transparency, and the first transparency is greater than the preset transparency threshold.
[0054] Next, the processor responds to the user's first operation (i.e., the occlusion plane adjustment operation), and the processor adjusts the spatial position of the occlusion plane among the multiple planes that enclose the accommodating space. The occlusion plane is the plane facing the user and closest to the user among the multiple planes, and is used to block or remove objects in the accommodating space (especially those that block the target object) to achieve the purpose of adjusting the size of the accommodating space. For example, the user operates through a handheld controller or gestures, and the processor adjusts the position of the occlusion plane according to the operation, so that the object that blocks the target book (such as a cup on the table) moves out of the accommodating space. Finally, the obstacle objects outside the accommodating space are simultaneously set to the target display state, which means that these obstacle objects will be presented in a display state with a first transparency, and the first transparency is greater than the preset transparency threshold.
[0055] Those skilled in the art can understand that the preset transparency threshold can be adjusted and set according to the requirements for the visual effect of the virtual display space, so as to ensure that when the obstacle object is displayed in a display state with a first transparency greater than the preset transparency threshold, the target object can be seen through. For example, after adjustment, the cup is completely removed from the space, and the target book is displayed in a semi-transparent state, ensuring that the user can clearly see the location of the book and can also identify other objects around the book.
[0056] Those skilled in the art may also understand that the focus area - the accommodating space is a spatial area with which users can interact, and the objects included therein are areas with which users can interact. When the processor adjusts the occlusion plane in response to the user's first operation, the obstacle objects removed from the accommodating space can be displayed with the first transparency and can also be set to a state that is unable to respond to user interactive operations, so as to avoid interfering with the user's interactive operations on the target object.
[0057] For example, Figure 2 and Figure 3 As shown, the occluding plane C is the near plane (the plane closer to the user) in the boundary plane of the accommodating space B. By adjusting the position of the occluding plane C, the size of the accommodating space B changes, and the obstacle objects removed from the accommodating space are displayed in a semi-transparent state and cannot respond to the user's interactive operations.
[0058] Through the above steps S100 - S200, when a user uses a virtual reality interaction device, a focus area is generated. The focus area correspondingly includes the accommodation space of the target object that the user expects to interact with. After the processor of the virtual reality interaction device obtains the user's focus area, it determines the accommodation space and determines the occlusion plane of the accommodation space. Subsequently, in response to the user's first operation, that is, the occlusion plane adjustment operation, the spatial position of the occlusion plane is adjusted so that the obstacle object that occludes the target object is excluded from the accommodation space. The obstacle object excluded from the accommodation space is displayed in a state with a first transparency greater than the preset transparency threshold, making the occluded target object visible. In this way, the user can eliminate the occlusion of the obstacle object and perspective the target object to perform interaction actions without changing the original viewing angle or scene.
[0059] In some embodiments, the processor can also rotate the occlusion plane according to the user's first operation to exclude the obstacle object from the accommodation space.
[0060] Figure 4 It is a schematic diagram of the visual effect of the focus area provided by the embodiment of the present application. As Figure 4 shown, in some embodiments, the processor can also perform visual effect design on the focus area (i.e., the accommodation space) according to the settings of technicians (for example, when displaying, the focus area is displayed with an obvious boundary, or the display effects of the objects within the focus area are differentiated uniformly), so that the objects inside and outside the focus area can be clearly distinguished.
[0061] In some embodiments, after responding to the user's first operation and adjusting the spatial position of the occlusion plane among multiple planes so that the obstacle object is located outside the accommodation space, the method further includes:
[0062] Responding to the user's second operation to determine the target object among multiple objects in the accommodation space.
[0063] In this embodiment, after the processor adjusts the occlusion plane according to the user's first operation, in response to the user's second operation (i.e., the object selection operation), it determines the target object among multiple objects in the accommodation space. Specifically, after the user adjusts the occlusion plane, the processor continues to identify and determine the target object in the accommodation space according to the user's second operation. Through the second operation, the user can further precisely select and lock the final target object. The second operation can be implemented through gesture interaction instructions or other input methods. After the processor determines the target object, it can highlight the target object (such as highlighting the target object with a yellow outline), making the target object the focus of interaction and facilitating the user to further operate.
[0064] Figure 5 And Figure 6It is a schematic diagram of the first - perspective process simulation of the object selection process provided by an embodiment of the present application. As Figure 5 shown in connection with Figure 6 , exemplarily, in a virtual reality space, the user adjusts an occlusion plane through gestures, causing an obstacle object (such as a tree) in the space to become semi - transparent, so as to see through to another tree that the user hopes to interact with. In this process, the processor exposes the target object from behind the obstacle object and, on this basis, responds to the user's second operation. The user may point at the tree serving as the target object through gestures or control an indication point through a handheld controller, causing the indication point to fall on the tree, clearly indicating that the user wants to interact with the tree. The processor then determines that the tree is the target object, highlights its outline, and prepares for the next operation, such as rotating or moving the tree.
[0065] In some embodiments, both the first operation and the second operation are triggered by the user's gestures;
[0066] Alternatively, the first operation is triggered by the user through a handheld controller, and the second operation is triggered by the user's gestures. The handheld controller is communicatively connected to the virtual reality interaction device;
[0067] Alternatively, both the first operation and the second operation are triggered by the user through a handheld controller.
[0068] Figure 7 It is a schematic diagram of three interaction input modes provided by an embodiment of the present application. As Figure 7 shown, in this embodiment, the user's interaction operation input includes three modes. In the first input mode, both the first operation (occlusion - plane adjustment operation) and the second operation (target - object selection operation) are triggered by the user's gestures. In this input mode, the user can complete all interaction steps through gestures without using additional hardware devices. For example, the user adjusts the occlusion plane through a left - hand gesture and selects the target object through a right - hand gesture;
[0069] In the second input mode, the first operation is triggered by the user through a handheld controller, while the second operation is triggered by the user's gestures, and the handheld controller remains communicatively connected to the virtual reality interaction device. The second input mode allows the user to combine the use of a handheld controller and gestures to achieve a more flexible interaction experience. For example, the user controls the handheld controller with the left hand to adjust the occlusion plane and selects the target object through a right - hand gesture;
[0070] In the third input mode, both the first operation and the second operation are triggered by the user through a handheld controller. In this input mode, the user completes all interaction operations through the handheld controller, providing a more centralized and integrated operation method. For example, the user operates the handheld controller with one hand, uses the handheld controller to emit a beam of virtual light to point to a target object, and adjusts the occlusion plane at the same time.
[0071] In some embodiments, in response to the user's second operation, determining a target object among multiple objects in the accommodation space includes:
[0072] Mapping the position coordinates corresponding to the indication point controlled by the user's second operation onto the occlusion plane to obtain remapped coordinates, where the indication point is located in the accommodation space;
[0073] Multiplying the position coordinates corresponding to the focus center by a first weight to obtain a first product, and multiplying the remapped coordinates by a second weight to obtain a second product, where the sum of the first weight and the second weight is a preset value, and the focus center is the geometric center of the occlusion plane;
[0074] Adding the first product and the second product to obtain the target position coordinates of the user's indication point;
[0075] Determining the target object among multiple objects in the accommodation space according to the target position coordinates of the indication point.
[0076] Figure 8 It is a schematic diagram of the process of determining the target position coordinates of the indication point provided by the embodiments of the present application. As Figure 8 shown, in this embodiment, in response to the user's second operation, the process by which the processor determines the target object among multiple objects in the accommodation space includes: First, mapping the position coordinates corresponding to the indication point controlled by the user's second operation onto the occlusion plane to obtain a remapped coordinate. This indication point is located in the accommodation space and is a certain position pointed to or selected by the user through the second operation. Next, the processor multiplies the position coordinates corresponding to the focus center (the focus center is the geometric center of the occlusion plane, representing the focus of the perspective) by a first weight to obtain a first product, and multiplies the remapped coordinates by a second weight to obtain a second product. Wherein, the sum of the first weight and the second weight is a preset value (the preset value can be 1). Then, the processor adds the first product and the second product to obtain the target position coordinates of the user's indication point, and the target position coordinates represent the position determination made by the processor on the indication point controlled by the user. Finally, the processor determines the target object among multiple objects in the accommodation space according to the target position coordinates of the indication point, thereby completing the selection of the object.
[0077] Exemplarily, the above process of determining the target position coordinates can be expressed as the following expression:
[0078]
[0079] Among them, is the target position coordinate of the indication point, is the remapped coordinate, is the position coordinate corresponding to the focus center, μ is the first weight, (1 - μ) is the second weight, and the preset value is 1.
[0080] Those skilled in the art can understand that since the processor maps the position coordinate corresponding to the indication point controlled by the user's second operation to the occlusion plane, objects or obstacle objects in front of the occlusion plane, that is, outside the accommodation space, will not respond to the user's operation, that is, the influence of objects or obstacle objects outside the accommodation space on the interaction process between the user and the target object is avoided.
[0081] In some embodiments, if both the first operation and the second operation are triggered by the user's gesture, the first weight is less than the second weight;
[0082] If the first operation is triggered by the user through a handheld controller and the second operation is triggered by the user's gesture, the first weight is greater than the first value, where the first value is the value of the first weight in the first input mode, and the handheld controller is communicatively connected to the virtual reality interaction device;
[0083] If both the first operation and the second operation are triggered by the user through a handheld controller, the first weight is 0.
[0084] In this embodiment, in order to balance the influence of the user's head movement (determining the position coordinate of the focus center) and hand movement (determining the remapped coordinate) on the determination result of the target position vector of the indication point, the values of the first weight and the second weight are different in different input modes. In the first input mode, when the value of the first weight is small, it means that in this mode, the processor gives the user's hand movement the dominant position in determining the target position vector. When the preset value is 1, the first weight μ can be set to ∈[0.2, 0.4). Those skilled in the art can understand that the processor can adjust the value of the first weight according to the user's feedback during device use. If the user feedbacks that the indication point moves too fast, the value of the first weight can be increased to reduce the influence of hand movement;
[0085] In the second input mode, and when the preset value is 1, the first weight μ can be set to ∈[0.4, 0.9), increasing the importance of head movement for determining the target position vector;
[0086] In the third input mode, μ is set to 0, indicating that the target position vector of the indication point is completely determined by the position of the indication point controlled by the user operating the handheld controller (the user can project a virtual light beam using the handheld controller to represent the position of the indication point), that is, determined by the remapped coordinates.
[0087] In some embodiments, determining a target object among multiple objects in the accommodation space according to the target position coordinates of the indication point includes:
[0088] Determining multiple objects in the accommodation space as candidate objects;
[0089] According to the position coordinates of each candidate object and the target position coordinates of the indication point, determining the distance and relative angle between each candidate object and the indication point;
[0090] Determining the target score of each candidate object according to the distance and relative angle between each candidate object and the indication point;
[0091] Determining the candidate object with the highest target score among multiple candidate objects as the target object.
[0092] In this embodiment, according to the target position coordinates of the indication point, the processor determines a target object among multiple objects in the accommodation space. First, the processor determines multiple objects in the accommodation space as candidate objects. Then, the processor calculates the distance and relative angle between each candidate object and the indication point according to the position coordinates of each candidate object and the target position coordinates of the indication point. Then, the processor determines the target score of each candidate object based on the distance and relative angle between each candidate object and the indication point (such as Figure 8 α and D in). The object with a high target score is considered the target object that the user is interested in. Finally, the processor can highlight the target object.
[0093] Exemplarily, assume that the user is in a virtual reality space and controls the indication point through gestures or a handheld controller to point to an object on the table. The processor first determines objects such as books, cups, and mobile phones on the table located in the accommodation space as candidate objects. Next, the processor calculates the distance and relative angle between each candidate object and the indication point. Then, the processor assigns a target score to each object based on these factors. The book has the highest target score, indicating that it is closest to the user's intention. Finally, the processor selects the book with the highest target score as the user's target object for further operations.
[0094] In some embodiments, determining the target score of each candidate object according to the distance and relative angle between each candidate object and the indication point includes:
[0095] Calculating the target score of each candidate object according to the following expression:
[0096]
[0097] where μ is the first weight, D is the distance between the candidate object and the indication point, α is the relative angle between the candidate object and the indication point, A and K are preset angle coefficients, β is a preset scaling coefficient, and G obj is the initial score, and S obj (t) is the target score of the candidate object, λ is the preset time viscosity coefficient, and S obj (t - 1) is the target score of the candidate object in the previous frame, and t is the sequence number of the current frame of the candidate object.
[0098] G obj is the initial score, which is calculated and then integrated into Expression (3). The parameters λ, A, K, and β represent the preset time viscosity coefficient, the preset angle coefficient, and the preset scaling coefficient respectively. The initial value of λ can be set to 0.5 to balance the historical and current target scores, and can be fine-tuned during the trial process of each user's device. S obj (t - 1) is the target score of the candidate object in the previous frame, t is the sequence number of the current frame of the candidate object (the 20th frame, the 21st frame...), and the sequence number of the current frame of the candidate object can be calculated starting from when the device begins to display the candidate object in the virtual reality space;
[0099] The processor can set A to 10 and K to 5 to better distinguish objects in the case of object occlusion, and can also fix β to 1.1. It should be noted that when the third input method is adopted, μ is set to 0, which means that only the angle deviation affects the target score.
[0100] Please refer to Figure 9 , which is a schematic structural diagram of the virtual reality interaction device provided by the embodiment of the present application. The second aspect of the embodiment of the present application provides a virtual reality interaction device 10, and the device 10 includes:
[0101] An acquisition module 11, configured to acquire the focus area of the user when using the virtual reality interaction device. The focus area is an accommodation space enclosed by multiple planes, and the accommodation space includes multiple objects, and the multiple objects include a target object;
[0102] An adjustment module 12, configured to, in response to the first operation of the user, adjust the spatial position of the occlusion plane among the multiple planes, so that the obstacle object is located outside the accommodation space. The obstacle object is an object among the multiple objects that occludes the target object, and the occlusion plane is the plane facing the user and closest to the user among the multiple planes. The display state of the obstacle object located outside the accommodation space is the target display state, and the target display state is a display state with a first transparency, and the first transparency is greater than the preset transparency threshold.
[0103] The virtual reality interaction device 10 provided in the second aspect of the embodiments of the present application can implement each process implemented in the above method embodiments and achieve the same beneficial effects. To avoid repetition, it will not be elaborated here.
[0104] Please refer to Figure 10 , which is a schematic structural diagram of an electronic device provided in the embodiments of the present application. The third aspect of the embodiments of the present application provides an electronic device 1000, including a processor 1100 and a memory 1200. The memory 1200 stores machine-executable instructions that can be executed by the processor 1100, and the processor 1100 can execute the machine-executable instructions to implement the above virtual reality interaction method.
[0105] The fourth aspect of the embodiments of the present application provides a machine-readable storage medium, on which instructions are stored. When the instructions are executed by a processor, the processor implements the above virtual reality interaction method.
[0106] In some embodiments, the embodiments of the present application also provide a computer program product, including a computer program, which implements the virtual reality interaction method according to the above embodiments when executed by a processor.
[0107] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable program code.
[0108] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks. These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing devices to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means, and the instruction means implements the functions in the processFigure 1 one or more processes and / or blocks Figure 1 the functions specified in one or more blocks. These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide for implementing the process Figure 1 one or more processes and / or blocks Figure 1 the steps of the functions specified in one or more blocks.
[0109] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.
[0110] The memory may include non-permanent memory in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
[0111] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can store information by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0112] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the presence of additional identical elements in the process, method, commodity or device comprising the element.
[0113] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
[0114] In addition, any combination can be made between various different embodiments of the present invention as long as it does not violate the idea of the present invention, and it should also be regarded as the content disclosed by the present invention.
Claims
1. A virtual reality interaction method, characterized in that: The method is applied to a virtual reality interactive device, and the method comprises: Acquire a focus area of the user when using the virtual reality interactive device, wherein the focus area is a containing space formed by a plurality of planes, wherein the containing space includes a plurality of objects, and wherein the plurality of objects includes a target object; In response to the first operation of the user, the spatial position of the blocking plane among the multiple planes is adjusted so that the obstacle object is located outside the accommodating space, the obstacle object is an object among the multiple objects that blocks the target object, the blocking plane is a plane among the multiple planes that faces the user and is closest to the user, and the display state of the obstacle object located outside the accommodating space is a target display state, and the target display state is a display state with a first transparency, and the first transparency is greater than a preset transparency threshold.
2. The method according to claim 1, characterized in that After adjusting the spatial position of the blocking plane among the multiple planes in response to the first operation of the user so that the obstacle object is located outside the accommodating space, the method further includes: In response to a second operation by the user, the target object is determined among a plurality of objects in the accommodating space.
3. The method according to claim 2, characterized in that The first operation and the second operation are both triggered by a gesture of the user; Alternatively, the first operation is triggered by the user through a handheld controller, the second operation is triggered by a gesture of the user, and the handheld controller is communicatively connected to the virtual reality interaction device; Alternatively, both the first operation and the second operation are triggered by the user through the handheld controller.
4. The method according to claim 2, characterized in that: In response to the second operation of the user, determining the target object among the multiple objects in the accommodating space includes: Mapping the position coordinates corresponding to the indication point controlled by the second operation of the user to the occlusion plane to obtain remapped coordinates, wherein the indication point is located in the accommodation space; Multiplying the position coordinates corresponding to the focal center by a first weight to obtain a first product, and multiplying the remapped coordinates by a second weight to obtain a second product, wherein the sum of the first weight and the second weight is a preset value, and the focal center is the geometric center of the occlusion plane; Adding the first product to the second product to obtain the target position coordinates of the user's indication point; The target object is determined among the multiple objects in the accommodating space according to the target position coordinates of the indication point.
5. The method according to claim 4, characterized in that The step of determining the target object among the multiple objects in the accommodating space according to the target position coordinates of the indication point includes: determining a plurality of objects in the accommodation space as candidate objects; Determine the distance and relative angle between each candidate object and the indication point according to the position coordinates of each candidate object and the target position coordinates of the indication point; Determine a target score for each candidate object according to the distance and relative angle between each candidate object and the indication point; A candidate object with the highest target score among the multiple candidate objects is determined as the target object.
6. The method according to claim 5, characterized in that The step of determining a target score for each candidate object according to the distance and relative angle between each candidate object and the indication point comprises: The target score of each candidate object is calculated according to the following expression: G obj =μ / D+A cos(Kα); S obj (t)=λS obj (t-1)+(1-λ)G obj / β; Wherein, μ is the first weight, D is the distance between the candidate object and the indication point, α is the relative angle between the candidate object and the indication point, A and K are preset angle coefficients, β is a preset scaling coefficient, G obj is the initial score, S obj (t) is the target score of the candidate object, λ is the preset time viscosity coefficient, S obj (t-1) is the target score of the candidate object in the previous frame, and t is the sequence number of the current frame of the candidate object.
7. The method according to claim 4, characterized in that If the first operation and the second operation are both triggered by the user's gesture, the first weight is less than the second weight; If the first operation is triggered by the user through a handheld controller, the second operation is triggered by a gesture of the user, the first weight is greater than a first value, wherein the first value is the value of the first weight in the first input mode, and the handheld controller is communicatively connected to the virtual reality interaction device; If the first operation and the second operation are both triggered by the user through the handheld controller, the first weight is 0.
8. A virtual reality interactive device, characterized in that: The device is applied to a virtual reality interactive device, and comprises: an acquisition module, used to acquire a focus area of a user when using the virtual reality interactive device, wherein the focus area is a containing space formed by a plurality of planes, wherein the containing space includes a plurality of objects, and wherein the plurality of objects includes a target object; An adjustment module is used to adjust the spatial position of the blocking plane among the multiple planes in response to the first operation of the user, so that the obstacle object is located outside the accommodating space, the obstacle object is an object among the multiple objects that blocks the target object, the blocking plane is a plane among the multiple planes that faces the user and is closest to the user, and the display state of the obstacle object located outside the accommodating space is a target display state, and the target display state is a display state with a first transparency, and the first transparency is greater than a preset transparency threshold.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the virtual reality interaction method according to any one of claims 1 to 7 is implemented.
10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores instructions, which, when executed by a processor, enable the processor to implement the virtual reality interaction method according to any one of claims 1 to 7.
Citation Information
Patent Citations
A virtual object presentation method and device for head-mounted display equipment
CN109710054A
Interaction control method and device in augmented reality space, equipment and storage medium
CN116225237A
Three-dimensional gesture interaction method and virtual reality equipment
CN118466736A
Method and Apparatus for Displaying Interactive Item, Terminal, and Storage Medium
US20220212107A1
Method and apparatus for determining security area, device, and storage medium
US20240020930A1