Shadow interaction method and device, equipment and medium thereof
By responding to light and shadow activation commands in a 3D virtual scene, users can manipulate entities in the interactive virtual scene, and the shadows are updated in real time in conjunction with the pose changes of the entities. This solves the problems of low operation efficiency and insufficient visual feedback, and achieves an efficient and intuitive interactive experience.
Patent Information
- Application Number
- CN202610922309.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-25
- Publication Date
- 2026-07-28
AI Technical Summary
In 3D virtual scenes, the object that the user manipulates and the object that is ultimately affected are usually the same object. The operation process and the result are confined to the same area, which leads to low operation efficiency, lack of visual feedback and smoothness in complex scenes.
By responding to light and shadow activation commands to determine the interactive virtual scene, users can manipulate interactive entities within the virtual scene. The changes in the pose of the entities are linked to the real-time updates of shadows in the virtual scene, providing an independent operating space and instant visual feedback.
Users can perform precise control within a small operating space, observe the operation effect, improve operating efficiency and interactive experience, and reduce the cost of repeated trial and error.
Smart Images

Figure CN122470082A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of human-computer interaction technology, and in particular to a shadow interaction method, apparatus, device, and medium thereof. Background Technology
[0002] In existing 3D virtual scenes, to enrich the user's interactive experience, interactive objects are usually placed within the scene. These objects can be various ornaments, furniture, or devices within the scene. Users can perform operations such as moving, rotating, and dragging these objects. By changing the placement or orientation of objects, users can trigger specific virtual events or change certain states within the virtual scene.
[0003] In a common form of interaction, users remove obstacles by manipulating objects in the scene to continue the interaction. For example, in a virtual room scene, a large bookshelf blocks the user's path. The bookshelf is an object that the user can move. The user drags the bookshelf away from the doorway, thus clearing the way. In this way, the user's interaction with the object is essentially just moving the object from its current position. Once the system detects that the bookshelf is no longer in an obstructive position, it determines that the obstacle has been removed and allows the user to pass.
[0004] However, in this interaction method, the object the user manipulates and the object ultimately affected by the operation are the same object, and both the operation process and the result are confined to the same area. When the scene is large or there are many objects that need to be adjusted collaboratively, it is difficult for the user to simultaneously observe and judge other objects while manipulating one object, requiring frequent changes in perspective within the scene, thus limiting operational efficiency. Furthermore, users cannot perceive the indirect effects of their operations in real time; the interaction lacks visual feedback synchronized with the operation progress, forcing users to rely on repeated attempts, reducing the smoothness of the interactive experience. Summary of the Invention
[0005] The purpose of this application is to solve the above-mentioned problems by providing a shadow interaction method and corresponding apparatus, device, non-volatile readable storage medium, and computer program product.
[0006] According to one aspect of this application, a shadow interaction method is provided, comprising: In response to the light and shadow activation command applied to the current virtual scene, determine the interactive virtual scene in the current virtual scene, which has interactive operation entities that are linked with the entities in the current virtual scene; In response to pose adjustment operation events applied to interactive entities, based on the pose changes of the interactive entities, the poses of linked entities in the current virtual scene that are linked with the interactive entities are adjusted synchronously. Update the interactive shadows in the current virtual scene based on the pose changes of the linked entities.
[0007] According to another aspect of this application, a shadow interaction device is provided, comprising: The light and shadow activation module is used to respond to the light and shadow activation command applied to the current virtual scene, determine the interactive virtual scene in the current virtual scene, and the interactive virtual scene has interactive operation entities that are linked with the entities in the current virtual scene; The pose adjustment module is used to respond to pose adjustment operation events applied to interactive operation entities. Based on the pose changes of the interactive operation entity, it synchronously adjusts the pose of linked entities in the current virtual scene that are linked with the interactive operation entity. The shadow update module is used to update the interactive shadows in the current virtual scene based on the pose changes of linked entities; As can be seen from the above embodiments, the beneficial effects of this application are mainly reflected in the following aspects: First, this application determines the interactive virtual scene within the current virtual scene by responding to a light and shadow activation command applied to the current virtual scene. Interactive operation entities linked to entities within the current virtual scene are then configured within this interactive virtual scene, providing the user with a dedicated operation space independent of the current virtual scene. In existing technologies, the object manipulated by the user and the object ultimately affected by the operation are usually the same object, with both the operation process and result confined to the same area. This application separates the user's operation space from the space for presenting the operation result. The user manipulates interactive operation entities within the interactive virtual scene, and the operation result is presented in real-time within the current virtual scene through the pose changes of the linked entities. This spatially separated interaction method allows users to perform complex operations with precise control within a smaller operation space, while simultaneously observing the actual effects of the operation within the complete virtual scene without frequently adjusting the viewing angle, thus improving operational efficiency and the interactive experience.
[0008] Secondly, this application establishes a real-time control channel from the interactive virtual scene to the current virtual scene by responding to pose adjustment operation events acting on the interactive operation entity and simultaneously adjusting the pose of linked entities in the current virtual scene based on the pose changes of the interactive operation entity. In existing technologies, user interaction with objects often remains at the operation level; after the operation is completed, the system only determines whether the object has reached the designated position, lacking guidance and feedback in the operation process. This application, through the linkage relationship between the interactive operation entity and the linked entities, transmits the user's control intention to the corresponding entity in the current virtual scene in real time. The pose changes of the linked entities further drive the real-time update of the interactive shadow in the current virtual scene. During the operation, the user can continuously obtain immediate visual feedback on the effect of the current operation by observing the changes in the interactive shadow, reducing the cost of repeated trial and error and providing continuous guidance for the user's operation. Attached Figure Description
[0009] Figure 1 This is an exemplary network architecture for this application; Figure 2 This is a flowchart illustrating one embodiment of the shadow interaction method of this application; Figure 3 This is a flowchart illustrating an embodiment of the shadow interaction method of this application, which divides interactive operation entities into light source manipulation entities and model manipulation entities. Figure 4 This is a flowchart illustrating an embodiment of the shadow interaction method of this application, which has a pose adjustment operation event with a translation constraint trajectory, a surround constraint trajectory, and a self-rotation constraint trajectory. Figure 5 This is a flowchart illustrating an embodiment of the shadow interaction method of this application regarding displaying visual effects of movement trajectory on translation constraint trajectory, visual effects of rotation direction on self-rotation constraint trajectory; Figure 6 This is a flowchart illustrating an embodiment of the shadow interaction method of this application, which involves synchronously adjusting the pose of a light source and updating the interactive shadow based on changes in the pose of the light source. Figure 7 This is a flowchart illustrating an embodiment of the shadow interaction method of this application regarding adjusting the shadow size of an interactive shadow via a lens entity; Figure 8 This is a flowchart illustrating an embodiment of the shadow interaction method of this application regarding adjusting the shadow color of an interactive shadow through a filter entity; Figure 9 This is a flowchart illustrating an embodiment of the shadow interaction method of this application regarding determining the degree of matching through similarity comparison and pose parameter difference comparison; Figure 10This is a flowchart illustrating an embodiment of the shadow interaction method of this application, which involves displaying a shadow hint of a target shadow in the shadow display area of the current virtual scene and adjusting the visual effects of the shadow hint according to the degree of matching. Figure 11 This is a flowchart illustrating an embodiment of the shadow interaction method of this application, which displays a prompt entity in the interactive virtual scene to indicate the correct pose after detecting that the interaction duration has expired. Figure 12 This is a flowchart illustrating an embodiment of the shadow interaction method of this application regarding obtaining the deviation and controlling the vibration of the vibration component of the input device. Figure 13 This is a flowchart illustrating an embodiment of the shadow interaction method of this application after a successful shadow matching determination; Figure 14 This is a schematic block diagram of the shadow interaction device of this application; Figure 15 This is a schematic diagram of the structure of a shadow interaction device used in this application. Detailed Implementation
[0010] The technical solution of this application can be widely applied to various network architectures to adapt to different types and scales of virtual scenario applications. In a scenario such as... Figure 1 In the typical network architecture shown, the user's terminal device accesses a virtual scene service cluster via the network. This cluster consists of multiple virtual scene servers 81. A microservice architecture manages and maintains the runtime resources of these virtual scene servers 81, providing multiple service instances. Each service instance is responsible for a different service. For example, some service instances can be used to maintain the front-end service for the terminal device 80 to access the virtual scene, while others can be responsible for the shadow interaction function service in the virtual scene, providing users with corresponding shadow interaction functions for gameplay. The user's terminal device 80 has a computer program product implemented according to the shadow interaction method of this application installed and running, or the terminal device can be connected to a cloud server container, where the computer program product runs. After the computer program product runs, it accesses the virtual scene service cluster, enabling the user to control a user character in the virtual scene through the terminal device and interact with various service instances in the virtual scene, such as engaging in combat with hostile entities.
[0011] Each service instance can maintain a real-time connection with the user's terminal device 80 via the network, handling various events and interactions in the virtual scene, such as user character movement, attacks, and shadow interactions. The server provides necessary data support to the terminal device to ensure the smooth operation of the virtual scene. This data includes, but is not limited to, data related to shadow interactions. These datasets contain resource model data of the virtual scene model of the user's play map, such as scene building models, light source models, item models, user character models, hostile user models, enemy monster models, and various other neutral or non-biological models, which are used by the terminal device 80 to render and generate corresponding real-time images. Based on the received shadow interaction data, the terminal device 80 can generate corresponding interactive virtual scenes and interactive operation entities, and render them into the virtual scene for user interaction.
[0012] This application is not only applicable to virtual scene experiences for single users, but can also be extended to multi-user online virtual scene environments. In multi-user virtual scenes, multiple users' terminal devices connect to the virtual scene service cluster simultaneously, and each service instance needs to handle interaction requests from multiple users and update the virtual scene status in real time.
[0013] The shadow interaction method provided in this application can be widely deployed in various virtual environment systems with interactive gameplay, especially suitable for application scenarios such as electronic virtual scenes, virtual reality experiences, and simulation training platforms. In a typical technical architecture, the execution entity of this application is usually a terminal device running a client application, such as a personal computer, virtual scene host, or mobile device. The virtual scene engine or application framework running on the terminal device integrates combat gameplay processing middleware and logic processing units, responsible for real-time rendering of virtual scenes, handling user interactions, and managing the playback of combat performance resources. The virtual scene resources and related strategy configuration data for shadow interaction can be stored locally on the terminal device or dynamically obtained from a remote server as needed. Real-time monitoring, strategy matching, and the shadow interaction process can be completed locally on the client to ensure low-latency response and a smooth experience.
[0014] In an exemplary process, the user enters the attic of an ancient mansion, which is the current virtual scene. In the center of the attic, there is a large desk, and on the desk, there is a miniature room model that is exactly the same as the layout of the attic. This miniature room model is the interactive virtual scene. After the user approaches the desk and triggers the interaction, the system responds to the light and shadow activation instruction, and switches the virtual scene camera from the perspective of the user's character to the close-up observation perspective of the miniature room model. There are multiple scaled-down ornaments in the miniature room model that can be operated by the user, including a lantern model and a bird statue. These scaled-down ornaments are the interactive operation entities. The lantern model belongs to the light source control entity, corresponding to the real lantern hanging in the attic. The pose adjustment operation event of the lantern model is used to synchronously adjust the pose of the real lantern. The bird statue belongs to the model control entity, corresponding to the real bird statue placed in front of the window in the attic. The pose adjustment operation event of the bird statue is used to synchronously adjust the pose of the real bird statue. There is a linkage relationship between these interactive operation entities and the corresponding entities in the current virtual scene. The user moves the cursor to the lantern model in the miniature room model, and a golden highlight outline appears on the edge of the lantern model, indicating that this ornament can be operated. The user clicks and drags the lantern model, generating a pose adjustment operation event. The system obtains the pose change amount of the lantern model according to the dragging direction and distance of the user, and synchronously adjusts the pose of the real lantern in the attic. The real lantern moves synchronously with the lantern model in the miniature model. As the spatial position of the real lantern changes, the position of the shadow projected on the wooden wall after the lantern illuminates the bird statue also changes. This shadow is the interactive shadow, and the wooden wall is the shadow display area. Subsequently, the user moves the cursor to the bird statue in the miniature room model, clicks and drags the bird statue to rotate. The system obtains the pose change amount of the bird statue and synchronously adjusts the orientation of the real bird statue in the attic. As the orientation of the real bird statue changes, the shape of the shadow projected on the wooden wall after the lantern illuminates the bird statue also changes. The user alternately adjusts the poses of the lantern model and the bird statue, and observes the visual effect of the position and shape of the shadow on the wooden wall changing in real time with the operation.
[0015] In this application, the "system" mentioned may refer to the collection of software and hardware environments of the virtual scene client and / or server side, which is used to implement various functions of the virtual scene. It includes components such as a virtual scene engine, a physics system, a collision detection module, a special effect rendering module, an audio system, etc. These components work together to process user input, execute virtual scene logic, update the virtual scene state, generate visual and auditory feedback, etc., providing an interactive experience for users.
[0016] After generally introducing the exemplary network architecture and application scenarios of this application and some basic concepts, the following will continue to elaborate on multiple specific embodiments of this application.
[0017] Please see Figure 2 The shadow interaction method of this application includes steps S1100 to S1300 in some embodiments, and each step is described below.
[0018] Step S1100: In response to the light and shadow activation command applied to the current virtual scene, determine the interactive virtual scene in the current virtual scene, and the interactive virtual scene has interactive operation entities that are linked with the entities in the current virtual scene.
[0019] Responding to a lighting and shadow activation command applied to a virtual scene is the first step in triggering the shadow interaction process. The lighting and shadow activation command initiates a dedicated operating environment, allowing the user to move, rotate, and drag interactive entities. This command can be generated by various interactive behaviors, including the user moving a character close to a specific object in the scene and pressing an interaction key, the user triggering a mechanism in the scene, or the user choosing to enter a shadow interaction state after interacting with a specific non-user character. Upon receiving the lighting and shadow activation command, the system begins executing subsequent confirmation steps.
[0020] During the response to the light and shadow activation command, the system can also perform a series of auxiliary prompts. In one embodiment, in response to the light and shadow activation command, the system highlights interactive entities in the interactive virtual scene that have a linkage relationship with the entities in the virtual scene. This highlighting can be achieved by overlaying outlining effects on the edges of the interactive entities, covering their surfaces with a high-brightness material, or making them exhibit a blinking effect. This highlighting process provides a visual prompt for the interactive entities in the interactive virtual scene after responding to the light and shadow activation command, enabling users to quickly identify which interactive entities in the interactive virtual scene are controllable, thereby improving operational efficiency.
[0021] In another embodiment, the system can also provide additional prompts when the shadow interaction process lasts for a relatively long time. The system detects whether the interaction time after responding to the light and shadow start command exceeds a preset timeout threshold. If it does not exceed the threshold, the system continues to wait for user operation. If it exceeds the threshold, the system obtains the correct pose of the interactive entity in the interactive virtual scene where the interaction should be successful, determines the spatial position corresponding to the correct pose in the interactive virtual scene, and displays the entity prompt corresponding to the interactive entity at that spatial position. The orientation angle of the entity prompt is the orientation angle of the correct pose. Timeout detection and entity prompts are a difficult assistance mechanism provided to the user after responding to the light and shadow start command in the system. When the user has spent a long time on a certain step and still has not completed shadow matching, the system can show the user the correct pose where the interactive entity should be placed in the interactive virtual scene to help the user continue to advance the interaction process.
[0022] Determining the interactive virtual scene within a virtual scene is a process executed after responding to the lighting and shadow activation command. An interactive virtual scene can be a scene area independent of the virtual scene itself, or it can be a scene area included within the virtual scene. A virtual scene refers to the virtual scene space in which the user character is active. A mapping relationship exists between interactive virtual scenes and virtual scenes. Interactive virtual scenes provide users with a space where they can manipulate interactive entities.
[0023] In one embodiment, the interactive virtual scene can be a miniature scene model placed within a virtual scene. The miniature scene model has the same spatial layout as the virtual scene. In another embodiment, the interactive virtual scene can be a simplified scene that differs from the virtual scene in visual style but corresponds to its spatial structure, such as a scene constructed using a low-polygon model, a scene represented by a single material, or an abstract scene where entity locations are represented by symbolic icons. In yet another embodiment, the interactive virtual scene can also be a scene view presented in a separate window or picture-in-picture format within the virtual scene interface. Those skilled in the art can flexibly choose the specific presentation form of the interactive virtual scene according to the design requirements of the actual virtual scene, which will not be elaborated further here.
[0024] Interactive virtual scenes contain interactive entities. Interactive entities are objects that users can directly manipulate during shadow interaction. Interactive entities can be categorized into several types based on their linked objects. In one embodiment, the interactive entity is a light source manipulation entity. The light source manipulation entity is linked with a light source entity in the virtual scene. A light source entity refers to an entity that can emit light, illuminate other objects, and form shadows in the virtual scene. Pose adjustment events for the light source manipulation entity are used to synchronously adjust the pose of the light source entity. Changes in the pose of the light source entity directly affect the direction of the light emitted by the light source and the position of the light source, thereby changing the position and angle of the interactive shadows in the virtual scene. In another embodiment, the interactive entity is a model manipulation entity. The model manipulation entity is linked with an entity in the virtual scene, which refers to an object in the virtual scene that can be illuminated by a light source and projected to form interactive shadows, such as statues, furniture, and ornaments.
[0025] Pose adjustment events for manipulated entities in a model are used to synchronously adjust the entity's pose. Changes in the entity's pose alter its occlusion contours, thereby changing the shape of the interactive shadow cast by the entity in the virtual scene. Furthermore, interactive manipulation entities can also include manipulation entities linked to optical elements in the virtual scene, such as lens manipulation entities and filter manipulation entities. Lens manipulation entities link to lens entities in the virtual scene to adjust the size of the interactive shadow; filter manipulation entities link to filter entities in the virtual scene to adjust the color of the interactive shadow. This classification method further defines the concept of interactive manipulation entities after identifying the interactive virtual scene in the abstract, clarifying the linkage relationships between different types of interactive manipulation entities and their corresponding linked entities in the virtual scene, as well as the extended applications of linkage with optical elements.
[0026] Furthermore, independent entities can exist within an interactive virtual scene. These independent entities do not establish any linkage relationship with any other entity in the virtual scene; their role is to serve the functional requirements of the interactive virtual scene itself. For example, a lighting model can be placed in the interactive virtual scene to illuminate it, allowing users to clearly observe the position and movement trajectory of interactive entities. Similarly, auxiliary objects such as arrow markers indicating the direction of operation and decorative fences dividing operation areas can be placed. The presence of independent entities does not interfere with the normal operation of linkage relationships. Those skilled in the art can flexibly configure the types and quantities of independent entities in the interactive virtual scene according to design needs; this will not be elaborated upon here.
[0027] In one example scenario, a user explores the attic of an old mansion. The attic itself is the virtual scene. A miniature room model, mirroring the attic layout, sits on a desk in the center of the attic; this miniature room model is the interactive virtual scene. When the user moves their character near the desk and interacts with it, the system receives a lighting activation command, switching the virtual scene camera to a close-up view of the miniature room model. A miniature wall lamp, an independent entity, illuminates the interior of the miniature room model. As the user drags the lantern model within the miniature room model, the position of the real lantern in the attic moves synchronously. When the user rotates the bird statue, the orientation of the real bird statue in the attic changes synchronously. The interactive shadow cast on the wall by the real lantern illuminating the real bird statue changes accordingly. The user continuously adjusts the positions of the lantern model and the bird statue in the miniature room model until the interactive shadow on the wall coincides with the semi-transparent outline of the bird.
[0028] In one embodiment, while determining the interactive virtual scene, the system also determines a target shadow. The target shadow serves as a target reference for the correct shadow matching answer, showing the user the shadow shape that needs to be achieved. The target shadow is displayed as a shadow cue, superimposed on the area in the virtual scene used to receive the shadow. While manipulating the interactive entity, the user can compare the difference between the currently formed interactive shadow and the target shadow in real time, thereby adjusting the direction and amplitude of the manipulation.
[0029] In another embodiment, the system responds to a light and shadow activation command by displaying a shadow cue for the target shadow in the virtual scene. The shadow cue is pre-configured and corresponds to the target state of the target shadow. During shadow interaction, the system detects the degree of matching between the interactive shadow and the target shadow, and adjusts the visual effects of the shadow cue accordingly. For example, when the user manipulates the interactive entity to gradually bring the interactive shadow closer to the target shadow, the shadow cue can gradually change from dim to bright, or from semi-transparent to opaque, thus providing feedback to the user on the correctness of the current operation direction. This progressive visual feedback provides dynamic visual guidance synchronized with the operation progress after the target shadow is determined in the virtual environment, allowing the user to continuously receive guidance during operation and reducing trial-and-error costs.
[0030] It can be seen that the operation of defining the interactive virtual scene triggered by the light and shadow activation command lays the foundation for subsequent pose synchronization and shadow matching. The interactive virtual scene provides a reduced operating space, and the linkage between interactive and linked entities allows the user's manipulation of interactive entities to indirectly affect the corresponding entities in the virtual scene, while independent entities serve the functional needs of the interactive virtual scene itself. Gradual visual feedback such as highlighting and shadow hints, as well as timeout prompts, provide users with multi-layered guidance and feedback.
[0031] Step S1200: In response to the pose adjustment operation event acting on the interactive operation entity, based on the pose change of the interactive operation entity, the pose of the linked entities in the current virtual scene that are linked with the interactive operation entity is adjusted synchronously.
[0032] Responding to pose adjustment events acting on interactive entities is a processing step following the establishment of the interactive environment. Given a defined interactive virtual scene, the system begins receiving user input on interactive entities and converts this input into synchronous changes to the corresponding entities in the virtual scene.
[0033] Pose adjustment operation events are events triggered by user actions on interactive entities within an interactive virtual scene. Users can move, rotate, drag, and perform other operations on interactive entities using input devices. Upon detecting these operations, the system generates corresponding pose adjustment operation events. These events carry information such as the type and magnitude of the user's operation, serving as the basis for subsequent calculations of pose changes.
[0034] Pose change is data calculated based on pose adjustment operation events, used to describe the spatial state change of an interactive entity during the current manipulation. Pose change includes at least one of translational change and rotational change. Translational change represents the direction and distance of displacement of the interactive entity in three-dimensional space, while rotational change represents the angular change of the interactive entity around a specific axis of rotation.
[0035] In one embodiment, the pose adjustment operation event has a pose adjustment constraint trajectory. The pose adjustment constraint trajectory is used to restrict the movement of the interactive entity, including translation constraint trajectory, orbit constraint trajectory, and rotation constraint trajectory. When the pose adjustment operation event has a translation constraint trajectory, the spatial position of the interactive entity is constrained within the translation constraint trajectory for displacement adjustment, and the translation change is calculated along the direction of the translation constraint trajectory. When the pose adjustment operation event has an orbit constraint trajectory, the spatial position of the interactive entity is constrained within the orbit constraint trajectory for displacement adjustment, and the translation change is calculated along the tangent direction of the orbit constraint trajectory. When the pose adjustment operation event has a rotation constraint trajectory, the spatial orientation of the interactive entity is constrained within the rotation constraint trajectory for orientation adjustment, and the rotation change is calculated around the rotation axis defined by the rotation constraint trajectory. This constraint trajectory mechanism further limits the pose adjustment operation event in the independent operation, making the movement of the interactive entity constrained by a preset trajectory, improving the accuracy and predictability of the control.
[0036] Based on the aforementioned constraint trajectories, the system can also configure corresponding visual effects for each constraint trajectory. Translation and orbiting constraint trajectories have corresponding movement trajectory visual effects, while rotation constraint trajectories have corresponding rotation direction visual effects. When the pose adjustment constraint trajectory is a translation constraint trajectory, the corresponding movement trajectory visual effect is displayed on the translation constraint trajectory, showing the movable directions supported by the translation constraint trajectory. When the pose adjustment constraint trajectory is an orbiting constraint trajectory, the corresponding movement trajectory visual effect is displayed on the orbiting constraint trajectory, showing the orbital movement directions supported by the orbiting constraint trajectory. When the pose adjustment constraint trajectory is a rotation constraint trajectory, the corresponding rotation direction visual effect is displayed on the rotation constraint trajectory, showing the rotational directions supported by the rotation constraint trajectory. Through these visual effects, users can intuitively understand the movable directions and ranges of the interactive entity.
[0037] In another embodiment, the interactive virtual scene includes at least two interactive entities, one of which has a linkage relationship with the other. This linkage means that when a user performs a control operation on one of the linked interactive entities, the poses of other linked interactive entities are also adjusted synchronously. This linkage between interactive entities differs from the linkage between an interactive entity and other linked entities in the virtual scene; it belongs to the inter-entity linkage within the interactive virtual scene. Through this internal linkage, a single user operation can simultaneously adjust the poses of multiple interactive entities, enriching the hierarchy of control.
[0038] In another embodiment, the pose adjustment operation event may also include an attack event on the interactive entity. When a user performs an attack operation on an interactive entity in the interactive virtual scene via an input device, the system detects the attack and triggers a state change in the attacked interactive entity. This state change alters the occlusion contour of the attacked entity or changes the entity's state of existence. For example, when a user performs an attack operation on a model-controlled entity in the interactive virtual scene, the entity in the virtual scene corresponding to that model-controlled entity synchronously switches to a vanished or broken state, and the interactive shadow originally cast by that entity in the virtual scene disappears or changes shape. Similarly, when a user performs an attack operation on a light source-controlled entity in the interactive virtual scene, the light source entity in the virtual scene corresponding to that light source synchronously switches to an off or flashing state, and the interactive shadow cast by that light source disappears or changes in brightness. By introducing attack events, the user's interaction method expands from simple pose adjustment to multiple operation methods including attacks, enriching the control dimensions of shadow interaction. This allows changes in shadows in the virtual scene to be achieved not only by moving or rotating entities but also by changing the entity's state of existence or functional state.
[0039] In another embodiment, pose adjustment operation events can be generated by different types of input devices. The system adapts to the operation characteristics of different input devices and converts the user's control input into pose changes of the interactive operation entity.
[0040] In keyboard and mouse operation mode, users interact with interactive entities in the interactive virtual scene using the mouse. When the user moves the mouse pointer over an interactive entity and hovers it, the edge of the interactive entity is highlighted, indicating that the interactive entity is controllable. When the user presses the mouse button and drags the interactive entity, a pose adjustment event is generated. The system calculates the pose change of the interactive entity in the interactive virtual scene based on the direction and distance the mouse pointer moves on the screen. When the user releases the mouse button, the system confirms the end of the pose adjustment event and applies the final calculated pose change to the corresponding linked entity. If the interactive virtual scene supports rotation, the user can trigger a rotation operation by hovering the mouse pointer over a specific area of the interactive entity. The system maps the mouse drag vector to the angular change of the interactive entity around a preset rotation axis.
[0041] In touchscreen mode, users interact with interactive virtual scenes on the touchscreen using their fingers. When a user touches an interactive entity, its edges are highlighted. The user maintains contact and slides their finger across the screen, generating a pose adjustment event. The system calculates the pose change of the interactive entity within the virtual scene based on the direction and distance of the finger's slide. When the user lifts their finger off the screen, the system confirms the end of the pose adjustment event and applies the calculated pose change to the corresponding interactive entity. Touchscreen mode does not support multi-touch; users can only select and manipulate one interactive entity at a time. In touchscreen mode, when an interactive entity is touched, it enters a pressed state. During this state, the entity's movement trajectory is simultaneously displayed on the interface to help the user understand the movement path.
[0042] In gamepad mode, users interact with the virtual scene using the gamepad's joystick and buttons. There is no mouse hover operation in gamepad mode; when entering shadow interaction mode, the system defaults to selecting one of all operable interactive entities as the current target. The default selected interactive entity is the one spatially furthest to the left and top of all operable entities. The selected interactive entity's edge is highlighted, indicating that the user can currently manipulate that entity. Users switch between different interactive entities using the gamepad's toggle buttons. These buttons include the left and right shoulder buttons; pressing the left shoulder button switches the target to the adjacent interactive entity on the left, and pressing the right shoulder button switches it to the adjacent interactive entity on the right. The system calculates the relative left and right positions of each interactive entity in real time to determine the switching order. Users adjust the pose of the current target by moving the gamepad joystick. The system maps the component of the joystick's two-dimensional input vector that aligns with the allowed direction of the pose adjustment constraint trajectory of the interactive entity to a pose change, filtering out directional components in the joystick input that do not conform to the allowed direction. For example, for an interactive entity configured with a translation constraint trajectory and supporting only left and right movement, when the user moves the joystick to the left, the interactive entity moves to the left along the translation constraint trajectory; when the user moves the joystick to the right, it moves to the right; moving the joystick up or down produces no movement. For an interactive entity configured with a surround constraint trajectory, the system maps the component of the joystick input that aligns with the tangential direction of the surround constraint trajectory to a surround movement amount. The controller moves the interactive entity at a constant speed, with slight speed changes at the start and end of movement to achieve a smooth-in / slow-out feel. When the user returns the joystick to center, the system confirms the end of the pose adjustment operation event and applies the final calculated pose change to the corresponding linked entity. In gamepad operation mode, the lower center of the screen displays currently available gamepad operation prompts, including button prompts for switching operation targets and joystick prompts for moving operation targets. The operation prompt text and key styles corresponding to different interactive operation entities can be configured according to the type of interactive operation entity and the direction of movement.
[0043] By adapting to different input devices, the system can uniformly convert keyboard, mouse, touch screen, and gamepad input methods into pose changes of interactive entities, enabling users with different types of input devices to smoothly perform pose adjustment operations.
[0044] In another embodiment, the interactive virtual scene includes at least two interactive entities, one of which has a linkage relationship with the other. This linkage relationship means that when a user performs a control operation on one of the linked interactive entities, the poses of other linked interactive entities will also be adjusted synchronously. This linkage relationship between interactive entities differs from the linkage relationship between an interactive entity and linked entities in the virtual scene; it belongs to the inter-entity linkage within the interactive virtual scene.
[0045] In another embodiment, if the system has a corresponding target shadow, it can provide haptic feedback during the user's pose adjustment operation. The haptic feedback is implemented through an input device with a vibration component. The system acquires the current pose of the currently manipulated interactive entity and compares it with the target pose corresponding to the target shadow, calculating the deviation between the two. A haptic feedback control signal is generated based on the deviation, driving the vibration component of the input device to vibrate. The intensity of the vibration changes with the increase or decrease of the deviation. When the deviation between the current pose of the interactive entity and the target pose is large, the vibration intensity is strong, indicating to the user that they are far from the target; as the interactive entity gradually approaches the target pose, the deviation decreases, and the vibration intensity weakens accordingly, until the deviation approaches zero and the vibration stops. Through this haptic feedback, the user can perceive the difference between the current operation and the correct target through vibration during operation, thus more intuitively judging the direction and amplitude of the operation.
[0046] After acquiring the pose change, the system can perform a numerical conversion of the pose change based on the size ratio between the interactive virtual scene and the virtual scene, and then apply the converted pose change to the linked entity. Taking translation change as an example, assume the interactive virtual scene is a scaled-down model of one-tenth of the virtual scene, i.e., a size ratio of 1:10. If a user drags an interactive entity in the interactive virtual scene 3 units in a certain direction, the system obtains the translation change as the translation direction vector multiplied by 3 in the pose change. Before applying the translation change to the linked entity, the system scales the translation change according to the size ratio, multiplying the translation distance by 10 to obtain a converted translation distance of 30 units. The system then applies the converted translation change to the linked entity in the virtual scene, causing the linked entity to move 30 units in the corresponding direction. Taking rotation change as an example, assume an interactive entity rotates around a preset rotation axis, with a rotation angle range of 0 to 90 degrees. The user rotates the interactive entity from its current angle of 30 degrees to 60 degrees. The system obtains the rotation change in the pose change as a clockwise rotation of 30 degrees. The system locates the corresponding linked entity and applies the rotation change to it, causing the linked entity to rotate synchronously by 30 degrees around the corresponding rotation axis. During the rotation operation, the rotation angle is typically kept synchronized at a 1:1 ratio without scaling conversion. Through this numerical conversion, the system can proportionally map the user's manipulation in the scaled-down scene to the actual pose change in the virtual scene, matching the movement amplitude of the linked entity with the spatial scale of the virtual scene, thus achieving accurate synchronization of entity poses between the two scenes.
[0047] Linked entities refer to entities in a virtual scene that have established a linkage relationship with interactive entities. These linkage relationships are pre-configured during the initialization of the interactive virtual scene. Once the pose change is determined and its numerical conversion is completed, the system locates the linked entity corresponding to the currently manipulated interactive entity based on the linkage relationship, applies the converted pose change to the linked entity, and synchronously adjusts the pose of the linked entity. Through this synchronous adjustment, the user's manipulation of interactive entities in the interactive virtual scene can drive the pose changes of linked entities in the virtual scene without directly contacting objects in the virtual scene.
[0048] Furthermore, the linked entities may also include entities associated with optical elements. In one embodiment, the pose change of the interactive entity is used to synchronously adjust the pose of a lens entity in the virtual scene; when the lens entity is in the illumination path of the light source entity, the shadow size of the interactive shadow is updated. In another embodiment, the pose change of the interactive entity is used to synchronously adjust the pose of a filter entity in the virtual scene; when the filter entity is in the illumination path of the light source entity, the shadow color of the interactive shadow is updated. The introduction of these optical elements allows the rendering effect of interactive shadows to be comprehensively controlled from multiple dimensions such as size and color, enriching the expressiveness of shadow interaction.
[0049] By manipulating different types of interactive entities, users can comprehensively adjust the lighting conditions and object layout in the virtual scene.
[0050] In an example scenario, continuing from the previous example of the attic in an old mansion, the user drags a lantern model within a miniature room model, triggering a pose adjustment event. The system calculates the translational change of the lantern model based on the drag direction and distance, and locates the actual lantern in the attic linked to the lantern model. Assuming the miniature room model and the attic are scaled 1:10, the user drags the lantern model along a preset translational constraint trajectory for 2 units within the miniature room model. A visual effect of the movement trajectory is displayed on the translational constraint trajectory, with arrows indicating the possible movement directions. The system multiplies the translational distance by 10 based on the scale, resulting in a converted translational distance of 20 units. The system applies this converted translational change to the actual lantern, causing it to move 20 units in the corresponding direction within the attic. Subsequently, the user drags and rotates a bird statue, which is configured with a self-rotation constraint trajectory, with a visual effect indicating the possible rotation direction. The system calculates the rotation change of the bird statue to be 45 degrees clockwise, locates the real bird statue in front of the window in the attic, and applies the rotation change to the real bird statue, causing it to rotate 45 degrees clockwise in sync. Every action the user takes in the miniature room model is reflected in real time in the pose change of the corresponding entity in the attic through the above pose synchronization mechanism.
[0051] As can be seen, the process of responding to pose adjustment events acting on interactive entities and synchronously adjusting the pose of linked entities based on pose changes establishes a real-time control channel from the interactive virtual scene to the virtual scene. The pose adjustment constraint trajectory provides preset motion paths and directional restrictions for the movement of interactive entities, while visual effects on the constraint trajectory provide intuitive operation guidance for users. The linkage relationships between interactive entities enrich the layers of control. Through numerical conversion of size ratios, the system proportionally maps user controls in the scaled-down scene to actual pose changes in the virtual scene, thereby improving the intuitiveness of operation and the guidance of interaction.
[0052] Step S1300: Update the interactive shadows in the current virtual scene based on the pose changes of the linked entities.
[0053] Updating the interactive shadows in the virtual scene based on the pose changes of the linked entities is the core visual feedback link in the shadow interaction process. The interactive shadows are recalculated and rendered according to the latest pose of the linked entities, so that users can intuitively perceive the effect of the current operation through the changes in the shape and position of the interactive shadows.
[0054] In a virtual scene, a pre-defined surface area for receiving and displaying interactive shadows is called the shadow display area. The shadow display area can be a flat area such as a wall, floor, table, or curtain in the virtual scene, or it can be a display area composed of multiple discontinuous surfaces.
[0055] Interactive shadows are formed by light sources illuminating entities in a virtual scene. A light source is a component configured within the virtual scene to produce lighting effects. Light sources possess attributes such as spatial position and direction of illumination, which collectively determine where the light originates and in which direction it shines. In one embodiment, the light source can be a fixed light source inherent in the virtual scene, whose pose does not change with user manipulation. In this case, the changes in interactive shadows are entirely driven by changes in the pose of the scene model. Movement or rotation of the scene model alters the area where light is blocked, thus creating interactive shadows of different shapes on the shadow display area. In another embodiment, the light source itself can be a linked entity, interacting with the light source manipulation entity in the interactive virtual scene. When the user manipulates the light source manipulation entity, the pose of the light source changes synchronously, and the direction and position of the light source change, thereby affecting the position and shape of the interactive shadows on the shadow display area.
[0056] The update method of interactive shadows is directly related to the type of linked entity. When the linked entity is a light source entity, changes in the pose of the light source entity cause changes in the illumination direction or position of the light source. For example, when the light source entity translates horizontally, the illumination direction of the light source shifts accordingly, and the position of the interactive shadow formed on the shadow display area moves accordingly. Similarly, when the light source entity rotates around its vertical axis, the illumination direction of the light source changes, and the angle and shape of the interactive shadow change accordingly. When the linked entity is a scene model, changes in the pose of the scene model cause changes in the occlusion contour of the scene model. For example, when the scene model translates horizontally, the relative position of the scene model between the light source and the shadow display area changes, and the occluded area on the shadow display area moves accordingly. Similarly, when the scene model rotates around its vertical axis, the width of the scene model's occlusion of the light changes in different directions, and the shape of the interactive shadow on the shadow display area changes accordingly. The system obtains the latest pose parameters of the linked entities in real time. Based on the current pose of the light source and the current pose of the scene model, it recalculates the shadow area formed by the light rays after they originate from the light source, pass through the scene model and are occluded, and then renders and updates the shadow display area with the calculation results.
[0057] In one embodiment, an interactive entity and a light source are associated. When a user manipulates the interactive entity, the system first adjusts the pose of the light source entity associated with the interactive entity in the virtual scene based on the pose change of the interactive entity. Then, based on the pose change of the light source entity, the system updates the interactive shadow cast by the light source on the entity in the virtual scene. For example, the interactive entity is a light source control entity, and the light source control entity and the light source, as a linked entity, are linked. If the user drags the light source control entity five units in a certain direction in the interactive virtual scene, the system synchronously translates the corresponding light source a corresponding distance. The new position of the light source changes the incident angle of the light reaching the scene model, and the position of the interactive shadow projected by the scene model on the shadow display area moves accordingly.
[0058] In one embodiment, the light source can be a natural, dynamic light source driven by the time system of the virtual scene world, such as a celestial light source simulating the sun or moon. In this embodiment, the light source itself is a special interactive entity whose pose changes do not depend on the user's manipulation of the interactive entity, but are driven by the time parameters within the virtual scene engine. The virtual scene engine maintains a global virtual scene time parameter, which can be the cumulative number of seconds counted from a certain reference time, or virtual time expressed in a 24-hour format. The system has a preset time-celestial orbit mapping function that maps the virtual scene time parameter to the azimuth and altitude angles of the celestial light source in the virtual scene sky. For example, in one implementation, the system uses a simplified solar motion model, converting the hour and minute values of the virtual scene time into the azimuth angle of the sun through trigonometric functions, so that the sun rises in the east, passes through its highest point in the south, and sets in the west, with its altitude angle reaching its maximum value at noon and its minimum value at midnight. This mapping function can be pre-set in the lighting system of the virtual scene engine, and the engine automatically updates the pose of the sun light source every frame according to the current virtual scene time.
[0059] When the light source is a natural, dynamic light source, the pose changes of the linked entities manifest as the continuous movement of the sun or moon in the sky. This movement causes a continuous change in the direction and angle of the light source's illumination, resulting in corresponding changes in the position, length, and angle of the interactive shadows in the shadow display area. For example, as the sun moves from east to west, the shadows cast by entities in the virtual scene on the shadow display area will gradually shift from being biased towards the west to being biased towards the east, and the length of the shadows will gradually increase as the sun's altitude angle decreases. This time-driven change in the pose of the light source, combined with the change in the pose of the entities driven by the user through manipulation of the interactive entities, determines the final appearance of the interactive shadows.
[0060] In one implementation, the system can also configure an auxiliary entity associated with the time system within the interactive virtual scene, such as an hourglass, sundial, or clock. This auxiliary entity exists as an independent entity and does not interact with any other entity in the virtual scene, but its display status updates in real time with the virtual scene's time parameters, intuitively showing the user the current progress of the virtual scene's time and the remaining time until the target time window. This auxiliary entity provides users with a time-based operational reference, helping them grasp the rhythm and timing of their operations.
[0061] In another embodiment, the light source has a first attribute label, and at least one scene model in the virtual scene has a second attribute label. The first and second attribute labels are used to define the interaction rules between the light source and the scene model. When the system detects that the illuminated area of the light source and the scene model satisfy a spatial relationship, it determines whether the first and second attribute labels conform to the label matching rules. If they conform, the system triggers a state change in the scene model. The state change alters the occlusion contour of the scene model on the light source, thereby changing the interactive shadow projected by the scene model onto the shadow display area. For example, the first attribute label of the light source is flame-type, and the second attribute label of the scene model is flammable. When the illuminated area of the flame-type light source covers the flammable scene model, the system determines that the flame-type label and the flammable label conform to a preset label matching rule, triggering the flammable scene model to switch to a burning state. During the burning process, the scene model gradually shrinks or disappears, and its occlusion contour on the light decreases accordingly, causing the corresponding interactive shadow shape on the shadow display area to change synchronously. As another example, the first attribute label of the light source is flame-type, and the second attribute label of the scene model is molten. When the illuminated area of a flame-type light source covers a meltable scene model, the system triggers the meltable scene model to switch to a vanishing state. The original occlusion effect of the scene model is removed, and the previously occluded area on the shadow display area becomes the illuminated area. Similarly, if the first attribute label of the light source is reflective, and the second attribute label of the scene model is reflective, when the illuminated area of a reflective light source covers a reflective scene model, the system triggers the reflective scene model to reflect the light in another direction, forming new reflected shadows at different locations in the shadow display area.
[0062] In another embodiment, the system can also change the presentation effect of interactive shadows by adjusting the optical elements between the light source and the shadow display area. The interactive virtual scene may include lens entities. Based on the pose changes of the interactive entity, the pose of the lens entities linked to the interactive entity in the virtual scene is adjusted synchronously. When the lens entity is in the path of the light source, the shadow size of the interactive shadow projected by the light source onto the shadow display area is updated. When the lens model moves closer to the light source, the focusing of the light increases, and the interactive shadow on the shadow display area shrinks; when the lens model moves away from the light source, the focusing of the light decreases, and the interactive shadow on the shadow display area enlarges. The system updates the shadow size of the interactive shadow according to the current pose of the lens model.
[0063] In another embodiment, the interactive virtual scene may further include a filter entity. Based on the pose change of the interactive operation entity, the pose of the filter entity linked with the interactive operation entity in the virtual scene is adjusted synchronously. When the filter entity is on the illumination path of the light source, the shadow color of the interactive shadow projected by the light source onto the shadow display area is updated. The system modifies the rendering color parameters of the interactive shadow according to the color attributes configured in the filter model, so that the interactive shadow presents the corresponding hue. In another related embodiment, if the system has a corresponding target shadow containing shadow color information, when detecting the matching degree between the interactive shadow and the target shadow, the system detects not only the matching degree of their shapes but also the matching degree of their shadow colors.
[0064] In an example scenario, continuing from the previous example of the attic in an old mansion, a real lantern in the attic serves as the light source, a real bird statue as the scene model, and a wooden wall as the shadow display area. The real lantern's first attribute is "flame-type." When the user drags the lantern model in the miniature room model, the position of the real lantern in the attic moves synchronously, and the position of the interactive shadow cast on the wooden wall by the real lantern illuminating the bird statue changes accordingly. When the user rotates the bird statue, the orientation of the real bird statue in the attic changes synchronously, the outline of the bird statue blocking the light changes, and the shape of the interactive shadow on the wooden wall changes accordingly. On the other side of the attic, a wooden box is placed, with the second attribute being "flammable." When the user drags the lantern model to move the real lantern near the wooden box, the flame-type real lantern's illuminated area covers the flammable wooden box. The system determines that the tag matching rule is met, triggering the wooden box to switch to a burning state, and the wooden box gradually burns away and disappears. The light that was originally blocked by the wooden box can now pass through, and the shape of the interactive shadow on the wooden wall changes again. The user then dragged the lens model to bring the lens in the attic closer to the real lantern, reducing the interactive shadow on the wooden wall to half its original size. The user also dragged the color filter model to move the red color filter in the attic into the light path, changing the interactive shadow on the wooden wall from black to red. By comprehensively adjusting the poses of the lantern model, bird statue, lens model, and color filter model within the miniature room model, and by utilizing the property interactions between the real lantern and the wooden box in the attic of the old mansion, the user altered the occlusion conditions in the attic scene, gradually making the shape, size, and color of the interactive shadows approach the outline of a semi-transparent bird.
[0065] In one embodiment, if the system has a corresponding target shadow, after the interactive shadow is updated in real time according to the pose change of the linked entity, the system will detect the shadow matching degree between the updated interactive shadow and the target shadow. The shadow matching degree is a quantitative indicator used to measure the similarity between the interactive shadow and the target shadow. The system performs shadow image similarity comparison on the interactive shadow and the target shadow captured in the shadow display area, and calculates the degree of overlap between the two in terms of shape, outline, coverage area, etc. The higher the degree of overlap, the higher the matching degree. When the matching degree reaches or exceeds a preset matching threshold, the system determines that the matching success condition is met.
[0066] In one embodiment, the system can also combine pose parameter difference comparison for comprehensive judgment. The system performs difference comparison on the current pose parameters of the linked entity and the target pose parameters associated with the target shadow, comparing the current spatial position and orientation angle of the linked entity with the pre-configured correct pose, calculating the position deviation and angle deviation. The smaller the deviation, the higher the second matching degree. The system comprehensively determines the final matching degree based on the first matching degree obtained from the shadow image similarity comparison and the second matching degree obtained from the difference comparison. By combining visual and spatial comparisons, the system comprehensively judges the correctness of the interactive shadow from multiple dimensions, improving the accuracy and reliability of the judgment results.
[0067] The system determines the final matching degree based on a combination of the first and second matching degrees. In one embodiment, the final matching degree is the weighted average of the first and second matching degrees, with the weights flexibly configured according to the type of interactive task. In another embodiment, the final matching degree is the smaller of the two; that is, the overall matching degree is satisfied only when both the visual overlap and the spatial pose accuracy reach a certain standard. By combining image-level comparison and parameter-level comparison, the system can comprehensively judge the correctness of interactive shadows from both visual performance and spatial state dimensions, avoiding misjudgments or omissions that may occur with a single judgment method, and improving the accuracy and reliability of the judgment results. The system can also set tolerance ranges for positional deviation and angular deviation respectively, giving the matching judgment a certain margin of error.
[0068] When the matching degree reaches or exceeds a preset matching threshold, the system determines that the matching success condition is met. In embodiments that include shadow color matching, the matching success condition also includes shadow color matching requirements; in embodiments that include attribute tag interaction, the matching success condition also includes interaction state requirements, i.e., the state change of a specific entity must have been triggered. After a successful match, the system triggers subsequent shadow matching success processing, including displaying a matching success visual effect in the shadow display area, switching the interactive virtual scene to a matching completed state, and triggering scene events associated with the successful shadow matching in the virtual scene. In one embodiment, when the matching degree meets the matching success condition, the system can also automatically adjust the linked entities whose poses are not fully aligned with the target shadow's correct pose, smoothly transitioning the linked entities from their current pose to the correct pose through interpolation animation, so that the interactive shadow is visually fully aligned with the target shadow.
[0069] During the matching process, the system can also provide visual feedback to the user on the matching progress within the virtual scene. In one embodiment, the system displays a shadow hint of the target shadow in the shadow display area. As the matching degree increases, the visual effects of the shadow hint change accordingly; for example, the transparency of the shadow hint gradually decreases, and the brightness gradually increases, allowing the user to intuitively perceive the proximity between the current interactive shadow and the target shadow. When the matching degree reaches a preset matching threshold, the shadow hint switches to a fully highlighted state to confirm a successful match.
[0070] In another embodiment, when the matching degree meets the successful matching condition, the system displays a visual effect of successful shadow matching in the shadow display area, such as an animation of the interactive shadow and the target shadow merging, with the two gradually overlapping from a near-close state. Simultaneously, the display state of the interactive virtual scene switches from the current viewing perspective to a matching-completed state, for example, the camera zooms out from the interactive virtual scene or a completion indicator appears at the edge of the screen. Furthermore, the system triggers scene events associated with successful shadow matching in the current virtual scene. These scene events include at least one of the following: opening a closed passage, unlocking a hidden area, activating a mechanism, or playing a scene animation, allowing the user to directly observe the actual effect of shadow matching within the virtual scene.
[0071] In one embodiment, when the matching degree meets the matching success condition, the system triggers subsequent processing for successful shadow matching. A visual effect indicating successful shadow matching is displayed in the shadow display area, and the interactive virtual scene is switched from the current viewing perspective to a matching-completed state. Scene events associated with successful shadow matching are triggered in the virtual scene, including at least one of opening a closed passage, unlocking a hidden area, activating a mechanism, or playing a scene animation. For example, in an exemplary scenario, continuing from the aforementioned example of an old mansion attic, after the user adjusts the poses of various interactive entities using a miniature room model, the interactive shadows on the wooden wall gradually approach the outline of a semi-transparent flying bird. The system continuously monitors the matching degree between the interactive shadows and the target shadow. When the matching degree reaches a preset threshold, the matching success condition is determined to be met. The system displays a shadow blending effect on the wooden wall, switches the camera of the miniature room model to a matching-completed state, and triggers the slow opening of a hidden compartment on the attic ceiling.
[0072] As can be seen, the interactive shadows are updated based on the pose changes of the linked entities, mapping the pose changes of the linked entities to visual changes on the shadow display area in real time, providing users with visual feedback synchronized with the current operation. By introducing an attribute tag interaction mechanism between the light source and the scene model, the system can trigger changes in the state of the model when the light source illuminates a specific model, thereby dynamically changing the occlusion conditions in the scene and making the interactive shadows more varied.
[0073] Based on any embodiment of the method in this application, such as Figure 3 As shown, the interactive operation entity includes at least one of the light source control entity or the model control entity. Specifically, the explanation is provided through steps S1211 and S1212 as follows.
[0074] Step S1211: The light source control entity links with the light source entity, which is a linked entity in the current virtual scene. The pose adjustment operation event of the light source control entity is used to synchronously adjust the pose of the light source entity.
[0075] A light source manipulation entity is a type of interactive entity located within an interactive virtual scene, allowing users to directly manipulate it. The light source manipulation entity interacts with the light source entity, which is a linked entity within the virtual scene. Pose adjustment events on the light source manipulation entity are used to synchronously adjust the pose of the light source entity, causing its spatial position and orientation angle to change in sync. Changes in the pose of the light source entity directly affect the direction of light emitted from the light source and the position of the light source, thereby altering the position and angle of the interactive shadows.
[0076] In step S1212, the model manipulation entity is linked with the scene model, which is a linked entity in the current virtual scene. The pose adjustment operation event of the model manipulation entity is used to synchronously adjust the pose of the scene model.
[0077] Model-manipulated entities are another type of interactive entity, also residing within the interactive virtual scene. They interact with scene models, which act as linked entities. Pose adjustment events on model-manipulated entities synchronously adjust the pose of the scene models, causing their spatial position and orientation to change in sync. Changes in the scene model's pose alter its occlusion profile, thus changing the shape of the interactive shadows cast by the scene model. Light source-manipulated entities and model-manipulated entities can coexist in the same interactive virtual scene. Users can adjust lighting and occlusion conditions to gradually bring the interactive shadows closer to the desired state.
[0078] In one embodiment, light source manipulation entities and model manipulation entities can coexist in the same interactive virtual scene. Users can alternately or sequentially manipulate these entities to adjust the poses of the light source entity and the scene model, respectively. By comprehensively adjusting lighting and occlusion conditions, the interactive shadow gradually approaches the target shadow. In another embodiment, the interactive virtual scene may contain only light source manipulation entities, in which case the changes in the interactive shadow are primarily driven by the pose changes of the light source entity. In yet another embodiment, the interactive virtual scene may contain only model manipulation entities, in which case the changes in the interactive shadow are primarily driven by the pose changes of the scene model, while the light source entity maintains a fixed pose. The specific type of interactive manipulation entity configured in the interactive virtual scene is determined by the design requirements of the shadow interaction operation.
[0079] As can be seen, dividing interactive entities into light source manipulation entities and model manipulation entities clarifies the linkage relationship between different types of interactive entities and their corresponding linked entities in the virtual scene. Both types of interactive entities can be used individually or in combination, providing a flexible entity configuration method for shadow interaction design. This also allows users to comprehensively adjust the presentation effect of interactive shadows from multiple dimensions by manipulating different types of interactive entities.
[0080] Based on any embodiment of the method in this application, after responding to the light and shadow activation command applied to the current virtual scene, the interactive operation entity that is linked with the entity in the current virtual scene is highlighted in the interactive virtual scene. The following describes this embodiment.
[0081] During the process of the system responding to the light and shadow activation command and beginning to define the interactive virtual scene, it is also necessary to prompt the user which interactive entities are manipulable. By adding a process of highlighting interactive entities when responding to the light and shadow activation command, users can quickly identify manipulable objects in the interactive virtual scene, improving the guidance and efficiency of the operation.
[0082] Highlighting refers to visually distinguishing interactive entities with interactive relationships within a virtual scene from other objects, making them more prominent in the scene. The purpose of highlighting is to convey a prompt of operability to the user; that is, the highlighted interactive entity is the object that the user can manipulate in the current shadow interaction. There are various ways to implement highlighting. In one embodiment, highlighting can be achieved by overlaying a stroke effect on the edge of the interactive entity. The stroke effect typically manifests as a glowing line appearing along the outline of the interactive entity, with the color and brightness of the glowing line contrasting with the default appearance of the interactive entity. In another embodiment, highlighting can be achieved by covering the surface of the interactive entity with a semi-transparent, high-gloss material, giving the surface a brighter or glowing effect distinct from its normal state. In yet another embodiment, highlighting can be achieved by making the interactive entity exhibit a periodic flashing effect, which attracts the user's attention by alternating between changes in the brightness or transparency of the interactive entity. In another embodiment, highlighting can be achieved by displaying text at the interactive entity to indicate to the user that the entity is interactive. For example, a text box or text effect can be set at the location of the interactive entity, with text typically stating "Interactive" or "Quick Interaction" to inform the user that the entity in the interactive virtual scene is interactive. Furthermore, highlighting can be combined with multiple methods described above to achieve a stronger visual cueing effect.
[0083] The highlighting is executed after the system receives the lighting and shadow activation command. While determining the interactive virtual scene, the system iterates through all interactive entities within the scene, identifies those with inter-entity relationships with other entities in the virtual scene, and highlights these entities. Independent entities without inter-entity relationships, such as lighting models or decorative objects used to illuminate the interactive virtual scene, are not highlighted to maintain their default appearance as auxiliary elements in the scene.
[0084] The highlighted state can change during shadow-based interactive operations. In one embodiment, when the user moves the cursor or selection indicator over a highlighted interactive entity, the highlighting effect can be further enhanced, for example, by thickening the stroke, increasing the brightness of the highlighted material, or increasing the flashing frequency, to indicate the currently selected target. When the user presses the confirmation button or clicks the interactive entity to begin dragging, the highlighting effect can switch to another pressed state. When the user completes the operation and releases the confirmation button or mouse, the highlighting effect returns to the normal operable prompt state.
[0085] It can be seen that highlighting interactive entities with a linkage relationship when responding to the light and shadow activation command can convey clear control instructions to the user at the initial stage of the shadow interaction process. Through this visual cue, users can quickly identify which objects in the interactive virtual scene can be manipulated in the current shadow interaction operation without having to explore and try on their own. This reduces the cognitive burden before operation, improves operational efficiency, and allows users to focus their attention on the manipulation itself rather than target identification.
[0086] Based on any embodiment of the method in this application, such as Figure 4 As shown, in response to a pose adjustment operation event acting on an interactive operation entity, the pose adjustment operation event has a pose adjustment constraint trajectory, which includes at least one of a translation constraint trajectory, a surround constraint trajectory, and a self-rotation constraint trajectory. Specifically, this will be explained through steps S1221 to S1223, as follows.
[0087] Step S1211: When the pose adjustment operation event includes a translation constraint trajectory, the spatial position of the interactive operation entity that performs the pose adjustment is adjusted by displacement within the translation constraint trajectory.
[0088] In interactive virtual scenes, when users perform operations such as moving, rotating, and dragging on interactive entities, the system needs to impose motion restrictions on these operations to ensure that the interactive entities move within a controllable range. Pose adjustment constraint trajectories are pre-configured geometric constraints used to limit the movement of interactive entities in the interactive virtual scene. The pose adjustment constraint trajectory defines the allowed range of motion of the interactive entity when the user performs operations on it. The user's input is mapped to parameter changes of the interactive entity on the constraint trajectory, and the pose of the interactive entity is always limited within the range allowed by the constraint trajectory. Pose adjustment constraint trajectories include at least one of translation constraint trajectories, orbit constraint trajectories, and rotation constraint trajectories, each corresponding to different movement modes.
[0089] A translational constraint trajectory is a predefined 3D spatial curve that defines the movement path of a spatial position within an interactive virtual scene. When a pose adjustment operation event includes a translational constraint trajectory, the spatial position of the interactive entity undergoing pose adjustment is displaced within the translational constraint trajectory. In keyboard and mouse operation mode, the user generates pose adjustment operation events by dragging the interactive entity with the mouse; in touchscreen operation mode, the user generates pose adjustment operation events by swiping their finger; in gamepad operation mode, the user generates input by moving the joystick, and the system maps the component of the joystick input that is consistent with the allowed direction of the constraint trajectory to a pose change, filtering out inconsistent directional components.
[0090] Step S1222: When the pose adjustment operation event includes a surrounding constraint trajectory, the spatial position of the interactive operation entity that performs the pose adjustment is adjusted by displacement within the surrounding constraint trajectory.
[0091] A surrounding constraint trajectory is a predefined closed curve that defines the path for a spatial entity to move around a central point or axis, including circular or elliptical trajectories. When a pose adjustment operation event has a surrounding constraint trajectory, the spatial position of the interactive entity undergoing pose adjustment is adjusted within the surrounding constraint trajectory. In keyboard and mouse operation mode, when the user clicks on the interactive entity and drags it along the surrounding direction, the system maps the mouse movement vector to a surrounding movement amount along the tangential direction of the surrounding constraint trajectory. In touchscreen operation mode, when the user slides their finger on the touchscreen along the surrounding direction, the system maps the touch sliding vector to a surrounding movement amount along the tangential direction of the surrounding constraint trajectory. In gamepad operation mode, when the user inputs by moving a joystick, the system maps the component of the joystick's two-dimensional vector input that is consistent with the tangential direction of the surrounding constraint trajectory to a surrounding movement amount, while components that are inconsistent with the allowed directions of the surrounding constraint trajectory are filtered out. When the surrounding constraint trajectory supports bidirectional surrounding movement, when the user moves the joystick in different directions, the interactive entity moves around along the corresponding direction of the surrounding constraint trajectory.
[0092] Step S1223: When the pose adjustment operation event includes a self-rotation constraint trajectory, the spatial orientation of the interactive operation entity performing the pose adjustment is adjusted within the self-rotation constraint trajectory.
[0093] A spin constraint trajectory defines the angular range of a spatial orientation's rotation around a certain rotation axis, including two parameters: the rotation axis and the angular range. When a pose adjustment operation event has a spin constraint trajectory, the spatial orientation of the interactive entity undergoing pose adjustment is adjusted within the spin constraint trajectory. In keyboard and mouse operation mode, users can trigger rotation control by dragging the mouse over a specific area of the interactive entity; the system maps the mouse drag vector to an angular change around the rotation axis. In touchscreen operation mode, users can trigger rotation control through specific touch gestures; the system maps the touch gesture movement to an angular change around the rotation axis. In gamepad operation mode, users generate input by moving a joystick; the system maps the joystick input to an angular change around the rotation axis. The joystick movement input must match the spin constraint trajectory; the system filters out directional components in the joystick input that are inconsistent with the allowed rotation direction of the spin constraint trajectory. The angular change is limited by the angular range; the orientation angle of the interactive entity can only change within the angular range. The rotation change is calculated around the rotation axis defined by the spin constraint trajectory. When the interactive entity rotates to the boundary of the angle range, the system stops the interactive entity from rotating further.
[0094] It can be seen that by introducing pose adjustment constraint trajectories, the movement of interactive entities is restricted to the range defined by translation, orbit, or rotation constraint trajectories. This effectively prevents interactive entities from deviating from the preset movement path or angle range due to unintentional user errors. This ensures that users always adjust within a reasonable movement space during operation, reducing invalid operations. Furthermore, by configuring different constraint trajectories for different types of interactive entities and providing corresponding input mapping methods for different input devices, a rich variety of shadow interaction control methods can be designed to meet the needs of different virtual scene platforms and interaction scenarios.
[0095] Based on any embodiment of the method in this application, such as Figure 5 As shown, the translation constraint trajectory and the surrounding constraint trajectory have corresponding movement trajectory visual effects, and the self-rotation constraint trajectory has corresponding rotation direction visual effects, including steps S1231 to S1233. The following describes each step.
[0096] Step S1231: When the pose adjustment constraint trajectory is a translation constraint trajectory, the corresponding movement trajectory visual effect is displayed on the translation constraint trajectory, and the movable directions supported by the translation constraint trajectory are displayed on the movement trajectory visual effect.
[0097] After confirming that the pose adjustment operation event has a pose adjustment constraint trajectory, it is also necessary to provide the user with visual cues about the constraint trajectory, enabling the user to intuitively understand the possible directions and ranges of motion of the interactive operation entity. This is achieved by adding visual effects for the translation and orbit constraint trajectories, and visual effects for the rotation direction of the rotation constraint trajectory, and conveying control guidance to the user through the directional information displayed on the visual effects. The following explanation is based on the operation modes of different input devices.
[0098] Motion trajectory visual effects are visual elements used to visualize translational and orbital constraint trajectories in interactive virtual scenes. Motion trajectory visual effects can manifest as glowing lines, dashed lines, arrow sequences, or other visual patterns with directional indication functions extending along the constraint trajectory. Rotation direction visual effects are visual elements used to visualize self-rotating constraint trajectories in interactive virtual scenes, and can manifest as arc-shaped arrows around the rotation axis, ring-shaped light effects, or rotation direction indicators, etc.
[0099] When the pose adjustment constraint trajectory is a translation constraint trajectory, a corresponding movement trajectory visual effect is displayed on the translation constraint trajectory, and the movable directions supported by the translation constraint trajectory are displayed on the movement trajectory visual effect. In keyboard and mouse operation mode, when the user hovers the mouse pointer over an interactive operation entity with a translation constraint trajectory, a movement trajectory visual effect is displayed on the translation constraint trajectory. For translation constraint trajectories that support bidirectional movement, the direction indicator on the movement trajectory visual effect cycles between the two movement directions. Step S1232: When the pose adjustment constraint trajectory is a surround constraint trajectory, a corresponding movement trajectory visual effect is displayed on the surround constraint trajectory, and the surround movement directions supported by the surround constraint trajectory are displayed on the movement trajectory visual effect.
[0100] When the pose adjustment constraint trajectory is a wraparound constraint trajectory, the corresponding movement trajectory visual effect is displayed on the wraparound constraint trajectory, and the wraparound movement directions supported by the wraparound constraint trajectory are displayed on the movement trajectory visual effect. In keyboard and mouse operation mode, when the user hovers the mouse pointer over an interactive operation entity with a wraparound constraint trajectory, the movement trajectory visual effect is displayed on the wraparound constraint trajectory.
[0101] Step S1233: When the pose adjustment constraint trajectory is a self-rotation constraint trajectory, the corresponding rotation direction visual effect is displayed on the self-rotation constraint trajectory, and the rotation direction visual effect displays the self-rotatable directions supported by the self-rotation constraint trajectory.
[0102] When the pose adjustment constraint trajectory is a self-rotation constraint trajectory, a corresponding rotation direction visual effect is displayed on the self-rotation constraint trajectory, and the rotation directions supported by the self-rotation constraint trajectory are displayed on the rotation direction visual effect. In keyboard and mouse operation mode, the visual effect is displayed when the mouse pointer hovers over the interactive object; in gamepad operation mode, the visual effect is displayed when the interactive object is selected as the current operation target.
[0103] The timing and duration of visual effects differ across keyboard / mouse, touchscreen, and gamepad operation modes. In keyboard / mouse mode, visual effects appear when the mouse pointer hovers over the interactive object, remain visible while the user clicks and drags the object, and may persist or fade away after the user releases the mouse. In touchscreen mode, visual effects appear when the user touches the interactive object, remain visible while the user slides their finger, and may persist or fade away after the user removes their finger. In gamepad mode, visual effects appear when the interactive object is selected as the current target, remain visible while the user moves the joystick, and may persist after the user returns the joystick to its center.
[0104] As can be seen, configuring motion trajectory visual effects for translational and orbital constraint trajectories, and rotation direction visual effects for self-rotation constraint trajectories, along with directional indicators on these visual effects to convey the possible direction of movement to the user, provides intuitive visual guidance before the user performs any operation. Adapting the display of visual effects to the operating modes of different input devices ensures that users receive visual feedback matching their operating method, whether using a keyboard and mouse, touchscreen, or gamepad. The directional indicators cycle between the two directions when bidirectional movement is possible, allowing users to fully understand the range of motion of the interactive entity, enhancing the intuitiveness and interactive experience of the operation.
[0105] Based on any embodiment of the method in this application, the interactive virtual scene includes at least two interactive operation entities, one of which has a linkage relationship with another interactive operation entity. The following describes this embodiment.
[0106] In response to a pose adjustment operation event of an interactive operation entity with a linkage relationship, the poses of other interactive operation entities with a linkage relationship with the interactive operation entity are simultaneously adjusted based on the pose change of the interactive operation entity.
[0107] In interactive virtual scenarios, the movement relationships between interactive entities can not only be controlled independently by the user, but also have internal linkage relationships established between them. When the user performs a control on one interactive entity, the poses of other interactive entities with linkage relationships will also be adjusted synchronously, thereby enriching the hierarchy of control and the design space of interactive scenarios.
[0108] An interactive virtual scene contains at least two interactive entities, one of which has a linkage relationship with the other. This linkage refers to the interaction between entities within the interactive virtual scene, distinct from the linkage relationship between an interactive entity and other linked entities within the virtual scene. The linkage relationship between interactive entities is pre-configured, defining how the pose changes of other interactive entities will follow when one interactive entity is manipulated by the user. The linkage relationship can be one-to-one, where the movement of one interactive entity causes the movement of another; or one-to-many, where the movement of one interactive entity causes the movement of multiple other interactive entities. The configuration parameters for the linkage relationship include the linkage type and linkage ratio. The linkage type defines the linkage method, including translation linkage and rotation linkage. Translation linkage means that when the manipulated interactive entity undergoes a translational change, the target interactive entity also undergoes a synchronous translational change. Rotation linkage means that when the manipulated interactive entity undergoes a rotational change, the target interactive entity also undergoes a synchronous rotational change. The linkage ratio defines the numerical relationship between the pose change of the controlled interactive entity and the pose change of the target interactive entity, including 1:1 linkage, proportional linkage, and reverse linkage. 1:1 linkage means the pose change of the target interactive entity is exactly equal to the pose change of the controlled interactive entity. Proportional linkage means the pose change of the target interactive entity is the pose change of the controlled interactive entity multiplied by a preset scaling factor. Reverse linkage means the pose change of the target interactive entity is in the opposite direction to the pose change of the controlled interactive entity.
[0109] When a user performs a pose adjustment operation on an interactive entity with a linkage relationship, the system first obtains the pose change of the manipulated interactive entity. The pose change is data calculated based on the pose adjustment operation event and includes at least one of translational and rotational changes. The system then searches for other interactive entities with linkage relationships to the manipulated interactive entity based on pre-configured linkage relationships. For each linked target interactive entity, the system determines the pose dimension that needs to be adjusted synchronously based on the linkage type, converts the pose change of the manipulated interactive entity according to the linkage ratio, and applies the converted pose change to the linked target interactive entity, synchronously adjusting its pose. The pose change of the linked target interactive entity further affects the pose of linked entities in the virtual scene, thus indirectly affecting the rendering effect of interactive shadows in the shadow display area.
[0110] It can be seen that configuring the linkage relationship between interactive operation entities in the interactive virtual scene enables the user's operation of one interactive operation entity to drive the synchronous movement of other interactive operation entities, realizing the linkage adjustment of multiple interactive operation entities with a single operation, and forming a multi-level linkage system. This not only enriches the hierarchy of operation, but also provides greater flexibility for the design of interactive scenes.
[0111] Based on any embodiment of the method in this application, such as Figure 6 As shown, updating the interactive shadow formed in the shadow display area of the virtual scene includes steps S1311 and S1312. The following describes each step.
[0112] Step S1311: Based on the pose change of the interactive operation entity, synchronously adjust the pose of the light source entity associated with the interactive operation entity in the current virtual scene.
[0113] During the update of interactive shadows, the pose changes of linked entities can affect the interactive shadows formed in the shadow display area in different ways. When the linked entity is a light source, the specific update method for interactive shadows is to first synchronously adjust the pose of the light source associated with the interactive entity in the virtual scene, and then update the interactive shadows based on the pose changes of the light source, making the update process of interactive shadows more explicit and specific.
[0114] Step S1312: Based on the pose change of the light source entity, update the interactive shadow formed by the light source manipulating the entity to illuminate the entity in the current virtual scene.
[0115] After the pose of the light source entity is synchronized, its current spatial position and current illumination direction change. The light source entity illuminates the scene model in the virtual scene from its new position and direction. The system first synchronizes the pose of the light sources associated with the interactive entity in the virtual scene, and then updates the interactive shadows based on the pose changes of the light source entities. There are pre-configured associations between the light source entities and the interactive entities. When the user performs a pose adjustment operation event on the interactive entity, the system finds the corresponding light source according to the association, applies the pose change to that light source, and synchronizes the pose of the light source.
[0116] It can be seen that by first synchronously adjusting the pose of the light source entity and then updating the interactive shadow based on the pose change, a direct causal relationship is established between the pose change of the light source entity and the update of the interactive shadow. As the emitter of light in the virtual scene, the pose change of the light source entity can directly affect the position and angle of the interactive shadow, providing users with a feasible way to adjust the pose of the light source entity by manipulating the interactive entity.
[0117] Based on any embodiment of the method in this application, such as Figure 7 As shown, after responding to the pose adjustment operation event acting on the interactive operation entity, steps S1321 and S1322 are included. Each step is explained below.
[0118] Step S1321: Based on the pose change of the interactive operation entity, synchronously adjust the pose of the lens entity that is linked with the interactive operation entity in the virtual scene.
[0119] In updating interactive shadows, in addition to changing the poses of the light source and the scene model, the rendering effect of interactive shadows can also be changed by adjusting optical elements located on the path of the light source. The ability to adjust the size of interactive shadows using lens entities allows users to manipulate these entities to change the size of the interactive shadows projected onto the virtual scene, further enriching the dimensions of manipulation and the expressiveness of interactive shadows.
[0120] A lens entity is a type of interactive entity located within an interactive virtual scene, allowing users to directly manipulate it through movement, rotation, and dragging. The lens entity is linked to a lens model within the virtual scene. A lens model is an optical element placed along the illumination path of a light source entity in the virtual scene, capable of altering the focusing or deflection angle of light passing through it. The physical form of the lens model can be a convex lens, a concave lens, or other optical elements with focusing or diffusing capabilities. When a user manipulates a lens entity in the interactive virtual scene, the system calculates the pose change of the lens entity based on the pose adjustment operation event, locates the linked lens model, applies the pose change to the lens model, and synchronously adjusts its spatial position. The pose change of the lens model includes at least one of displacement along the illumination direction and displacement perpendicular to the illumination direction.
[0121] Step S1322: When the lens entity is on the illumination path of the light source entity in the current virtual scene, update the shadow range of the interactive shadow projected by the light source entity.
[0122] The lens model is located on the path of the interactive shadow cast by the light source entity. The interactive shadow originally cast by the light source entity passes through the lens model, and a new interactive shadow is cast onto the current virtual scene, thus changing the shadow's range. When the spatial position of the lens model changes, the path and angle of the light rays from the light source entity through the lens model change, causing the shadow's range to expand or shrink.
[0123] In one embodiment, when the lens model moves closer to the light source along the illumination direction, its focusing effect on the light from the light source entity is enhanced, and the size of the interactive shadow on the shadow display area decreases. When the lens model moves away from the light source entity along the illumination direction, its focusing effect on the light is weakened, and the shadow range of the interactive shadow in the current virtual scene is enlarged. When the lens model moves in a direction perpendicular to the illumination direction, the deflection angle of the light from the lens model changes, the position of the interactive shadow in the current virtual scene shifts, and may be accompanied by a certain degree of shape distortion.
[0124] The system recalculates the propagation path of the interactive shadow after it passes through the lens model based on the current pose parameters of the lens model, thereby changing the original interactive shadow and projecting a new interactive shadow onto the current virtual scene, thus updating the shadow range of the interactive shadow in the current virtual scene.
[0125] As can be seen, by adding a manipulation mechanism to the lens entity, users can further change the shadow range of interactive shadows by adjusting the pose of the lens model, in addition to adjusting the pose of the light source and scene model. The focusing and defocusing functions of the lens model introduce a scaling dimension to the presentation effect of interactive shadows, enriching the means of manipulation and increasing the flexibility and layering of the interaction.
[0126] Based on any embodiment of the method in this application, such as Figure 8 As shown, after responding to the pose adjustment operation event acting on the interactive operation entity, steps S1331 and S1332 are included. Each step is explained below.
[0127] Step S1331: Based on the pose change of the interactive operation entity, synchronously adjust the pose of the filter entity that is linked with the interactive operation entity in the virtual scene.
[0128] In updating interactive shadows, besides adjusting the poses of the light source and the scene model, the color rendering effect of the interactive shadows can also be changed by adjusting the optical elements located on the path of the light source. By adjusting the shadow color of interactive shadows through filter entities, users can manipulate the filter entities to change the color of the interactive shadows projected by the light source into the virtual scene, further enriching the dimensions of manipulation and the expressiveness of interactive shadows, and making the color of the interactive shadows one of the judgment dimensions for matching detection.
[0129] A filter entity is a type of interactive entity located within an interactive virtual scene, allowing users to directly manipulate it through movement, rotation, and dragging. The filter entity is linked to filter models within the virtual scene. A filter model is an optical element placed along the path of a light source in the virtual scene, capable of altering the color composition of light passing through it. The physical form of a filter model can be a colored translucent sheet, stained glass, a filter, or other optical elements with filtering capabilities. The color attributes of filter models include various color types such as red, blue, green, and yellow, with different color types corresponding to different light filtering effects. When a user manipulates a filter entity in the interactive virtual scene, the system calculates the pose change of the filter entity based on the pose adjustment operation event, locates the filter model linked to the filter entity, applies the pose change to the filter model, and synchronously adjusts the spatial position of the filter model. The pose change of the filter model includes at least one of the following: displacement along the direction of light illumination, displacement perpendicular to the direction of illumination, and rotation around a rotation axis.
[0130] Step S1332: When the filter entity is on the illumination path of the light source entity in the current virtual scene, update the shadow color of the interactive shadow projected by the light source entity.
[0131] The filter model is located on the illumination path of the light source entity. When rendering interactive shadows, the system detects whether the filter model is on the illumination path. When the filter model is on the illumination path, the system modifies the rendering color parameters of the interactive shadow according to the color attributes configured for the filter model, so that the rendered interactive shadow presents a hue corresponding to the color attributes of the filter model. The color attributes of the filter model are pre-configured rendering parameters, including various color types such as red, blue, green, and yellow. Different color attributes correspond to different shadow color rendering effects. When the spatial position of the filter model changes, the coverage area of the filter model on the rendering path changes, and the shadow color of different areas in the interactive shadow of the current virtual scene changes accordingly.
[0132] In one embodiment, as the filter model moves along the illumination direction of the light source entity, the system adjusts the intensity parameters of the shadow color rendering, and the color saturation of the interactive shadow changes accordingly. In another embodiment, when the filter model moves along a direction perpendicular to the illumination direction, the filter model may partially or completely cover the rendering path, with some areas of the interactive shadow applying filter color rendering while other areas retain the original color rendering.
[0133] As can be seen, by adding a manipulation mechanism for filter entities, users can change the shadow color of interactive shadows by adjusting the pose of the filter model, in addition to adjusting the pose of the light source and scene model. The filtering function of the filter model introduces a color dimension to the presentation effect of interactive shadows, and the introduction of filter entities allows users to comprehensively adjust the presentation effect of interactive shadows from multiple dimensions such as spatial position, orientation angle, size, and color representation.
[0134] Based on any embodiment of the method in this application, such as Figure 9 As shown, after updating the interactive shadows in the current virtual scene, steps S1341 to S1344 are included. The following describes each step.
[0135] Step S1341: Obtain the target shadow corresponding to the light and shadow start command for shadow matching judgment, and perform similarity comparison processing between the latest updated interactive shadow and the target shadow to obtain the first matching degree.
[0136] Based on the real-time updating of interactive shadows, a complete shadow matching and judgment process has been added, transforming shadow interaction into a goal-oriented interaction mode, forming a complete interactive closed loop from operation, observation, judgment to completion.
[0137] Regarding the introduction and acquisition of target shadows: A target shadow is a reference graphic determined by the system when receiving a light and shadow activation command, used for shadow matching and determination. This reference graphic defines the target state that the interactive shadow is expected to achieve. When responding to the light and shadow activation command, the system reads the target shadow data for matching and determination with the corresponding shadow in the current interactive virtual scene. The target shadow includes the desired shadow shape information, and in one embodiment, it may also include at least one of shadow color information, shadow range information, or shadow position information. The target shadow is displayed by rendering it as a semi-transparent outline or a corresponding texture on the area in the current virtual scene used to receive shadows, allowing the user to understand the desired interactive shadow form before manipulating the interactive entity. The introduction of the target shadow as a determination benchmark transforms shadow interaction from aimless free manipulation to a goal-oriented interaction mode, providing a comparison basis for subsequent matching and determination.
[0138] In one specific embodiment, the target shadow can be directly displayed in the current virtual scene when the system receives the light and shadow activation command.
[0139] In another embodiment, the target shadow may appear after the user begins to manipulate the interactive entity. In yet another embodiment, the target shadow may appear after the user triggers a specific interactive action.
[0140] When determining whether the interactive shadow created by the user's current operation meets the target shadow matching requirements, a specific method for calculating the matching degree is needed. By comprehensively determining the matching degree through both similarity comparison and pose parameter difference comparison, the matching degree determination includes both visual image comparison and spatial parameter comparison, evaluating the correctness of the interactive shadow from multiple dimensions and improving the accuracy and reliability of the determination results.
[0141] Similarity comparison processing refers to the system's visual comparison of the currently captured interactive shadow image in the shadow display area with a pre-configured target shadow reference image. The system compares pixels or regions at corresponding positions in the two images one by one, including visual features such as shape, outline, coverage area, and edge direction. The system calculates the degree of overlap or similarity between the two images in terms of visual appearance; the higher the degree of overlap, the higher the first match score.
[0142] In one embodiment, similarity comparison can be performed using a region area comparison method, calculating the ratio of the area of the intersection region of the interactive shadow and the area of the union region of the target shadow as the first matching degree.
[0143] In another embodiment, similarity comparison can employ contour matching, extracting the contour lines of the interactive shadow and comparing them with the contour lines of the target shadow, calculating the overlap ratio of the contour lines as a first matching degree. In yet another embodiment, similarity comparison can employ feature point matching, extracting key feature points from both the interactive shadow and the target shadow, calculating the matching ratio of the feature points as a first matching degree. The first matching degree reflects the degree of similarity between the interactive shadow and the target shadow from a visual perspective.
[0144] In another embodiment, similarity comparison includes not only comparing the shapes of the interactive shadow and the target shadow, but also comparing their shadow colors. Shadow color is one of the visual attributes of the interactive shadow in a virtual scene. Different lighting conditions, light source attributes, and optical elements located on the path of the light source all affect the final color effect of the interactive shadow. In this embodiment, when performing similarity comparison processing, the system extracts and compares the shape features of the interactive shadow and the target shadow, as well as their color features. The color feature comparison can be carried out from multiple color dimensions. The system obtains the color value of each pixel in the interactive shadow image and the color value of the corresponding pixel in the target shadow reference image. The color values can be represented by color components such as hue, saturation, and brightness. The system calculates the difference between the hue component, saturation component, and brightness component of the interactive shadow and the target shadow at corresponding pixel positions, and obtains a color deviation value by combining the differences of each color component. The smaller the color deviation value, the closer the interactive shadow and the target shadow are in color representation. In one implementation, the system counts the number of pixels whose color deviation values are within a preset color tolerance range, calculates the proportion of color-matching pixels to the total number of pixels, and uses this proportion as the color matching degree. In another implementation, the system divides the interactive shadow and the target shadow into several regions, calculates the average color value for each region, and then compares the average color values of each region to obtain the region-level color matching degree. The system can integrate the color matching degree into the calculation of the first matching degree, for example, by weighted summing the shape similarity and color matching degree to obtain a comprehensive first matching degree. Alternatively, the system can use the color matching degree as an independent judgment dimension. When checking the matching degree, in addition to checking the shape matching degree and pose matching degree, it also checks whether the color matching degree meets the corresponding color matching threshold. Only when all dimensions meet the corresponding threshold is the shadow considered successfully matched. By introducing shadow color comparison, the similarity comparison processing is expanded from a single shape dimension to a multi-dimensional comparison combining shape and color. This embodiment allows users to pay attention not only to whether the shape of the interactive shadow matches the target shadow, but also to whether the color of the interactive shadow matches the target shadow when adjusting interactive entities. For example, users might need to manipulate filter entities to adjust the color tone of interactive shadows, or manipulate light source entities to change the color attributes of the light source, so that the color of the interactive shadow gradually approaches the color of the target shadow. This introduction of the color dimension enriches the judgment levels of shadow matching, allowing users to make adjustments on a richer interactive scale.
[0145] Step S1342: Perform difference comparison processing on the current pose parameters of the linked entity and the target pose parameters associated with the target shadow to obtain the second matching degree.
[0146] Interpolation comparison refers to an algorithm that numerically compares the current spatial position and orientation angle of a linked entity with the pre-configured correct pose. A linked entity is an entity in a virtual scene that has a linked relationship with an interactive entity; its pose changes directly affect the rendering effect of the interactive shadow. The system acquires the current pose parameters of the linked entity in real time, including spatial position coordinates and orientation angle values. The target pose parameters are pre-configured and associated with the target shadow, defining the spatial position coordinates and orientation angle values that the linked entity should be in when the interactive shadow perfectly matches the target shadow.
[0147] The system calculates the difference between the current spatial coordinates of the linked entity and the target spatial coordinates to obtain a positional deviation value; it also calculates the difference between the current orientation angle of the linked entity and the target orientation angle to obtain an angle deviation value. The system calculates a second matching degree based on the positional deviation value and the angle deviation value. The smaller the positional deviation value and the smaller the angle deviation value, the closer the second matching degree is to 100%; the larger the positional deviation value and the larger the angle deviation value, the closer the second matching degree is to zero. In one embodiment, the second matching degree is calculated by subtracting the weighted sum of the positional deviation value and the angle deviation value from a preset full score. The weights of the positional deviation and the angle deviation can be set according to the type of the linked entity. For example, for a light source entity, a higher weight can be assigned to the positional deviation; for a scene model, a higher weight can be assigned to the angle deviation. In another embodiment, the system sets tolerance ranges for the positional deviation value and the angle deviation value respectively. When the deviation value is within the tolerance range, the second matching degree is 100%; when the deviation value exceeds the tolerance range, the second matching degree decreases with the magnitude of the exceedance.
[0148] Step S1343: Determine the corresponding target matching degree based on the first matching degree and the second matching degree.
[0149] In the shadow matching determination process, after obtaining the first matching degree through similarity comparison and the second matching degree through difference comparison, the system needs to combine the matching degrees of these two dimensions to determine a target matching degree that reflects the overall similarity between the interactive shadow and the target shadow. The target matching degree is a single quantitative indicator used by the system to compare with a preset matching threshold and make a final determination.
[0150] The system determines the target matching degree in several ways. In one embodiment, the system uses a weighted average method to determine the target matching degree. The system pre-configures corresponding weight coefficients for a first matching degree and a second matching degree, with the sum of the weights of the first and second matching degrees being 1. The system multiplies the first matching degree by its corresponding weight, multiplies the second matching degree by its corresponding weight, and adds the two products to obtain the target matching degree. The weight configuration can be flexibly set according to the type of interaction task. When the interaction task focuses on the matching accuracy of the interactive shadow and the target shadow in visual shape, the weight of the first matching degree is configured to be higher than the weight of the second matching degree. When the interaction task focuses on the accuracy of the pose adjustment of the linked entity, the weight of the second matching degree is configured to be higher than the weight of the first matching degree. In one implementation, the specific value of the weight is set by the developers when configuring the interaction task. In another implementation, the weight is dynamically adjusted by the system based on historical data of the interaction task.
[0151] In another embodiment, the system determines the target matching degree by taking the minimum value. The system compares a first matching degree with a second matching degree and selects the smaller value as the target matching degree. In this way, the target matching degree can only reach a high level when both the visual similarity and the spatial pose accuracy are at a high level. If the first matching degree is high and the second matching degree is low, the target matching degree is limited by the second matching degree and remains at a low level, and vice versa. This minimum value method ensures that interactive shadows do not have significant shortcomings in both visual performance and spatial state, thus improving the overall quality of shadow matching judgment.
[0152] In another embodiment, the system determines the target matching degree using a separate determination method. The system configures a first matching threshold for a first matching degree and a second matching threshold for a second matching degree. The system compares the first matching degree with the first matching threshold and the second matching degree with the second matching threshold. When the first matching degree reaches or exceeds the first matching threshold, and the second matching degree reaches or exceeds the second matching threshold, the system determines that the target matching degree meets the condition. When the first matching degree does not reach the first matching threshold, or the second matching degree does not reach the second matching threshold, or neither reaches their respective thresholds, the system determines that the target matching degree does not meet the condition. This separate determination method allows the system to set independent accuracy requirements for the visual and spatial dimensions, ensuring that matching standards in different dimensions do not interfere with each other.
[0153] Furthermore, in embodiments that include shadow color matching, the system can also introduce color matching degree as a third dimension when determining the target matching degree. The system comprehensively calculates the shape matching component in the first matching degree, the color matching component in the first matching degree, and the second matching degree to determine the final target matching degree. The comprehensive calculation method can be any of the following: weighted average, minimum value, or separate determination; the specific choice depends on the configuration parameters of the interaction task.
[0154] Step S1344: Detect whether the target matching degree exceeds the preset matching threshold. If the target matching degree exceeds the preset matching threshold, determine that the shadow matching is successful.
[0155] In the shadow matching determination process, after determining the target matching degree, the system compares the target matching degree with a preset matching threshold to determine whether the current interactive shadow has reached the expected matching state. The preset matching threshold is a pre-configured critical value that defines the minimum target matching degree required for successful shadow matching. When the target matching degree reaches or exceeds the preset matching threshold, the system determines that the shadow matching is successful. When the target matching degree is lower than the preset matching threshold, the system determines that the shadow matching is not yet complete, maintains the current interactive operation state, and waits for the user to further adjust the pose of the interactive entity.
[0156] A preset matching threshold is a critical value pre-configured by the system to determine whether a shadow match meets the required standard. This threshold defines the minimum similarity required for an interactive shadow and a target shadow to be considered a successful match. The specific value of the preset matching threshold can be flexibly set according to the accuracy requirements of the interactive task, such as 85%, 90%, or 95%. The threshold can be configured statically by developers when configuring the interactive task, or dynamically adjusted by the system based on historical data of the interactive task. In one embodiment, the system can configure different preset matching thresholds for different types of interactive tasks, setting higher thresholds for interactive tasks with higher accuracy requirements and lower thresholds for interactive tasks with lower accuracy requirements, to adapt to the judgment needs in different scenarios.
[0157] After obtaining the first and second matching degrees through similarity and difference comparisons and comprehensively calculating the final target matching degree, the system compares the target matching degree with a preset matching threshold. When the target matching degree is greater than or equal to the preset matching threshold, the system determines that the matching success condition is met; when the target matching degree is less than the preset matching threshold, the system determines that the matching is not yet complete, continues to maintain the current interactive operation state, and waits for the user to further adjust the pose of the interactive entity.
[0158] If the matching degree exceeds a preset matching threshold, the system determines that the interactive shadow and the target shadow have successfully matched. Determining a successful shadow match is a confirmation result that the current interactive shadow has reached the desired state defined by the target shadow. When the system determines a successful shadow match, it signifies that the current shadow interaction task has met the completion conditions. The system can drive subsequent processing flows based on the successful shadow match determination. In one embodiment, after determining a successful shadow match, the system displays a visual effect of successful shadow match in the shadow display area. In another embodiment, the system switches the interactive virtual scene from the current viewing perspective to a matched state, for example, by zooming out from a close-up view of the interactive virtual scene to a normal virtual scene view, or by displaying a completion indicator on the border of the interactive virtual scene interface. In yet another embodiment, the system triggers scene events associated with successful shadow match in the current virtual scene, such as opening a closed passage, unlocking a hidden area, activating a mechanism, or playing a scene animation. In yet another embodiment, after determining a successful shadow match, the system automatically adjusts linked entities whose poses are not fully aligned with the correct pose, smoothly transitioning the linked entities from their current pose to the correct pose through interpolation animation.
[0159] As can be seen, by introducing the target shadow as the judgment benchmark, a complete shadow matching process is constructed, from dual judgment of similarity comparison and difference comparison to matching degree check. The target shadow provides users with a clear operational target reference, transforming shadow interaction from free manipulation to a goal-oriented interaction mode. The dual comparison mechanism comprehensively evaluates the correctness of interactive shadows from two dimensions: visual performance and spatial state, improving the accuracy and reliability of the judgment results. The setting of the preset matching threshold allows for a certain margin of error in shadow matching judgment; users do not need to precisely adjust the interactive entity to the only correct pose, as long as the matching degree reaches the threshold, the interaction task can be completed. The technical solution defined in this claim forms a complete interactive closed loop from operation, observation, adjustment to judgment completion.
[0160] Based on any embodiment of the method in this application, such as Figure 10 As shown, after obtaining the target shadow for shadow matching judgment corresponding to the light and shadow start command, steps S1351 and S1352 are included. The following describes each step.
[0161] Step S1351: Display the shadow hint of the target shadow in the shadow display area of the current virtual scene.
[0162] After the system receives the light and shadow activation command and determines the target shadow, it also needs to provide the user with a visual reference about the target. By displaying a shadow hint of the target shadow in the shadow display area of the current virtual scene, and adjusting the visual effects of the shadow hint according to the matching degree during the matching process, a progressive visual feedback mechanism is provided to the user, allowing the user to continuously perceive the gap between the current operation and the correct target while manipulating the interactive entity.
[0163] A shadow display area is a pre-defined surface area in a virtual scene used to receive and display interactive shadows. It can be a flat area such as a wall, floor, tabletop, or curtain, or a display area composed of multiple discontinuous surfaces. A shadow cue is a visual reference graphic presented on the shadow display area, based on the shape of the target shadow. Specific implementations of shadow cuees include rendering the shape of the target shadow as a shadow cue, with the fill color inside the outline having a certain degree of transparency, allowing users to see the material and texture of the shadow display area itself through the outline; or only displaying the edge lines of the target shadow, without filling the interior, presented as a dashed or solid border; or displaying it in a periodic flashing manner, using pulse changes in transparency or brightness to enhance the visual cue effect.
[0164] In one embodiment, the shadow hint is rendered with low opacity, and the fill color inside the outline has some transparency, allowing the user to see the material and texture of the target shadow itself in the shadow display area through the outline. In another embodiment, the shadow hint only displays the edge lines of the graphic, without any fill inside, and is presented as a dashed or solid border.
[0165] In another embodiment, the shadow cues are displayed as a flashing outline, attracting the user's attention by periodically changing the transparency of the flashing outline. Regardless of the display format, the purpose of shadow cues is to provide the user with a clear reference to the action target within the shadow display area, so that the user knows the interactive shadow shape to be achieved before starting to manipulate the interactive entity.
[0166] Step S1352: During the process of detecting whether the target matching degree exceeds the preset matching threshold, adjust the visual effects of the shadow prompt according to the matching degree.
[0167] Target matching degree is a quantitative metric used to measure the similarity between an interactive shadow and a target shadow. Visual effects refer to the visual attributes of the shadow cues displayed on the shadow display area, including at least one of the following: transparency, brightness, color, border thickness, and flicker frequency. The adjustment method is related to changes in the matching degree. As the user manipulates the interactive entity to make the interactive shadow gradually approach the target shadow, the target matching degree gradually increases, and the visual effects of the shadow cues change accordingly towards confirmation. For example, the transparency of the shadow cues can gradually decrease as the target matching degree increases, with the outline gradually changing from semi-transparent to opaque; the brightness of the shadow cues can gradually increase as the matching degree increases, with the outline gradually changing from dark to bright; the color of the shadow cues can gradually change from cool to warm tones as the matching degree increases; and the flicker frequency of the shadow cues can gradually decrease until it stops flickering as the matching degree increases.
[0168] When a user manipulates an interactive entity to make the interactive shadow deviate from the target shadow, the target matching degree gradually decreases, and the visual effects of the shadow prompt change in the direction of the prompt, such as increasing transparency, decreasing brightness, and shifting the color towards a cooler tone.
[0169] By dynamically adjusting the shadow cues' visual effects based on the target's matching degree, the system provides users with visual feedback synchronized with the current operation's progress. Users don't need to view numerical matching scores or progress bars during operation; they can intuitively perceive whether their current operation is moving in the right direction and how far they are from a perfect match simply by observing the changes in the shadow cues' visual effects.
[0170] As can be seen, after responding to the light and shadow activation command, a shadow hint of the target shadow is displayed, and the visual effects of the shadow hint are adjusted according to the degree of target matching. This provides users with a progressive visual feedback that is synchronized with the operation progress. The dynamic changes of the shadow hint and its visual effects enable users to continuously receive visual guidance on whether the current operation direction is close to the correct target while manipulating interactive entities. This reduces the cost of trial and error, reduces invalid operations, and improves the guidance and efficiency of the interaction.
[0171] Based on any embodiment of the method in this application, such as Figure 11 As shown, after obtaining the target shadow for shadow matching judgment corresponding to the light and shadow start command, the process includes steps S1361 and S1362. The following describes each step.
[0172] Step S1361: Detect whether the interaction duration after responding to the light and shadow start command exceeds the preset timeout threshold. If the preset timeout threshold is exceeded, obtain the correct pose of the interactive operation entity in the interactive virtual scene when the match is successful.
[0173] When the system receives the light and shadow activation command and begins to determine the interactive virtual scene and target shadow, it also needs to consider situations where the user may encounter difficulties during operation. By adding a timeout detection and prompt mechanism, if the user has spent a long time in the interaction process and still has not completed shadow matching, the system can show the user the correct pose where the interactive entity should be placed in the interactive virtual scene, helping the user to continue to advance the shadow matching process.
[0174] Interaction duration refers to the elapsed time from the moment the system receives the light and shadow activation command to the current moment. The preset timeout threshold is a pre-configured time parameter used to determine if the user has encountered difficulties during the interactive operation. The specific value of the preset timeout threshold can be flexibly set by developers based on the complexity of shadow matching when configuring the interactive operation, for example, set to 60 seconds, 120 seconds, or 180 seconds. The system continuously times the interaction during interactive operation mode and compares the interaction duration with the preset timeout threshold. If the interaction duration does not exceed the preset timeout threshold, the system continues to maintain normal shadow interaction without triggering additional prompts. If the interaction duration exceeds the preset timeout threshold, the system determines that the user has consumed more time than expected in the current shadow interaction operation and needs to provide the user with auxiliary information.
[0175] Step S1362: Determine the spatial position corresponding to the correct pose in the interactive virtual scene, and display the prompt entity corresponding to the interactive operation entity at the spatial position. The orientation angle of the prompt entity is the orientation angle of the correct pose.
[0176] Correct pose refers to the spatial position and orientation angle that an interactive entity should be in when matching an interactive shadow with a target shadow. In other words, when the interactive entity is placed in that position and orientation, the interactive shadow can match the target shadow. The correct pose is pre-configured in the shadow matching judgment data and is associated with the correct pose parameters corresponding to the target shadow. The system reads the correct pose information corresponding to a successfully matched interactive entity, including the correct spatial coordinates and the correct orientation angle. When multiple interactive entities exist in the interactive virtual scene, the system obtains the correct pose for each interactive entity separately.
[0177] Prompt entities are visual cues rendered in a semi-transparent form within the interactive virtual scene. Their shape is the same as or similar to the corresponding interactive entity, but rendered with low opacity to visually distinguish them from the actual interactive entity. The cue entity is placed in the spatial position corresponding to the correct pose, directly showing the user the target position the interactive entity should be moved to. The orientation angle of the cue entity is set to the orientation angle of the correct pose, simultaneously showing the user the target orientation the interactive entity should be rotated to. Through the cue entity, the user can intuitively see the correct placement and orientation of the interactive entity, eliminating the need for blind attempts. In one embodiment, if multiple interactive entities exist in the interactive virtual scene, the system can simultaneously display the entity cues corresponding to each interactive entity, allowing the user to obtain the correct pose information of all interactive entities at once.
[0178] The display of a prompt entity can be implemented in several ways. In one embodiment, the prompt entity is rendered with low opacity, presenting a ghost-like effect, allowing the user to see the scene objects behind it. In another embodiment, the prompt entity is rendered in wireframe mode, displaying only the outline of the entity without surface filling. In yet another embodiment, the prompt entity is displayed in a periodic flashing manner, attracting the user's attention through pulsed changes in transparency or brightness. The color of the prompt entity can also be distinguished from normal interactive entities, for example, using prompt colors such as green or blue, to clarify its attribute as an auxiliary prompt rather than a real operable object. The prompt entity itself does not accept user control; the user needs to move and rotate the real interactive entity to a position overlapping with the prompt entity based on the prompt entity's prompts.
[0179] After the interaction duration exceeds a preset timeout threshold, the displayed prompt entity can remain in its current state until the user manipulates the interactive entity to the correct pose or the user actively exits the operation. In one embodiment, the prompt entity automatically disappears after the user adjusts the interactive entity to the correct pose and meets the matching success condition. In another embodiment, when the interaction duration further exceeds a second timeout threshold, the visual effects of the prompt entity can be further enhanced, such as further reducing transparency or increasing the flashing frequency, to provide a stronger prompt.
[0180] In an example scenario, continuing from the previous example of the old mansion's attic, after the user's character moves to the vicinity of the desk and performs an interaction, the system receives a lighting and shadow activation command, identifies the miniature room model placed on the desk as the interactive virtual scene, and displays a semi-transparent bird silhouette as the target shadow on the wooden wall of the old mansion's attic. The user begins to drag the lantern model and rotate the bird statue within the miniature room model, attempting to align the interactive shadow on the wooden wall with the semi-transparent bird silhouette. Assume the preset timeout threshold for this interaction is configured to 120 seconds. After 120 seconds, the user has not yet adjusted the lantern model and bird statue to the correct position, and there is still a significant deviation between the interactive shadow on the wooden wall and the semi-transparent bird silhouette. At this point, the system detects that the interaction duration has exceeded the preset timeout threshold and triggers an auxiliary prompt mechanism. The system retrieves the correct pose of the lantern model from the shadow matching configuration data: it is located at the front left corner of the miniature room model, with specific spatial coordinates and a default orientation. The correct pose of the bird statue is located at the center right side of the miniature room model, with specific spatial coordinates and an orientation facing the lantern model. The system displays a semi-transparent green phantom lantern model at the front left corner of the miniature room model and a semi-transparent green phantom bird statue at the center right side of the miniature room model, both in the correct spatial position and orientation. Following the prompts from the green phantom, the user moves the real lantern model to a position coinciding with the green phantom lantern model and rotates the real bird statue to align with the green phantom bird statue. After these adjustments, the interactive shadow on the wooden wall coincides with the semi-transparent bird outline, and the system determines that the shadow matching meets the successful matching criteria.
[0181] As can be seen, adding timeout detection and entity hint mechanisms during the shadow matching interaction provides appropriate assistance when users encounter difficulties. The timeout threshold prevents the system from prematurely revealing the correct answer, preserving the user's space for exploration and thought in the early stages. The entity hints after exceeding the threshold provide clear operational guidance, preventing user frustration from prolonged inability to complete shadow matching. The entity hints contain information in both spatial position and orientation angle, eliminating the need for users to guess the correct value for each degree of freedom separately, reducing the difficulty of challenging sections and improving the smoothness of the interactive experience.
[0182] Based on any embodiment of the method in this application, such as Figure 12 As shown, after responding to the pose adjustment operation event acting on the interactive operation entity, steps S1371 to S1373 are included. Each step is described below.
[0183] Step S1371: Obtain the deviation between the current pose of the currently manipulated interactive entity and the target pose corresponding to the target shadow.
[0184] In interactive virtual scenarios, when users perform actions such as moving, rotating, and dragging on interactive entities, in addition to receiving guidance through visual effects, they can also perceive the gap between the current operation and the correct target through haptic feedback. By acquiring the deviation and generating haptic feedback control signals based on the deviation, users can perceive whether the operation direction is correct through vibration of the input device during posture adjustment operations, providing users with an auxiliary perception channel independent of visual feedback.
[0185] The currently manipulated entity refers to the interactive entity that the user is currently controlling in the interactive virtual scene. This can be a light source-controlled entity or a model-controlled entity. The current pose refers to the spatial position and orientation angle of the interactive entity at the current moment. The target pose refers to the spatial position and orientation angle that the interactive entity should be in when the shadow is correctly matched; that is, when the interactive entity is in the target pose, the interactive shadow should match the target shadow to the required degree of success. The target pose is pre-configured in the shadow matching judgment data and corresponds one-to-one with the interactive entity. The system obtains the current spatial coordinates and current orientation angle of the currently manipulated entity, and simultaneously reads the corresponding target spatial coordinates and target orientation angle from the configuration data. The system compares the current spatial coordinates with the target spatial coordinates to calculate the spatial position deviation; it also compares the current orientation angle with the target orientation angle to calculate the orientation angle deviation. The deviation is a comprehensive quantitative indicator of the spatial position deviation and orientation angle deviation, used to measure the difference between the current pose and the target pose of the currently manipulated entity. The deviation can be calculated in various ways. In one embodiment, the deviation is a weighted sum of the spatial position deviation and the orientation angle deviation. The weights of the spatial position deviation and the orientation angle deviation can be set according to the type of the interactive entity. For example, a higher weight can be assigned to the spatial position deviation for a light source manipulation entity, and a higher weight can be assigned to the orientation angle deviation for a model manipulation entity. In another embodiment, the deviation is the larger of the spatial position deviation and the orientation angle deviation. In yet another embodiment, the deviation is a combination of the Euclidean distance of the spatial position deviation and the absolute angular difference of the orientation angle deviation.
[0186] Step S1372: Generate a tactile feedback control signal based on the deviation, and control the vibration component of the device to vibrate. The vibration intensity is correlated with the deviation.
[0187] The haptic feedback control signal is an electrical signal generated by the system based on the deviation, used to drive the vibration components of the input device. The vibration components of the input device refer to the hardware components integrated within the input device that generate the vibration effect, such as linear or rotor motors in mobile phones, or vibration motors in virtual scene controllers. The system maps the deviation to a vibration intensity parameter; the greater the deviation, the greater the vibration intensity, and vice versa. When the user manipulates the interactive entity to move or rotate away from the target pose, the deviation increases, and the vibration intensity increases accordingly, indicating to the user that the current operation is deviating from the correct target. When the user manipulates the interactive entity to move or rotate towards the target pose, the deviation decreases, and the vibration intensity decreases accordingly, confirming to the user that the current operation is approaching the correct target. When the deviation approaches zero, meaning the interactive entity has approached or reached the target pose, the vibration intensity approaches zero, and the vibration stops. Through the dynamic change of vibration intensity with deviation, the user can perceive the difference between the current operation and the correct target through touch during operation, without needing to frequently pay attention to operation prompts on the visual interface.
[0188] The mapping relationship between vibration intensity and deviation can be implemented in various ways. In one embodiment, vibration intensity and deviation are linearly mapped, with the vibration intensity increasing proportionally for every unit increase in deviation. In another embodiment, vibration intensity and deviation are piecewise mapped, with different vibration intensity levels corresponding to different deviation ranges. For example, the vibration intensity remains high when the deviation is large, medium when the deviation is medium, and low when the deviation is small. In yet another embodiment, vibration intensity and deviation are non-linearly mapped, such as through an exponential or logarithmic mapping, to accommodate the user's sensitivity requirements for different deviation ranges.
[0189] The haptic feedback function can be toggled on or off by the system, allowing users to choose to enable or disable it according to their personal preferences. In one embodiment, the haptic feedback is enabled or disabled based on the type of input device; when the system detects that the user's input device does not have a vibrating component, the haptic feedback function is automatically disabled, retaining only visual feedback.
[0190] In an example scenario, continuing from the previous example of the old mansion's attic, a lantern model is placed within a miniature room model. This lantern model is a light source control entity and interacts with the real lantern hanging in the attic. The lantern model's target pose is the spatial coordinates of the front left corner of the miniature room model, with its orientation set to the default. The user controls the lantern model within the miniature room model using a handle with a vibrating component. When the user drags the lantern model away from the front left corner, the deviation increases, and the handle's vibration intensity increases accordingly. The user perceives this significant vibration as a deviation from the correct target. When the user drags the lantern model towards the front left corner, the deviation decreases, and the handle's vibration intensity weakens. The user perceives this weakening vibration as an approach to the correct target. When the user moves the lantern model to the front left corner, the deviation approaches zero, the handle vibration stops, and the user confirms that the lantern model has reached the target position.
[0191] It can be seen that during the user's pose adjustment operation, the deviation is acquired and a tactile feedback control signal is generated. By dynamically changing the vibration intensity with the deviation, the system provides tactile guidance to the user, establishing an independent auxiliary perception channel in addition to visual feedback. The mapping method of vibration intensity increasing with deviation and decreasing with deviation can intuitively convey to the user the changing trend of the gap between the current operation and the correct target, guiding the user to gradually adjust the interactive entity to the target pose.
[0192] Based on any embodiment of the method in this application, such as Figure 13 As shown, after detecting the degree of shadow matching between the updated interactive shadow and the target shadow, steps S1381 to S1383 are included. Each step is described below.
[0193] Step S1381: Display the shadow matching success effect. The shadow matching success effect includes the shadow blending effect of the interactive shadow and the target shadow.
[0194] The successful shadow matching effect includes the shadow blending effect of the interactive shadow and the target shadow, which is an animated process in which the interactive shadow and the target shadow gradually merge from two separate shapes into one. In one implementation, the blending process is shown as the outline edge of the interactive shadow gradually moves closer to the outline edge of the target shadow, and the shapes of the two smoothly transition from a near-close state to a completely overlapping state. During the blending animation, the transparency of both the interactive shadow and the target shadow changes, with the interactive shadow gradually changing from opaque to semi-transparent, and the target shadow gradually changing from semi-transparent to opaque, until finally the two appear as a completely identical shape in the same position.
[0195] In another implementation, the blending process is presented as light effect particles. Numerous tiny light points converge from the edge of the interactive shadow to the edge of the target shadow, forming a flowing light effect trajectory. After the light points converge, a brief bright flash occurs to reinforce the visual confirmation of a successful match. The blending process can also be accompanied by color changes, such as transitioning from gray to gold or green tones, to distinguish it from the regular display state during interaction. The duration of the shadow blending effect can be set according to the interaction configuration parameters, typically between 0.3 seconds and 1 second. After the effect ends, the interactive shadow and the target shadow appear as completely identical graphics in the shadow display area, with no further distinction between them.
[0196] In one embodiment, the shadow matching success effect may further include a border lighting effect for the shadow display area. When a match is successful, a glowing border appears around the edge of the shadow display area, which then gradually disappears after flashing in a breathing effect several times.
[0197] In another embodiment, the shadow matching success effect may also include sound effects. The system plays the sound effect of successful matching while displaying the blending effect. The sound effect and light effect are triggered synchronously to enhance the user's immersive feedback experience.
[0198] Step S1382: Switch the interactive virtual scene from the current observation perspective to the matching success state.
[0199] Interactive virtual scenes are independent scene areas where users operate and observe during interaction. During interaction, the system typically displays the interactive virtual scene from a close-up or extreme close-up perspective to allow for precise user control. Once the shadow matching is successful, the system's current viewing perspective no longer needs to maintain a close-up or extreme close-up state, and the display state of the interactive virtual scene is switched to present the matched scene.
[0200] The matching completion state can be implemented in several specific ways. In one embodiment, the system gradually zooms out from a close-up view of the interactive virtual scene, using a gradual in-and-out transition to restore the view to the normal virtual scene perspective. As the camera zooms out, the interactive virtual scene gradually occupies less of the frame, and the overall environment of the virtual scene gradually becomes apparent, allowing the user to regain the ability to observe the entire virtual scene. The transition duration can be set according to the interaction configuration parameters, typically between 0.5 and 1.5 seconds.
[0201] In another embodiment, a completion indicator appears on the border of the interactive virtual scene interface, for example, the border color changes from gray to green, or a completion icon appears at the four corners of the border. The appearance of the completion indicator is accompanied by a brief bright flash, which continues several times before becoming constantly lit.
[0202] In another embodiment, the interactive virtual scene is switched to a non-interactive state. For example, the overall transparency of the screen is reduced, making the interactive virtual scene appear as a semi-transparent blurred effect, or the interactive virtual scene gradually fades out until it disappears completely. This switch to a non-interactive state clearly informs the user that the current stage of operation has ended and the interactive function of the interactive virtual scene has been turned off.
[0203] In one embodiment, the system can combine the above-mentioned multiple presentation forms, such as simultaneously zooming out the camera and displaying a completion mark on the border, to enhance the visual communication effect of the matching completion status.
[0204] Step S1383: Feedback is provided in the current virtual scene that the shadow matching is successful. The feedback method for successful shadow matching includes at least one of the following: opening a closed passage, unlocking a hidden area, activating a mechanism, or playing a scene animation.
[0205] In addition to providing visual feedback in the shadow display area and interactive virtual scene, the system also needs to trigger scene events associated with successful shadow matching in the current virtual scene, allowing users to directly observe the substantial scene changes resulting from successful matching. Feedback on successful shadow matching can be provided in at least one of the following ways.
[0206] The first feedback method is to open closed passages. In the virtual scene, passages or doors that were originally blocked by obstacles automatically open after a successful shadow match, providing the user with a new passable path. In one implementation, a closed door plays an animation of the door rotating or sliding after a successful shadow match, gradually transitioning from a closed to an open state. Mechanical sound effects accompany the door opening, and the opening speed can use a gradual in-and-out transition to make the entire opening process natural and smooth. After the door opens, the user can use this passage to enter areas that were previously inaccessible.
[0207] The second feedback method involves unlocking hidden areas. Areas in the virtual scene that were previously hidden or locked become visible or accessible after a successful shadow match. In one implementation, a previously seamless hidden panel on a wall reveals its outline after a successful shadow match, gradually pushing the panel outwards or sliding it down to expose hidden objects or passages. In another implementation, a hidden door on the floor unlocks after a successful shadow match, its edges glowing to alert the user, who can then click to open it and enter the underground area. In yet another implementation, areas in the virtual scene that were previously invisible become directly visible after a successful shadow match; for example, a hidden alcove on a wall gradually changes from transparent to opaque, revealing the props or decorations placed within.
[0208] The third feedback method involves activating mechanisms. Previously static mechanical devices or equipment in the virtual scene begin to operate after a successful shadow match, demonstrating the successful match to the user through dynamic mechanical changes. In one implementation, a stationary gear set in the scene begins to rotate after a successful shadow match; the meshing gears drive the entire mechanical structure, accompanied by mechanical sound effects. In another implementation, lights that were off in the scene are turned on one by one after a successful shadow match, lighting up in a preset order until the entire scene area is illuminated. In yet another implementation, platforms or stairs in the scene begin to rise, fall, or unfold after a successful shadow match, providing users with new paths or operating spaces.
[0209] The fourth feedback method is playing scene animations. The system triggers a preset animation sequence, showcasing dynamic changes occurring in the virtual scene. Scene animations are pre-produced animation content whose content is logically linked to the scene where shadows have successfully matched. In one implementation, the scene animation shows the movement of a wall; a stone wall slowly slides open from the middle to both sides, revealing a passage to the next area. In another implementation, the scene animation shows the deformation of a structure; a hidden compartment in the ceiling gradually lowers a step. In yet another implementation, the scene animation shows the appearance or disappearance of objects; a key prop in the scene gradually becomes visible from a transparent state, prompting the user to pick it up or interact with it.
[0210] In one embodiment, the system can trigger multiple feedback methods simultaneously, such as playing scene animation while opening a closed channel, enabling multiple visual feedbacks to be presented in synergy, enhancing the richness and immersion of scene changes. The system selects the corresponding feedback method according to the configuration parameters of the current interaction task; different interaction tasks can be configured with different combinations of feedback.
[0211] In one embodiment, when the matching degree meets the matching success condition, the system can also automatically adjust linked entities whose poses are not fully aligned with the correct pose. The system acquires the current pose and correct pose of the linked entity, calculates the positional and angular deviations between them, and smoothly transitions the linked entity from the current pose to the correct pose through interpolation animation within a preset transition time. The transition time is flexibly adjusted according to the magnitude of the deviation; a shorter transition time is used when the deviation is large, and a longer transition time can be used when the deviation is small, making the adjustment process more natural. While the linked entity is being automatically adjusted, the interactive shadow is also fine-tuned accordingly, eventually achieving complete visual alignment with the target shadow. This automatic adjustment compensates for minor deviations caused by manual user operation, resulting in a more complete final presentation.
[0212] As can be seen, the abstract judgment result of successful shadow matching is transformed into three levels of visual feedback: a successful shadow display area effect, a state transition of the interactive virtual scene, and scene events in the current virtual scene. The shadow blending effect provides users with immediate visual confirmation, the state transition of the interactive virtual scene clarifies the end of the interaction phase, and the triggering of scene events demonstrates the substantial scene changes brought about by successful matching. This layered and progressive feedback mechanism, from immediate visual feedback to scene state transition and then to scene event triggering, allows users to obtain multi-dimensional visual confirmation the moment the interactive task is completed, enhancing the sense of completion and guidance of the interaction, and forming a complete interactive closed loop from operation, observation, adjustment to completion feedback.
[0213] Please see Figure 14 According to one aspect of this application, a shadow interaction device includes: a light and shadow activation module 11, configured to respond to a light and shadow activation command applied to a current virtual scene, determine an interactive virtual scene in the current virtual scene, wherein the interactive virtual scene has an interactive operation entity that is linked with an entity in the current virtual scene; a pose adjustment module 12, configured to respond to a pose adjustment operation event applied to the interactive operation entity, and synchronously adjust the pose of the linked entity in the current virtual scene linked with the interactive operation entity based on the pose change of the interactive operation entity; and a shadow update module 13, configured to update the interactive shadow in the current virtual scene based on the pose change of the linked entity.
[0214] Based on any embodiment of the device in this application, the light and shadow activation module 11 includes: a highlighting unit, used to respond to a light and shadow activation command and highlight interactive operation entities that are linked with entities in the current virtual scene in the interactive virtual scene.
[0215] Based on any embodiment of the device in this application, the light and shadow activation module 11 further includes: a contour preview unit, used to display a shadow hint of the target shadow in the shadow display area of the current virtual scene; and an effects adjustment unit, used to adjust the visual effects of the shadow hint according to the matching degree during the process of detecting whether the target matching degree exceeds a preset matching threshold.
[0216] Based on any embodiment of the device in this application, the pose adjustment module 12 includes: a translation constraint control unit, used to constrain the spatial position of the interactive operation entity performing pose adjustment to be adjusted in the translation constraint trajectory when the pose adjustment operation event includes a translation constraint trajectory; a circumference constraint control unit, used to constrain the spatial position of the interactive operation entity performing pose adjustment to be adjusted in the circumference constraint trajectory when the pose adjustment operation event includes a circumference constraint trajectory; and a rotation constraint control unit, used to constrain the spatial orientation of the interactive operation entity performing pose adjustment to be adjusted in the rotation constraint trajectory when the pose adjustment operation event includes a rotation constraint trajectory.
[0217] Based on any embodiment of the device in this application, the pose adjustment module 12 further includes: a translation trajectory visual effect unit, used to display a corresponding movement trajectory visual effect on the translation constraint trajectory when the pose adjustment constraint trajectory is a translation constraint trajectory, and the movement trajectory visual effect displays the movable direction supported by the translation constraint trajectory; a surround trajectory visual effect unit, used to display a corresponding movement trajectory visual effect on the surround constraint trajectory when the pose adjustment constraint trajectory is a surround constraint trajectory, and the movement trajectory visual effect displays the surround movement direction supported by the surround constraint trajectory; and a rotation visual effect unit, used to display a corresponding rotation direction visual effect on the rotation constraint trajectory when the pose adjustment constraint trajectory is a rotation constraint trajectory, and the rotation direction visual effect displays the rotation direction supported by the rotation constraint trajectory.
[0218] Based on any embodiment of the device in this application, the pose adjustment module 12 further includes: a linkage adjustment unit, used to respond to a pose adjustment operation event of an interactive operation entity with a linkage relationship, and to synchronously adjust the pose of other interactive operation entities with a linkage relationship with the interactive operation entity based on the pose change of the interactive operation entity.
[0219] Based on any embodiment of the device in this application, the shadow update module 13 includes: a light source entity adjustment unit, used to synchronously adjust the pose of the light source entity associated with the interactive operation entity in the current virtual scene based on the pose change of the interactive operation entity; and a shadow update unit, used to update the interactive shadow formed by the light source control entity illuminating the entity in the current virtual scene based on the pose change of the light source entity.
[0220] Based on any embodiment of the device in this application, the shadow update module 13 further includes: a lens pose adjustment unit, used to synchronously adjust the pose of the lens entity linked with the interactive operation entity in the virtual scene based on the pose change of the interactive operation entity; and a shadow size update unit, used to update the shadow range of the interactive shadow projected by the light source entity when the lens entity is on the illumination path of the light source entity in the current virtual scene.
[0221] Based on any embodiment of the device in this application, the shadow update module 13 further includes: a filter pose adjustment unit, used to synchronously adjust the pose of the filter entity linked with the interactive operation entity in the virtual scene based on the pose change of the interactive operation entity; and a shadow color update unit, used to update the shadow color of the interactive shadow projected by the light source entity when the filter entity is on the illumination path of the light source entity in the current virtual scene.
[0222] Based on any embodiment of the device in this application, the shadow update module 13 further includes: an image comparison unit, used to acquire the target shadow corresponding to the light and shadow activation command for shadow matching judgment, and perform similarity comparison processing between the latest updated interactive shadow and the target shadow to obtain a first matching degree; a parameter comparison unit, used to perform difference comparison processing between the current pose parameters of the linked entity and the target pose parameters associated with the target shadow to obtain a second matching degree; a target matching degree determination unit, used to determine the corresponding matching degree based on the first matching degree and the second matching degree; and a shadow matching judgment unit, used to detect whether the target matching degree exceeds a preset matching threshold, and if the target matching degree exceeds the preset matching threshold, determine that the shadow matching is successful.
[0223] Based on any embodiment of the device in this application, the shadow update module 13 further includes: a shadow hint display unit, used to display a shadow hint of the target shadow in the shadow display area of the current virtual scene; and a shadow hint adjustment unit, used to adjust the visual effects of the shadow hint according to the matching degree during the process of detecting whether the target matching degree exceeds a preset matching threshold.
[0224] Based on any embodiment of the device in this application, the shadow update module 13 further includes: an interaction duration detection unit, used to detect whether the interaction duration after responding to the light and shadow start command exceeds a preset timeout threshold, and if the preset timeout threshold is exceeded, to obtain the correct pose of the interactive operation entity in the interactive virtual scene where the interaction operation entity should be successfully matched; and a prompt entity display unit, used to determine the spatial position corresponding to the correct pose in the interactive virtual scene, and to display the prompt entity corresponding to the interactive operation entity at the spatial position, wherein the orientation angle of the prompt entity is the orientation angle of the correct pose.
[0225] Based on any embodiment of the device in this application, the shadow update module 13 further includes: a deviation acquisition unit, used to acquire the deviation between the current pose of the currently operated interactive entity and the target pose corresponding to the target shadow; and a vibration feedback unit, used to generate a tactile feedback control signal based on the deviation, control the vibration component of the device to vibrate, and the vibration intensity is correlated with the deviation.
[0226] Based on any embodiment of the device in this application, the shadow update module 13 further includes: a matching success effect display unit, used to display a shadow matching success effect, the shadow matching success effect including a shadow fusion effect of interactive shadow and target shadow; a viewing angle switching unit, used to switch the interactive virtual scene from the current viewing angle to the matching success state; and a matching success feedback unit, used to provide feedback on shadow matching success in the current virtual scene, wherein the feedback on shadow matching success includes at least one of the following: opening a closed channel, unlocking a hidden area, activating a mechanism, or playing a scene animation.
[0227] like Figure 15 The diagram shows the internal structure of a shadow interaction device. This shadow interaction device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. The computer-readable, non-volatile storage medium stores an operating system, a database, and computer-readable instructions. The database can store information sequences, and when executed by the processor, the computer-readable instructions enable the processor to implement a shadow interaction method.
[0228] The processor of this shadow interaction device provides computing and control capabilities to support the operation of the entire device. The memory of the shadow interaction device can store computer-readable instructions, which, when executed by the processor, cause the processor to perform the shadow interaction method of this application. The network interface of the shadow interaction device is used for communication with a terminal.
[0229] Those skilled in the art will understand that Figure 15 The structure shown is merely a block diagram of a portion of the structure related to the solution of this application and does not constitute a limitation on the shadow interaction device to which the solution of this application is applied. A specific shadow interaction device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0230] In this embodiment, the processor is used to execute... Figure 14 The specific functions of each module are described, and the memory stores the program code and various data required to execute the aforementioned modules or sub-modules. The network interface is used to enable data transmission between user terminals or the server. In this embodiment, the non-volatile readable storage medium stores the program code and data required to execute all modules in the shadow interaction device of this application. The server can call the server's program code and data to execute the functions of all modules.
[0231] This application also provides a non-volatile readable storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the shadow interaction method of any embodiment of this application.
[0232] This application also provides a computer program product, including a computer program / instructions that, when executed by one or more processors, implement the steps of the methods in any embodiment of this application.
[0233] In summary, this application allows users to intuitively observe the synchronous changes of corresponding objects in another scene by manipulating objects in one scene, thereby enhancing interactive guidance and improving the user's scene interaction experience.
[0234] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The aforementioned storage medium can be a computer-readable storage medium such as a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM).
Claims
1. A shadow interaction method, characterized by, include: In response to the light and shadow activation command applied to the current virtual scene, an interactive virtual scene in the current virtual scene is determined, wherein the interactive virtual scene has an interactive operation entity that is linked with the entity in the current virtual scene; In response to a pose adjustment operation event applied to the interactive operation entity, the pose of linked entities in the current virtual scene that are linked with the interactive operation entity is adjusted synchronously based on the pose change of the interactive operation entity. Based on the pose changes of the linked entities, update the interactive shadows in the current virtual scene.
2. The method of claim 1, wherein, The interactive operation entity includes at least one of the following: a light source control entity and a model control entity; wherein... The light source control entity is linked with the light source entity in the current virtual scene, and the pose adjustment operation event of the light source control entity is used to synchronously adjust the pose of the light source entity. The model manipulation entity is linked with the scene model, which is a linked entity in the current virtual scene. The pose adjustment operation event of the model manipulation entity is used to synchronously adjust the pose of the scene model.
3. The method of claim 1, wherein, After responding to the lighting and shadow activation command applied to the current virtual scene, the method further includes: In interactive virtual scenes, interactive entities that interact with entities in the current virtual scene will be highlighted.
4. The method of claim 1, wherein, The pose adjustment operation event includes a pose adjustment constraint trajectory, which includes at least one of the following: a translation constraint trajectory, an orbit constraint trajectory, and a rotation constraint trajectory; wherein... When the pose adjustment operation event includes a translation constraint trajectory, the spatial position of the interactive operation entity constrained to perform pose adjustment is adjusted by displacement within the translation constraint trajectory. When the pose adjustment operation event includes a surrounding constraint trajectory, the spatial position of the interactive operation entity that performs pose adjustment is adjusted by displacement within the surrounding constraint trajectory. When the pose adjustment operation event includes a self-rotation constraint trajectory, the spatial orientation of the interactive operation entity constrained to perform pose adjustment is adjusted within the self-rotation constraint trajectory.
5. The method of claim 4, wherein, The translation constraint trajectory and the orbit constraint trajectory have corresponding visual effects of movement trajectory, and the self-rotation constraint trajectory has corresponding visual effects of rotation direction; wherein... When the pose adjustment constraint trajectory is a translation constraint trajectory, the corresponding movement trajectory visual effect is displayed on the translation constraint trajectory, and the movement trajectory visual effect displays the movable directions supported by the translation constraint trajectory; When the pose adjustment constraint trajectory is a surround constraint trajectory, the corresponding movement trajectory visual effect is displayed on the surround constraint trajectory, and the movement trajectory visual effect displays the surround movement directions supported by the surround constraint trajectory. When the pose adjustment constraint trajectory is a self-rotation constraint trajectory, the corresponding rotation direction visual effect is displayed on the self-rotation constraint trajectory, and the rotation direction visual effect displays the self-rotatable directions supported by the self-rotation constraint trajectory.
6. The method of claim 1, wherein, The interactive virtual scene includes at least two interactive operation entities, and any one of the at least two interactive operation entities has a linkage relationship with other interactive operation entities. The response to the pose adjustment operation event acting on the interactive entity, based on the pose change of the interactive entity, synchronously adjusts the pose of linked entities in the current virtual scene that are linked with the interactive entity, including: In response to a pose adjustment operation event of an interactive operation entity with a linkage relationship, the poses of other interactive operation entities with the linkage relationship with the interactive operation entity are simultaneously adjusted based on the pose change of the interactive operation entity.
7. The method of claim 1, wherein, After responding to a pose adjustment event acting on the interactive entity, the method further includes: Based on the pose change of the interactive entity, the pose of the light source entity associated with the interactive entity in the current virtual scene is adjusted synchronously. Based on the pose change of the light source entity, update the interactive shadow formed by the light source manipulation entity illuminating the entities in the current virtual scene.
8. The method of claim 1, wherein, After responding to a pose adjustment event acting on the interactive entity, the method further includes: Based on the pose change of the interactive entity, the pose of the lens entity that is linked with the interactive entity in the virtual scene is adjusted synchronously. When the lens entity is on the illumination path of the light source entity in the current virtual scene, update the shadow range of the interactive shadow projected by the light source entity.
9. The method of claim 1, wherein, After responding to a pose adjustment event acting on the interactive entity, the method further includes: Based on the pose change of the interactive entity, the pose of the filter entity that is linked with the interactive entity in the virtual scene is adjusted synchronously. When the filter entity is on the illumination path of the light source entity in the current virtual scene, update the shadow color of the interactive shadow cast by the light source entity.
10. The method of claim 1, wherein, After updating the interactive shadows in the current virtual scene, the method further includes: Obtain the target shadow corresponding to the light and shadow activation command for shadow matching judgment, and perform similarity comparison processing between the latest updated interactive shadow and the target shadow to obtain the first matching degree; Perform a difference comparison process between the current pose parameters of the linked entity and the target pose parameters associated with the target shadow to obtain a second matching degree; The corresponding target matching degree is determined based on the first matching degree and the second matching degree; If the target matching degree exceeds a preset matching threshold, the shadow matching is determined to be successful.
11. The method of claim 10, wherein, After obtaining the target shadow for shadow matching judgment corresponding to the light and shadow activation command, the method further includes: Display a shadow hint of the target shadow in the shadow display area of the current virtual scene; During the process of detecting whether the target matching degree exceeds a preset matching threshold, the visual effects of the shadow prompt are adjusted according to the matching degree.
12. The method of claim 10, wherein, After obtaining the target shadow for shadow matching judgment corresponding to the light and shadow activation command, the method further includes: Detect whether the interaction duration after responding to the light and shadow start command exceeds the preset timeout threshold. If the preset timeout threshold is exceeded, obtain the correct pose of the interactive operation entity in the interactive virtual scene when the match is successful. Determine the spatial position corresponding to the correct pose in the interactive virtual scene, and display a prompt entity corresponding to the interactive operation entity at the spatial position, wherein the orientation angle of the prompt entity is the orientation angle of the correct pose.
13. The method of claim 10, wherein, After obtaining the target shadow for shadow matching judgment corresponding to the light and shadow activation command, the method further includes: Obtain the deviation between the current pose of the currently manipulated interactive entity and the target pose corresponding to the target shadow; A tactile feedback control signal is generated based on the deviation, which controls the vibration component of the device to vibrate, and the vibration intensity is correlated with the deviation.
14. The method according to claim 10, characterized in that, After determining that the shadow match is successful, the method further includes at least one of the following: Displays a shadow matching success effect, which includes a shadow blending effect between the interactive shadow and the target shadow; Switch the interactive virtual scene from the current viewing perspective to a successfully matched state; The system provides feedback that the shadow matching is successful in the current virtual scene. The feedback method for successful shadow matching includes at least one of the following: opening a closed passage, unlocking a hidden area, activating a mechanism, or playing a scene animation.
15. A shadow interaction device, characterized in that, include: The light and shadow activation module is used to respond to the light and shadow activation command applied to the current virtual scene, and to determine the interactive virtual scene in the current virtual scene, wherein the interactive virtual scene has interactive operation entities that are linked with the entities in the current virtual scene; The pose adjustment module is used to respond to pose adjustment operation events applied to the interactive operation entity, and to synchronously adjust the pose of linked entities in the current virtual scene that are linked with the interactive operation entity based on the pose change of the interactive operation entity. The shadow update module is used to update the interactive shadows in the current virtual scene based on the pose changes of the linked entities.
16. A shadow interaction device, comprising a central processing unit and a memory, characterized in that, The central processing unit is used to invoke and run a computer program stored in the memory to perform the steps of the method as described in any one of claims 1 to 14.
17. A non-volatile readable storage medium, characterized in that, It stores, in the form of computer-readable instructions, a computer program implemented according to any one of claims 1 to 14, which, when invoked by a computer, executes the steps included in the corresponding method.