Small program game 3D engine development tool system
By implanting RCM algorithms in the scene editing module of the mini-program game engine development tool and using multi-axis acceleration sensors, the problem of lack of multi-view recording and diversity in the existing technology is solved, and the camera captures motion animation from different viewpoints and positions character movements in real time, optimizing the rendering results of 3D game space.
Patent Information
- Application Number
- CN202411879058.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-05-27
AI Technical Summary
The lack of multi-viewpoint recording and diversity in existing mini-program game engine development tools has resulted in the analysis being limited to a few isolated feature points and the inability to analyze the entire range of motion. The dataset is limited to a limited environment and feature range, limiting the model's performance in identifying behavior.
The RCM algorithm is implanted in the scene editing module to realize automatic capture and processing of the scene; the gravity acceleration component of the multi-axis acceleration sensor calculates the pitch angle of the 3D device, and position the character's movement in real time based on the character's pitch angle, acceleration and gravity sensing information, control the position of the 3D device in the game engine, and optimize the rendering results of the 3D game space structure.
Through the combination of RCM algorithm and multi-axis acceleration sensor, the camera captures action animation from different viewpoints and locates character movements in real time, optimizes the rendering results of 3D game space, and solves the limitations of dataset limitations and model recognition behavior performance.
Smart Images

Figure CN120045103A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and more specifically, to a development tool system for a mini-program game 3D engine. Background Art
[0002] In the prior art, the development tools for mini-program game engines lack multi-viewpoint recording and diversity, resulting in the analysis being limited to a few isolated feature points and unable to analyze the entire range of motion; the data set is limited to a limited environment and feature range, restricting the performance of the model in identifying behaviors.
[0003] Therefore, the present invention provides a development tool system for a mini-program game 3D engine, which improves the above technical problems. Summary of the Invention
[0004] The embodiments of the present disclosure aim at the deficiencies of the prior art and provide a development tool system for a mini-program game 3D engine. The present invention implants the RCM algorithm in the scene editing module to achieve automatic capture and processing of the scene; calculates the pitch angle of the 3D device using the gravitational acceleration component of the multi-axis acceleration sensor, and based on the pitch angle, acceleration, and gravity sensing information of the character, real-time locates the character movement, controls the position of the 3D device in the game engine, optimizes the rendering result of the 3D game space structure, and completes the design of the development tool system for the mini-program game 3D engine.
[0005] The above technical object of the present invention is achieved through the following technical solutions: A development tool system for a mini-program game 3D engine, including the following steps: a scene editing module, which is used to create and edit game scenes;
[0006] A character editing module, which is used to create and edit game characters;
[0007] A particle editing module, which is used to create and edit game particle effects;
[0008] A script editing module, which is used to write scripts for the game;
[0009] A debugging module, which is used to debug the game;
[0010] A packaging tool, which is used to package the game into a mini-program format.
[0011] As a preferred technical solution of the present invention, the RCM algorithm is implanted in the scene editing module, enabling the camera to capture specific action animations from different viewpoints;
[0012] According to the RCM algorithm, the camera starts from the position of the character; for each movement, the camera moves a random horizontal distance at a random angle in the horizontal plane and additionally moves a random vertical distance;
[0013] The transition between two consecutive points Pos i and Pos i+1 can be expressed as follows:
[0014]
[0015] where represents the change in the position vector and can be expressed as:
[0016]
[0017] where, represents the projection on the xOy plane; z and x are unit vectors along the z-axis and x-axis; the horizontal movement on the xOy plane is quantified by Δmagnitude xy whose magnitude is The angular deviation of the camera on the plane is described by the angle Δθ, which is and the angle between; Δz represents the vertical change in the z-axis direction.
[0018] As a preferred technical solution of the present invention, in the algorithm, Δmagnitude xy , Δθ, and Δz are used to control the movement of the camera between two adjacent positions; the parameters Δmagnitude xy , Δθ, Δz are used to specify the movement of the camera from one point to the next:
[0019] Δmagnitude xy = U(a m , b m )
[0020] Δθ = U(a θ , b θ )
[0021] Δz = U(a z , b z )
[0022] where, U(a m , b m ) represents a uniform distribution for generating random values of the camera movement parameters; the variables a m and b m represent the minimum and maximum limits of the horizontal movement distance on the xO y plane for Δmagnitude xy ; aθ and b θ Set the limit Δθ for the angle change; a z and b z is the limit Δz for the vertical movement distance along the z-axis;
[0023] With each movement of the camera position in the same animation scene, the parameter Δmagnitude xy 、Δθ and Δz are all random; when the scene changes, the initial position of the camera is reset to align with the new position of the character.
[0024] As a preferred technical solution of the present invention, the scene editing module calculates each point from the starting point to the ending point through exploratory search;
[0025] Write the points around the starting point on the open list points, calculate the h(n) and g(n) of each point to obtain the evaluation value f(n); then write the small points on the open list points, add the surrounding points to the open list points, and sort them without any obstacles; pass through the anchor points one by one until finally selected;
[0026] The reference value is represented by the scoring function:
[0027] f(n) = g(n) + h(n)
[0028] Among them, f(n) is the estimation function of node n; g(n) is the actual cost from the initial position point to the n positions in the state space; h(n) is the estimated cost of the best path from n to the target node.
[0029] As a preferred technical solution of the present invention, by calculating the function f*(n), the state of the adjacent points in the table from the start to the end can be obtained; if the predicted new value is less than the previous iteration value, this is the new iteration point before the end of the iteration;
[0030] The calculation formula of the f*(n) function is:
[0031]
[0032] Among them, g*(n) represents the movement consumption on the path from the starting point to the current point; h*(n) represents the estimated cost from the nth point to the target point; f*(n) represents the estimated cost from the nth point to the target point, compare this value with the value of the previous iteration, if it is less than the iteration value, add this point to the best path; after the iteration reaches the target point, the iteration ends.
[0033] As a preferred technical solution of the present invention, calculate the f*(n) value of the current point and the f*n value of the surrounding points, and add the minimum reserved value of the f*(n=) value and the f*(n / ) value to the optimal path table; continue the iteration until the iteration ends;
[0034] Construct a homogeneous transformation matrix through a continuous search process that ends with the optimal path:
[0035]
[0036] As a preferred technical solution of the present invention, the character editing module records parts of the game character using 3D virtual reality technology, uses virtual reality technology to ensure the quality of the system interface, and ensures the standard actions of the character during movement through image simulation analysis;
[0037] Construct an OBB bounding box and an ovoid body, and perform triangular strip compression encoding on the ovoid body to complete the three-dimensional sense:
[0038]
[0039]
[0040] Where q and r are the three-dimensional coordinate systems of the convex block vertices; μ is the mean vector; c is the covariance matrix.
[0041] As a preferred technical solution of the present invention, in collision detection, traverse the hierarchical concavity and convexity of the object. Through the gyroscope sensor and the three-axis magnetic sensor with the reference geomagnetic field as the coordinate, when the direction of the control device changes, the following can be obtained:
[0042]
[0043] Where the axis Z is the geomagnetic field vector component on the sensor x-axis, the axis Y is the geoelectric field vector component on the sensor axis Z, and Cgnd is the magnetic field intensity of the active control current;
[0044] Where the X-axis, Y-axis, and Z-axis are the magnetic field intensity values currently collected by the three-axis geomagnetic sensor and can only be used after data processing. The calculation formula for data processing is:
[0045]
[0046] Utilize the gravitational acceleration component of the multi-axis acceleration sensor to calculate the pitch angle of the device at this time; use the pitch angle, acceleration, and gravity sensing information to real-time locate the head movement of the character; control the position of the 3D device in the game engine and make the 3D device move completely according to the changes of the character's head and perspective.
[0047] In summary, the present invention has the following beneficial effects: By implanting the RCM algorithm in the scene editing module, the camera captures specific action animations from different viewpoints, and calculates each point from the starting point to the ending point through exploratory search calculation, realizing the automatic capture and processing of the scene. Then, combined with the state space search method for traversal, the pitch angle of the 3D device is calculated using the gravitational acceleration component of the multi-axis acceleration sensor, and according to the pitch angle, acceleration, and gravity sensing information of the character, the character movement is positioned in real time, the position of the 3D device in the game engine is controlled, the rendering result of the 3D game space structure is optimized, and the design of the 3D engine development tool system for the mini-program game is completed. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 FIG. is a framework diagram of a 3D engine development tool system for a mini-program game provided by an embodiment of the present invention;
[0049] Figure 2 FIG. is a schematic diagram of a camera capturing specific action animations from different viewpoints provided by an embodiment of the present invention; DETAILED DESCRIPTION OF THE EMBODIMENTS
[0050] The following specifically describes the present application in combination with specific embodiments. The following embodiments will help those skilled in the art to further understand the present application, but do not limit the present application in any form. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made. These all belong to the protection scope of the present application.
[0051] In order to make the purpose, technical solutions, and advantages of the present application clearer, the present application will be further described in detail below in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0052] It should be noted that if there is no conflict, the various features in the embodiments of the present application can be combined with each other, and all are within the protection scope of the present application. In addition, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order from the module division in the device or the flowchart. In addition, the terms "first", "second", "third", etc. used herein do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.
[0053] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs. The terms used in this specification in the description of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used in this specification includes any and all combinations of one or more of the related listed items.
[0054] In addition, the technical features involved in the various embodiments of this application described below can be combined with each other as long as they do not conflict with each other.
[0055] The embodiments of this disclosure aim to solve the problems of the lack of multi-viewpoint recording and diversity in the development tools of mini-program game engines in the prior art. In view of this, the embodiments of this disclosure propose a mini-program game 3D engine development tool system.
[0056] Please refer to Figure 1 , Figure 1 which shows the framework diagram of a mini-program game 3D engine development tool system described in the embodiments of this disclosure. The overall system mainly includes the following six modules:
[0057] Scene editing module, which is used to create and edit game scenes; users can add, delete, and modify various game objects in the scene editing module.
[0058] Character editing module, which is used to create and edit game characters; users can adjust the model, texture, animation, and physical properties of the characters in the character editing module.
[0059] Particle editing module, which is used to create and edit game particle effects. Users can adjust the properties such as the shape, size, color, speed, and transparency of the particles in the particle editing module.
[0060] Script editing module, which is used to write scripts for the game. Users can use various scripting languages in the script editing module to control the characters, props, and scenes in the game.
[0061] Debugging module, which is used to debug the game. Users can view various information during the game runtime in the debugging module.
[0062] Packaging tool, which is used to package the game into the mini-program format. Users can select the resolution, frame rate, and compression level of the game in the packaging tool.
[0063] S1. Write a random camera movement algorithm in the scene editing module so that the camera captures specific action animations from different viewpoints. As Figure 2As shown, where the purple line is the movement of the camera between adjacent positions; o is the initial point of the camera and also the position of the character; Δmagnitude xy and Δθ represent the random distance and angular change in the horizontal plane xO y ; Δz represents the random height change on the vertical z - axis.
[0064] According to the RCM algorithm (Random Camera Movement algorithm), the camera starts from the position of the character, i.e., the origin (point o). For each movement, the camera traverses a random horizontal distance at a random angle in the horizontal plane and additionally moves a random vertical distance. Thus, the transition between two consecutive points Pos i and Pos i+1 can be expressed as follows:
[0065]
[0066] where represents the change in the position vector and can be expressed as:
[0067]
[0068] where, represents the projection on the xOy plane; z and x are the unit vectors along the z - axis and x - axis; the horizontal movement on the xOy plane is quantified by Δmagnitude xy whose magnitude is the angular deviation of the camera on the plane is described by the angle Δθ, which is and the angle between; Δz represents the vertical change in the z - axis direction, i.e., the magnitude of the projection on this axis .
[0069] In the RCM algorithm, Δmagnitude xy , Δθ and Δz are used to control the movement of the camera between two adjacent positions; the parameters Δmagnitude xy , Δθ, Δz are used to specify the movement of the camera from one point to the next:
[0070] Δmagnitude xy = U(a m , b m )
[0071] Δθ = U(a θ , b θ )
[0072] Δz = U(a z , b z )
[0073] Among them, U (a m , b m ) represents a uniform distribution for generating random values of camera motion parameters; the variable a m and b m represent the minimum and maximum limits Δmagnitude of the horizontal movement distance on the xOy plane xy ; a θ and b θ set the limit Δθ of the angle change; a z and b z are the limits of the vertical movement distance along the z-axis (Δz).
[0074] With each movement of the camera position in the same animation scene, the parameters Δmagnitude xy , Δθ and Δz are all random. When the scene changes, the initial position of the camera is reset to align with the new position of the character.
[0075] S2. Calculate each point from the starting point to the ending point through exploratory search.
[0076] Write the points around the starting point on the open list points, calculate h(n) and g(n) for each point to obtain the evaluation value f(n); then write the small points on the open list points, add the surrounding points to the open list points, and sort them without any obstacles. Pass through the anchor points one by one until finally selected. The reference value is represented by the scoring function:
[0077] f(n) = g(n) + h(n)
[0078] Among them, f(n) is the estimation function of node n; g(n) is the actual cost from the initial position point to the n positions in the state space; h(n) is the estimated cost of the best path from n to the target node, and h(n) is the absolute value of the column difference from the start to the end and then from the start to the end.
[0079] By calculating the function f*(n), the state from the start to the end of the adjacent points in the table can be obtained. If the predicted new value is less than the previous iteration value, this is the new iteration point before the end of the iteration. The calculation formula of the f*(n) function is:
[0080]
[0081] Among them, g*(n) represents the movement consumption on the path from the starting point to the current point; h*(n) represents the estimated cost from the nth point to the target point; f*(n) represents the estimated cost from the nth point to the target point. Compare this value with the value of the previous iteration. If it is less than the iteration value, add this point to the best path. After the iteration reaches the target point, the iteration ends, and the obtained path is the "best path".
[0082] Calculate the f*(n) value of the current point and the f*n values of the surrounding points, and add the minimum retained value of the f*(n=) value and the f*(n / ) value to the optimal path table; continue the iteration until the iteration ends. Through a continuous search process, end with the best path and construct a homogeneous transformation matrix:
[0083]
[0084] S3. The character editing module uses 3D virtual reality technology to record parts of the game character, uses virtual reality technology to ensure the quality of the system interface, and ensures the standard actions of the character during movement through image simulation analysis.
[0085] Character design uses virtual reality technology, which can reflect the actual situation of the game in real time. In 3D object detection, the OBB bounding box collision detection algorithm is more complex than 2D object detection. It is used to decompose the surface convexity of the scene, organize the binary tree hierarchical concavity and convexity, construct the OBB bounding box, construct the concave and convex body, and perform triangular strip compression coding on the concave and convex body to complete the three-dimensional sense:
[0086]
[0087] Among them, q and r are the three-dimensional coordinate systems of the convex block vertices; μ is the mean vector; c is the covariance matrix.
[0088] In collision detection, traverse the hierarchical concavity and convexity of the object. Existing virtual reality technologies have gyro sensors and three-axis magnetic sensors that use the geomagnetic field as a coordinate. When the direction of the control device changes, the following can be obtained:
[0089]
[0090] Among them, axis Z is the geomagnetic field vector component on the sensor x-axis, axis Y is the geoelectric field vector component on the sensor axis Z, and Cgnd is the magnetic field strength of the active control current.
[0091] Currently, the geomagnetic vector plays a role in controlling the magnetic field strength in the motion control device. Among them, the X-axis, Y-axis, and Z-axis are the magnetic field strength values collected by the current three-axis geomagnetic sensor and can only be used after data processing. The calculation formula for data processing is:
[0092]
[0093] Use the gravity acceleration component of the multi-axis acceleration sensor to calculate the pitch angle of the device at this time. Use the information of the pitch angle, acceleration, and gravity induction to real-time locate the movement of the character. Control the position of the 3D device in the game engine and make the 3D device move completely according to the changes of the character's head and perspective.
[0094] The above are only the preferred embodiments of the present invention. The protection scope of the present invention is not limited to the above embodiments. Any technical solutions falling within the concept of the present invention belong to the protection scope of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements should also be regarded as within the protection scope of the present invention.
Claims
1. A small program game 3D engine development tool system, characterized in that: include: A scene editing module, wherein the scene editing module is used to create and edit game scenes; A character editing module, wherein the character editing module is used to create and edit game characters; A particle editing module, which is used to create and edit game particle effects; A script editing module, wherein the script editing module is used to write scripts for the game; A debugging module, wherein the debugging module is used to debug the game; A packaging tool, wherein the packaging tool is used to package the game into a mini-program format.
2. A mini-program game 3D engine development tool system according to claim 1, characterized in that: The RCM algorithm is embedded in the scene editing module, so that the camera can capture specific action animations from different viewpoints; According to the RCM algorithm, the camera starts at the character's position; for each movement, the camera traverses a random horizontal distance at a random angle in the horizontal plane and additionally moves a random vertical distance; Two consecutive points Pos i and Pos i+1 The transition between can be expressed as follows: in Represents the change of the position vector, which can be expressed as: in, express Projection on the xOy plane; z and x are unit vectors along the z-axis and x-axis; horizontal motion on the xOy plane is given by Δmagnitude xy Quantized, its size is The angular deviation of the camera on the plane is described by the angle △θ, which is and ; Δz represents the vertical change in the z-axis direction.
3. A mini-program game 3D engine development tool system according to claim 2, characterized in that: In the algorithm, Δmagnitude is used ry , Δθ and Δz to control the movement of the camera between two adjacent positions; the parameter Δmagnitude xy , Δθ, Δz are used to specify the movement of the camera from one point to the next: Δmagnitude xy =U(a m ,b m ) △θ=U(a θ ,b θ ) △z=U(a z ,b z ) Among them, U(a m , b m ) represents the uniform distribution used to generate random values of camera motion parameters; variable a m and b m Indicates the minimum and maximum limits of horizontal movement distance on the xOy plane Δmagnitude xy ; a θ and b θ Set the limit of angle change Δθ; a z and b z is the limit of vertical movement distance along the z-axis, Δz; With each movement of the camera position in the same animation scene, the parameter Δmagnitude xy , Δθ, and Δz are all random; when the scene changes, the camera's initial position is reset to align with the character's new position.
4. A mini-program game 3D engine development tool system according to claim 1, characterized in that: The scene editing module calculates each point from the starting point to the end point through exploratory search; Write the points around the starting point on the open table point, calculate h(n) and g(n) for each point to obtain the evaluation value f(n); then write the small point on the open table point, add the surrounding points to the open table point, and sort them without any obstacles; go through the anchor points one by one until the final one is selected; The reference value is represented by the scoring function: f(n)=g(n)+h(n) Among them, f(n) is the estimated function of node n; g(n) is the actual cost from the initial position point to the n positions in the state space; h(n) is the estimated cost of the best path from n to the target node.
5. A mini-program game 3D engine development tool system according to claim 4, characterized in that: By calculating the function f * (n), the state of the adjacent points in the table from the beginning to the end can be obtained; if the predicted new value is less than the previous iteration value, then this is the new iteration point before the end of the iteration; f * The calculation formula of (n) function is: Among them, g*(n) represents the movement cost on the path from the starting point to the current point; h*(n) represents the estimated cost from the nth point to the target point; f*(n) represents the estimated cost from the nth point to the target point. This value is compared with the value of the previous iteration. If it is less than the iteration value, this point is added to the optimal path. After the iteration reaches the target point, the iteration ends.
6. A mini-program game 3D engine development tool system according to claim 5, characterized in that: Calculate the f*(n) value of the current point and the f*n values of the surrounding points, and add the minimum retained value of the f*(n=) value and the f*(n / ) value to the optimal path table; continue iterating until the iteration ends; Through a continuous search process, ending with the best path, the homogeneous transformation matrix is constructed:
7. A mini-program game 3D engine development tool system according to claim 1, characterized in that: The character editing module uses 3D virtual reality technology to record the game character part, using virtual reality technology to ensure the quality of the system interface, and through image simulation analysis to ensure the standard movements of the character in motion; Construct the OBB bounding box and the concave-convex body, and perform triangle belt compression encoding on the concave-convex body to complete the three-dimensional effect: Among them, q and r are the three-dimensional coordinate systems of the convex vertices; μ is the mean vector; and c is the covariance matrix.
8. A mini-program game 3D engine development tool system according to claim 7, characterized in that: In collision detection, the object's hierarchical bumps are traversed. Through the gyroscope sensor and the three-axis magnetic sensor, the reference geomagnetic field is used as the coordinate. When the direction of the control device changes, the following can be obtained: Wherein, axis Z is the geomagnetic field vector component on the sensor x-axis, axis Y is the geoelectric field vector component on the sensor axis Z, and Cgnd is the magnetic field intensity of the active control current; Among them, the X-axis, Y-axis and Z-axis are the magnetic field strength values collected by the three-axis geomagnetic sensor. They can only be used after data processing. The calculation formula for data processing is: Utilize the gravity acceleration component of the multi-axis accelerometer to calculate the pitch angle of the device at this moment; use the pitch angle, acceleration and gravity sensing information to locate the character's head movement in real time; control the position of the 3D device in the game engine, and make the 3D device move completely according to the changes in the character's head and perspective.