CN111127609B - Particle position coordinate determination method and device and related equipment - Google Patents

Particle position coordinate determination method and device and related equipment Download PDF

Info

Publication number
CN111127609B
CN111127609B CN201911291451.4A CN201911291451A CN111127609B CN 111127609 B CN111127609 B CN 111127609B CN 201911291451 A CN201911291451 A CN 201911291451A CN 111127609 B CN111127609 B CN 111127609B
Authority
CN
China
Prior art keywords
distance value
particles
transformed
position coordinates
axis
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911291451.4A
Other languages
Chinese (zh)
Other versions
CN111127609A (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.)
Beijing Pixel Software Technology Co Ltd
Original Assignee
Beijing Pixel Software 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 Beijing Pixel Software Technology Co Ltd filed Critical Beijing Pixel Software Technology Co Ltd
Priority to CN201911291451.4A priority Critical patent/CN111127609B/en
Publication of CN111127609A publication Critical patent/CN111127609A/en
Application granted granted Critical
Publication of CN111127609B publication Critical patent/CN111127609B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • 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
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the invention provides a method, a device and related equipment for determining position coordinates of particles, and relates to the field of game scene construction. The method and the device acquire the emitting position coordinates and the emitting direction of particles contained in a scene file by analyzing the preset scene file, randomly generate first position coordinates of the particles by taking the emitting direction as a reference, then perform transformation operation on the first position coordinates to obtain second position coordinates, and take the emitting position coordinates as the next position coordinates of the particles in the motion process when the second position coordinates are positioned in a range determined by taking the emitting position coordinates as a sphere center and taking a preset threshold as a radius. Since the first position coordinates of the particles are randomly generated, the particles do irregular motion in the scene; meanwhile, when the second position coordinates meet the conditions, the coordinates of the particles become initial emission position coordinates, so that the final position of the particles is the same as the initial position, and the end point of the particles for completing the movement is unique.

Description

