Interaction method and device, equipment and storage medium
By presenting multiple dynamic objects associated with graphic controls in the interactive interface and determining the fusion animation based on the map data, the problem of unnatural fusion effect of dynamic objects is solved, and a smooth and natural fusion effect and improved user immersion is achieved.
Patent Information
- Application Number
- CN202510307720.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-04-29
AI Technical Summary
The prior art is difficult to achieve natural and smooth fusion effects between dynamic objects, and it is difficult to avoid rigid transitions or visual tearing problems.
By presenting multiple dynamic objects associated with graphic controls in an interactive interface, the dynamic objects are associated with a preset motion trajectory, and when the distance between objects is less than the preset distance, the fusion animation is determined based on the map data of the dynamic objects.
It realizes the natural and smooth fusion effect between dynamic objects, avoids rigid transitions or visual tearing problems, and improves the visual coherence of the interactive interface and the user's interactive immersion.
Smart Images

Figure CN119903130A_ABST
Abstract
Description
Technical Field
[0001] Example embodiments of the present disclosure generally relate to the field of computers, and more particularly, to interactive methods, apparatuses, devices, and computer-readable storage media. Background Art
[0002] With the development of computer technology, various forms of electronic devices can greatly enrich people's daily life. For example, people can use electronic devices to perform various interactions, such as visual interaction and so on. Summary of the invention
[0003] In a first aspect of the present disclosure, an interactive method is provided. The method includes: presenting an interactive interface, the interactive interface including a graphic control; presenting a plurality of dynamic objects associated with the graphic control, the plurality of dynamic objects being associated with a preset motion track; and during the motion of the plurality of dynamic objects, in response to a distance between a first dynamic object and a second dynamic object in the plurality of dynamic objects being less than a first preset distance, presenting a first fusion animation of the first dynamic object and the second dynamic object, wherein the first fusion animation is determined based on first texture data of the first dynamic object and second texture data of the second dynamic object, and pixel values in the first texture data and the second texture data indicate distances from corresponding pixels to reference pixels.
[0004] In a second aspect of the present disclosure, a device for interaction is provided. The device includes: a first rendering module configured to present an interactive interface, the interactive interface including a graphic control; a second rendering module configured to present a plurality of dynamic objects associated with the graphic control, the plurality of dynamic objects being associated with a preset motion track; and a third rendering module configured to present a first fusion animation of the first dynamic object and the second dynamic object in response to a distance between the first dynamic object and the second dynamic object in the plurality of dynamic objects being less than a first preset distance during the motion of the plurality of dynamic objects, wherein the first fusion animation is determined based on the first texture data of the first dynamic object and the second texture data of the second dynamic object, and the pixel values in the first texture data and the second texture data indicate the distance from the corresponding pixel to the reference pixel.
[0005] In a third aspect of the present disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. When the instructions are executed by the at least one processing unit, the device executes the method of the first aspect.
[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processor to implement the method of the first aspect.
[0007] It should be understood that the contents described in this content section are not intended to limit the key features or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0009] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented;
[0010] Figure 2A An example interface diagram according to some embodiments of the present disclosure is shown;
[0011] Figure 2B-2H Example texture files of some embodiments of the present disclosure are shown;
[0012] Figure 3 A flowchart showing an interaction process according to some embodiments of the present disclosure is shown;
[0013] Figure 4 A schematic structural block diagram of an apparatus for interaction according to some embodiments of the present disclosure is shown;
[0014] Figure 5 A block diagram of an electronic device capable of implementing various embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0015] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0016] It should be noted that the titles of any sections / subsections provided herein are not restrictive. Various embodiments are described throughout this article, and any type of embodiment may be included under any section / subsection. In addition, the embodiments described in any section / subsection may be combined in any manner with any other embodiments described in the same section / subsection and / or different sections / subsections.
[0017] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may be included below. The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may be included below.
[0018] The embodiments of the present disclosure may involve user data, data acquisition and / or use, etc. These aspects are subject to the corresponding laws, regulations and relevant provisions. In the embodiments of the present disclosure, all data collection, acquisition, processing, processing, forwarding, use, etc. are carried out on the premise that the user knows and confirms. Accordingly, when implementing each embodiment of the present disclosure, the type, scope of use, usage scenario, etc. of the data or information that may be involved should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with the relevant laws and regulations. The specific notification and / or authorization method can vary according to the actual situation and application scenario, and the scope of the present disclosure is not limited in this respect.
[0019] In this specification and the embodiments, if personal information processing is involved, it will be processed on the premise of having a legal basis (such as obtaining the consent of the subject of personal information, or it is necessary to perform a contract, etc.), and will only be processed within the scope of regulations or agreements. If a user refuses to process personal information other than the necessary information for basic functions, it will not affect the user's use of basic functions.
[0020] The embodiment of the present disclosure proposes an interactive scheme. According to the scheme, an interactive interface is presented, the interactive interface includes a graphic control; multiple dynamic objects associated with the graphic control are presented, and the multiple dynamic objects are associated with a preset motion track; and during the motion of the multiple dynamic objects, in response to the distance between the first dynamic object and the second dynamic object in the multiple dynamic objects being less than a first preset distance, a first fusion animation of the first dynamic object and the second dynamic object is presented, wherein the first fusion animation is determined based on the first texture data of the first dynamic object and the second texture data of the second dynamic object, and the pixel values in the first texture data and the second texture data indicate the distance from the corresponding pixel to the reference pixel.
[0021] Based on this approach, the embodiments of the present disclosure can determine the fusion animation based on the first texture data of the first dynamic object and the second texture data of the second dynamic object, so that the fusion effect between the dynamic objects is more natural and smooth, and the fusion effect can be accurately controlled to avoid the problem of abrupt transition or visual tearing. In addition, the dynamic object triggers the fusion animation according to the relationship with the preset distance during the movement process. This design makes the visual effect of the interactive interface more coherent, improves the visual coherence, and improves the user's interactive immersion.
[0022] Example Environment
[0023] Figure 1 1 is a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. Figure 1 As shown, example environment 100 may include electronic device 110 .
[0024] In the example environment 100, the electronic device 110 may run an application 120 supporting interface interaction. The application 120 may be any appropriate type of application for interface interaction, examples of which may include but are not limited to: video applications, game applications, social applications or other appropriate applications.
[0025] exist Figure 1 In the environment 100 , if the application 120 is in an active state, the application 120 may provide a presentation interaction interface 150 for the user 140 .
[0026] In some embodiments, the electronic device 110 communicates with the server 130 to provide services for the application 120. The electronic device 110 can be any type of mobile terminal, fixed terminal or portable terminal with a display device, including a mobile phone, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a media computer, a multimedia tablet, a handheld computer, a portable game terminal, a VR / AR device, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio receiver, an e-book device, a game device, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. In some embodiments, the electronic device 110 can also support any type of interface for the target user (such as a "wearable" circuit, etc.).
[0027] The server 130 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks, and big data and artificial intelligence platforms. The server 130 may include, for example, a computing system / server, such as a mainframe, an edge computing node, a computing device in a cloud environment, etc. The server 130 may provide background services for the application 120 that supports interface interaction in the electronic device 110.
[0028] A communication connection may be established between the server 130 and the electronic device 110. The communication connection may be established in a wired manner or a wireless manner. The communication connection may include, but is not limited to, a Bluetooth connection, a mobile network connection, a Universal Serial Bus (USB) connection, a Wireless Fidelity (WiFi) connection, etc., and the embodiments of the present disclosure are not limited in this respect. In the embodiments of the present disclosure, the server 130 and the electronic device 110 may implement signaling interaction through the communication connection between the two.
[0029] It should be understood that the structure and function of the various elements in the environment 100 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure.
[0030] Some example embodiments of the present disclosure will be described below with continued reference to the accompanying drawings.
[0031] Example Process
[0032] The following will refer to Figure 2A-2H To describe an example interaction process according to an embodiment of the present disclosure. Figure 2A An example interface 200A according to some embodiments of the present disclosure is shown. The interface 200A may be composed of Figure 1 An interface provided by the electronic device 110 is shown. Figure 2B-2H Example texture files for some embodiments of the present disclosure are shown.
[0033] by Figure 2A As an example, the electronic device 110 may present Figure 2AThe interactive interface 200A shown, wherein the interactive interface 200A may include a graphic control. The graphic control may be a control corresponding to any appropriate graphic, such as a circular control, an elliptical control, a rectangular control, and any other appropriate regular or irregular control. The graphic control is an interactive element presented on the interactive interface 200A in a graphical manner, which may be a button, a slider, a switch, and the like. The graphic control may be presented in the interactive interface in a predetermined visual style, such as having corresponding attributes such as shape, size, color, and the like. The user may interact with the graphic control by touching, clicking, sliding, and the like.
[0034] by Figure 2A As an example, the electronic device 110 can present a button control 210 to support the user to perform a predetermined interaction on the button control 210 to trigger a specific function or operation. The predetermined interaction can be any appropriate interaction, such as clicking, sliding, etc. The specific function or operation can be a trigger to display multiple dynamic objects associated with the image control. These multiple dynamic objects can be used to assist the graphic control to generate richer visual effects.
[0035] In order to provide the user with rich visual feedback and vivid visual effects, the electronic device 110 may present multiple dynamic objects associated with the graphic control. As an example, the electronic device 110 may present the multiple dynamic objects in response to receiving a preset operation on the graphic control, and the preset operation may be any appropriate operation, such as a click operation, a slide operation, etc. The multiple dynamic objects may be any appropriate elements with dynamic behavior in the interactive interface, such as particle elements, shape elements, icon elements, etc. Particle elements may include bubbles, light spots, etc. Shape elements may include circles, ellipses, polygons, etc.
[0036] by Figure 2A As an example, the multiple dynamic objects associated with the button control 210 may be a circular object 220 - 1 , a circular object 220 - 2 , a circular object 220 - 3 , and so on.
[0037] In order to create a dynamic visual effect, in some embodiments, the multiple dynamic objects may be associated with a preset motion trajectory. The preset motion trajectory may be a trajectory of a circle, an ellipse, a straight line, etc. The motion trajectories corresponding to the multiple dynamic objects may be the same or different.
[0038] by Figure 2AAs an example, in response to receiving a click on button control 210, electronic device 110 may present multiple circular objects moving upward, such as circular object 220-1, circular object 220-2, circular object 220-3, etc., to achieve a visual effect of a series of circular bubbles generated and floating out from the button, wherein the movement starting points corresponding to circular object 220-1, circular object 220-2, and circular object 220-3 may be located inside button control 210.
[0039] In order to simulate the effect of collision between multiple dynamic objects in reality during movement, so as to achieve natural interaction between dynamic objects and enhance visual effects, in some embodiments, the electronic device 110 can detect the distance between the multiple dynamic objects in real time. Furthermore, the electronic device 110 can present a first fusion animation of the first dynamic object and the second dynamic object in response to the distance between the first dynamic object and the second dynamic object in the multiple dynamic objects being less than the first preset distance. The distance can be any appropriate distance, such as Euclidean distance, Euclidean distance, etc. The first preset distance can be set as required. The first fusion animation represents the gradual merging or transition of the first dynamic object and the second dynamic object through dynamic effects, so that they visually look like they are at least partially naturally fused together.
[0040] by Figure 2A As an example, in response to the distance between circular object 220-1 and circular object 220-2 being less than a first preset distance, electronic device 110 may present a fusion animation of circular object 220-1 and circular object 220-2, in which circular object 220-1 and circular object 220-2 are at least partially fused together.
[0041] For the convenience of description, the circular object 220 - 1 is taken as the first dynamic object and the circular object 220 - 2 is taken as the second dynamic object as an example.
[0042] The following is an explanation of the process of determining the first fused animation, where the first fused animation is an effect composed of multiple animation frames drawn by the electronic device 110 .
[0043] In order to achieve a richer, more natural and more efficient dynamic visual effect, the electronic device 110 can create multiple map files, and for each map file, the map file can include a group of dynamic objects. Specifically, the electronic device 110 can create the multiple map files based on a predetermined map creation tool.
[0044] by Figure 2B-Figure 2D As an example, the electronic device 110 may create Figure 2B The texture file 200B shown in FIG. Figure 2C The texture file 200C shown in FIG. Figure 2D The texture file 200D is shown.
[0045] As an example, the texture file 200B may indicate the texture data corresponding to the first group of circular objects, namely, the circular object 230-1, the circular object 220-1 and the circular object 230-3. Specifically, the texture file 200B indicates the pixel values corresponding to each pixel in the circular object 230-1, the circular object 220-1 and the circular object 230-3.
[0046] As an example, the texture file 200C may indicate the texture data corresponding to the second group of circular objects, namely, the circular object 220-2, the circular object 240-2, the circular object 240-3, and the circular object 220-3. Specifically, the texture file 200C indicates the pixel values corresponding to each pixel in the circular object 220-2, the circular object 240-2, the circular object 240-3, and the circular object 220-3.
[0047] As an example, the texture file 200D may indicate the texture data corresponding to the third group of circular objects, namely, the circular object 250-1, the circular object 250-2, and the circular object 250-3. Specifically, the texture file 200D indicates the pixel values corresponding to the pixels in the circular object 250-1, the circular object 250-2, and the circular object 250-3.
[0048] It should be noted that the pixel value in the mapping data can indicate the distance from the corresponding pixel to the reference pixel. In some embodiments, the reference pixel can be any appropriate pixel, such as the pixel corresponding to the center of the dynamic object. At this time, starting from the midpoint of the dynamic object, the pixel values corresponding to the pixels corresponding to the dynamic object can be increased in sequence along the direction of the radius. For example, taking the dynamic object as a circle as an example, the pixel value of the center of the circle can be 0, the pixel value of the boundary of the circle can be 127, and the pixel value outside the circle can be between 127 and 255. At this time, the circle is a circle presented in a gradient form from the inside to the outside.
[0049] In order to simulate the randomness of bubbles in reality and to improve the richness of visual effects, in some embodiments, the dynamic objects included in different groups of dynamic objects may correspond to different movement speeds, such as the movement speed corresponding to each circular object in the first group of dynamic objects is lower than the movement speed of each circular object in the second group of dynamic objects. In other embodiments, different groups of dynamic objects may include different numbers of dynamic objects, such as the number of each circular object in the first group of dynamic objects is less than the number of each circular object in the second group of dynamic objects. In other embodiments, different groups of dynamic objects may include different numbers of dynamic objects, and the dynamic objects in different groups may also correspond to different movement speeds.
[0050] by Figure 2B-Figure 2D As an example, Figure 2C The number of circular objects included in the second group of circular objects shown is higher than that in FIG. Figure 2D The number of circular objects included in the third group of circular objects shown in FIG. Figure 2C The movement speed of the circular objects included in the second group of circular objects shown is higher than that of Figure 2B The motion speeds corresponding to the circular objects included in the first group of circular objects shown are (not shown in the figure).
[0051] In some embodiments, the map file 200B, the map file 200C, and the map file 200D may be a signed distance field (SDF) map file, that is, the pixel value corresponding to each pixel indicated by the map file is SDF.
[0052] Further, the electronic device 110 may determine the texture data corresponding to the circular object 220-1 from the texture file 200B. The electronic device 110 may determine the texture data corresponding to the circular object 220-2 from the texture file 200C.
[0053] Further, the electronic device 110 may determine the first fusion animation corresponding to the circular object 220 - 1 and the circular object 220 - 2 based on the texture data corresponding to the circular object 220 - 1 and the texture data corresponding to the circular object 220 - 2 .
[0054] Since the first fused animation is an effect composed of multiple animation frames drawn by the electronic device 110 , for ease of description, the drawing process of one animation frame is used for explanation.
[0055] In some embodiments, the electronic device 110 may determine the fused map data based on the map data corresponding to the circular object 220-1 and the map data corresponding to the circular object 220-2. As an example, the electronic device 110 may determine the first pixel value of the first pixel based on the map data corresponding to the circular object 220-1, and determine the second pixel value of the first pixel based on the map data corresponding to the circular object 220-2. The first pixel may be an overlapping pixel of the circular object 220-1 and the circular object 220-2. For example, the circular object 220-1 includes pixel A, pixel B, and pixel C, and the circular object 220-2 includes pixel A, pixel B, and pixel D, then the first pixel is pixel A and pixel B. Further, the electronic device 110 may determine the fused pixel value corresponding to the first pixel in the fused map data based on the product of the first pixel value and the second pixel value.
[0056] As an example, the electronic device 110 may determine the fused pixel value based on the following formula:
[0057]
[0058] Wherein c is the fused pixel value corresponding to the first pixel, a is the pixel value corresponding to the first pixel in the circular object 220 - 1 , and b is the pixel value corresponding to the first pixel in the circular object 220 - 2 .
[0059] Further, the electronic device 110 may draw the first animation frame in the first fused animation based on the fused texture data. Specifically, the electronic device 110 may draw the first animation frame based on the fused pixel values corresponding to each pixel indicated by the fused texture data.
[0060] In order to improve the visual effect, the circular object 220-1 and the circular object 220-2 can be presented on the interactive interface in a sticky manner. In order to achieve the above-mentioned sticky effect, in some embodiments, the electronic device 110 can respond to the pixel value of the second pixel in the fused map data being greater than the preset value and draw the second pixel in a first style. The preset value can be any appropriate value, such as 128. The first style can be any appropriate style, such as the pixel value corresponding to the second pixel can be set to 255, that is, the second pixel is presented in a white style on the interactive interface. In other embodiments, the electronic device 110 can respond to the pixel value of the second pixel in the fused map data being less than or equal to the preset value and draw the second pixel in a second style. The second style can be any appropriate style, such as the pixel value corresponding to the second pixel can be set to 0, that is, the second pixel is presented in a black style on the interactive interface.
[0061] Since the pixel value corresponding to the second pixel whose pixel value is greater than the preset value is set to 255, and the pixel value corresponding to the second pixel whose pixel value is less than the preset value is set to 0, it can be ensured that the fused parts of the circular object 220-1 and the circular object 220-2 are stuck together in visual effect.
[0062] In order to simulate the effect in reality that bubbles burst after rising a certain distance and thereby improve the visual effect, in some embodiments, the electronic device 110 may present size change animations corresponding to the multiple circular objects during the movement of the multiple circular objects, and the size change animation is associated with the distance from the circular object to the reference edge.
[0063] As an example, the electronic device 110 may present an animation in which the sizes of the multiple dynamic objects gradually decrease while the multiple circular objects are moving upward, until the dynamic objects disappear.
[0064] by Figure 2E and Figure 2F As an example, the electronic device 110 may present at a first moment Figure 2EThe interface 200E shown in FIG. 1 includes a circular object 260-1, a circular object 260-2, and a circular object 260-3. The movement positions of the circular objects 260-1, 260-2, and 260-3 at the first moment are as shown in FIG. Figure 2E Further, the circular object 260-1, the circular object 260-2, and the circular object 260-3 may continue to move upward, and the electronic device 110 may present the circular object 260-1, the circular object 260-2, and the circular object 260-3 at the second moment. Figure 2F In the interface 200F shown, the second moment is later than the first moment, and the movement positions of the circular objects 260-1 and 260-2 at the second moment are higher than the movement positions at the first moment, and the circular object sizes corresponding to the circular objects 260-1 and 260-2 at the second moment are smaller than the circular object sizes corresponding to the circular objects 260-1 and 260-2 at the first moment. Since the circular object size corresponding to the circular object 260-3 at the second moment is smaller than the predetermined threshold, it stops being presented in the interface 200F.
[0065] In order to ensure the continuity of the bubble floating, the electronic device 110 can re-present the bubble 260-3 that has stopped being presented at the starting position of the movement, and move it along its corresponding movement trajectory.
[0066] In some embodiments, the size change animation corresponding to the first dynamic object is determined based on the first mapping data and the third mapping data, and the pixel value in the third mapping data indicates the distance from the corresponding pixel to the reference edge.
[0067] by Figure 2G As an example, in order to achieve that the size of the bubble becomes smaller and smaller as it moves from bottom to top, you can set Figure 2G The texture file 200G shown in FIG. 200G may indicate third texture data corresponding to the static object 201, and the static object 201 may correspond to any appropriate shape, such as Figure 2G The lower edge of the static object 201 may be a reference edge, and at this time, starting from the reference edge, the pixel values corresponding to the pixels of the static object 201 increase in the upward direction.
[0068] In some embodiments, the size change animation is associated with the distance from the dynamic object to the reference edge. Specifically, the farther the dynamic object is from the reference edge, the smaller its corresponding size is, and the farther the dynamic object is from the reference edge, the larger its corresponding size is.
[0069] Since the size change animation is an effect composed of multiple animation frames, for the convenience of description, the drawing process of one animation frame is used to illustrate.
[0070] In some embodiments, the electronic device 110 may determine the first fused map data based on the map data corresponding to the circular object 220-1 and the map data corresponding to the static object 201. As an example, the electronic device 110 may determine the third pixel value of the third pixel based on the map data corresponding to the circular object 220-1, and determine the fourth pixel value of the third pixel based on the map data corresponding to the static object 201. The third pixel may be an overlapping pixel of the circular object 220-1 and the static object 201. Further, the electronic device 110 may determine the first fused pixel value corresponding to the third pixel in the first fused map data based on the sum of the third pixel value and the fourth pixel value.
[0071] As an example, the electronic device 110 may determine the first fused pixel value based on the following formula:
[0072] g=e+f
[0073] Wherein g is the first fused pixel value corresponding to the third pixel, e is the pixel value corresponding to the third pixel in the circular object 220-1, and f is the pixel value corresponding to the third pixel in the static object 201, where e and f can be normalized pixel values.
[0074] Furthermore, the electronic device 110 may draw the animation frame of the size-changing animation based on the first fused texture data.
[0075] Since the circular object will visually overlap with the button control to a certain extent when it floats out of the button control, in order to improve the visual effect, in some embodiments, the electronic device 110 can detect the distance between the multiple circular objects and the button control in real time. Further, the electronic device 110 can present a second fusion animation of the circular object and the button control in response to the distance between a circular object (such as the circular object 250-2) and the button control being less than the second preset distance. The distance can be any appropriate distance, such as the Euclidean distance, the Euclidean distance, and the like. The second preset distance can be set as required. The second fusion animation representation gradually merges or transitions the circular object 250-2 and the button control through a dynamic effect, so that they visually look like they are at least partially naturally fused together.
[0076] by Figure 2A As an example, in response to the distance between the circular object 250-2 and the button control 210 being less than a second preset distance, the electronic device 110 may present a second fusion animation of the circular object 250-2 and the button control 210, in which at least part of the circular object 250-2 and the button control 210 are fused together.
[0077] Since the second fused animation is an effect composed of multiple animation frames drawn by the electronic device 110, for the convenience of description, the drawing process of one animation frame is used for explanation.
[0078] In some embodiments, the electronic device 110 may create a texture file corresponding to the button control 210, and the texture file may indicate texture data corresponding to the button control 210. Specifically, the electronic device 110 may create a texture file corresponding to the graphic control based on a predetermined texture creation tool.
[0079] by Figure 2H As an example, the electronic device 110 may create Figure 2H The electronic device 110 can obtain fourth map data corresponding to the button control 210 from the map file 200H, and the pixel value in the fourth map data indicates the distance from the corresponding pixel to the graphic control.
[0080] In some embodiments, the electronic device 110 can set a fixed distance value to ensure that the edge shape of the button control 210 is clearly preserved in the map. The distance value defines the distance from the edge of the button to the edge of the map, so that the edge area maintains a certain width instead of a single point. The fixed distance value can be any appropriate distance, such as 5. At this time, inside the button control, the pixel value can be 0, and as the distance from the button edge increases, the pixel value will gradually increase.
[0081] In some embodiments, the electronic device 110 may obtain the texture data corresponding to the button control 210 from the texture file 200H, and may also obtain the texture data corresponding to the circular object 250 - 2 from the texture file 200D.
[0082] Further, the electronic device 110 may draw the second animation frame in the second fused animation based on the texture data corresponding to the circular object 250-2 and the texture data corresponding to the button control 210. As an example, the electronic device 110 may determine the fifth pixel value of the fourth pixel based on the texture data corresponding to the circular object 250-2, and determine the sixth pixel value of the fourth pixel based on the texture data corresponding to the button control 210. The fourth pixel is an overlapping pixel corresponding to the circular object 250-2 and the button control 210. Further, the electronic device 110 may determine the second fused pixel value corresponding to the fourth pixel in the second fused texture data based on the sum of the fifth pixel value and the sixth pixel value.
[0083] As an example, the electronic device 110 may determine the second fused pixel value based on the following formula:
[0084]
[0085] Wherein g is the second fused pixel value corresponding to the fourth pixel, g is the pixel value corresponding to the fourth pixel in the circular object 250 - 2 , and h is the pixel value corresponding to the fourth pixel in the button control 210 .
[0086] Furthermore, the electronic device 110 may draw a second animation frame in the second fused animation based on the second fused texture data.
[0087] In order to increase the sensory experience of fusion and thus improve the visual effect, the color of the first dynamic object or the second dynamic object can be determined based on the color of the area corresponding to the first dynamic object or the second dynamic object in the graphic control. The area is a reserved area, that is, a corresponding edge area in the button control 210, and the pixel value corresponding to the pixel closer to the button control 210 in the edge area is smaller.
[0088] As an example, if the color of the edge area of the button control is yellow, and a circular object floats out of the button control 210, the circular object is also presented in yellow in the interactive interface.
[0089] It should be noted that the resolutions corresponding to the various texture files involved in the present disclosure can be set according to demand. Compared with the traditional method that can only realize the above-mentioned interaction process based on the resolution corresponding to the animation frames that the display device can support, the present disclosure can personalize the resolutions corresponding to each texture file, and also reduce the problem of high overhead caused by too large a resolution.
[0090] Based on this approach, the embodiments of the present disclosure can determine the fusion animation based on the first texture data of the first dynamic object and the second texture data of the second dynamic object, so that the fusion effect between the dynamic objects is more natural and smooth, and the fusion effect can be accurately controlled to avoid the problem of abrupt transition or visual tearing. In addition, the dynamic object triggers the fusion animation according to the relationship with the preset distance during the movement process. This design makes the visual effect of the interactive interface more coherent, improves the visual coherence, and improves the user's interactive immersion.
[0091] Example Process
[0092] Figure 3 FIG. 3 is a flow chart of an interaction process 300 according to some embodiments of the present disclosure. The process 300 may be implemented at the electronic device 110. Figure 1 Process 300 is described.
[0093] In box 310, the electronic device 110 presents an interactive interface, which includes a graphical control.
[0094] In box 320, the electronic device 110 presents a plurality of dynamic objects associated with the graphic control, where the plurality of dynamic objects are associated with a preset motion track.
[0095] In box 330, during the movement of multiple dynamic objects, the electronic device 110 presents a first fused animation of the first dynamic object and the second dynamic object in response to the distance between the first dynamic object and the second dynamic object among the multiple dynamic objects being less than a first preset distance, wherein the first fused animation is determined based on first map data of the first dynamic object and second map data of the second dynamic object, and pixel values in the first map data and the second map data indicate the distance from the corresponding pixel to the reference pixel.
[0096] Based on this approach, the embodiments of the present disclosure can determine the fusion animation based on the first texture data of the first dynamic object and the second texture data of the second dynamic object, so that the fusion effect between the dynamic objects is more natural and smooth, and the fusion effect can be accurately controlled to avoid the problem of abrupt transition or visual tearing. In addition, the dynamic object triggers the fusion animation according to the relationship with the preset distance during the movement process. This design makes the visual effect of the interactive interface more coherent, improves the visual coherence, and improves the user's interactive immersion.
[0097] In some embodiments, process 300 also includes: creating a first texture file corresponding to a first group of dynamic objects and a second texture file corresponding to a second group of dynamic objects, the first group of dynamic objects including the first dynamic object, and the second group of dynamic objects including the second dynamic object; and determining first texture data of the first dynamic object based on the first texture file, and determining second texture data of the second dynamic object based on the second texture file.
[0098] In this way, the embodiments of the present disclosure can accurately determine the map data corresponding to the first dynamic object and the second dynamic object, and further can accurately determine the fusion animation based on the map data.
[0099] In some embodiments, a first speed of the first set of dynamic objects is different from a second speed of the second set of dynamic objects; and / or a first number of the first set of dynamic objects is different from a second number of the second set of dynamic objects.
[0100] In this way, the embodiments of the present disclosure can simulate the randomness of bubbles in reality to improve the richness of the visual effects.
[0101] In some embodiments, the first map file and the second map file are signed distance field SDF map files.
[0102] In this way, since the SDF map file provides accurate distance information to the nearest geometric surface for each pixel, the embodiments of the present disclosure can accurately represent geometric shapes based on the SDF map file, thereby improving the fusion effect.
[0103] In some embodiments, the process 300 further includes: determining blended texture data based on the first texture data and the second texture data; and drawing a first animation frame in the first blended animation based on the blended texture data.
[0104] In this way, the embodiments of the present disclosure can create a new fused map data by combining the map data of two dynamic objects. The fused map data can reflect the combined shape of the two dynamic objects and can achieve a visually smooth and natural transition of the animation from one object to another.
[0105] In some embodiments, determining the fused map data based on the first map data and the second map data includes: determining a first pixel value of the first pixel based on the first map data, and determining a second pixel value of the first pixel based on the second map data; and determining a fused pixel value corresponding to the first pixel in the fused map data based on the product of the first pixel value and the second pixel value.
[0106] In this way, the embodiments of the present disclosure can accurately determine the fused map data, thereby ensuring that the fused animation can be accurately drawn, thereby improving the visual effect.
[0107] In some embodiments, based on the fused texture data, drawing the first animation frame in the first fused animation includes: in response to a pixel value of a second pixel in the fused texture data being greater than a preset value, drawing the second pixel in a first style; or in response to a pixel value of the second pixel in the fused texture data being less than or equal to a preset value, drawing the second pixel in a second style.
[0108] In this way, the embodiments of the present disclosure can present at least two dynamic objects in a sticky manner on the interactive interface to reflect the fusion of the two dynamic objects, thereby improving the visual effect.
[0109] In some embodiments, the color of the first dynamic object or the second dynamic object is determined based on the color of the area corresponding to the first dynamic object or the second dynamic object in the graphic control.
[0110] In this way, the embodiments of the present disclosure can create an effect in which the first dynamic object or the second dynamic object is dyed with a corresponding color by the image control by reusing the color of the area corresponding to the first dynamic object or the second dynamic object in the image control, which can effectively increase the sensory experience of fusion.
[0111] In some embodiments, process 300 further includes: during the movement of the plurality of dynamic objects, presenting size change animations corresponding to the plurality of dynamic objects, wherein the size change animations are associated with distances from the dynamic objects to the reference edge.
[0112] In this way, the embodiments of the present disclosure can effectively simulate the effect in reality that bubbles burst after rising a certain distance, thereby improving the visual effect.
[0113] In some embodiments, the size change animation corresponding to the first dynamic object is determined based on the first mapping data and the third mapping data, and the pixel value in the third mapping data indicates the distance from the corresponding pixel to the reference edge.
[0114] In this way, the embodiments of the present disclosure can accurately determine the size change animation corresponding to the first dynamic object based on the texture data, thereby improving the visual effect.
[0115] In some embodiments, process 300 further includes: during the movement of the multiple dynamic objects, in response to a distance between a third dynamic object among the multiple dynamic objects and the graphic control being less than a second preset distance, presenting a second blending animation associated with the third dynamic object.
[0116] In this way, the embodiments of the present disclosure can simulate the fusion effect when the dynamic object floats out of the graphic control, effectively improving the visual effect.
[0117] In some embodiments, presenting a second fused animation associated with a third dynamic object includes: obtaining fourth map data corresponding to the graphic control, the pixel value in the fourth map data indicating the distance from the corresponding pixel to the graphic control; and drawing a second animation frame in the second fused animation based on the first map data and the fourth map data.
[0118] In this way, the embodiments of the present disclosure can accurately construct the second fusion effect based on the texture data, thereby improving the visual effect.
[0119] Example devices and equipment
[0120] The embodiments of the present disclosure also provide corresponding devices for implementing the above methods or processes. Figure 4 A schematic structural block diagram of an apparatus 400 for touch interaction according to some embodiments of the present disclosure is shown. The apparatus 400 may be implemented as or included in the electronic device 110 as discussed above. Each module / component in the apparatus 400 may be implemented by hardware, software, firmware, or any combination thereof.
[0121] like Figure 4As shown, the device 400 includes a first rendering module 410, which is configured to present an interactive interface, and the interactive interface includes a graphic control; a second rendering module 420, which is configured to present a plurality of dynamic objects associated with the graphic control, and the plurality of dynamic objects are associated with a preset motion trajectory; and a third rendering module 430, which is configured to present a first fusion animation of the first dynamic object and the second dynamic object in response to a distance between a first dynamic object and a second dynamic object among the plurality of dynamic objects being less than a first preset distance during the movement of the plurality of dynamic objects, wherein the first fusion animation is determined based on first map data of the first dynamic object and second map data of the second dynamic object, and the pixel values in the first map data and the second map data indicate the distance from the corresponding pixel to the reference pixel.
[0122] In some embodiments, the device 400 also includes a creation module, configured to: create a first texture file corresponding to a first group of dynamic objects and a second texture file corresponding to a second group of dynamic objects, the first group of dynamic objects including the first dynamic object, and the second group of dynamic objects including the second dynamic object; and a first determination module, configured to determine the first texture data of the first dynamic object based on the first texture file, and determine the second texture data of the second dynamic object based on the second texture file.
[0123] In some embodiments, a first speed of the first set of dynamic objects is different from a second speed of the second set of dynamic objects; and / or a first number of the first set of dynamic objects is different from a second number of the second set of dynamic objects.
[0124] In some embodiments, the first map file and the second map file are signed distance field SDF map files.
[0125] In some embodiments, the apparatus 400 further includes a second determining module configured to determine fused texture data based on the first texture data and the second texture data; and a drawing module configured to draw a first animation frame in the first fused animation based on the fused texture data.
[0126] In some embodiments, the second determination module is further configured to: determine a first pixel value of the first pixel based on the first map data, and determine a second pixel value of the first pixel based on the second map data; and determine a fused pixel value corresponding to the first pixel in the fused map data based on the product of the first pixel value and the second pixel value.
[0127] In some embodiments, the drawing module is further configured to: in response to a pixel value of the second pixel in the fused map data being greater than a preset value, draw the second pixel in a first style; or in response to a pixel value of the second pixel in the fused map data being less than or equal to a preset value, draw the second pixel in a second style.
[0128] In some embodiments, the color of the first dynamic object or the second dynamic object is determined based on the color of the area corresponding to the first dynamic object or the second dynamic object in the graphic control.
[0129] In some embodiments, the apparatus 400 further includes a fourth presentation module configured to present size change animations corresponding to the multiple dynamic objects during their movement, wherein the size change animations are associated with distances from the dynamic objects to the reference edge.
[0130] In some embodiments, the size change animation corresponding to the first dynamic object is determined based on the first mapping data and the third mapping data, and the pixel value in the third mapping data indicates the distance from the corresponding pixel to the reference edge.
[0131] In some embodiments, the device 400 also includes a fifth rendering module configured to: during the movement of multiple dynamic objects, in response to a distance between a third dynamic object among the multiple dynamic objects and the graphic control being less than a second preset distance, present a second fusion animation associated with the third dynamic object.
[0132] In some embodiments, the fifth rendering module is further configured to: obtain fourth map data corresponding to the graphic control, the pixel value in the fourth map data indicating the distance from the corresponding pixel to the graphic control; and draw the second animation frame in the second fused animation based on the first map data and the fourth map data.
[0133] The units included in the device 400 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units can be implemented using software and / or firmware, such as machine executable instructions stored on a storage medium. In addition to or as an alternative to machine executable instructions, some or all of the units in the device 400 can be implemented at least in part by one or more hardware logic components. As an example and not limitation, exemplary types of hardware logic components that can be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0134] Figure 5 1 shows a block diagram of an electronic device 500 in which one or more embodiments of the present disclosure may be implemented. It should be understood that Figure 5 The electronic device 500 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. Figure 5 The electronic device 500 shown can be used to implement Figure 1 An electronic device 110 is shown.
[0135] like Figure 5 As shown, the electronic device 500 is in the form of a general electronic device. The components of the electronic device 500 may include, but are not limited to, one or more processors or processing units 510, a memory 520, a storage device 530, one or more communication units 540, one or more input devices 550, and one or more output devices 560. The processing unit 510 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 520. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 500.
[0136] The electronic device 500 typically includes a plurality of computer storage media. Such media may be any accessible media that is accessible to the electronic device 500, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 520 may be a volatile memory (e.g., a register, a cache, a random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 530 may be a removable or non-removable medium, and may include a machine-readable medium, such as a flash drive, a disk, or any other medium, which may be capable of being used to store information and / or data (e.g., training data for training) and may be accessed within the electronic device 500.
[0137] The electronic device 500 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 5 As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. The memory 520 may include a computer program product 525 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.
[0138] The communication unit 540 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 500 can be implemented in a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 500 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.
[0139] The input device 550 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 560 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 500 may also communicate with one or more external devices (not shown) through the communication unit 540 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 500, or communicate with any device that allows the electronic device 500 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).
[0140] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.
[0141] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0142] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0143] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0144] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
[0145] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.
Claims
1. An interactive method, comprising: Presenting an interactive interface, wherein the interactive interface includes a graphic control; Presenting a plurality of dynamic objects associated with the graphic control, wherein the plurality of dynamic objects are associated with a preset motion track; as well as During the movement of the multiple dynamic objects, in response to the distance between the first dynamic object and the second dynamic object among the multiple dynamic objects being less than a first preset distance, a first fusion animation of the first dynamic object and the second dynamic object is presented, wherein the first fusion animation is determined based on the first mapping data of the first dynamic object and the second mapping data of the second dynamic object, and the pixel values in the first mapping data and the second mapping data indicate the distance from the corresponding pixel to the reference pixel.
2. The method according to claim 1, further comprising: Creating a first texture file corresponding to a first group of dynamic objects and a second texture file corresponding to a second group of dynamic objects, wherein the first group of dynamic objects includes the first dynamic object, and the second group of dynamic objects includes the second dynamic object; as well as The first texture data of the first dynamic object is determined based on the first texture file, and the second texture data of the second dynamic object is determined based on the second texture file.
3. The method according to claim 2, wherein: A first speed of the first group of dynamic objects is different from a second speed of the second group of dynamic objects; and / or A first number of the first set of dynamic objects is different from a second number of the second set of dynamic objects.
4. The method according to claim 2, wherein: The first map file and the second map file are signed distance field SDF map files.
5. The method according to claim 1, further comprising: Determine fused texture data based on the first texture data and the second texture data; as well as Based on the fused map data, a first animation frame in the first fused animation is drawn.
6. The method according to claim 5, wherein determining the fused texture data based on the first texture data and the second texture data comprises: Determine a first pixel value of a first pixel based on the first mapping data, and determine a second pixel value of the first pixel based on the second mapping data; as well as Based on the product of the first pixel value and the second pixel value, a fused pixel value corresponding to the first pixel in the fused map data is determined.
7. The method according to claim 5, wherein based on the fused map data, drawing the first animation frame in the first fused animation comprises: In response to a pixel value of a second pixel in the fused map data being greater than a preset value, drawing the second pixel in a first style; or In response to a pixel value of a second pixel in the fused map data being less than or equal to the preset value, the second pixel is drawn in a second style.
8. The method according to claim 1, wherein the color of the first dynamic object or the second dynamic object is determined based on the color of the area corresponding to the first dynamic object or the second dynamic object in the graphic control.
9. The method according to claim 1, further comprising: During the movement of the multiple dynamic objects, size change animations corresponding to the multiple dynamic objects are presented, and the size change animations are associated with the distances from the dynamic objects to the reference edges.
10. The method according to claim 9, wherein the size change animation corresponding to the first dynamic object is determined based on the first mapping data and third mapping data, and the pixel value in the third mapping data indicates the distance from the corresponding pixel to the reference edge.
11. The method according to claim 1, further comprising: During the movement of the multiple dynamic objects, in response to a distance between a third dynamic object among the multiple dynamic objects and the graphic control being less than a second preset distance, a second fusion animation associated with the third dynamic object is presented.
12. The method of claim 11, wherein presenting a second blended animation associated with the third dynamic object comprises: Acquire fourth map data corresponding to the graphic control, where a pixel value in the fourth map data indicates a distance from a corresponding pixel to the graphic control; as well as Based on the first texture data and the fourth texture data, a second animation frame in the second fused animation is drawn.
13. A device for interaction, comprising: A first presentation module is configured to present an interactive interface, wherein the interactive interface includes a graphic control; A second presentation module is configured to present a plurality of dynamic objects associated with the graphic control, wherein the plurality of dynamic objects are associated with a preset motion track; as well as A third rendering module is configured to render a first fused animation of a first dynamic object and a second dynamic object among the multiple dynamic objects in response to a distance between the first dynamic object and the second dynamic object being less than a first preset distance during the movement of the multiple dynamic objects, wherein the first fused animation is determined based on first mapping data of the first dynamic object and second mapping data of the second dynamic object, and pixel values in the first mapping data and the second mapping data indicate the distance from a corresponding pixel to a reference pixel.
14. An electronic device comprising: at least one processing unit; as well as At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 12 when executed by the at least one processing unit.
15. A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method according to any one of claims 1 to 12 when executed by a processor.