CN111833462B - Cutting method, device, equipment and storage medium based on illusion engine - Google Patents

Cutting method, device, equipment and storage medium based on illusion engine Download PDF

Info

Publication number
CN111833462B
CN111833462B CN202010675591.8A CN202010675591A CN111833462B CN 111833462 B CN111833462 B CN 111833462B CN 202010675591 A CN202010675591 A CN 202010675591A CN 111833462 B CN111833462 B CN 111833462B
Authority
CN
China
Prior art keywords
virtual
cutting
cut
surrounding
translation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010675591.8A
Other languages
Chinese (zh)
Other versions
CN111833462A (en
Inventor
夏露辉
许秋子
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Realis Multimedia Technology Co Ltd
Original Assignee
Shenzhen Realis Multimedia Technology Co Ltd
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 Shenzhen Realis Multimedia Technology Co Ltd filed Critical Shenzhen Realis Multimedia Technology Co Ltd
Priority to CN202010675591.8A priority Critical patent/CN111833462B/en
Publication of CN111833462A publication Critical patent/CN111833462A/en
Application granted granted Critical
Publication of CN111833462B publication Critical patent/CN111833462B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • 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
    • A63F13/428Processing 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 involving motion or position input signals, e.g. signals representing the rotation of an input controller or a player's arm motions sensed by accelerometers or gyroscopes
    • 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/50Controlling the output signals based on the game progress
    • A63F13/53Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game
    • A63F13/537Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game using indicators, e.g. showing the condition of a game character on screen
    • A63F13/5375Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game using indicators, e.g. showing the condition of a game character on screen for graphically or textually suggesting an action, e.g. by displaying an arrow indicating a turn in a driving game
    • 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/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/30Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by output arrangements for receiving control signals generated by the game device
    • A63F2300/303Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by output arrangements for receiving control signals generated by the game device for displaying additional data, e.g. simulating a Head Up Display
    • A63F2300/305Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by output arrangements for receiving control signals generated by the game device for displaying additional data, e.g. simulating a Head Up Display for providing a graphical or textual hint to the player
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/6045Methods for processing data by generating or executing the game program for mapping control signals received from the input arrangement into game commands

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Graphics (AREA)
  • Optics & Photonics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention relates to the technical field of computers, and discloses a cutting method, device, equipment and storage medium based on a fantasy engine, which are used for improving the integrity of a cutting picture and optimizing the cutting effect. The cutting method based on the illusion engine comprises the following steps: displaying a virtual world picture and mapping target control objects in the real world into the virtual world picture, wherein the virtual world picture comprises virtual control objects, virtual objects to be cut and virtual cutting tools; real behavior data of a target control object are obtained in real time from the real world, and the real behavior data are mapped into virtual behavior data of a virtual control object through a virtual engine; calculating cutting data according to the virtual behavior data, the virtual control object, the virtual cutting tool and the virtual object to be cut; and cutting the virtual object to be cut according to the virtual surrounding cutting data and the corresponding surrounding cutting mode, or cutting the virtual object to be cut according to the virtual translation cutting data and the corresponding translation cutting mode.

Description

Cutting method, device, equipment and storage medium based on illusion engine
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a cutting method, apparatus, device, and storage medium based on a fantasy engine.
Background
With the development of science and technology, electronic devices have more and more functions, for example, at present, devices for virtual reality and virtual reality games are well known by the public, which brings convenience to the work of people, enriches the amateur life of people, and becomes an indispensable part of the life or work of people.
The illusion engine (unreal engine, UE 4) is a 3A-level sub-era game engine with powerful lighting and physical rendering effects. Particularly in virtual reality scenarios, can provide good support for a handle, virtual Reality (VR) controller. In the existing virtual reality scene, the virtual cutting tool is generally a virtual user role to collide the virtual cutting tool with the virtual object to be cut when cutting, and then a cut picture is rendered in the event of collision, so that the cutting operation is completed.
Disclosure of Invention
The invention mainly aims to solve the problems of lower cutting integrity and poorer cutting effect in a virtual reality scene.
The first aspect of the present invention provides a cutting method based on a fantasy engine, comprising: displaying a virtual world picture, and mapping a target control object in a real world into the virtual world picture to obtain a virtual control object, wherein the virtual world picture comprises a virtual control object, a virtual object to be cut and a virtual cutting tool, and the virtual cutting tool changes along with the virtual control object; real behavior data of a target control object are obtained in real time from the real world, and the real behavior data are mapped into virtual behavior data of a virtual control object through a virtual engine; calculating cutting data according to the virtual behavior data, the virtual control object, the virtual cutting tool and the virtual object to be cut, wherein the cutting data is virtual surrounding cutting data or virtual translation cutting data; cutting the virtual object to be cut according to the virtual surrounding cutting data and the corresponding surrounding cutting mode, or cutting the virtual object to be cut according to the virtual translation cutting data and the corresponding translation cutting mode.
Optionally, in a first implementation manner of the first aspect of the present invention, when the virtual behavior data corresponds to the surrounding cutting manner, virtual surrounding cutting data is calculated based on the virtual control object, the virtual cutting tool and the virtual object to be cut; and calculating virtual translation cutting data based on the virtual control object, the virtual cutting tool and the virtual object to be cut when the virtual behavior data corresponds to the translation cutting mode.
Optionally, in a second implementation manner of the first aspect of the present invention, when the virtual behavior data corresponds to the surrounding cutting manner, calculating virtual surrounding cutting data based on the virtual control object, the virtual cutting tool, and the virtual object to be cut includes: when the virtual behavior data corresponds to the surrounding cutting mode, a first virtual arrow component is created on the virtual object to be cut, a first virtual tool component is created on the virtual cutting tool, and the positive direction of the first virtual arrow component points to the normal vector direction of the cutting surface; reading coordinates of a virtual control object from the virtual behavior data in real time to obtain first virtual object coordinates, and reading coordinates of the first virtual tool component in real time to obtain first virtual component coordinates; the virtual engine is used for taking the first virtual object coordinate as an origin, making a perpendicular to the normal vector direction, determining a first surrounding cutting intersection point, and reading a vector corresponding to the first surrounding cutting intersection point to obtain a first surrounding cutting intersection point vector; taking the first virtual component coordinate as an origin, making a perpendicular to the normal vector direction to obtain a second surrounding cutting intersection point, and reading the vector of the second surrounding cutting intersection point to obtain a second surrounding cutting intersection point vector; calculating an included angle between the first surrounding cutting intersection point vector and the second surrounding cutting intersection point vector to obtain a first surrounding cutting included angle value, and performing cross multiplication calculation on the first surrounding cutting intersection point vector and the normal vector direction to obtain a first included angle mark, wherein the first included angle mark is used for indicating the rotation direction of the first virtual tool assembly; and combining the first surrounding cutting included angle value and the first included angle mark to determine virtual surrounding cutting data.
Optionally, in a third implementation manner of the first aspect of the present invention, when the virtual behavior data corresponds to the translational cutting mode, calculating virtual translational cutting data based on the virtual control object, the virtual cutting tool, and the virtual object to be cut includes: when the virtual behavior data corresponds to the translation cutting mode, respectively creating a second virtual tool component and a second virtual arrow component on the virtual object to be cut, wherein the positive direction of the second virtual arrow component points to the normal vector direction of the cutting surface; reading coordinates of a virtual control object from the virtual behavior data in real time to obtain second virtual object coordinates, and reading coordinates of the second virtual tool assembly in real time to obtain second virtual assembly coordinates; the phantom engine takes the coordinates of the second virtual component as an origin, and makes a perpendicular to the normal vector direction to obtain a first translation cutting intersection point, and reads the coordinates of the first translation cutting intersection point to obtain first translation cutting intersection point coordinates; taking the second virtual object coordinate as an origin, making a vertical line in the normal vector direction to obtain a second translation cutting intersection point, and reading the coordinate of the second translation cutting intersection point to obtain a second translation cutting intersection point coordinate; calculating based on the first translation cutting intersection point coordinate and the second translation cutting intersection point coordinate to obtain a translation cutting displacement vector, and calculating the translation cutting displacement vector through a preset length function to obtain a displacement length; and performing point multiplication calculation on the translation cutting displacement vector and the normal vector direction to obtain a displacement identifier, and determining virtual translation cutting data by combining the displacement length and the displacement identifier.
Optionally, in a fourth implementation manner of the first aspect of the present invention, after the cutting the virtual object to be cut according to the virtual surrounding cutting data and the corresponding surrounding cutting manner, or the cutting the virtual object to be cut according to the virtual translation cutting data and the corresponding translation cutting manner, the cutting method based on the illusion engine further includes: calculating a target included angle termination value according to the virtual object to be cut, and judging whether to terminate surrounding cutting of the virtual object to be cut or not based on the target included angle termination value; and if the target included angle termination value is larger than a termination threshold value, terminating the surrounding cutting of the virtual object to be cut.
Optionally, in a fifth implementation manner of the first aspect of the present invention, the calculating a target included angle termination value according to the virtual object to be cut, and determining whether to terminate surrounding cutting on the virtual object to be cut based on the target included angle termination value includes: creating a third virtual tool assembly on the virtual object to be cut, and reading the coordinates of the third virtual tool assembly to obtain the coordinates of the third virtual assembly; taking the coordinates of the third virtual component as an origin, making a perpendicular to the normal vector direction to obtain a third surrounding cutting intersection point, and reading the vector of the third surrounding cutting intersection point to obtain a third surrounding cutting intersection point vector; calculating the first surrounding cutting intersection point vector and the third surrounding cutting intersection point to obtain a second included angle value and an included angle normal vector; and carrying out point multiplication on the included angle normal vector and the normal vector to obtain a second included angle mark, calculating a target included angle termination value by combining the second included angle mark and the second included angle value, and terminating the encircling cutting of the virtual object to be cut if the target included angle termination value is larger than a termination threshold value.
The second aspect of the present invention provides a fantasy engine-based cutting device, comprising: the display and mapping module is used for displaying a virtual world picture and mapping a target control object in the real world into the virtual world picture to obtain a virtual control object, wherein the virtual world picture comprises a virtual control object, a virtual object to be cut and a virtual cutting tool, and the virtual cutting tool changes along with the virtual control object; the acquisition and mapping module is used for acquiring real behavior data of a target control object from the real world in real time and mapping the real behavior data into virtual behavior data of a virtual control object through the virtual engine; the calculation module is used for calculating cutting data according to the virtual behavior data, the virtual control object, the virtual cutting tool and the virtual object to be cut, wherein the cutting data is virtual surrounding cutting data or virtual translation cutting data; and the cutting module is used for cutting the virtual object to be cut according to the virtual surrounding cutting data and the corresponding surrounding cutting mode, or cutting the virtual object to be cut according to the virtual translation cutting data and the corresponding translation cutting mode.
Optionally, in a first implementation manner of the second aspect of the present invention, the calculating module includes: a surrounding cutting data calculation unit, configured to calculate virtual surrounding cutting data based on the virtual control object, the virtual cutting tool, and the virtual object to be cut when the virtual behavior data corresponds to the surrounding cutting manner; and the translation cutting data calculation unit is used for calculating virtual translation cutting data based on the virtual control object, the virtual cutting tool and the virtual object to be cut when the virtual behavior data corresponds to the translation cutting mode.
Optionally, in a second implementation manner of the second aspect of the present invention, the surrounding cutting data calculating unit may be further specifically configured to: when the virtual behavior data corresponds to the surrounding cutting mode, a first virtual arrow component is created on the virtual object to be cut, a first virtual tool component is created on the virtual cutting tool, and the positive direction of the first virtual arrow component points to the normal vector direction of the cutting surface; reading coordinates of a virtual control object from the virtual behavior data in real time to obtain first virtual object coordinates, and reading coordinates of the first virtual tool component in real time to obtain first virtual component coordinates; the virtual engine is used for taking the first virtual object coordinate as an origin, making a perpendicular to the normal vector direction, determining a first surrounding cutting intersection point, and reading a vector corresponding to the first surrounding cutting intersection point to obtain a first surrounding cutting intersection point vector; taking the first virtual component coordinate as an origin, making a perpendicular to the normal vector direction to obtain a second surrounding cutting intersection point, and reading the vector of the second surrounding cutting intersection point to obtain a second surrounding cutting intersection point vector; calculating an included angle between the first surrounding cutting intersection point vector and the second surrounding cutting intersection point vector to obtain a first surrounding cutting included angle value, and performing cross multiplication calculation on the first surrounding cutting intersection point vector and the normal vector direction to obtain a first included angle mark, wherein the first included angle mark is used for indicating the rotation direction of the first virtual tool assembly; and combining the first surrounding cutting included angle value and the first included angle mark to determine virtual surrounding cutting data.
Optionally, in a third implementation manner of the second aspect of the present invention, the translation cut data calculation unit 3032 includes: when the virtual behavior data corresponds to the translation cutting mode, respectively creating a second virtual tool component and a second virtual arrow component on the virtual object to be cut, wherein the positive direction of the second virtual arrow component points to the normal vector direction of the cutting surface; reading coordinates of a virtual control object from the virtual behavior data in real time to obtain second virtual object coordinates, and reading coordinates of the second virtual tool assembly in real time to obtain second virtual assembly coordinates; the phantom engine takes the coordinates of the second virtual component as an origin, and makes a perpendicular to the normal vector direction to obtain a first translation cutting intersection point, and reads the coordinates of the first translation cutting intersection point to obtain first translation cutting intersection point coordinates; taking the second virtual object coordinate as an origin, making a vertical line in the normal vector direction to obtain a second translation cutting intersection point, and reading the coordinate of the second translation cutting intersection point to obtain a second translation cutting intersection point coordinate; calculating based on the first translation cutting intersection point coordinate and the second translation cutting intersection point coordinate to obtain a translation cutting displacement vector, and calculating the translation cutting displacement vector through a preset length function to obtain a displacement length; and performing point multiplication calculation on the translation cutting displacement vector and the normal vector direction to obtain a displacement identifier, and determining virtual translation cutting data by combining the displacement length and the displacement identifier.
Optionally, in a fourth implementation manner of the second aspect of the present invention, the fantasy engine based cutting device further includes: the judging module is used for calculating a target included angle termination value according to the virtual object to be cut and judging whether to terminate surrounding cutting on the virtual object to be cut or not based on the target included angle termination value; and the termination module is used for terminating the surrounding cutting of the virtual object to be cut if the target included angle termination value is greater than a termination threshold value.
Optionally, in a fifth implementation manner of the second aspect of the present invention, the determining module may be further specifically configured to: creating a third virtual tool assembly on the virtual object to be cut, and reading the coordinates of the third virtual tool assembly to obtain the coordinates of the third virtual assembly; taking the coordinates of the third virtual component as an origin, making a perpendicular to the normal vector direction to obtain a third surrounding cutting intersection point, and reading the vector of the third surrounding cutting intersection point to obtain a third surrounding cutting intersection point vector; calculating the first surrounding cutting intersection point vector and the third surrounding cutting intersection point to obtain a second included angle value and an included angle normal vector; and carrying out point multiplication on the included angle normal vector and the normal vector to obtain a second included angle mark, calculating a target included angle termination value by combining the second included angle mark and the second included angle value, and terminating the encircling cutting of the virtual object to be cut if the target included angle termination value is larger than a termination threshold value.
A third aspect of the present invention provides a fantasy engine based cutting apparatus comprising: a memory and at least one processor, the memory having instructions stored therein, the memory and the at least one processor being interconnected by a line; the at least one processor invokes the instructions in the memory to cause the illusion engine based cutting device to perform the illusion engine based cutting method described above.
A fourth aspect of the present invention provides a computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the illusion engine based cutting method described above.
In the technical scheme provided by the invention, a virtual world picture is displayed, a target control object in the real world is mapped into the virtual world picture to obtain a virtual control object, the virtual world picture comprises a virtual control object, a virtual object to be cut and a virtual cutting tool, and the virtual cutting tool changes along with the virtual control object; real behavior data of a target control object are obtained in real time from the real world, and the real behavior data are mapped into virtual behavior data of a virtual control object through a virtual engine; calculating cutting data according to the virtual behavior data, the virtual control object, the virtual cutting tool and the virtual object to be cut, wherein the cutting data is virtual surrounding cutting data or virtual translation cutting data; cutting the virtual object to be cut according to the virtual surrounding cutting data and the corresponding surrounding cutting mode, or cutting the virtual object to be cut according to the virtual translation cutting data and the corresponding translation cutting mode. According to the embodiment of the invention, the virtual surrounding cutting data or the virtual translation cutting data are calculated according to the virtual behavior data, the virtual control object, the virtual cutting tool and the virtual object to be cut, and the virtual object to be cut is subjected to surrounding cutting according to the virtual surrounding cutting data or is subjected to translation cutting according to the virtual translation cutting data, so that the integrity of a cutting picture is improved and the cutting effect is optimized.
Drawings
FIG. 1 is a schematic diagram of an embodiment of a cutting method based on a illusion engine according to the present invention;
FIG. 2 is a schematic diagram of another embodiment of a cutting method based on a illusion engine according to the present invention;
FIG. 3 is a schematic diagram of an embodiment of a cutting device based on a fantasy engine according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of another embodiment of a cutting device based on a fantasy engine according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an embodiment of a cutting device based on a fantasy engine according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a cutting method, a device, equipment and a storage medium based on a illusion engine, which are used for calculating virtual surrounding cutting data or virtual translation cutting data according to virtual behavior data, virtual control objects, virtual cutting tools and virtual objects to be cut, and carrying out surrounding cutting on the virtual objects to be cut according to the virtual surrounding cutting data or carrying out translation cutting on the virtual objects to be cut according to the virtual translation cutting data, so that the integrity of a cutting picture is improved and the cutting effect is optimized.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
For easy understanding, the following describes a specific flow of an embodiment of the present invention, referring to fig. 1, and an embodiment of a cutting method based on a fantasy engine in the embodiment of the present invention includes:
101. Displaying a virtual world picture, mapping a target control object in the real world into the virtual world picture to obtain a virtual control object, wherein the virtual world picture comprises the virtual control object, a virtual object to be cut and a virtual cutting tool, and the virtual cutting tool changes along with the virtual control object;
the terminal displays a virtual world picture at least comprising a virtual object to be cut and a virtual cutting tool, and maps a target control object in the real world into the virtual world picture to obtain the virtual control object, wherein the virtual cutting tool can rotate, move and the like along with the virtual control object.
It should be noted that the virtual world is a world that an application program presents when running on a terminal, and the virtual world may be a simulation world of a real world, a semi-simulation and semi-imaginary world, or a pure imaginary world. The virtual control object, the virtual object to be cut, and the virtual cutting tool refer to movable objects in the virtual world, and the movable objects may be virtual animals, virtual plants, virtual characters, etc., for example, animals, plants, walls, stones, etc., displayed in the virtual world. In this embodiment, the virtual control object is a virtual hand, the virtual object to be cut is a stick, and the virtual cutting tool is an art designer. In other embodiments, the virtual control object may be a virtual character, the virtual object to be cut may be paper, glass, or the like, and the virtual cutting tool may be a saw, or the like, and the virtual control object, the virtual object to be cut, and the virtual cutting tool are not particularly limited.
The terminal maps a target control object (user's hand) in the real world into a virtual world picture using a illusion engine (unreal engine, UE 4) and renders in the virtual world picture, thereby generating a virtual control object (virtual hand) in the virtual world picture. In addition, the virtual world picture also comprises a virtual object to be cut (stick) and a virtual cutting tool (art designer).
It is to be understood that the execution body of the present invention may be a cutting device based on a fantasy engine, and may also be a terminal or a server, which is not limited herein. The embodiment of the invention is described by taking the terminal as an execution main body as an example.
102. Real behavior data of a target control object are obtained in real time from the real world, and the real behavior data are mapped into virtual behavior data of a virtual control object through a virtual engine;
the terminal acquires real behavior data from the target control object in real time from the real world, and then maps the real behavior data into the virtual world in real time through the UE4, thereby obtaining virtual behavior data.
In the present embodiment, the virtual behavior data includes the movement behavior of the virtual control object, such as a loop movement, a left shift, a right shift, and the like. When the user's hand makes a circular motion in the real world, the terminal maps the motion into the virtual world through the UE4, or when the user's hand translates left or right in the real world, the terminal maps the motion into the virtual world through the UE4, thereby mapping the real behavior data of the target control object (the user's hand) in the real world to the virtual control object in the virtual world, resulting in virtual behavior data.
103. Calculating cutting data according to the virtual behavior data, the virtual control object, the virtual cutting tool and the virtual object to be cut, wherein the cutting data is virtual surrounding cutting data or virtual translation cutting data;
The terminal calculates virtual surrounding cutting data or virtual translation cutting data according to the virtual behavior data, the virtual control object, the virtual cutting tool and the virtual object to be cut.
It should be noted that in this embodiment, there are two cutting modes of the virtual cutting tool (artist knife) in the virtual world picture, one is a surrounding cutting, that is, the virtual cutting tool (virtual cutting tool) cuts around the virtual object to be cut (stick) under the driving of the virtual control object (virtual hand); the other is translational cutting, namely, cutting is performed on the surface of a virtual object to be cut (wood stick) in a translational manner under the drive of a virtual control object (virtual hand). The virtual cutting tool is specifically determined according to the virtual behavior data.
The terminal judges which cutting mode is adopted specifically when the virtual object to be cut (stick) is cut according to the virtual behavior data, and when the virtual behavior data corresponds to the surrounding cutting, the terminal calculates virtual surrounding cutting data according to the virtual control object (virtual hand), the virtual cutting tool (art designing knife) and the virtual object to be cut (stick); when the virtual behavior data corresponds to the translational cutting, the terminal calculates virtual translational cutting data according to the virtual control object (virtual hand), the virtual cutting tool (art designing knife) and the virtual object to be cut (stick).
104. And cutting the virtual object to be cut according to the virtual surrounding cutting data and the corresponding surrounding cutting mode, or cutting the virtual object to be cut according to the virtual translation cutting data and the corresponding translation cutting mode.
The terminal performs surrounding cutting on the virtual object to be cut according to the virtual surrounding cutting data or performs translation cutting on the virtual object to be cut according to the virtual translation cutting data.
For example, in one embodiment, assuming that the virtual surround cut data is-30 °, the terminal performs surround cut according to the virtual surround cut data of-30 °. Wherein a "-" preceding 30 ° is used to indicate the direction of rotation at the time of the round cutting, in this embodiment, "+" or no sign indicates the round cutting clockwise around the virtual object to be cut (stick), and "-" indicates the round cutting counterclockwise around the virtual object to be cut (stick). In other embodiments, "+" and no designation may represent counter-clockwise wrap-around cuts, and "-" may represent clockwise wrap-around cuts, as not specifically limited. In another embodiment, assuming that the virtual translational cutting data is 5cm, the terminal performs translational cutting according to the virtual translational cutting data of 5 cm. The virtual translation cutting data may also be-5 cm, and the sign "-" in front of the cutting value is used to indicate the cutting direction, in this embodiment, when the sign is not in front of the cutting value or is "+", the cutting is performed toward the handle of the utility knife, and when the sign is "-" in front of the cutting value, the cutting is performed toward the opposite direction of the handle of the utility knife. In other embodiments, the symbols "+" and "no symbol" may represent cuts in opposite directions to the utility knife handle, and "-" may represent cuts in directions to the utility knife handle, as not specifically limited.
It should be noted that, in the process of encircling cutting, the knife handle of the art designing knife faces to the virtual hand in real time.
According to the embodiment of the invention, the virtual surrounding cutting data or the virtual translation cutting data are calculated according to the virtual behavior data, the virtual control object, the virtual cutting tool and the virtual object to be cut, and the virtual object to be cut is subjected to surrounding cutting according to the virtual surrounding cutting data or is subjected to translation cutting according to the virtual translation cutting data, so that the integrity of a cutting picture is improved and the cutting effect is optimized.
Referring to fig. 2, another embodiment of the cutting method based on the illusion engine according to the embodiment of the present invention includes:
201. displaying a virtual world picture, mapping a target control object in the real world into the virtual world picture to obtain a virtual control object, wherein the virtual world picture comprises the virtual control object, a virtual object to be cut and a virtual cutting tool, and the virtual cutting tool changes along with the virtual control object;
the terminal displays a virtual world picture at least comprising a virtual object to be cut and a virtual cutting tool, and maps a target control object in the real world into the virtual world picture to obtain the virtual control object, wherein the virtual cutting tool can rotate, move and the like along with the virtual control object.
It should be noted that the virtual world is a world that an application program presents when running on a terminal, and the virtual world may be a simulation world of a real world, a semi-simulation and semi-imaginary world, or a pure imaginary world. The virtual control object, the virtual object to be cut, and the virtual cutting tool refer to movable objects in the virtual world, and the movable objects may be virtual animals, virtual plants, virtual characters, etc., for example, animals, plants, walls, stones, etc., displayed in the virtual world. In this embodiment, the virtual control object is a virtual hand, the virtual object to be cut is a stick, and the virtual cutting tool is an art designer. In other embodiments, the virtual control object may be a virtual character, the virtual object to be cut may be paper, glass, or the like, and the virtual cutting tool may be a saw, or the like, and the virtual control object, the virtual object to be cut, and the virtual cutting tool are not particularly limited.
The terminal maps a target control object (a user's hand) in the real world into a virtual world screen using the UE4 and renders in the virtual world screen, thereby generating a virtual control object (a virtual hand) in the virtual world screen. In addition, the virtual world picture also comprises a virtual object to be cut (stick) and a virtual cutting tool (art designer).
202. Real behavior data of a target control object are obtained in real time from the real world, and the real behavior data are mapped into virtual behavior data of a virtual control object through a virtual engine;
the terminal acquires real behavior data from the target control object in real time from the real world, and then maps the real behavior data into the virtual world in real time through the UE4, thereby obtaining virtual behavior data.
In the present embodiment, the virtual behavior data includes the movement behavior of the virtual control object, such as a loop movement, a left shift, a right shift, and the like. When the user's hand makes a circular motion in the real world, the terminal maps the motion into the virtual world through the UE4, or when the user's hand translates left or right in the real world, the terminal maps the motion into the virtual world through the UE4, thereby mapping the real behavior data of the target control object (the user's hand) in the real world to the virtual control object in the virtual world, resulting in virtual behavior data.
203. Calculating cutting data according to the virtual behavior data, the virtual control object, the virtual cutting tool and the virtual object to be cut, wherein the cutting data is virtual surrounding cutting data or virtual translation cutting data;
The terminal calculates virtual surrounding cutting data or virtual translation cutting data according to the virtual behavior data, the virtual control object, the virtual cutting tool and the virtual object to be cut.
It should be noted that in this embodiment, there are two cutting modes of the virtual cutting tool (artist knife) in the virtual world picture, one is a surrounding cutting, that is, the virtual cutting tool (virtual cutting tool) cuts around the virtual object to be cut (stick) under the driving of the virtual control object (virtual hand); the other is translational cutting, namely, cutting is performed on the surface of a virtual object to be cut (wood stick) in a translational manner under the drive of a virtual control object (virtual hand). The virtual cutting tool is specifically determined according to the virtual behavior data.
The terminal judges which cutting mode is adopted specifically when the virtual object to be cut (stick) is cut according to the virtual behavior data, and when the virtual behavior data corresponds to the surrounding cutting, the terminal calculates virtual surrounding cutting data according to the virtual control object (virtual hand), the virtual cutting tool (art designing knife) and the virtual object to be cut (stick); when the virtual behavior data corresponds to the translational cutting, the terminal calculates virtual translational cutting data according to the virtual control object (virtual hand), the virtual cutting tool (art designing knife) and the virtual object to be cut (stick).
Specifically, when virtual behavior data corresponds to surrounding cutting, the terminal firstly creates a first virtual arrow component with a positive direction pointing to the normal vector direction of the cutting surface on a virtual object to be cut and creates a first virtual tool component on a virtual cutting tool; secondly, the terminal reads coordinates of a virtual control object and coordinates of a first virtual tool component in real time from the virtual behavior data to obtain first virtual object coordinates and first virtual component coordinates; then, the terminal makes a perpendicular to the direction of the straight line where the normal vector is located by taking the first virtual control object coordinate as an origin through the UE4 to obtain a first surrounding cutting intersection point, and reads to obtain a first surrounding cutting intersection point vector; the terminal then uses the first virtual component coordinate as an origin through the UE4, makes a perpendicular to the direction of the straight line where the normal vector is located, obtains a second surrounding cutting intersection point, and reads and obtains a second surrounding cutting intersection point vector; the terminal calculates an included angle between the first surrounding cutting intersection point vector and the second surrounding cutting intersection point vector to obtain a first surrounding cutting included angle value, and carries out cross multiplication calculation on the first surrounding cutting intersection point vector and the normal vector direction to obtain a first included angle mark for indicating the rotation direction of the first virtual tool component; and finally, the terminal combines the first surrounding cutting included angle value and the first included angle mark to determine virtual surrounding cutting data.
The method comprises the steps that a first virtual arrow component is firstly established on a virtual object to be cut (a wood stick) by a terminal, wherein the direction pointed by an arrow of the first virtual arrow component is a positive direction, the positive direction of the first virtual arrow component points to the normal vector direction of a cutting surface, and meanwhile, the coordinates of a virtual control object (a virtual hand) are read from virtual behavior data in real time, namely, the coordinates of the first virtual object; the terminal also creates a first virtual tool component (empty component) on the virtual cutting tool (art designer) and reads the coordinates of the component in real time to obtain the first virtual component coordinates; determining an intersection point after the first virtual object coordinate is taken as an origin to a straight line in a normal vector direction by using FindClosestPointonLine functions in the UE4, namely a first surrounding cutting intersection point, and then reading to obtain a vector of the first surrounding cutting intersection point, namely a vector of the first surrounding cutting intersection point; meanwhile, the terminal uses the function to determine an intersection point after the first virtual component coordinate is taken as an origin and a perpendicular line is drawn to a straight line where a normal vector direction is located, namely a second surrounding cutting intersection point, and reads a vector of the second surrounding cutting intersection point, namely a vector of the second surrounding cutting intersection point; the terminal performs point multiplication and inverse cosine function solving calculation on the first surrounding cutting intersection point vector and the second surrounding cutting intersection point vector to obtain a first surrounding cutting included angle value, and then performs cross multiplication calculation on the normal vector direction of the first surrounding cutting intersection point vector to obtain a first included angle mark ("+" or "-") for indicating the rotation direction of the first virtual tool assembly; and finally, the terminal combines the first included angle mark and the first surrounding cutting included angle value to determine virtual surrounding cutting data. For example, the calculated first surrounding cutting angle value is 30 ° and the calculated first angle is identified as "-", and the terminal obtains virtual surrounding cutting data of-30 °.
When the virtual behavior data corresponds to the translation cutting, the method specifically comprises the following steps of:
The terminal firstly creates a second virtual tool component and a second virtual arrow component with the positive direction pointing to the normal vector direction of the cutting surface on the virtual object to be cut, and simultaneously reads the coordinates of the virtual control object and the second virtual tool component from the virtual behavior data in real time to obtain a second virtual object coordinate and a second virtual component coordinate; the terminal uses the second virtual component coordinate as an origin through the illusion engine, and makes a perpendicular to a straight line where the normal vector direction is located, so as to obtain a first translation cutting intersection point, and reads and obtains the first translation cutting intersection point coordinate; the terminal also uses a second virtual object coordinate as an origin through the illusion engine, makes a perpendicular to a straight line where the normal vector direction is located, obtains a second translation cutting intersection point, and reads and obtains a second translation cutting intersection point coordinate; calculating a translation cutting displacement vector by combining the first translation cutting intersection point coordinate and the second translation cutting intersection point coordinate, and calculating the displacement vector through a preset length function to obtain a displacement length; and performing point multiplication calculation on the translation cutting displacement vector and the normal vector direction to obtain a displacement mark, and finally determining virtual translation cutting data by combining the displacement mark and the displacement length.
The terminal firstly establishes a second virtual tool component and a second virtual arrow component on a virtual object to be cut (stick), wherein the arrow of the second virtual arrow component is a positive direction, the positive direction of the first virtual arrow component points to the normal vector direction of the cutting surface, and simultaneously, the coordinates of a virtual control object (virtual hand) and the second virtual tool component, namely the coordinates of the second virtual object and the coordinates of the second virtual component, are read in real time from virtual behavior data; the terminal uses the UE4 engine to draw a perpendicular to a straight line in which the second virtual component coordinate is located in the normal vector direction as an origin, determines a first translation cutting intersection point, reads and obtains a first translation cutting intersection point coordinate, and uses the second virtual object coordinate as the origin to draw a perpendicular to a straight line in which the normal vector direction is located, determines a second translation cutting intersection point, and reads and obtains a second translation cutting intersection point coordinate; calculating displacement vectors of the first translational cutting intersection point coordinate and the second translational cutting intersection point coordinate through a UE4 engine to obtain translational cutting displacement vectors, and calculating the translational cutting displacement vectors through VectorLength functions in the UE engine to obtain lengths of the displacement vectors, namely displacement lengths; and the terminal performs dot product calculation on the translation cutting displacement vector and the normal vector direction to obtain a displacement identifier, and finally, virtual translation cutting data are determined by combining the translation cutting displacement vector and the displacement identifier. The displacement identifier may be represented by "+" or "-" and, for example, the calculated displacement length is 5cm, the calculated displacement identifier is "+", and the terminal obtains virtual translation cutting data +5cm or 5cm.
204. Cutting the virtual object to be cut according to the virtual surrounding cutting data or the virtual translation cutting data and the corresponding cutting mode;
The terminal cuts the virtual object to be cut according to the virtual surrounding cutting data or cuts the virtual object to be cut in a translation mode according to the virtual translation cutting tool.
For example, in one embodiment, assuming that the virtual surround cut data is-30 °, the terminal performs surround cut according to the virtual surround cut data of-30 °. Wherein a "-" preceding 30 ° is used to indicate the direction of rotation at the time of the round cutting, in this embodiment, "+" or no sign indicates the round cutting clockwise around the virtual object to be cut (stick), and "-" indicates the round cutting counterclockwise around the virtual object to be cut (stick). In other embodiments, "+" and no designation may represent a counter-clockwise wrap-around cut, and "-" may represent a clockwise wrap-around cut, or the designations "1" and "0" may be used to distinguish the direction of the wrap-around cut, as not specifically limited. In another embodiment, assuming that the virtual translational cutting data is 5cm, the terminal performs translational cutting according to the virtual translational cutting data of 5 cm. The virtual translation cutting data may also be-5 cm, and the sign "-" in front of the cutting value is used to indicate the cutting direction, in this embodiment, when the sign is not in front of the cutting value or is "+", the cutting is performed toward the handle of the utility knife, and when the sign is "-" in front of the cutting value, the cutting is performed toward the opposite direction of the handle of the utility knife. In other embodiments, the symbols "+" and "no symbol" may represent cuts in opposite directions to the utility knife handle, and "-" may represent cuts in directions to the utility knife handle, or the identification "1" and "0" may be used to distinguish between cuts of translational cuts, as not specifically limited.
It should be noted that, when the translation cutting is performed, a cutting range is preset, so that the virtual cutting tool (art designing knife) is suspended at a portion beyond the cutting range, and the virtual cutting tool (wood stick) is contacted with the virtual object to be cut (wood stick) at the portion within the cutting range.
205. Calculating a target included angle termination value according to the virtual object to be cut, and judging whether to terminate surrounding cutting of the virtual object to be cut or not based on the target included angle termination value;
and the terminal calculates a target included angle termination value for judging whether to terminate surrounding cutting of the virtual object to be cut according to the virtual object to be cut.
Specifically, the terminal creates a third virtual tool component on a virtual object to be cut (a wood stick), and reads the coordinates of the third virtual tool component to obtain the coordinates of the third virtual component; secondly, the terminal makes a perpendicular line to a straight line where a normal vector direction is located by taking a third virtual component coordinate as an origin through a UE4 engine to obtain a third surrounding cutting intersection point, and reads to obtain a third surrounding cutting intersection point vector; then the terminal multiplies the normal vector of the included angle with the normal vector to obtain a second included angle mark; the terminal combines the second included angle mark and the second included angle value to determine an initial included angle termination value; and finally, calculating the initial included angle termination value by adopting an inverse cosine function to obtain a target included angle termination value.
It should be noted that the initial angle end value generally belongs to [ -180, 180], and the terminal uses a cosine function to convert the initial angle end value to between [0,1 ]. Assuming an initial included angle termination value of-60 deg., the target included angle termination value is 0.5.
206. And if the target included angle termination value is greater than the termination threshold value, terminating the surrounding cutting of the virtual object to be cut.
If the target included angle end value is smaller than or equal to the final threshold value, calculating virtual surrounding cutting data continuously, and performing surrounding cutting on the virtual object to be cut (wood stick) based on the virtual surrounding cutting data.
Assuming that the termination threshold is 0.99 and the calculated target included angle termination value is 1, it indicates that the virtual cutting tool (art knife) completes the surrounding cutting, and at this time, the virtual object to be cut is terminated to perform the surrounding cutting, if the calculated target included angle termination value is 0.5, it indicates that the virtual cutting tool (art knife) does not complete the surrounding cutting yet, and the terminal needs to continue calculating virtual surrounding cutting data and performing the surrounding cutting on the virtual object to be cut (stick).
According to the embodiment of the invention, the virtual surrounding cutting data or the virtual translation cutting data are calculated according to the virtual behavior data, the virtual control object, the virtual cutting tool and the virtual object to be cut, and the virtual object to be cut is subjected to surrounding cutting according to the virtual surrounding cutting data or is subjected to translation cutting according to the virtual translation cutting data, so that the integrity of a cutting picture is improved and the cutting effect is optimized.
The cutting method based on the illusion engine in the embodiment of the present invention is described above, and the following describes a cutting device based on the illusion engine in the embodiment of the present invention, referring to fig. 3, one embodiment of the cutting device based on the illusion engine in the embodiment of the present invention includes:
The display and mapping module 301 is configured to display a virtual world picture, and map a target control object in a real world into the virtual world picture to obtain a virtual control object, where the virtual world picture includes a virtual control object, a virtual object to be cut, and a virtual cutting tool, and the virtual cutting tool changes along with the virtual control object;
the acquiring and mapping module 302 is configured to acquire real behavior data of a target control object from the real world in real time, and map the real behavior data into virtual behavior data of a virtual control object through a virtual engine;
A calculating module 303, configured to calculate cutting data according to the virtual behavior data, the virtual control object, the virtual cutting tool, and the virtual object to be cut, where the cutting data is virtual surrounding cutting data or virtual translation cutting data;
And the cutting module 304 is configured to cut the virtual object to be cut according to the virtual surrounding cutting data and the corresponding surrounding cutting mode, or cut the virtual object to be cut according to the virtual translation cutting data and the corresponding translation cutting mode.
According to the embodiment of the invention, the virtual surrounding cutting data or the virtual translation cutting data are calculated according to the virtual behavior data, the virtual control object, the virtual cutting tool and the virtual object to be cut, and the virtual object to be cut is subjected to surrounding cutting according to the virtual surrounding cutting data or is subjected to translation cutting according to the virtual translation cutting data, so that the integrity of a cutting picture is improved and the cutting effect is optimized.
Referring to fig. 4, another embodiment of the cutting device based on the illusion engine according to the embodiment of the present invention includes:
The display and mapping module 301 is configured to display a virtual world picture, and map a target control object in a real world into the virtual world picture to obtain a virtual control object, where the virtual world picture includes a virtual control object, a virtual object to be cut, and a virtual cutting tool, and the virtual cutting tool changes along with the virtual control object;
the acquiring and mapping module 302 is configured to acquire real behavior data of a target control object from the real world in real time, and map the real behavior data into virtual behavior data of a virtual control object through a virtual engine;
A calculating module 303, configured to calculate cutting data according to the virtual behavior data, the virtual control object, the virtual cutting tool, and the virtual object to be cut, where the cutting data is virtual surrounding cutting data or virtual translation cutting data;
And the cutting module 304 is configured to cut the virtual object to be cut according to the virtual surrounding cutting data and the corresponding surrounding cutting mode, or cut the virtual object to be cut according to the virtual translation cutting data and the corresponding translation cutting mode.
Optionally, the calculating module 303 includes:
A surrounding cutting data calculating unit 3031, configured to calculate virtual surrounding cutting data based on the virtual control object, the virtual cutting tool, and the virtual object to be cut when the virtual behavior data corresponds to the surrounding cutting mode;
And a translation cutting data calculating unit 3032, configured to calculate virtual translation cutting data based on the virtual control object, the virtual cutting tool, and the virtual object to be cut when the virtual behavior data corresponds to the translation cutting mode.
Optionally, the surrounding cut data calculation unit 3031 may be further specifically configured to:
When the virtual behavior data corresponds to the surrounding cutting mode, a first virtual arrow component is created on the virtual object to be cut, a first virtual tool component is created on the virtual cutting tool, and the positive direction of the first virtual arrow component points to the normal vector direction of the cutting surface;
reading coordinates of a virtual control object from the virtual behavior data in real time to obtain first virtual object coordinates, and reading coordinates of the first virtual tool component in real time to obtain first virtual component coordinates;
the virtual engine is used for taking the first virtual object coordinate as an origin, making a perpendicular to the normal vector direction, determining a first surrounding cutting intersection point, and reading a vector corresponding to the first surrounding cutting intersection point to obtain a first surrounding cutting intersection point vector;
taking the first virtual component coordinate as an origin, making a perpendicular to the normal vector direction to obtain a second surrounding cutting intersection point, and reading the vector of the second surrounding cutting intersection point to obtain a second surrounding cutting intersection point vector;
Calculating an included angle between the first surrounding cutting intersection point vector and the second surrounding cutting intersection point vector to obtain a first surrounding cutting included angle value, and performing cross multiplication calculation on the first surrounding cutting intersection point vector and the normal vector direction to obtain a first included angle mark, wherein the first included angle mark is used for indicating the rotation direction of the first virtual tool assembly;
And combining the first surrounding cutting included angle value and the first included angle mark to determine virtual surrounding cutting data.
Optionally, the translational cutting data calculating unit 3032 includes:
when the virtual behavior data corresponds to the translation cutting mode, respectively creating a second virtual tool component and a second virtual arrow component on the virtual object to be cut, wherein the positive direction of the second virtual arrow component points to the normal vector direction of the cutting surface;
reading coordinates of a virtual control object from the virtual behavior data in real time to obtain second virtual object coordinates, and reading coordinates of the second virtual tool assembly in real time to obtain second virtual assembly coordinates;
The phantom engine takes the coordinates of the second virtual component as an origin, and makes a perpendicular to the normal vector direction to obtain a first translation cutting intersection point, and reads the coordinates of the first translation cutting intersection point to obtain first translation cutting intersection point coordinates;
Taking the second virtual object coordinate as an origin, making a vertical line in the normal vector direction to obtain a second translation cutting intersection point, and reading the coordinate of the second translation cutting intersection point to obtain a second translation cutting intersection point coordinate;
calculating based on the first translation cutting intersection point coordinate and the second translation cutting intersection point coordinate to obtain a translation cutting displacement vector, and calculating the translation cutting displacement vector through a preset length function to obtain a displacement length;
And performing point multiplication calculation on the translation cutting displacement vector and the normal vector direction to obtain a displacement identifier, and determining virtual translation cutting data by combining the displacement length and the displacement identifier.
Optionally, the fantasy engine-based cutting device further comprises:
The judging module 305 is configured to calculate a target included angle termination value according to the virtual object to be cut, and judge whether to terminate surrounding cutting on the virtual object to be cut based on the target included angle termination value;
and the termination module 306 is configured to terminate the surrounding cutting of the virtual object to be cut if the target included angle termination value is greater than a termination threshold.
Optionally, the determining module 305 may be further specifically configured to:
creating a third virtual tool assembly on the virtual object to be cut, and reading the coordinates of the third virtual tool assembly to obtain the coordinates of the third virtual assembly;
Taking the coordinates of the third virtual component as an origin, making a perpendicular to the normal vector direction to obtain a third surrounding cutting intersection point, and reading the vector of the third surrounding cutting intersection point to obtain a third surrounding cutting intersection point vector;
Calculating the first surrounding cutting intersection point vector and the third surrounding cutting intersection point to obtain a second included angle value and an included angle normal vector;
and carrying out point multiplication on the included angle normal vector and the normal vector to obtain a second included angle mark, calculating a target included angle termination value by combining the second included angle mark and the second included angle value, and terminating the encircling cutting of the virtual object to be cut if the target included angle termination value is larger than a termination threshold value.
According to the embodiment of the invention, the virtual surrounding cutting data or the virtual translation cutting data are calculated according to the virtual behavior data, the virtual control object, the virtual cutting tool and the virtual object to be cut, and the virtual object to be cut is subjected to surrounding cutting according to the virtual surrounding cutting data or is subjected to translation cutting according to the virtual translation cutting data, so that the integrity of a cutting picture is improved and the cutting effect is optimized.
The fantasy engine-based cutting device in the embodiment of the present invention is described in detail from the point of view of the modularized functional entity in fig. 3 and 4 above, and the fantasy engine-based cutting device in the embodiment of the present invention is described in detail from the point of view of hardware processing below.
Fig. 5 is a schematic structural diagram of a fantasy engine-based cutting device 500 according to an embodiment of the present invention, which may vary considerably in configuration or performance, and may include one or more processors (central processing units, CPU) 510 (e.g., one or more processors) and a memory 520, one or more storage mediums 530 (e.g., one or more mass storage devices) storing applications 533 or data 532. Wherein memory 520 and storage medium 530 may be transitory or persistent storage. The program stored on the storage medium 530 may include one or more modules (not shown), each of which may include a series of instruction operations on the illusive engine based cutting device 500. Still further, the processor 510 may be configured to communicate with the storage medium 530 to execute a series of instruction operations in the storage medium 530 on the illusive engine based cutting device 500.
The illusion engine based cutting device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input output interfaces 560, and/or one or more operating systems 531, such as Windows Serve, mac OS X, unix, linux, freeBSD, and the like. It will be appreciated by those skilled in the art that the fantasy engine based cutting device structure shown in fig. 5 is not limiting and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The present invention also provides a computer readable storage medium, which may be a non-volatile computer readable storage medium, and which may also be a volatile computer readable storage medium, the computer readable storage medium having stored therein instructions which, when executed on a computer, cause the computer to perform the steps of the illusion engine based cutting method.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. The cutting method based on the illusion engine is characterized by comprising the following steps of:
Displaying a virtual world picture, and mapping a target control object in a real world into the virtual world picture to obtain a virtual control object, wherein the virtual world picture comprises a virtual control object, a virtual object to be cut and a virtual cutting tool, and the virtual cutting tool changes along with the virtual control object;
Real behavior data of a target control object are obtained in real time from the real world, and the real behavior data are mapped into virtual behavior data of a virtual control object through a virtual engine;
When the virtual behavior data corresponds to a surrounding cutting mode, calculating virtual surrounding cutting data based on the virtual control object, the virtual cutting tool and the virtual object to be cut, wherein the surrounding cutting mode is that the virtual cutting tool surrounds the virtual object to be cut to cut under the drive of the virtual control object;
When the virtual behavior data corresponds to a translation cutting mode, calculating virtual translation cutting data based on the virtual control object, the virtual cutting tool and the virtual object to be cut, wherein the translation cutting mode is that the virtual cutting tool cuts the surface of the virtual object to be cut in a translation mode under the drive of the virtual control object;
Cutting the virtual object to be cut according to the virtual surrounding cutting data and the corresponding surrounding cutting mode, or cutting the virtual object to be cut according to the virtual translation cutting data and the corresponding translation cutting mode.
2. The phantom engine based cutting method of claim 1, wherein calculating virtual surround cut data based on the virtual control object, the virtual cutting tool and the virtual object to be cut when the virtual behavior data corresponds to the surround cut style comprises:
When the virtual behavior data corresponds to the surrounding cutting mode, a first virtual arrow component is created on the virtual object to be cut, a first virtual tool component is created on the virtual cutting tool, and the positive direction of the first virtual arrow component points to the normal vector direction of the cutting surface;
reading coordinates of a virtual control object from the virtual behavior data in real time to obtain first virtual object coordinates, and reading coordinates of the first virtual tool component in real time to obtain first virtual component coordinates;
the virtual engine is used for taking the first virtual object coordinate as an origin, making a perpendicular to the normal vector direction, determining a first surrounding cutting intersection point, and reading a vector corresponding to the first surrounding cutting intersection point to obtain a first surrounding cutting intersection point vector;
taking the first virtual component coordinate as an origin, making a perpendicular to the normal vector direction to obtain a second surrounding cutting intersection point, and reading the vector of the second surrounding cutting intersection point to obtain a second surrounding cutting intersection point vector;
Calculating an included angle between the first surrounding cutting intersection point vector and the second surrounding cutting intersection point vector to obtain a first surrounding cutting included angle value, and performing cross multiplication calculation on the first surrounding cutting intersection point vector and the normal vector direction to obtain a first included angle mark, wherein the first included angle mark is used for indicating the rotation direction of the first virtual tool assembly;
And combining the first surrounding cutting included angle value and the first included angle mark to determine virtual surrounding cutting data.
3. The phantom engine based cutting method of claim 1, wherein calculating virtual translational cutting data based on the virtual control object, the virtual cutting tool, and the virtual object to be cut when the virtual behavior data corresponds to the translational cutting pattern comprises:
when the virtual behavior data corresponds to the translation cutting mode, respectively creating a second virtual tool component and a second virtual arrow component on the virtual object to be cut, wherein the positive direction of the second virtual arrow component points to the normal vector direction of the cutting surface;
reading coordinates of a virtual control object from the virtual behavior data in real time to obtain second virtual object coordinates, and reading coordinates of the second virtual tool assembly in real time to obtain second virtual assembly coordinates;
The phantom engine takes the coordinates of the second virtual component as an origin, and makes a perpendicular to the normal vector direction to obtain a first translation cutting intersection point, and reads the coordinates of the first translation cutting intersection point to obtain first translation cutting intersection point coordinates;
Taking the second virtual object coordinate as an origin, making a vertical line in the normal vector direction to obtain a second translation cutting intersection point, and reading the coordinate of the second translation cutting intersection point to obtain a second translation cutting intersection point coordinate;
calculating based on the first translation cutting intersection point coordinate and the second translation cutting intersection point coordinate to obtain a translation cutting displacement vector, and calculating the translation cutting displacement vector through a preset length function to obtain a displacement length;
And performing point multiplication calculation on the translation cutting displacement vector and the normal vector direction to obtain a displacement identifier, and determining virtual translation cutting data by combining the displacement length and the displacement identifier.
4. The phantom engine based cutting method of claim 2, wherein after the cutting of the virtual object to be cut according to the virtual surround cut data and the corresponding surround cut pattern or the cutting of the virtual object to be cut according to the virtual pan cut data and the corresponding pan cut pattern, the phantom engine based cutting method further comprises:
Calculating a target included angle termination value according to the virtual object to be cut, and judging whether to terminate surrounding cutting of the virtual object to be cut or not based on the target included angle termination value;
and if the target included angle termination value is larger than a termination threshold value, terminating the surrounding cutting of the virtual object to be cut.
5. The fantasy engine-based cutting method of claim 4 wherein said calculating a target angle termination value from said virtual object to be cut and determining whether to terminate surrounding cutting of said virtual object to be cut based on said target angle termination value comprises:
creating a third virtual tool assembly on the virtual object to be cut, and reading the coordinates of the third virtual tool assembly to obtain the coordinates of the third virtual assembly;
Taking the coordinates of the third virtual component as an origin, making a perpendicular to the normal vector direction to obtain a third surrounding cutting intersection point, and reading the vector of the third surrounding cutting intersection point to obtain a third surrounding cutting intersection point vector;
Calculating the first surrounding cutting intersection point vector and the third surrounding cutting intersection point to obtain a second included angle value and an included angle normal vector;
and carrying out point multiplication on the included angle normal vector and the normal vector to obtain a second included angle mark, calculating a target included angle termination value by combining the second included angle mark and the second included angle value, and terminating the encircling cutting of the virtual object to be cut if the target included angle termination value is larger than a termination threshold value.
6. A fantasy engine based cutting device, comprising:
the display and mapping module is used for displaying a virtual world picture and mapping a target control object in the real world into the virtual world picture to obtain a virtual control object, wherein the virtual world picture comprises a virtual control object, a virtual object to be cut and a virtual cutting tool, and the virtual cutting tool changes along with the virtual control object;
The acquisition and mapping module is used for acquiring real behavior data of a target control object from the real world in real time and mapping the real behavior data into virtual behavior data of a virtual control object through the virtual engine;
a computing module, the computing module comprising: the surrounding cutting data calculation unit is used for calculating virtual surrounding cutting data based on the virtual control object, the virtual cutting tool and the virtual object to be cut when the virtual behavior data corresponds to the surrounding cutting mode, and the surrounding cutting mode is that the virtual cutting tool surrounds the virtual object to be cut to cut under the drive of the virtual control object; the translation cutting data calculation unit is used for calculating virtual translation cutting data based on the virtual control object, the virtual cutting tool and the virtual object to be cut when the virtual behavior data corresponds to the translation cutting mode, wherein the translation cutting mode is that the virtual cutting tool cuts on the surface of the virtual object to be cut in a translation mode under the drive of the virtual control object;
And the cutting module is used for cutting the virtual object to be cut according to the virtual surrounding cutting data and the corresponding surrounding cutting mode, or cutting the virtual object to be cut according to the virtual translation cutting data and the corresponding translation cutting mode.
7. A fantasy engine based cutting apparatus, comprising: a memory and at least one processor, the memory having instructions stored therein, the memory and the at least one processor being interconnected by a line;
The at least one processor invoking the instructions in the memory to cause the illusion engine based cutting device to perform the illusion engine based cutting method of any of claims 1-5.
8. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the illusion engine based cutting method according to any of claims 1-5.
CN202010675591.8A 2020-07-14 2020-07-14 Cutting method, device, equipment and storage medium based on illusion engine Active CN111833462B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010675591.8A CN111833462B (en) 2020-07-14 2020-07-14 Cutting method, device, equipment and storage medium based on illusion engine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010675591.8A CN111833462B (en) 2020-07-14 2020-07-14 Cutting method, device, equipment and storage medium based on illusion engine

Publications (2)

Publication Number Publication Date
CN111833462A CN111833462A (en) 2020-10-27
CN111833462B true CN111833462B (en) 2024-05-17

Family

ID=72924134

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010675591.8A Active CN111833462B (en) 2020-07-14 2020-07-14 Cutting method, device, equipment and storage medium based on illusion engine

Country Status (1)

Country Link
CN (1) CN111833462B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115310239B (en) * 2022-10-08 2023-03-24 广州中望龙腾软件股份有限公司 Method for calculating cutting angle of section bar, terminal and storage medium

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB351096A (en) * 1929-03-25 1931-06-25 Siemens Ag Improvements in or relating to telephone systems
CN103226838A (en) * 2013-04-10 2013-07-31 福州林景行信息技术有限公司 Real-time spatial positioning method for mobile monitoring target in geographical scene
CN107077216A (en) * 2016-12-19 2017-08-18 深圳市阳日电子有限公司 Method and mobile terminal that a kind of picture is shown
CN107193371A (en) * 2017-04-28 2017-09-22 上海交通大学 A kind of real time human-machine interaction system and method based on virtual reality
CN107209789A (en) * 2014-12-03 2017-09-26 法国国立应用科学学院 Simulation system, corresponding device, methods and procedures
CN107430437A (en) * 2015-02-13 2017-12-01 厉动公司 The system and method that real crawl experience is created in virtual reality/augmented reality environment
CN108619720A (en) * 2018-04-11 2018-10-09 腾讯科技(深圳)有限公司 Playing method and device, storage medium, the electronic device of animation
CN110341192A (en) * 2019-07-12 2019-10-18 东北大学 A kind of guide plate 3D printing model method for building up based on VR
CN110568923A (en) * 2019-07-09 2019-12-13 深圳市瑞立视多媒体科技有限公司 unity 3D-based virtual reality interaction method, device, equipment and storage medium
CN111105491A (en) * 2019-11-25 2020-05-05 腾讯科技(深圳)有限公司 Scene rendering method and device, computer readable storage medium and computer equipment
CN111145356A (en) * 2019-12-31 2020-05-12 威创集团股份有限公司 Cutting method based on Unity3D model
CN111161422A (en) * 2019-12-13 2020-05-15 广东电网有限责任公司 Model display method for enhancing virtual scene implementation
CN111173510A (en) * 2020-03-14 2020-05-19 天地科技股份有限公司 Intelligent control method and system for fully mechanized mining equipment for complex condition working face
CN111210359A (en) * 2019-12-30 2020-05-29 中国矿业大学(北京) Intelligent mine scene oriented digital twin evolution mechanism and method

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB351096A (en) * 1929-03-25 1931-06-25 Siemens Ag Improvements in or relating to telephone systems
CN103226838A (en) * 2013-04-10 2013-07-31 福州林景行信息技术有限公司 Real-time spatial positioning method for mobile monitoring target in geographical scene
CN107209789A (en) * 2014-12-03 2017-09-26 法国国立应用科学学院 Simulation system, corresponding device, methods and procedures
CN107430437A (en) * 2015-02-13 2017-12-01 厉动公司 The system and method that real crawl experience is created in virtual reality/augmented reality environment
CN107077216A (en) * 2016-12-19 2017-08-18 深圳市阳日电子有限公司 Method and mobile terminal that a kind of picture is shown
CN107193371A (en) * 2017-04-28 2017-09-22 上海交通大学 A kind of real time human-machine interaction system and method based on virtual reality
CN108619720A (en) * 2018-04-11 2018-10-09 腾讯科技(深圳)有限公司 Playing method and device, storage medium, the electronic device of animation
CN110568923A (en) * 2019-07-09 2019-12-13 深圳市瑞立视多媒体科技有限公司 unity 3D-based virtual reality interaction method, device, equipment and storage medium
CN110341192A (en) * 2019-07-12 2019-10-18 东北大学 A kind of guide plate 3D printing model method for building up based on VR
CN111105491A (en) * 2019-11-25 2020-05-05 腾讯科技(深圳)有限公司 Scene rendering method and device, computer readable storage medium and computer equipment
CN111161422A (en) * 2019-12-13 2020-05-15 广东电网有限责任公司 Model display method for enhancing virtual scene implementation
CN111210359A (en) * 2019-12-30 2020-05-29 中国矿业大学(北京) Intelligent mine scene oriented digital twin evolution mechanism and method
CN111145356A (en) * 2019-12-31 2020-05-12 威创集团股份有限公司 Cutting method based on Unity3D model
CN111173510A (en) * 2020-03-14 2020-05-19 天地科技股份有限公司 Intelligent control method and system for fully mechanized mining equipment for complex condition working face

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
An improved calculation system for phase-functioned neural network and implementation in unreal engine;Ping Kuang et al.;《CLUSTER COMPUTING》;20180331;第22卷;15505-15516 *
基于Open Inventor的虚拟驾驶仿真系统;滕贻健 等;《计算机应用》;20090630(第S1期);330-332 *
基于VIVE的虚拟现实交互式机械臂仿真运动平台搭建;徐雅微 等;《现代计算机》;20190515(第14期);70-74 *
船舶机舱虚拟环境中虚拟手的介入操控;陈冠宇 等;《上海海事大学学报》;20141231(第04期);54-58 *

Also Published As

Publication number Publication date
CN111833462A (en) 2020-10-27

Similar Documents

Publication Publication Date Title
CN111145326B (en) Processing method of three-dimensional virtual cloud model, storage medium, processor and electronic device
US7382374B2 (en) Computerized method and computer system for positioning a pointer
CN108245890B (en) Method and device for controlling movement of object in virtual scene
CN112365572B (en) Rendering method based on surface subdivision and related products thereof
CN111833462B (en) Cutting method, device, equipment and storage medium based on illusion engine
CN109863467B (en) System, method and storage medium for virtual reality input
CN111514587B (en) Information processing method, device, equipment and storage medium
CN110544315B (en) Virtual object control method and related equipment
CN109636888B (en) 2D special effect manufacturing method and device, electronic equipment and storage medium
CN111583398A (en) Image display method and device, electronic equipment and computer readable storage medium
CN115375822A (en) Cloud model rendering method and device, storage medium and electronic device
US7113191B2 (en) Rendering a silhouette edge
CN114529647A (en) Object rendering method, device and apparatus, electronic device and storage medium
CN111667558B (en) Rope connection optimization method based on illusion engine and related equipment
CN110930488B (en) Fish behavior simulation method, device, equipment and storage medium
JP2011203785A (en) Polygon division device and polygon division method
Kaya New trends in graphic display system architecture
JPH08161531A (en) Graphic display device
CN107050848B (en) Somatosensory game implementation method and device based on body area network
CN111063012A (en) Animation character display method and device, electronic equipment and storage medium
CN109062416A (en) Map state conversion method and device
CN108499109A (en) A method of it unilateral in real time can be scaled based on UE engine implementations article
CN116245992A (en) Eyeball model highlight rendering method, device, equipment and storage medium
CN111347813A (en) AR sculpture method
JP2611599B2 (en) Computer graphics data processing method and apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant