WO2022041514A1 - Virtual object display method, apparatus and device, computer program and medium - Google Patents

Virtual object display method, apparatus and device, computer program and medium Download PDF

Info

Publication number
WO2022041514A1
WO2022041514A1 PCT/CN2020/130800 CN2020130800W WO2022041514A1 WO 2022041514 A1 WO2022041514 A1 WO 2022041514A1 CN 2020130800 W CN2020130800 W CN 2020130800W WO 2022041514 A1 WO2022041514 A1 WO 2022041514A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual camera
virtual
virtual object
motion
touch command
Prior art date
Application number
PCT/CN2020/130800
Other languages
French (fr)
Chinese (zh)
Inventor
陈瑽
裴萌
李嘉乐
房本旭
张峰
田吉亮
庄涛
徐丹
Original Assignee
北京完美赤金科技有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 北京完美赤金科技有限公司 filed Critical 北京完美赤金科技有限公司
Publication of WO2022041514A1 publication Critical patent/WO2022041514A1/en

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/40Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment
    • A63F13/42Processing 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures

Definitions

  • the present invention relates to the field of image technology, and in particular, to a method, apparatus, device, computer program, and medium for displaying virtual objects.
  • the virtual object includes various scene resources in the virtual scene.
  • the virtual objects are, for example, virtual characters and props. Taking the virtual character in the game as an example, the player will select the virtual character and participate in the game by controlling the behavior of the virtual character. Therefore, virtual characters are not only an important carrier for players to participate in the game, but also an important tool for game producers to attract players.
  • players can view the appearance and character settings of each avatar in the avatar display interface.
  • the player In the virtual character display interface, the player generally controls the virtual character to perform single-axis rotation by touching the screen, or performs a zoom operation on the virtual character, so as to view the appearance details of the virtual character.
  • the single viewing angle provided to the player by this viewing method the details of the appearance of the virtual character that can be displayed are limited, and it is difficult to meet the player's observation needs for the virtual character.
  • Embodiments of the present invention provide a method, apparatus, device, computer program, and medium for displaying virtual objects, which are used to display virtual objects from multiple angles in a set three-dimensional space to improve user viewing experience.
  • an embodiment of the present invention provides a method for displaying a virtual object.
  • the method is applied to a graphical interface.
  • the graphical interface is loaded with a virtual object and a virtual camera.
  • the virtual camera is used to collect a display image of the virtual object.
  • the virtual camera In response to the touch command on the graphical interface, the virtual camera is controlled to move in the set three-dimensional space according to the touch command and the motion authority, so as to adjust the displayed image of the virtual object.
  • an embodiment of the present invention provides a device for displaying virtual objects.
  • the device is applied to a graphical interface, where a virtual object and a virtual camera are loaded in the graphical interface, and the virtual camera is used to collect a display image of the virtual object.
  • the device include:
  • a first determining module for determining relative position information between the virtual camera and the virtual object
  • a second determining module configured to determine the motion authority of the virtual camera based on the relative position information
  • the control module is used to control the virtual camera to move in the set three-dimensional space according to the touch command and the motion authority in response to the touch command on the graphical interface, so as to adjust the displayed image of the virtual object.
  • an embodiment of the present invention provides an electronic device, which includes a processor and a memory, wherein executable code is stored on the memory, and when the executable code is executed by the processor, the The processor may at least implement the method for displaying virtual objects in the first aspect.
  • An embodiment of the present invention provides a non-transitory machine-readable storage medium, where executable codes are stored on the non-transitory machine-readable storage medium, and when the executable codes are executed by a processor of an electronic device, the The processor may at least implement the method for displaying virtual objects in the first aspect.
  • An embodiment of the present invention further provides a system, including a processor and a memory, wherein the memory stores at least one instruction, at least one piece of program, code set or instruction set, the at least one instruction, at least one piece of program, code set or The instruction set is loaded and executed by the processor to implement the above-described method for displaying a virtual object.
  • Embodiments of the present invention further provide a computer-readable medium on which is stored at least one instruction, at least one piece of program, code set or instruction set, where the at least one instruction, at least one piece of program, code set or instruction set is stored by a processor Loaded and executed to implement the above-described presentation method of a virtual object.
  • the graphic interface is loaded with a virtual object and a virtual camera, and the virtual camera is used to collect a display image of the virtual object in the graphic interface.
  • the motion permission represents the authorized motion mode of the virtual camera in the set three-dimensional space. For example, if the motion permission of the virtual camera includes the vertical motion permission, The virtual camera can move longitudinally in the set three-dimensional space.
  • the virtual camera is controlled to move in the set three-dimensional space according to the touch command and the motion permission, so that the position of the virtual camera in the set three-dimensional space can be changed through the touch command.
  • the technical solution controls the virtual camera to move according to the touch command and the motion authority in the set three-dimensional space, so as to display the virtual object from multiple angles in the set three-dimensional space, which not only provides the user with a richer viewing angle, but also By setting the three-dimensional space and motion permissions, the abnormal display of virtual objects in certain perspectives is avoided, and the user experience is improved.
  • FIG. 1 is a flowchart of a method for displaying virtual objects according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a virtual object according to an embodiment of the present invention.
  • 3 to 7 are schematic schematic diagrams of a display process of a virtual object according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of a graphical interface provided by an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of another graphical interface provided by an embodiment of the present invention.
  • FIG. 10 is a schematic diagram of another virtual object provided by an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of a device for displaying virtual objects according to an embodiment of the present invention.
  • FIG. 12 is a schematic structural diagram of an electronic device corresponding to the virtual object display apparatus provided by the embodiment shown in FIG. 11;
  • FIG. 13 is a schematic diagram of a server according to an embodiment of the present invention.
  • FIG. 14 is a schematic diagram of a storage unit corresponding to the server provided by the embodiment shown in FIG. 13 .
  • the words “if”, “if” as used herein may be interpreted as “at” or “when” or “in response to determining” or “in response to detecting”.
  • the phrases “if determined” or “if detected (the stated condition or event)” can be interpreted as “when determined” or “in response to determining” or “when detected (the stated condition or event),” depending on the context )” or “in response to detection (a stated condition or event)”.
  • the display solution of the virtual object provided by the embodiment of the present invention may be executed by an electronic device, and the electronic device may be a terminal device such as a smart phone, a tablet computer, a PC, and a notebook computer.
  • a service program for executing a presentation scheme of a virtual object may be installed on the electronic device.
  • the service program is, for example, a game client, a three-dimensional scene editor, and a game editor.
  • the display solution for virtual objects provided by the embodiments of the present invention is suitable for display scenarios of various virtual objects.
  • the virtual objects are, for example, virtual characters and props.
  • the display scene of the virtual character may be the virtual character display interface that the player sees after entering the game.
  • the display scene of the virtual character may also be the item display interface called up when the player intends to view the game item during the game.
  • FIG. 1 is a flowchart of a method for displaying virtual objects according to an embodiment of the present invention. As shown in Figure 1, the method includes the following steps:
  • control the virtual camera In response to the touch command on the graphical interface, control the virtual camera to move in the set three-dimensional space according to the touch command and the motion authority, so as to adjust the displayed image of the virtual object.
  • the method for displaying virtual objects in the embodiment of the present invention is applied to a graphical interface, such as a virtual character display interface loaded in a service program.
  • the graphical interface is loaded with virtual objects.
  • the virtual object is in three-dimensional space.
  • a virtual camera In order to display the posture of the virtual object in the three-dimensional space, a virtual camera needs to be loaded in the graphical interface, and the virtual camera is used to collect the display image of the virtual object.
  • the viewing angle of the virtual camera represents the viewing angle of the user using the graphical interface for the virtual object. Therefore, adjusting the position of the virtual camera in the three-dimensional space is to change the user's viewing angle of the virtual object and adjust the viewing angle of the virtual object. Display image of the object.
  • the virtual camera is also called a virtual camera and a game camera
  • the viewing angle of the virtual camera is also called a cropping area of the virtual camera, which is not limited in the embodiment of the present invention.
  • the motion authority of the virtual camera is determined based on the relative position information of the virtual camera and the virtual object.
  • the virtual character if the virtual character can be observed in any direction in the three-dimensional space, it may cause the display of the virtual character to be abnormal, such as the observation angle penetrates into the virtual character's model. Or the viewing angle points to indecent parts of the avatar.
  • the motion range of the virtual camera is limited to the set three-dimensional space, and permissions are set for the movement of the virtual camera in the set three-dimensional space.
  • the motion permission represents the authorized motion mode of the virtual camera in the set three-dimensional space.
  • the motion permission of the virtual camera includes but is limited to the permission to move in all directions and the permission to zoom. In essence, the permission to move in all directions means that the virtual camera is authorized to move in all directions.
  • Each direction can be preset based on the pose of the virtual object in the three-dimensional space. For example, if the motion permission of the virtual camera includes longitudinal motion permission, the virtual camera can perform longitudinal motion in the longitudinal direction of the set three-dimensional space, such as moving up along the longitudinal axis, or moving down along the longitudinal axis. .
  • the distance between the virtual camera and the virtual object is relatively close.
  • the relative position information of the virtual camera and the virtual object includes the distance from the virtual camera to the virtual object.
  • the motion permission of the virtual camera is determined based on the relative position information of the virtual camera and the virtual object, which can be implemented as:
  • the movement authority of the virtual camera includes the first direction movement authority and the second direction movement authority, wherein the first direction and the second direction are based on the posture of the virtual object in the three-dimensional space pre-setting.
  • the virtual camera may be authorized to perform movement in the first direction and movement in the second direction, that is, it is determined that the movement authority of the virtual camera includes the movement authority in the first direction and the movement authority in the second direction.
  • the virtual camera in order to prevent the viewing angle of the virtual camera from penetrating into the model of the virtual object or other abnormal conditions, the virtual camera is not authorized to perform zooming motion, that is, the virtual camera is not granted the zooming motion permission.
  • the zooming motion includes a motion for zooming out a virtual object and a motion for zooming in on the virtual object.
  • the virtual object is the virtual character shown in FIG. 2 .
  • the posture of the avatar in the three-dimensional space is standing on the ground.
  • the first direction is set as the vertical axis direction shown in FIG. 2
  • the second direction is set as the direction shown in FIG. 2 .
  • the motion permission of the virtual camera includes the vertical motion permission and the lateral motion permission.
  • the longitudinal motion permission means that the virtual camera is authorized to move up or down along the longitudinal axis.
  • the lateral motion permission means that the virtual camera is authorized to move clockwise around the virtual character along the horizontal axis direction, and the virtual camera is authorized to move counterclockwise around the virtual character along the horizontal axis direction.
  • 103 in response to the touch command on the graphical interface, the virtual camera is controlled to move according to the touch command and the motion permission in the set three-dimensional space.
  • 103 can be implemented as:
  • the movement track of the touch command is obtained; according to the movement track and motion authority of the touch command, the first motion path of the virtual camera on the first curved surface boundary is determined; the virtual camera is controlled on the first motion path exercise on.
  • the setting of the three-dimensional space includes a curved surface boundary surrounding the virtual object, and the distance between the curved surface boundary and the virtual object is less than or equal to a first threshold.
  • this surface boundary is referred to herein as the first surface boundary.
  • the virtual object includes a plurality of reference points.
  • the plurality of reference points are referred to herein as first reference points.
  • the first reference point may be located on the surface of the model of the virtual object, or may be located inside the model of the virtual object.
  • the first curved surface boundary includes a plurality of first circular orbits and a plurality of first curves passing through the plurality of first circular orbits, and each of the first circular orbits respectively uses a corresponding first reference point among the plurality of first reference points as a center.
  • the first surface boundary includes a set closest distance to the virtual object in the three-dimensional space.
  • the first reference point may be called a viewpoint, and multiple viewpoints may be set according to the visual feature information of the virtual object.
  • the radius of each first circular track is set according to visual feature information of the virtual object, such as size information.
  • the radius of each of the first circular orbits may be the same or different.
  • the first curved boundary further includes a plurality of curves connected between the plurality of first circular tracks. For the purpose of distinguishing these curves are referred to herein as the first curve.
  • the plurality of first curves can be obtained by performing interpolation operations on the radii of the plurality of first circular trajectories.
  • determining the first movement path of the virtual camera on the boundary of the first curved surface according to the movement track of the touch command and the movement authority can be implemented as follows:
  • the motion authority includes the first direction motion authority
  • the first curve passing through the position of the virtual camera is selected from the plurality of first curves as the first motion path, wherein , the starting point of the first motion path is the position of the virtual camera.
  • the virtual object is the virtual character shown in FIG. 3 .
  • the posture of the avatar in the three-dimensional space is standing on the ground, and the first direction is set as the vertical axis direction shown in FIG. 3 based on the posture of the avatar.
  • the graphical interface is the interface in the game client.
  • the motion rights include longitudinal motion rights.
  • the plurality of first curves include L1 and L2 as shown in FIG. 3 .
  • the virtual camera is located at point d on L1.
  • the movement track of the touch point is acquired. If the direction of the movement track of the touch point is upward or downward along the longitudinal axis, the first curve L1 passing through point d is selected from the plurality of first curves as the first motion path, wherein the first motion path is The starting point is point d.
  • the virtual camera is controlled to start from point d and move along L1 to the first circular track r1 .
  • the optical axis of the virtual camera points to the center of the first circular track r1, that is, point a.
  • the virtual camera is controlled to start from point d and move along L1 to the first circular track r2 or r3.
  • the optical axis of the virtual camera points to the center of the first circular track r2, that is, point b; the virtual camera passes through the first circular track r2 to the first circular track r2.
  • the optical axis of the virtual camera is switched from point b to the center of the first circular track r3, that is, point c.
  • determining the first movement path of the virtual camera on the boundary of the first curved surface according to the movement track of the touch command and the movement authority can be implemented as follows:
  • the direction of the movement track of the touch command is the second direction
  • the motion permission includes the permission to move in the second direction
  • the first circular track i where the virtual camera is located among the plurality of first circular tracks is used as the first motion path
  • the second direction is parallel to the plane of the first circular orbit i.
  • the virtual object is the virtual character shown in FIG. 4 .
  • the posture of the avatar in the three-dimensional space is standing on the ground, and the second direction is set as the horizontal axis direction shown in FIG. 4 based on the posture of the avatar.
  • the graphical interface is the interface in the game client.
  • the movement rights include lateral movement rights.
  • the position of the virtual camera is point e on the first circular track r2.
  • the movement track of the touch point is acquired. If the direction of the movement track of the touch point is the horizontal axis direction, the first circular track r2 where the virtual camera is located among the plurality of first circular tracks is used as the first motion path, and the plane where the first circular track r2 is located is used as the first motion path. parallel to the horizontal axis.
  • the virtual camera is controlled to start from point e and move clockwise along the first circular track r2.
  • the optical axis of the virtual camera points to the center of the first circular track r2, that is, point b.
  • the angle to be rotated by the clockwise movement can be set according to the distance that the touch point moves along the horizontal axis.
  • the virtual camera is controlled to start from point e and move counterclockwise along the first circular track r2.
  • the optical axis of the virtual camera points to the center of the first circular track r2, that is, point b.
  • the angle to be rotated by the counterclockwise movement can be set according to the distance that the touch point moves along the horizontal axis.
  • the virtual object can be observed on the boundary of the first curved surface.
  • the visual feature information of the virtual object is different, and the shape of the first curved surface boundary constructed based on the visual feature information of the virtual object is also different.
  • the shape of the boundary of the first curved surface can be adjusted by adjusting the position of the first reference point in the three-dimensional space, the parameters of the first circular orbit, and the parameters of the first curve. Adjustment.
  • determining the motion permission of the virtual camera based on the relative position information of the virtual camera and the virtual object may be implemented as:
  • the motion permission of the virtual camera includes the first direction motion permission, the second direction motion permission and the zooming motion permission .
  • the second threshold is greater than the first threshold.
  • the first direction and the second direction may also be preset according to the pose of the virtual object in the three-dimensional space.
  • the direction of the zooming motion is perpendicular to the first direction and the second direction.
  • the virtual camera may be authorized to perform movement rights in various directions, such as the first-direction movement rights and the second-direction movement rights.
  • the virtual camera can also be granted zoom motion permission.
  • the zooming motion includes a zooming-in motion of the virtual object and a zooming-in motion of the virtual object, and thus, the direction of the zooming motion is usually toward the virtual character or away from the virtual character.
  • towards the virtual character is the direction of the virtual camera towards the virtual object
  • away from the virtual character is the direction of the virtual camera away from the virtual object.
  • the movement of enlarging the virtual object is the movement of the virtual camera in the direction of the virtual object
  • the movement of reducing the virtual object is the movement of the virtual camera in the direction away from the virtual object.
  • the virtual object is the virtual character shown in FIG. 5 .
  • the posture of the avatar in the three-dimensional space is standing on the ground.
  • the first direction is set as the vertical axis direction shown in FIG. 5
  • the second direction is set as the direction shown in FIG. 5 .
  • Horizontal axis direction If the distance between the virtual camera and the virtual object is greater than the first threshold, it is determined that the motion permission of the virtual camera includes vertical motion permission, lateral motion permission and zoom motion permission.
  • the meanings of the vertical movement permission and the horizontal movement permission are similar to those described above, and will not be repeated here.
  • the zoom motion permission means that the virtual camera is authorized to move toward the virtual object, and the virtual camera is authorized to move away from the virtual object.
  • the position of the virtual camera is the point f shown in FIG. 6 .
  • the virtual camera moves in the direction of the virtual object: the virtual camera starts from point f and moves toward point b, wherein the moving direction of the virtual camera is shown by the arrow in FIG. 6 .
  • the virtual camera in response to the touch command on the graphical interface, is controlled to perform the motion according to the touch command and the motion permission in the set three-dimensional space.
  • movement which can be implemented as:
  • the movement track of the touch command is obtained; according to the movement track of the touch command and the motion authority, the second movement path of the virtual camera is determined, wherein the second movement path is on the boundary of the second curved surface, or The second motion path is in the three-dimensional space area; the virtual camera is controlled to move on the second motion path.
  • the setting of the three-dimensional space includes a first curved surface boundary and a second curved surface boundary surrounding the virtual object, and a three-dimensional space region between the second curved surface boundary and the first curved surface boundary.
  • the first curved surface boundary is set inside the second curved surface boundary.
  • the inner side is the side where the virtual object is located. That is to say, the distance from the first curved boundary to the virtual object is less than or equal to the first threshold, the distance from the second curved boundary to the virtual object is greater than the first threshold, and the distance from the second curved boundary to the virtual object is less than or equal to the second threshold, The second threshold is greater than the first threshold.
  • the first curved surface boundary and the second curved surface boundary are respectively two barrel-shaped structures, and the barrel-shaped structure corresponding to the first curved surface boundary is provided inside the barrel-shaped structure corresponding to the second curved surface boundary.
  • the two barrel-shaped structures and the three-dimensional space area located in the middle of the two barrel-shaped structures can form a set three-dimensional space.
  • the shape of the set three-dimensional space is determined by the visual feature information of the virtual object.
  • the height of the three-dimensional space can be determined by the height of the virtual object.
  • the virtual object includes a plurality of reference points.
  • these reference points are referred to herein as second reference points.
  • the second reference point may be located on the surface of the model of the virtual object or inside the model of the virtual object.
  • the second curved surface boundary includes a plurality of second circular orbits and a plurality of second curves passing through the plurality of second circular orbits. as a center.
  • the second surface boundary includes setting the furthest distance from the virtual object in the three-dimensional space.
  • the centers of the first circular orbit and the second circular orbit in the same plane may be the same or different, which is not limited here. That is to say, the multiple first reference points and the multiple second reference points may or may not overlap.
  • the second reference point may also be referred to as a viewpoint, and the setting rules are similar to the above, and will not be expanded here.
  • the difference between the two viewpoints lies in the surface boundaries targeted by the two viewpoints.
  • the radius of each second circular track is set according to visual feature information of the virtual object, such as size information.
  • the radius of each second circular orbit may be the same or different.
  • the second curved surface boundary further includes a plurality of curves connected between the plurality of second circular tracks. To distinguish these curves are referred to herein as second curves.
  • the plurality of second curves may be obtained by interpolating the radii of the plurality of second circular orbits.
  • the virtual character shown in FIG. 5 includes three points a, b, and c, and the three points a, b, and c of the virtual character are used as the second reference points.
  • the orbit radii r11, r22, and r33 corresponding to the three points a, b, and c, respectively, are obtained, as shown in Figure 5.
  • a second curved surface boundary is established.
  • the first curved boundary is not shown in FIG. 5 .
  • FIG. 6 shows the first circular orbit r2 in the first curved boundary and the second circular orbit r22 in the second curved boundary.
  • the center of the second circular orbit that is on the same plane as the first circular orbit r2 is also point b.
  • the second curved surface boundary includes a second circular orbit r22, the center of the second circular orbit r22 is point b, and the radius is r22, where r22 is greater than r2.
  • the second motion path of the virtual camera is determined according to the movement trajectory of the touch command and the motion authority, which can be implemented as:
  • the second curve passing through the position of the virtual camera is selected from the plurality of second curves as the second motion path, wherein , and the starting point of the second motion path is the position of the virtual camera.
  • the virtual object is the virtual character shown in FIG. 5 .
  • the posture of the avatar in the three-dimensional space is standing on the ground, and the first direction is set as the vertical axis direction shown in FIG. 5 based on the posture of the avatar.
  • the graphical interface is the interface in the game client.
  • the motion rights include longitudinal motion rights.
  • the plurality of second curves include L3 and L4 as shown in FIG. 5 .
  • the virtual camera is located at point f on L3.
  • the movement track of the touch point is acquired. If the direction of the movement track of the touch point is upward or downward along the longitudinal axis, the second curve L3 passing through point f is selected from the plurality of second curves as the second motion path, wherein the second motion path is The starting point is point f. If the direction of the movement track of the touch point is upward along the vertical axis, the virtual camera is controlled to start from point d and move toward the second circular track r11 along L3.
  • the point of the optical axis of the virtual camera is switched from point b of the center of the second circular track r22 to the center of the second circular track r11 , that is, point a. If the direction of the movement track of the touch point is downward along the longitudinal axis, the virtual camera is controlled to move from point f to the second circular track r33 along L3. In this case, when the virtual camera moves to the second circular track r33, the optical axis of the virtual camera is switched from point b to the center of the second circular track r33, that is, point c.
  • the second motion path of the virtual camera is determined according to the movement track of the touch command and the motion authority, which may be implemented as follows:
  • the motion permission includes the permission to move in the second direction
  • the second circular track i where the virtual camera is located in the plurality of second circular tracks is used as the second motion path , wherein the second direction is parallel to the plane of the second circular orbit i.
  • the virtual object is the virtual character shown in FIG. 5 .
  • the posture of the avatar in the three-dimensional space is standing on the ground, and the second direction is set as the horizontal axis direction shown in FIG. 5 based on the posture of the avatar.
  • the graphical interface is the interface in the game client.
  • the movement rights include lateral movement rights.
  • the position of the virtual camera is point f on the second circular track r22.
  • the movement track of the touch point is acquired. If the direction of the movement track of the touch point is the horizontal axis direction, the second circular track r22 where the virtual camera is located among the plurality of second circular tracks is used as the second motion path, and the plane where the second circular track r22 is located is used as the second motion path. parallel to the horizontal axis. If the direction of the movement track of the touch point is to the left along the horizontal axis, the virtual camera is controlled to start from point f and move clockwise along the second circular track r22. Optionally, in this case, the optical axis of the virtual camera points to the center of the second circular track r22, that is, point b.
  • the angle to be rotated by the clockwise movement can be set according to the distance that the touch point moves along the horizontal axis.
  • the virtual camera is controlled to start from point f and move counterclockwise along the second circular track r22.
  • the angle to be rotated by the counterclockwise movement can be set according to the distance that the touch point moves along the horizontal axis.
  • the virtual camera in addition to performing horizontal and vertical motions according to the motion rules shown in the above two embodiments, in practical applications, can also be in the three-dimensional space area between the first curved surface boundary and the second curved surface boundary. Exercise.
  • the motion rules of the virtual camera in the three-dimensional space area are described below with reference to specific embodiments:
  • the second motion path of the virtual camera is determined according to the movement track of the touch command and the motion authority, including:
  • the second movement path of the virtual camera in the three-dimensional space area is determined based on the location of the virtual camera and the movement directions of the multiple tracks .
  • the movement track of the touch command includes multiple tracks formed by multiple touch points.
  • the direction of the movement track of the touch command includes multiple directions, which essentially means that the directions of the multiple tracks are different.
  • the virtual camera can also perform horizontal and vertical motion in the three-dimensional space area, and the specific rules are similar to the horizontal and vertical motion rules described above, which will not be expanded here for the time being.
  • the posture of the avatar in the three-dimensional space is standing on the ground, and the first direction is set as shown in FIG. 5 based on the posture of the avatar.
  • the second direction is the horizontal axis direction shown in FIG. 5 based on the posture of the avatar.
  • the graphical interface is the interface in the game client.
  • the motion permission includes the zoom motion permission.
  • the plurality of second curves include L3 and L4 as shown in FIG. 5 .
  • the position of the virtual camera is point f on the second circular track r22.
  • the movement trajectories of these touch points are acquired. If the directions of the multiple moving trajectories corresponding to these touch points are different, the second moving path of the virtual camera in the three-dimensional space region is determined based on the position of the virtual camera, that is, point f and the moving directions of the multiple trajectories.
  • the graphical interface is the interface 700 shown in FIG. 7 .
  • the touch points include m1 and m2.
  • the direction of the movement trajectory formed by m1 is opposite to the direction of the movement trajectory formed by m2, and according to these movement trajectories, it can be determined that the user's operation is: sliding both hands outward.
  • the virtual object p in FIG. 7 is the virtual character in FIG. 5 . It is assumed that the virtual object p needs to be enlarged when the user slides both hands outward.
  • the correspondence between user operations and zooming motions may be acquired in advance. For example, sliding inwards of the user's hands corresponds to zooming out of the virtual object, and sliding the user's hands outwards corresponds to zooming in on the virtual object.
  • the zoom factor is set according to the movement track of the touch point.
  • the line segment fn determined based on point f and point n is used as the second motion path. That is, the virtual camera is controlled to start from point f and move along the line segment fn in the three-dimensional space area to point b, which is the common center of the second circular orbit r22 and the first circular orbit r2.
  • point b which is the common center of the second circular orbit r22 and the first circular orbit r2.
  • the motion parameter when the virtual camera performs the zooming motion may be calculated by adopting the proportional difference value. That is, the virtual camera is used to obtain corresponding points from the boundary of the first curved surface and the boundary of the second curved surface, so as to determine the motion parameters of the virtual camera during zooming motion based on the position of the corresponding point and the display ratio of the corresponding point, such as the zoom ratio and the motion speed. Wait.
  • each second reference point of the virtual object will also move as the virtual object is zoomed.
  • the distance between the virtual camera and the virtual object gradually decreases.
  • the size of the virtual object gradually increases, and the distance between the second reference points also gradually increases.
  • the distance between the virtual camera and the virtual object gradually increases.
  • the size of the virtual object gradually decreases, and the distance between the second reference points also gradually decreases. little.
  • the second reference points are gradually dispersed; as the virtual camera moves from the first surface boundary to the second surface boundary, the second reference points gradually gather.
  • the second reference points are gathered into one second reference point.
  • the longitudinal distances of the three second reference points a, b, and c are not necessarily as shown in FIG. 5 .
  • the longitudinal distance of each second reference point may vary with the distance between the virtual camera and the virtual object.
  • the corresponding relationship between the zoom factor and the plurality of second reference points may also be acquired in advance.
  • the virtual object p when the virtual camera moves from point f to point b, in the interface 700 , the virtual object p is gradually enlarged as the virtual camera moves.
  • the longitudinal distances of the three second reference points a, b, and c gradually increase according to the corresponding relationship between the zoom factor and the plurality of second reference points.
  • the virtual object p gradually shrinks as the virtual camera moves.
  • the longitudinal distances of the three second reference points a, b, and c gradually decrease according to the corresponding relationship between the zoom factor and the plurality of second reference points.
  • the zoom factor is determined by the distance between the virtual camera and the virtual object.
  • the virtual object can be observed from multiple angles on the boundary of the second curved surface and in the three-dimensional space region between the boundary of the first curved surface and the boundary of the second curved surface.
  • the visual feature information of the virtual object is different, and the shape of the second curved surface boundary constructed based on the visual feature information of the virtual object is also different.
  • the shape of the boundary of the second curved surface can be adjusted. make adjustments.
  • parameters of each reference point and each circular track can be set in the editor shown in FIG. 8 .
  • the parameters to be set include the binding mode (Binding Mode), the spline curve curvature (Spline Curvature), the radius and height of each circular track.
  • Binding Mode the binding mode
  • Spline Curvature the spline curve curvature
  • TopRig, MiddleRig, and BottomRig correspond to the parameter setting options of the upper, middle, and lower circular tracks, respectively.
  • the follow option is used to set the parameters corresponding to the reference point
  • the Freelook option is used to set the pivot point in the three-dimensional space (that is, the moving point where the virtual camera moves in the three-dimensional space).
  • the curved surface boundary may also include orbits of other shapes, such as elliptical orbits, which are not limited in this embodiment of the present invention.
  • the curved boundary shown in Figure 10 includes two elliptical orbits and three circular orbits.
  • the display method of virtual objects is applied to a graphical interface, and virtual objects are loaded in the graphical interface.
  • the virtual object is in three-dimensional space.
  • a virtual camera needs to be loaded to collect a display image of the virtual object.
  • the viewing angle of the virtual camera needs to be limited. Simply put, it is necessary to limit the position and viewing angle of the virtual camera. Similar to the above, the three-dimensional space in which the virtual camera can move is the set three-dimensional space.
  • One of the setting methods for setting the 3D space can be:
  • a first range bucket corresponding to the virtual camera is set, and the first range bucket includes three pivot points.
  • three viewpoints on the virtual object are set.
  • the three viewpoints may be located at the neck, waist, and knee of the virtual character, respectively.
  • this viewpoint is called the first viewpoint.
  • the moving points of the virtual camera are set based on the three first viewpoints, that is, the three axis points corresponding to the three first viewpoints.
  • this pivot point is called the first pivot point.
  • the distance between the first axis point and the corresponding first viewpoint is greater than or equal to a preset distance.
  • this range bucket is called the first range bucket.
  • the motion permission of the virtual camera is determined based on the relative position information in 102, which can also be specifically implemented as:
  • the set three-dimensional space includes a first range bucket surrounding the virtual object, and the distance from the first range bucket to the virtual object is a first threshold.
  • the virtual object includes a plurality of first viewpoints. It is assumed that the multiple first viewpoints correspond one-to-one with the multiple first axis points in the first range bucket. And it is assumed that the first range bucket is composed of multiple first circular trajectories calculated by interpolation of multiple first axis points.
  • the virtual camera in response to the touch command on the graphical interface, the virtual camera is controlled to move in the set three-dimensional space according to the touch command and the motion authority, which can also be specifically implemented as:
  • the movement track of the touch command is obtained; according to the movement track of the touch command and the first motion authority, the virtual camera is controlled to move in the first range bucket.
  • the optical axis of the virtual camera points from the first axis point where the virtual camera is located to the first viewpoint corresponding to the first axis point.
  • the virtual camera can move between the first pivot points and the interpolation points corresponding to the first pivot points.
  • the movement direction of the virtual camera in the first range bucket includes vertical direction, horizontal direction, and any direction superimposed between horizontal and vertical direction.
  • the optical axis of the virtual camera always points from the first axis point to the first viewpoint corresponding to the first axis point.
  • the movement process of the virtual camera in the bucket of the first range is, for example, assuming that the circular trajectory formed by the first axis point is parallel to the ground. It is assumed that the first axis points include x, y, and z, and the corresponding first viewpoints are x', y', and z'. Suppose the virtual camera is at the first axis point x. Based on the above assumptions, when the virtual camera moves laterally, the virtual camera moves around the virtual object along the circular trajectory corresponding to the first axis point x, and the optical axis of the virtual camera always points from the first axis point x to the first axis point x. A first viewpoint x' corresponding to an axis point x.
  • the virtual camera moves longitudinally at the interpolation point between the first axis point x and the first axis point y, and the optical axis of the virtual camera points from the interpolation point to the first axis corresponding to the interpolation point.
  • Viewpoint x' (or first viewpoint y').
  • the method of switching the orientation of the optical axis during this longitudinal movement is similar to the method of switching the orientation of the optical axis in the above, and will not be expanded here.
  • a second range bucket corresponding to the virtual camera is set, and the second range bucket includes three axis points.
  • the second viewpoint For distinction, this viewpoint is called the second viewpoint. It can be understood that the second viewpoint may or may not overlap with the first viewpoint.
  • the moving points of the virtual camera are set based on the three second viewpoints, that is, the three axis points corresponding to the three second viewpoints.
  • this pivot point is called the second pivot point.
  • Three corresponding circular trajectories ie, the second circular trajectories above
  • the range buckets corresponding to the virtual camera are formed by these three circular trajectories.
  • this range bucket is called the second range bucket.
  • the distance from the second axis point to the second viewpoint is greater than the distance from the first axis point to the first viewpoint. Therefore, the second range bucket wraps around the outside of the first range bucket, and the first range bucket wraps around the outside of the virtual object.
  • the virtual camera can move between each second axis point and the interpolation point corresponding to each second axis point. It is also possible to move in a three-dimensional space region between the second range bucket and the first range bucket.
  • the movement direction of the virtual camera in the second range bucket also includes the vertical direction, the horizontal direction, and any direction superimposed between the horizontal and vertical directions.
  • the optical axis of the virtual camera always points from the second axis point to the second viewpoint corresponding to the second axis point.
  • the smaller the distance from the virtual camera to the virtual object the larger the plurality of second viewpoints.
  • the virtual camera moves from the second range bucket to the first range bucket, as the relative distance between the virtual camera and the virtual object gradually decreases, it can be observed that the three second viewpoints are gradually separated. If the virtual camera is on the second range bucket, since the relative distance between the virtual camera and the virtual object is the farthest, it can be observed that the distances between the second viewpoints corresponding to the three second axis points are relatively close, for example, three second viewpoints can be observed. aggregate into one point.
  • the optical axis of the virtual camera always points to the corresponding second viewpoint on the virtual object.
  • the size of the virtual object is small, therefore, it will be observed that the distance between the second viewpoints corresponding to the three second axis points in the virtual object is relatively close, or even aggregated into one point; as the relative distance between the virtual camera and the virtual object becomes smaller , the size of the observed virtual object increases.
  • the second viewpoints corresponding to the three second axis points in the virtual object need to be gradually dispersed.
  • the motion permission of the virtual camera is determined based on the relative position information in 102, which can also be specifically implemented as:
  • the motion permission of the virtual camera includes the second motion permission in the second range bucket and the second motion permission in the second range bucket.
  • the second threshold is greater than the first threshold, and the three-dimensional space is set to include a second range bucket and a first range bucket surrounding the virtual object, the distance from the second range bucket to the virtual object is the second threshold, and the first range bucket to the virtual object The distance of the object is the first threshold.
  • the virtual object includes a plurality of second viewpoints. It is assumed that the plurality of second viewpoints correspond one-to-one with the plurality of second axis points in the second range bucket. And it is assumed that the second range bucket is composed of multiple second circular trajectories calculated by interpolation of multiple second axis points.
  • the virtual camera in response to the touch command to the graphical interface, the virtual camera is controlled to move according to the touch command and the motion authority in the set three-dimensional space, which can also be implemented as:
  • the movement track of the touch command is obtained; according to the movement track of the touch command and the second motion permission, the virtual camera is controlled to move in the second range bucket; or the movement track of the touch command and the second movement authority are controlled; Three motion permissions, controlling the virtual camera to move between the second range bucket and the first range bucket.
  • the optical axis of the virtual camera points from the second axis point where the virtual camera is located to the second viewpoint corresponding to the second axis point.
  • two range buckets can be set through six viewpoints and six corresponding pivot points. Therefore, through the movement of the virtual camera on the two range buckets and between the two range buckets, the multi-angle observation of the virtual object is realized. And through the space between the two range buckets and the position of the pivot point, the specified parts of the virtual object from the viewpoint are limited, such as the inner part of the virtual object's skirt and so on.
  • the angle display not only provides users with a richer viewing angle, but also avoids abnormal display of virtual objects from certain perspectives by setting three-dimensional space and motion permissions, improving user experience.
  • FIG. 6 is a schematic structural diagram of an apparatus for displaying virtual objects according to an embodiment of the present invention.
  • the device is applied to a graphical interface, the graphical interface is loaded with a virtual object and a virtual camera, and the virtual camera is used to collect a display image of the virtual object.
  • the display device of the virtual object includes: a first determination Module 11 , a second determination module 12 , and a control module 13 .
  • a first determining module configured to determine relative position information of the virtual camera and the virtual object
  • a second determination module 12 configured to determine the motion authority of the virtual camera based on the relative position information
  • the control module 13 is configured to, in response to a touch command on the graphical interface, control the virtual camera to move in a set three-dimensional space according to the touch command and the motion authority, so as to adjust the display image.
  • the relative position information includes a distance from the virtual camera to the virtual object.
  • the second determining module 12 is specifically configured to: if the distance from the virtual camera to the virtual object is less than a first threshold, determine the virtual camera.
  • the motion authority of the camera includes a first direction motion authority and a second direction motion authority, wherein the first direction and the second direction are preset according to the posture of the virtual object in the three-dimensional space.
  • the setting of the three-dimensional space includes a first curved surface boundary surrounding the virtual object, and a distance from the first curved surface boundary to the virtual object is less than or equal to the first threshold.
  • the control module 13 is specifically configured to: if the touch command is detected, obtain the movement track of the touch command; and determine whether the virtual camera is in operation according to the movement track of the touch command and the motion permission. a first motion path on the boundary of the first curved surface; controlling the virtual camera to move on the first motion path.
  • the virtual object includes a plurality of first reference points
  • the first curved surface boundary includes a plurality of first circular orbits and a plurality of first curves passing through the plurality of first circular orbits
  • each A circular track is respectively centered on the corresponding first reference points among the plurality of first reference points.
  • control module 13 determines the first movement path of the virtual camera on the first curved surface boundary according to the movement trajectory of the touch control instruction and the movement authority
  • the control module 13 is specifically configured to: if The direction of the movement track of the touch command is the first direction, and the movement authority includes the movement authority in the first direction, then a first curve passing through the position of the virtual camera is selected from the plurality of first curves As the first motion path, the starting point of the first motion path is the position where the virtual camera is located.
  • control module 13 determines the first movement path of the virtual camera on the boundary of the first curved surface according to the movement trajectory of the touch control instruction and the movement authority, specifically: : If the direction of the movement track of the touch command is the second direction, and the motion permission includes the permission to move in the second direction, the first circular track where the virtual camera is located is used as the first The circular orbit i is used as the first movement path, and the second direction is parallel to the plane where the first circular orbit i is located.
  • the relative position information includes a distance from the virtual camera to the virtual object.
  • the second determination module 12 determines the motion permission of the virtual camera based on the relative position information, it is specifically configured to: if the distance from the virtual camera to the virtual object is greater than a first threshold, and the virtual camera If the distance to the virtual object is less than the second threshold, it is determined that the motion authority of the virtual camera includes the first direction motion authority, the second direction motion authority and the zoom motion authority.
  • the second threshold is greater than the first threshold, the first direction and the second direction are preset according to the posture of the virtual object in the three-dimensional space, and the direction of the zooming movement is perpendicular to the first direction and the second direction.
  • the set three-dimensional space includes a first curved surface boundary and a second curved surface boundary surrounding the virtual object, and a three-dimensional space region between the second curved surface boundary and the first curved surface boundary.
  • the distance from the first curved boundary to the virtual object is less than or equal to the first threshold
  • the distance from the second curved boundary to the virtual object is greater than the first threshold
  • the distance from the second curved boundary to the The distance of the virtual object is less than or equal to the second threshold
  • the second threshold is greater than the first threshold.
  • control module 13 controls the virtual camera to move according to the touch command and the motion permission in the set three-dimensional space in response to the touch command on the graphical interface
  • the control module 13 is specifically configured to: if detecting to the touch command, obtain the movement track of the touch command; determine the second movement path of the virtual camera according to the movement track of the touch command and the movement authority, wherein the second movement path is The motion path is on the boundary of the second curved surface, or the second motion path is in the three-dimensional space area; the virtual camera is controlled to move on the second motion path.
  • the virtual object includes a plurality of second reference points
  • the second curved surface boundary includes a plurality of second circular orbits and a plurality of second curves passing through the plurality of second circular orbits, each of which The two circular orbits are respectively centered on the corresponding second reference points among the plurality of second reference points.
  • control module 13 when determining the second movement path of the virtual camera according to the movement trajectory of the touch control instruction and the motion authority, is specifically configured to: if the movement trajectory of the touch control instruction The direction of the first direction is the first direction, and the movement authority includes the first direction movement authority, then select the second curve passing through the position of the virtual camera from the plurality of second curves as the second movement path, Wherein, the starting point of the second motion path is the position where the virtual camera is located.
  • control module 13 when determining the second movement path of the virtual camera according to the movement trajectory of the touch control instruction and the motion authority, is specifically configured to: if the movement trajectory of the touch control instruction The direction is the second direction, and the movement permission includes the second direction movement permission, then the second circular track i where the virtual camera is located in the plurality of second circular tracks is used as the second movement path, wherein the second direction is parallel to the plane of the second circular track i.
  • control module 13 when determining the second movement path of the virtual camera according to the movement trajectory of the touch control instruction and the motion authority, is specifically configured to: if the movement trajectory of the touch control instruction The direction of the virtual camera includes multiple directions, and the motion permission includes the zoom motion permission, then based on the position of the virtual camera and the moving directions of the multiple tracks, determine all the positions of the virtual camera in the three-dimensional space area. Describe the second motion path.
  • the relative position information includes the distance from the virtual camera to the virtual object.
  • the second determining module 12 is specifically configured to: if the distance from the virtual camera to the virtual object is equal to the first threshold, determine that the motion permission of the virtual camera includes the first motion permission in the first range bucket; For the first range bucket of the virtual object, the distance from the first range bucket to the virtual object is the first threshold.
  • the virtual object includes a plurality of first viewpoints, and the plurality of first viewpoints are in one-to-one correspondence with the plurality of first axis points in the first range bucket, and the first range bucket is obtained by interpolation of the plurality of first axis points. is composed of a plurality of first circular trajectories.
  • the control module 13 controls the virtual camera to move according to the touch command and the motion authority in the set three-dimensional space in response to the touch command on the graphical interface
  • the control module 13 is specifically configured to: if the touch command is detected, obtain the touch command according to the movement trajectory of the touch command and the first motion permission, control the virtual camera to move in the first range bucket.
  • the optical axis of the virtual camera points from the first axis point where the virtual camera is located to the first viewpoint corresponding to the first axis point.
  • the relative position information includes the distance from the virtual camera to the virtual object.
  • the second determining module 12 is specifically configured to: if the distance from the virtual camera to the virtual object is greater than the first threshold, and the distance from the virtual camera to the virtual object is less than the second threshold, then determine that the motion permission of the virtual camera is included in the second range bucket and a third movement authority between the second range bucket and the first range bucket.
  • the second threshold is greater than the first threshold, and the three-dimensional space is set to include a second range bucket and a first range bucket surrounding the virtual object, the distance from the second range bucket to the virtual object is the second threshold, and the first range bucket to the virtual object The distance of the object is the first threshold.
  • the virtual object includes multiple second viewpoints, and the multiple second viewpoints correspond one-to-one with multiple second pivot points in the second range bucket, and the second range bucket is calculated by interpolation of multiple second pivot points. of multiple second circular trajectories.
  • the control module 13 controls the virtual camera to move according to the touch command and the motion authority in the set three-dimensional space in response to the touch command on the graphical interface, the control module 13 is specifically used for: detecting the touch command, and obtaining the touch command's information. Movement track; control the virtual camera to move in the second range bucket according to the movement track of the touch command and the second movement permission; or control the virtual camera to move in the second range bucket according to the movement track of the touch command and the third movement permission Motion to and from the first range bucket.
  • the optical axis of the virtual camera points from the second axis point where the virtual camera is located to the second viewpoint corresponding to the second axis point.
  • the smaller the distance between the virtual camera and the virtual object the larger the multiple second viewpoints; and if the virtual camera is in the second range bucket, the multiple second viewpoints are aggregated into one point.
  • the apparatus for displaying virtual objects shown in FIG. 11 may execute the methods provided in the foregoing embodiments.
  • the parts not described in detail in this embodiment reference may be made to the relevant descriptions of the foregoing embodiments, which will not be repeated here.
  • the structure of the virtual object display apparatus shown in FIG. 11 can be implemented as an electronic device.
  • the electronic device may include: a processor 21 and a memory 22 .
  • the memory 22 stores executable codes, and when the executable codes are executed by the processor 21, at least the processor 21 can implement the method for displaying virtual objects provided in the foregoing embodiments.
  • the structure of the electronic device may further include a communication interface 23 for communicating with other devices or a communication network.
  • an embodiment of the present invention provides a non-transitory machine-readable storage medium, where executable codes are stored on the non-transitory machine-readable storage medium, and when the executable codes are executed by a processor of a wireless router , causing the processor to execute the method for displaying virtual objects provided in the foregoing embodiments.
  • the systems, methods and apparatuses of the embodiments of the present invention can be implemented as pure software (for example, a software program written in Java), or can be implemented as pure hardware (for example, a dedicated ASIC chip or FPGA chip) as required, It may also be implemented as a system combining software and hardware (eg, a firmware system with fixed code stored or a system with a general-purpose memory and processor).
  • Another aspect of the present invention is a computer-readable medium having computer-readable instructions stored thereon that, when executed, perform the methods of various embodiments of the present invention.
  • Various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof.
  • a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the virtual object display device according to the embodiment of the present invention.
  • DSP digital signal processor
  • the present invention can also be implemented as apparatus or apparatus programs (eg, computer programs and computer program products) for performing part or all of the methods described herein.
  • Such a program implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such signals may be downloaded from Internet sites, or provided on carrier signals, or in any other form.
  • FIG. 13 shows a server, such as an application server, that can implement the virtual object presentation method according to the present invention.
  • the server traditionally includes a processor 1310 and a computer program product or computer readable medium in the form of memory 1320 .
  • the memory 1320 may be electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • the memory 1320 has storage space 1330 for program code 1331 for performing any of the method steps in the above-described methods.
  • the storage space 1330 for program codes may include various program codes 1331 for implementing various steps in the above methods, respectively. These program codes can be read from or written to one or more computer program products.
  • These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks. Such computer program products are typically portable or fixed storage units as described with reference to FIG. 14 .
  • the storage unit may have storage segments, storage spaces, etc. arranged similarly to the storage 1320 in the server of FIG. 13 .
  • the program code may, for example, be compressed in a suitable form.
  • the storage unit includes computer readable code 1331', i.e. code readable by a processor such as 1310 for example, which when executed by a server, causes the server to perform the various steps in the methods described above.
  • references herein to "one embodiment,” “an embodiment,” or “one or more embodiments” means that a particular feature, structure, or characteristic described in connection with an embodiment is included in at least one embodiment of the present invention. Also, please note that instances of the phrase “in one embodiment” herein are not necessarily all referring to the same embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Or Creating Images (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

