CN114602167A - Interaction method and device based on augmented reality - Google Patents
Interaction method and device based on augmented reality Download PDFInfo
- Publication number
- CN114602167A CN114602167A CN202210423445.5A CN202210423445A CN114602167A CN 114602167 A CN114602167 A CN 114602167A CN 202210423445 A CN202210423445 A CN 202210423445A CN 114602167 A CN114602167 A CN 114602167A
- Authority
- CN
- China
- Prior art keywords
- virtual object
- target
- throwing
- real scene
- response
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 82
- 230000003190 augmentative effect Effects 0.000 title claims abstract description 49
- 230000003993 interaction Effects 0.000 title claims abstract description 35
- 230000004044 response Effects 0.000 claims abstract description 47
- 230000002452 interceptive effect Effects 0.000 claims abstract description 9
- 230000015654 memory Effects 0.000 claims description 18
- 230000008859 change Effects 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims description 10
- 230000000694 effects Effects 0.000 abstract description 38
- 230000008569 process Effects 0.000 abstract description 28
- 238000010586 diagram Methods 0.000 description 14
- 230000009471 action Effects 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 5
- 230000001960 triggered effect Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000009825 accumulation Methods 0.000 description 2
- 238000013459 approach Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 230000009916 joint effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
Images
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/40—Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment
- A63F13/42—Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/50—Controlling the output signals based on the game progress
- A63F13/52—Controlling the output signals based on the game progress involving aspects of the displayed game scene
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/50—Controlling the output signals based on the game progress
- A63F13/53—Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game
- A63F13/537—Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game using indicators, e.g. showing the condition of a game character on screen
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/80—Special adaptations for executing a specific game genre or game mode
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- Optics & Photonics (AREA)
- Processing Or Creating Images (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
Description
技术领域technical field
本公开涉及增强现实技术领域,具体而言,涉及一种基于增强现实的交互方法及装置。The present disclosure relates to the technical field of augmented reality, and in particular, to an interaction method and device based on augmented reality.
背景技术Background technique
传统套圈活动,通常需要在真实环境中摆放套圈物体,并且通过技巧性地抛出投掷圈,展开活动。这种活动需要一定的真实活动空间。Traditional hooping activities usually require placing ferrule objects in a real environment, and skillfully throwing a throwing ring to start the activity. This kind of activity requires a certain amount of real activity space.
增强现实(Augmented Reality,AR)技术是一种将虚拟信息与真实世界巧妙融合的技术。如何合理利用AR技术,实现一个一方面可以打破真实空间的束缚和限制,另一方面又具有真实体验的交互过程,是一个值得解决的问题。Augmented Reality (AR) technology is a technology that skillfully integrates virtual information with the real world. How to use AR technology reasonably to realize an interactive process that can break the constraints and limitations of real space on the one hand, and have a real experience on the other hand, is a problem worth solving.
发明内容SUMMARY OF THE INVENTION
本公开实施例至少提供一种基于增强现实的交互方法及装置。Embodiments of the present disclosure provide at least an augmented reality-based interaction method and apparatus.
第一方面,本公开实施例提供了一种基于增强现实的交互方法,包括:In a first aspect, an embodiment of the present disclosure provides an augmented reality-based interaction method, including:
获取现实场景画面;Get real scene images;
基于所述现实场景画面,确定并展示包含有待投掷的第一虚拟对象和待选中的至少一个第二虚拟对象的增强现实AR画面;determining and displaying an augmented reality AR image containing the first virtual object to be thrown and at least one second virtual object to be selected based on the real scene image;
响应于针对所述第一虚拟对象的目标触发操作,确定所述第一虚拟对象针对所述第二虚拟对象的投掷结果;In response to a target triggering operation for the first virtual object, determining a throwing result of the first virtual object for the second virtual object;
在所述AR画面中展示所述投掷结果。The throwing result is displayed in the AR screen.
本公开实施例将待投掷的第一虚拟对象、至少一个第二虚拟对象融入现实场景中,生成AR画面,并通过与AR画面进行交互的方式,即在AR画面中执行目标触发操作,AR画面中可以展示出第一虚拟对象针对第二虚拟对象的投掷结果,可以在打破真实空间的束缚和限制的条件下,实现更加接近传统套圈活动的交互过程。The embodiment of the present disclosure integrates the first virtual object to be thrown and at least one second virtual object into the real scene to generate an AR image, and interacts with the AR image, that is, executes the target triggering operation in the AR image, and the AR image The result of the throwing of the first virtual object to the second virtual object can be displayed in the game, and the interaction process that is closer to the traditional hooping activity can be realized under the condition of breaking the constraints and restrictions of the real space.
一种可选的实施方式中,所述响应于针对所述第一虚拟对象的目标触发操作,确定所述第一虚拟对象针对所述第二虚拟对象的投掷结果,包括:In an optional implementation manner, the determining a throwing result of the first virtual object for the second virtual object in response to a target triggering operation for the first virtual object includes:
响应于针对所述第一虚拟对象的目标触发操作,确定所述第一虚拟对象对应的投掷距离和投掷方向;In response to a target triggering operation for the first virtual object, determining a throwing distance and throwing direction corresponding to the first virtual object;
基于所述投掷距离和所述投掷方向,确定所述第一虚拟对象针对所述第二虚拟对象的投掷结果。Based on the throwing distance and the throwing direction, a throwing result of the first virtual object with respect to the second virtual object is determined.
本公开实施例中,通过确定第一虚拟对象对应的投掷距离和投掷方向,从而可以展示由投掷距离和投掷方向共同作用下的投掷结果,从而可以更加接近现实场景中套圈过程的真实体验。In the embodiment of the present disclosure, by determining the throwing distance and throwing direction corresponding to the first virtual object, the throwing result under the joint action of the throwing distance and the throwing direction can be displayed, so as to be closer to the real experience of the looping process in the real scene.
一种可选的实施方式中,所述响应于针对所述第一虚拟对象的目标触发操作,确定所述第一虚拟对象对应的投掷距离,包括:In an optional implementation manner, the determining the throwing distance corresponding to the first virtual object in response to the target triggering operation for the first virtual object includes:
响应于针对所述第一虚拟对象的目标触发操作,根据所述目标触发操作的触发持续时长,确定所述第一虚拟对象对应的投掷距离。In response to the target triggering operation for the first virtual object, the throwing distance corresponding to the first virtual object is determined according to the triggering duration of the target triggering operation.
本公开实施例中,用户可以通过目标触发操作蓄力,目标触发操作的触发持续时长,决定了第一虚拟对象的投掷距离,进而可以展示与投掷距离匹配的投掷结果,实现更加接近传统套圈活动的交互过程。In the embodiment of the present disclosure, the user can accumulate power through the target triggering operation, and the triggering duration of the target triggering operation determines the throwing distance of the first virtual object, and then the throwing result matching the throwing distance can be displayed, so as to be closer to the traditional hoop Interactive process of activities.
一种可选的实施方式中,所述响应于针对所述第一虚拟对象的目标触发操作,根据所述目标触发操作的触发持续时长,确定所述第一虚拟对象对应的投掷距离,包括:In an optional embodiment, in response to the target triggering operation for the first virtual object, determining the throwing distance corresponding to the first virtual object according to the triggering duration of the target triggering operation, including:
响应于作用在所述AR画面中的目标操作区域或目标操作对象上的所述目标触发操作,根据所述目标触发操作的触发持续时长,确定所述第一虚拟对象对应的投掷距离;In response to the target trigger operation acting on the target operation area or the target operation object in the AR screen, determining the throwing distance corresponding to the first virtual object according to the trigger duration of the target trigger operation;
所述目标操作对象包括所述第一虚拟对象和/或用于控制所述第一虚拟对象的预设操作控件。The target operation object includes the first virtual object and/or a preset operation control for controlling the first virtual object.
本公开实施例中的目标触发操作可以作用在AR画面中的目标操作区域(比如包围第一虚拟对象的设定操作区域,或者在AR画面中的某个固定位置区域),也可以作用在具体的目标操作对象(比如第一虚拟对象和/或用于控制所述第一虚拟对象的预设操作控件)上,基于上述目标触发操作对应的多种作用对象,可以增加AR交互过程中的操作灵活性。The target triggering operation in this embodiment of the present disclosure may act on a target operation area in the AR screen (for example, a set operation area surrounding the first virtual object, or a certain fixed position area in the AR screen), or may act on a specific On the target operation object (such as the first virtual object and/or the preset operation control used to control the first virtual object), based on the above-mentioned various action objects corresponding to the target trigger operation, operations in the AR interaction process can be increased flexibility.
一种可选的实施方式中,所述方法还包括:In an optional embodiment, the method further includes:
响应于所述目标触发操作,根据所述目标触发操作的触发持续时长,更新在所述AR画面中展示的蓄力进度条的蓄力进度值;所述触发持续时长越长,所述蓄力进度值越大;所述蓄力进度值与所述投掷距离之间具有预设对应关系。In response to the target triggering operation, update the charging progress value of the charging progress bar displayed in the AR screen according to the triggering duration of the target triggering operation; The larger the progress value is; there is a preset corresponding relationship between the charging progress value and the throwing distance.
本公开实施例中通过触发持续时长更新展示蓄力进度条的蓄力进度值,可以使得用户较为准确地知晓目标触发操作的触发持续时长情况以及蓄力进度情况,继而可以更好地掌握投掷时机。In the embodiment of the present disclosure, the charging progress value of the charging progress bar is displayed by updating the triggering duration, so that the user can more accurately know the triggering duration and charging progress of the target triggering operation, and then can better grasp the throwing timing .
一种可选的实施方式中,所述响应于针对所述第一虚拟对象的目标触发操作,确定所述第一虚拟对象对应的投掷方向,包括:In an optional implementation manner, the determining a throwing direction corresponding to the first virtual object in response to a target triggering operation for the first virtual object includes:
响应于针对所述第一虚拟对象的目标触发操作,根据所述目标触发操作对应的触发时刻下,所述AR画面对应的相机拍摄角度,确定所述第一虚拟对象对应的投掷方向。In response to the target triggering operation for the first virtual object, the throwing direction corresponding to the first virtual object is determined according to the shooting angle of the camera corresponding to the AR image at the triggering moment corresponding to the target triggering operation.
这里,AR画面对应的相机拍摄角度,反映了拍摄用户当前的朝向,从而可以采用该相机拍摄角度来确定用户意向的投掷方向,进而,通过展示与上述投掷方向匹配的投掷结果,可以实现套圈交互并展示相应的套圈结果,增强了套圈交互过程的真实体验。Here, the shooting angle of the camera corresponding to the AR image reflects the current orientation of the shooting user, so that the shooting angle of the camera can be used to determine the throwing direction of the user's intention. Furthermore, by displaying the throwing result matching the above throwing direction, the ring can be realized. Interact and display the corresponding ferrule results, enhancing the real experience of the ferrule interaction process.
一种可选的实施方式中,所述方法还包括:In an optional embodiment, the method further includes:
响应于所述目标触发操作,在所述AR画面中展示方向指引标识;所述方向指引标识用于指示当前的所述投掷方向,且所述方向指引标识能够在所述目标触发操作的控制下进行指向的调整。In response to the target triggering operation, a direction guide mark is displayed in the AR screen; the direction guide mark is used to indicate the current throwing direction, and the direction guide mark can be under the control of the target trigger operation Make pointing adjustments.
本公开实施例通过在AR画面中展示方向指引标识,可以向用户提示当前选中的投掷方向,在该方向指引标识的指向不是用户意向的投掷方向时,可以根据方向指引标识的实时指向进行及时调整,从而提高圈中准确率。In the embodiment of the present disclosure, by displaying the direction guidance mark on the AR screen, the user can be prompted with the currently selected throwing direction, and when the direction guidance mark does not point to the throwing direction intended by the user, it can be adjusted in time according to the real-time pointing of the direction guidance mark , thereby improving the accuracy of the circle.
一种可选的实施方式中,所述基于所述现实场景画面,确定并展示包含有待投掷的第一虚拟对象和待选中的至少一个第二虚拟对象的增强现实AR画面,包括:In an optional implementation manner, determining and displaying an augmented reality AR image containing a first virtual object to be thrown and at least one second virtual object to be selected based on the real scene image, including:
基于所述现实场景画面,确定待投掷的第一虚拟对象和待选中的至少一个第二虚拟对象分别融入现实场景中的初始位置信息;基于所述第一虚拟对象和所述至少一个第二虚拟对象在所述现实场景中的初始位置信息,展示初始AR画面;Based on the real scene picture, determine the initial position information of the first virtual object to be thrown and the at least one second virtual object to be selected into the real scene respectively; based on the first virtual object and the at least one second virtual object The initial position information of the object in the real scene, showing the initial AR picture;
响应于相机拍摄位姿的变化,确定所述第一虚拟对象在所述现实场景中的变化后位置信息;其中,所述第一虚拟对象在所述现实场景中的位置跟随相机拍摄位姿的变化而变化,所述至少一个第二虚拟对象在所述现实场景中的位置不变;In response to the change of the camera shooting pose, determine the changed position information of the first virtual object in the real scene; wherein, the position of the first virtual object in the real scene follows the camera shooting pose The position of the at least one second virtual object in the real scene remains unchanged;
基于所述第一虚拟对象在所述现实场景中的变化后位置信息,和所述至少一个第二虚拟对象在所述现实场景中的初始位置信息,展示变化后AR画面。Based on the changed position information of the first virtual object in the real scene and the initial position information of the at least one second virtual object in the real scene, the changed AR picture is displayed.
本公开实施例中,第一虚拟对象在现实场景中的位置可以随着相机拍摄位姿的变化而变化,通过第一虚拟对象在现实场景中的变化后位置信息,和至少一个第二虚拟对象在现实场景中的初始位置信息,展示变化后AR画面,可以呈现出一种第一虚拟对象跟随用户在现实场景中移动的效果,从而可以更加接近现实场景中套圈过程的真实体验。In this embodiment of the present disclosure, the position of the first virtual object in the real scene may change with the change of the camera's shooting pose, through the changed position information of the first virtual object in the real scene, and at least one second virtual object The initial position information in the real scene, showing the changed AR picture, can present an effect that the first virtual object moves with the user in the real scene, so that it can be closer to the real experience of the looping process in the real scene.
一种可选的实施方式中,响应于目标触发操作,确定所述第一虚拟对象对应的投掷距离和投掷方向之前,所述方法还包括:In an optional implementation manner, before determining the throwing distance and throwing direction corresponding to the first virtual object in response to the target triggering operation, the method further includes:
判断所述第一虚拟对象和所述至少一个第二虚拟对象之间的距离是否小于设定距离阈值;judging whether the distance between the first virtual object and the at least one second virtual object is less than a set distance threshold;
若小于,则提示用户远离所述至少一个第二虚拟对象。If it is less than, the user is prompted to stay away from the at least one second virtual object.
本公开实施例在判断第一虚拟对象和至少一个第二虚拟对象之间的距离小于设定距离阈值的情况下,提示用户远离至少一个第二虚拟对象,可以使得第一虚拟对象与第二虚拟对象保持在一定距离的条件下进行投掷,上述交互过程与现实场景中的套圈规则相匹配,增强了套圈交互过程的真实体验。In this embodiment of the present disclosure, when it is determined that the distance between the first virtual object and the at least one second virtual object is smaller than the set distance threshold, the user is prompted to stay away from the at least one second virtual object, so that the first virtual object and the second virtual object can be separated from each other. The object is thrown at a certain distance, and the above interaction process matches the ring rules in the real scene, which enhances the real experience of the interaction process of the ring.
一种可选的实施方式中,所述基于所述现实场景画面,确定并展示包含有待投掷的第一虚拟对象和待选中的至少一个第二虚拟对象的增强现实AR画面,包括:In an optional implementation manner, determining and displaying an augmented reality AR image containing a first virtual object to be thrown and at least one second virtual object to be selected based on the real scene image, including:
基于所述现实场景画面,判断所述现实场景画面是否与目标场景类型匹配,若匹配,则基于所述现实场景画面,确定并展示包含有所述第一虚拟对象和所述至少一个第二虚拟对象的增强现实AR画面。Based on the real scene image, it is judged whether the real scene image matches the target scene type, and if so, it is determined and displayed based on the real scene image that includes the first virtual object and the at least one second virtual object. Augmented reality AR footage of objects.
本公开实施例在确定现实场景画面与目标场景类型匹配的情况下,确定并展示包含有第一虚拟对象和至少一个第二虚拟对象的增强现实AR画面,上述过程通过限定生成AR画面的场景类型,从而将套圈交互过程限定在匹配的场景类型下,进而可以使得套圈活动融入更合理的真实场景中,提高真实感体验。This embodiment of the present disclosure determines and displays an augmented reality AR image including a first virtual object and at least one second virtual object when it is determined that the real scene image matches the target scene type, and the above process defines the scene type for generating the AR image , so that the interaction process of the ferrule is limited to the matching scene type, so that the ferrule activity can be integrated into a more reasonable real scene and improve the realistic experience.
一种可选的实施方式中,所述至少一个第二虚拟对象包括多个第二虚拟对象;In an optional implementation manner, the at least one second virtual object includes a plurality of second virtual objects;
所述在AR画面中展示与所述投掷结果,包括:The displaying and the throwing result in the AR screen include:
在AR画面中展示所述多个第二虚拟对象中被选中的目标第二虚拟对象,并展示所述目标第二虚拟对象对应的奖励信息。The selected target second virtual object among the plurality of second virtual objects is displayed on the AR screen, and the reward information corresponding to the target second virtual object is displayed.
本公开实施例展示的目标第二虚拟对象对应的奖励信息可以脱离实际物体的限制,相比于传统套圈过程,可以更加及时方便地呈现交互结果。The reward information corresponding to the target second virtual object displayed in the embodiment of the present disclosure can be separated from the limitation of the actual object, and the interaction result can be presented in a more timely and convenient manner compared with the traditional looping process.
第二方面,本公开实施例还提供一种基于增强现实的交互装置,包括:In a second aspect, an embodiment of the present disclosure further provides an augmented reality-based interaction device, including:
获取模块,用于获取现实场景画面;The acquisition module is used to acquire the real scene picture;
第一确定模块,用于基于所述现实场景画面,确定并展示包含有待投掷的第一虚拟对象和待选中的至少一个第二虚拟对象的增强现实AR画面;a first determining module, configured to determine and display an augmented reality AR image containing the first virtual object to be thrown and at least one second virtual object to be selected based on the real scene image;
第二确定模块,用于响应于针对所述第一虚拟对象的目标触发操作,确定所述第一虚拟对象针对所述第二虚拟对象的投掷结果;a second determining module, configured to determine a throwing result of the first virtual object for the second virtual object in response to a target triggering operation for the first virtual object;
第一展示模块,用于在所述AR画面中展示所述投掷结果。The first display module is configured to display the throwing result in the AR picture.
第三方面,本公开实施例还提供一种计算机设备,包括:处理器、存储器和总线,所述存储器存储有所述处理器可执行的机器可读指令,当计算机设备运行时,所述处理器与所述存储器之间通过总线通信,所述机器可读指令被所述处理器执行时执行上述第一方面,或第一方面中任一种可能的实施方式中的步骤。In a third aspect, embodiments of the present disclosure further provide a computer device, including: a processor, a memory, and a bus, where the memory stores machine-readable instructions executable by the processor, and when the computer device runs, the processing A bus communicates between the processor and the memory, and when the machine-readable instructions are executed by the processor, the first aspect or the steps in any possible implementation manner of the first aspect are performed.
第四方面,本公开实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行上述第一方面,或第一方面中任一种可能的实施方式中的步骤。In a fourth aspect, embodiments of the present disclosure further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program is executed by a processor to execute the first aspect, or any one of the first aspect. steps in one possible implementation.
关于上述基于增强现实的交互装置、计算机设备、及计算机可读存储介质的效果描述参见上述基于增强现实的交互方法的说明,这里不再赘述。For a description of the effects of the above-mentioned augmented reality-based interaction apparatus, computer equipment, and computer-readable storage medium, reference may be made to the foregoing description of the augmented reality-based interaction method, which will not be repeated here.
为使本公开的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present disclosure more obvious and easy to understand, the preferred embodiments are exemplified below, and are described in detail as follows in conjunction with the accompanying drawings.
附图说明Description of drawings
为了更清楚地说明本公开实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,此处的附图被并入说明书中并构成本说明书中的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。应当理解,以下附图仅示出了本公开的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to explain the technical solutions of the embodiments of the present disclosure more clearly, the following briefly introduces the accompanying drawings required in the embodiments, which are incorporated into the specification and constitute a part of the specification. The drawings illustrate embodiments consistent with the present disclosure, and together with the description serve to explain the technical solutions of the present disclosure. It should be understood that the following drawings only show some embodiments of the present disclosure, and therefore should not be regarded as limiting the scope. Other related figures are obtained from these figures.
图1示出了本公开实施例所提供的一种基于增强现实的交互方法的流程图;FIG. 1 shows a flowchart of an augmented reality-based interaction method provided by an embodiment of the present disclosure;
图2示出了本公开实施例所提供的一种AR画面的效果示意图;FIG. 2 shows a schematic diagram of the effect of an AR screen provided by an embodiment of the present disclosure;
图3示出了本公开实施例所提供的另一种AR画面效果示意图;FIG. 3 shows a schematic diagram of another AR image effect provided by an embodiment of the present disclosure;
图4a示出了本公开实施例所提供的在蓄力进度值较小的情况下,第一虚拟对象对应的投掷距离的效果示意图;Fig. 4a shows a schematic diagram of the effect of the throwing distance corresponding to the first virtual object provided by the embodiment of the present disclosure when the charging progress value is small;
图4b示出了本公开实施例所提供的在蓄力进度值较大的情况下,第一虚拟对象对应的投掷距离的效果示意图;Fig. 4b shows a schematic diagram of the effect of the throwing distance corresponding to the first virtual object provided by the embodiment of the present disclosure when the charging progress value is relatively large;
图5示出了本公开实施例所提供的另一种AR画面效果示意图;FIG. 5 shows a schematic diagram of another AR image effect provided by an embodiment of the present disclosure;
图6示出了本公开实施例所提供的一种基于增强现实的交互装置的示意图;FIG. 6 shows a schematic diagram of an augmented reality-based interaction device provided by an embodiment of the present disclosure;
图7示出了本公开实施例所提供的一种计算机设备的示意图。FIG. 7 shows a schematic diagram of a computer device provided by an embodiment of the present disclosure.
具体实施方式Detailed ways
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本公开实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本公开的实施例的详细描述并非旨在限制要求保护的本公开的范围,而是仅仅表示本公开的选定实施例。基于本公开的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本公开保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only These are some, but not all, embodiments of the present disclosure. The components of the disclosed embodiments generally described and illustrated in the drawings herein may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the disclosure provided in the accompanying drawings is not intended to limit the scope of the disclosure as claimed, but is merely representative of selected embodiments of the disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present disclosure.
在传统套圈活动中,通常是在真实环境中摆放好套圈物体,参与套圈活动的人通过技巧性地抛出投掷圈,来体验该游戏过程。而传统套圈活动容易受到真实空间的束缚和限制,如何合理利用AR技术,实现一个一方面可以打破真实空间的束缚和限制,另一方面又具有真实体验的交互过程,是一个值得解决的问题。In traditional hooping activities, hooping objects are usually placed in a real environment, and people participating in hooping activities experience the game process by skillfully throwing throwing rings. However, traditional hoop activities are easily bound and restricted by real space. How to use AR technology reasonably to realize an interactive process that can break the constraints and restrictions of real space on the one hand, and have real experience on the other hand, is a problem worth solving. .
基于此,本公开提供了一种基于增强现实的交互方法,将虚拟投掷圈、至少一个虚拟圈选对象融入现实场景中,生成AR画面,用户可以通过目标触发操作蓄力,目标触发操作的触发持续时长,决定了虚拟投掷圈对应的投掷距离,进而展示与投掷距离匹配的投掷结果;基于上述AR交互过程,可以在打破真实空间的束缚和限制的条件下,实现更加接近传统套圈活动的交互过程。Based on this, the present disclosure provides an augmented reality-based interaction method, which integrates a virtual throwing circle and at least one virtual circle selection object into a real scene to generate an AR screen. The duration determines the throwing distance corresponding to the virtual throwing circle, and then displays the throwing results that match the throwing distance. Based on the above AR interaction process, it is possible to break the constraints and limitations of the real space and achieve a more similar traditional throwing circle activity. interactive process.
针对以上方案所存在的缺陷以及所提出的解决方案,均是发明人在经过实践并仔细研究后得出的结果,因此,上述问题的发现过程以及下文中本公开针对上述问题所提出的解决方案,都应该是发明人在本公开过程中对本公开做出的贡献。The defects of the above solutions and the proposed solutions are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the present disclosure for the above problems hereinafter are the results obtained by the inventor. , should be the contributions made by the inventor to the present disclosure in the course of the present disclosure.
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。It should be noted that like numerals and letters refer to like items in the following figures, so once an item is defined in one figure, it does not require further definition and explanation in subsequent figures.
本公开实施例所公开的一种基于增强现实的交互方法可以应用于利用AR技术模拟现实套圈活动的场景中,例如可以应用于文旅场景中,例如景区、街道、公园等场景,为游客提供休闲体验;也可以应用于商场、超市等相关活动中。The augmented reality-based interaction method disclosed in the embodiments of the present disclosure can be applied to scenarios in which AR technology is used to simulate real-life hooping activities, for example, can be applied to cultural tourism scenarios, such as scenic spots, streets, parks, etc. Provide leisure experience; can also be used in shopping malls, supermarkets and other related activities.
为便于对本实施例进行理解,首先对本公开实施例所公开的一种基于增强现实的交互方法进行详细介绍,本公开实施例所提供的基于增强现实的交互方法的执行主体一般为具有一定计算能力的计算机设备。In order to facilitate the understanding of this embodiment, an augmented reality-based interaction method disclosed in the embodiment of the present disclosure is first introduced in detail. The execution subject of the augmented reality-based interaction method provided by the embodiment of the present disclosure generally has a certain computing capability. computer equipment.
下面以执行主体为终端设备为例对本公开实施例提供的基于增强现实的交互方法加以说明。The augmented reality-based interaction method provided by the embodiments of the present disclosure will be described below by taking the execution subject as a terminal device as an example.
参见图1所示,为本公开实施例提供的一种基于增强现实的交互方法的流程图,所述方法包括S101~S104,其中:Referring to FIG. 1, which is a flowchart of an augmented reality-based interaction method provided by an embodiment of the present disclosure, the method includes S101-S104, wherein:
S101:获取现实场景画面。S101: Acquire a real scene picture.
在本公开实施例中,可以利用终端设备实时地采集现实场景画面,示例性地,可以通过终端设备上的相机采集现实场景画面。In this embodiment of the present disclosure, a terminal device may be used to collect a real scene picture in real time, for example, a real scene picture may be collected by a camera on the terminal device.
在一种实施方式中,现实场景画面可以包括对任意的现实场景进行采集后得到的现实场景画面。在另一种实施方式中,现实场景画面可以包括与目标场景类型匹配的现实场景画面,即现实场景画面是针对目标场景类型采集的现实场景画面,例如目标场景类型可以包括公园、街道等场景类型,现实场景画面可以是在公园、街道等场景下采集的现实场景画面。基于这种现实场景画面生成的AR画面,可以实现将套圈交互过程限定在匹配的场景类型下,从而可以更好地与现实场景匹配。In one embodiment, the real scene picture may include a real scene picture obtained after collecting any real scene. In another embodiment, the real scene picture may include a real scene picture that matches the target scene type, that is, the real scene picture is a real scene picture collected for the target scene type, for example, the target scene type may include parks, streets and other scene types , the real scene picture may be a real scene picture collected in a park, a street, etc. scene. The AR image generated based on the real scene image can limit the interaction process of the ferrule to the matching scene type, so that it can better match the real scene.
S102:基于所述现实场景画面,确定并展示包含有待投掷的第一虚拟对象和待选中的至少一个第二虚拟对象的增强现实AR画面。S102: Based on the real scene picture, determine and display an augmented reality AR picture including the first virtual object to be thrown and at least one second virtual object to be selected.
增强现实AR画面中包括现实场景画面,以及展示在现实场景画面上的待投掷的第一虚拟对象和待选中的至少一个第二虚拟对象。第二虚拟对象可以作为被第一虚拟对象选中的对象,也就是通过投掷第一虚拟对象,可以从各第二虚拟对象中选择一个第二虚拟对象。其中,待投掷的第一虚拟对象和待选中的至少一个第二虚拟对象可以是通过游戏开发引擎(例如Unity/UE4等)渲染在现实场景画面中的。The augmented reality AR picture includes a real scene picture, and a first virtual object to be thrown and at least one second virtual object to be selected displayed on the real scene picture. The second virtual object can be used as the object selected by the first virtual object, that is, by throwing the first virtual object, one second virtual object can be selected from the second virtual objects. Wherein, the first virtual object to be thrown and at least one second virtual object to be selected may be rendered in a real scene picture by a game development engine (eg, Unity/UE4, etc.).
在具体实施中,第一虚拟对象可以为任意形式的、虚拟的待投掷对象,例如,第一虚拟对象可以是环状物体(此时可称为虚拟投掷圈),方便套在第二虚拟对象上,以示选中,这里的环状可以是方环、也可以是圆环等,本公开实施例中并不做限制。第二虚拟对象可以为任意形式的、虚拟的待选中对象,例如第二虚拟对象可以为虚拟分值柱。在第一虚拟对象被多次投掷后,并至少一次套中虚拟分值柱的情况下,可以基于套中的各个虚拟分值柱分别对应的分数值,产生相应的总分数。In a specific implementation, the first virtual object may be a virtual object to be thrown in any form, for example, the first virtual object may be a ring-shaped object (it may be called a virtual throwing circle at this time), which is convenient to fit on the second virtual object above, to indicate selection, the ring here may be a square ring, a circular ring, etc., which is not limited in the embodiments of the present disclosure. The second virtual object may be a virtual object to be selected in any form, for example, the second virtual object may be a virtual score bar. After the first virtual object is thrown multiple times and the virtual score column is in the set at least once, a corresponding total score may be generated based on the score values corresponding to each virtual score column in the set.
在一种方式中,至少一个第一虚拟对象可以分别单独展示在现实场景画面上。在另一种方式中,至少一个第一虚拟对象也可以统一部署在部署物上,例如至少一个第一虚拟对象统一固定在悬浮的板子上,然后至少一个第一虚拟对象和部署物一起展示在现实场景画面上。如图2示出的一种AR画面的效果示意图,包括在公园中采集的现实场景画面,在该现实场景画面中展示有一个虚拟投掷圈,以及部署有三排虚拟分值柱的板子,每排包含三个虚拟分值柱,每个虚拟分值柱对应不同的分数值。其中,虚拟投掷圈即第一虚拟对象,这些虚拟分值柱即第二虚拟对象。In one manner, the at least one first virtual object may be individually displayed on the real scene picture. In another way, the at least one first virtual object can also be uniformly deployed on the deployment object, for example, the at least one first virtual object is uniformly fixed on a suspended board, and then the at least one first virtual object and the deployment object are displayed together on the on the real scene. As shown in Figure 2, a schematic diagram of the effect of an AR screen includes a real scene image collected in a park, in which a virtual throwing circle is displayed, and a board with three rows of virtual score columns is deployed. Contains three virtual score bars, each corresponding to a different score value. Wherein, the virtual throwing circle is the first virtual object, and these virtual score columns are the second virtual object.
为了呈现第一虚拟对象和至少一个第二虚拟对象能够与现实场景更加融合的AR画面,在一种实施方式中,可以基于第一虚拟对象和至少一个第二虚拟对象在现实场景画面中对应的三维位姿信息,以及现实场景画面,确定并展示AR画面。In order to present an AR picture in which the first virtual object and the at least one second virtual object can be more integrated with the real scene, in one embodiment, the AR picture can be The three-dimensional pose information, as well as the real scene picture, determine and display the AR picture.
这里,三维位姿信息可以包括第一虚拟对象和至少一个第二虚拟对象在现实场景画面中对应的位置信息和姿态信息。基于第一虚拟对象和至少一个第二虚拟对象在现实场景画面中对应的位置信息和姿态信息,可以在AR画面中呈现出第一虚拟对象和至少一个第二虚拟对象的立体效果。Here, the three-dimensional pose information may include position information and attitude information corresponding to the first virtual object and the at least one second virtual object in the real scene picture. Based on the corresponding position information and posture information of the first virtual object and the at least one second virtual object in the real scene picture, the stereoscopic effect of the first virtual object and the at least one second virtual object can be presented in the AR picture.
考虑到第一虚拟对象和至少一个第二虚拟对象在现实场景画面中对应的位置,与现实场景画面中包含的物体的位置有关,因此,在一种方式中,还可以预先设置并存储第一虚拟对象和至少一个第二虚拟对象之间的相对位姿信息,在获取到现实场景画面后,可以基于第一虚拟对象和至少一个第二虚拟对象之间的相对位姿信息,以及现实场景画面中包含的各个物体的位置,确定第一虚拟对象和至少一个第二虚拟对象在现实场景画面中对应的三维位姿信息。比如,现实场景画面中包含多棵树木,多棵树木之间围成一片空地区域,此时可以基于这多棵树木的位置,确定第一虚拟对象和至少一个第二虚拟对象在现实场景画面中对应的位置信息。Considering that the corresponding positions of the first virtual object and the at least one second virtual object in the real scene picture are related to the positions of the objects contained in the real scene picture, therefore, in one way, the first virtual object can also be preset and stored. The relative pose information between the virtual object and the at least one second virtual object can be based on the relative pose information between the first virtual object and the at least one second virtual object after the real scene picture is obtained, and the real scene picture The position of each object contained in the image is determined, and the corresponding three-dimensional pose information of the first virtual object and the at least one second virtual object in the real scene picture is determined. For example, the real scene picture contains a plurality of trees, and an open space area is surrounded by the plurality of trees. At this time, it can be determined based on the positions of the plurality of trees that the first virtual object and at least one second virtual object are in the real scene picture. corresponding location information.
如前所述,现实场景画面可以包括任意现实场景画面,也可以包括与目标场景类型匹配的现实场景画面。针对上述两种情况,基于现实场景画面,生成并展示AR画面的过程有所差别。As mentioned above, the real scene picture may include any real scene picture, and may also include the real scene picture matching the target scene type. For the above two situations, the process of generating and displaying AR images based on real scene images is different.
具体地,当现实场景画面包括任意现实场景画面的时候,即在采集到现实场景画面后,无需判断采集的现实场景画面是否与目标场景类型匹配,即可确定并展示包含有第一虚拟对象和至少一个第二虚拟对象的AR画面。Specifically, when the real scene image includes any real scene image, that is, after the real scene image is collected, it is possible to determine and display whether the collected real scene image matches the target scene type without judging whether the collected real scene image matches the target scene type. AR screen of at least one second virtual object.
当现实场景画面包括目标场景类型匹配的现实场景画面的时候,需要判断采集的现实场景画面是否与目标场景类型匹配。只有在现实场景画面是与目标场景类型匹配的现实场景画面的时候,才可以确定并展示所述的AR画面;而在现实场景画面是与目标场景类型不匹配的现实场景画面的时候,则无法确定并展示所述的AR画面。When the real scene image includes the real scene image matching the target scene type, it is necessary to judge whether the collected real scene image matches the target scene type. The AR image can be determined and displayed only when the real scene image is a real scene image that matches the target scene type; and when the real scene image is a real scene image that does not match the target scene type, it cannot be Determine and display the AR screen.
具体地,在一种实施方式中,可以基于现实场景画面,判断现实场景画面是否与目标场景类型匹配,若匹配,则基于现实场景画面,确定并展示包含有第一虚拟对象和至少一个第二虚拟对象的增强现实AR画面。Specifically, in one embodiment, it can be determined whether the real scene image matches the target scene type based on the real scene image, and if it matches, it is determined and displayed based on the real scene image that contains the first virtual object and at least one second virtual object. Augmented reality AR footage of virtual objects.
这里,可以根据采集的现实场景画面与预先采集的目标场景类型下的目标现实场景画面进行比对,进而判断现实场景画面是否与目标场景类型匹配。Here, the collected real scene image can be compared with the target real scene image under the pre-collected target scene type, so as to determine whether the real scene image matches the target scene type.
具体地,可以预先采集并存储目标场景类型下的目标现实场景画面。当采集到现实场景画面后,可以将采集到的现实场景画面与存储的目标现实场景画面进行比对,在一种方式中,可以提取现实场景画面的图像特征,以及目标现实场景画面的图像特征,然后将现实场景画面的图像特征与目标现实场景画面的图像特征进行比对。在采集到的现实场景画面的图像特征与目标现实场景画面的图像特征的相似度符合预设条件的时候,例如相似度大于设定阈值的时候,可以认为现实场景画面与目标场景类型匹配;在采集到的现实场景画面与目标现实场景画面的相似度不符合预设条件的时候,例如相似度小于或等于设定阈值的时候,可以认为现实场景画面与目标场景类型不匹配。Specifically, the target real scene picture under the target scene type may be collected and stored in advance. After the real scene image is collected, the collected real scene image can be compared with the stored target real scene image. In one way, the image characteristics of the real scene image and the image characteristics of the target real scene image can be extracted. , and then compare the image characteristics of the real scene image with the image characteristics of the target real scene image. When the similarity between the image features of the collected real scene image and the image features of the target real scene image meets the preset conditions, for example, when the similarity is greater than the set threshold, it can be considered that the real scene image matches the target scene type; When the similarity between the collected real scene image and the target real scene image does not meet the preset condition, for example, when the similarity is less than or equal to the set threshold, it can be considered that the real scene image does not match the target scene type.
在其他方式中,还可以判断采集的现实场景画面中是否包含目标场景类型下的目标物体,进而判断现实场景画面是否与目标场景类型匹配。例如,目标场景类型可以为游乐场,目标场景类型下的目标物体可以为过山车、摩天轮等游乐设施,当采集的现实场景画面中包含上述游乐设施中的至少一种的情况下,可以认为现实场景画面与目标场景类型匹配;当采集的现实场景画面中未包含上述游乐设施中的任何一种的情况下,可以认为现实场景画面与目标场景类型不匹配。In other manners, it can also be judged whether the collected real scene picture contains a target object under the target scene type, and then it can be judged whether the real scene picture matches the target scene type. For example, the target scene type may be an amusement park, and the target object under the target scene type may be amusement facilities such as roller coasters and Ferris wheels. The scene picture matches the target scene type; when the collected real scene picture does not contain any of the above amusement facilities, it can be considered that the real scene picture does not match the target scene type.
根据判断结果,在现实场景画面与目标场景类型匹配的情况下,则可以基于现实场景画面,确定并展示包含有第一虚拟对象和至少一个第二虚拟对象的增强现实AR画面;在现实场景画面与目标场景类型不匹配的情况下,示例性地,可以显示无法识别当前场景的提示信息,或者可以显示重新获取现实场景画面的提示信息。According to the judgment result, in the case where the real scene image matches the target scene type, the augmented reality AR image including the first virtual object and at least one second virtual object can be determined and displayed based on the real scene image; In the case that the type of the target scene does not match, for example, the prompt information that the current scene cannot be recognized may be displayed, or the prompt information of re-acquiring the real scene picture may be displayed.
S103:响应于针对所述第一虚拟对象的目标触发操作,确定所述第一虚拟对象针对所述第二虚拟对象的投掷结果。S103: In response to the target triggering operation for the first virtual object, determine a throwing result of the first virtual object for the second virtual object.
目标触发操作可以指针对第一虚拟对象执行的、用于控制第一虚拟对象被投掷的触发操作。目标触发操作可以为任意形式的触发操作,例如点击操作、滑动操作、按压操作等。The target triggering operation may refer to a triggering operation performed on the first virtual object for controlling the throwing of the first virtual object. The target trigger operation may be any form of trigger operation, such as a click operation, a sliding operation, a pressing operation, and the like.
在具体实施中,目标触发操作对应的作用对象可以包括作用在AR画面中的目标操作区域或目标操作对象等任何可能的作用对象。其中,目标操作区域可以为AR画面中的任意区域,例如,包围第一虚拟对象的设定操作区域,或者在AR画面中的某个固定位置区域等。目标操作对象可以是第一虚拟对象,也可以是用于控制第一虚拟对象的预设操作控件,例如可以是蓄力进度条。在一种实施方式中,可以选择上述任意一种作用对象作为目标触发操作的作用对象。在另一种实施方式中,也可以选择上述多种作用对象作为目标触发操作的作用对象。通过选择目标触发操作对应的多种作用对象,可以增加AR交互过程中的操作灵活性。In a specific implementation, the action object corresponding to the target-triggered operation may include any possible action object such as the target operation area or the target operation object acting on the AR screen. The target operation area may be any area in the AR screen, for example, a set operation area surrounding the first virtual object, or a certain fixed position area in the AR screen, and the like. The target operation object may be the first virtual object, or may be a preset operation control for controlling the first virtual object, for example, it may be a progress bar for accumulating power. In an implementation manner, any one of the above-mentioned action objects may be selected as the action objects of the target-triggered operation. In another implementation manner, the above-mentioned multiple action objects may also be selected as action objects of the target-triggered operation. By selecting a variety of action objects corresponding to the target-triggered operation, the operational flexibility in the AR interaction process can be increased.
在现实场景的套圈活动中,投掷圈的投掷结果可以与活动参与者投掷的力度和方向有关。为了模拟现实场景中的套圈活动,在一种实施方式中,可以响应于目标触发操作,确定第一虚拟对象对应的投掷距离和投掷方向;然后基于投掷距离和投掷方向,确定第一虚拟对象针对第二虚拟对象的投掷结果。In a real-world hooping activity, the throwing results of the hoops can be related to the strength and direction of the throwing by the activity participants. In order to simulate the hooping activity in a real scene, in one embodiment, the throwing distance and throwing direction corresponding to the first virtual object may be determined in response to the target triggering operation; and then the first virtual object may be determined based on the throwing distance and throwing direction The throw result for the second virtual object.
在上述实施方式中,对至少一个第二虚拟对象的投掷结果可以是由投掷距离和投掷方向共同决定的。其中,投掷距离可以影响被选中的第二虚拟对象的远近距离,投掷方向可以影响被选中的第二虚拟对象的方位信息。投掷结果可以包括选中结果、未选中结果、未投掷成功结果等。比如,第一虚拟对象选中至少一个第二虚拟对象,可以得到选中结果;第一虚拟对象未选中任何一个第二虚拟对象,可以得到未选中的结果;第一虚拟对象未被投掷出来,可以得到未投掷成功的结果。In the above embodiment, the throwing result of the at least one second virtual object may be jointly determined by the throwing distance and the throwing direction. Wherein, the throwing distance can affect the distance of the selected second virtual object, and the throwing direction can affect the orientation information of the selected second virtual object. The throwing result may include a selected result, an unselected result, an unsuccessful throwing result, and the like. For example, if the first virtual object selects at least one second virtual object, a selection result can be obtained; if the first virtual object does not select any second virtual object, an unselected result can be obtained; if the first virtual object is not thrown, it can be obtained A result that was not thrown successfully.
在具体实施中,可以通过目标触发操作的触发属性信息,确定第一虚拟对象对应的投掷距离和投掷方向。其中,触发属性信息可以包括触发持续时长、触发力度、触发次数、触发角度、触发位置等属性信息。这里,用于确定第一虚拟对象对应的投掷距离和投掷方向的触发属性信息可以是相同的,也可以是不同的。In a specific implementation, the throwing distance and throwing direction corresponding to the first virtual object may be determined by triggering attribute information of the target triggering operation. The trigger attribute information may include attribute information such as trigger duration, trigger strength, trigger times, trigger angle, and trigger position. Here, the trigger attribute information for determining the throwing distance and throwing direction corresponding to the first virtual object may be the same or different.
示例性地,在一种实施方式中,可以响应于针对第一虚拟对象的目标触发操作,根据目标触发操作的触发持续时长,确定第一虚拟对象对应的投掷距离。也就是通过目标触发操作的触发属性信息中的触发持续时长,确定第一虚拟对象对应的投掷距离。这里,可以利用触发持续时长表征投掷的力度,目标触发操作的触发持续时长越长,投掷的力度越大,则第一虚拟对象对应的投掷距离可以越远。因此,在一种方式中,可以预先设定触发持续时长与投掷距离的对应关系,然后根据目标触发操作的触发持续时长以及触发持续时长与投掷距离的对应关系,确定投掷距离。Exemplarily, in one embodiment, the throwing distance corresponding to the first virtual object may be determined according to the triggering duration of the target triggering operation in response to the target triggering operation for the first virtual object. That is, the throwing distance corresponding to the first virtual object is determined by the trigger duration in the trigger attribute information of the target trigger operation. Here, the trigger duration can be used to represent the throwing strength. The longer the trigger duration of the target triggering operation, the greater the throwing strength, and the longer the throwing distance corresponding to the first virtual object. Therefore, in one method, the corresponding relationship between the trigger duration and the throwing distance can be preset, and then the throwing distance is determined according to the trigger duration of the target trigger operation and the corresponding relationship between the trigger duration and the throwing distance.
在一种实施方式中,可以响应于作用在AR画面中的目标操作区域或目标操作对象上的目标触发操作,根据目标触发操作的触发持续时长,确定第一虚拟对象对应的投掷距离。In one embodiment, the throwing distance corresponding to the first virtual object may be determined according to the triggering duration of the target triggering operation in response to the target triggering operation acting on the target operation area or the target operation object in the AR screen.
也就是,目标触发操作可以包括作用在AR画面中的目标操作区域或目标操作对象上的触发操作。从目标触发操作开始作用的时候,可以统计目标触发操作的触发持续时长,随着触发持续时长的延长,第一虚拟对象对应的投掷距离增加。That is, the target trigger operation may include a trigger operation acting on a target operation area or a target operation object in the AR screen. When the target triggering operation starts to act, the triggering duration of the target triggering operation can be counted, and as the triggering duration prolongs, the throwing distance corresponding to the first virtual object increases.
为了更准确地知晓目标触发操作的触发持续时长情况,在一种方式中,可以在AR画面中展示与触发持续时长对应的蓄力进度条。蓄力进度条中可以展示蓄力进度值,当触发持续时长越长,蓄力进度值越大。在具体实施中,可以响应于针对第一虚拟对象的目标触发操作,根据目标触发操作的触发持续时长,更新在AR画面中展示的蓄力进度条的蓄力进度值。In order to know more accurately the triggering duration of the target triggering operation, in one way, a charging progress bar corresponding to the triggering duration may be displayed on the AR screen. The charging progress bar can display the charging progress value. The longer the trigger duration, the greater the charging progress value. In a specific implementation, the charging progress value of the charging progress bar displayed in the AR screen may be updated according to the triggering duration of the target triggering operation in response to the target triggering operation for the first virtual object.
当目标操作对象为第一虚拟对象或者目标操作对象为除蓄力进度条以外的其他预设操作控件的时候,蓄力进度条可以是在响应目标触发操作的时候才展示在AR画面中的,即在未执行目标触发操作的时候,蓄力进度条可以不展示出来;蓄力进度条也可以是一直展示在AR画面中的。当目标操作对象为蓄力进度条的时候,蓄力进度条可以是一直展示在AR画面中的。When the target operation object is the first virtual object or the target operation object is other preset operation controls except the charging progress bar, the charging progress bar may be displayed in the AR screen only when responding to the target triggering operation. That is, when the target triggering operation is not performed, the charging progress bar may not be displayed; the charging progress bar may also be displayed on the AR screen all the time. When the target operation object is the charging progress bar, the charging progress bar can always be displayed in the AR screen.
通过触发持续时长更新展示蓄力进度条的蓄力进度值,可以使得用户能够准确知晓目标触发操作的触发持续时长情况以及蓄力进度情况,继而可以更好地掌握投掷时机。By updating the charging progress value of the charging progress bar by the trigger duration update, the user can accurately know the trigger duration and charging progress of the target trigger operation, and then can better grasp the throwing timing.
图3示出的另一种AR画面效果示意图中,在对蓄力进度条执行目标触发操作的时候,蓄力进度条中可以展示蓄力进度值。蓄力进度条中的蓄力进度值可以随着触发持续时长的延长而增加,并且虚拟投掷圈(第一虚拟对象)的投掷距离随蓄力进度值的增加而增大。图4a示出了在蓄力进度值较小的情况下,虚拟投掷圈对应的投掷距离的效果示意图,图4b示出了在蓄力进度值较大的情况下,虚拟投掷圈对应的投掷距离的效果示意图。图4a中的虚拟投掷圈圈中了第一排(由近及远看)的虚拟分值柱(第二虚拟对象),图4a中的虚拟投掷圈圈中了第三排(由近及远看)的分值柱,由此可以看出,蓄力进度值较小,虚拟投掷圈对应的投掷距离较近,蓄力值较大,虚拟投掷圈对应的投掷距离较远。其中,在AR画面中展示出投掷结果后,可以继续展示待投掷的虚拟投掷圈。In the schematic diagram of another AR screen effect shown in FIG. 3 , when the target triggering operation is performed on the charging progress bar, the charging progress value can be displayed in the charging progress bar. The charging progress value in the charging progress bar may increase with the extension of the triggering duration, and the throwing distance of the virtual throwing circle (the first virtual object) increases with the increase of the charging progress value. Figure 4a shows a schematic diagram of the effect of the throwing distance corresponding to the virtual throwing circle when the charging progress value is small, and Figure 4b shows the throwing distance corresponding to the virtual throwing circle when the charging progress value is large Schematic diagram of the effect. The virtual throwing circle in Fig. 4a circles the virtual score columns (the second virtual object) in the first row (viewed from near to far), and the virtual throwing circle in Fig. 4a circles the third row (viewed from near to far). Look at the score column of ), it can be seen that the charging progress value is smaller, the throwing distance corresponding to the virtual throwing circle is shorter, the charging value is larger, and the throwing distance corresponding to the virtual throwing circle is longer. Among them, after the throwing result is displayed in the AR screen, the virtual throwing circle to be thrown can continue to be displayed.
如前所述,在现实场景的套圈活动中,投掷圈的投掷结果除了与投掷距离有关,还与投掷方向有关。为了模拟现实场景中的套圈活动,在一种实施例中,可以响应于针对第一虚拟对象的目标触发操作,根据目标触发操作对应的触发时刻下,AR画面对应的相机拍摄角度,确定第一虚拟对象对应的投掷方向。As mentioned above, in the hooping activity in the real scene, the throwing result of the throwing circle is not only related to the throwing distance, but also to the throwing direction. In order to simulate the hooping activity in the real scene, in one embodiment, in response to the target triggering operation for the first virtual object, according to the shooting angle of the camera corresponding to the AR picture at the triggering moment corresponding to the target triggering operation, determine the first virtual object. A throwing direction corresponding to a virtual object.
也就是可以通过确定AR画面对应的相机拍摄角度的方式,确定第一虚拟对象对应的投掷方向。在具体实施中,可以通过相机的内部参数信息确定相机拍摄角度,进而确定第一虚拟对象对应的投掷对象。That is, the throwing direction corresponding to the first virtual object can be determined by determining the shooting angle of the camera corresponding to the AR picture. In a specific implementation, the shooting angle of the camera may be determined by the internal parameter information of the camera, and then the throwing object corresponding to the first virtual object may be determined.
在一种方式中,第一虚拟对象对应的投掷方向是与AR画面对应的相机拍摄角度可以是一致的。比如相机拍摄角度是向上的,第一虚拟对象对应的投掷方向也是向上的;相机拍摄角度是向左的,第一虚拟对象对应的投掷方向也是向左的。In one manner, the throwing direction corresponding to the first virtual object may be the same as the shooting angle of the camera corresponding to the AR picture. For example, if the camera shooting angle is upward, the throwing direction corresponding to the first virtual object is also upward; the camera shooting angle is leftward, and the throwing direction corresponding to the first virtual object is also leftward.
为了提高选中的准确率,提升用户的交互体验,在一种实施方式中,可以响应于针对第一虚拟对象的目标触发操作,在AR画面中展示方向指引标识。其中,方向指引标识用于指示当前的投掷方向,且方向指引标识能够在目标触发操作的控制下进行指向的调整。In order to improve the accuracy of selection and enhance the user's interactive experience, in one embodiment, a direction guidance sign may be displayed on the AR screen in response to a target triggering operation for the first virtual object. The direction guide mark is used to indicate the current throwing direction, and the direction guide mark can be adjusted under the control of the target triggering operation.
这里,如前所述,目标触发操作可以包括作用在AR画面中的目标操作区域或目标操作对象上的目标触发操作。Here, as described above, the target triggering operation may include a target triggering operation acting on a target operation area or a target operation object in the AR screen.
当目标触发操作包括作用在AR画面中的目标操作区域的目标触发操作的情况下,在一种方式中,可以在目标操作区域的触发位置展示方向指引标识;在另一种方式中,也可以在第一虚拟对象上展示方向指引标识;在另一种方式中,还可以在目标操作区域的预设位置展示方向指引标识。When the target triggering operation includes a target triggering operation acting on the target operation area in the AR screen, in one method, a direction guide mark may be displayed at the trigger position of the target operation area; The direction guidance mark is displayed on the first virtual object; in another manner, the direction guidance mark may also be displayed at a preset position of the target operation area.
当目标触发操作包括作用在AR画面中的目标操作对象上的目标触发操作的情况下,在一种方式中,可以在第一虚拟对象或用于控制第一虚拟对象的预设操作控件上展示方向指引标识;在另一种方式中,也可以在目标操作区域的预设位置展示方向指引标识。When the target triggering operation includes the target triggering operation acting on the target operation object in the AR screen, in one way, it can be displayed on the first virtual object or a preset operation control for controlling the first virtual object Direction guidance signs; in another way, the direction guidance signs can also be displayed at the preset positions of the target operation area.
示例性地,方向指引标识中可以为方向指示箭头,方向指示箭头的方向可以对应当前的投掷方向。如图5所示的另一种AR画面的示意图中,展示有方向指引控件(方向指引控件是一种预设操作控件),当按压该方向指引控件的时候,可以展示方向指示箭头,该方向指引箭头指向了部署在板子上的第一排(由近向远看)中的虚拟分值柱。Exemplarily, the direction indication mark may be a direction indication arrow, and the direction of the direction indication arrow may correspond to the current throwing direction. In the schematic diagram of another AR screen as shown in FIG. 5 , a direction guide control is displayed (the direction guide control is a preset operation control). When the direction guide control is pressed, a direction indicating arrow can be displayed. The guide arrows point to the virtual score columns deployed in the first row (looking from near to far) on the board.
在一种方式中,目标触发操作的触发方向或者在各个触发方向上的按压程度是可以改变的。因此通过改变目标触发操作的触发方向或者在各个触发方向上的按压程度,可以调整方向指引标识的指向,进而可以调整第一虚拟对象的投掷方向。In one approach, the triggering direction of the target triggering operation or the degree of pressing in each triggering direction can be changed. Therefore, by changing the triggering direction of the target triggering operation or the pressing degree in each triggering direction, the direction of the direction guide mark can be adjusted, and then the throwing direction of the first virtual object can be adjusted.
最后,基于确定的投掷距离和投掷方向,确定第一虚拟对象在被投掷后,对至少一个第二虚拟对象的投掷结果。Finally, based on the determined throwing distance and throwing direction, a throwing result of the at least one second virtual object after the first virtual object is thrown is determined.
在具体实施中,当第一虚拟对象的投掷距离和/或投掷方向不同的情况下,对应的投掷结果可能也是不同的。比如,在第一虚拟对象的投掷距离相同的情况下,投掷方向偏左时,对应的投掷结果中可能包含左侧的第二虚拟对象;投掷方向偏右时,对应的投掷结果中可能包含右侧的第二虚拟对象。又比如,在第一虚拟对象的投掷方向相同的情况下,投掷距离偏小时,对应的投掷结果中可能包含该投掷方向上距离较近的第二虚拟对象;投掷距离偏大时,对应的投掷结果中可能包含该投掷方向上距离较远的第二虚拟对象。再比如,当投掷方向偏左、投掷距离较大的情况下,对应的投掷结果中可能包含左侧方向上距离偏远的第二虚拟对象。In a specific implementation, when the throwing distance and/or throwing direction of the first virtual object are different, the corresponding throwing results may also be different. For example, when the throwing distance of the first virtual object is the same, when the throwing direction is to the left, the corresponding throwing result may include the second virtual object on the left; when the throwing direction is to the right, the corresponding throwing result may include the right side of the second virtual object. For another example, when the throwing direction of the first virtual object is the same, and the throwing distance is too small, the corresponding throwing result may include the second virtual object that is closer in the throwing direction; when the throwing distance is too large, the corresponding throwing The result may include a second virtual object farther away in the throwing direction. For another example, when the throwing direction is to the left and the throwing distance is large, the corresponding throwing result may include a second virtual object that is far away in the left direction.
S104:在所述AR画面中展示与所述投掷结果。S104: Display the throwing result on the AR screen.
这里,与至少一个第二虚拟对象匹配的投掷结果可以是虚拟结果,例如可以为分数、虚拟物体、实际物体的标识信息等。Here, the throwing result matching the at least one second virtual object may be a virtual result, for example, may be a score, a virtual object, identification information of an actual object, and the like.
在一种实施方式中,在生成的AR画面中的至少一个第二虚拟对象可以包括多个第二虚拟对象。多个第二虚拟对象可以是相同的,也可以是不同的。In one embodiment, the at least one second virtual object in the generated AR picture may include a plurality of second virtual objects. The plurality of second virtual objects may be the same or different.
在生成的AR画面中的至少一个第二虚拟对象包括多个第二虚拟对象的情况下,可以在AR画面中展示多个第二虚拟对象中被选中的目标第二虚拟对象,并展示目标第二虚拟对象对应的奖励信息。In the case where at least one second virtual object in the generated AR picture includes multiple second virtual objects, the target second virtual object selected from the multiple second virtual objects may be displayed in the AR picture, and the target second virtual object may be displayed in the AR picture. 2. Reward information corresponding to the virtual object.
目标第二虚拟对象可以是经过一次投掷后被选中的第二虚拟对象,也可以是经过多次投掷后被选中的第二虚拟对象。目标第二虚拟对象可以包括至少一个第二虚拟对象。The target second virtual object may be the second virtual object selected after one throw, or the second virtual object selected after multiple throws. The target second virtual object may include at least one second virtual object.
目标第二虚拟对象对应的奖励信息可以是目标第二虚拟对象本身,例如目标第二虚拟对象可以是电子形式的优惠资源等。目标第二虚拟对象对应的奖励信息也可以是目标第二虚拟对象对应的实际物体,这种情况下,目标第二虚拟对象可以是实际物体的标识信息,例如实际物体的图像、实际物体的名称等;目标第二虚拟对象也可以是实际物体对应的兑换数值信息,例如分数值。The reward information corresponding to the target second virtual object may be the target second virtual object itself, for example, the target second virtual object may be a preferential resource in an electronic form. The reward information corresponding to the target second virtual object may also be the actual object corresponding to the target second virtual object. In this case, the target second virtual object may be the identification information of the actual object, such as the image of the actual object, the name of the actual object etc.; the target second virtual object may also be exchange value information corresponding to the actual object, such as a score value.
在目标第二虚拟对象包括多个第二虚拟对象的情况下,可以在每次选中一个目标第二虚拟对象的时候,展示该目标第二虚拟对象对应的奖励信息,也可以在选中多个目标第二虚拟对象之后,展示多个目标第二虚拟对象分别对象的奖励信息。In the case where the target second virtual object includes multiple second virtual objects, each time a target second virtual object is selected, the reward information corresponding to the target second virtual object may be displayed, or multiple targets may be selected. After the second virtual object, the reward information of the respective objects of the multiple target second virtual objects is displayed.
在现实场景的套圈活动中,通常有一条发射线,活动参与者必须站在发射线以外才能开始游戏。为了模拟现实场景中的套圈活动,可以在第一虚拟对象与至少一个第二虚拟对象之间设置投掷边界线,例如可以在第一虚拟对象与距离最近的至少一个第二虚拟对象之间设置投掷边界线。第一虚拟对象和至少一个第二虚拟对象之间的距离,可以是投掷边界线和至少一个第二虚拟对象之间的距离。这里,可以设定投掷边界线与至少一个第二虚拟对象之间的距离阈值。在一种方式中,设定距离阈值的大小可以与游戏难度有关,当游戏难度增加时,设定距离阈值更大。第一虚拟对象需要保持在投掷边界线外才能够正常投掷,也就是第一虚拟对象与至少一个第二虚拟对象之间的距离不能小于该设定距离阈值。在一种方式中,投掷边界线可以是不可见的边界线,也可以是不可见的边界线。In real-world hooping events, there is usually a launch line, and event participants must stand outside the launch line to start the game. In order to simulate the hooping activity in a real scene, a throwing boundary line can be set between the first virtual object and at least one second virtual object, for example, a throwing boundary line can be set between the first virtual object and at least one second virtual object that is closest to the distance Throw borderline. The distance between the first virtual object and the at least one second virtual object may be the distance between the throwing boundary line and the at least one second virtual object. Here, a distance threshold between the throwing boundary line and the at least one second virtual object may be set. In one way, the size of the set distance threshold may be related to the difficulty of the game, and when the difficulty of the game increases, the set distance threshold is larger. The first virtual object needs to be kept outside the throwing boundary line to be able to throw normally, that is, the distance between the first virtual object and the at least one second virtual object cannot be smaller than the set distance threshold. In one approach, the throw boundary line may be an invisible boundary line or an invisible boundary line.
在本公开实施例中,在终端设备上启动套圈活动之前,可以基于现实场景画面,确定待投掷的第一虚拟对象和待选中的至少一个第二虚拟对象分别融入现实场景中的初始位置信息;基于第一虚拟对象和至少一个第二虚拟对象在现实场景中的初始位置信息,展示初始AR画面。In the embodiment of the present disclosure, before starting the ferrule activity on the terminal device, the initial position information of the first virtual object to be thrown and the at least one second virtual object to be selected can be respectively integrated into the real scene can be determined based on the real scene picture. ; based on the initial position information of the first virtual object and the at least one second virtual object in the real scene, displaying an initial AR picture.
根据第一虚拟对象的初始位置信息以及的初始位置信息,可以确定第一虚拟对象和至少一个第二虚拟对象之间的初始相对距离。在一种方式中,第一虚拟对象融入现实场景中的初始位置信息可以是根据投掷边界线的位置确定的,至少一个第二虚拟对象融入现实场景中的初始位置信息可以是预先设置的位置信息。此时,第一虚拟对象与至少一个第二虚拟对象之间的初始相对距离,可以为投掷边界线与至少一个第二虚拟对象之间的距离阈值。也就是在初始AR画面中,第一虚拟对象是位于投掷边界线以外的。According to the initial position information of the first virtual object and the initial position information of the first virtual object, the initial relative distance between the first virtual object and the at least one second virtual object can be determined. In one manner, the initial position information of the first virtual object integrated into the real scene may be determined according to the position of the throwing boundary line, and the initial position information of the at least one second virtual object integrated into the real scene may be preset position information . At this time, the initial relative distance between the first virtual object and the at least one second virtual object may be a distance threshold between the throwing boundary line and the at least one second virtual object. That is, in the initial AR screen, the first virtual object is located outside the throwing boundary line.
为了更加接近现实场景中套圈过程的真实体验,在一种实施方式中,可以根据相机拍摄位姿的变化信息,确定第一虚拟对象在现实场景中的变化后位置信息。In order to be closer to the real experience of the looping process in the real scene, in one embodiment, the post-change position information of the first virtual object in the real scene may be determined according to the change information of the camera's shooting pose.
在一种方式中,相机拍摄位姿的变化信息可以通过相机中的陀螺仪等设备获取到。在具体实施中,第一虚拟对象在现实场景中的位置可以跟随相机拍摄位姿的变化而变化,而第二虚拟对象在现实场景中的位置不变。In one way, the change information of the camera's shooting pose can be obtained through a device such as a gyroscope in the camera. In a specific implementation, the position of the first virtual object in the real scene may change following the change of the camera's shooting pose, while the position of the second virtual object in the real scene does not change.
最后,基于第一虚拟对象在现实场景中的变化后位置信息,和至少一个第二虚拟对象在现实场景中的初始位置信息,展示变化后AR画面。Finally, based on the changed position information of the first virtual object in the real scene and the initial position information of at least one second virtual object in the real scene, the changed AR picture is displayed.
在上述方式中,通过第一虚拟对象在现实场景中的变化后位置信息,和至少一个第二虚拟对象在现实场景中的初始位置信息,展示变化后AR画面,可以呈现出一种第一虚拟对象跟随用户在现实场景中移动的效果,从而可以更加接近现实场景中套圈过程的真实体验。In the above method, the changed AR picture can be presented by using the changed position information of the first virtual object in the real scene and the initial position information of at least one second virtual object in the real scene to display the changed AR image, which can present a first virtual object. The effect of the object following the user's movement in the real scene can be closer to the real experience of the looping process in the real scene.
由于变化后AR画面中第一虚拟对象与至少一个第二虚拟对象之间的距离可能会发生变化,因此,在一种实施方式中,在响应于针对第一虚拟对象的目标触发操作,确定第一虚拟对象对应的投掷距离和投掷方向之前,可以判断第一虚拟对象和至少一个第二虚拟对象之间的距离是否小于设定距离阈值;若小于,则可以提示用户远离至少一个第二虚拟对象。Since the distance between the first virtual object and the at least one second virtual object in the AR picture may change after the change, in one implementation manner, in response to a target triggering operation for the first virtual object, determine the first virtual object. Before the throwing distance and throwing direction corresponding to a virtual object, it can be judged whether the distance between the first virtual object and the at least one second virtual object is less than the set distance threshold; if it is less than, the user can be prompted to stay away from the at least one second virtual object .
本公开实施例提供的基于增强现实的交互方法可以应用于单人娱乐活动场景中,也可以应用于团队娱乐活动场景中,即多人娱乐活动场景。其中,应用在多人娱乐活动场景的过程与应用在单人娱乐活动场景的过程类似,本公开不再针对单人娱乐活动场景和多人娱乐活动场景分别进行阐述。The augmented reality-based interaction method provided by the embodiments of the present disclosure can be applied to a single-person entertainment activity scenario, and can also be applied to a team entertainment activity scenario, that is, a multi-person entertainment activity scenario. Wherein, the process of applying to the multi-player entertainment activity scenario is similar to the process of applying to the single-player entertainment event scenario, and the present disclosure will not separately describe the single-player entertainment event scenario and the multi-player entertainment event scenario.
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。Those skilled in the art can understand that in the above method of the specific implementation, the writing order of each step does not mean a strict execution order but constitutes any limitation on the implementation process, and the specific execution order of each step should be based on its function and possible Internal logic is determined.
基于同一发明构思,本公开实施例中还提供了与基于增强现实的交互方法对应的基于增强现实的交互装置,由于本公开实施例中的装置解决问题的原理与本公开实施例上述基于增强现实的交互方法相似,因此装置的实施可以参见方法的实施,重复之处不再赘述。Based on the same inventive concept, the embodiments of the present disclosure also provide an augmented reality-based interaction device corresponding to the augmented reality-based interaction method. The interaction methods of the two methods are similar, so the implementation of the apparatus can refer to the implementation of the method, and the repeated places will not be repeated.
参照图6所示,为本公开实施例提供的一种基于增强现实的交互装置的架构示意图,所述装置包括:获取模块601、第一确定模块602、第二确定模块603、第一展示模块604;其中,Referring to FIG. 6 , which is a schematic diagram of the architecture of an augmented reality-based interaction device according to an embodiment of the present disclosure, the device includes: an
获取模块601,用于获取现实场景画面;an
第一确定模块602,用于基于所述现实场景画面,确定并展示包含有待投掷的第一虚拟对象和待选中的至少一个第二虚拟对象的增强现实AR画面;a first determining
第二确定模块603,用于响应于针对所述第一虚拟对象的目标触发操作,确定所述第一虚拟对象针对所述第二虚拟对象的投掷结果;A second determining
第一展示模块604,用于在所述AR画面中展示所述投掷结果。The
一种可选的实施方式中,第二确定模块603,具体用于:In an optional implementation manner, the second determining
响应于针对所述第一虚拟对象的目标触发操作,确定所述第一虚拟对象对应的投掷距离和投掷方向;In response to a target triggering operation for the first virtual object, determining a throwing distance and throwing direction corresponding to the first virtual object;
基于所述投掷距离和所述投掷方向,确定所述第一虚拟对象针对所述第二虚拟对象的投掷结果。Based on the throwing distance and the throwing direction, a throwing result of the first virtual object with respect to the second virtual object is determined.
一种可选的实施方式中,第二确定模块603,具体用于:In an optional implementation manner, the second determining
响应于针对所述第一虚拟对象的目标触发操作,根据所述目标触发操作的触发持续时长,确定所述第一虚拟对象对应的投掷距离。In response to the target triggering operation for the first virtual object, the throwing distance corresponding to the first virtual object is determined according to the triggering duration of the target triggering operation.
一种可选的实施方式中,第二确定模块603,具体用于:In an optional implementation manner, the second determining
响应于作用在所述AR画面中的目标操作区域或目标操作对象上的所述目标触发操作,根据所述目标触发操作的触发持续时长,确定所述第一虚拟对象对应的投掷距离;In response to the target trigger operation acting on the target operation area or the target operation object in the AR screen, determining the throwing distance corresponding to the first virtual object according to the trigger duration of the target trigger operation;
所述目标操作对象包括所述第一虚拟对象和/或用于控制所述第一虚拟对象的预设操作控件。The target operation object includes the first virtual object and/or a preset operation control for controlling the first virtual object.
一种可选的实施方式中,所述装置还包括:In an optional embodiment, the device further includes:
更新模块,用于响应于所述目标触发操作,根据所述目标触发操作的触发持续时长,更新在所述AR画面中展示的蓄力进度条的蓄力进度值;所述触发持续时长越长,所述蓄力进度值越大;所述蓄力进度值与所述投掷距离之间具有预设对应关系。an update module, configured to update the charging progress value of the charging progress bar displayed in the AR screen according to the triggering duration of the target triggering operation in response to the target triggering operation; the longer the triggering duration is , the greater the power accumulation progress value; there is a preset corresponding relationship between the power accumulation progress value and the throwing distance.
一种可选的实施方式中,第二确定模块603,具体用于:In an optional implementation manner, the second determining
响应于针对所述第一虚拟对象的目标触发操作,根据所述目标触发操作对应的触发时刻下,所述AR画面对应的相机拍摄角度,确定所述第一虚拟对象对应的投掷方向。In response to the target triggering operation for the first virtual object, the throwing direction corresponding to the first virtual object is determined according to the shooting angle of the camera corresponding to the AR image at the triggering moment corresponding to the target triggering operation.
一种可选的实施方式中,所述装置还包括:In an optional embodiment, the device further includes:
第二展示模块,用于响应于所述目标触发操作,在所述AR画面中展示方向指引标识;所述方向指引标识用于指示当前的所述投掷方向,且所述方向指引标识能够在所述目标触发操作的控制下进行指向的调整。The second display module is configured to display a direction guide mark in the AR screen in response to the target triggering operation; the direction guide mark is used to indicate the current throwing direction, and the direction guide mark can be displayed in any Pointing adjustment is performed under the control of the target triggering operation described above.
一种可选的实施方式中,第一确定模块602,具体用于:In an optional implementation manner, the first determining
基于所述现实场景画面,确定待投掷的第一虚拟对象和待选中的至少一个第二虚拟对象分别融入现实场景中的初始位置信息;基于所述第一虚拟对象和所述至少一个第二虚拟对象在所述现实场景中的初始位置信息,展示初始AR画面;Based on the real scene picture, determine the initial position information of the first virtual object to be thrown and the at least one second virtual object to be selected into the real scene respectively; based on the first virtual object and the at least one second virtual object The initial position information of the object in the real scene, showing the initial AR picture;
响应于相机拍摄位姿的变化,确定所述第一虚拟对象在所述现实场景中的变化后位置信息;其中,所述第一虚拟对象在所述现实场景中的位置跟随相机拍摄位姿的变化而变化,所述至少一个第二虚拟对象在所述现实场景中的位置不变;In response to the change of the camera shooting pose, determine the changed position information of the first virtual object in the real scene; wherein, the position of the first virtual object in the real scene follows the camera shooting pose The position of the at least one second virtual object in the real scene remains unchanged;
基于所述第一虚拟对象在所述现实场景中的变化后位置信息,和所述至少一个第二虚拟对象在所述现实场景中的初始位置信息,展示变化后AR画面。Based on the changed position information of the first virtual object in the real scene and the initial position information of the at least one second virtual object in the real scene, the changed AR picture is displayed.
一种可选的实施方式中,在执行响应于针对所述第一虚拟对象的目标触发操作,确定所述第一虚拟对象对应的投掷距离和投掷方向之前,所述装置还包括:In an optional implementation manner, before performing a target triggering operation in response to the first virtual object and determining the throwing distance and throwing direction corresponding to the first virtual object, the device further includes:
判断模块,用于判断所述第一虚拟对象和所述至少一个第二虚拟对象之间的距离是否小于设定距离阈值;a judgment module for judging whether the distance between the first virtual object and the at least one second virtual object is less than a set distance threshold;
提示模块,用于若小于,则提示用户远离所述至少一个第二虚拟对象。A prompting module, configured to prompt the user to stay away from the at least one second virtual object if the value is smaller than the value.
一种可选的实施方式中,第一确定模块602,具体用于:In an optional implementation manner, the first determining
基于所述现实场景画面,判断所述现实场景画面是否与目标场景类型匹配,若匹配,则基于所述现实场景画面,确定并展示包含有所述第一虚拟对象和所述至少一个第二虚拟对象的增强现实AR画面。Based on the real scene image, it is judged whether the real scene image matches the target scene type, and if so, it is determined and displayed based on the real scene image that includes the first virtual object and the at least one second virtual object. Augmented reality AR footage of objects.
一种可选的实施方式中,所述至少一个第二虚拟对象包括多个第二虚拟对象;In an optional implementation manner, the at least one second virtual object includes a plurality of second virtual objects;
第一展示模块604,具体用于:在AR画面中展示所述多个第二虚拟对象中被选中的目标第二虚拟对象,并展示所述目标第二虚拟对象对应的奖励信息。The
关于装置中的各模块的处理流程、以及各模块之间的交互流程的描述可以参照上述方法实施例中的相关说明,这里不再详述。For the description of the processing flow of each module in the apparatus and the interaction flow between the modules, reference may be made to the relevant descriptions in the foregoing method embodiments, which will not be described in detail here.
基于同一技术构思,本公开实施例还提供了一种计算机设备。参照图7所示,为本公开实施例提供的计算机设备700的结构示意图,包括处理器701、存储器702、和总线703。其中,存储器702用于存储执行指令,包括内存7021和外部存储器7022;这里的内存7021也称内存储器,用于暂时存放处理器701中的运算数据,以及与硬盘等外部存储器7022交换的数据,处理器701通过内存7021与外部存储器7022进行数据交换,当计算机设备700运行时,处理器701与存储器702之间通过总线703通信,使得处理器701在执行以下指令:Based on the same technical concept, an embodiment of the present disclosure also provides a computer device. Referring to FIG. 7 , a schematic structural diagram of a computer device 700 provided by an embodiment of the present disclosure includes a
获取现实场景画面;Get real scene images;
基于所述现实场景画面,确定并展示包含有待投掷的第一虚拟对象和待选中的至少一个第二虚拟对象的增强现实AR画面;determining and displaying an augmented reality AR image containing the first virtual object to be thrown and at least one second virtual object to be selected based on the real scene image;
响应于针对所述第一虚拟对象的目标触发操作,确定所述第一虚拟对象针对所述第二虚拟对象的投掷结果;In response to a target triggering operation for the first virtual object, determining a throwing result of the first virtual object for the second virtual object;
在所述AR画面中展示所述投掷结果。The throwing result is displayed in the AR screen.
本公开实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行上述方法实施例中所述的基于增强现实的交互方法的步骤。其中,该存储介质可以是易失性或非易失的计算机可读取存储介质。Embodiments of the present disclosure further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the augmented reality-based interaction method described in the foregoing method embodiment is executed. step. Wherein, the storage medium may be a volatile or non-volatile computer-readable storage medium.
本公开实施例还提供一种计算机程序产品,该计算机产品承载有程序代码,所述程序代码包括的指令可用于执行上述方法实施例中所述的基于增强现实的交互方法的步骤,具体可参见上述方法实施例,在此不再赘述。Embodiments of the present disclosure further provide a computer program product, where the computer product carries program codes, and the instructions included in the program codes can be used to execute the steps of the augmented reality-based interaction method described in the foregoing method embodiments. For details, please refer to The foregoing method embodiments are not repeated here.
其中,上述计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。Wherein, the above-mentioned computer program product can be specifically implemented by means of hardware, software or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), etc. Wait.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。在本公开所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,又例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些通信接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。Those skilled in the art can clearly understand that, for the convenience and brevity of description, for the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiments, which will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces, indirect coupling or communication connection of devices or units, which may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本公开各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个处理器可执行的非易失的计算机可读取存储介质中。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-OnlyMemory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The functions, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a processor-executable non-volatile computer-readable storage medium. Based on such understanding, the technical solutions of the present disclosure can be embodied in the form of software products in essence, or the parts that contribute to the prior art or the parts of the technical solutions. The computer software products are stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes.
最后应说明的是:以上所述实施例,仅为本公开的具体实施方式,用以说明本公开的技术方案,而非对其限制,本公开的保护范围并不局限于此,尽管参照前述实施例对本公开进行了详细的说明,本领域的普通技术人员应当理解:任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,其依然可以对前述实施例所记载的技术方案进行修改或可轻易想到变化,或者对其中部分技术特征进行等同替换;而这些修改、变化或者替换,并不使相应技术方案的本质脱离本公开实施例技术方案的精神和范围,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以所述权利要求的保护范围为准。Finally, it should be noted that the above-mentioned embodiments are only specific implementations of the present disclosure, and are used to illustrate the technical solutions of the present disclosure rather than limit them. The protection scope of the present disclosure is not limited thereto, although referring to the foregoing The embodiments describe the present disclosure in detail, and those skilled in the art should understand that: any person skilled in the art can still modify the technical solutions described in the foregoing embodiments within the technical scope disclosed by the present disclosure. Changes can be easily thought of, or equivalent replacements are made to some of the technical features; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be covered in the present disclosure. within the scope of protection. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims (14)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210423445.5A CN114602167A (en) | 2022-04-21 | 2022-04-21 | Interaction method and device based on augmented reality |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210423445.5A CN114602167A (en) | 2022-04-21 | 2022-04-21 | Interaction method and device based on augmented reality |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114602167A true CN114602167A (en) | 2022-06-10 |
Family
ID=81870121
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210423445.5A Pending CN114602167A (en) | 2022-04-21 | 2022-04-21 | Interaction method and device based on augmented reality |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114602167A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115657857A (en) * | 2022-11-11 | 2023-01-31 | 北京字跳网络技术有限公司 | An information processing method and device |
CN117085315A (en) * | 2023-07-25 | 2023-11-21 | 北京维艾狄尔信息科技有限公司 | AR interactive game method, system and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130286004A1 (en) * | 2012-04-27 | 2013-10-31 | Daniel J. McCulloch | Displaying a collision between real and virtual objects |
KR20180062328A (en) * | 2016-11-15 | 2018-06-08 | 모테가 이노베이티브 인크 | Method of providing electrical dart service using augmented reality type HMD, Computer program for the same, and Recording medium storing computer program for the same |
KR102117238B1 (en) * | 2019-01-17 | 2020-06-01 | 주식회사 비전소프트 | Apparatus for Making Motion Picture Contents in Sporting Relay Broadcast using AI and AR |
US20200263957A1 (en) * | 2013-05-09 | 2020-08-20 | Shooting Simulator, Llc | System and method for marksmanship training |
CN112295220A (en) * | 2020-10-29 | 2021-02-02 | 北京字节跳动网络技术有限公司 | AR game control method, AR game control device, electronic equipment and storage medium |
-
2022
- 2022-04-21 CN CN202210423445.5A patent/CN114602167A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130286004A1 (en) * | 2012-04-27 | 2013-10-31 | Daniel J. McCulloch | Displaying a collision between real and virtual objects |
US20200263957A1 (en) * | 2013-05-09 | 2020-08-20 | Shooting Simulator, Llc | System and method for marksmanship training |
KR20180062328A (en) * | 2016-11-15 | 2018-06-08 | 모테가 이노베이티브 인크 | Method of providing electrical dart service using augmented reality type HMD, Computer program for the same, and Recording medium storing computer program for the same |
KR102117238B1 (en) * | 2019-01-17 | 2020-06-01 | 주식회사 비전소프트 | Apparatus for Making Motion Picture Contents in Sporting Relay Broadcast using AI and AR |
CN112295220A (en) * | 2020-10-29 | 2021-02-02 | 北京字节跳动网络技术有限公司 | AR game control method, AR game control device, electronic equipment and storage medium |
Non-Patent Citations (2)
Title |
---|
"超级课代表 三年一班套圈比赛,没想到小舞竟然套...", pages 0 - 17, Retrieved from the Internet <URL:https://v.douyin.com/iPntmgKX/ MWm:/ 03/14 S@L.wS> * |
胡晓琛;邓冰;: "增强现实辅助设计在虚拟互动中的应用研究", 创意设计源, no. 02, 20 March 2015 (2015-03-20) * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115657857A (en) * | 2022-11-11 | 2023-01-31 | 北京字跳网络技术有限公司 | An information processing method and device |
CN117085315A (en) * | 2023-07-25 | 2023-11-21 | 北京维艾狄尔信息科技有限公司 | AR interactive game method, system and storage medium |
CN117085315B (en) * | 2023-07-25 | 2024-06-25 | 北京维艾狄尔信息科技有限公司 | AR interactive game method, system and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109966738B (en) | Information processing method, processing device, electronic device, and storage medium | |
CA2621191C (en) | Interactivity via mobile image recognition | |
US9076077B2 (en) | Interactivity via mobile image recognition | |
US8130242B2 (en) | Interactivity via mobile image recognition | |
JP5887458B1 (en) | A game system for searching for a route of a non-player character based on a player's movement history | |
CN112121430B (en) | Information display method, device, equipment and storage medium in virtual scene | |
CN111957032A (en) | Game role control method, device, equipment and storage medium | |
US8957858B2 (en) | Multi-platform motion-based computer interactions | |
US20120154438A1 (en) | Interactivity Via Mobile Image Recognition | |
CN106383587A (en) | Augmented reality scene generation method, device and equipment | |
JP2022505998A (en) | Augmented reality data presentation methods, devices, electronic devices and storage media | |
JP7407494B1 (en) | Training system, method, and device using XR content | |
CN112870702B (en) | Recommendation method, device and equipment for road resources in virtual scene and storage medium | |
CN114602167A (en) | Interaction method and device based on augmented reality | |
KR20110110379A (en) | Card game system using camera | |
JP2015156131A (en) | Information processing apparatus and information processing method | |
CN112891940A (en) | Image data processing method and device, storage medium and computer equipment | |
CN113359983A (en) | Augmented reality data presentation method and device, electronic equipment and storage medium | |
CN113559510B (en) | Control methods, devices, equipment and computer-readable storage media for virtual skills | |
KR20170013539A (en) | Augmented reality based game system and method | |
CN111569414A (en) | Flight display method and device of virtual aircraft, electronic equipment and storage medium | |
CN109417651A (en) | Generate challenges using the location-based gaming companion app | |
CN111651048A (en) | Multi-virtual object arrangement display method and device, electronic equipment and storage medium | |
CN111625103A (en) | Sculpture display method and device, electronic equipment and storage medium | |
KR100607046B1 (en) | Sensory game image processing method and game method using the same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |