Collision feedback method and apparatus, and device, medium and product
By detecting and responding to collision events in virtual model scenes, the problem of insufficient realism in virtual imaging interaction is solved, thus enhancing the user's immersive experience.
Patent Information
- Application Number
- PCT/CN2025/104472
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-08
- Filing Date
- 2025-06-27
- Publication Date
- 2026-01-15
AI Technical Summary
The virtual imaging function lacks realism in its interaction, resulting in a poor user immersion experience.
Detect movement commands of object models in a virtual model scene, obtain the collision state between the target object model and scene objects, and perform collision feedback operations when a collision exists, including restricting movement and/or visual feedback.
It enhances the realism of virtual imaging functionality and strengthens the user's immersive experience.
Smart Images

Figure CN2025104472_15012026_PF_FP_ABST
Abstract
Description
Collision feedback methods, devices, equipment, media and products
[0001] This application claims priority to Chinese Patent Application No. 202410910875.9, filed on July 8, 2024, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of Internet technology, such as collision feedback methods, devices, equipment, media, and products. Background Technology
[0003] With the development of internet technology, more and more applications are providing users with virtual imaging capabilities, such as games and consumer applications. Virtual imaging can simulate the placement of object models within a scene space, and by recognizing the user's interactive intent, it can also adjust the placement of the object models within the scene space.
[0004] In the process of developing this application, at least the following technical problems were found in the related technologies:
[0005] The virtual imaging function provided in the application lacks realism, resulting in a poor immersive experience for users. Summary of the Invention
[0006] This application provides collision feedback methods, apparatus, devices, media, and products to address the problem of insufficient realism in the interaction of virtual imaging functions and improve the user's immersive experience.
[0007] According to one embodiment of this application, a collision feedback method is provided, the method comprising:
[0008] In response to detecting a user's model movement command, a movement operation is performed on the target object model in the virtual model scene corresponding to the model movement command; during the execution of the movement operation, the collision state between the target object model and the scene object in the virtual model scene is obtained; if the collision state indicates that a collision exists, the collision plane corresponding to the target object model and the scene object is obtained; based on the collision plane, a collision feedback operation is performed; wherein, the scene object is another object model in the virtual model scene other than the target object model or a real scene object in the virtual model scene, and the collision feedback operation includes restricting the movement operation and / or visual feedback operation.
[0009] According to another embodiment of this application, a collision feedback device is provided, the device comprising:
[0010] A movement operation execution module is configured to perform a movement operation on a target object model in a virtual model scene corresponding to the movement command in response to detecting a user's model movement command; a collision state acquisition module is configured to acquire the collision state between the target object model and a scene object in the virtual model scene during the execution of the movement operation; a collision plane acquisition module is configured to acquire the collision plane corresponding to the target object model and the scene object when the collision state indicates that a collision exists; a collision feedback operation execution module is configured to perform a collision feedback operation based on the collision plane; wherein, the scene object is an object model other than the target object model in the virtual model scene or a real scene object in the virtual model scene, and the collision feedback operation includes restricting movement operations and / or visual feedback operations.
[0011] According to another embodiment of this application, an electronic device is provided, the electronic device comprising:
[0012] At least one processor; and a memory communicatively connected to said at least one processor; wherein,
[0013] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the collision feedback method described above.
[0014] According to another embodiment of this application, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the above-described collision feedback method.
[0015] According to another embodiment of this application, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described collision feedback method. Attached Figure Description
[0016] Figure 1 is a flowchart of a collision feedback method provided in an embodiment of this application;
[0017] Figure 2 is a schematic diagram of a movement restriction operation provided in an embodiment of this application;
[0018] Figure 3 is a schematic diagram of a collision warning diagram displayed in a virtual model scene according to an embodiment of this application;
[0019] Figure 4 is a flowchart of another collision feedback method provided in an embodiment of this application;
[0020] Figure 5 is a flowchart of an example of a collision feedback method provided in an embodiment of this application;
[0021] Figure 6 is a schematic diagram of a collision feedback device provided in an embodiment of this application;
[0022] Figure 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0023] The terms “target,” “reference,” etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0024] Figure 1 is a flowchart of a collision feedback method provided in an embodiment of this application. This embodiment is applicable to situations where collision events occurring during the movement of an object model in a virtual model scene require response feedback. This method can be executed by a collision feedback device, which can be implemented in hardware and / or software and can be configured in a terminal device. As shown in Figure 1, the method includes:
[0025] S110. In response to detecting a user's model movement command, perform a movement operation on the target object model in the virtual model scene corresponding to the model movement command.
[0026] The model movement command is used to instruct a specified object model in the virtual model scene to move within the virtual model scene. The virtual model scene represents an application business scenario built using virtual imaging technology, and the target object model represents a virtual model of an object constructed in the virtual model scene.
[0027] In one embodiment, the virtual model scene employs either Virtual Reality (VR) or Mixed Reality (MR) technology for virtual imaging. Mixed Reality can be understood as a combination of Augmented Reality (AR) and Virtual Reality, a technology that merges the virtual world with the real world. By integrating virtual models of objects with real-world scenes, Mixed Reality technology allows virtual models and real objects to interact within the same space.
[0028] When a virtual model scene is built using virtual reality technology, it is a virtual reality scene; when a virtual model scene is built using mixed reality technology, it represents a fusion scene of real space scene and virtual reality scene.
[0029] In one embodiment, the method further includes: when the virtual model scene is constructed using mixed reality technology, performing spatial scanning, planar recognition, and object recognition on the real scene space to obtain the real space scene; and loading at least one preset object model from the virtual reality scene into the real space scene to obtain the virtual model scene.
[0030] In one embodiment, the virtual model scene is an indoor home scene built using mixed reality technology. The indoor home scene represents a fusion of the real indoor scene and the virtual model scene, and includes real-world objects from the real indoor scene and object models corresponding to home furnishings from the virtual model scene. For example, real-world objects include walls, floors, ceilings, windows, doors, and bookshelves, etc., while home furnishings include sofas, tables, and chairs, etc.
[0031] In one embodiment, the method further includes: selecting a target object model from at least one preset object model based on the user's gaze direction and the model enclosure area corresponding to at least one preset object model in the virtual model scene; and generating a model movement command based on the movement gesture and the target object model in response to detecting the user's movement gesture.
[0032] The model-enclosed region is used to represent the spatial location and volume occupied by the preset object model in the virtual model scene.
[0033] In one embodiment, the method further includes: traversing multiple vertex positions of the preset object model to obtain the model-enclosed region based on the model nodes corresponding to the preset object model. Here, the model nodes represent nodes in the preset object model that possess transformation information, including translation information, rotation information, and scaling information.
[0034] In one embodiment, the method further includes: obtaining the dwell time corresponding to the user's current gaze direction; and using the current gaze direction as the gaze positioning direction if the dwell time is greater than or equal to a preset duration threshold. For example, the preset duration threshold can be 3 seconds or 5 seconds; the preset duration threshold is not limited here and can be customized according to actual needs.
[0035] Based on the above embodiments, after obtaining the dwell time corresponding to the user's current gaze direction, the method further includes: if the dwell time is less than a preset duration threshold, taking the user's next gaze direction as the user's current gaze direction, and returning to the step of obtaining the dwell time corresponding to the user's current gaze direction.
[0036] The selection steps for the target object model include: filtering preset object models corresponding to at least one model-enclosed region located along the viewing direction; if only one preset object model is selected, it is used as the target object model; if multiple preset object models are selected, the preset object model corresponding to the model-enclosed region closest to the user's location is selected as the target object model. Here, the user's location represents their position within the virtual model scene.
[0037] For example, the movement gesture can be pinch movement, single-finger movement, or two-finger movement. There is no limitation on the movement gesture here, and it can be customized according to actual needs.
[0038] The model movement command includes motion vectors of the target object model generated in real time based on the movement gestures to indicate the movement operation.
[0039] S120. During the execution of the movement operation, obtain the collision state between the target object model and the scene object in the virtual model scene.
[0040] In this embodiment, the scene object is a model of an object other than the target object in the virtual model scene, or a real-world scene object in the virtual model scene. When the virtual model scene is built using virtual reality technology, the scene object is a model of an object other than the target object in the virtual model scene; when the virtual model scene is built using mixed reality technology, the scene object is a model of an object other than the target object in the virtual model scene, or a real-world scene object in the corresponding real-world space scene of the virtual model scene.
[0041] In one embodiment, obtaining the collision state between the target object model and scene object objects in the virtual model scene includes: obtaining the distance between the target object model and scene object objects in the virtual model scene; and determining the collision state between the target object model and scene object objects based on the distance.
[0042] When the scene object is another object model, the distance between the target object model and other object models is determined based on the model enclosure regions corresponding to the target object model and other object models respectively; when the scene object model is a real scene object, the distance between the target object model and the real scene object is determined based on the model enclosure region corresponding to the target object model and the object boundary position corresponding to the real scene object.
[0043] In one embodiment, determining the collision state between the target object model and the scene object based on the interval distance includes: if the interval distance is less than or equal to zero, setting the collision state between the target object model and the scene object to have a collision; if the interval distance is greater than zero, setting the collision state between the target object model and the scene object to not have a collision.
[0044] S130. When the collision state is that a collision exists, obtain the collision planes corresponding to the target object model and the scene object.
[0045] The collision plane is used to characterize the spatial plane to which the collision event occurs between the target object model and the scene object.
[0046] S140. Perform collision feedback operation based on the collision plane.
[0047] In this embodiment, the collision feedback operation includes a movement restriction operation and / or a visual feedback operation. The movement restriction operation prevents the target object model from continuing to move along the vertical vector direction corresponding to the collision plane, thus controlling the target object model to prevent further movement along this direction. The visual feedback operation displays a collision warning map generated based on the collision plane in the virtual model scene.
[0048] In one embodiment, performing a collision feedback operation based on the collision plane includes: when the collision feedback operation includes a movement restriction operation, obtaining the next motion vector of the target object model; decomposing the next motion vector into a horizontal motion vector corresponding to the horizontal vector direction based on the horizontal and vertical vector directions corresponding to the collision plane; and continuing to perform a movement operation on the target object model based on the horizontal motion vector.
[0049] The current motion vector of the target object model represents the motion vector at the current moment when a collision event occurs between the target object model and the scene object in the model movement command. The next motion vector represents the motion vector at the next moment corresponding to the current moment in the model movement command.
[0050] In one embodiment, the next motion vector includes the next motion displacement and / or the next motion velocity; correspondingly, the horizontal motion vector includes the horizontal motion displacement and / or the horizontal motion velocity. The direction of the horizontal motion component is the same as the direction of the horizontal vector, and the magnitude of the horizontal motion component is equal to the product of the magnitude of the next motion component and the cosine of the decomposition angle, where the decomposition angle is the angle between the direction of the horizontal vector and the next motion direction corresponding to the next motion component.
[0051] Figure 2 is a schematic diagram of a movement restriction operation provided in an embodiment of this application. In Figure 2, arrow 1 indicates the horizontal vector direction of the collision plane, and arrow 2 indicates the vertical vector direction of the collision plane. Arrow 3 in Figure 2 represents the next motion vector, the direction of arrow 3 indicates the next motion direction corresponding to the next motion vector, and the length of arrow 3 indicates the next motion magnitude of the next motion vector. Arrow 4 represents the horizontal motion vector obtained by decomposing arrow 3, the direction of arrow 4 indicates the horizontal motion direction corresponding to the horizontal motion vector, and the length of arrow 4 indicates the horizontal motion magnitude of the horizontal motion vector.
[0052] The advantage of setting movement restrictions is that after a collision event occurs between the target object model and a scene object, the next motion vector in the model movement command will not cause the target object model to pass through the scene object, thereby further improving the realism of the virtual imaging function.
[0053] In another embodiment, the collision feedback operation is performed based on the collision plane, including: when the collision feedback operation includes a visual feedback operation, obtaining the projection plane of the target object model on the collision plane, and obtaining the projection center position and projection plane area of the projection plane; generating a collision warning map based on a preset magnification ratio and projection plane area; and performing a visual feedback operation in the virtual model scene based on the projection center position, the collision warning map, and the collision plane.
[0054] In one embodiment, obtaining the projection plane of the target object model on the collision plane includes: taking the vertical vector direction of the collision plane as the projection direction; and projecting the target object model onto the collision plane along the projection direction to obtain the projection plane.
[0055] In another embodiment, obtaining the projection plane of the target object model on the collision plane includes: obtaining the current motion direction corresponding to the current motion vector of the target object model, and using the current motion direction as the projection direction; projecting the target object model onto the collision plane along the projection direction to obtain the projection plane.
[0056] The preset magnification ratio is a value greater than 1. For example, the preset magnification ratio can be 1.2 or 1.5. There is no limitation on the preset magnification ratio here, and it can be customized according to actual needs.
[0057] The area of the collision warning image is the product of a preset magnification ratio and the area of the projection plane. For example, the pattern in the collision warning image can be a red grid pattern or a blue circular pattern, and the image shape of the collision warning image can be square or circular. There are no limitations on the preset magnification ratio, the pattern in the collision warning image, or the image shape of the collision warning image; these can be customized according to actual needs.
[0058] In one embodiment, a visual feedback operation is performed in a virtual model scene based on the projection center position, the collision hint image, and the collision plane, including: using the projection center position as the display center position of the collision hint image in the virtual model scene; using the vertical vector direction corresponding to the collision plane as the display orientation of the collision hint image in the virtual model scene; and displaying the collision hint image in the virtual model scene based on the display center position and the display orientation.
[0059] Figure 3 is a schematic diagram of a collision warning image displayed in a virtual model scene according to an embodiment of this application. Figure 3 uses an indoor home scene as an example of a virtual model scene. The table in Figure 2 represents the target object model. When the table moves and collides with the sofa in the indoor home scene, a collision warning image is displayed between the table and the sofa. The collision warning image in Figure 3 is a square grid.
[0060] The advantage of setting up visual feedback is that it allows users to quickly locate the collision plane where the collision occurred. It not only enables response feedback to collision events, but also provides positional references for users to adjust the motion vectors or placement of the target object model.
[0061] Based on the above embodiments, the method further includes: when the collision state is that a collision exists, playing a collision warning sound and / or displaying collision warning information in the virtual model scene.
[0062] In one embodiment, the collision alert sound is generated using preset audio parameters. Exemplary preset audio parameters include volume, timbre, and pitch, among others.
[0063] In another embodiment, the method further includes: selecting a matching collision alert sound from a alert sound database based on entity object pairs consisting of the target object model and scene object objects. The alert sound database stores actual collision audio between at least one set of entity object pairs. For example, entity object pairs include table and floor, table and mirror, and lamp and mirror, etc.
[0064] Collision alert messages indicate that a target object model has collided with an object in the scene. For example, the collision alert message could be "The table collided with the sofa here." The specific collision alert message is not limited here and can be customized according to actual needs.
[0065] In one embodiment, displaying collision warning information in a virtual model scene includes: obtaining the display area of the collision warning map in the virtual model scene, and displaying the collision warning information in the virtual model scene according to the display area. For example, the collision warning information may be displayed within or outside the display area.
[0066] In another embodiment, displaying collision warning information in a virtual model scene includes: overlaying the collision warning information onto the target object model in the virtual model scene.
[0067] The advantage of this setup is that it enriches the collision feedback between the sound and text dimensions, thereby further enhancing the interactive experience of the virtual imaging function.
[0068] The technical solution of this embodiment obtains the collision state between the target object model and the scene object in the virtual model scene during the movement operation of the target object model in the virtual model scene. When the collision state is that there is a collision, the collision plane corresponding to the target object model and the scene object is obtained. According to the collision plane, the collision feedback operation is performed, so that the user can perceive collision events similar to those that occur when objects move in the real world in the virtual model scene. This solves the problem of insufficient interactive realism of virtual imaging function and improves the user's immersive experience.
[0069] Figure 4 is a flowchart of another collision feedback method provided in an embodiment of this application. This embodiment describes the "determining the collision state between the target object model and the scene object based on the interval distance" in the above embodiment. As shown in Figure 4, the method includes:
[0070] S210. In response to detecting a user's model movement command, perform a movement operation on the target object model in the virtual model scene corresponding to the model movement command.
[0071] S220. During the execution of the movement operation, obtain the distance between the target object model and the scene object in the virtual model scene.
[0072] In this embodiment, S210-S220 correspond to the same or similar technical features as those provided in the above embodiments, and will not be described again in this embodiment.
[0073] S230. Determine the contact state between the target object model and the scene object based on the interval distance.
[0074] If the distance between the target object model and the scene object is less than or equal to zero, the contact state between them is set to "contact exists"; if the distance between them is greater than zero, the contact state is set to "no contact exists".
[0075] S240. When the contact state is that there is contact, obtain the next motion direction corresponding to the next motion vector of the target object model.
[0076] The next motion vector represents the motion vector in the model's movement command corresponding to the next moment, while the next motion direction describes the direction of the next motion vector.
[0077] S250. Determine the collision state between the target object model and the scene object based on the next direction of motion.
[0078] In one embodiment, determining the collision state between the target object model and the scene object based on the next motion direction includes: obtaining the current motion direction corresponding to the current motion vector of the target object model; and setting the collision state between the target object model and the scene object to exist if the current motion direction is the same as the next motion direction.
[0079] The current motion vector represents the motion vector at the current moment when a collision event occurs between the target object model and the scene object in the model's movement command. The current motion direction describes the direction of the current motion vector.
[0080] Based on the above embodiments, after obtaining the current motion direction of the current motion vector of the target object model, the method further includes: when the current motion direction is different from the next motion direction, setting the collision state between the target object model and the scene object to non-collision.
[0081] If the current direction of motion is the same as the next direction of motion, it means that the target object model has a tendency to continue moving in the current direction of motion after making contact with the scene object. In this case, the collision state between the target object model and the scene object is set to "collision exists". If the current direction of motion is different from the next direction of motion, it means that the target object model does not have a tendency to continue moving in the current direction of motion after making contact with the scene object. In this case, the collision state between the target object model and the scene object is set to "collision does not exist".
[0082] In another embodiment, determining the collision state between the target object model and the scene object based on the next direction of motion includes: when the scene object is a real scene object in a virtual model scene, acquiring the user's pose data in the virtual model scene; determining the motion trend of the target object model relative to the user based on the next direction of motion and the user pose data; and setting the collision state between the target object model and the scene object to exist when the motion trend is moving away from the user.
[0083] In one embodiment, user pose data includes device orientation and / or user location. Device orientation represents the positive direction of the virtual imaging device worn by the user, and user location represents the user's position within the virtual model scene.
[0084] In one embodiment, determining the motion trend of the target object model relative to the user based on the next motion direction and user pose data includes: when the user pose data only includes the device orientation, obtaining the directional angle between the device orientation and the next motion direction; when the directional angle is less than 90°, setting the motion trend of the target object model relative to the user to move away; when the directional angle is greater than 90°, setting the motion trend of the target object model relative to the user to move closer.
[0085] In another embodiment, determining the motion trend of the target object model relative to the user based on the next motion direction and user pose data includes: when the user pose data only includes the user's location, determining the current distance based on the current model position of the target object model and the user's location; determining the reference model position based on the current model position and the next motion direction, and determining the reference distance based on the reference model position and the user's location; if the reference distance is less than the standard distance, setting the motion trend of the target object model relative to the user to move closer; if the reference distance is greater than the standard distance, setting the motion trend of the target object model relative to the user to move further away.
[0086] The reference model position is any scene position on the ray formed by the next direction of motion, starting from the current model position.
[0087] In another embodiment, determining the motion trend of the target object model relative to the user based on the next motion direction and user pose data includes: when the user pose data includes device orientation and user positioning, determining a first trend of the target object model relative to the user based on device orientation and next motion direction; determining a second trend of the target object model relative to the user based on user positioning and next motion direction; and setting the motion trend of the target object model relative to the user as the first trend or the second trend if the first trend and the second trend are the same.
[0088] The advantage of this setting is that it can further improve the accuracy of movement trends.
[0089] Based on the above embodiments, after determining the motion trend of the target object model relative to the user according to the next motion direction and user pose data, the method further includes: when the motion trend is approaching motion, setting the collision state between the target object model and the scene object to non-collision.
[0090] After an object model is loaded into a real-world scene, an anomaly may occur where the object model intersects with real-world objects, causing the object model to be judged as colliding with real-world objects as soon as it begins to move. If the collision feedback operation includes restricting movement, the object model may never be able to separate from the real-world objects. The above embodiment determines the collision state based on the movement trend of the target object model relative to the user. This ensures that during the process of the target object model separating from real-world objects, that is, during the movement of the target object model towards the user, it will not be mistakenly judged as a collision event caused by a user-instructed movement operation, thereby improving the fault tolerance and stability of the virtual imaging function.
[0091] S260. When the collision state is that a collision exists, obtain the collision planes corresponding to the target object model and the scene object.
[0092] S270. Perform collision feedback operation based on the collision plane.
[0093] In this embodiment, S260-S270 correspond to the same or similar technical features as those provided in the above embodiments, and will not be described again in this embodiment.
[0094] The technical solution of this embodiment determines the contact state between the target object model and the scene object based on the interval distance. When the contact state is that there is contact, the next motion direction of the next motion vector of the target object model is obtained. Based on the next motion direction, the collision state between the target object model and the scene object is determined. This solves the problem of high false judgment rate of collision state and improves the accuracy of collision state detection results, thereby further improving the interactive effect of virtual imaging function.
[0095] Figure 5 is a flowchart of an example of a collision feedback method provided in this application embodiment. During the virtual model scene display, in response to the detection of a model movement command, a movement operation is performed on the target object model corresponding to the movement command. During the movement operation, based on the distance between the target object model and the scene object, it is determined whether there is contact between the target object model and the scene object. If there is no contact, the movement operation continues. If there is contact, the movement trend of the target object model relative to the user is determined. If the movement trend is towards the user, the movement operation continues. If the movement trend is away from the user, a collision is considered to exist, and collision feedback is provided. Collision feedback includes restricting movement operations, visual feedback operations, playing a collision warning sound, and displaying collision warning information.
[0096] The following are embodiments of the collision feedback device provided in this application. This device and the collision feedback method in the above embodiments belong to the same application concept. For details not described in detail in the embodiments of the collision feedback device, please refer to the content about the collision feedback method in the above embodiments.
[0097] Figure 6 is a schematic diagram of a collision feedback device provided in an embodiment of this application. As shown in Figure 6, the device includes: a movement operation execution module 310, a collision state acquisition module 320, a collision plane acquisition module 330, and a collision feedback operation execution module 330.
[0098] The movement operation execution module 310 is configured to perform a movement operation on the target object model corresponding to the model movement command in the virtual model scene in response to the detection of the user's model movement command; the collision state acquisition module 320 is configured to acquire the collision state between the target object model and the scene object in the virtual model scene during the execution of the movement operation; the collision plane acquisition module 330 is configured to acquire the collision plane corresponding to the target object model and the scene object when the collision state is that there is a collision; the collision feedback operation execution module 330 is configured to perform a collision feedback operation based on the collision plane; wherein, the scene object is an object model other than the target object model in the virtual model scene or a real scene object in the virtual model scene, and the collision feedback operation includes restricting the movement operation and / or visual feedback operation.
[0099] The technical solution of this embodiment obtains the collision state between the target object model and the scene object in the virtual model scene during the movement operation of the target object model in the virtual model scene. When the collision state is that there is a collision, the collision plane corresponding to the target object model and the scene object is obtained. According to the collision plane, the collision feedback operation is performed, so that the user can perceive collision events similar to those that occur when objects move in the real world in the virtual model scene. This solves the problem of insufficient interactive realism of virtual imaging function and improves the user's immersive experience.
[0100] In one embodiment, the collision feedback operation execution module 330 includes:
[0101] The restricted movement operation execution unit is configured to, when the collision feedback operation includes a restricted movement operation, obtain the next motion vector of the target object model; decompose the next motion vector according to the horizontal and vertical vector directions corresponding to the collision plane to obtain the horizontal motion vector corresponding to the horizontal vector direction; and continue to perform the movement operation on the target object model according to the horizontal motion vector.
[0102] In one embodiment, the collision feedback operation execution module 330 includes:
[0103] The projection plane acquisition unit is configured to acquire the projection plane of the target object model on the collision plane when the collision feedback operation includes a visual feedback operation, and to acquire the projection center position and projection plane area of the projection plane; the collision hint image generation unit is configured to generate a collision hint image according to a preset magnification ratio and the projection plane area; the visual feedback operation execution unit is configured to execute the visual feedback operation in the virtual model scene according to the projection center position, the collision hint image and the collision plane.
[0104] In one embodiment, the visual feedback operation execution unit is configured as follows:
[0105] The center position of the projection is used as the display center position of the collision warning image in the virtual model scene; the vertical vector direction corresponding to the collision plane is used as the display orientation of the collision warning image in the virtual model scene; based on the display center position and display orientation, the collision warning image is displayed in the virtual model scene.
[0106] In one embodiment, the method further includes:
[0107] The collision warning information display module is configured to play a collision warning sound and / or display a collision warning message in the virtual model scene when the collision status is "collision exists".
[0108] In one embodiment, the collision state acquisition module 320 includes:
[0109] The interval distance acquisition unit is set to acquire the interval distance between the target object model and the scene object in the virtual model scene; the collision state determination unit is set to determine the collision state between the target object model and the scene object based on the interval distance.
[0110] In one embodiment, the collision state determination unit includes:
[0111] The contact state determination subunit is configured to determine the contact state between the target object model and the scene object based on the interval distance; the next motion direction acquisition subunit is configured to acquire the next motion direction corresponding to the next motion vector of the target object model when the contact state is "contact exists"; the collision state determination subunit is configured to determine the collision state between the target object model and the scene object based on the next motion direction.
[0112] In one embodiment, the collision state determination subunit is configured as follows:
[0113] Obtain the current motion direction corresponding to the current motion vector of the target object model; if the current motion direction is the same as the next motion direction, set the collision state between the target object model and the scene object to exist.
[0114] In one embodiment, the collision state determination subunit is configured as follows:
[0115] When the scene object is a real scene object in the virtual model scene, obtain the user's pose data in the virtual model scene; determine the motion trend of the target object model relative to the user based on the next motion direction and the user pose data; when the motion trend is moving away, set the collision state between the target object model and the scene object to exist.
[0116] In one embodiment, the device further includes:
[0117] The collision state setting module is configured to, after determining the motion trend of the target object model relative to the user based on the next motion direction and user pose data, set the collision state between the target object model and scene objects to non-collision when the motion trend is approaching motion.
[0118] In one embodiment, the virtual model scene is an indoor home scene built using mixed reality technology. The indoor home scene represents the fusion of the real indoor scene and the virtual reality scene. The indoor home scene includes real objects in the real indoor scene and object models corresponding to home items in the virtual reality scene.
[0119] The collision feedback device provided in this application embodiment can execute the collision feedback method provided in any embodiment of this application, and has the corresponding functional modules and effects of the execution method.
[0120] Figure 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 10 is intended to represent a head-mounted display device employing virtual imaging technology, or a computing device communicatively connected to a head-mounted display device employing virtual imaging technology. Exemplarily, the computing device can be a variety of forms of digital computers, such as laptop computers, desktop computers, workbenches, servers, blade servers, mainframe computers, and other suitable computers. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or claimed herein.
[0121] As shown in Figure 7, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor 11. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded into the RAM 13 from the storage unit 18. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0122] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information or data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0123] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs several methods and processes described above, such as the collision feedback method provided in the above embodiments.
[0124] In some embodiments, the collision feedback method provided in the above embodiments can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the collision feedback method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the collision feedback method by any other suitable means (e.g., by means of firmware).
[0125] The various implementations of the systems and techniques described above herein can be implemented in the following systems or combinations thereof: digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard parts (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0126] Computer programs used to implement the collision feedback method of this application can be written in any combination of one or more programming languages. These computer programs can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0127] In the context of this application, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable storage medium. Examples of machine-readable storage media include, based on an electrical connection of at least one wire, a portable computer disk, a hard disk, RAM, ROM, erasable programmable read-only memory (EPROM), flash memory, optical fiber, compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0128] To provide interaction with a user, the systems and techniques described herein can be implemented on a terminal device having: a display device configured to display information to the user (e.g., a cathode-ray tube (CRT) or liquid crystal display (LCD) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the terminal device. Other types of devices can also provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0129] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0130] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system. It addresses the shortcomings of traditional physical hosts and Virtual Private Server (VPS) services, such as high management difficulty and weak business scalability.
[0131] The various processes shown above can be used to rearrange, add, or delete steps. For example, the multiple steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this application can be achieved, and this is not limited herein.
Claims
1. A collision feedback method, comprising: In response to detecting a user's model movement command, a movement operation is performed on the target object model in the virtual model scene corresponding to the model movement command; During the execution of the movement operation, the collision state between the target object model and scene object objects in the virtual model scene is obtained; In response to the collision state being that a collision exists, the collision planes corresponding to the target object model and the scene object are obtained; Perform a collision feedback operation based on the collision plane; Wherein, the scene object is an object model other than the target object model in the virtual model scene or a real scene object in the virtual model scene, and the collision feedback operation includes at least one of the movement restriction operation and the visual feedback operation.
2. The method according to claim 1, wherein, The step of performing a collision feedback operation based on the collision plane includes: In response to the collision feedback operation, which includes a movement restriction operation, the next motion vector of the target object model is obtained; Based on the horizontal and vertical vector directions corresponding to the collision plane, the next motion vector is decomposed to obtain the horizontal motion vector corresponding to the horizontal vector direction; Based on the horizontal motion vector, the target object model continues to be moved.
3. The method according to claim 1, wherein, The step of performing a collision feedback operation based on the collision plane includes: In response to the collision feedback operation, which includes a visual feedback operation, the projection plane of the target object model on the collision plane is obtained, and the projection center position and projection plane area of the projection plane are obtained. A collision warning image is generated based on the preset magnification ratio and the area of the projected plane; Based on the projection center position, the collision warning diagram, and the collision plane, a visual feedback operation is performed in the virtual model scene.
4. The method according to claim 3, wherein, The step of performing visual feedback operations in the virtual model scene based on the projection center position, the collision warning map, and the collision plane includes: The projection center position is used as the display center position of the collision warning map in the virtual model scene; The vertical vector direction corresponding to the collision plane is used as the display orientation of the collision warning map in the virtual model scene; The collision warning image is displayed in the virtual model scene according to the display center position and the display orientation.
5. The method according to claim 1, further comprising: In response to the collision state indicating a collision exists, at least one of playing a collision alert sound and displaying a collision alert message in the virtual model scene is executed.
6. The method according to claim 1, wherein, The step of obtaining the collision state between the target object model and scene objects in the virtual model scene includes: Obtain the distance between the target object model and scene objects in the virtual model scene; Based on the interval distance, the collision state between the target object model and the scene object is determined.
7. The method according to claim 6, wherein, Determining the collision state between the target object model and the scene object based on the interval distance includes: Based on the interval distance, the contact state between the target object model and the scene object is determined; In response to the contact state indicating that contact exists, the next motion direction corresponding to the next motion vector of the target object model is obtained; Based on the next direction of motion, determine the collision state between the target object model and the scene object.
8. The method according to claim 7, wherein, Determining the collision state between the target object model and the scene object based on the next direction of motion includes: Obtain the current motion direction corresponding to the current motion vector of the target object model; In response to the current direction of motion being the same as the next direction of motion, the collision state between the target object model and the scene object is set to "collision exists".
9. The method according to claim 7, wherein, Determining the collision state between the target object model and the scene object based on the next direction of motion includes: In response to the fact that the scene object is a real scene object in the virtual model scene, the user's pose data in the virtual model scene is obtained; Based on the next direction of motion and the user pose data, determine the motion trend of the target object model relative to the user; In response to the motion trend being moving away, the collision state between the target object model and the scene object is set to "collision exists".
10. The method according to claim 9, wherein, After determining the motion trend of the target object model relative to the user based on the next motion direction and the user pose data, the method further includes: In response to the motion trend being a moving closer motion, the collision state between the target object model and the scene object is set to non-collision.
11. The method according to any one of claims 1-10, wherein, The virtual model scene is an indoor home scene built using mixed reality technology. The indoor home scene represents a fusion of real indoor scene and virtual reality scene. The indoor home scene includes real scene objects in the real indoor scene and object models corresponding to home items in the virtual reality scene.
12. A collision feedback device, comprising: The movement operation execution module is configured to perform a movement operation on a target object model in the virtual model scene corresponding to the model movement command in response to the detection of a user's model movement command. The collision state acquisition module is configured to acquire the collision state between the target object model and scene object objects in the virtual model scene during the execution of the movement operation. The collision plane acquisition module is configured to acquire the collision planes corresponding to the target object model and the scene object in response to the collision state indicating that a collision exists. The collision feedback operation execution module is configured to perform a collision feedback operation based on the collision plane. Wherein, the scene object is an object model other than the target object model in the virtual model scene or a real scene object in the virtual model scene, and the collision feedback operation includes at least one of the movement restriction operation and the visual feedback operation.
13. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the collision feedback method according to any one of claims 1-11.
14. A computer-readable storage medium storing computer instructions for causing a processor to execute and implement the collision feedback method of any one of claims 1-11.
15. A computer program product comprising a computer program that, when executed by a processor, implements the collision feedback method according to any one of claims 1-11.
Citation Information
Patent Citations
Prop control method and device in virtual scene, equipment and storage medium
CN113750530A
Collision detection method and device, electronic equipment and storage medium
CN114225413A
Collision detection method and system in three-dimensional scene
CN114926604A
Collision detection method and device, electronic equipment and storage medium
CN117994284A
Collision feedback method, device, equipment, medium and product
CN118885068A