A virtual object display method, apparatus and device, a computer program and a medium. The method is applied to a graphic interface which is loaded with a virtual object and a virtual camera, the virtual camera being used for collecting image presentations of the virtual object. The method comprises: determining the relative position information of the virtual camera and the virtual object (101); determining, based on the relative position information, a motion permission of the virtual camera (102); in response to a touch instruction on the graphic interface, controlling the virtual camera to move in preset three-dimensional space according to the touch instruction and the motion permission so as to adjust the image presentations of the virtual object (103). According to the method, the virtual camera is controlled to move in the preset three-dimensional space according to the touch instruction and the motion permission so as to perform multi-angle presentations of the virtual object in the preset three-dimensional space. A user is provided with a richer variety of viewing angles, and the abnormal presentation of the virtual object under some viewing angles is avoided by setting the three-dimensional space and the motion permission.

Description

虚拟对象的展示方法、装置、设备、计算机程序、介质Method, apparatus, device, computer program, and medium for displaying virtual objects
交叉应用cross application
本申请引用于2020年08月26日递交的名称为“虚拟对象的展示方法、装置、设备”的第202010871773.2号中国专利申请,其通过引用被全部并入本申请。This application refers to Chinese Patent Application No. 202010871773.2, which was filed on August 26, 2020, and entitled "Method, Apparatus, and Device for Displaying Virtual Objects", which is fully incorporated into this application by reference.
技术领域technical field
本发明涉及图像技术领域,尤其涉及一种虚拟对象的展示方法、装置、设备、计算机程序、介质。The present invention relates to the field of image technology, and in particular, to a method, apparatus, device, computer program, and medium for displaying virtual objects.
背景技术Background technique
虚拟对象包括虚拟场景中的多种场景资源。虚拟对象比如是虚拟角色、道具。以游戏中的虚拟角色为例,玩家会选取虚拟角色,并通过控制虚拟角色的行为参与到游戏中。因而,虚拟角色既是玩家参与游戏的重要载体,也是游戏出品方吸引玩家的重要工具。The virtual object includes various scene resources in the virtual scene. The virtual objects are, for example, virtual characters and props. Taking the virtual character in the game as an example, the player will select the virtual character and participate in the game by controlling the behavior of the virtual character. Therefore, virtual characters are not only an important carrier for players to participate in the game, but also an important tool for game producers to attract players.
玩家进入游戏后,可以在虚拟角色展示界面中查看各个虚拟角色的外观及角色设定。目前,在虚拟角色展示界面中,玩家一般会通过触摸屏幕来控制虚拟角色进行单轴旋转,或对虚拟角色进行缩放操作,从而查看虚拟角色的外观细节。但这种查看方式由于提供给玩家的观察视角单一,所能展示的虚拟角色外观细节有限,难以满足玩家对虚拟角色的观察需求。After entering the game, players can view the appearance and character settings of each avatar in the avatar display interface. At present, in the virtual character display interface, the player generally controls the virtual character to perform single-axis rotation by touching the screen, or performs a zoom operation on the virtual character, so as to view the appearance details of the virtual character. However, due to the single viewing angle provided to the player by this viewing method, the details of the appearance of the virtual character that can be displayed are limited, and it is difficult to meet the player's observation needs for the virtual character.
如何展示虚拟对象,以提升对虚拟对象的观察体验,成为亟待解决的技术问题。How to display virtual objects in order to improve the observation experience of virtual objects has become a technical problem to be solved urgently.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供一种虚拟对象的展示方法、装置、设备、计算机程序、介质,用以在设定三维空间中对虚拟对象进行多角度展示,提升用户观察体验。Embodiments of the present invention provide a method, apparatus, device, computer program, and medium for displaying virtual objects, which are used to display virtual objects from multiple angles in a set three-dimensional space to improve user viewing experience.
第一方面,本发明实施例提供一种虚拟对象的展示方法,该方法应用于图形界面,该图形界面中加载有虚拟对象和虚拟摄像机,该虚拟摄像机用于采集对虚拟对象的展示图像,该方法包括:In a first aspect, an embodiment of the present invention provides a method for displaying a virtual object. The method is applied to a graphical interface. The graphical interface is loaded with a virtual object and a virtual camera. The virtual camera is used to collect a display image of the virtual object. Methods include:
确定虚拟摄像机与虚拟对象的相对位置信息;Determine the relative position information of the virtual camera and the virtual object;
基于相对位置信息确定虚拟摄像机的运动权限;Determine the motion permission of the virtual camera based on the relative position information;
响应于对图形界面的触控指令,控制虚拟摄像机在设定三维空间中根据触控指令和运动权限进行运动,以调整对虚拟对象的展示图像。In response to the touch command on the graphical interface, the virtual camera is controlled to move in the set three-dimensional space according to the touch command and the motion authority, so as to adjust the displayed image of the virtual object.
第二方面,本发明实施例提供一种虚拟对象的展示装置,该装置应用于图形界面,该图形界面中加载有虚拟对象和虚拟摄像机,虚拟摄像机用于采集对虚拟对象的展示图像,该装置包括:In a second aspect, an embodiment of the present invention provides a device for displaying virtual objects. The device is applied to a graphical interface, where a virtual object and a virtual camera are loaded in the graphical interface, and the virtual camera is used to collect a display image of the virtual object. The device include:
第一确定模块,用于确定虚拟摄像机与虚拟对象的相对位置信息;a first determining module for determining relative position information between the virtual camera and the virtual object;
第二确定模块,用于基于相对位置信息确定虚拟摄像机的运动权限;a second determining module, configured to determine the motion authority of the virtual camera based on the relative position information;
控制模块,用于响应于对图形界面的触控指令,控制虚拟摄像机在设定三维空间中根据触控指令和运动权限进行运动,以调整对虚拟对象的展示图像。The control module is used to control the virtual camera to move in the set three-dimensional space according to the touch command and the motion authority in response to the touch command on the graphical interface, so as to adjust the displayed image of the virtual object.
第三方面,本发明实施例提供一种电子设备,其中包括处理器和存储器,其中,所述存储器上存储有可执行代码,当所述可执行代码被所述处理器执行时,使所述处理器至少可以实现第一方面中的虚拟对象的展示方法。In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor and a memory, wherein executable code is stored on the memory, and when the executable code is executed by the processor, the The processor may at least implement the method for displaying virtual objects in the first aspect.
本发明实施例提供了一种非暂时性机器可读存储介质,所述非暂时性机器可读存储介质上存储有可执行代码,当所述可执行代码被电子设备的处理器执行时,使所述处理器至少可以实现第一方面中的虚拟对象的展示方法。An embodiment of the present invention provides a non-transitory machine-readable storage medium, where executable codes are stored on the non-transitory machine-readable storage medium, and when the executable codes are executed by a processor of an electronic device, the The processor may at least implement the method for displaying virtual objects in the first aspect.
本发明实施例又提供了一种系统,包括处理器和存储器,所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、至少一段程序、代码集或指令集由所述处理器加载并执行以实现上面描述的一种虚拟对象的展示方法。An embodiment of the present invention further provides a system, including a processor and a memory, wherein the memory stores at least one instruction, at least one piece of program, code set or instruction set, the at least one instruction, at least one piece of program, code set or The instruction set is loaded and executed by the processor to implement the above-described method for displaying a virtual object.
本发明实施例进一步提供了一种计算机可读介质,其上存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、至少一段程序、代码集或指令集由处理器加载并执行以实现上面描述的一种虚拟对象的展示方法。Embodiments of the present invention further provide a computer-readable medium on which is stored at least one instruction, at least one piece of program, code set or instruction set, where the at least one instruction, at least one piece of program, code set or instruction set is stored by a processor Loaded and executed to implement the above-described presentation method of a virtual object.
在本发明实施例提供的技术方案中,图形界面加载有虚拟对象和虚拟摄像机,该虚拟摄像机用于采集图形界面中对虚拟对象的展示图像。首先,基于虚拟摄像机与虚拟对象的相对位置信息确定虚拟摄像机的运动权限,该运动权限即表示虚拟摄像机在设定三维空间中被授权的运动方式,比如若虚拟摄像机的运动权限包括纵向运动权限,该虚拟摄像机可以在设定三维空间中进行纵向运动。响应于对图形界面的触控指令,控制虚拟摄像机在设定三维空间中根据该触控指令和运动权限进行运动,从而通过触控指令即可改变虚拟摄像机在设定三维空间中所处的位置,调整图形界面中的展示图像。本技术方案通过控制虚拟摄像机在设定三维空间中根据触控指令和运动权限进行运动,从而在设定三维空间中对虚拟对象进行多角度展示,不仅为用户提供了更丰富的观察视角,还通过设定三维空间和运动权限避免了某些视角下对虚拟对象的异常展示,提升用户体验。In the technical solution provided by the embodiment of the present invention, the graphic interface is loaded with a virtual object and a virtual camera, and the virtual camera is used to collect a display image of the virtual object in the graphic interface. First, determine the motion permission of the virtual camera based on the relative position information between the virtual camera and the virtual object. The motion permission represents the authorized motion mode of the virtual camera in the set three-dimensional space. For example, if the motion permission of the virtual camera includes the vertical motion permission, The virtual camera can move longitudinally in the set three-dimensional space. In response to the touch command on the graphical interface, the virtual camera is controlled to move in the set three-dimensional space according to the touch command and the motion permission, so that the position of the virtual camera in the set three-dimensional space can be changed through the touch command. to adjust the display image in the GUI. The technical solution controls the virtual camera to move according to the touch command and the motion authority in the set three-dimensional space, so as to display the virtual object from multiple angles in the set three-dimensional space, which not only provides the user with a richer viewing angle, but also By setting the three-dimensional space and motion permissions, the abnormal display of virtual objects in certain perspectives is avoided, and the user experience is improved.
附图说明Description of drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are for the purpose of illustrating preferred embodiments only and are not to be considered limiting of the invention. Also, the same components are denoted by the same reference numerals throughout the drawings. In the attached image:
图1为本发明一实施例提供的一种虚拟对象的展示方法的流程图;1 is a flowchart of a method for displaying virtual objects according to an embodiment of the present invention;
图2为本发明一实施例提供的一种虚拟对象的示意图;FIG. 2 is a schematic diagram of a virtual object according to an embodiment of the present invention;
图3至图7为本发明一实施例提供的一种虚拟对象的展示过程的原理示意图;3 to 7 are schematic schematic diagrams of a display process of a virtual object according to an embodiment of the present invention;
图8为本发明一实施例提供的一种图形界面的示意图;8 is a schematic diagram of a graphical interface provided by an embodiment of the present invention;
图9为本发明一实施例提供的另一种图形界面的示意图;9 is a schematic diagram of another graphical interface provided by an embodiment of the present invention;
图10为本发明一实施例提供的另一种虚拟对象的示意图;FIG. 10 is a schematic diagram of another virtual object provided by an embodiment of the present invention;
图11为本发明实施例提供的一种虚拟对象的展示装置的结构示意图;11 is a schematic structural diagram of a device for displaying virtual objects according to an embodiment of the present invention;
图12为与图11所示实施例提供的虚拟对象的展示装置对应的电子设备的结构示意图;FIG. 12 is a schematic structural diagram of an electronic device corresponding to the virtual object display apparatus provided by the embodiment shown in FIG. 11;
图13为本发明一实施例提供的一种服务器的示意图;13 is a schematic diagram of a server according to an embodiment of the present invention;
图14为与图13所示实施例提供的服务器对应的存储单元的示意图。FIG. 14 is a schematic diagram of a storage unit corresponding to the server provided by the embodiment shown in FIG. 13 .
具体实施例specific embodiment
下面结合附图和具体的实施方式对本发明作进一步的描述。The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
在本发明实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本发明。在本发明实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义,“多种”一般包含至少两种。The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a," "the," and "the" as used in the embodiments of the present invention and the appended claims are intended to include the plural forms as well, unless the context clearly dictates otherwise, "a plurality" Generally at least two are included.
取决于语境,如在此所使用的词语“如果”、“若”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。类似地,取决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。Depending on the context, the words "if", "if" as used herein may be interpreted as "at" or "when" or "in response to determining" or "in response to detecting". Similarly, the phrases "if determined" or "if detected (the stated condition or event)" can be interpreted as "when determined" or "in response to determining" or "when detected (the stated condition or event)," depending on the context )" or "in response to detection (a stated condition or event)".
另外,下述各方法实施例中的步骤时序仅为一种举例,而非严格限定。In addition, the sequence of steps in the following method embodiments is only an example, and is not strictly limited.
本发明实施例提供的虚拟对象的展示方案可以由一电子设备来执行,该电子设备可以是诸如智能手机、平板电脑、PC机、笔记本电脑等终端设备。在一可选实施例中,该电子设备上可以安装有用于执行虚拟对象的展示方案的服务程序。该服务程序比如是游戏客户端、三维场景编辑器、游戏编辑器。The display solution of the virtual object provided by the embodiment of the present invention may be executed by an electronic device, and the electronic device may be a terminal device such as a smart phone, a tablet computer, a PC, and a notebook computer. In an optional embodiment, a service program for executing a presentation scheme of a virtual object may be installed on the electronic device. The service program is, for example, a game client, a three-dimensional scene editor, and a game editor.
本发明实施例提供的虚拟对象的展示方案适用于各种虚拟对象的展示场景。虚拟对象比如是虚拟角色、道具。举例来说,假设虚拟对象为游戏中的虚拟角色,虚拟角色的展示场景可以是玩家进入游戏后所看到的虚拟角色展示界面。或者,假设虚拟对象为游戏道具,虚拟角色的展示场景 也可以是玩家游戏过程中意图查看游戏道具时调出的道具展示界面。The display solution for virtual objects provided by the embodiments of the present invention is suitable for display scenarios of various virtual objects. The virtual objects are, for example, virtual characters and props. For example, assuming that the virtual object is a virtual character in the game, the display scene of the virtual character may be the virtual character display interface that the player sees after entering the game. Alternatively, assuming that the virtual object is a game item, the display scene of the virtual character may also be the item display interface called up when the player intends to view the game item during the game.
下面结合以下实施例对该虚拟对象的展示方法的执行过程进行说明。The execution process of the method for displaying the virtual object will be described below with reference to the following embodiments.
图1为本发明实施例提供的一种虚拟对象的展示方法的流程图。如图1所示,该方法包括如下步骤:FIG. 1 is a flowchart of a method for displaying virtual objects according to an embodiment of the present invention. As shown in Figure 1, the method includes the following steps:
101、确定虚拟摄像机与虚拟对象的相对位置信息;101. Determine relative position information between the virtual camera and the virtual object;
102、基于相对位置信息确定虚拟摄像机的运动权限;102. Determine the motion permission of the virtual camera based on the relative position information;
103、响应于对图形界面的触控指令,控制虚拟摄像机在设定三维空间中根据触控指令和运动权限进行运动,以调整对虚拟对象的展示图像。103. In response to the touch command on the graphical interface, control the virtual camera to move in the set three-dimensional space according to the touch command and the motion authority, so as to adjust the displayed image of the virtual object.
本发明实施例中的虚拟对象的展示方法应用于图形界面,该图形界面比如是服务程序中加载的虚拟角色展示界面。该图形界面中加载有虚拟对象。该虚拟对象处于三维空间中。The method for displaying virtual objects in the embodiment of the present invention is applied to a graphical interface, such as a virtual character display interface loaded in a service program. The graphical interface is loaded with virtual objects. The virtual object is in three-dimensional space.
为了展示虚拟对象在三维空间中的姿态,需要在图形界面中加载虚拟摄像机,该虚拟摄像机用于采集对虚拟对象的展示图像。实质上,虚拟摄影机的取景视角即代表使用该图形界面的用户对虚拟对象的观察视角,故而,调整虚拟摄像机在三维空间中所处的位置即是改变用户对虚拟对象的观察视角,调整对虚拟对象的展示图像。为改变用户对虚拟对象的观察视角,需要调整虚拟摄像机在三维空间中所处的位置。简单来说,就是控制虚拟摄像机在三维空间中进行运动,使虚拟摄像机从初始位置移动到另一位置。当然,虚拟摄像机也称为虚拟相机、游戏相机,虚拟摄影机的取景视角也称为虚拟摄像机的裁剪区域,本发明实施例中并不限定。In order to display the posture of the virtual object in the three-dimensional space, a virtual camera needs to be loaded in the graphical interface, and the virtual camera is used to collect the display image of the virtual object. In essence, the viewing angle of the virtual camera represents the viewing angle of the user using the graphical interface for the virtual object. Therefore, adjusting the position of the virtual camera in the three-dimensional space is to change the user's viewing angle of the virtual object and adjust the viewing angle of the virtual object. Display image of the object. In order to change the user's viewing angle of the virtual object, it is necessary to adjust the position of the virtual camera in the three-dimensional space. Simply put, it is to control the virtual camera to move in three-dimensional space, so that the virtual camera moves from the initial position to another position. Of course, the virtual camera is also called a virtual camera and a game camera, and the viewing angle of the virtual camera is also called a cropping area of the virtual camera, which is not limited in the embodiment of the present invention.
在图形界面中加载虚拟对象和虚拟摄像机之后,101中,确定虚拟摄像机与虚拟对象的相对位置信息,从而确定虚拟摄像机相对虚拟对象的位置。After the virtual object and the virtual camera are loaded in the graphical interface, in 101 , relative position information of the virtual camera and the virtual object is determined, thereby determining the position of the virtual camera relative to the virtual object.
进而,102中,基于虚拟摄像机与虚拟对象的相对位置信息确定虚拟摄像机的运动权限。Further, in 102, the motion authority of the virtual camera is determined based on the relative position information of the virtual camera and the virtual object.
实际应用中,以虚拟对象为虚拟角色为例,如果在三维空间的任意方位上都可以对虚拟角色进行观察,可能会导致虚拟角色的展示出现异常,如观察视角穿进虚拟角色的模型内部,或观察视角指向虚拟角色的不雅部位。In practical applications, taking the virtual object as the virtual character as an example, if the virtual character can be observed in any direction in the three-dimensional space, it may cause the display of the virtual character to be abnormal, such as the observation angle penetrates into the virtual character's model. Or the viewing angle points to indecent parts of the avatar.
为避免上述异常情况,将虚拟摄像机的运动范围限定于设定三维空间,并为虚拟摄像机在设定三维空间中的运动设置权限。该运动权限表示虚拟摄像机在设定三维空间中被授权的运动方式。虚拟摄像机的运动权限包括但限于各方向运动权限及缩放运动权限。实质上,各方向运动权限表示的是虚拟摄像机被授权可以沿着各方向进行位移。各方向可以基于虚拟对象在三维空间中的姿态预先设定。举例来说,若虚拟摄像机的运动权限包括纵向运动权限,该虚拟摄像机可以在设定三维空间中纵轴方向进行纵向运动,如沿着纵轴方向向上运动,或沿着纵轴方向向下运动。In order to avoid the above abnormal situation, the motion range of the virtual camera is limited to the set three-dimensional space, and permissions are set for the movement of the virtual camera in the set three-dimensional space. The motion permission represents the authorized motion mode of the virtual camera in the set three-dimensional space. The motion permission of the virtual camera includes but is limited to the permission to move in all directions and the permission to zoom. In essence, the permission to move in all directions means that the virtual camera is authorized to move in all directions. Each direction can be preset based on the pose of the virtual object in the three-dimensional space. For example, if the motion permission of the virtual camera includes longitudinal motion permission, the virtual camera can perform longitudinal motion in the longitudinal direction of the set three-dimensional space, such as moving up along the longitudinal axis, or moving down along the longitudinal axis. .
在一些可能的情况下,虚拟摄像机与虚拟对象的距离较近,此类情况下,为避免虚拟摄像机的观察视角穿进虚拟对象的模型内部,或出现其他 异常情况。可以限定虚拟摄像机处于虚拟对象近处时的运动权限。比如,为避免虚拟摄像机的观察视角穿进虚拟对象的模型内部,禁止虚拟摄像机的缩放运动。In some possible cases, the distance between the virtual camera and the virtual object is relatively close. In this case, in order to avoid the viewing angle of the virtual camera from penetrating into the model of the virtual object, or other abnormal situations occur. You can limit the motion permission of the virtual camera when the virtual object is close to it. For example, in order to prevent the viewing angle of the virtual camera from penetrating into the interior of the virtual object model, the zooming motion of the virtual camera is prohibited.
具体来说,虚拟摄像机与虚拟对象的相对位置信息包括虚拟摄像机到虚拟对象的距离。102中,基于虚拟摄像机与虚拟对象的相对位置信息确定虚拟摄像机的运动权限,可以实现为:Specifically, the relative position information of the virtual camera and the virtual object includes the distance from the virtual camera to the virtual object. In 102, the motion permission of the virtual camera is determined based on the relative position information of the virtual camera and the virtual object, which can be implemented as:
若虚拟摄像机到虚拟对象的距离小于第一阈值,则确定虚拟摄像机的运动权限包括第一方向运动权限和第二方向运动权限,其中第一方向和第二方向根据虚拟对象在三维空间中的姿态预先设定。If the distance between the virtual camera and the virtual object is less than the first threshold, it is determined that the movement authority of the virtual camera includes the first direction movement authority and the second direction movement authority, wherein the first direction and the second direction are based on the posture of the virtual object in the three-dimensional space pre-setting.
若虚拟摄像机到虚拟对象的距离小于第一阈值,可以认为虚拟摄像机与虚拟对象的距离较近,即虚拟摄像机处于虚拟对象近处。此情况下,可以授权虚拟摄像机进行第一方向运动和第二方向运动,即确定虚拟摄像机的运动权限包括第一方向运动权限和第二方向运动权限。同时,此情况下,为避免虚拟摄像机的观察视角穿进虚拟对象的模型内部或出现其他异常情况,不授权虚拟摄像机进行缩放运动,即不向虚拟摄像机授予缩放运动权限。实际上,缩放运动包括对虚拟对象进行缩小的运动和对虚拟对象进行放大的运动。If the distance between the virtual camera and the virtual object is less than the first threshold, it can be considered that the distance between the virtual camera and the virtual object is relatively short, that is, the virtual camera is located near the virtual object. In this case, the virtual camera may be authorized to perform movement in the first direction and movement in the second direction, that is, it is determined that the movement authority of the virtual camera includes the movement authority in the first direction and the movement authority in the second direction. At the same time, in this case, in order to prevent the viewing angle of the virtual camera from penetrating into the model of the virtual object or other abnormal conditions, the virtual camera is not authorized to perform zooming motion, that is, the virtual camera is not granted the zooming motion permission. Actually, the zooming motion includes a motion for zooming out a virtual object and a motion for zooming in on the virtual object.
举例来说,假设虚拟对象为图2所示的虚拟角色。在图2中,虚拟角色在三维空间中的姿态为站立在地面上,基于虚拟角色的姿态将第一方向设为图2示出的纵轴方向,将第二方向设为图2示出的横轴方向。若虚拟摄像机到虚拟对象的距离小于第一阈值,则确定虚拟摄像机的运动权限包括纵向运动权限和横向运动权限。纵向运动权限即表示虚拟摄像机被授权沿着纵轴向上运动或沿着纵轴向下运动。横向运动权限即表示虚拟摄像机被授权沿着横轴方向围绕虚拟角色进行顺时帧运动,以及虚拟摄像机被授权沿着横轴方向围绕虚拟角色进行逆时针运动。For example, it is assumed that the virtual object is the virtual character shown in FIG. 2 . In FIG. 2 , the posture of the avatar in the three-dimensional space is standing on the ground. Based on the posture of the avatar, the first direction is set as the vertical axis direction shown in FIG. 2 , and the second direction is set as the direction shown in FIG. 2 . Horizontal axis direction. If the distance between the virtual camera and the virtual object is less than the first threshold, it is determined that the motion permission of the virtual camera includes the vertical motion permission and the lateral motion permission. The longitudinal motion permission means that the virtual camera is authorized to move up or down along the longitudinal axis. The lateral motion permission means that the virtual camera is authorized to move clockwise around the virtual character along the horizontal axis direction, and the virtual camera is authorized to move counterclockwise around the virtual character along the horizontal axis direction.
进而,102中确定虚拟摄像机的运动权限之后,103中,响应于对图形界面的触控指令,控制虚拟摄像机在设定三维空间中根据触控指令和运动权限进行运动。在一可选实施例中,103可以实现为:Further, after determining the motion permission of the virtual camera in 102, in 103, in response to the touch command on the graphical interface, the virtual camera is controlled to move according to the touch command and the motion permission in the set three-dimensional space. In an optional embodiment, 103 can be implemented as:
若检测到触控指令,则获取触控指令的移动轨迹;根据触控指令的移动轨迹以及运动权限,确定虚拟摄像机在第一曲面边界上的第一运动路径;控制虚拟摄像机在第一运动路径上进行运动。If a touch command is detected, the movement track of the touch command is obtained; according to the movement track and motion authority of the touch command, the first motion path of the virtual camera on the first curved surface boundary is determined; the virtual camera is controlled on the first motion path exercise on.
其中,设定三维空间包括环绕于虚拟对象的曲面边界,该曲面边界到虚拟对象的距离小于或等于第一阈值。为区分,本文中将该曲面边界称为第一曲面边界。通过上述步骤可以在第一曲面边界上对虚拟对象进行近距离观察。The setting of the three-dimensional space includes a curved surface boundary surrounding the virtual object, and the distance between the curved surface boundary and the virtual object is less than or equal to a first threshold. For distinction, this surface boundary is referred to herein as the first surface boundary. Through the above steps, a close-up observation of the virtual object can be performed on the boundary of the first curved surface.
具体地,虚拟对象包括多个参考点。为区分,本文中将该多个参考点称为第一参考点。第一参考点可以处于虚拟对象的模型表面,也可以处于虚拟对象的模型内部。第一曲面边界包括多个第一圆形轨道以及经过多个第一圆形轨道的多条第一曲线,各第一圆形轨道分别以多个第一参考点中 各自对应的第一参考点为中心。第一曲面边界包括设定三维空间中与虚拟对象的距离最近处。Specifically, the virtual object includes a plurality of reference points. For distinction, the plurality of reference points are referred to herein as first reference points. The first reference point may be located on the surface of the model of the virtual object, or may be located inside the model of the virtual object. The first curved surface boundary includes a plurality of first circular orbits and a plurality of first curves passing through the plurality of first circular orbits, and each of the first circular orbits respectively uses a corresponding first reference point among the plurality of first reference points as a center. The first surface boundary includes a set closest distance to the virtual object in the three-dimensional space.
实际应用中,第一参考点可以称为视点,可以根据虚拟对象的视觉特征信息设置多个视点。可选地,各第一圆形轨道的半径根据虚拟对象的视觉特征信息进行设定,视觉特征信息比如是尺寸信息。各第一圆形轨道的半径可以相同也可以不同。可选地,第一曲面边界还包括连接于多个第一圆形轨道间的多条曲线。为区别本文中这些曲线称为第一曲线。多条第一曲线可以对多个第一圆形轨迹的半径进行插值运算得到。In practical applications, the first reference point may be called a viewpoint, and multiple viewpoints may be set according to the visual feature information of the virtual object. Optionally, the radius of each first circular track is set according to visual feature information of the virtual object, such as size information. The radius of each of the first circular orbits may be the same or different. Optionally, the first curved boundary further includes a plurality of curves connected between the plurality of first circular tracks. For the purpose of distinguishing these curves are referred to herein as the first curve. The plurality of first curves can be obtained by performing interpolation operations on the radii of the plurality of first circular trajectories.
在一可选实施例中,根据触控指令的移动轨迹以及运动权限,确定虚拟摄像机在第一曲面边界上的第一运动路径,可以实现为:In an optional embodiment, determining the first movement path of the virtual camera on the boundary of the first curved surface according to the movement track of the touch command and the movement authority can be implemented as follows:
若触控指令的移动轨迹的方向为第一方向,并且运动权限包括第一方向运动权限,则从多条第一曲线中选取经过虚拟摄像机所处位置的第一曲线作为第一运动路径,其中,第一运动路径的起点为虚拟摄像机所处位置。If the direction of the movement track of the touch command is the first direction, and the motion authority includes the first direction motion authority, the first curve passing through the position of the virtual camera is selected from the plurality of first curves as the first motion path, wherein , the starting point of the first motion path is the position of the virtual camera.
举例来说,假设虚拟对象为图3所示的虚拟角色。在图3中,虚拟角色在三维空间中的姿态为站立在地面上,基于虚拟角色的姿态将第一方向设为图3示出的纵轴方向。假设图形界面为游戏客户端中的界面。假设运动权限包括纵向运动权限。假设多条第一曲线包括如图3示出的L1和L2。假设虚拟摄像机所处位置为L1上的d点。For example, it is assumed that the virtual object is the virtual character shown in FIG. 3 . In FIG. 3 , the posture of the avatar in the three-dimensional space is standing on the ground, and the first direction is set as the vertical axis direction shown in FIG. 3 based on the posture of the avatar. Assume that the graphical interface is the interface in the game client. It is assumed that the motion rights include longitudinal motion rights. It is assumed that the plurality of first curves include L1 and L2 as shown in FIG. 3 . Suppose the virtual camera is located at point d on L1.
基于上述假设,若检测到用户触摸图形界面时的触控点,获取触控点的移动轨迹。若触控点的移动轨迹的方向为沿着纵轴方向向上或向下,则从多条第一曲线中选取经过d点的第一曲线L1作为第一运动路径,其中,第一运动路径的起点为d点。Based on the above assumption, if the touch point when the user touches the graphical interface is detected, the movement track of the touch point is acquired. If the direction of the movement track of the touch point is upward or downward along the longitudinal axis, the first curve L1 passing through point d is selected from the plurality of first curves as the first motion path, wherein the first motion path is The starting point is point d.
若触控点的移动轨迹的方向为沿着纵轴方向向上,则控制虚拟摄像机从d点开始,沿着L1向第一圆形轨道r1进行移动。可选地,此情况下虚拟摄像机的光轴指向第一圆形轨道r1的圆心,即a点。If the direction of the movement track of the touch point is upward along the longitudinal axis, the virtual camera is controlled to start from point d and move along L1 to the first circular track r1 . Optionally, in this case, the optical axis of the virtual camera points to the center of the first circular track r1, that is, point a.
若触控点的移动轨迹的方向为沿着纵轴方向向下,则控制虚拟摄像机从d点开始,沿着L1向第一圆形轨道r2或r3进行移动。可选地,此情况下,虚拟摄像机向第一圆形轨道r2移动时,虚拟摄像机的光轴指向第一圆形轨道r2的圆心,即b点;虚拟摄像机经过第一圆形轨道r2向第一圆形轨道r3移动时,虚拟摄像机的光轴指向从b点切换为第一圆形轨道r3的圆心,即c点。If the direction of the movement track of the touch point is downward along the longitudinal axis, the virtual camera is controlled to start from point d and move along L1 to the first circular track r2 or r3. Optionally, in this case, when the virtual camera moves to the first circular track r2, the optical axis of the virtual camera points to the center of the first circular track r2, that is, point b; the virtual camera passes through the first circular track r2 to the first circular track r2. When a circular track r3 moves, the optical axis of the virtual camera is switched from point b to the center of the first circular track r3, that is, point c.
另一可选实施例中,根据触控指令的移动轨迹以及运动权限,确定虚拟摄像机在第一曲面边界上的第一运动路径,可以实现为:In another optional embodiment, determining the first movement path of the virtual camera on the boundary of the first curved surface according to the movement track of the touch command and the movement authority can be implemented as follows:
若触控指令的移动轨迹的方向为第二方向,并且运动权限包括第二方向运动权限,则以多个第一圆形轨道中虚拟摄像机所处的第一圆形轨道i作为第一运动路径,第二方向平行于第一圆形轨道i所在平面。If the direction of the movement track of the touch command is the second direction, and the motion permission includes the permission to move in the second direction, the first circular track i where the virtual camera is located among the plurality of first circular tracks is used as the first motion path , the second direction is parallel to the plane of the first circular orbit i.
举例来说,假设虚拟对象为图4所示的虚拟角色。在图4中,虚拟角色在三维空间中的姿态为站立在地面上,基于虚拟角色的姿态将第二方向设为图4示出的横轴方向。假设图形界面为游戏客户端中的界面。假设运 动权限包括横向运动权限。假设虚拟摄像机所处位置为第一圆形轨道r2上的e点。For example, it is assumed that the virtual object is the virtual character shown in FIG. 4 . In FIG. 4 , the posture of the avatar in the three-dimensional space is standing on the ground, and the second direction is set as the horizontal axis direction shown in FIG. 4 based on the posture of the avatar. Assume that the graphical interface is the interface in the game client. It is assumed that the movement rights include lateral movement rights. It is assumed that the position of the virtual camera is point e on the first circular track r2.
基于上述假设,若检测到用户触摸图形界面时的触控点,获取该触控点的移动轨迹。若该触控点的移动轨迹的方向为横轴方向,则以多个第一圆形轨道中虚拟摄像机所处的第一圆形轨道r2作为第一运动路径,第一圆形轨道r2所在平面与横轴方向平行。Based on the above assumptions, if a touch point when the user touches the graphical interface is detected, the movement track of the touch point is acquired. If the direction of the movement track of the touch point is the horizontal axis direction, the first circular track r2 where the virtual camera is located among the plurality of first circular tracks is used as the first motion path, and the plane where the first circular track r2 is located is used as the first motion path. parallel to the horizontal axis.
若触控点的移动轨迹的方向为沿着横轴方向向左,则控制虚拟摄像机从e点开始,沿着第一圆形轨道r2进行顺时针运动。可选地,此情况下虚拟摄像机的光轴指向第一圆形轨道r2的圆心,即b点。顺时针运动所要转过的角度可以根据触控点沿着横轴方向移动的距离进行设定。If the direction of the movement track of the touch point is to the left along the horizontal axis, the virtual camera is controlled to start from point e and move clockwise along the first circular track r2. Optionally, in this case, the optical axis of the virtual camera points to the center of the first circular track r2, that is, point b. The angle to be rotated by the clockwise movement can be set according to the distance that the touch point moves along the horizontal axis.
若触控点的移动轨迹的方向为沿着横轴方向向右,则控制虚拟摄像机从e点开始,沿着第一圆形轨道r2进行逆时针运动。可选地,此情况下虚拟摄像机的光轴指向第一圆形轨道r2的圆心,即b点。逆时针运动所要转过的角度可以根据触控点沿着横轴方向移动的距离进行设定。If the direction of the movement track of the touch point is to the right along the horizontal axis, the virtual camera is controlled to start from point e and move counterclockwise along the first circular track r2. Optionally, in this case, the optical axis of the virtual camera points to the center of the first circular track r2, that is, point b. The angle to be rotated by the counterclockwise movement can be set according to the distance that the touch point moves along the horizontal axis.
通过上述步骤即可在第一曲面边界上对虚拟对象进行观察。Through the above steps, the virtual object can be observed on the boundary of the first curved surface.
当然,虚拟对象的视觉特征信息不同,基于虚拟对象的视觉特征信息构建的第一曲面边界的形状也不相同。实际应用中,还可以根据虚拟对象的展示效果,通过调整第一参考点在三维空间中所处的位置、第一圆形轨道的参数以及第一曲线的参数,对第一曲面边界的形状进行调整。Certainly, the visual feature information of the virtual object is different, and the shape of the first curved surface boundary constructed based on the visual feature information of the virtual object is also different. In practical applications, according to the display effect of the virtual object, the shape of the boundary of the first curved surface can be adjusted by adjusting the position of the first reference point in the three-dimensional space, the parameters of the first circular orbit, and the parameters of the first curve. Adjustment.
另一可选实施例中,102中,基于虚拟摄像机与虚拟对象的相对位置信息确定虚拟摄像机的运动权限,可以实现为:In another optional embodiment, in 102, determining the motion permission of the virtual camera based on the relative position information of the virtual camera and the virtual object may be implemented as:
若虚拟摄像机到虚拟对象的距离大于第一阈值,并且,虚拟摄像机到虚拟对象的距离小于第二阈值,则确定虚拟摄像机的运动权限包括第一方向运动权限、第二方向运动权限以及缩放运动权限。If the distance between the virtual camera and the virtual object is greater than the first threshold, and the distance between the virtual camera and the virtual object is less than the second threshold, it is determined that the motion permission of the virtual camera includes the first direction motion permission, the second direction motion permission and the zooming motion permission .
其中,第二阈值大于第一阈值。类似于上文描述,第一方向和第二方向也可以根据虚拟对象在三维空间中的姿态预先设定。缩放运动的方向垂直于第一方向和第二方向。Wherein, the second threshold is greater than the first threshold. Similar to the above description, the first direction and the second direction may also be preset according to the pose of the virtual object in the three-dimensional space. The direction of the zooming motion is perpendicular to the first direction and the second direction.
若虚拟摄像机到虚拟对象的距离大于第一阈值,并且,虚拟摄像机到虚拟对象的距离小于第二阈值,可以认为虚拟摄像机与虚拟对象的距离较远,即虚拟摄像机处于虚拟对象远处。此情况下,可以授权虚拟摄像机进行各方向运动权限,如第一方向运动权限和第二方向运动权限。为使用户能够观察到虚拟对象的更多细节,还可以向虚拟摄像机授予缩放运动权限。实际上,缩放运动包括对虚拟对象进行缩小的运动和对虚拟对象进行放大的运动,因而,缩放运动的方向通常是朝向虚拟角色或背离虚拟角色。简单来说,朝向虚拟角色就是虚拟摄像机朝着虚拟对象的方向,背离虚拟角色就是虚拟摄像机朝着远离虚拟对象的方向。相应地,对虚拟对象进行放大的运动就是虚拟摄像机朝着虚拟对象的方向进行运动,对虚拟对象进行缩小的运动就是虚拟摄像机朝着远离虚拟对象的方向进行运动。If the distance from the virtual camera to the virtual object is greater than the first threshold, and the distance from the virtual camera to the virtual object is less than the second threshold, it can be considered that the distance between the virtual camera and the virtual object is far, that is, the virtual camera is far from the virtual object. In this case, the virtual camera may be authorized to perform movement rights in various directions, such as the first-direction movement rights and the second-direction movement rights. To enable users to observe more details of virtual objects, the virtual camera can also be granted zoom motion permission. In fact, the zooming motion includes a zooming-in motion of the virtual object and a zooming-in motion of the virtual object, and thus, the direction of the zooming motion is usually toward the virtual character or away from the virtual character. In simple terms, towards the virtual character is the direction of the virtual camera towards the virtual object, and away from the virtual character is the direction of the virtual camera away from the virtual object. Correspondingly, the movement of enlarging the virtual object is the movement of the virtual camera in the direction of the virtual object, and the movement of reducing the virtual object is the movement of the virtual camera in the direction away from the virtual object.
举例来说,假设虚拟对象为图5所示的虚拟角色。在图5中,虚拟角 色在三维空间中的姿态为站立在地面上,基于虚拟角色的姿态将第一方向设为图5示出的纵轴方向,将第二方向设为图5示出的横轴方向。若虚拟摄像机到虚拟对象的距离大于第一阈值,则确定虚拟摄像机的运动权限包括纵向运动权限、横向运动权限以及缩放运动权限。纵向运动权限和横向运动权限的含义与上文描述类似,此处不再赘述。For example, it is assumed that the virtual object is the virtual character shown in FIG. 5 . In FIG. 5 , the posture of the avatar in the three-dimensional space is standing on the ground. Based on the posture of the avatar, the first direction is set as the vertical axis direction shown in FIG. 5 , and the second direction is set as the direction shown in FIG. 5 . Horizontal axis direction. If the distance between the virtual camera and the virtual object is greater than the first threshold, it is determined that the motion permission of the virtual camera includes vertical motion permission, lateral motion permission and zoom motion permission. The meanings of the vertical movement permission and the horizontal movement permission are similar to those described above, and will not be repeated here.
缩放运动权限即表示虚拟摄像机被授权朝着虚拟对象的方向进行运动,以及虚拟摄像机被授权朝着远离虚拟对象的方向进行运动。例如,假设虚拟摄像机所处位置为图6示出的f点。在图6中,虚拟摄像机朝着虚拟对象的方向进行运动即是:虚拟摄像机从f点出发朝向b点进行运动,其中虚拟摄像机的运动方向如图6中的箭头所示。The zoom motion permission means that the virtual camera is authorized to move toward the virtual object, and the virtual camera is authorized to move away from the virtual object. For example, it is assumed that the position of the virtual camera is the point f shown in FIG. 6 . In FIG. 6 , the virtual camera moves in the direction of the virtual object: the virtual camera starts from point f and moves toward point b, wherein the moving direction of the virtual camera is shown by the arrow in FIG. 6 .
进而,102中确定虚拟摄像机的运动权限之后,另一可选实施例中,103中,响应于对图形界面的触控指令,控制虚拟摄像机在设定三维空间中根据触控指令和运动权限进行运动,可以实现为:Further, after determining the motion permission of the virtual camera in 102, in another optional embodiment, in 103, in response to the touch command on the graphical interface, the virtual camera is controlled to perform the motion according to the touch command and the motion permission in the set three-dimensional space. movement, which can be implemented as:
若检测到触控指令,则获取触控指令的移动轨迹;根据触控指令的移动轨迹以及运动权限,确定虚拟摄像机的第二运动路径,其中,第二运动路径处于第二曲面边界上,或者第二运动路径处于三维空间区域中;控制虚拟摄像机在第二运动路径上进行运动。If a touch command is detected, the movement track of the touch command is obtained; according to the movement track of the touch command and the motion authority, the second movement path of the virtual camera is determined, wherein the second movement path is on the boundary of the second curved surface, or The second motion path is in the three-dimensional space area; the virtual camera is controlled to move on the second motion path.
其中,设定三维空间包括环绕于虚拟对象的第一曲面边界和第二曲面边界、以及处于第二曲面边界与第一曲面边界之间的三维空间区域。可选地,第一曲面边界设在第二曲面边界内侧。这里内侧即虚拟对象所处的一侧。也就是说,第一曲面边界到虚拟对象的距离小于或等于第一阈值,第二曲面边界到虚拟对象的距离大于第一阈值,第二曲面边界到虚拟对象的距离小于或等于第二阈值,第二阈值大于第一阈值。为便于理解,假设第一曲面边界和第二曲面边界分别为两个桶状结构,第一曲面边界对应的桶状结构设在第二曲面边界对应的桶状结构的内侧。基于此,两个桶状结构以及位于两个桶状结构中间的三维空间区域可以组成设定三维空间。需要理解的是,设定三维空间的形状由虚拟对象的视觉特征信息确定。如设定三维空间的高度可以由虚拟对象的高度确定。The setting of the three-dimensional space includes a first curved surface boundary and a second curved surface boundary surrounding the virtual object, and a three-dimensional space region between the second curved surface boundary and the first curved surface boundary. Optionally, the first curved surface boundary is set inside the second curved surface boundary. Here, the inner side is the side where the virtual object is located. That is to say, the distance from the first curved boundary to the virtual object is less than or equal to the first threshold, the distance from the second curved boundary to the virtual object is greater than the first threshold, and the distance from the second curved boundary to the virtual object is less than or equal to the second threshold, The second threshold is greater than the first threshold. For ease of understanding, it is assumed that the first curved surface boundary and the second curved surface boundary are respectively two barrel-shaped structures, and the barrel-shaped structure corresponding to the first curved surface boundary is provided inside the barrel-shaped structure corresponding to the second curved surface boundary. Based on this, the two barrel-shaped structures and the three-dimensional space area located in the middle of the two barrel-shaped structures can form a set three-dimensional space. It should be understood that the shape of the set three-dimensional space is determined by the visual feature information of the virtual object. For example, the height of the three-dimensional space can be determined by the height of the virtual object.
具体地,虚拟对象包括多个参考点。为区分,本文中将这些参考点称为第二参考点。与第一参考点类似,第二参考点可以处于虚拟对象的模型表面,也可以处于虚拟对象的模型内部。第二曲面边界包括多个第二圆形轨道以及经过多个第二圆形轨道的多条第二曲线,各第二圆形轨道分别以多个第二参考点中各自对应的第二参考点为中心。第二曲面边界包括设定三维空间中与虚拟对象的距离最远处。Specifically, the virtual object includes a plurality of reference points. For distinction, these reference points are referred to herein as second reference points. Similar to the first reference point, the second reference point may be located on the surface of the model of the virtual object or inside the model of the virtual object. The second curved surface boundary includes a plurality of second circular orbits and a plurality of second curves passing through the plurality of second circular orbits. as a center. The second surface boundary includes setting the furthest distance from the virtual object in the three-dimensional space.
实际应用中,根据虚拟对象的视觉特征信息,处于同一平面内的第一圆形轨道和第二圆形轨道的圆心可以相同,也可以不同,此处并不限定。也就是说,多个第一参考点和多个第二参考点可以重合也可以不重合。In practical applications, according to the visual feature information of the virtual object, the centers of the first circular orbit and the second circular orbit in the same plane may be the same or different, which is not limited here. That is to say, the multiple first reference points and the multiple second reference points may or may not overlap.
实际应用中,第二参考点可以也称为视点,设置规则与上文类似,此处不再展开。两种视点的区别在于两种视点所针对的曲面边界不同。In practical applications, the second reference point may also be referred to as a viewpoint, and the setting rules are similar to the above, and will not be expanded here. The difference between the two viewpoints lies in the surface boundaries targeted by the two viewpoints.
可选地,各第二圆形轨道的半径根据虚拟对象的视觉特征信息进行设定,视觉特征信息比如是尺寸信息。各第二圆形轨道的半径可以相同也可以不同。可选地,第二曲面边界还包括连接于多个第二圆形轨道间的多条曲线。为区别本文中这些曲线称为第二曲线。多条第二曲线可以通过对多个第二圆形轨道的半径进行插值运算得到。Optionally, the radius of each second circular track is set according to visual feature information of the virtual object, such as size information. The radius of each second circular orbit may be the same or different. Optionally, the second curved surface boundary further includes a plurality of curves connected between the plurality of second circular tracks. To distinguish these curves are referred to herein as second curves. The plurality of second curves may be obtained by interpolating the radii of the plurality of second circular orbits.
以图5示出的虚拟角色为例,为便于描述,仍假设该虚拟角色包括a、b、c三个点,以该虚拟角色的a、b、c三个点为第二参考点。分别以a、b、c三个点为圆心,并根据该虚拟对象的尺寸信息对a、b、c三个点各自对应的轨道半径r11、r22、r33,获得如图5所示的三个第二圆形轨道、以及第二曲线L3、L4。从而,基于三个第二圆形轨道以及第二曲线L3、L4,建立第二曲面边界。为便于查看,图5中未示出第一曲面边界。Taking the virtual character shown in FIG. 5 as an example, for ease of description, it is still assumed that the virtual character includes three points a, b, and c, and the three points a, b, and c of the virtual character are used as the second reference points. Taking the three points a, b, and c as the center of the circle, and according to the size information of the virtual object, the orbit radii r11, r22, and r33 corresponding to the three points a, b, and c, respectively, are obtained, as shown in Figure 5. The second circular orbit, and the second curves L3, L4. Thus, based on the three second circular orbits and the second curves L3, L4, a second curved surface boundary is established. For ease of viewing, the first curved boundary is not shown in FIG. 5 .
为便于对比说明第一曲面边界和第二曲面边界的关系,图6示出第一曲面边界中的第一圆形轨道r2以及第二曲面边界中的第二圆形轨道r22。在图6中,假设与第一圆形轨道r2处于同一平面的第二圆形轨道的圆心也为b点。此情况下,第二曲面边界包括第二圆形轨道r22,该第二圆形轨道r22的圆心为b点,半径为r22,其中,r22大于r2。For the convenience of explaining the relationship between the first curved boundary and the second curved boundary, FIG. 6 shows the first circular orbit r2 in the first curved boundary and the second circular orbit r22 in the second curved boundary. In FIG. 6 , it is assumed that the center of the second circular orbit that is on the same plane as the first circular orbit r2 is also point b. In this case, the second curved surface boundary includes a second circular orbit r22, the center of the second circular orbit r22 is point b, and the radius is r22, where r22 is greater than r2.
基于上文描述的第二曲面边界,在一可选实施例中,根据触控指令的移动轨迹以及运动权限,确定虚拟摄像机的第二运动路径,可以实现为:Based on the second curved surface boundary described above, in an optional embodiment, the second motion path of the virtual camera is determined according to the movement trajectory of the touch command and the motion authority, which can be implemented as:
若触控指令的移动轨迹的方向为第一方向,并且运动权限包括第一方向运动权限,则从多条第二曲线中选取经过虚拟摄像机所处位置的第二曲线作为第二运动路径,其中,第二运动路径的起点为虚拟摄像机所处位置。If the direction of the movement trajectory of the touch command is the first direction, and the motion authority includes the first direction motion authority, the second curve passing through the position of the virtual camera is selected from the plurality of second curves as the second motion path, wherein , and the starting point of the second motion path is the position of the virtual camera.
举例来说,假设虚拟对象为图5所示的虚拟角色。在图5中,虚拟角色在三维空间中的姿态为站立在地面上,基于虚拟角色的姿态将第一方向设为图5示出的纵轴方向。假设图形界面为游戏客户端中的界面。假设运动权限包括纵向运动权限。假设多条第二曲线包括如图5示出的L3和L4。假设虚拟摄像机所处位置为L3上的f点。For example, it is assumed that the virtual object is the virtual character shown in FIG. 5 . In FIG. 5 , the posture of the avatar in the three-dimensional space is standing on the ground, and the first direction is set as the vertical axis direction shown in FIG. 5 based on the posture of the avatar. Assume that the graphical interface is the interface in the game client. It is assumed that the motion rights include longitudinal motion rights. It is assumed that the plurality of second curves include L3 and L4 as shown in FIG. 5 . Suppose the virtual camera is located at point f on L3.
基于上述假设,若检测到用户触摸图形界面时的触控点,获取触控点的移动轨迹。若触控点的移动轨迹的方向为沿着纵轴方向向上或向下,则从多条第二曲线中选取经过f点的第二曲线L3作为第二运动路径,其中,第二运动路径的起点为f点。若触控点的移动轨迹的方向为沿着纵轴方向向上,则控制虚拟摄像机从d点开始,沿着L3向第二圆形轨道r11进行移动。可选地,此情况下虚拟摄像机的光轴指向从第二圆形轨道r22的圆心b点切换到第二圆形轨道r11的圆心,即a点。若触控点的移动轨迹的方向为沿着纵轴方向向下,则控制虚拟摄像机从f点开始,沿着L3向第二圆形轨道r33进行移动。此情况下,虚拟摄像机向第二圆形轨道r33移动时,虚拟摄像机的光轴指向从b点切换为第二圆形轨道r33的圆心,即c点。Based on the above assumption, if the touch point when the user touches the graphical interface is detected, the movement track of the touch point is acquired. If the direction of the movement track of the touch point is upward or downward along the longitudinal axis, the second curve L3 passing through point f is selected from the plurality of second curves as the second motion path, wherein the second motion path is The starting point is point f. If the direction of the movement track of the touch point is upward along the vertical axis, the virtual camera is controlled to start from point d and move toward the second circular track r11 along L3. Optionally, in this case, the point of the optical axis of the virtual camera is switched from point b of the center of the second circular track r22 to the center of the second circular track r11 , that is, point a. If the direction of the movement track of the touch point is downward along the longitudinal axis, the virtual camera is controlled to move from point f to the second circular track r33 along L3. In this case, when the virtual camera moves to the second circular track r33, the optical axis of the virtual camera is switched from point b to the center of the second circular track r33, that is, point c.
另一可选实施例中,根据触控指令的移动轨迹以及运动权限,确定虚拟摄像机的第二运动路径,可以实现为:In another optional embodiment, the second motion path of the virtual camera is determined according to the movement track of the touch command and the motion authority, which may be implemented as follows:
若触控指令的移动轨迹的方向为第二方向,并且运动权限包括第二方 向运动权限,则以多个第二圆形轨道中虚拟摄像机所处的第二圆形轨道i作为第二运动路径,其中第二方向平行于第二圆形轨道i所在平面。If the direction of the movement track of the touch command is the second direction, and the motion permission includes the permission to move in the second direction, the second circular track i where the virtual camera is located in the plurality of second circular tracks is used as the second motion path , wherein the second direction is parallel to the plane of the second circular orbit i.
举例来说,假设虚拟对象为图5所示的虚拟角色。在图5中,虚拟角色在三维空间中的姿态为站立在地面上,基于虚拟角色的姿态将第二方向设为图5示出的横轴方向。假设图形界面为游戏客户端中的界面。假设运动权限包括横向运动权限。假设虚拟摄像机所处位置为第二圆形轨道r22上的f点。For example, it is assumed that the virtual object is the virtual character shown in FIG. 5 . In FIG. 5 , the posture of the avatar in the three-dimensional space is standing on the ground, and the second direction is set as the horizontal axis direction shown in FIG. 5 based on the posture of the avatar. Assume that the graphical interface is the interface in the game client. It is assumed that the movement rights include lateral movement rights. It is assumed that the position of the virtual camera is point f on the second circular track r22.
基于上述假设,若检测到用户触摸图形界面时的触控点,获取该触控点的移动轨迹。若该触控点的移动轨迹的方向为横轴方向,则以多个第二圆形轨道中虚拟摄像机所处的第二圆形轨道r22作为第二运动路径,第二圆形轨道r22所在平面与横轴方向平行。若触控点的移动轨迹的方向为沿着横轴方向向左,则控制虚拟摄像机从f点开始,沿着第二圆形轨道r22进行顺时针运动。可选地,此情况下虚拟摄像机的光轴指向第二圆形轨道r22的圆心,即b点。顺时针运动所要转过的角度可以根据触控点沿着横轴方向移动的距离进行设定。或者,若触控点的移动轨迹的方向为沿着横轴方向向右,则控制虚拟摄像机从f点开始,沿着第二圆形轨道r22进行逆时针运动。逆时针运动所要转过的角度可以根据触控点沿着横轴方向移动的距离进行设定。Based on the above assumptions, if a touch point when the user touches the graphical interface is detected, the movement track of the touch point is acquired. If the direction of the movement track of the touch point is the horizontal axis direction, the second circular track r22 where the virtual camera is located among the plurality of second circular tracks is used as the second motion path, and the plane where the second circular track r22 is located is used as the second motion path. parallel to the horizontal axis. If the direction of the movement track of the touch point is to the left along the horizontal axis, the virtual camera is controlled to start from point f and move clockwise along the second circular track r22. Optionally, in this case, the optical axis of the virtual camera points to the center of the second circular track r22, that is, point b. The angle to be rotated by the clockwise movement can be set according to the distance that the touch point moves along the horizontal axis. Alternatively, if the direction of the movement track of the touch point is to the right along the horizontal axis, the virtual camera is controlled to start from point f and move counterclockwise along the second circular track r22. The angle to be rotated by the counterclockwise movement can be set according to the distance that the touch point moves along the horizontal axis.
可以理解的是,除了依据上述两个实施例所示的运动规则进行横、纵向运动之外,实际应用中,虚拟摄像机还可以在第一曲面边界和第二曲面边界之间的三维空间区域中进行运动。下面结合具体实施例对虚拟摄像机在三维空间区域中的运动规则进行说明:It can be understood that, in addition to performing horizontal and vertical motions according to the motion rules shown in the above two embodiments, in practical applications, the virtual camera can also be in the three-dimensional space area between the first curved surface boundary and the second curved surface boundary. Exercise. The motion rules of the virtual camera in the three-dimensional space area are described below with reference to specific embodiments:
再一可选实施例中,根据触控指令的移动轨迹以及运动权限,确定虚拟摄像机的第二运动路径,包括:In yet another optional embodiment, the second motion path of the virtual camera is determined according to the movement track of the touch command and the motion authority, including:
若触控指令的移动轨迹的方向包括多个方向,并且运动权限包括缩放运动权限,则基于虚拟摄像机所处位置以及多条轨迹的移动方向,确定虚拟摄像机在三维空间区域中的第二运动路径。If the direction of the movement track of the touch command includes multiple directions, and the movement permission includes the zoom movement permission, the second movement path of the virtual camera in the three-dimensional space area is determined based on the location of the virtual camera and the movement directions of the multiple tracks .
其中,触控指令的移动轨迹包括由多个触控点形成的多条轨迹。触控指令的移动轨迹的方向包括多个方向,实质上,就是说多条轨迹的方向不同。Wherein, the movement track of the touch command includes multiple tracks formed by multiple touch points. The direction of the movement track of the touch command includes multiple directions, which essentially means that the directions of the multiple tracks are different.
当然,虚拟摄像机在该三维空间区域中也可以进行横、纵向运动,具体规则与上文描述的横、纵向运动规则类似,此处暂不展开。Of course, the virtual camera can also perform horizontal and vertical motion in the three-dimensional space area, and the specific rules are similar to the horizontal and vertical motion rules described above, which will not be expanded here for the time being.
仍以上文描述的图5所示的虚拟角色为例,在图5中,虚拟角色在三维空间中的姿态为站立在地面上,基于虚拟角色的姿态将第一方向设为图5示出的纵轴方向,基于虚拟角色的姿态将第二方向设为图5示出的横轴方向。假设图形界面为游戏客户端中的界面。假设运动权限包括缩放运动权限。假设多条第二曲线包括如图5示出的L3和L4。假设虚拟摄像机所处位置为第二圆形轨道r22上的f点。Still take the avatar shown in FIG. 5 described above as an example, in FIG. 5, the posture of the avatar in the three-dimensional space is standing on the ground, and the first direction is set as shown in FIG. 5 based on the posture of the avatar. In the vertical axis direction, the second direction is the horizontal axis direction shown in FIG. 5 based on the posture of the avatar. Assume that the graphical interface is the interface in the game client. Assume that the motion permission includes the zoom motion permission. It is assumed that the plurality of second curves include L3 and L4 as shown in FIG. 5 . It is assumed that the position of the virtual camera is point f on the second circular track r22.
基于上述假设,若检测到用户触摸图形界面时形成至少两个触控点, 获取这些触控点的移动轨迹。若这些触控点对应的多条移动轨迹的方向不同,则基于虚拟摄像机所处位置即f点以及多条轨迹的移动方向,确定虚拟摄像机在三维空间区域中的第二运动路径。Based on the above assumptions, if it is detected that at least two touch points are formed when the user touches the graphical interface, the movement trajectories of these touch points are acquired. If the directions of the multiple moving trajectories corresponding to these touch points are different, the second moving path of the virtual camera in the three-dimensional space region is determined based on the position of the virtual camera, that is, point f and the moving directions of the multiple trajectories.
假设图形界面为图7所示的界面700。假设触控点包括m1和m2。在图7中,由m1形成的移动轨迹的方向和m2形成的移动轨迹的方向相反,并且根据这些移动轨迹可以判断出用户的操作为:双手向外滑动。假设图7中的虚拟对象p为图5中的虚拟角色。假设用户双手向外滑动时需要对虚拟对象p进行放大。当然,实际应用中,可以预先获取用户操作与缩放运动之间的对应关系,如用户双手向内滑动对应于对虚拟对象进行缩小,用户双手向外滑动对应于对虚拟对象进行放大。其中,缩放倍数根据触控点的移动轨迹设定。It is assumed that the graphical interface is the interface 700 shown in FIG. 7 . Suppose the touch points include m1 and m2. In FIG. 7 , the direction of the movement trajectory formed by m1 is opposite to the direction of the movement trajectory formed by m2, and according to these movement trajectories, it can be determined that the user's operation is: sliding both hands outward. It is assumed that the virtual object p in FIG. 7 is the virtual character in FIG. 5 . It is assumed that the virtual object p needs to be enlarged when the user slides both hands outward. Of course, in practical applications, the correspondence between user operations and zooming motions may be acquired in advance. For example, sliding inwards of the user's hands corresponds to zooming out of the virtual object, and sliding the user's hands outwards corresponds to zooming in on the virtual object. The zoom factor is set according to the movement track of the touch point.
还假设基于f点和b点确定的直线与第一圆形轨道r2交于n点,如图6所示。基于图5、图6和图7的假设,以基于f点和n点确定的线段fn为第二运动路径。即控制虚拟摄像机从f点出发,在三维空间区域中沿线段fn,向第二圆形轨道r22和第一圆形轨道r2共同的圆心b点进行移动。通过上述步骤即可在第二曲面边界上、以及第一曲面边界与第二曲面边界中间的三维空间区域中,对虚拟对象进行观察。It is also assumed that a straight line determined based on points f and point b intersects the first circular orbit r2 at point n, as shown in FIG. 6 . Based on the assumptions of FIG. 5 , FIG. 6 and FIG. 7 , the line segment fn determined based on point f and point n is used as the second motion path. That is, the virtual camera is controlled to start from point f and move along the line segment fn in the three-dimensional space area to point b, which is the common center of the second circular orbit r22 and the first circular orbit r2. Through the above steps, the virtual object can be observed on the boundary of the second curved surface and in the three-dimensional space region between the boundary of the first curved surface and the boundary of the second curved surface.
可选地,虚拟摄像机进行缩放运动时的运动参数可以采用比例差值进行计算。即通过虚拟摄像机从第一曲面边界和第二曲面边界上获取对应点,从而基于对应点的位置、及对应点的显示比例,确定虚拟摄像机进行缩放运动时的运动参数,如缩放比例、运动速度等。Optionally, the motion parameter when the virtual camera performs the zooming motion may be calculated by adopting the proportional difference value. That is, the virtual camera is used to obtain corresponding points from the boundary of the first curved surface and the boundary of the second curved surface, so as to determine the motion parameters of the virtual camera during zooming motion based on the position of the corresponding point and the display ratio of the corresponding point, such as the zoom ratio and the motion speed. Wait.
可以理解的是,虚拟对象的各第二参考点也会随虚拟对象的缩放而进行移动。虚拟摄像机从第二曲面边界向第一曲面边界移动时,虚拟摄像机与虚拟对象的距离逐渐减小,此时,虚拟对象的尺寸逐渐增大,各第二参考点间的距离也逐渐增大。反之,虚拟摄像机从第一曲面边界向第二曲面边界移动时,虚拟摄像机与虚拟对象的距离逐渐增大,此时,虚拟对象的尺寸逐渐减小,各第二参考点间的距离也逐渐减小。简单来说,就是随着虚拟摄像机从第二曲面边界向第一曲面边界移动,各第二参考点逐渐分散;随着虚拟摄像机从第一曲面边界向第二曲面边界移动,各第二参考点逐渐聚拢。可选地,虚拟摄像机距离虚拟对象最远时,各第二参考点聚拢为一个第二参考点。It can be understood that each second reference point of the virtual object will also move as the virtual object is zoomed. When the virtual camera moves from the second curved surface boundary to the first curved surface boundary, the distance between the virtual camera and the virtual object gradually decreases. At this time, the size of the virtual object gradually increases, and the distance between the second reference points also gradually increases. Conversely, when the virtual camera moves from the first curved surface boundary to the second curved surface boundary, the distance between the virtual camera and the virtual object gradually increases. At this time, the size of the virtual object gradually decreases, and the distance between the second reference points also gradually decreases. little. Simply put, as the virtual camera moves from the second surface boundary to the first surface boundary, the second reference points are gradually dispersed; as the virtual camera moves from the first surface boundary to the second surface boundary, the second reference points gradually gather. Optionally, when the virtual camera is farthest from the virtual object, the second reference points are gathered into one second reference point.
需要说明的是,实际应用中,当虚拟摄像机处于第二曲面边界时,a、b、c三个第二参考点的纵向距离并不一定为图5所示。基于上文缩放运动及多个第二参考点的描述可知,虚拟摄像机处于第二曲面边界时,各第二参考点的纵向距离可以随虚拟摄像机与虚拟对象的距离进行变化。It should be noted that, in practical applications, when the virtual camera is on the boundary of the second curved surface, the longitudinal distances of the three second reference points a, b, and c are not necessarily as shown in FIG. 5 . Based on the above description of the zooming motion and the plurality of second reference points, when the virtual camera is on the boundary of the second curved surface, the longitudinal distance of each second reference point may vary with the distance between the virtual camera and the virtual object.
基于上述第二参考点移动规则,还可以预先获取缩放倍数与多个第二参考点之间的对应关系。仍基于上文对图5、图6和图7的假设,虚拟摄像机从f点向b点移动时,在界面700中,虚拟对象p随虚拟摄像机的移动逐渐放大。随着虚拟对象p逐渐放大,a、b、c三个第二参考点的纵向 距离按照缩放倍数与多个第二参考点之间的对应关系逐渐增大。反之,虚拟摄像机从b点向f点移动时,在界面700中,虚拟对象p随虚拟摄像机的移动逐渐缩小。随着虚拟对象p逐渐缩小,a、b、c三个第二参考点的纵向距离按照缩放倍数与多个第二参考点之间的对应关系逐渐减小。实际上,缩放倍数是由虚拟摄像机与虚拟对象的距离决定的。Based on the above-mentioned second reference point moving rule, the corresponding relationship between the zoom factor and the plurality of second reference points may also be acquired in advance. Still based on the above assumptions for FIG. 5 , FIG. 6 and FIG. 7 , when the virtual camera moves from point f to point b, in the interface 700 , the virtual object p is gradually enlarged as the virtual camera moves. As the virtual object p is gradually enlarged, the longitudinal distances of the three second reference points a, b, and c gradually increase according to the corresponding relationship between the zoom factor and the plurality of second reference points. On the contrary, when the virtual camera moves from point b to point f, in the interface 700, the virtual object p gradually shrinks as the virtual camera moves. As the virtual object p gradually shrinks, the longitudinal distances of the three second reference points a, b, and c gradually decrease according to the corresponding relationship between the zoom factor and the plurality of second reference points. Actually, the zoom factor is determined by the distance between the virtual camera and the virtual object.
通过上述步骤,就可以在第二曲面边界上、以及第一曲面边界和第二曲面边界中间的三维空间区域中,对虚拟对象进行多角度观察。Through the above steps, the virtual object can be observed from multiple angles on the boundary of the second curved surface and in the three-dimensional space region between the boundary of the first curved surface and the boundary of the second curved surface.
当然,虚拟对象的视觉特征信息不同,基于虚拟对象的视觉特征信息构建的第二曲面边界的形状也不相同。实际应用中,还可以根据虚拟对象的展示效果,通过调整第二参考点在三维空间中所处的位置参数、第二圆形轨道的参数以及第二曲线的参数,对第二曲面边界的形状进行调整。Of course, the visual feature information of the virtual object is different, and the shape of the second curved surface boundary constructed based on the visual feature information of the virtual object is also different. In practical applications, according to the display effect of the virtual object, by adjusting the position parameters of the second reference point in the three-dimensional space, the parameters of the second circular orbit, and the parameters of the second curve, the shape of the boundary of the second curved surface can be adjusted. make adjustments.
举例来说,可以在图8示出的编辑器中对各参考点及各圆形轨道的参数进行设置。图8中,待设置的参数包括绑定模型(Binding Mode)、样条曲线曲率(Spline Curvature)、各圆形轨道的半径及高度。比如TopRig、MiddleRig、BottomRig分别对应于上、中、下三个圆形轨道的参数设置选项。For example, parameters of each reference point and each circular track can be set in the editor shown in FIG. 8 . In Figure 8, the parameters to be set include the binding mode (Binding Mode), the spline curve curvature (Spline Curvature), the radius and height of each circular track. For example, TopRig, MiddleRig, and BottomRig correspond to the parameter setting options of the upper, middle, and lower circular tracks, respectively.
实际应用中,还可以通过图9示出的编辑器中各圆形轨道的参数进行设置。其中,follow选项用于设置参考点对应的参数,Freelook选项用于设置设定三维空间中的轴点(即虚拟摄像机在设定三维空间中进行运动时所处的移动点)。In practical applications, it can also be set through the parameters of each circular track in the editor shown in FIG. 9 . Among them, the follow option is used to set the parameters corresponding to the reference point, and the Freelook option is used to set the pivot point in the three-dimensional space (that is, the moving point where the virtual camera moves in the three-dimensional space).
实际应用中,曲面边界中还可以包括其他形状的轨道,如椭圆轨道,本发明实施例中并不限定。如图10示出的曲面边界中包括两个椭圆轨道和3个圆形轨道。In practical applications, the curved surface boundary may also include orbits of other shapes, such as elliptical orbits, which are not limited in this embodiment of the present invention. The curved boundary shown in Figure 10 includes two elliptical orbits and three circular orbits.
除了上述步骤中所设置的设定三维空间(即第一曲面边界、第二曲面边界、以及第一曲面边界和第二曲面边界中间的三维空间区域)之外,为实现对虚拟对象的多角度观察,还可以采用如下方式对虚拟摄像机所处的设定三维空间以及观察角度进行设置:In addition to the set three-dimensional space set in the above steps (ie, the first curved surface boundary, the second curved surface boundary, and the three-dimensional space area between the first curved surface boundary and the second curved surface boundary), in order to realize the multi-angle of virtual objects For observation, you can also use the following methods to set the set 3D space where the virtual camera is located and the observation angle:
假设虚拟对象的展示方法应用于图形界面,该图形界面中加载有虚拟对象。假设该虚拟对象处于三维空间中。为了展示虚拟对象在该三维空间中的姿态,需要加载虚拟摄像机,用以采集该虚拟对象的展示图像。It is assumed that the display method of virtual objects is applied to a graphical interface, and virtual objects are loaded in the graphical interface. Assume that the virtual object is in three-dimensional space. In order to display the posture of the virtual object in the three-dimensional space, a virtual camera needs to be loaded to collect a display image of the virtual object.
为避免用户观察到虚拟角色的异常区域,需要对虚拟摄像机的观察视角进行限定。简单来说,就是需要对虚拟摄像机的位置和取景视角进行限定。与上文类似,虚拟摄像机所能运动的三维空间即设定三维空间。该设定三维空间的其中一种设置方法可以是:In order to prevent the user from observing the abnormal area of the virtual character, the viewing angle of the virtual camera needs to be limited. Simply put, it is necessary to limit the position and viewing angle of the virtual camera. Similar to the above, the three-dimensional space in which the virtual camera can move is the set three-dimensional space. One of the setting methods for setting the 3D space can be:
首先,设置虚拟摄像机对应的第一范围桶,该第一范围桶包括三个轴点。First, a first range bucket corresponding to the virtual camera is set, and the first range bucket includes three pivot points.
具体地,设置虚拟对象上的三个视点(即上文的第一参考点)。例如,虚拟虚拟对象为某一角色时,这三个视点可以分别处于虚拟角色的颈部、腰部、膝盖。为区别,该视点称为第一视点。基于这三个第一视点设置虚 拟摄像机的移动点,即这三个第一视点各自对应的三个轴点。为区分,该轴点称为第一轴点。为避免用户观察到虚拟角色的异常区域,同时也为避免虚拟摄像机与虚拟模型发生碰撞,可选地,第一轴点与对应的第一视点之间的距离大于或等于预设距离。由这三个轴点插值计算出各自对应的三个圆形轨迹(即上文的第一圆形轨道),从而由这三个圆形轨迹构成虚拟摄像机对应的范围桶。为区分,该范围桶称为第一范围桶。Specifically, three viewpoints on the virtual object (ie, the first reference points above) are set. For example, when the virtual virtual object is a character, the three viewpoints may be located at the neck, waist, and knee of the virtual character, respectively. For distinction, this viewpoint is called the first viewpoint. The moving points of the virtual camera are set based on the three first viewpoints, that is, the three axis points corresponding to the three first viewpoints. For distinction, this pivot point is called the first pivot point. In order to prevent the user from observing the abnormal area of the virtual character, and also to avoid collision between the virtual camera and the virtual model, optionally, the distance between the first axis point and the corresponding first viewpoint is greater than or equal to a preset distance. Three corresponding circular trajectories (ie, the first circular trajectories above) are calculated by interpolation of these three axis points, so that the range buckets corresponding to the virtual camera are formed by these three circular trajectories. For distinction, this range bucket is called the first range bucket.
基于第一范围桶,102中基于相对位置信息确定虚拟摄像机的运动权限,还可以具体实现为:Based on the first range bucket, the motion permission of the virtual camera is determined based on the relative position information in 102, which can also be specifically implemented as:
若虚拟摄像机到虚拟对象的距离等于第一阈值,则确定虚拟摄像机的运动权限包括在第一范围桶中的第一运动权限。其中,设定三维空间包括环绕于虚拟对象的第一范围桶,第一范围桶到虚拟对象的距离为第一阈值。If the distance from the virtual camera to the virtual object is equal to the first threshold, it is determined that the motion permission of the virtual camera includes the first motion permission in the first range bucket. The set three-dimensional space includes a first range bucket surrounding the virtual object, and the distance from the first range bucket to the virtual object is a first threshold.
进而,假设虚拟对象包括多个第一视点。假设这多个第一视点与第一范围桶中的多个第一轴点一一对应。并且假设第一范围桶是由多个第一轴点插值计算得到的多个第一圆形轨迹组成的。基于上述假设,103中,响应于对图形界面的触控指令,控制虚拟摄像机在设定三维空间中根据触控指令和运动权限进行运动,还可以具体实现为:Furthermore, it is assumed that the virtual object includes a plurality of first viewpoints. It is assumed that the multiple first viewpoints correspond one-to-one with the multiple first axis points in the first range bucket. And it is assumed that the first range bucket is composed of multiple first circular trajectories calculated by interpolation of multiple first axis points. Based on the above assumptions, in 103, in response to the touch command on the graphical interface, the virtual camera is controlled to move in the set three-dimensional space according to the touch command and the motion authority, which can also be specifically implemented as:
若检测到触控指令,则获取触控指令的移动轨迹;根据触控指令的移动轨迹以及第一运动权限,控制虚拟摄像机在第一范围桶中进行运动。If the touch command is detected, the movement track of the touch command is obtained; according to the movement track of the touch command and the first motion authority, the virtual camera is controlled to move in the first range bucket.
其中,虚拟摄像机的光轴指向由虚拟摄像机所处的第一轴点指向该第一轴点对应的第一视点。具体来说,在第一范围桶中,虚拟摄像机可以各第一轴点以及各第一轴点对应的插值点间进行移动。实际上,虚拟摄像机在第一范围桶中的运动方向包括纵向、横向、以及横纵向叠加出的任意方向。但无论虚拟摄像机沿着何种运动方向进行运动,虚拟摄像机的光轴指向始终是由所处第一轴点指向该第一轴点对应的第一视点。Wherein, the optical axis of the virtual camera points from the first axis point where the virtual camera is located to the first viewpoint corresponding to the first axis point. Specifically, in the first range bucket, the virtual camera can move between the first pivot points and the interpolation points corresponding to the first pivot points. Actually, the movement direction of the virtual camera in the first range bucket includes vertical direction, horizontal direction, and any direction superimposed between horizontal and vertical direction. However, no matter what moving direction the virtual camera moves along, the optical axis of the virtual camera always points from the first axis point to the first viewpoint corresponding to the first axis point.
举例来说,虚拟摄像机在第一范围桶中的运动过程例如是:假设第一轴点形成的圆形轨迹平行于地面。假设第一轴点包括x、y、z,各自对应的第一视点为x’、y’、z’。假设虚拟摄像机处于第一轴点x。基于上述假设,虚拟摄像机进行横向运动时,虚拟摄像机沿第一轴点x对应的圆形轨迹进行环绕虚拟对象的运动,虚拟摄像机的光轴指向始终是由所处第一轴点x指向该第一轴点x对应的第一视点x’。虚拟摄像机进行纵向运动时,虚拟摄像机在第一轴点x与第一轴点y之间的插值点进行纵向运动,虚拟摄像机的光轴指向是由所处插值点指向该插值点对应的第一视点x’(或第一视点y’)。此纵向运动过程中光轴指向切换的方法与上文中光轴指向切换的方法类似,此处不再展开。For example, the movement process of the virtual camera in the bucket of the first range is, for example, assuming that the circular trajectory formed by the first axis point is parallel to the ground. It is assumed that the first axis points include x, y, and z, and the corresponding first viewpoints are x', y', and z'. Suppose the virtual camera is at the first axis point x. Based on the above assumptions, when the virtual camera moves laterally, the virtual camera moves around the virtual object along the circular trajectory corresponding to the first axis point x, and the optical axis of the virtual camera always points from the first axis point x to the first axis point x. A first viewpoint x' corresponding to an axis point x. When the virtual camera moves longitudinally, the virtual camera moves longitudinally at the interpolation point between the first axis point x and the first axis point y, and the optical axis of the virtual camera points from the interpolation point to the first axis corresponding to the interpolation point. Viewpoint x' (or first viewpoint y'). The method of switching the orientation of the optical axis during this longitudinal movement is similar to the method of switching the orientation of the optical axis in the above, and will not be expanded here.
进而,设置虚拟摄像机对应的第二范围桶,该第二范围桶包括三个轴点。Furthermore, a second range bucket corresponding to the virtual camera is set, and the second range bucket includes three axis points.
具体地,设置虚拟对象上的三个视点(即上文的第二参考点)。为区别,该视点称为第二视点。可以理解的,第二视点可以与第一视点重合,也可以不重合。基于这三个第二视点设置虚拟摄像机的移动点,即这三个 第二视点各自对应的三个轴点。为区分,该轴点称为第二轴点。由这三个轴点插值计算出各自对应的三个圆形轨迹(即上文的第二圆形轨道),从而由这三个圆形轨迹构成虚拟摄像机对应的范围桶。为区分,该范围桶称为第二范围桶。Specifically, three viewpoints on the virtual object (ie, the second reference point above) are set. For distinction, this viewpoint is called the second viewpoint. It can be understood that the second viewpoint may or may not overlap with the first viewpoint. The moving points of the virtual camera are set based on the three second viewpoints, that is, the three axis points corresponding to the three second viewpoints. For distinction, this pivot point is called the second pivot point. Three corresponding circular trajectories (ie, the second circular trajectories above) are calculated by interpolation of these three axis points, so that the range buckets corresponding to the virtual camera are formed by these three circular trajectories. To distinguish, this range bucket is called the second range bucket.
实际应用中,需要注意的是,第二轴点到第二视点的距离大于第一轴点到第一视点的距离。因此,第二范围桶环绕在第一范围桶外侧,第一范围桶环绕于虚拟对象外侧。In practical applications, it should be noted that the distance from the second axis point to the second viewpoint is greater than the distance from the first axis point to the first viewpoint. Therefore, the second range bucket wraps around the outside of the first range bucket, and the first range bucket wraps around the outside of the virtual object.
在第二范围桶中,虚拟摄像机可以各第二轴点以及各第二轴点对应的插值点间进行移动。还可以在第二范围桶与第一范围桶之间的三维空间区域中进行移动。实际上,虚拟摄像机在第二范围桶中的运动方向也包括纵向、横向、以及横纵向叠加出的任意方向。但无论虚拟摄像机沿着何种运动方向进行运动,虚拟摄像机的光轴指向始终是由所处第二轴点指向该第二轴点对应的第二视点。In the second range bucket, the virtual camera can move between each second axis point and the interpolation point corresponding to each second axis point. It is also possible to move in a three-dimensional space region between the second range bucket and the first range bucket. Actually, the movement direction of the virtual camera in the second range bucket also includes the vertical direction, the horizontal direction, and any direction superimposed between the horizontal and vertical directions. However, no matter what moving direction the virtual camera moves along, the optical axis of the virtual camera always points from the second axis point to the second viewpoint corresponding to the second axis point.
需要注意的是,上述视点会随着虚拟摄像机在两个范围桶间的运动进行移动。It should be noted that the above viewpoint will move with the movement of the virtual camera between the two range buckets.
可选地,虚拟摄像机到虚拟对象的距离越小,多个第二视点越大。具体来说,随着虚拟摄像机从第二范围桶向第一范围桶移动,由于虚拟摄像机与虚拟对象的相对距离逐渐缩小,可以观察到三个第二视点逐渐分开。若虚拟摄像机处于第二范围桶上,由于虚拟摄像机与虚拟对象的相对距离最远,可以观察到三个第二轴点对应的第二视点间距离较近,比如可以观察到三个第二视点聚合为一点。这是因为:虚拟摄像机处于第二范围桶上时,无论虚拟摄像机移动到哪一个第二轴点,虚拟摄像机的光轴指向始终是指向虚拟对象上对应的第二视点,由于此时观察到的虚拟对象的尺寸较小,因而,会观察到虚拟对象中这三个第二轴点对应的第二视点间距离较近,甚至聚合为一点;而随着虚拟摄像机与虚拟对象的相对距离变小,观察到的虚拟对象的尺寸变大,为保证能够观察到虚拟对象的整体,需要将虚拟对象中这三个第二轴点对应的第二视点逐渐分散。Optionally, the smaller the distance from the virtual camera to the virtual object, the larger the plurality of second viewpoints. Specifically, as the virtual camera moves from the second range bucket to the first range bucket, as the relative distance between the virtual camera and the virtual object gradually decreases, it can be observed that the three second viewpoints are gradually separated. If the virtual camera is on the second range bucket, since the relative distance between the virtual camera and the virtual object is the farthest, it can be observed that the distances between the second viewpoints corresponding to the three second axis points are relatively close, for example, three second viewpoints can be observed. aggregate into one point. This is because: when the virtual camera is on the second range bucket, no matter which second axis point the virtual camera moves to, the optical axis of the virtual camera always points to the corresponding second viewpoint on the virtual object. The size of the virtual object is small, therefore, it will be observed that the distance between the second viewpoints corresponding to the three second axis points in the virtual object is relatively close, or even aggregated into one point; as the relative distance between the virtual camera and the virtual object becomes smaller , the size of the observed virtual object increases. To ensure that the entire virtual object can be observed, the second viewpoints corresponding to the three second axis points in the virtual object need to be gradually dispersed.
基于上述第二范围桶,102中基于相对位置信息确定虚拟摄像机的运动权限,还可以具体实现为:Based on the second range bucket, the motion permission of the virtual camera is determined based on the relative position information in 102, which can also be specifically implemented as:
若虚拟摄像机到虚拟对象的距离大于第一阈值,并且,虚拟摄像机到虚拟对象的距离小于第二阈值,则确定虚拟摄像机的运动权限包括在第二范围桶中的第二运动权限、以及在第二范围桶与第一范围桶之间的第三运动权限。其中,第二阈值大于第一阈值,设定三维空间包括环绕于虚拟对象的第二范围桶及第一范围桶,第二范围桶到虚拟对象的距离为第二阈值,第一范围桶到虚拟对象的距离为第一阈值。If the distance from the virtual camera to the virtual object is greater than the first threshold, and the distance from the virtual camera to the virtual object is less than the second threshold, it is determined that the motion permission of the virtual camera includes the second motion permission in the second range bucket and the second motion permission in the second range bucket. The third movement permission between the second range bucket and the first range bucket. The second threshold is greater than the first threshold, and the three-dimensional space is set to include a second range bucket and a first range bucket surrounding the virtual object, the distance from the second range bucket to the virtual object is the second threshold, and the first range bucket to the virtual object The distance of the object is the first threshold.
进而,假设虚拟对象包括多个第二视点。假设这多个第二视点与第二范围桶中的多个第二轴点一一对应。并且假设第二范围桶是由多个第二轴点插值计算得到的多个第二圆形轨迹组成的。基于上述假设,103中响应于对图形界面的触控指令,控制虚拟摄像机在设定三维空间中根据触控指 令和运动权限进行运动,还可以实现为:Furthermore, it is assumed that the virtual object includes a plurality of second viewpoints. It is assumed that the plurality of second viewpoints correspond one-to-one with the plurality of second axis points in the second range bucket. And it is assumed that the second range bucket is composed of multiple second circular trajectories calculated by interpolation of multiple second axis points. Based on the above assumptions, in 103, in response to the touch command to the graphical interface, the virtual camera is controlled to move according to the touch command and the motion authority in the set three-dimensional space, which can also be implemented as:
检测到触控指令,则获取触控指令的移动轨迹;根据触控指令的移动轨迹以及第二运动权限,控制虚拟摄像机在第二范围桶中进行运动;或者根据触控指令的移动轨迹以及第三运动权限,控制虚拟摄像机在第二范围桶与第一范围桶之间进行运动。其中,虚拟摄像机的光轴指向由虚拟摄像机所处的第二轴点指向该第二轴点对应的第二视点。When the touch command is detected, the movement track of the touch command is obtained; according to the movement track of the touch command and the second motion permission, the virtual camera is controlled to move in the second range bucket; or the movement track of the touch command and the second movement authority are controlled; Three motion permissions, controlling the virtual camera to move between the second range bucket and the first range bucket. Wherein, the optical axis of the virtual camera points from the second axis point where the virtual camera is located to the second viewpoint corresponding to the second axis point.
这样,通过六个视点以及各自对应的六个轴点可以设置出两个范围桶。从而,通过虚拟摄像机在两个范围桶上以及两个范围桶间的运动,实现对虚拟对象的多角度观察。并通过两个范围桶之间的空间,以及轴点的位置,限制视点道道虚拟对象的指定部位,如虚拟对象的裙子内侧部位等等。In this way, two range buckets can be set through six viewpoints and six corresponding pivot points. Therefore, through the movement of the virtual camera on the two range buckets and between the two range buckets, the multi-angle observation of the virtual object is realized. And through the space between the two range buckets and the position of the pivot point, the specified parts of the virtual object from the viewpoint are limited, such as the inner part of the virtual object's skirt and so on.
图1示出的虚拟对象的展示方法的执行过程中,通过控制虚拟摄像机在设定三维空间中根据触控指令和所述运动权限进行运动,实现了在设定三维空间中对虚拟对象的多角度展示,既为用户提供了更丰富的观察视角,又通过设定三维空间和运动权限避免了某些视角下对虚拟对象的异常展示,提升用户体验。During the execution of the method for displaying virtual objects shown in FIG. 1 , by controlling the virtual camera to move according to the touch command and the motion authority in the set three-dimensional space, multiple virtual objects can be displayed in the set three-dimensional space. The angle display not only provides users with a richer viewing angle, but also avoids abnormal display of virtual objects from certain perspectives by setting three-dimensional space and motion permissions, improving user experience.
以下将详细描述本发明的一个或多个实施例的虚拟对象的展示装置。本领域技术人员可以理解,这些虚拟对象的展示装置均可使用市售的硬件组件通过本方案所教导的步骤进行配置来构成。The apparatus for displaying virtual objects according to one or more embodiments of the present invention will be described in detail below. Those skilled in the art can understand that these virtual object display devices can be configured by using commercially available hardware components through the steps taught in this solution.
图6为本发明实施例提供的一种虚拟对象的展示装置的结构示意图。该装置应用于图形界面,该图形界面中加载有虚拟对象和虚拟摄像机,该虚拟摄像机用于采集对该虚拟对象的展示图像,如图11所示,该虚拟对象的展示装置包括:第一确定模块11、第二确定模块12、控制模块13。FIG. 6 is a schematic structural diagram of an apparatus for displaying virtual objects according to an embodiment of the present invention. The device is applied to a graphical interface, the graphical interface is loaded with a virtual object and a virtual camera, and the virtual camera is used to collect a display image of the virtual object. As shown in FIG. 11 , the display device of the virtual object includes: a first determination Module 11 , a second determination module 12 , and a control module 13 .
第一确定模块11,用于确定所述虚拟摄像机与所述虚拟对象的相对位置信息;a first determining module 11, configured to determine relative position information of the virtual camera and the virtual object;
第二确定模块12,用于基于所述相对位置信息确定所述虚拟摄像机的运动权限;a second determination module 12, configured to determine the motion authority of the virtual camera based on the relative position information;
控制模块13,用于响应于对所述图形界面的触控指令,控制所述虚拟摄像机在设定三维空间中根据所述触控指令和所述运动权限进行运动,以调整所述展示图像。The control module 13 is configured to, in response to a touch command on the graphical interface, control the virtual camera to move in a set three-dimensional space according to the touch command and the motion authority, so as to adjust the display image.
可选地,所述相对位置信息包括所述虚拟摄像机到所述虚拟对象的距离。Optionally, the relative position information includes a distance from the virtual camera to the virtual object.
所述第二确定模块12在基于所述相对位置信息确定所述虚拟摄像机的运动权限时,具体用于:若所述虚拟摄像机到所述虚拟对象的距离小于第一阈值,则确定所述虚拟摄像机的运动权限包括第一方向运动权限和第二方向运动权限,其中第一方向和第二方向根据所述虚拟对象在三维空间中的姿态预先设定。When determining the motion permission of the virtual camera based on the relative position information, the second determining module 12 is specifically configured to: if the distance from the virtual camera to the virtual object is less than a first threshold, determine the virtual camera. The motion authority of the camera includes a first direction motion authority and a second direction motion authority, wherein the first direction and the second direction are preset according to the posture of the virtual object in the three-dimensional space.
可选地,所述设定三维空间包括环绕于所述虚拟对象的第一曲面边界,所述第一曲面边界到所述虚拟对象的距离小于或等于所述第一阈值。Optionally, the setting of the three-dimensional space includes a first curved surface boundary surrounding the virtual object, and a distance from the first curved surface boundary to the virtual object is less than or equal to the first threshold.
所述控制模块13具体用于:若检测到所述触控指令,则获取所述触控指令的移动轨迹;根据所述触控指令的移动轨迹以及所述运动权限,确定所述虚拟摄像机在所述第一曲面边界上的第一运动路径;控制所述虚拟摄像机在所述第一运动路径上进行运动。The control module 13 is specifically configured to: if the touch command is detected, obtain the movement track of the touch command; and determine whether the virtual camera is in operation according to the movement track of the touch command and the motion permission. a first motion path on the boundary of the first curved surface; controlling the virtual camera to move on the first motion path.
可选地,所述虚拟对象包括多个第一参考点,所述第一曲面边界包括多个第一圆形轨道以及经过所述多个第一圆形轨道的多条第一曲线,各第一圆形轨道分别以所述多个第一参考点中各自对应的第一参考点为中心。Optionally, the virtual object includes a plurality of first reference points, the first curved surface boundary includes a plurality of first circular orbits and a plurality of first curves passing through the plurality of first circular orbits, each A circular track is respectively centered on the corresponding first reference points among the plurality of first reference points.
可选地,所述控制模块13在根据所述触控指令的移动轨迹以及所述运动权限,确定所述虚拟摄像机在所述第一曲面边界上的第一运动路径时,具体用于:若所述触控指令的移动轨迹的方向为第一方向,并且所述运动权限包括第一方向运动权限,则从所述多条第一曲线中选取经过所述虚拟摄像机所处位置的第一曲线作为所述第一运动路径,其中,所述第一运动路径的起点为所述虚拟摄像机所处位置。Optionally, when the control module 13 determines the first movement path of the virtual camera on the first curved surface boundary according to the movement trajectory of the touch control instruction and the movement authority, the control module 13 is specifically configured to: if The direction of the movement track of the touch command is the first direction, and the movement authority includes the movement authority in the first direction, then a first curve passing through the position of the virtual camera is selected from the plurality of first curves As the first motion path, the starting point of the first motion path is the position where the virtual camera is located.
可选地,所述控制模块13在所述根据所述触控指令的移动轨迹以及所述运动权限,确定所述虚拟摄像机在所述第一曲面边界上的第一运动路径时,具体用于:若所述触控指令的移动轨迹的方向为第二方向,并且所述运动权限包括第二方向运动权限,则以所述多个第一圆形轨道中所述虚拟摄像机所处的第一圆形轨道i作为所述第一运动路径,所述第二方向平行于所述第一圆形轨道i所在平面。Optionally, when the control module 13 determines the first movement path of the virtual camera on the boundary of the first curved surface according to the movement trajectory of the touch control instruction and the movement authority, specifically: : If the direction of the movement track of the touch command is the second direction, and the motion permission includes the permission to move in the second direction, the first circular track where the virtual camera is located is used as the first The circular orbit i is used as the first movement path, and the second direction is parallel to the plane where the first circular orbit i is located.
可选地,所述相对位置信息包括所述虚拟摄像机到所述虚拟对象的距离。Optionally, the relative position information includes a distance from the virtual camera to the virtual object.
所述第二确定模块12基于所述相对位置信息确定所述虚拟摄像机的运动权限时,具体用于:若所述虚拟摄像机到所述虚拟对象的距离大于第一阈值,并且,所述虚拟摄像机到所述虚拟对象的距离小于第二阈值,则确定所述虚拟摄像机的运动权限包括第一方向运动权限、第二方向运动权限以及缩放运动权限。When the second determination module 12 determines the motion permission of the virtual camera based on the relative position information, it is specifically configured to: if the distance from the virtual camera to the virtual object is greater than a first threshold, and the virtual camera If the distance to the virtual object is less than the second threshold, it is determined that the motion authority of the virtual camera includes the first direction motion authority, the second direction motion authority and the zoom motion authority.
其中,所述第二阈值大于所述第一阈值,第一方向和第二方向根据所述虚拟对象在三维空间中的姿态预先设定,缩放运动的方向垂直于所述第一方向和所述第二方向。The second threshold is greater than the first threshold, the first direction and the second direction are preset according to the posture of the virtual object in the three-dimensional space, and the direction of the zooming movement is perpendicular to the first direction and the second direction.
可选地,所述设定三维空间包括环绕于所述虚拟对象的第一曲面边界和第二曲面边界、以及处于所述第二曲面边界与所述第一曲面边界之间的三维空间区域。所述第一曲面边界到所述虚拟对象的距离小于或等于所述第一阈值,所述第二曲面边界到所述虚拟对象的距离大于所述第一阈值,所述第二曲面边界到所述虚拟对象的距离小于或等于所述第二阈值,所述第二阈值大于所述第一阈值。Optionally, the set three-dimensional space includes a first curved surface boundary and a second curved surface boundary surrounding the virtual object, and a three-dimensional space region between the second curved surface boundary and the first curved surface boundary. The distance from the first curved boundary to the virtual object is less than or equal to the first threshold, the distance from the second curved boundary to the virtual object is greater than the first threshold, and the distance from the second curved boundary to the The distance of the virtual object is less than or equal to the second threshold, and the second threshold is greater than the first threshold.
所述控制模块13在响应于对所述图形界面的触控指令,控制所述虚拟摄像机在设定三维空间中根据所述触控指令和所述运动权限进行运动时,具体用于:若检测到所述触控指令,则获取所述触控指令的移动轨迹;根据所述触控指令的移动轨迹以及所述运动权限,确定所述虚拟摄像机的 第二运动路径,其中,所述第二运动路径处于所述第二曲面边界上,或者所述第二运动路径处于所述三维空间区域中;控制所述虚拟摄像机在所述第二运动路径上进行运动。When the control module 13 controls the virtual camera to move according to the touch command and the motion permission in the set three-dimensional space in response to the touch command on the graphical interface, the control module 13 is specifically configured to: if detecting to the touch command, obtain the movement track of the touch command; determine the second movement path of the virtual camera according to the movement track of the touch command and the movement authority, wherein the second movement path is The motion path is on the boundary of the second curved surface, or the second motion path is in the three-dimensional space area; the virtual camera is controlled to move on the second motion path.
可选地,所述虚拟对象包括多个第二参考点,所述第二曲面边界包括多个第二圆形轨道以及经过所述多个第二圆形轨道的多条第二曲线,各第二圆形轨道分别以所述多个第二参考点中各自对应的第二参考点为中心。Optionally, the virtual object includes a plurality of second reference points, the second curved surface boundary includes a plurality of second circular orbits and a plurality of second curves passing through the plurality of second circular orbits, each of which The two circular orbits are respectively centered on the corresponding second reference points among the plurality of second reference points.
可选地,所述控制模块13在根据所述触控指令的移动轨迹以及所述运动权限,确定所述虚拟摄像机的第二运动路径时,具体用于:若所述触控指令的移动轨迹的方向为第一方向,并且所述运动权限包括第一方向运动权限,则从所述多条第二曲线中选取经过所述虚拟摄像机所处位置的第二曲线作为所述第二运动路径,其中,所述第二运动路径的起点为所述虚拟摄像机所处位置。Optionally, when determining the second movement path of the virtual camera according to the movement trajectory of the touch control instruction and the motion authority, the control module 13 is specifically configured to: if the movement trajectory of the touch control instruction The direction of the first direction is the first direction, and the movement authority includes the first direction movement authority, then select the second curve passing through the position of the virtual camera from the plurality of second curves as the second movement path, Wherein, the starting point of the second motion path is the position where the virtual camera is located.
可选地,所述控制模块13在根据所述触控指令的移动轨迹以及所述运动权限,确定所述虚拟摄像机的第二运动路径时,具体用于:若所述触控指令的移动轨迹的方向为第二方向,并且所述运动权限包括第二方向运动权限,则以所述多个第二圆形轨道中所述虚拟摄像机所处的第二圆形轨道i作为所述第二运动路径,其中所述第二方向平行于所述第二圆形轨道i所在平面。Optionally, when determining the second movement path of the virtual camera according to the movement trajectory of the touch control instruction and the motion authority, the control module 13 is specifically configured to: if the movement trajectory of the touch control instruction The direction is the second direction, and the movement permission includes the second direction movement permission, then the second circular track i where the virtual camera is located in the plurality of second circular tracks is used as the second movement path, wherein the second direction is parallel to the plane of the second circular track i.
可选地,所述控制模块13在根据所述触控指令的移动轨迹以及所述运动权限,确定所述虚拟摄像机的第二运动路径时,具体用于:若所述触控指令的移动轨迹的方向包括多个方向,并且所述运动权限包括缩放运动权限,则基于所述虚拟摄像机所处位置以及所述多条轨迹的移动方向,确定所述虚拟摄像机在所述三维空间区域中的所述第二运动路径。Optionally, when determining the second movement path of the virtual camera according to the movement trajectory of the touch control instruction and the motion authority, the control module 13 is specifically configured to: if the movement trajectory of the touch control instruction The direction of the virtual camera includes multiple directions, and the motion permission includes the zoom motion permission, then based on the position of the virtual camera and the moving directions of the multiple tracks, determine all the positions of the virtual camera in the three-dimensional space area. Describe the second motion path.
可选地,相对位置信息包括虚拟摄像机到虚拟对象的距离。第二确定模块12具体用于:若虚拟摄像机到虚拟对象的距离等于第一阈值,则确定虚拟摄像机的运动权限包括在第一范围桶中的第一运动权限;其中,设定三维空间包括环绕于虚拟对象的第一范围桶,第一范围桶到虚拟对象的距离为第一阈值。Optionally, the relative position information includes the distance from the virtual camera to the virtual object. The second determining module 12 is specifically configured to: if the distance from the virtual camera to the virtual object is equal to the first threshold, determine that the motion permission of the virtual camera includes the first motion permission in the first range bucket; For the first range bucket of the virtual object, the distance from the first range bucket to the virtual object is the first threshold.
可选地,虚拟对象包括多个第一视点,多个第一视点与第一范围桶中的多个第一轴点一一对应,第一范围桶是由多个第一轴点插值计算得到的多个第一圆形轨迹组成的。控制模块13在响应于对图形界面的触控指令,控制虚拟摄像机在设定三维空间中根据触控指令和运动权限进行运动时,具体用于:若检测到触控指令,则获取触控指令的移动轨迹;根据触控指令的移动轨迹以及第一运动权限,控制虚拟摄像机在第一范围桶中进行运动。其中,虚拟摄像机的光轴指向由虚拟摄像机所处的第一轴点指向该第一轴点对应的第一视点。Optionally, the virtual object includes a plurality of first viewpoints, and the plurality of first viewpoints are in one-to-one correspondence with the plurality of first axis points in the first range bucket, and the first range bucket is obtained by interpolation of the plurality of first axis points. is composed of a plurality of first circular trajectories. When the control module 13 controls the virtual camera to move according to the touch command and the motion authority in the set three-dimensional space in response to the touch command on the graphical interface, the control module 13 is specifically configured to: if the touch command is detected, obtain the touch command according to the movement trajectory of the touch command and the first motion permission, control the virtual camera to move in the first range bucket. Wherein, the optical axis of the virtual camera points from the first axis point where the virtual camera is located to the first viewpoint corresponding to the first axis point.
可选地,相对位置信息包括虚拟摄像机到虚拟对象的距离。第二确定模块12具体用于:若虚拟摄像机到虚拟对象的距离大于第一阈值,并且,虚拟摄像机到虚拟对象的距离小于第二阈值,则确定虚拟摄像机的运动权 限包括在第二范围桶中的第二运动权限、以及在第二范围桶与第一范围桶之间的第三运动权限。其中,第二阈值大于第一阈值,设定三维空间包括环绕于虚拟对象的第二范围桶及第一范围桶,第二范围桶到虚拟对象的距离为第二阈值,第一范围桶到虚拟对象的距离为第一阈值。Optionally, the relative position information includes the distance from the virtual camera to the virtual object. The second determining module 12 is specifically configured to: if the distance from the virtual camera to the virtual object is greater than the first threshold, and the distance from the virtual camera to the virtual object is less than the second threshold, then determine that the motion permission of the virtual camera is included in the second range bucket and a third movement authority between the second range bucket and the first range bucket. The second threshold is greater than the first threshold, and the three-dimensional space is set to include a second range bucket and a first range bucket surrounding the virtual object, the distance from the second range bucket to the virtual object is the second threshold, and the first range bucket to the virtual object The distance of the object is the first threshold.
可选地,虚拟对象包括多个第二视点,多个第二视点与第二范围桶中的多个第二轴点一一对应,第二范围桶是由多个第二轴点插值计算得到的多个第二圆形轨迹组成的。控制模块13在响应于对图形界面的触控指令,控制虚拟摄像机在设定三维空间中根据触控指令和运动权限进行运动时,具体用于:检测到触控指令,则获取触控指令的移动轨迹;根据触控指令的移动轨迹以及第二运动权限,控制虚拟摄像机在第二范围桶中进行运动;或者根据触控指令的移动轨迹以及第三运动权限,控制虚拟摄像机在第二范围桶与第一范围桶之间进行运动。Optionally, the virtual object includes multiple second viewpoints, and the multiple second viewpoints correspond one-to-one with multiple second pivot points in the second range bucket, and the second range bucket is calculated by interpolation of multiple second pivot points. of multiple second circular trajectories. When the control module 13 controls the virtual camera to move according to the touch command and the motion authority in the set three-dimensional space in response to the touch command on the graphical interface, the control module 13 is specifically used for: detecting the touch command, and obtaining the touch command's information. Movement track; control the virtual camera to move in the second range bucket according to the movement track of the touch command and the second movement permission; or control the virtual camera to move in the second range bucket according to the movement track of the touch command and the third movement permission Motion to and from the first range bucket.
其中,虚拟摄像机的光轴指向由虚拟摄像机所处的第二轴点指向该第二轴点对应的第二视点。Wherein, the optical axis of the virtual camera points from the second axis point where the virtual camera is located to the second viewpoint corresponding to the second axis point.
可选地,虚拟摄像机到虚拟对象的距离越小,多个第二视点越大;并且若虚拟摄像机处于第二范围桶中,多个第二视点聚合为一点。Optionally, the smaller the distance between the virtual camera and the virtual object, the larger the multiple second viewpoints; and if the virtual camera is in the second range bucket, the multiple second viewpoints are aggregated into one point.
图11所示虚拟对象的展示装置可以执行前述各实施例中提供的方法,本实施例未详细描述的部分,可参考前述实施例的相关说明,在此不再赘述。The apparatus for displaying virtual objects shown in FIG. 11 may execute the methods provided in the foregoing embodiments. For the parts not described in detail in this embodiment, reference may be made to the relevant descriptions of the foregoing embodiments, which will not be repeated here.
在一个可能的设计中,上述图11所示的虚拟对象的展示装置的结构可实现为一电子设备。In a possible design, the structure of the virtual object display apparatus shown in FIG. 11 can be implemented as an electronic device.
如图12所示,该电子设备可以包括:处理器21、存储器22。其中,所述存储器22上存储有可执行代码,当所述可执行代码被所述处理器21执行时,至少使所述处理器21可以实现如前述实施例中提供的虚拟对象的展示方法。其中,该电子设备的结构中还可以包括通信接口23,用于与其他设备或通信网络通信。As shown in FIG. 12 , the electronic device may include: a processor 21 and a memory 22 . The memory 22 stores executable codes, and when the executable codes are executed by the processor 21, at least the processor 21 can implement the method for displaying virtual objects provided in the foregoing embodiments. The structure of the electronic device may further include a communication interface 23 for communicating with other devices or a communication network.
另外,本发明实施例提供了一种非暂时性机器可读存储介质,所述非暂时性机器可读存储介质上存储有可执行代码,当所述可执行代码被无线路由器的处理器执行时,使所述处理器执行前述各实施例中提供的虚拟对象的展示方法。In addition, an embodiment of the present invention provides a non-transitory machine-readable storage medium, where executable codes are stored on the non-transitory machine-readable storage medium, and when the executable codes are executed by a processor of a wireless router , causing the processor to execute the method for displaying virtual objects provided in the foregoing embodiments.
根据需要,本发明各实施例的系统、方法和装置可以实现为纯粹的软件(例如用Java来编写的软件程序),也可以根据需要实现为纯粹的硬件(例如专用ASIC芯片或FPGA芯片),还可以实现为结合了软件和硬件的系统(例如存储有固定代码的固件系统或者带有通用存储器和处理器的系统)。As required, the systems, methods and apparatuses of the embodiments of the present invention can be implemented as pure software (for example, a software program written in Java), or can be implemented as pure hardware (for example, a dedicated ASIC chip or FPGA chip) as required, It may also be implemented as a system combining software and hardware (eg, a firmware system with fixed code stored or a system with a general-purpose memory and processor).
本发明的另一个方面是一种计算机可读介质,其上存储有计算机可读指令,所述指令被执行时可实施本发明各实施例的方法。Another aspect of the present invention is a computer-readable medium having computer-readable instructions stored thereon that, when executed, perform the methods of various embodiments of the present invention.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员 应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的虚拟对象展示设备中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。Various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the virtual object display device according to the embodiment of the present invention. The present invention can also be implemented as apparatus or apparatus programs (eg, computer programs and computer program products) for performing part or all of the methods described herein. Such a program implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such signals may be downloaded from Internet sites, or provided on carrier signals, or in any other form.
例如,图13示出了可以实现根据本发明的虚拟对象展示方法的服务器,例如应用服务器。该服务器传统上包括处理器1310和以存储器1320形式的计算机程序产品或者计算机可读介质。存储器1320可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器1320具有用于执行上述方法中的任何方法步骤的程序代码1331的存储空间1330。例如,用于程序代码的存储空间1330可以包括分别用于实现上面的方法中的各种步骤的各个程序代码1331。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为如参考图14所述的便携式或者固定存储单元。该存储单元可以具有与图13的服务器中的存储器1320类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括计算机可读代码1331’,即可以由例如诸如1310之类的处理器读取的代码,这些代码当由服务器运行时,导致该服务器执行上面所描述的方法中的各个步骤。For example, FIG. 13 shows a server, such as an application server, that can implement the virtual object presentation method according to the present invention. The server traditionally includes a processor 1310 and a computer program product or computer readable medium in the form of memory 1320 . The memory 1320 may be electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM. The memory 1320 has storage space 1330 for program code 1331 for performing any of the method steps in the above-described methods. For example, the storage space 1330 for program codes may include various program codes 1331 for implementing various steps in the above methods, respectively. These program codes can be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks. Such computer program products are typically portable or fixed storage units as described with reference to FIG. 14 . The storage unit may have storage segments, storage spaces, etc. arranged similarly to the storage 1320 in the server of FIG. 13 . The program code may, for example, be compressed in a suitable form. Typically, the storage unit includes computer readable code 1331', i.e. code readable by a processor such as 1310 for example, which when executed by a server, causes the server to perform the various steps in the methods described above.
本文中所称的“一个实施例”、“实施例”或者“一个或者多个实施例”意味着,结合实施例描述的特定特征、结构或者特性包括在本发明的至少一个实施例中。此外,请注意,这里“在一个实施例中”的词语例子不一定全指同一个实施例。Reference herein to "one embodiment," "an embodiment," or "one or more embodiments" means that a particular feature, structure, or characteristic described in connection with an embodiment is included in at least one embodiment of the present invention. Also, please note that instances of the phrase "in one embodiment" herein are not necessarily all referring to the same embodiment.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下被实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. It will be understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-described embodiments illustrate rather than limit the invention, and that alternative embodiments may be devised by those skilled in the art without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. do not denote any order. These words can be interpreted as names.
此外,还应当注意,本说明书中使用的语言主要是为了可读性和教导 的目的而选择的,而不是为了解释或者限定本发明的主题而选择的。因此,在不偏离所附权利要求书的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。对于本发明的范围,对本发明所做的公开是说明性的,而非限制性的,本发明的范围由所附权利要求书限定。Furthermore, it should also be noted that the language used in this specification has been principally selected for readability and teaching purposes, rather than to explain or define the subject matter of the invention. Accordingly, many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the appended claims. This disclosure is intended to be illustrative, not restrictive, as to the scope of the present invention, which is defined by the appended claims.