Particle position coordinate determination method and device and related equipment
Technical Field
The invention relates to the field of game scene construction, in particular to a method and a device for determining position coordinates of particles and related equipment.
Background
With the rapid development of the game industry, the complexity of the scenes is continuously increased while the games pursue pictures. With the change of the complexity of the scene, the object types and the object numbers of the scene are changed greatly. In general, these scenes often use special effects of particles, and then render the special effects into planar animation, so that the special effects are created in the game by repeated playing in the game. Game particles are an important means of playing special effects. In order to enhance the realism of a game scene, it is often necessary to incorporate some irregularly moving particles into the scene.
However, in the prior art, the motion track of the particles in the game scene is generally implemented by using boolean motion, noise interference, or the like, or a track of a certain curve is used as the motion track of the particles. However, under the condition of manual control, the object cannot be well simulated to do Boolean movement, the messy sense of the movement direction of the object cannot be well represented, and the computer resource consumed by calculation is too high; meanwhile, the noise interference mode is difficult to add artificial control, and the curve motion rule is too obvious; most importantly, the endpoint of the particle cannot be determined.
Disclosure of Invention
In view of the above, the present invention is directed to a method, an apparatus and a related device for determining position coordinates of particles.
In order to achieve the above object, the technical scheme adopted by the embodiment of the invention is as follows:
in a first aspect, an embodiment provides a method for determining position coordinates of particles, the method comprising:
analyzing a preset scene file, and acquiring initial information of particles contained in the scene file, wherein the initial information comprises emission position coordinates and emission directions of the particles;
randomly generating first position coordinates of the particles with the emission direction as a reference;
transforming the first position coordinate to obtain a second position coordinate;
and if the second position coordinate is positioned in a range determined by taking the emission position coordinate as a sphere center and taking a preset threshold value as a radius, taking the emission position coordinate as a third position coordinate, wherein the third position coordinate is the next position coordinate of the particle in the motion process.
In a second aspect, embodiments provide a position coordinate determining apparatus of a particle, the apparatus comprising:
the analysis module is used for analyzing a preset scene file and acquiring initial information of particles contained in the scene file, wherein the initial information comprises the emission position coordinates and the emission direction of the particles;
a coordinate generation module for randomly generating first position coordinates of the particles with the emission direction as a reference;
the coordinate transformation module is used for transforming the first position coordinate to obtain a second position coordinate;
and the coordinate determining module is used for taking the emission position coordinate as a third position coordinate if the second position coordinate is positioned in a range determined by taking the emission position coordinate as a sphere center and taking a preset threshold value as a radius, wherein the third position coordinate is the next position coordinate of the particle in the motion process.
In a third aspect, an embodiment provides a game device comprising a processor and a memory storing machine executable instructions executable by the processor to implement the method of determining position coordinates of particles according to any of the preceding embodiments.
In a fourth aspect, embodiments provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of determining position coordinates of particles according to any of the preceding embodiments.
According to the method, the device and the related equipment for determining the position coordinates of the particles, the preset scene file is analyzed to obtain initial information of the particles contained in the scene file, the initial information comprises the emitting position coordinates and the emitting direction of the particles, then the first position coordinates of the particles are randomly generated by taking the emitting direction as a reference, and then the first position coordinates are transformed to obtain the second position coordinates, so that when the second position coordinates are located in a range determined by taking the emitting position coordinates as a sphere center and taking a preset threshold value as a radius, the emitting position coordinates are used as the next position coordinates of the particles in the moving process. The first position coordinates of the particles are randomly generated, so that the particles do irregular motion in the game scene; meanwhile, when the second position coordinates meet the conditions, the coordinates of the particles become initial emission position coordinates, so that the final positions of the particles are the same as the initial positions, and the end point of the particles for completing the movement is ensured to be unique.
In order to make the above objects, features and advantages of the present invention more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 shows a block schematic diagram of a gaming device provided by an embodiment of the present invention.
Fig. 2 shows a flowchart of a method for determining position coordinates of particles according to an embodiment of the present invention.
Fig. 3 shows a further flowchart of a method for determining position coordinates of particles according to an embodiment of the present invention.
Fig. 4 shows a functional block diagram of a particle position coordinate determination device according to an embodiment of the present invention.
Icon: 100-a gaming device; 110-memory; a 120-processor; 200-position coordinate determination means of the particles; 210-a parsing module; 220-a coordinate generation module; 230-a coordinate transformation module; 240-a coordinate determination module; 250-judging module; 260-a transformation matrix determination module; 270-a position transformation module.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present invention.
It is noted that relational terms such as "first" and "second", and the like, are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Referring to FIG. 1, a block diagram of a gaming device 100 is shown. The gaming device 100 includes a memory 110 and a processor 120. The elements of the memory 110 and the processor 120 are directly or indirectly electrically connected to each other to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines.
Wherein the memory 110 is used for storing programs or data. The memory 110 may be, but is not limited to, random access memory (RandomAccessMemory, RAM), read Only Memory (ROM), programmable Read only memory (programmable Read-OnlyMemory, PROM), erasable Read only memory (erasabableread-OnlyMemory, EPROM), electrically erasable Read only memory (electrically erasable programmable Read-OnlyMemory, EEPROM), and the like.
The processor 120 is used to read/write data or programs stored in the memory 110 and perform corresponding functions.
It should be noted that the game device 100 according to the present invention may be a mobile phone, a computer, a tablet, a PS4 game machine, etc.
It should be understood that the configuration shown in fig. 1 is merely a schematic diagram of the configuration of the gaming device 100, and that the gaming device 100 may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
First embodiment
The invention provides a method for determining position coordinates of particles, which is used for realizing irregular movement of the particles and simultaneously ensuring that the end point of the movement of the particles is unique. Referring to fig. 2, a flowchart of a method for determining position coordinates of particles according to the present invention is shown. The method for determining the position coordinates of the particles comprises the following steps:
s201, analyzing a preset scene file, and acquiring initial information of particles contained in the scene file.
Scene files may be referred to as background files, meaning files used in animation and movie production to store scene and background compositions. Scene files typically include no-motion or simple-motion objects such as buildings, mountains, trees, weather, and the like. For the purposes of the beauty and reality of the picture, particles are generally used for rendering the objects.
Thus, the initial information includes the emission position coordinates and the emission direction of the particles. It can be understood that the emission position coordinates are initial position coordinates of the particles; while the direction of emission determines the range of motion of the particles, i.e. in which quadrant of the cartesian three-dimensional coordinate system (left-hand coordinate system) the particles will move.
And S202, randomly generating first position coordinates of the particles by taking the emission direction as a reference.
Referring to fig. 2, a flowchart of a method for determining position coordinates of particles according to the present invention is shown. Wherein S202 includes:
s2021, randomly generating a first distance value, a second distance value and a third distance value.
The first distance value, the second distance value and the third distance value are distance values between the particles and the x axis, the y axis and the z axis respectively.
In an alternative embodiment, 3 values may be randomly generated using the rand function as distance values for the particle to 3 directions of the x, y, z axes; it will be appreciated that the distance values are positive numbers.
S2022, determining the sign of the particles in the x-axis, y-axis and z-axis according to the emission direction.
For example, the emission direction characterizes the particle movement in a first quadrant of a Cartesian three-dimensional coordinate system (left-hand coordinate system), the sign of the x-axis is "+", the sign of the y-axis is "+" and the sign of the z-axis is "-".
S2023 generates first position coordinates from the first distance value, the second distance value, the third distance value, and the sign of the particles in the x-axis, the y-axis, and the z-axis.
For example, a set of x=1, y=2, z=3 data is randomly generated, and the emission direction characterizes the particle movement in the first quadrant of a cartesian three-dimensional coordinate system (left-hand coordinate system), the sign of the x-axis is "+", the sign of the y-axis is "+" and the sign of the z-axis is "-". Thus, the coordinates of the particles are (1, 2, -3).
It will be appreciated that the first, second and third distance values generated by the random function are completely random, so that the first position coordinates generated are also completely random, i.e. the movement of the particles is also completely random.
S203, transforming the first position coordinate to obtain a second position coordinate.
With continued reference to fig. 3, S203 includes:
s2031, respectively judging whether the first distance value, the second distance value and the third distance value are odd or even, and executing S2032 if the first distance value, the second distance value and the third distance value are odd; if it is even, S2033 is executed.
It should be noted that the first distance value, the second distance value, and the third distance value may not be odd or even at the same time; but are each randomly odd or even, and when they are not both odd or even, different steps are performed, respectively.
For example, if the first distance value is an odd number and the second distance value is an even number, the step of S2032 may be performed on the first distance value and the step of S2033 may be performed on the second distance value.
S2032, generating a transformed first distance value, a transformed second distance value, and a transformed third distance value based on the first distance value, the second distance value, and the third distance value, and the first equation.
That is, if the first distance value, the second distance value, or the third distance value is an odd number, the transformed first distance value is generated based on the first distance value and the first expression, the transformed second distance value is generated based on the second distance value and the first expression, and the transformed third distance value is generated based on the third distance value and the first expression.
In an alternative embodiment, the first formula is: n is n i '=3n i +1 (i=1, 2, 3); wherein n is 1 '、n 2 '、n 3 ' being the transformed first distance value, the transformed second distance value or the transformed third distance value, respectively, n 1 、n 2 、n 3 The first distance value, the second distance value or the third distance value respectively.
For example, if the first distance value n 1 =3, the transformed first distance value n 1 '=3×3+1=10。
S2033, generating a transformed first distance value, a transformed second distance value, and a transformed third distance value based on the first distance value, the second distance value, and the third distance value and the second equation.
If the first distance value, the second distance value or the third distance value is even, correspondingly generating a transformed first distance value based on the first distance value and the second expression, generating a transformed second distance value based on the second distance value and the second expression, and generating a transformed third distance value based on the third distance value and the second expression.
In an alternative embodiment, the second formula is: n is n i '=n i 2 (i=1, 2, 3); wherein n is 1 '、n 2 '、n 3 ' being the transformed first distance value, the transformed second distance value or the transformed third distance value, respectively, n 1 、n 2 、n 3 The first distance value, the second distance value or the third distance value respectively.
For example, if the third distance value n 3 =10, the transformed third distance value n 3 '=10÷2=5。
S2034, generating a second position coordinate based on the transformed first distance value, the transformed second distance value, the transformed third distance value, and the sign of the particle in the x-axis, the y-axis, and the z-axis.
For example, a first distance value n 1 =10, second distance value n 2 =11, third distance value n 3 =12, the transformed first distance value n 1 ' =5, the transformed second distance value n 2 ' =34, the transformed third distance value n 3 ' =6; meanwhile, if the signs of the particles determined in step S2022 in the x-axis, the y-axis and the z-axis are "+", "-", respectively; the second position coordinates are (5, 34, -6).
S204, judging whether the second position coordinate is located in a range determined by taking the transmitting position coordinate as a sphere center and taking a preset threshold value as a radius, and if so, executing S205; if not, S206 is performed.
It should be noted that, the threshold value may be set according to the requirement of the user; when the second position coordinates lie within a range determined by taking the emission position coordinates as the sphere center and taking a preset threshold value as a radius, the particles are indicated to move to a position close to the initial position.
In connection with the example in S2034, if the threshold is 4 and the emission position coordinate is (1, 1), it is determined whether the second position coordinate is (5, 34, -6) or not within a range determined by taking (1, 1) as the center of sphere and taking 4 as the radius.
S205, the transmission position coordinates are taken as third position coordinates.
The third position coordinate is the next position coordinate of the particle in the motion process. That is, the third position coordinate is not the current actual position of the particle, but the position of the particle at the next time of coordinate conversion.
When the second position coordinates are located within a range determined by taking the emission position coordinates as sphere centers and taking a preset threshold value as a radius, the particle is indicated to be moved to be close to the emission position, so that the emission position coordinates are directly taken as third position coordinates, and the final position of the particle is the same as the initial position of the particle.
If the second position coordinate is located on the boundary of the sphere defined by taking the emission position coordinate as the center of the sphere and taking the preset threshold value as the radius, the emission position coordinate is also taken as the third position coordinate.
And S206, taking the second position coordinate as a third position coordinate.
When the second position coordinate is located outside the range determined by taking the emission position coordinate as the sphere center and taking the preset threshold value as the radius, the position where the particle is about to be located is further away from the emission position of the particle, and the particle can continue to move at the moment, so that the second position coordinate is taken as the third position coordinate.
S207, determining a transformation matrix of the particles based on the first position coordinates and the third position coordinates.
In practice, S203 to S206 predict the third position coordinates of the particles, and in the case of actual movement, it is necessary to perform position conversion of the particles by using the conversion matrix of the particles.
S208, performing position transformation on the particles according to the transformation matrix.
It should be noted that, the process of performing position transformation on the particles according to the transformation matrix is a process of moving the particles from the first position coordinates to the third position coordinates.
It should be noted that, for a particle having the emission position coordinates as the third position coordinates, the movement to the third position coordinates means that the particle has moved to the end point; in the case of particles having the second position coordinates as the third position coordinates, the third position coordinates need to be transformed again until the transformed third position coordinates are located within a range defined by taking the emission position coordinates as the sphere center and taking a preset threshold as the radius.
That is, the particles may continue to move randomly since they have not moved to the vicinity of the emission location at this time. The process of performing the irregular movement is continued as shown in S203 to S204 until the particles move to a range determined by taking the coordinates of the emission position as the sphere center and taking the preset threshold value as the radius.
For example, in combination with the distance in S204, since the third position coordinates (5, 34, -6) are located outside the range defined by taking (1, 1) as the center and taking 4 as the radius, it is necessary to perform the transformation operation on the third position coordinates (5, 34, -6) to obtain transformed third position coordinates (16, 17, -3), and determine again whether the transformed third position coordinates (16, 17, -3) are located within the range defined by taking (1, 1) as the center and taking 4 as the radius; and so on until the particle moves within a range determined by taking the emission position coordinates as sphere centers and taking a preset threshold value as a radius.
In order to perform the corresponding steps in the above embodiments and the various possible ways, an implementation of the position coordinate determining apparatus 200 of a particle is given below, alternatively, the position coordinate determining apparatus 200 of a particle may employ the device structure of the game device 100 shown in fig. 1 and described above. Further, referring to fig. 4, fig. 4 is a functional block diagram of a particle position coordinate determining apparatus 200 according to an embodiment of the invention. It should be noted that, the basic principle and the technical effects of the particle position coordinate determining apparatus 200 provided in this embodiment are the same as those of the above embodiment, and for brevity, reference should be made to the corresponding contents of the above embodiment. The position coordinate determination device 200 of the particle includes: the system comprises an analysis module 210, a coordinate generation module 220, a coordinate transformation module 230, a coordinate determination module 240, a judgment module 250, a transformation matrix determination module 260 and a position transformation module 270.
The parsing module 210 is configured to parse a preset scene file, and obtain initial information of particles included in the scene file.
It will be appreciated that in an alternative embodiment, the parsing module 210 may be used to perform S201.
The coordinate generating module 220 is configured to randomly generate first position coordinates of the particles based on the emission direction.
Specifically, the coordinate generating module 220 is configured to randomly generate a first distance value, a second distance value, and a third distance value, then determine the sign of the particle in the x-axis, the y-axis, and the z-axis according to the emission direction, and generate the first position coordinate according to the first distance value, the second distance value, the third distance value, and the sign of the particle in the x-axis, the y-axis, and the z-axis.
It will be appreciated that in an alternative embodiment, the coordinate generation module 220 may be configured to perform S202, S2021, S2022, and S2023.
The coordinate transformation module 230 is configured to transform the first position coordinate to obtain a second position coordinate.
Specifically, the coordinate transformation module 230 is configured to determine that the first distance value, the second distance value, and the third distance value are odd or even, and generate a transformed first distance value, a transformed second distance value, and a transformed third distance value based on the first distance value, the second distance value, and the third distance value and the first equation, respectively, if the first distance value, the second distance value, or the third distance value is odd; if the first distance value, the second distance value or the third distance value is even, correspondingly generating a transformed first distance value, a transformed second distance value and a transformed third distance value based on the first distance value, the second distance value, the third distance value and the second expression; and generating second position coordinates based on the transformed first distance value, the transformed second distance value, the transformed third distance value, and the sign of the particles in the x-axis, the y-axis, and the z-axis.
It will be appreciated that in an alternative embodiment, the coordinate transformation module 230 may be used to perform S203, S2031, S2032, S2033 and S2034.
The determining module 250 is configured to determine whether the second position coordinate is within a range determined by taking the transmitting position coordinate as a sphere center and taking a preset threshold value as a radius.
It will be appreciated that in an alternative embodiment, the determination module 250 may be used to perform S204.
The coordinate determining module 240 is configured to take the transmission position coordinate as the third position coordinate if the second position coordinate is within a range determined by taking the transmission position coordinate as the center of sphere and taking a preset threshold as a radius; otherwise, the second position coordinate is taken as the third position coordinate.
It will be appreciated that in an alternative embodiment, the coordinate determination module 240 may be used to perform S205 and S206.
The transformation matrix determination module 260 is configured to determine a transformation matrix of the particle based on the first position coordinate and the third position coordinate.
It will be appreciated that in an alternative embodiment, the transformation matrix determination module 260 may be used to perform S207.
The position transformation module 270 is used for transforming the position of the particles according to the transformation matrix.
It will be appreciated that in an alternative embodiment, the location transformation module 270 may be used to perform S208.
Alternatively, the above modules may be stored in the memory 110 shown in fig. 1 or solidified in the operating system (OperatingSystem, OS) of the game device 100 in the form of software or Firmware (Firmware), and may be executed by the processor 120 in fig. 1. Meanwhile, data, codes of programs, and the like, which are required to execute the above-described modules, may be stored in the memory 110.
The embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, which when being executed by a processor implements a method for determining position coordinates of particles according to any of the preceding embodiments.
In summary, according to the method, the device and the related equipment for determining the position coordinates of the particles provided by the embodiment of the invention, the preset scene file is analyzed to obtain the initial information of the particles contained in the scene file, the initial information comprises the emission position coordinates and the emission direction of the particles, then the first position coordinates of the particles are randomly generated by taking the emission direction as a reference, and then the first position coordinates are transformed to obtain the second position coordinates, so that when the second position coordinates are positioned in a range determined by taking the emission position coordinates as a sphere center and taking a preset threshold value as a radius, the emission position coordinates are taken as the next position coordinates of the particles in the movement process. The first position coordinates of the particles are randomly generated, so that the particles do irregular motion in the game scene; meanwhile, when the second position coordinates meet the conditions, the coordinates of the particles become initial emission position coordinates, so that the final positions of the particles are the same as the initial positions, and the end point of the particles for completing the movement is ensured to be unique.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners as well. The apparatus embodiments described above are merely illustrative, for example, of the flowcharts and block diagrams in the figures that illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present invention may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a game device, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A method of determining position coordinates of a particle, the method comprising:
analyzing a preset scene file, and acquiring initial information of particles contained in the scene file, wherein the initial information comprises emission position coordinates and emission directions of the particles; the scene file is a file used for storing scene and background in animation and film production, and comprises an object without action or with simple action, and the object is rendered through particles;
randomly generating a first distance value, a second distance value and a third distance value, wherein the first distance value, the second distance value and the third distance value are respectively distance values between the particles and an x-axis, a y-axis and a z-axis;
determining the sign of the particles in the x-axis, the y-axis and the z-axis according to the emission direction;
generating the first position coordinates according to the first distance value, the second distance value, the third distance value and the sign of the particles in the x axis, the y axis and the z axis;
respectively judging whether the first distance value, the second distance value and the third distance value are odd or even;
if the first distance value, the second distance value or the third distance value is odd, correspondingly generating a transformed first distance value, a transformed second distance value and a transformed third distance value based on the first distance value, the second distance value, the third distance value and a first formula;
if the first distance value, the second distance value or the third distance value is even, correspondingly generating a transformed first distance value, a transformed second distance value and a transformed third distance value based on the first distance value, the second distance value, the third distance value and a second formula;
generating the second position coordinates based on the transformed first distance value, the transformed second distance value, the transformed third distance value, and the sign of the particles in the x-axis, the y-axis, and the z-axis; and if the second position coordinate is positioned in a range determined by taking the emission position coordinate as a sphere center and taking a preset threshold value as a radius, taking the emission position coordinate as a third position coordinate, wherein the third position coordinate is the next position coordinate of the particle in the motion process.
2. The method of determining position coordinates of particles according to claim 1, further comprising:
and if the second position coordinate is located outside a range determined by taking the transmitting position coordinate as a sphere center and taking a preset threshold value as a radius, taking the second position coordinate as the third position coordinate.
3. The method of determining position coordinates of particles according to claim 1, wherein the first expression is: n is n i '=3n i +1 (i=1, 2, 3); wherein n is 1 '、n 2 '、n 3 ' being the transformed first distance value, the transformed second distance value or the transformed third distance value, respectively, n 1 、n 2 、n 3 The first distance value, the second distance value or the third distance value, respectively.
4. The method of determining position coordinates of particles according to claim 1, wherein the second expression is: n is n i '=n i 2 (i=1, 2, 3); wherein n is 1 '、n 2 '、n 3 ' the transformed first distance value, the transformed second distance value or the transformed third distance respectivelyValue n 1 、n 2 、n 3 The first distance value, the second distance value or the third distance value, respectively.
5. The method of determining position coordinates of particles according to claim 1 or 2, characterized in that the method further comprises:
determining a transformation matrix for the particles based on the first position coordinates and the third position coordinates;
and carrying out position transformation on the particles according to the transformation matrix.
6. A position coordinate determining apparatus of a particle, the apparatus comprising:
the analysis module is used for analyzing a preset scene file and acquiring initial information of particles contained in the scene file, wherein the initial information comprises the emission position coordinates and the emission direction of the particles; the scene file is a file used for storing scene and background in animation and film production, and comprises an object without action or with simple action, and the object is rendered through particles;
the coordinate generation module is used for randomly generating a first distance value, a second distance value and a third distance value, wherein the first distance value, the second distance value and the third distance value are respectively distance values between the particles and an x-axis, a y-axis and a z-axis; determining the sign of the particles in the x-axis, the y-axis and the z-axis according to the emission direction; generating the first position coordinates according to the first distance value, the second distance value, the third distance value and the sign of the particles in the x axis, the y axis and the z axis;
the coordinate transformation module is used for respectively judging whether the first distance value, the second distance value and the third distance value are odd or even; if the first distance value, the second distance value or the third distance value is odd, correspondingly generating a transformed first distance value, a transformed second distance value and a transformed third distance value based on the first distance value, the second distance value, the third distance value and a first formula; if the first distance value, the second distance value or the third distance value is even, correspondingly generating a transformed first distance value, a transformed second distance value and a transformed third distance value based on the first distance value, the second distance value, the third distance value and a second formula; generating the second position coordinates based on the transformed first distance value, the transformed second distance value, the transformed third distance value, and the sign of the particles in the x-axis, the y-axis, and the z-axis;
and the coordinate determining module is used for taking the emission position coordinate as a third position coordinate if the second position coordinate is positioned in a range determined by taking the emission position coordinate as a sphere center and taking a preset threshold value as a radius, wherein the third position coordinate is the next position coordinate of the particle in the motion process.
7. A gaming device comprising a processor and a memory, the memory storing machine executable instructions executable by the processor to implement the method of determining position coordinates of a particle as claimed in any one of claims 1 to 5.
8. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements a method of determining position coordinates of particles according to any of claims 1-5.
CN201911291451.4A 2019-12-16 2019-12-16 Particle position coordinate determination method and device and related equipment Active CN111127609B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911291451.4A CN111127609B (en) 2019-12-16 2019-12-16 Particle position coordinate determination method and device and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911291451.4A CN111127609B (en) 2019-12-16 2019-12-16 Particle position coordinate determination method and device and related equipment

