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

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

Info

Publication number
CN111833462A
CN111833462A CN202010675591.8A CN202010675591A CN111833462A CN 111833462 A CN111833462 A CN 111833462A CN 202010675591 A CN202010675591 A CN 202010675591A CN 111833462 A CN111833462 A CN 111833462A
Authority
CN
China
Prior art keywords
virtual
cutting
cut
data
surrounding
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.)
Granted
Application number
CN202010675591.8A
Other languages
Chinese (zh)
Other versions
CN111833462B (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

Images

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)
  • Computer Graphics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Optics & Photonics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention relates to the technical field of computers, and discloses a cutting method, a device, equipment and a storage medium based on a ghost 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 a target control object in the real world into the virtual world picture, wherein the virtual world picture comprises a virtual control object, a virtual object to be cut and a virtual cutting tool; real behavior data of a target control object is obtained in real time from the real world, and the real behavior data is 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 and equipment based on illusion engine and storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a cutting method, a cutting device and a cutting storage medium based on an illusion engine.
Background
With the development of science and technology, electronic devices have more and more functions, for example, virtual reality devices and virtual reality games are well known to the public at present, which brings convenience to the work of people and enriches the amateur life of people, and become an indispensable part in the life or work of people.
The illusion engine (UE 4) is a 3A level time game engine, and has strong lighting and physical rendering effects. The method can provide good support for a handle and a Virtual Reality (VR) controller particularly in a virtual reality scene. In the existing virtual reality scene, a virtual cutting tool generally collides the virtual cutting tool with a virtual object to be cut by a virtual user role during cutting, and then a cut picture is rendered in a collision event, so that the cutting operation is completed.
Disclosure of Invention
The invention mainly aims to solve the problems of low cutting integrity and poor cutting effect in a virtual reality scene.
The invention provides a cutting method based on an illusion engine in a first aspect, which comprises the following steps: 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 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 is obtained in real time from the real world, and the real behavior data is 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 are virtual surrounding cutting data or virtual translation cutting data; 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.
Optionally, in a first implementation manner of the first aspect of the present invention, when the virtual behavior data corresponds to the circular cutting manner, virtual circular cutting data is calculated based on the virtual control object, the virtual cutting tool, and the virtual object to be cut; and when the virtual behavior data correspond to the 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.
Optionally, in a second implementation manner of the first aspect of the present invention, when the virtual behavior data corresponds to the circular cutting manner, calculating virtual circular 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 correspond to the surrounding cutting mode, creating a first virtual arrow component on the virtual object to be cut, and creating a first virtual tool component on the virtual cutting tool, wherein the positive direction of the first virtual arrow component points to the normal vector direction of a cutting surface; reading the coordinates of a virtual control object from the virtual behavior data in real time to obtain first virtual object coordinates, and reading the coordinates of the first virtual tool assembly in real time to obtain first virtual assembly coordinates; by using the first virtual object coordinate as an origin through a phantom engine, making a perpendicular line in 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 assembly coordinate as an origin, making a perpendicular line in the normal vector direction to obtain a second surrounding cutting intersection point, and reading a 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 identifier, wherein the first included angle identifier is used for indicating the rotation direction of the first virtual tool assembly; and determining virtual surrounding cutting data by combining the first surrounding cutting included angle value and the first included angle identification.
Optionally, in a third implementation manner of the first aspect of the present invention, when the virtual behavior data corresponds to the translational cutting manner, 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 correspond 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 a cutting surface; reading the coordinates of a virtual control object from the virtual behavior data in real time to obtain second virtual object coordinates, and reading the coordinates of the second virtual tool assembly in real time to obtain second virtual assembly coordinates; making a perpendicular line in the normal vector direction by using the second virtual component coordinate as an origin through the illusion engine to obtain a first translation cutting intersection point, and reading the coordinate of the first translation cutting intersection point to obtain a first translation cutting intersection point coordinate; taking the second virtual object coordinate as an origin, making a perpendicular 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 the coordinate of the second translation cutting intersection point; 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 virtual object to be cut is cut according to the virtual surrounding cutting data and the corresponding surrounding cutting manner, or is 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 the surrounding cutting of the virtual object to be cut is terminated or not based on the target included angle termination value; and if the end value of the target included angle is larger than an end threshold value, stopping performing the surrounding cutting on 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 end value according to the virtual object to be cut, and determining whether to terminate the circular cutting of the virtual object to be cut based on the target included angle end value includes: creating a third virtual tool component on the virtual object to be cut, and reading the coordinate of the third virtual tool component to obtain a third virtual component coordinate; taking the third virtual assembly coordinate as an origin, making a perpendicular line in the normal vector direction to obtain a third surrounding cutting intersection point, and reading a 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 performing point multiplication on the included angle normal vector and the normal vector to obtain a second included angle identifier, calculating a target included angle termination value by combining the second included angle identifier and the second included angle value, and if the target included angle termination value is greater than a termination threshold value, terminating the surrounding cutting of the virtual object to be cut.
The invention provides a cutting device based on a ghost engine in a second aspect, which comprises: 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 system comprises an acquisition and mapping module, a virtual engine and a control module, wherein 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 calculation 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 circle cutting data calculation unit may be further specifically configured to: when the virtual behavior data correspond to the surrounding cutting mode, creating a first virtual arrow component on the virtual object to be cut, and creating a first virtual tool component on the virtual cutting tool, wherein the positive direction of the first virtual arrow component points to the normal vector direction of a cutting surface; reading the coordinates of a virtual control object from the virtual behavior data in real time to obtain first virtual object coordinates, and reading the coordinates of the first virtual tool assembly in real time to obtain first virtual assembly coordinates; by using the first virtual object coordinate as an origin through a phantom engine, making a perpendicular line in 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 assembly coordinate as an origin, making a perpendicular line in the normal vector direction to obtain a second surrounding cutting intersection point, and reading a 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 identifier, wherein the first included angle identifier is used for indicating the rotation direction of the first virtual tool assembly; and determining virtual surrounding cutting data by combining the first surrounding cutting included angle value and the first included angle identification.
Optionally, in a third implementation manner of the second aspect of the present invention, the translational cutting data calculating unit 3032 includes: when the virtual behavior data correspond 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 a cutting surface; reading the coordinates of a virtual control object from the virtual behavior data in real time to obtain second virtual object coordinates, and reading the coordinates of the second virtual tool assembly in real time to obtain second virtual assembly coordinates; making a perpendicular line in the normal vector direction by using the second virtual component coordinate as an origin through the illusion engine to obtain a first translation cutting intersection point, and reading the coordinate of the first translation cutting intersection point to obtain a first translation cutting intersection point coordinate; taking the second virtual object coordinate as an origin, making a perpendicular 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 the coordinate of the second translation cutting intersection point; 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 ghost engine based cutting apparatus 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 the surrounding cutting of the virtual object to be cut is terminated 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 termination value of the target included angle is greater than the 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 component on the virtual object to be cut, and reading the coordinate of the third virtual tool component to obtain a third virtual component coordinate; taking the third virtual assembly coordinate as an origin, making a perpendicular line in the normal vector direction to obtain a third surrounding cutting intersection point, and reading a 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 performing point multiplication on the included angle normal vector and the normal vector to obtain a second included angle identifier, calculating a target included angle termination value by combining the second included angle identifier and the second included angle value, and if the target included angle termination value is greater than a termination threshold value, terminating the surrounding cutting of the virtual object to be cut.
A third aspect of the present invention provides a ghost engine based cutting apparatus, comprising: a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line; the at least one processor invokes the instructions in the memory to cause the ghost engine based cutting apparatus to perform the ghost engine based cutting method described above.
A fourth aspect of the present invention provides a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to perform the above-described ghost engine based cutting method.
In the technical scheme provided by the invention, a virtual world picture is displayed, and a target control object in the real world is mapped 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 is obtained in real time from the real world, and the real behavior data is 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 are virtual surrounding cutting data or virtual translation cutting data; 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. In 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 diagram of an embodiment of a ghost engine based cutting method according to an embodiment of the present invention;
FIG. 2 is a diagram of another embodiment of a ghost engine based cutting method in accordance with an embodiment of the present invention;
FIG. 3 is a schematic diagram of an embodiment of a ghost engine based cutting apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of another embodiment of a ghost engine based cutting apparatus according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an embodiment of a ghost engine based cutting apparatus 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 phantom engine, which are used for calculating virtual surrounding cutting data or virtual translation cutting data according to virtual behavior data, a virtual control object, a virtual cutting tool and a virtual object to be cut, and performing surrounding cutting on the virtual object to be cut according to the virtual surrounding cutting data or performing translation cutting on the virtual object 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, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, 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, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For ease of understanding, a detailed flow of an embodiment of the present invention is described below, and referring to fig. 1, an embodiment of the ghost engine based segmentation method in an 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 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 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 a virtual control object, wherein the virtual cutting tool can rotate, move and other changes along with the virtual control object.
It should be noted that the virtual world is a world presented when the application program runs on the terminal, and the virtual world may be a simulated world of a real world, a semi-simulated semi-fictional world, or a purely fictional world. The virtual control object, the virtual object to be cut, and the virtual cutting tool refer to an object that is movable in a virtual world, and the movable object may be a virtual animal, a virtual plant, a virtual character, etc., for example, an animal, a plant, a wall, a stone, 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 a utility knife. 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 knife 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 uses a virtual engine (UE 4) to map a target control object (a user's hand) in the real world into a virtual world screen and renders the target control object 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 (a wooden stick) and a virtual cutting tool (an art knife).
It is to be understood that the execution subject of the present invention may be a cutting apparatus based on a ghost engine, and may also be a terminal or a server, which is not limited herein. The embodiment of the present invention is described by taking a terminal as an execution subject.
102. Real behavior data of a target control object is obtained in real time from the real world, and the real behavior data is mapped into virtual behavior data of a virtual control object through a virtual engine;
the terminal acquires real behavior data from a 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, so as to obtain virtual behavior data.
In the present embodiment, the virtual behavior data includes the motion behavior of the virtual control object, such as a circling motion, a panning left, a panning right, and the like. When the hand of the user performs a circling motion in the real world, the terminal maps the motion into the virtual world through the UE4, or when the hand of the user translates left or right in the real world, the terminal maps the motion into the virtual world through the UE4, so as to map the real behavior data of the target control object (the hand of the user) 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 are virtual surrounding cutting data or virtual translation cutting data;
and 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, the virtual cutting tool (utility knife) in the virtual world picture has two cutting modes, one is circular cutting, that is, the virtual cutting tool (virtual cutting tool) is driven by the virtual control object (virtual hand) to cut around the virtual object to be cut (stick); the other is translational cutting, namely (a virtual cutting tool) is driven by a virtual control object (a virtual hand) to cut on the surface of a virtual object to be cut (a stick) in a translational mode. The specific cutting mode of the virtual cutting tool needs to be determined according to the virtual behavior data.
The method comprises the steps that a terminal firstly judges which cutting mode is specifically adopted when a virtual object to be cut (a wood stick) is cut according to virtual behavior data, and when the virtual behavior data correspond to surrounding cutting, the terminal calculates virtual surrounding cutting data according to a virtual control object (a virtual hand), a virtual cutting tool (an art knife) and the virtual object to be cut (the wood stick); and when the virtual behavior data corresponds to translation cutting, the terminal calculates virtual translation cutting data according to a virtual control object (virtual hand), a virtual cutting tool (utility knife) and a virtual object to be cut (wooden 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.
And 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 cutting according to the-30 ° virtual surround cut data. Here, "-" in front of 30 ° is used to indicate a rotation direction in the circling cutting, and in this embodiment, "+" or no mark indicates clockwise circling cutting around the virtual object to be cut (stick) and "-" indicates counterclockwise circling cutting around the virtual object to be cut (stick). In other embodiments, "+" and no indication may indicate a counterclockwise wrap-around cut and "-" may indicate a clockwise wrap-around cut, which is not particularly 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. In this embodiment, when there is no symbol or the symbol is "+" in front of the cutting value, the cutting is performed in the direction of the tool holder of the utility knife, and when the symbol in front of the cutting value is "-", the cutting is performed in the opposite direction of the tool holder of the utility knife. In other embodiments, the "+" and no symbol may indicate cutting in opposite directions of the utility knife handle, and the "-" may indicate cutting in the direction of the utility knife handle, which is not particularly limited.
It should be noted that, in the process of the circular cutting, the handle of the utility knife faces the virtual hand in real time.
In 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 ghost engine based segmentation method 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 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 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 a virtual control object, wherein the virtual cutting tool can rotate, move and other changes along with the virtual control object.
It should be noted that the virtual world is a world presented when the application program runs on the terminal, and the virtual world may be a simulated world of a real world, a semi-simulated semi-fictional world, or a purely fictional world. The virtual control object, the virtual object to be cut, and the virtual cutting tool refer to an object that is movable in a virtual world, and the movable object may be a virtual animal, a virtual plant, a virtual character, etc., for example, an animal, a plant, a wall, a stone, 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 a utility knife. 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 knife 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 employs the UE4 to map a target control object (user's hand) in the real world into a virtual world screen and render in the virtual world screen, thereby generating a virtual control object (virtual hand) in the virtual world screen. In addition, the virtual world picture also comprises a virtual object to be cut (a wooden stick) and a virtual cutting tool (an art knife).
202. Real behavior data of a target control object is obtained in real time from the real world, and the real behavior data is mapped into virtual behavior data of a virtual control object through a virtual engine;
the terminal acquires real behavior data from a 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, so as to obtain virtual behavior data.
In the present embodiment, the virtual behavior data includes the motion behavior of the virtual control object, such as a circling motion, a panning left, a panning right, and the like. When the hand of the user performs a circling motion in the real world, the terminal maps the motion into the virtual world through the UE4, or when the hand of the user translates left or right in the real world, the terminal maps the motion into the virtual world through the UE4, so as to map the real behavior data of the target control object (the hand of the user) 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 are virtual surrounding cutting data or virtual translation cutting data;
and 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, the virtual cutting tool (utility knife) in the virtual world picture has two cutting modes, one is circular cutting, that is, the virtual cutting tool (virtual cutting tool) is driven by the virtual control object (virtual hand) to cut around the virtual object to be cut (stick); the other is translational cutting, namely (a virtual cutting tool) is driven by a virtual control object (a virtual hand) to cut on the surface of a virtual object to be cut (a stick) in a translational mode. The specific cutting mode of the virtual cutting tool needs to be determined according to the virtual behavior data.
The method comprises the steps that a terminal firstly judges which cutting mode is specifically adopted when a virtual object to be cut (a wood stick) is cut according to virtual behavior data, and when the virtual behavior data correspond to surrounding cutting, the terminal calculates virtual surrounding cutting data according to a virtual control object (a virtual hand), a virtual cutting tool (an art knife) and the virtual object to be cut (the wood stick); and when the virtual behavior data corresponds to translation cutting, the terminal calculates virtual translation cutting data according to a virtual control object (virtual hand), a virtual cutting tool (utility knife) and a virtual object to be cut (wooden stick).
Specifically, when the virtual behavior data corresponds to the surrounding cutting, the terminal firstly creates a first 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 creates a first virtual tool component on the virtual cutting tool; secondly, the terminal reads the coordinates of the virtual control object and the coordinates of the first virtual tool component from the virtual behavior data in real time to obtain the coordinates of the first virtual object and the coordinates of the first virtual component; then the terminal takes the first virtual control object coordinate as an original point through the UE4, makes a perpendicular line in the straight line direction of the normal vector to obtain a first surrounding cutting intersection point, and reads the first surrounding cutting intersection point to obtain a first surrounding cutting intersection point vector; the terminal takes the first virtual component coordinate as an original point through the UE4, makes a perpendicular line in the direction of the straight line where the normal vector is located, obtains a second surrounding cutting intersection point, and reads the second surrounding cutting intersection point vector; the terminal calculates the 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 performs cross multiplication calculation on the first surrounding cutting intersection point vector and the normal vector direction to obtain a first included angle identifier for indicating the rotation direction of the first virtual tool assembly; and finally, the terminal determines virtual surrounding cutting data by combining the first surrounding cutting included angle value and the first included angle identification.
The method comprises the steps that a terminal firstly creates a first virtual arrow component on a virtual object to be cut (a stick), wherein the direction pointed by the 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 coordinate of a virtual control object (a virtual hand), namely the coordinate of the first virtual object, is read from virtual behavior data in real time; the terminal also creates a first virtual tool component (empty component) on a virtual cutting tool (art knife) and reads the coordinates of the component in real time to obtain the coordinates of the first virtual component; determining an intersection point, namely a first surrounding cutting intersection point, after a perpendicular line is made to a straight line of a normal vector direction by using the coordinate of the first virtual object as an origin by using a FindClosestPointLine function in the UE4, and then reading to obtain a vector of the first surrounding cutting intersection point, namely a first surrounding cutting intersection point vector; meanwhile, the terminal determines an intersection point which takes the coordinate of the first virtual assembly as an original point and makes a perpendicular line towards the straight line of the normal vector direction, namely a second surrounding cutting intersection point, and reads to obtain a vector of the second surrounding cutting intersection point, namely a second surrounding cutting intersection point vector; 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 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 determines virtual surrounding cutting data by combining the first included angle identifier and the first surrounding cutting included angle value. For example, the calculated first wrap-around cutting included angle value is 30 ° and the calculated first included angle is denoted "-", and the terminal obtains the virtual wrap-around cutting data as-30 °.
When the virtual behavior data corresponds to the translation cutting, the method specifically comprises the following steps:
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 the coordinates of the second virtual object and the coordinates of the second virtual component; the terminal takes the second virtual component coordinate as an origin through the illusion engine, makes a perpendicular line to a straight line where the normal vector direction is located to obtain a first translation cutting intersection point, and reads the coordinates of the first translation cutting intersection point; the terminal also takes the second virtual object coordinate as an origin through the illusion engine, makes a perpendicular line to the straight line in the normal vector direction to obtain a second translation cutting intersection point, and reads the coordinates of the second translation cutting intersection point; calculating to obtain a translational cutting displacement vector by combining the first translational cutting intersection point coordinate and the second translational cutting intersection point coordinate, and calculating the displacement vector by a preset length function to obtain the displacement length; and performing point multiplication calculation on the directions of the translation cutting displacement vector and the normal vector to obtain a displacement identifier, and finally determining virtual translation cutting data by combining the displacement identifier 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 (a stick), the arrow of the second virtual arrow component is in the positive direction, the positive direction of the first virtual arrow component points to the normal vector direction of a cutting surface, and simultaneously reads the coordinates of a virtual control object (a virtual hand) and the second virtual tool component from virtual behavior data in real time, namely the coordinates of the second virtual object and the coordinates of the second virtual component; the terminal takes the second virtual component coordinate as an origin point to make a perpendicular line to a straight line in the normal vector direction through the UE4 engine, determines a first translation cutting intersection point and reads to obtain a first translation cutting intersection point coordinate, and the terminal also takes the second virtual object coordinate as an origin point through the UE4 engine, makes a perpendicular line to a straight line in the normal vector direction, determines a second translation cutting intersection point and reads to obtain a second translation cutting intersection point coordinate; calculating a displacement vector of the first translation cutting intersection point coordinate and the second translation cutting intersection point coordinate through a UE4 engine to obtain a translation cutting displacement vector, and calculating the translation cutting displacement vector through a VectorLength function in the UE engine to obtain the length of the displacement vector, namely the displacement length; and the terminal performs point multiplication calculation on the translation cutting displacement vector and the normal vector direction to obtain a displacement identifier, and finally determines virtual translation cutting data by combining the translation cutting displacement vector and the displacement identifier. The displacement flag may be represented by "+" or "-", for example, the calculated displacement length is 5cm, the calculated displacement flag is "+", and the terminal obtains the virtual translation cutting data +5cm or 5 cm.
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;
and the terminal cuts 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 a virtual translation cutting tool.
For example, in one embodiment, assuming that the virtual surround cut data is-30 °, the terminal performs surround cutting according to the-30 ° virtual surround cut data. Here, "-" in front of 30 ° is used to indicate a rotation direction in the circling cutting, and in this embodiment, "+" or no mark indicates clockwise circling cutting around the virtual object to be cut (stick) and "-" indicates counterclockwise circling cutting around the virtual object to be cut (stick). In other embodiments, "+" and no sign may indicate a counterclockwise wrap-around cut, and "-" may indicate a clockwise wrap-around cut, or signs "1" and "0" are used to distinguish the direction of the wrap-around cut, which is not particularly 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. In this embodiment, when there is no symbol or the symbol is "+" in front of the cutting value, the cutting is performed in the direction of the tool holder of the utility knife, and when the symbol in front of the cutting value is "-", the cutting is performed in the opposite direction of the tool holder of the utility knife. In other embodiments, the "+" and no symbol may indicate cutting in opposite directions of the utility knife handle, and the "-" may indicate cutting in directions of the utility knife handle, or the "1" and "0" labels may be used to distinguish the cutting directions of the translation cutting, which is not particularly limited.
It should be noted that, when the cutting is performed in the translation manner, a cutting range is preset, so that a portion of the virtual cutting tool (utility knife) that is beyond the cutting range is suspended, and a portion that is within the cutting range is in contact with the virtual object to be cut (stick).
205. Calculating a target included angle termination value according to the virtual object to be cut, and judging whether the surrounding cutting of the virtual object to be cut is terminated 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 the 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 the virtual object to be cut (the wooden stick), and reads the coordinate of the third virtual tool component to obtain the coordinate of the third virtual component; secondly, the terminal takes the coordinate of the third virtual assembly as an original point through a UE4 engine, makes a perpendicular line to a straight line in the direction of the normal vector 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 by the normal vector to obtain a second included angle identifier; the terminal determines an initial included angle termination value by combining the second included angle identifier and the second included angle value; and finally, calculating the termination value of the initial included angle by adopting an inverse cosine function to obtain the termination value of the target included angle.
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 angle end value of-60, the target angle end value is 0.5.
206. And if the end value of the target included angle is larger than the end threshold value, stopping performing the surrounding cutting on the virtual object to be cut.
And if the end value of the target included angle is smaller than or equal to the end threshold value, continuing to calculate virtual surrounding cutting data, and performing surrounding cutting on the virtual object to be cut (the wood stick) based on the virtual surrounding cutting data.
If the termination threshold is 0.99 and the calculated target included angle termination value is 1, it indicates that the virtual cutting tool (utility knife) completes the surrounding cutting, and at this time, the virtual object to be cut is terminated to perform the surrounding cutting, and if the calculated target termination value is 0.5, it indicates that the virtual cutting tool (utility knife) does not complete the surrounding cutting, and the terminal needs to continue to calculate the virtual surrounding cutting data and perform the surrounding cutting on the virtual object to be cut (stick).
In 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.
With reference to fig. 3, the embodiment of the present invention describes a cutting device based on a phantom engine, and the cutting device based on a phantom 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 the 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 obtaining and mapping module 302 is configured to obtain real behavior data of a target control object in real time from a real world, 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;
a cutting module 304, configured to cut the virtual object to be cut according to the virtual surrounding cutting data and the corresponding surrounding cutting manner, or cut the virtual object to be cut according to the virtual translation cutting data and the corresponding translation cutting manner.
In 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 ghost engine based cutting apparatus 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 the 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 obtaining and mapping module 302 is configured to obtain real behavior data of a target control object in real time from a real world, 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;
a cutting module 304, configured to cut the virtual object to be cut according to the virtual surrounding cutting data and the corresponding surrounding cutting manner, or cut the virtual object to be cut according to the virtual translation cutting data and the corresponding translation cutting manner.
Optionally, the calculating module 303 includes:
a surrounding cutting data calculation 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 manner;
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 manner.
Optionally, the surround-cut data calculation unit 3031 may be further specifically configured to:
when the virtual behavior data correspond to the surrounding cutting mode, creating a first virtual arrow component on the virtual object to be cut, and creating a first virtual tool component on the virtual cutting tool, wherein the positive direction of the first virtual arrow component points to the normal vector direction of a cutting surface;
reading the coordinates of a virtual control object from the virtual behavior data in real time to obtain first virtual object coordinates, and reading the coordinates of the first virtual tool assembly in real time to obtain first virtual assembly coordinates;
by using the first virtual object coordinate as an origin through a phantom engine, making a perpendicular line in 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 assembly coordinate as an origin, making a perpendicular line in the normal vector direction to obtain a second surrounding cutting intersection point, and reading a 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 identifier, wherein the first included angle identifier is used for indicating the rotation direction of the first virtual tool assembly;
and determining virtual surrounding cutting data by combining the first surrounding cutting included angle value and the first included angle identification.
Optionally, the translational cutting data calculating unit 3032 includes:
when the virtual behavior data correspond 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 a cutting surface;
reading the coordinates of a virtual control object from the virtual behavior data in real time to obtain second virtual object coordinates, and reading the coordinates of the second virtual tool assembly in real time to obtain second virtual assembly coordinates;
making a perpendicular line in the normal vector direction by using the second virtual component coordinate as an origin through the illusion engine to obtain a first translation cutting intersection point, and reading the coordinate of the first translation cutting intersection point to obtain a first translation cutting intersection point coordinate;
taking the second virtual object coordinate as an origin, making a perpendicular 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 the coordinate of the second translation cutting intersection point;
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 illusion engine-based cutting device further includes:
a judging module 305, configured to calculate a target included angle end value according to the virtual object to be cut, and judge whether to terminate the circular cutting of the virtual object to be cut based on the target included angle end value;
and a termination module 306, configured to terminate the circular cutting of the virtual object to be cut if the termination value of the target included angle is greater than a termination threshold value.
Optionally, the determining module 305 may be further specifically configured to:
creating a third virtual tool component on the virtual object to be cut, and reading the coordinate of the third virtual tool component to obtain a third virtual component coordinate;
taking the third virtual assembly coordinate as an origin, making a perpendicular line in the normal vector direction to obtain a third surrounding cutting intersection point, and reading a 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 performing point multiplication on the included angle normal vector and the normal vector to obtain a second included angle identifier, calculating a target included angle termination value by combining the second included angle identifier and the second included angle value, and if the target included angle termination value is greater than a termination threshold value, terminating the surrounding cutting of the virtual object to be cut.
In 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.
Fig. 3 and 4 above describe the cutting apparatus based on the ghost engine in the embodiment of the present invention in detail from the perspective of the modular functional entity, and the cutting apparatus based on the ghost engine in the embodiment of the present invention is described in detail from the perspective of hardware processing.
Fig. 5 is a schematic structural diagram of a ghost engine based cutting device 500 according to an embodiment of the present invention, which may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 510 (e.g., one or more processors) and a memory 520, one or more storage media 530 (e.g., one or more mass storage devices) storing applications 533 or data 532. Memory 520 and storage media 530 may be, among other things, transient 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 for the fantasy engine based cutting apparatus 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 fantasy engine based cutting device 500.
The ghost engine based cutting apparatus 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 Server, Mac OS X, Unix, Linux, FreeBSD, and the like. Those skilled in the art will appreciate that the configuration of the fantasy engine based cutting apparatus shown in fig. 5 does not constitute a limitation of the fantasy engine based cutting apparatus and may include more or fewer components than shown, or some components in combination, 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, having stored therein instructions, which, when run on a computer, cause the computer to perform the steps of the phantom engine based cutting method.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A cutting method based on a phantom engine is characterized in that the cutting method based on the phantom engine comprises the following steps:
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 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 is obtained in real time from the real world, and the real behavior data is 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 are virtual surrounding cutting data or virtual translation cutting data;
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.
2. A phantom engine based cutting method according to claim 1, wherein said calculating cutting data from said virtual behavior data, said virtual control object, said virtual cutting tool and said virtual object to be cut, said cutting data being virtual surround cut data or virtual translation cut data comprises:
when the virtual behavior data correspond to the 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;
and when the virtual behavior data correspond to the 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.
3. The phantom engine based cutting method according to claim 2, wherein said calculating virtual surround cut data based on said virtual control object, said virtual cutting tool and said virtual object to be cut when said virtual behavior data corresponds to said surround cut mode comprises:
when the virtual behavior data correspond to the surrounding cutting mode, creating a first virtual arrow component on the virtual object to be cut, and creating a first virtual tool component on the virtual cutting tool, wherein the positive direction of the first virtual arrow component points to the normal vector direction of a cutting surface;
reading the coordinates of a virtual control object from the virtual behavior data in real time to obtain first virtual object coordinates, and reading the coordinates of the first virtual tool assembly in real time to obtain first virtual assembly coordinates;
by using the first virtual object coordinate as an origin through a phantom engine, making a perpendicular line in 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 assembly coordinate as an origin, making a perpendicular line in the normal vector direction to obtain a second surrounding cutting intersection point, and reading a 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 identifier, wherein the first included angle identifier is used for indicating the rotation direction of the first virtual tool assembly;
and determining virtual surrounding cutting data by combining the first surrounding cutting included angle value and the first included angle identification.
4. The phantom engine based cutting method according to claim 2, wherein said calculating virtual translational cutting data based on said virtual control object, said virtual cutting tool and said virtual object to be cut when said virtual behavior data corresponds to said translational cutting pattern comprises:
when the virtual behavior data correspond 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 a cutting surface;
reading the coordinates of a virtual control object from the virtual behavior data in real time to obtain second virtual object coordinates, and reading the coordinates of the second virtual tool assembly in real time to obtain second virtual assembly coordinates;
making a perpendicular line in the normal vector direction by using the second virtual component coordinate as an origin through the illusion engine to obtain a first translation cutting intersection point, and reading the coordinate of the first translation cutting intersection point to obtain a first translation cutting intersection point coordinate;
taking the second virtual object coordinate as an origin, making a perpendicular 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 the coordinate of the second translation cutting intersection point;
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.
5. The phantom engine based cutting method according to claim 3, wherein after said cutting the virtual object to be cut according to the virtual surround cutting data and the corresponding surround cutting mode, or according to the virtual translation cutting data and the corresponding translation cutting mode, 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 the surrounding cutting of the virtual object to be cut is terminated or not based on the target included angle termination value;
and if the end value of the target included angle is larger than an end threshold value, stopping performing the surrounding cutting on the virtual object to be cut.
6. The phantom engine based cutting method according to claim 5, wherein said calculating a target included angle end value according to the virtual object to be cut, and determining whether to end the circular cutting of the virtual object to be cut based on the target included angle end value comprises:
creating a third virtual tool component on the virtual object to be cut, and reading the coordinate of the third virtual tool component to obtain a third virtual component coordinate;
taking the third virtual assembly coordinate as an origin, making a perpendicular line in the normal vector direction to obtain a third surrounding cutting intersection point, and reading a 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 performing point multiplication on the included angle normal vector and the normal vector to obtain a second included angle identifier, calculating a target included angle termination value by combining the second included angle identifier and the second included angle value, and if the target included angle termination value is greater than a termination threshold value, terminating the surrounding cutting of the virtual object to be cut.
7. A ghost engine based cutting apparatus, the ghost engine based cutting apparatus 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 system comprises an acquisition and mapping module, a virtual engine and a control module, wherein 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.
8. The fantasy engine cutting apparatus of claim 7, wherein the computing module comprises:
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.
9. A ghost engine based cutting apparatus, characterized in that the ghost engine based cutting apparatus comprises: a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line;
the at least one processor invokes the instructions in the memory to cause the ghost engine based cutting apparatus to perform the ghost engine based cutting method of any one of claims 1-6.
10. A computer-readable storage medium, having a computer program stored thereon, which, when executed by a processor, implements the ghost engine based segmentation method according to any one of claims 1-6.
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 true CN111833462A (en) 2020-10-27
CN111833462B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115310239A (en) * 2022-10-08 2022-11-08 广州中望龙腾软件股份有限公司 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
PING KUANG ET AL.: "An improved calculation system for phase-functioned neural network and implementation in unreal engine", 《CLUSTER COMPUTING》, vol. 22, 31 March 2018 (2018-03-31), pages 15505 - 15516, XP036932855, DOI: 10.1007/s10586-018-2671-4 *
徐雅微 等: "基于VIVE的虚拟现实交互式机械臂仿真运动平台搭建", 《现代计算机》, no. 14, 15 May 2019 (2019-05-15), pages 70 - 74 *
滕贻健 等: "基于Open Inventor的虚拟驾驶仿真系统", 《计算机应用》, no. 1, 30 June 2009 (2009-06-30), pages 330 - 332 *
陈冠宇 等: "船舶机舱虚拟环境中虚拟手的介入操控", 《上海海事大学学报》, no. 04, 31 December 2014 (2014-12-31), pages 54 - 58 *

Cited By (2)

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

Also Published As

Publication number Publication date
CN111833462B (en) 2024-05-17

Similar Documents

Publication Publication Date Title
US7495665B2 (en) Storage medium having game program stored thereon and game apparatus
CN107976194B (en) Environment map adjusting method and device
CN108267154B (en) Map display method and device
CN108245890B (en) Method and device for controlling movement of object in virtual scene
CN109741436B (en) Method and device for rendering vector data
US20060244745A1 (en) Computerized method and computer system for positioning a pointer
CN109863467B (en) System, method and storage medium for virtual reality input
US20030184603A1 (en) Detecting collisions of three-dimensional models
CN112734896B (en) Environment shielding rendering method and device, storage medium and electronic equipment
CN111833462A (en) Cutting method, device and equipment based on illusion engine and storage medium
CN112365572B (en) Rendering method based on surface subdivision and related products thereof
CN111514587B (en) Information processing method, device, equipment and storage medium
CN105095314A (en) Point of interest (POI) marking method, terminal, navigation server and navigation system
CN111494945B (en) Virtual object processing method and device, storage medium and electronic equipment
CN110544315B (en) Virtual object control method and related equipment
CN115512025A (en) Method and device for detecting model rendering performance, electronic device and storage medium
CN111583398A (en) Image display method and device, electronic equipment and computer readable storage medium
CN115187729A (en) Three-dimensional model generation method, device, equipment and storage medium
EP2581823B1 (en) Method and system for applying three-dimensional (3d) switch panels in instant messaging tool
Jin et al. Interactive Mobile Augmented Reality system using a vibro-tactile pad
JP7375149B2 (en) Positioning method, positioning device, visual map generation method and device
CN108421256B (en) Object position display method and device
CN111667558B (en) Rope connection optimization method based on illusion engine and related equipment
CN104715452A (en) Regular prism plane display method and device
CN110930488B (en) Fish behavior simulation method, device, equipment and storage medium

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