Claims (17)

  1. 一种虚拟对象的展示方法,其特征在于,所述方法应用于图形界面,所述图形界面中加载有虚拟对象和虚拟摄像机,所述虚拟摄像机用于采集对所述虚拟对象的展示图像,所述方法包括:A method for displaying virtual objects, characterized in that the method is applied to a graphical interface, wherein a virtual object and a virtual camera are loaded in the graphical interface, and the virtual camera is used to collect a display image of the virtual object, and the The methods described include:
    确定所述虚拟摄像机与所述虚拟对象的相对位置信息;determining the relative position information of the virtual camera and the virtual object;
    基于所述相对位置信息确定所述虚拟摄像机的运动权限;determining the motion permission of the virtual camera based on the relative position information;
    响应于对所述图形界面的触控指令,控制所述虚拟摄像机在设定三维空间中根据所述触控指令和所述运动权限进行运动,以调整所述展示图像。In response to the touch command on the graphical interface, the virtual camera is controlled to move in the set three-dimensional space according to the touch command and the motion permission, so as to adjust the display image.
  2. 根据权利要求1所述的方法,其特征在于,所述相对位置信息包括所述虚拟摄像机到所述虚拟对象的距离;The method according to claim 1, wherein the relative position information comprises a distance from the virtual camera to the virtual object;
    所述基于所述相对位置信息确定所述虚拟摄像机的运动权限,包括:The determining the motion permission of the virtual camera based on the relative position information includes:
    若所述虚拟摄像机到所述虚拟对象的距离小于第一阈值,则确定所述虚拟摄像机的运动权限包括第一方向运动权限和第二方向运动权限,其中第一方向和第二方向根据所述虚拟对象在三维空间中的姿态预先设定。If the distance between the virtual camera and the virtual object is less than the first threshold, it is determined that the movement authority of the virtual camera includes a first direction movement authority and a second direction movement authority, wherein the first direction and the second direction are based on the The pose of the virtual object in the three-dimensional space is preset.
  3. 根据权利要求2所述的方法,其特征在于,所述设定三维空间包括环绕于所述虚拟对象的第一曲面边界,所述第一曲面边界到所述虚拟对象的距离小于或等于所述第一阈值;The method according to claim 2, wherein the setting of the three-dimensional space comprises a first surface boundary surrounding the virtual object, and the distance from the first surface boundary to the virtual object is less than or equal to the first threshold;
    所述响应于对所述图形界面的触控指令,控制所述虚拟摄像机在设定三维空间中根据所述触控指令和所述运动权限进行运动,包括:The controlling the virtual camera to move in the set three-dimensional space in response to the touch command on the graphical interface according to the touch command and the motion permission includes:
    若检测到所述触控指令,则获取所述触控指令的移动轨迹;If the touch command is detected, acquiring the movement track of the touch command;
    根据所述触控指令的移动轨迹以及所述运动权限,确定所述虚拟摄像机在所述第一曲面边界上的第一运动路径;determining a first movement path of the virtual camera on the boundary of the first curved surface according to the movement trajectory of the touch control instruction and the movement authority;
    控制所述虚拟摄像机在所述第一运动路径上进行运动。The virtual camera is controlled to move on the first movement path.
  4. 根据权利要求3所述的方法,其特征在于,所述虚拟对象包括多个第一参考点,所述第一曲面边界包括多个第一圆形轨道以及经过所述多个第一圆形轨道的多条第一曲线,各第一圆形轨道分别以所述多个第一参考点中各自对应的第一参考点为中心。The method of claim 3, wherein the virtual object comprises a plurality of first reference points, the first curved boundary comprises a plurality of first circular orbits and passes through the plurality of first circular orbits A plurality of first curves of , each of the first circular orbits is respectively centered on the corresponding first reference point among the plurality of first reference points.
  5. 根据权利要求1所述的方法,其特征在于,所述相对位置信息包括所述虚拟摄像机到所述虚拟对象的距离;The method according to claim 1, wherein the relative position information comprises a distance from the virtual camera to the virtual object;
    所述基于所述相对位置信息确定所述虚拟摄像机的运动权限,包括:The determining the motion permission of the virtual camera based on the relative position information includes:
    若所述虚拟摄像机到所述虚拟对象的距离大于第一阈值,并且,所 述虚拟摄像机到所述虚拟对象的距离小于第二阈值,则确定所述虚拟摄像机的运动权限包括第一方向运动权限、第二方向运动权限以及缩放运动权限;If the distance from the virtual camera to the virtual object is greater than a first threshold, and the distance from the virtual camera to the virtual object is less than a second threshold, it is determined that the motion permission of the virtual camera includes a first direction motion permission , the second direction movement permission and the zoom movement permission;
    其中,所述第二阈值大于所述第一阈值,第一方向和第二方向根据所述虚拟对象在三维空间中的姿态预先设定,缩放运动的方向垂直于所述第一方向和所述第二方向。The second threshold is greater than the first threshold, the first direction and the second direction are preset according to the posture of the virtual object in the three-dimensional space, and the direction of the zooming movement is perpendicular to the first direction and the second direction.
  6. 根据权利要求5所述的方法,其特征在于,所述设定三维空间包括环绕于所述虚拟对象的第一曲面边界和第二曲面边界、以及处于所述第二曲面边界与所述第一曲面边界之间的三维空间区域;The method according to claim 5, wherein the setting of the three-dimensional space comprises a first curved surface boundary and a second curved surface boundary surrounding the virtual object, and being located between the second curved surface boundary and the first curved surface boundary 3D space area between surface boundaries;
    所述第一曲面边界到所述虚拟对象的距离小于或等于所述第一阈值,所述第二曲面边界到所述虚拟对象的距离大于所述第一阈值,所述第二曲面边界到所述虚拟对象的距离小于或等于所述第二阈值,所述第二阈值大于所述第一阈值;The distance from the first curved boundary to the virtual object is less than or equal to the first threshold, the distance from the second curved boundary to the virtual object is greater than the first threshold, and the distance from the second curved boundary to the the distance of the virtual object is less than or equal to the second threshold, and the second threshold is greater than the first threshold;
    所述响应于对所述图形界面的触控指令,控制所述虚拟摄像机在设定三维空间中根据所述触控指令和所述运动权限进行运动,包括:The controlling the virtual camera to move in the set three-dimensional space in response to the touch command on the graphical interface according to the touch command and the motion permission includes:
    若检测到所述触控指令,则获取所述触控指令的移动轨迹;If the touch command is detected, acquiring the movement track of the touch command;
    根据所述触控指令的移动轨迹以及所述运动权限,确定所述虚拟摄像机的第二运动路径,其中,所述第二运动路径处于所述第二曲面边界上,或者所述第二运动路径处于所述三维空间区域中;A second motion path of the virtual camera is determined according to the movement trajectory of the touch command and the motion authority, wherein the second motion path is on the boundary of the second curved surface, or the second motion path in the three-dimensional space region;
    控制所述虚拟摄像机在所述第二运动路径上进行运动。The virtual camera is controlled to move on the second movement path.
  7. 根据权利要求6所述的方法,其特征在于,所述虚拟对象包括多个第二参考点,所述第二曲面边界包括多个第二圆形轨道以及经过所述多个第二圆形轨道的多条第二曲线,各第二圆形轨道分别以所述多个第二参考点中各自对应的第二参考点为中心。6. The method of claim 6, wherein the virtual object includes a plurality of second reference points, the second surface boundary includes a plurality of second circular orbits and passes through the plurality of second circular orbits A plurality of second curves of , each of the second circular orbits is respectively centered on the corresponding second reference point among the plurality of second reference points.
  8. 根据权利要求1所述的方法,其特征在于,所述相对位置信息包括所述虚拟摄像机到所述虚拟对象的距离;The method according to claim 1, wherein the relative position information comprises a distance from the virtual camera to the virtual object;
    所述基于所述相对位置信息确定所述虚拟摄像机的运动权限,包括:The determining the motion permission of the virtual camera based on the relative position information includes:
    若所述虚拟摄像机到所述虚拟对象的距离等于第一阈值,则确定所述虚拟摄像机的运动权限包括在第一范围桶中的第一运动权限;If the distance from the virtual camera to the virtual object is equal to the first threshold, determining that the motion permission of the virtual camera includes the first motion permission in the first range bucket;
    其中,所述设定三维空间包括环绕于所述虚拟对象的第一范围桶,所述第一范围桶到所述虚拟对象的距离为所述第一阈值。The set three-dimensional space includes a first range bucket surrounding the virtual object, and the distance from the first range bucket to the virtual object is the first threshold.
  9. 根据权利要求8所述的方法,其特征在于,所述虚拟对象包括多个第一视点,所述多个第一视点与所述第一范围桶中的多个第一轴点一 一对应,所述第一范围桶是由所述多个第一轴点插值计算得到的多个第一圆形轨迹组成的;The method according to claim 8, wherein the virtual object comprises a plurality of first viewpoints, and the plurality of first viewpoints are in one-to-one correspondence with a plurality of first axis points in the first range bucket, The first range bucket is composed of a plurality of first circular trajectories obtained by interpolation of the plurality of first axis points;
    所述响应于对所述图形界面的触控指令,控制所述虚拟摄像机在设定三维空间中根据所述触控指令和所述运动权限进行运动,包括:The controlling the virtual camera to move in the set three-dimensional space in response to the touch command on the graphical interface according to the touch command and the motion permission includes:
    若检测到所述触控指令,则获取所述触控指令的移动轨迹;If the touch command is detected, acquiring the movement track of the touch command;
    根据所述触控指令的移动轨迹以及所述第一运动权限,控制所述虚拟摄像机在所述第一范围桶中进行运动;Controlling the virtual camera to move in the first range bucket according to the movement trajectory of the touch command and the first motion permission;
    其中,所述虚拟摄像机的光轴指向由所述虚拟摄像机所处的第一轴点指向该第一轴点对应的第一视点。Wherein, the optical axis of the virtual camera points to the first viewpoint corresponding to the first axis point from the first axis point where the virtual camera is located.
  10. 根据权利要求1所述的方法,其特征在于,所述相对位置信息包括所述虚拟摄像机到所述虚拟对象的距离;The method according to claim 1, wherein the relative position information comprises a distance from the virtual camera to the virtual object;
    所述基于所述相对位置信息确定所述虚拟摄像机的运动权限,包括:The determining the motion permission of the virtual camera based on the relative position information includes:
    若所述虚拟摄像机到所述虚拟对象的距离大于第一阈值,并且,所述虚拟摄像机到所述虚拟对象的距离小于第二阈值,则确定所述虚拟摄像机的运动权限包括在第二范围桶中的第二运动权限、以及在所述第二范围桶与第一范围桶之间的第三运动权限;If the distance from the virtual camera to the virtual object is greater than the first threshold, and the distance from the virtual camera to the virtual object is less than the second threshold, it is determined that the motion permission of the virtual camera is included in the second range bucket a second motion permission in the , and a third motion permission between the second range bucket and the first range bucket;
    其中,所述第二阈值大于所述第一阈值,所述设定三维空间包括环绕于所述虚拟对象的所述第二范围桶及所述第一范围桶,所述第二范围桶到所述虚拟对象的距离为第二阈值,所述第一范围桶到所述虚拟对象的距离为所述第一阈值。Wherein, the second threshold value is greater than the first threshold value, and the set three-dimensional space includes the second range bucket and the first range bucket surrounding the virtual object, the second range bucket to the The distance from the virtual object is the second threshold, and the distance from the first range bucket to the virtual object is the first threshold.
  11. 根据权利要求10所述的方法,其特征在于,所述虚拟对象包括多个第二视点,所述多个第二视点与所述第二范围桶中的多个第二轴点一一对应,所述第二范围桶是由所述多个第二轴点插值计算得到的多个第二圆形轨迹组成的;The method according to claim 10, wherein the virtual object comprises a plurality of second viewpoints, and the plurality of second viewpoints are in one-to-one correspondence with a plurality of second axis points in the second range bucket, The second range bucket is composed of a plurality of second circular trajectories obtained by interpolation of the plurality of second axis points;
    所述响应于对所述图形界面的触控指令,控制所述虚拟摄像机在设定三维空间中根据所述触控指令和所述运动权限进行运动,包括:The controlling the virtual camera to move in the set three-dimensional space in response to the touch command on the graphical interface according to the touch command and the motion permission includes:
    若检测到所述触控指令,则获取所述触控指令的移动轨迹;If the touch command is detected, acquiring the movement track of the touch command;
    根据所述触控指令的移动轨迹以及所述第二运动权限,控制所述虚拟摄像机在所述第二范围桶中进行运动;或者control the virtual camera to move in the second range bucket according to the movement trajectory of the touch command and the second motion permission; or
    根据所述触控指令的移动轨迹以及所述第三运动权限,控制所述虚拟摄像机在所述第二范围桶与第一范围桶之间进行运动;controlling the virtual camera to move between the second range bucket and the first range bucket according to the movement trajectory of the touch control instruction and the third motion permission;
    其中,所述虚拟摄像机的光轴指向由所述虚拟摄像机所处的第二轴点指向该第二轴点对应的第二视点。Wherein, the optical axis of the virtual camera is directed from the second axis point where the virtual camera is located to the second viewpoint corresponding to the second axis point.
  12. 根据权利要求11所述的方法,其特征在于,所述虚拟摄像机到所述虚拟对象的距离越小,所述多个第二视点越大;并且The method of claim 11, wherein the smaller the distance from the virtual camera to the virtual object, the larger the plurality of second viewpoints; and
    若所述虚拟摄像机处于所述第二范围桶中,所述多个第二视点聚合为一点。If the virtual camera is in the second range bucket, the plurality of second viewpoints are aggregated into one point.
  13. 一种虚拟对象的展示装置,其特征在于,所述装置应用于图形界面,所述图形界面中加载有虚拟对象和虚拟摄像机,所述虚拟摄像机用于采集对所述虚拟对象的展示图像,所述装置包括:A device for displaying virtual objects, characterized in that the device is applied to a graphical interface, and the graphical interface is loaded with a virtual object and a virtual camera, and the virtual camera is used to collect a display image of the virtual object, and the The device includes:
    第一确定模块,用于确定所述虚拟摄像机与所述虚拟对象的相对位置信息;a first determining module, configured to determine relative position information of the virtual camera and the virtual object;
    第二确定模块,用于基于所述相对位置信息确定所述虚拟摄像机的运动权限;a second determining module, configured to determine the motion permission of the virtual camera based on the relative position information;
    控制模块,用于响应于对所述图形界面的触控指令,控制所述虚拟摄像机在设定三维空间中根据所述触控指令和所述运动权限进行运动,以调整所述展示图像。The control module is configured to control the virtual camera to move in the set three-dimensional space according to the touch command and the motion authority in response to the touch command on the graphical interface, so as to adjust the display image.
  14. 一种电子设备,其特征在于,包括:存储器、处理器;其中,所述存储器上存储有可执行代码,当所述可执行代码被所述处理器执行时,使所述处理器执行如权利要求1至12中任一项所述的虚拟对象展示方法。An electronic device, characterized in that it includes: a memory and a processor; wherein, executable codes are stored on the memory, and when the executable codes are executed by the processor, the processor is caused to execute as claimed in the right The virtual object display method described in any one of claims 1 to 12.
  15. 一种计算机可读介质,其特征在于,存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、至少一段程序、代码集或指令集由处理器加载并执行以实现根据权利要求1至12中任一项所述的虚拟对象展示方法。A computer-readable medium, characterized in that it stores at least one instruction, at least one piece of program, code set or instruction set, and the at least one instruction, at least one piece of program, code set or instruction set is loaded and executed by a processor to implement The virtual object display method according to any one of claims 1 to 12.
  16. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在服务器上运行时,导致所述服务器执行根据权利要求1-12中的任一个所述的虚拟对象展示方法。A computer program comprising computer readable code which, when run on a server, causes the server to perform the virtual object presentation method according to any one of claims 1-12.
  17. 一种计算机可读介质,其中存储了如权利要求16所述的计算机程序。A computer-readable medium in which the computer program of claim 16 is stored.