Publications (2)

Publication Number Publication Date
CN111127609A CN111127609A (en) 2020-05-08
CN111127609B true CN111127609B (en) 2024-02-23

Family

ID=70499109

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911291451.4A Active CN111127609B (en) 2019-12-16 2019-12-16 Particle position coordinate determination method and device and related equipment

Country Status (1)

Country Link
CN (1) CN111127609B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111625170B (en) * 2020-06-15 2022-09-30 北京达佳互联信息技术有限公司 Animation display method, electronic equipment and storage medium
CN115423914A (en) * 2021-05-31 2022-12-02 北京字跳网络技术有限公司 Particle rendering method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109364484A (en) * 2018-12-20 2019-02-22 北京像素软件科技股份有限公司 Game role mobile test method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190114819A1 (en) * 2017-10-13 2019-04-18 Microsoft Technology Licensing, Llc Dimensional content surface rendering

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109364484A (en) * 2018-12-20 2019-02-22 北京像素软件科技股份有限公司 Game role mobile test method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杜园园 ; 侯彤璞 ; 郭艳霞 ; .Direct3D场景中3D模型的处理方法.辽宁石油化工大学学报.2008,(04),全文. *

Also Published As

Publication number Publication date
CN111127609A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
US20170352186A1 (en) Navigation and interaction controls for three-dimensional environments
Le Muzic et al. Illustrative visualization of molecular reactions using omniscient intelligence and passive agents
CN111127609B (en) Particle position coordinate determination method and device and related equipment
CN102999932A (en) Chart animation
CN109191550B (en) Particle rendering method and device, electronic equipment and storage medium
CN107070785B (en) Method and device for realizing reading sharing
CN111190589A (en) Visual programming method and terminal equipment
US20180196930A1 (en) System, method and computer program product for stateful instruction-based dynamic man-machine interactions for humanness validation
CN108874336A (en) A kind of information processing method and electronic equipment
Vasudevamurt et al. Serious game engines: Analysis and applications
US20170228850A1 (en) Graphics-processing-unit shader program control flow emulation
CN108769149B (en) Application partition processing method and device and computer readable storage medium
CN111068326A (en) Game skill configuration method, device, server and storage medium
CN112915540B (en) Data processing method, device and equipment for virtual scene and storage medium
CN111265875B (en) Method and equipment for displaying game role equipment
KR20230094296A (en) A system that provides various asset management such as financial, real, and digital in the metaverse and interactive services between avatars
Foster et al. Digital doppelgängers: Converging technologies and techniques in 3D world modeling, video game design and urban design
WO2021100109A1 (en) Event prediction method, event prediction device, and program
CN111494955A (en) Game-based role interaction method, device, server and medium
CN112509101A (en) Method for realizing motion transition of multiple dynamic character materials in animation video
Kirar et al. Review paper on the generation of computer graphics
BinSubaih et al. G-factor portability in game development using game engines
CN113590334B (en) Method, device, medium and electronic equipment for processing character model
Resch Rwa-a game engine for real world audio games.
CN117894074A (en) Virtual musical instrument playing 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