PCT/CN2020/130800 2020-08-26 2020-11-23 Virtual object display method, apparatus and device, computer program and medium WO2022041514A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010871773.2 2020-08-26
CN202010871773.2A CN112076470B (en) 2020-08-26 2020-08-26 Virtual object display method, device and equipment

Publications (1)

Publication Number Publication Date
WO2022041514A1 true WO2022041514A1 (en) 2022-03-03

Family

ID=73728647

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/130800 WO2022041514A1 (en) 2020-08-26 2020-11-23 Virtual object display method, apparatus and device, computer program and medium

Country Status (2)

Country Link
CN (2) CN113304471B (en)
WO (1) WO2022041514A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140357358A1 (en) * 2013-05-31 2014-12-04 Nintendo Co., Ltd. Non-transitory computer-readable storage medium having information processing program stored thereon, information processing apparatus, information processing system, and information processing method
CN110045827A (en) * 2019-04-11 2019-07-23 腾讯科技(深圳)有限公司 The observation method of virtual objects, device and readable storage medium storing program for executing in virtual environment
CN110548280A (en) * 2019-09-11 2019-12-10 珠海金山网络游戏科技有限公司 Control method and device of virtual camera

Family Cites Families (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003334380A (en) * 2002-05-20 2003-11-25 Konami Computer Entertainment Japan Inc Virtual camera position control program for three- dimensional game
JP3696216B2 (en) * 2003-03-05 2005-09-14 株式会社スクウェア・エニックス Three-dimensional video game apparatus, control method of virtual camera in three-dimensional video game, program and recording medium
JP5622447B2 (en) * 2010-06-11 2014-11-12 任天堂株式会社 Information processing program, information processing apparatus, information processing system, and information processing method
EP2497547B1 (en) * 2011-03-08 2018-06-27 Nintendo Co., Ltd. Information processing program, information processing apparatus, information processing system, and information processing method
US9541417B2 (en) * 2012-06-05 2017-01-10 Apple Inc. Panning for three-dimensional maps
CN105488839A (en) * 2015-12-07 2016-04-13 上海市政工程设计研究总院(集团)有限公司 Interactive operation system for three-dimensional scene and operation method thereof
WO2018074821A1 (en) * 2016-10-19 2018-04-26 (주)잼투고 User terminal apparatus and computer-implemented method for synchronizing movement path and movement time of camera by using touch user interface
US20180210628A1 (en) * 2017-01-23 2018-07-26 Snap Inc. Three-dimensional interaction system
CN108905212B (en) * 2017-03-27 2019-12-31 网易(杭州)网络有限公司 Game screen display control method and device, storage medium and electronic equipment
CN107198879B (en) * 2017-04-20 2020-07-03 网易(杭州)网络有限公司 Movement control method and device in virtual reality scene and terminal equipment
US10569172B2 (en) * 2017-09-19 2020-02-25 Canon Kabushiki Kaisha System and method of configuring a virtual camera
CN107895399A (en) * 2017-10-26 2018-04-10 广州市雷军游乐设备有限公司 A kind of omnibearing visual angle switching method, device, terminal device and storage medium
CN107930114A (en) * 2017-11-09 2018-04-20 网易(杭州)网络有限公司 Information processing method and device, storage medium, electronic equipment
CN108920084B (en) * 2018-06-29 2021-06-18 网易(杭州)网络有限公司 Visual field control method and device in game
JP7245013B2 (en) * 2018-09-06 2023-03-23 キヤノン株式会社 Control device and control method
CN110025953B (en) * 2019-03-15 2022-06-10 网易(杭州)网络有限公司 Game interface display method and device, storage medium and electronic device
CN110162236B (en) * 2019-04-28 2020-12-29 深圳市思为软件技术有限公司 Display method and device between virtual sample boards and computer equipment
CN110209325A (en) * 2019-05-07 2019-09-06 高新兴科技集团股份有限公司 A kind of 3D scene display control method, system and equipment
CN110478903B (en) * 2019-09-09 2023-05-26 珠海金山数字网络科技有限公司 Control method and device for virtual camera
CN110597389B (en) * 2019-09-12 2021-04-09 腾讯科技(深圳)有限公司 Virtual object control method in virtual scene, computer device and storage medium
CN111161396B (en) * 2019-11-19 2023-05-16 广东虚拟现实科技有限公司 Virtual content control method, device, terminal equipment and storage medium
CN111467803B (en) * 2020-04-02 2023-07-14 网易(杭州)网络有限公司 Display control method and device in game, storage medium and electronic equipment
CN111494940B (en) * 2020-04-17 2023-03-31 网易(杭州)网络有限公司 Display control method and device for virtual object in game

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140357358A1 (en) * 2013-05-31 2014-12-04 Nintendo Co., Ltd. Non-transitory computer-readable storage medium having information processing program stored thereon, information processing apparatus, information processing system, and information processing method
CN110045827A (en) * 2019-04-11 2019-07-23 腾讯科技(深圳)有限公司 The observation method of virtual objects, device and readable storage medium storing program for executing in virtual environment
CN110548280A (en) * 2019-09-11 2019-12-10 珠海金山网络游戏科技有限公司 Control method and device of virtual camera

Also Published As

Publication number Publication date
CN113304471B (en) 2023-01-10
CN113304471A (en) 2021-08-27
CN112076470B (en) 2021-05-28
CN112076470A (en) 2020-12-15

Similar Documents

Publication Publication Date Title
JP7348895B2 (en) System and method for controlling virtual camera
US11600046B2 (en) Selecting two-dimensional imagery data for display within a three-dimensional model
US9304591B2 (en) Gesture control
US10290155B2 (en) 3D virtual environment interaction system
US8330793B2 (en) Video conference
US20120038675A1 (en) Assisted zoom
US10191612B2 (en) Three-dimensional virtualization
US20140092015A1 (en) Method and apparatus for manipulating a graphical user interface using camera
WO2015196703A1 (en) Application icon display method and apparatus
US20210345017A1 (en) Methods, systems, and media for presenting interactive elements within video content
US10460492B2 (en) Method, system and apparatus for navigating a virtual camera using a navigation device
WO2020078161A1 (en) Bullet screen adjustment method and apparatus, and computer-readable storage medium
CN110575671A (en) Method and device for controlling view angle in game and electronic equipment
US20190172271A1 (en) Information processing device, information processing method, and program
US20150234472A1 (en) User input processing method and apparatus using vision sensor
WO2022041514A1 (en) Virtual object display method, apparatus and device, computer program and medium
JP5724422B2 (en) Operation control device, operation control program, and operation control method
JP6164780B2 (en) A moving image processing apparatus, a moving image processing method, a moving image processing program, and a moving image processing display system.
CN111265866B (en) Control method and device of virtual camera, electronic equipment and storage medium
KR20140021173A (en) Method, apparatus, and computer readable recording medium for displaying browser by reacting device's movement
CN115202792A (en) Method, apparatus, device and storage medium for scene switching

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20951182

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20951182

Country of ref document: EP

Kind code of ref document: A1