Method, apparatus, computer device and storage medium for determining post-processing area

By obtaining and applying scaling and rotation parameters in game development, mapping and rotating pixel points positions, and determining the post-processing area, the problem of cumbersome post-processing operations in virtual scenes is solved and efficiency is improved.

CN114972701BActive Publication Date: 2025-08-01NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210389556.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-13
Publication Date
2025-08-01
Estimated Expiration
2042-04-13

AI Technical Summary

Technical Problem

During the game development process, there are many objects and a wide variety of parameters in the virtual scene, which leads to cumbersome and time-consuming post-processing operations, affecting the post-processing efficiency of the game screen.

Method used

By obtaining the scaling parameters, rotation parameters and center point positions of the target virtual scene, mapping and rotating pixel point positions, determining the post-processing area, and applying preset post-processing effects in the material system.

Benefits of technology

It improves the post-processing efficiency of virtual scene pictures, simplifies the operation process, and reduces processing time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114972701B_ABST
    Figure CN114972701B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a method, apparatus, computer device, and computer-readable storage medium for determining a post-processing area. In this solution, a control area box is first defined in a blueprint system, and the attribute parameters of the control area box are obtained. The attribute parameters are passed to a material system through a material parameter set. The material system rotates the pixel points in the world scene according to the attribute parameters to obtain the rotated positions corresponding to the respective pixel points. Then, a position range is determined according to the attribute parameters of the control area box, and it is judged whether the rotated position is within this position range. Based on this, a post-processing area is determined from the world scene to implement custom selection of the post-processing area for post-processing effect rendering, thereby improving the post-processing efficiency of the virtual scene image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, computer device, and computer-readable storage medium for determining a post-processing region. Background Art

[0002] During the game development process, in order to improve the display effect of the game screen, a large number of post-processing effects will be used. Post-processing effects are further processing of the image obtained by the rendering process. For example, post-processing effects include: for stroking, for blurring, for glitch art, etc.

[0003] In related technologies, when performing post-processing, it is necessary to set up a post-processing effect volume in the scene. By applying the post-processing object to the post-processing effect volume frame, and then adjusting the parameters of the object in the post-processing effect volume frame, the post-processing effect of the post-processed object can be achieved. However, due to the large number of objects in the scene and the wide variety of parameters, performing post-processing based on the object parameters is cumbersome and time-consuming, and the processing effect is not improved, thus affecting the post-processing efficiency of the game screen. Summary of the Invention

[0004] The embodiments of the present application provide a method, apparatus, computer device, and computer-readable storage medium for determining a post-processing area, which can improve the post-processing efficiency of a virtual scene image.

[0005] The present application provides a method for determining a post-processing area, including:

[0006] Obtaining a scaling parameter, a rotation parameter, and a center point position of a target control area in a target virtual scene in a world coordinate system, wherein the target control area is adjusted based on the scaling parameter, the rotation parameter, and the center point position;

[0007] Mapping the pixel positions of the target virtual scene in the world coordinate system to the spatial coordinate system corresponding to the target control area to obtain the mapped positions of the pixel points in the spatial coordinate system;

[0008] Rotate the pixel point according to the rotation parameter and the mapped position to obtain the rotated position of the pixel point in the spatial coordinate system;

[0009] Determine the target position of the pixel point in the world coordinate system according to the center point position and the rotated position;

[0010] A post-processing area is determined from the target virtual scene based on the scaling parameter, the rotation parameter, the center point position, and the target position.

[0011] Correspondingly, an embodiment of the present application further provides a device for determining a post - processing area, including:

[0012] A first acquisition unit, configured to acquire a scaling parameter, a rotation parameter corresponding to a target control area in a target virtual scene, and a center point position of the center point in the world coordinate system, where the target control area is adjusted based on the scaling parameter, the rotation parameter, and the center point position;

[0013] A mapping unit, configured to map the pixel point position of the pixel points in the target virtual scene in the world coordinate system to the spatial coordinate system corresponding to the target control area, to obtain the mapped - after position of the pixel points in the spatial coordinate system;

[0014] A processing unit, configured to perform a rotation process on the pixel points according to the rotation parameter and the mapped - after position, to obtain the rotated - after position of the rotated pixel points in the spatial coordinate system;

[0015] A first determination unit, configured to determine the target position of the pixel points in the world coordinate system according to the center point position and the rotated - after position;

[0016] A second determination unit, configured to determine a post - processing area from the target virtual scene based on the scaling parameter, the rotation parameter, the center point position, and the target position.

[0017] In some embodiments, the mapping unit includes:

[0018] A first calculation subunit, configured to calculate the difference between the pixel point position and the center point position, to obtain a vector of the pixel point position relative to the center point position;

[0019] A first determination subunit, configured to determine the mapped - after position based on the vector.

[0020] In some embodiments, the processing unit includes:

[0021] A second determination subunit, configured to determine a rotation transformation matrix according to the rotation parameter;

[0022] A second calculation subunit, configured to calculate the product value of the mapped - after position and the rotation transformation matrix, to obtain the rotated - after position.

[0023] In some embodiments, the second determination subunit is specifically configured to:

[0024] Generate a rotation matrix based on the rotation value in each axis direction in the spatial coordinate system, to obtain a plurality of rotation matrices;

[0025] Multiply the multiple rotation matrices to obtain the rotation transformation matrix.

[0026] In some embodiments, the first determination unit includes:

[0027] A third calculation subunit, configured to calculate the sum value of the rotated position and the center point position to obtain the target position.

[0028] In some embodiments, the second determination unit includes:

[0029] A third determination subunit, configured to determine a target area in the world coordinate system based on the scaling parameter, the rotation parameter, and the center point position;

[0030] A fourth determination subunit, configured to determine a post-processing area from the target virtual scene according to the target area and the target position.

[0031] In some embodiments, the fourth determination subunit is specifically configured to:

[0032] Determine whether the target position is within the target area to obtain a determination result;

[0033] Determine target pixel points from the pixel points of the target virtual scene according to the determination result;

[0034] Construct the post-processing area based on the target pixel points.

[0035] In some embodiments, the fourth determination subunit is specifically configured to:

[0036] Determine whether the target position is within the target area to obtain a determination result;

[0037] If the determination result indicates that the target position is within the target area, obtain the target pixel points according to the pixel points at the target position;

[0038] Construct the post-processing area based on the target pixel points

[0039] In some embodiments, the apparatus further includes:

[0040] A second acquisition unit, configured to acquire a preset post-processing effect;

[0041] An adding unit, configured to add the preset post-processing effect to the pixel points in the post-processing area.

[0042] Correspondingly, an embodiment of the present application further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for determining a post-processing area provided in any embodiment of the present application.

[0043] Correspondingly, an embodiment of the present application further provides a computer-readable storage medium storing multiple instructions adapted to be loaded by a processor to execute the method for determining a post-processing area as described above.

[0044] In an embodiment of the present application, by first defining a control area box in a blueprint system, obtaining attribute parameters of the control area box, passing the attribute parameters to a material system through a material parameter set, rotating pixel points in a world scene by the material system according to the attribute parameters to obtain the rotated positions corresponding to each pixel point, then determining a position range according to the attribute parameters of the control area box, determining whether the rotated position is within the position range, and based on this, determining a post-processing area from the world scene to implement custom selection of a post-processing area for post-processing effect rendering, thereby improving the post-processing efficiency of a virtual scene image. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application, and those skilled in the art can obtain other drawings without creative efforts based on these drawings.

[0046] Figure 1 It is a schematic flowchart of a method for determining a post-processing area provided by an embodiment of the present application.

[0047] Figure 2 It is a schematic flowchart of another method for determining a post-processing area provided by an embodiment of the present application.

[0048] Figure 3 It is a schematic diagram of an application scenario of a method for determining a post-processing area provided by an embodiment of the present application.

[0049] Figure 4 It is a schematic diagram of another application scenario of a method for determining a post-processing area provided by an embodiment of the present application.

[0050] Figure 5 It is a block diagram of the structure of a device for determining a post-processing area provided by an embodiment of the present application.

[0051] Figure 6 It is a schematic diagram of the structure of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0052] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.

[0053] The embodiments of the present application provide a method, apparatus, computer-readable storage medium, and computer device for determining a post-processing area. Specifically, the method for determining the post-processing area in the embodiments of the present application can be executed by a computer device. Among them, the computer device can be a terminal or a server, etc. The terminal can be a smart phone, a tablet computer, a notebook computer, a touch screen, a personal computer (PC), a personal digital assistant (PDA), and other terminal devices. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0054] For example, the computer device can be a terminal. The terminal can obtain the scaling parameter, rotation parameter, and the center point position in the world coordinate system corresponding to the target control area in the target virtual scene. The target control area is adjusted based on the scaling parameter, the rotation parameter, and the center point position; map the pixel point position of the target virtual scene in the world coordinate system to the spatial coordinate system corresponding to the target control area to obtain the mapped position of the pixel point in the spatial coordinate system; perform a rotation process on the pixel point according to the rotation parameter and the mapped position to obtain the rotated position of the rotated pixel point in the spatial coordinate system; determine the target position of the pixel point in the world coordinate system according to the center point position and the rotated position; determine the post-processing area from the target virtual scene based on the scaling parameter, the rotation parameter, the center point position, and the target position.

[0055] Based on the above problems, the embodiments of the present application provide a first method, apparatus, computer device, and computer-readable storage medium for determining a post-processing area, which can improve the post-processing efficiency of the virtual scene screen.

[0056] The following will be described in detail respectively. It should be noted that the description order of the following embodiments does not limit the preferred order of the embodiments.

[0057] An embodiment of the present application provides a method for determining a post - processing area. This method can be executed by a terminal or a server. In this embodiment of the present application, the method for determining the post - processing area is described by taking the case where it is executed by a terminal as an example.

[0058] Please refer to Figure 1 , Figure 1 which is a schematic flow chart of a method for determining a post - processing area provided by an embodiment of the present application. The specific process of this method for determining the post - processing area can be as follows:

[0059] 101. Obtain the scaling parameter, rotation parameter corresponding to the target control area in the target virtual scene, and the center point position of the center point in the world coordinate system.

[0060] In an embodiment of the present application, the target virtual scene refers to a scene that simulates reality and is displayed through a terminal. For example, the target virtual scene can be a game scene. Different display effects of the target virtual scene can be achieved by rendering the target virtual scene.

[0061] Among them, the world coordinate system refers to the coordinate system used to create the target virtual scene. The target virtual scene is composed of multiple pixel points, and each pixel corresponds to a position coordinate in the world coordinate system.

[0062] Among them, the target control area refers to an area in the target virtual scene. The target control area can be set by the user. Specifically, the target control area is adjusted based on the scaling parameter, rotation parameter, and center point position. The scaling parameter can be used to adjust the size of the target control area, and the rotation parameter can be used to rotate the target control area.

[0063] For example, first determine a center point in the world coordinate system. This center point can be any coordinate point in the world coordinate system. Use this center point as the center of the target control area to be set. Then, by setting the scaling parameter and rotation parameter, generate the target control area.

[0064] 102. Map the pixel point positions of the pixel points in the target virtual scene in the world coordinate system to the spatial coordinate system corresponding to the target control area to obtain the mapped position of the pixel point in the spatial coordinate system.

[0065] Among them, the spatial coordinate system corresponding to the target control area refers to the coordinate system constructed based on the target control area, and the spatial coordinate system takes the center point position of the target control area as the coordinate origin.

[0066] In an embodiment of the present application, the world coordinate system and the spatial coordinate system can include multiple coordinate axes. For example, the world coordinate system can include: the X - axis, the Y - axis, and the Z - axis; the spatial coordinate system can include: the X’ - axis, the Y’ - axis, and the Z’ - axis.

[0067] For example, the position of the center point of the target control area in the world coordinate system can be:

[0068] (X1, Y1, Z1), and the position of the center point of the target control area in the spatial coordinate system can be: (X2, Y2, Z2), where (X1, Y1, Z1) and (X2, Y2, Z2) can be the same or different.

[0069] Specifically, mapping the pixel point position of the target virtual scene in the world coordinate system to the spatial coordinate system means obtaining the position of the pixel point in the spatial coordinate system. The position of the pixel point in the spatial coordinate system can be calculated through the position correspondence between the center point of the target control area in the world coordinate system and the spatial coordinate system, so as to obtain the mapped position.

[0070] In some embodiments, to reduce the computational complexity, the axis directions corresponding to the world coordinate system and the spatial coordinate system are parallel to each other, that is, the X-axis is parallel to the X'-axis, the Y-axis is parallel to the Y'-axis, and the Z-axis is parallel to the Z'-axis. Then, the step of "mapping the pixel point position of the target virtual scene in the world coordinate system to the spatial coordinate system corresponding to the target control area to obtain the mapped position of the pixel point in the spatial coordinate system" may include the following operations:

[0071] Calculate the difference between the pixel point position and the center point position to obtain the vector of the pixel point position relative to the center point position;

[0072] Determine the mapped position based on the vector.

[0073] Specifically, calculate the difference between the pixel point position of each pixel point in the world coordinate system and the center point position of the target control area in the world coordinate system to obtain the displacement value of each pixel point position relative to the center point, that is, the vector.

[0074] For example, the target virtual scene includes pixel point A. The pixel point position of this pixel point A in the world coordinate system can be: (aX, aY, aZ), and the center point position of the target control area in the world coordinate system can be: (X1, Y1, Z1). Calculate the difference between the pixel point position and the center point position to obtain the vector: (aX - X1, aY - Y1, aZ - Z1). According to this vector, the position of pixel point A in the spatial coordinate system, that is, the mapped position, is: (aX - X1, aY - Y1, aZ - Z1).

[0075] 103. Rotate the pixel point according to the rotation parameter and the mapped position to obtain the rotated position of the rotated pixel point in the spatial coordinate system.

[0076] Specifically, the mapped position of the pixel points mapped to the spatial coordinate system is rotated according to the rotation parameters of the target control area to obtain the rotated position of the pixel points in the spatial coordinate system.

[0077] In some embodiments, to ensure that the pixel points in the target virtual scene rotate following the target control area, the step "rotating the pixel points according to the rotation parameters and the mapped position to obtain the rotated position of the rotated pixel points in the spatial coordinate system" may include the following operations:

[0078] Determine a rotation transformation matrix according to the rotation parameters;

[0079] Calculate the product of the mapped position and the rotation transformation matrix to obtain the rotated position.

[0080] First, generate a rotation transformation matrix according to the obtained rotation parameters of the target control area, and then calculate the product of the mapped position of each pixel point and the rotation transformation matrix, that is, the rotated position of each pixel point in the spatial coordinate system can be obtained.

[0081] In some embodiments, the step "determining a rotation transformation matrix according to the rotation parameters" may include the following operations:

[0082] Generate a rotation matrix based on the rotation values in each axis direction in the spatial coordinate system to obtain a plurality of rotation matrices;

[0083] Multiply the plurality of rotation matrices to obtain the rotation transformation matrix.

[0084] Among them, the rotation parameters may include the rotation values in each axis direction of the target control area in the spatial coordinate system. For example, the coordinate axes of the spatial coordinate system include: X'-axis, Y'-axis, and Z'-axis, then the rotation parameters include: the rotation value in the X'-axis direction, the rotation value in the Y'-axis direction, and the rotation value in the Z'-axis direction.

[0085] Furthermore, according to each rotation value, generate corresponding rotation matrices respectively to obtain a plurality of rotation matrices, and then multiply the plurality of rotation matrices to obtain the rotation transformation matrix.

[0086] Among them, the rotation matrix is a matrix that changes the direction of a vector but does not change its magnitude when multiplying a vector.

[0087] Specifically, the mapped position refers to the displacement value of the pixel point position of each pixel point relative to the center point, that is, a vector. Calculating the product of the mapped position and the rotation transformation matrix, that is, calculating the product of the vector and the rotation transformation matrix, to obtain the rotated position.

[0088] 104. Determine the target position of the pixel points in the world coordinate system according to the center point position and the rotated position.

[0089] Specifically, the rotated position of each pixel point after rotation according to the rotation parameters in the spatial coordinate system is mapped to the world coordinate system to obtain the position of the rotated pixel point in the world coordinate system, that is, the target position.

[0090] In some embodiments, the step of "determining the target position of the pixel point in the world coordinate system according to the center point position and the rotated position" may include the following operations:

[0091] Calculate the sum value of the rotated position and the center point position to obtain the target position.

[0092] Specifically, add the rotated position obtained after rotating each pixel point in the spatial coordinate system to the center point position, and based on this, map the position of the rotated pixel point to the world coordinate system to obtain the target position of each pixel point after rotation in the world coordinate system.

[0093] 105. Determine the post-processing area from the target virtual scene based on the scaling parameter, rotation parameter, center point position, and target position.

[0094] Among them, the post-processing area refers to the area where post-processing is performed. Post-Process Effect is a technology for reprocessing the rendered image. For each scene image, before being drawn to the user window, the entire image is processed twice, and then the decorated image is presented to the user.

[0095] In the embodiments of the present application, when performing post-processing on the target virtual scene, in order to facilitate the user to select the post-processing area by themselves, the post-processing area can be selected from the target virtual scene according to the scaling parameter, rotation parameter, and center point position of the target control area.

[0096] In some embodiments, in order to accurately select the post-processing area, the step of "determining the post-processing area from the target virtual scene based on the scaling parameter, rotation parameter, center point position, and target position" may include the following operations:

[0097] Determine the target area in the world coordinate system based on the scaling parameter, rotation parameter, and center point position;

[0098] Determine the post-processing area from the target virtual scene according to the target area and the target position.

[0099] Specifically, determine a range of area in the world coordinate system according to the scaling parameter, rotation parameter, and center point position of the target control area, so as to obtain the target area, which can be implemented by BoxMask-3D in the material system. The logical nodes in the material system are used to define a box range according to the input.

[0100] In some embodiments, in order to select the area that needs to be post-processed, the step of "determining the post-processing area from the target virtual scene according to the target area and the target position" may include the following operations:

[0101] Determine whether the target position is within the target area to obtain a judgment result;

[0102] Determine the target pixel points from the pixel points of the target virtual scene according to the judgment result;

[0103] Form the post-processing area based on the target pixel points.

[0104] First, determine a position range according to the target area, and then determine whether the target position of each pixel point is within this position range to obtain a judgment result.

[0105] In some embodiments, the step of "determining the target pixel points from the pixel points of the target virtual scene according to the judgment result" may include the following operations:

[0106] If the judgment result indicates that the target position is within the target area, obtain the target pixel points according to the pixel points at the target position.

[0107] For example, the pixel points may include: the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point, etc. Among them, the first pixel point corresponds to the first target position, the second pixel point corresponds to the second target position, the third pixel point corresponds to the third target position, and the fourth pixel point corresponds to the fourth target position. If the first target position and the second target position are within the target area, the target pixel points can be determined as: the first pixel point and the second pixel point.

[0108] Furthermore, form the post-processing area according to the first pixel point and the second pixel point.

[0109] In some embodiments, after determining the post-processing area, the method may further include the following steps:

[0110] Obtain the preset post-processing effect;

[0111] Add the preset post-processing effect to the pixel points in the post-processing area;

[0112] Wherein, the preset post-processing effect refers to the post-processing effect that is pre-designed and needs to be displayed in the target virtual scene. For example, the post-processing effect may include: image effects such as blur effect, mosaic effect, etc.

[0113] Specifically, a preset post - processing effect is added to the pixel points in the post - processing area of the target virtual scene, and the pixel points outside the post - processing area in the target virtual scene are displayed according to the previous rendering effect. In this way, post - processing of a specified area of the target virtual scene can be achieved, and the display of the post - processing effect in the specified area can be realized.

[0114] The embodiment of the present application discloses a method for determining a post - processing area. The method includes: obtaining a scaling parameter, a rotation parameter, and the center point position of the center point of the target control area in the world coordinate system in the target virtual scene, where the target control area is adjusted based on the scaling parameter, the rotation parameter, and the center point position; mapping the pixel point position of the pixel points in the target virtual scene in the world coordinate system to the spatial coordinate system corresponding to the target control area to obtain the mapped position of the pixel points in the spatial coordinate system; performing a rotation process on the pixel points according to the rotation parameter and the mapped position to obtain the rotated position of the rotated pixel points in the spatial coordinate system; determining the target position of the pixel points in the world coordinate system according to the center point position and the rotated position; determining the post - processing area from the target virtual scene based on the scaling parameter, the rotation parameter, the center point position, and the target position. In this way, the post - processing efficiency of the virtual scene picture can be improved.

[0115] According to the content introduced above, the following will give examples to further illustrate the method for determining the post - processing area of the present application. Please refer to Figure 2 , Figure 2 which is a schematic flowchart of another method for determining the post - processing area provided by the embodiment of the present application. Taking the application of this method for determining the post - processing area to a terminal as an example, the specific process can be as follows:

[0116] 201. Obtain the center point position, rotation parameter, and scaling parameter of the area culling control box created through the blueprint system.

[0117] The content of the embodiment of the present application can be implemented based on the Unreal Engine. The Unreal Engine is a complete game development platform that provides a large number of core technologies, data generation tools, and basic support required by game developers. The Unreal Engine includes a blueprint system and a material system, which are two programmable systems of the Unreal Engine. The blueprint is mainly responsible for writing and processing game business logic, and the material system is mainly responsible for shader writing and rendering processing.

[0118] Specifically, when creating an area culling control box through the blueprint system, an Actor, that is, a blueprint system Blueprint object, can be created through the blueprint system, a box is added, and a Translucent (semi - transparent) material (the transparency can be set to 0) is assigned to the box to obtain a transparent box as the area culling control box.

[0119] In the embodiments of the present application, in order to ensure that the logic for obtaining the attribute parameters of the area culling control box can be responded to both in the editor state and the running state, the logic for obtaining the attribute parameters of the area culling control box can be added after the Construction Script (blueprint constructor, which can respond to the logic in the editor state) and Tick (blueprint frame function, which can respond to the logic in the game running state) functions.

[0120] Specifically, the rotation parameter can be obtained through the Get Actor Rotation function in the blueprint system, the center point position can be obtained through GetActor Lotation, and the scaling parameter can be obtained through the Get Actor Scale function.

[0121] Among them, the rotation parameter obtained through Get Actor Rotation is represented in radians, and the D2R (DegreeToRadius, which converts the value from degrees to radians) node is required to convert the radians to degrees.

[0122] 202. Pass the center point position, rotation parameter, and scaling parameter to the material system through the material parameter set.

[0123] Among them, the material parameter set is used to transfer parameters from the blueprint to the material system.

[0124] Among them, the rotation parameter includes the rotation values in the directions of each coordinate axis in the world coordinate system. For example, the coordinate axes can include: the X-axis, the Y-axis, and the Z-axis, then the rotation parameter can include: the rotation value Roll around the X-axis direction, the rotation value Pitch around the Y-axis direction, and the rotation value Yaw around the Z-axis direction.

[0125] Specifically, through the Set Scalar Parameter Value function in the Unreal Engine, the rotation values in the directions of each axis can be passed to the MPC (Material Parameter Collection, material parameter set) respectively, and then the relative position of the blueprint Actor in the world coordinate system, that is, the center point position, can be passed to the MPC through the SetVector Parameter Value function; through the Set Scalar Parameter Value, the scaling values of the three axes of the blueprint Actor, that is, the scaling parameter, can be passed to the MPC respectively. In order to realize the real-time transfer of the position, rotation, and scaling attribute values of the area culling control box represented by the blueprint Actor into the MPC.

[0126] In terms of the MPC material parameter set, you can create six floating-point value Scalar Parameters, which are defined as the scaling values in the three coordinate axis directions and the rotation values in the three coordinate axis directions passed by the Blueprint Actor (excluding the control area box), and create a vector defined as the relative position in the world coordinate system passed by the Blueprint Actor.

[0127] 203. Rotate the pixels in the virtual scene according to the center point position and the rotation parameters through the material system to obtain the rotated position corresponding to each pixel.

[0128] First, change the material domain to PostProcess, representing a post-processing material. Then connect the main logic. The main logic is the logic of the material system shader, which controls the rendering effect. This logic is the Actor object properties passed by the Blueprint system (excluding the properties of the control area box).

[0129] Specifically, the pixel points in the virtual scene are rotated according to the center point position and the rotation parameters, that is, the pixel points in the target virtual scene are rotated and translated, thereby obtaining the rotated positions of the pixel points after rotation and translation.

[0130] In the rotation part, a Custom node (a node in the material system that can customize the shader) can be defined. Its internal logic is as follows:

[0131] According to the Roll, Pitch, and Yaw angle values passed from the MPC material parameter set, create a 3x3 rotation matrix corresponding to each angle value, and obtain three 3x3 rotation matrices;

[0132] Multiply these three rotation matrices to get the final rotation transformation matrix;

[0133] The absolute world position of the pixel in the virtual scene in the world coordinate system is subtracted from the center point position of the culling control area box passed from the MPC material parameter set to obtain the vector of the pixel's absolute world position relative to the center point position;

[0134] Multiply the vector by the rotation transformation matrix to get the pixel's absolute world position relative to the center of the culling control region.

[0135] In the translation part, its internal logic is as follows:

[0136] The relative position obtained by the above rotation is added to the absolute world position of the center point of the culling control area frame in the world coordinate system to obtain the absolute world position of each pixel point in the virtual scene after rotation and translation, that is, the rotated position corresponding to each pixel point.

[0137] 204. Determine the position range in the world coordinate system according to the center point position, rotation parameters, and scaling parameters.

[0138] Specifically, determine the boxed range, that is, the position range, according to the scaling parameters. The size of this Bounds can be defined by the scaling values in the three coordinate axes passed in by the MPC. The size values are input through this three-dimensional vector Bounds to define the boxed range and obtain the position range.

[0139] 205. Determine the target culling area from the virtual scene based on the rotated position and the position range, and superimpose the post-processing effect on the area outside the target culling area in the virtual scene.

[0140] In the embodiments of the present application, the node that defines the post-processing color output node Emissive Color is the Lerp node. The Lerp node can select the corresponding input A or B as the final output according to whether the Alpha value is 0 or 1.

[0141] For example, when the Alpha value is 0, the output content A is the post-processing stroke effect applied to the picture; when the Alpha value is 1, the output content B is the color information of the original picture.

[0142] Among them, the value of Alpha is determined by whether the rotated position is within the position range. For example, when the rotated position is within the position range, the Alpha value can be 1; when the rotated position is not within the position range, the Alpha value can be 0.

[0143] Specifically, according to the Alpha value, determine the target pixel points where the rotated position is not within the position range from the pixel points of the virtual scene. Obtain the target culling area according to the positions of the target pixel points, determine that the target culling area is the area where the post-processing effect does not need to be added, and then superimpose the post-processing effect on the area outside the target culling area in the virtual scene.

[0144] In some embodiments, a new culling control area box can also be added, and only relevant content needs to be added correspondingly in the blueprint system, MPC, and material system. The details are as follows:

[0145] Regarding the MPC material parameter set: Add 6 floating-point values and 1 vector value, including the scaling size values of the XYZ three axes of the control area, the Roll, Pitch, and Yaw angle values of the rotation, and the center point position value of the control area. Regarding the control area blueprint: Duplicate one more control area blueprint Actor. The basic logic does not need to be changed, and the transparent material does not need to be changed either. Only the name of the value passed to the MPC in the logic (the 7 values added above) needs to be changed.

[0146] In terms of post - processing materials: Copy the same logic, change the names of the values received from the MPC (the 7 values added above), multiply the result by the result of the previous operation to obtain a new value for controlling Alpha. By simply copying and changing the parameter names, a new control area can be added, and the expansion effect is good.

[0147] In some embodiments, please refer to Figure 3 , Figure 3 which is a schematic diagram of an application scenario of a method for determining a post - processing area provided by an embodiment of the present application. Figure 3 The shown user operation interface allows the user to set the culling area. Among them, the user operation interface includes a partial virtual scene and area adjustment controls. The user can set the culling area through the area adjustment controls. The area adjustment controls can be located at any coordinate point in the coordinate space of the virtual scene. Specifically, the user can adjust the size of the culling area in each axis by operating the indication icons of each axis of the area adjustment controls. For example, in Figure 3 , the user obtains a target culling area (i.e., Figure 3 the white dashed - line area) through the operation of the area adjustment controls. The target culling area is the area in the virtual scene that does not need to be post - processed.

[0148] Furthermore, please refer to Figure 4 , Figure 4 which is a schematic diagram of another application scenario of a method for determining a post - processing area provided by an embodiment of the present application. After determining the target culling area, when rendering the post - processing effect for the virtual scene, no post - processing operation is required for the objects in the target culling area. That is, in Figure 4 , post - processing operations are performed on the areas outside the target culling area in the virtual scene, and according to user requirements, post - processing operations are customized for some objects in the virtual scene.

[0149] An embodiment of the present application discloses a method for determining a post - processing area, which includes: obtaining the center point position, rotation parameters, and scaling parameters of the area culling control box created through the blueprint system, transmitting the center point position, rotation parameters, and scaling parameters to the material system through the material parameter set, rotating the pixel points in the virtual scene by the material system according to the center point position and rotation parameters to obtain the rotated positions corresponding to each pixel point, determining the position range in the world coordinate system according to the center point position, rotation parameters, and scaling parameters, determining the target culling area from the virtual scene based on the rotated positions and the position range, and superimposing the post - processing effect on the areas outside the target culling area in the virtual scene. In this way, the post - processing efficiency of the virtual scene image can be improved.

[0150] To facilitate better implementation of the method for determining a post - processing area provided in the embodiments of the present application, the embodiments of the present application further provide a device for determining a post - processing area based on the method for determining a post - processing area. The meanings of the nouns are the same as those in the method for determining a post - processing area described above, and the specific implementation details can be referred to the descriptions in the method embodiments.

[0151] Please refer to Figure 5 , Figure 5 which is a structural block diagram of a device for determining a post - processing area provided in the embodiments of the present application. The device includes:

[0152] A first acquisition unit 301, configured to acquire a scaling parameter, a rotation parameter corresponding to a target control area in a target virtual scene, and a center point position of the center point in the world coordinate system, where the target control area is adjusted based on the scaling parameter, the rotation parameter, and the center point position;

[0153] A mapping unit 302, configured to map the pixel point position of the pixel points in the target virtual scene in the world coordinate system to the spatial coordinate system corresponding to the target control area, to obtain the mapped - after position of the pixel points in the spatial coordinate system;

[0154] A processing unit 303, configured to perform a rotation process on the pixel points according to the rotation parameter and the mapped - after position, to obtain the rotated - after position of the rotated pixel points in the spatial coordinate system;

[0155] A first determination unit 304, configured to determine the target position of the pixel points in the world coordinate system according to the center point position and the rotated - after position;

[0156] A second determination unit 305, configured to determine a post - processing area from the target virtual scene based on the scaling parameter, the rotation parameter, the center point position, and the target position.

[0157] In some embodiments, the mapping unit 302 may include:

[0158] A first calculation sub - unit, configured to calculate the difference between the pixel point position and the center point position, to obtain a vector of the pixel point position relative to the center point position;

[0159] A first determination sub - unit, configured to determine the mapped - after position based on the vector.

[0160] In some embodiments, the processing unit 303 may include:

[0161] A second determination sub - unit, configured to determine a rotation transformation matrix according to the rotation parameter;

[0162] A second calculation subunit, configured to calculate a multiplication value of the mapped position and the rotation transformation matrix to obtain the rotated position.

[0163] In some embodiments, the second determination subunit may specifically be configured to:

[0164] Generate a rotation matrix based on the rotation value of each axis direction in the spatial coordinate system to obtain a plurality of rotation matrices;

[0165] Multiply the plurality of rotation matrices to obtain the rotation transformation matrix.

[0166] In some embodiments, the first determination unit 304 may include:

[0167] A third calculation subunit, configured to calculate a sum value of the rotated position and the center point position to obtain the target position.

[0168] In some embodiments, the second determination unit 305 may include:

[0169] A third determination subunit, configured to determine a target area in the world coordinate system based on the scaling parameter, the rotation parameter, and the center point position;

[0170] A fourth determination subunit, configured to determine a post-processing area from the target virtual scene according to the target area and the target position.

[0171] In some embodiments, the fourth determination subunit may specifically be configured to:

[0172] Determine whether the target position is within the target area to obtain a determination result;

[0173] Determine target pixel points from the pixel points of the target virtual scene according to the determination result;

[0174] Construct the post-processing area based on the target pixel points.

[0175] In some embodiments, the fourth determination subunit may specifically be configured to:

[0176] Determine whether the target position is within the target area to obtain a determination result;

[0177] If the determination result indicates that the target position is within the target area, obtain the target pixel points according to the pixel points at the target position;

[0178] Construct the post-processing area based on the target pixel points.

[0179] In some embodiments, the apparatus may further include:

[0180] A second acquisition unit, configured to acquire a preset post - processing effect;

[0181] An addition unit, configured to add the preset post - processing effect to pixel points in the post - processing area.

[0182] An embodiment of the present application discloses a device for determining a post - processing area. The first acquisition unit 301 acquires a scaling parameter, a rotation parameter, and the position of a center point in a world coordinate system corresponding to a target control area in a target virtual scene. The target control area is adjusted based on the scaling parameter, the rotation parameter, and the center point position. The mapping unit 302 maps the pixel point position of the pixel points in the target virtual scene in the world coordinate system to the spatial coordinate system corresponding to the target control area, obtaining the mapped - after position of the pixel points in the spatial coordinate system. The processing unit 303 performs a rotation process on the pixel points according to the rotation parameter and the mapped - after position, obtaining the rotated - after position of the rotated pixel points in the spatial coordinate system. The first determination unit 304 determines the target position of the pixel points in the world coordinate system according to the center point position and the rotated - after position. The second determination unit 305 determines the post - processing area from the target virtual scene based on the scaling parameter, the rotation parameter, the center point position, and the target position. In this way, the efficiency of determining the post - processing area can be improved.

[0183] Correspondingly, an embodiment of the present application further provides a computer device, which can be a terminal. As Figure 6 shown, Figure 6 is a schematic structural diagram of the computer device provided by the embodiment of the present application. The computer device 500 includes a processor 501 with one or more processing cores, a memory 502 with one or more computer - readable storage media, and a computer program stored on the memory 502 and executable on the processor. Among them, the processor 501 is electrically connected to the memory 502. Those skilled in the art can understand that the structural diagram of the computer device shown in the figure does not constitute a limitation on the computer device, and it may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0184] The processor 501 is the control center of the computer device 500, connecting various parts of the entire computer device 500 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 502, and by calling data stored in the memory 502, the processor 501 executes various functions of the computer device 500 and processes data, thereby monitoring the computer device 500 as a whole.

[0185] In an embodiment of the present application, the processor 501 in the computer device 500 will load the instructions corresponding to the processes of one or more application programs into the memory 502 according to the following steps, and the processor 501 will run the application programs stored in the memory 502 to implement various functions:

[0186] Obtain the scaling parameter, rotation parameter corresponding to the target control area in the target virtual scene, and the center point position of the center point in the world coordinate system. The target control area is adjusted based on the scaling parameter, rotation parameter, and center point position; map the pixel point position of the pixel points in the target virtual scene in the world coordinate system to the spatial coordinate system corresponding to the target control area to obtain the mapped position of the pixel points in the spatial coordinate system; perform a rotation process on the pixel points according to the rotation parameter and the mapped position to obtain the rotated position of the rotated pixel points in the spatial coordinate system; determine the target position of the pixel points in the world coordinate system according to the center point position and the rotated position; determine the post-processing area from the target virtual scene based on the scaling parameter, rotation parameter, center point position, and target position.

[0187] In some embodiments, the axis directions corresponding to the world coordinate system and the spatial coordinate system are parallel to each other; the mapping of the pixel point position of the pixel points in the target virtual scene in the world coordinate system to the spatial coordinate system corresponding to the target control area to obtain the mapped position of the pixel points in the spatial coordinate system includes:

[0188] Calculate the difference between the pixel point position and the center point position to obtain the vector of the pixel point position relative to the center point position;

[0189] Determine the mapped position based on the vector.

[0190] In some embodiments, the rotation process of the pixel points according to the rotation parameter and the mapped position to obtain the rotated position of the rotated pixel points in the spatial coordinate system includes:

[0191] Determine a rotation transformation matrix according to the rotation parameter;

[0192] Calculate the multiplication value of the mapped position and the rotation transformation matrix to obtain the rotated position.

[0193] In some embodiments, the rotation parameter includes the rotation value in each axis direction in the spatial coordinate system;

[0194] The determination of the rotation transformation matrix according to the rotation parameter includes:

[0195] Generate a rotation matrix based on the rotation value in each axis direction in the spatial coordinate system to obtain a plurality of rotation matrices;

[0196] Multiply the multiple rotation matrices to obtain the rotation transformation matrix.

[0197] In some embodiments, the determining the target position of the pixel point in the world coordinate system according to the center point position and the rotated position includes:

[0198] Calculate the sum of the rotated position and the center point position to obtain the target position.

[0199] In some embodiments, the determining the post-processing area from the target virtual scene based on the scaling parameter, the rotation parameter, the center point position, and the target position includes:

[0200] Determine a target area in the world coordinate system based on the scaling parameter, the rotation parameter, and the center point position;

[0201] Determine the post-processing area from the target virtual scene according to the target area and the target position.

[0202] In some embodiments, the determining the post-processing area from the target virtual scene according to the target area and the target position includes:

[0203] Judge whether the target position is within the target area to obtain a judgment result;

[0204] Determine target pixel points from the pixel points of the target virtual scene according to the judgment result;

[0205] Construct the post-processing area based on the target pixel points.

[0206] In some embodiments, the determining the target pixel points from the pixel points of the target virtual scene according to the judgment result includes:

[0207] If the judgment result indicates that the target position is within the target area, obtain the target pixel points according to the pixel points at the target position.

[0208] In some embodiments, it further includes:

[0209] Obtain a preset post-processing effect;

[0210] Add the preset post-processing effect to the pixel points in the post-processing area.

[0211] In this solution, a control area box is first defined in the blueprint system, and the attribute parameters of the control area box are obtained. The attribute parameters are passed to the material system through the material parameter set. The material system rotates the pixel points in the world scene according to the attribute parameters to obtain the rotated positions corresponding to each pixel point. Then, the position range is determined according to the attribute parameters of the control area box, and it is judged whether the rotated position is within this position range. Based on this, the post-processing area is determined from the world scene to achieve custom selection of the post-processing area for post-processing effect rendering, thereby improving the post-processing efficiency of the virtual scene screen.

[0212] For the specific implementation of each of the above operations, reference can be made to the previous embodiments and will not be elaborated here.

[0213] Optionally, as Figure 6 shown, the computer device 500 further includes: a touch display screen 503, a radio frequency circuit 504, an audio circuit 505, an input unit 506, and a power supply 507. Among them, the processor 501 is electrically connected to the touch display screen 503, the radio frequency circuit 504, the audio circuit 505, the input unit 506, and the power supply 507 respectively. Those skilled in the art can understand that Figure 6 the computer device structure shown in

[0214] The touch display screen 503 can be used to display a graphical user interface and receive operation instructions generated by a user's interaction with the graphical user interface. The touch display screen 503 may include a display panel and a touch panel. Among them, the display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the computer device. These graphical user interfaces can be composed of graphics, guiding information, icons, videos, and any combination thereof. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. The touch panel can be used to collect touch operations of the user on or near it (such as operations of the user using a finger, a stylus, or any suitable object or accessory on or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute the corresponding program. Optionally, the touch panel can include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch position of the user and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 501, and can also receive and execute commands sent by the processor 501. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 501 to determine the type of touch event. Subsequently, the processor 501 provides a corresponding visual output on the display panel according to the type of touch event. In the embodiments of the present application, the touch panel and the display panel can be integrated into the touch display screen 503 to achieve input and output functions. However, in some embodiments, the touch panel and the touch panel can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 503 can also be used as a part of the input unit 506 to achieve the input function.

[0215] The radio frequency circuit 504 can be used to transmit and receive radio frequency signals to establish wireless communication with a network device or other computer devices through wireless communication, and transmit and receive signals with the network device or other computer devices.

[0216] The audio circuit 505 can be used to provide an audio interface between the user and the computer device through a speaker and a microphone. The audio circuit 505 can transmit the electrical signal converted from the received audio data to the speaker, and the speaker converts it into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 505 and then converted into audio data. After the audio data is output to the processor 501 for processing, it is sent through the radio frequency circuit 504 to, for example, another computer device, or the audio data is output to the memory 502 for further processing. The audio circuit 505 may also include an earphone jack to provide communication between a peripheral earphone and the computer device.

[0217] The input unit 506 can be used to receive input digital, character information or user characteristic information (such as fingerprint, iris, face information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.

[0218] The power supply 507 is used to supply power to each component of the computer device 500. Optionally, the power supply 507 can be logically connected to the processor 501 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 507 can also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.

[0219] Although Figure 6 not shown in the figure, the computer device 500 may also include a camera, a sensor, a Wi-Fi module, a Bluetooth module, etc., which will not be elaborated here.

[0220] In the above embodiments, the descriptions of each embodiment have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0221] As can be seen from the above, the computer device provided in this embodiment obtains the scaling parameter, rotation parameter corresponding to the target control area in the target virtual scene, and the center point position of the center point in the world coordinate system. The target control area is adjusted based on the scaling parameter, rotation parameter, and center point position; maps the pixel point position of the pixel points in the target virtual scene in the world coordinate system to the spatial coordinate system corresponding to the target control area to obtain the mapped position of the pixel points in the spatial coordinate system; rotates the pixel points according to the rotation parameter and the mapped position to obtain the rotated position of the rotated pixel points in the spatial coordinate system; determines the target position of the pixel points in the world coordinate system according to the center point position and the rotated position; determines the post-processing area from the target virtual scene based on the scaling parameter, rotation parameter, center point position, and target position.

[0222] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling relevant hardware through instructions. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0223] For this reason, the embodiments of the present application provide a computer-readable storage medium, in which multiple computer programs are stored. The computer programs can be loaded by a processor to execute the steps in any method for determining a post-processing area provided by the embodiments of the present application. For example, the computer program can execute the following steps:

[0224] Obtain the scaling parameter, rotation parameter corresponding to the target control area in the target virtual scene, and the center point position of the center point in the world coordinate system. The target control area is adjusted based on the scaling parameter, rotation parameter, and center point position;

[0225] Map the pixel point position of the pixel points in the target virtual scene in the world coordinate system to the spatial coordinate system corresponding to the target control area to obtain the mapped position of the pixel points in the spatial coordinate system;

[0226] Perform a rotation process on the pixel points according to the rotation parameter and the mapped position to obtain the rotated position of the rotated pixel points in the spatial coordinate system;

[0227] Determine the target position of the pixel points in the world coordinate system according to the center point position and the rotated position;

[0228] Determine the post-processing area from the target virtual scene based on the scaling parameter, rotation parameter, center point position, and target position.

[0229] In some embodiments, the axis directions corresponding to the world coordinate system and the spatial coordinate system are parallel to each other; the mapping of the pixel point position of the pixel points in the target virtual scene in the world coordinate system to the spatial coordinate system corresponding to the target control area to obtain the mapped position of the pixel points in the spatial coordinate system includes:

[0230] Calculate the difference between the pixel point position and the center point position to obtain the vector of the pixel point position relative to the center point position;

[0231] Determine the mapped position based on the vector.

[0232] In some embodiments, the performing a rotation process on the pixel points according to the rotation parameter and the mapped position to obtain the rotated position of the rotated pixel points in the spatial coordinate system includes:

[0233] Determine the rotation transformation matrix according to the rotation parameter;

[0234] Calculate the product value of the mapped position and the rotation transformation matrix to obtain the rotated position.

[0235] In some embodiments, the rotation parameter includes the rotation value in each axis direction in the spatial coordinate system;

[0236] The determining the rotation transformation matrix according to the rotation parameter includes:

[0237] Generate a rotation matrix based on the rotation value in each axis direction in the spatial coordinate system to obtain a plurality of rotation matrices;

[0238] Multiply the multiple rotation matrices to obtain the rotation transformation matrix.

[0239] In some embodiments, the determining the target position of the pixel point in the world coordinate system according to the center point position and the rotated position includes:

[0240] Calculate the sum of the rotated position and the center point position to obtain the target position.

[0241] In some embodiments, the determining the post-processing area from the target virtual scene based on the scaling parameter, the rotation parameter, the center point position, and the target position includes:

[0242] Determine a target area in the world coordinate system based on the scaling parameter, the rotation parameter, and the center point position;

[0243] Determine the post-processing area from the target virtual scene according to the target area and the target position.

[0244] In some embodiments, the determining the post-processing area from the target virtual scene according to the target area and the target position includes:

[0245] Judge whether the target position is within the target area to obtain a judgment result;

[0246] Determine target pixel points from the pixel points of the target virtual scene according to the judgment result;

[0247] Construct the post-processing area based on the target pixel points.

[0248] In some embodiments, the determining the target pixel points from the pixel points of the target virtual scene according to the judgment result includes:

[0249] If the judgment result indicates that the target position is within the target area, obtain the target pixel points according to the pixel points at the target position.

[0250] In some embodiments, it further includes:

[0251] Obtain a preset post-processing effect;

[0252] Add the preset post-processing effect to the pixel points in the post-processing area.

[0253] In this solution, a control area box is first defined in the blueprint system, and the attribute parameters of the control area box are obtained. The attribute parameters are passed to the material system through the material parameter set. The material system rotates the pixel points in the world scene according to the attribute parameters to obtain the rotated positions corresponding to each pixel point. Then, the position range is determined according to the attribute parameters of the control area box, and it is judged whether the rotated position is within this position range. Based on this, the post-processing area is determined from the world scene to achieve custom selection of the post-processing area for post-processing effect rendering, thereby improving the post-processing efficiency of the virtual scene image.

[0254] For the specific implementation of each of the above operations, reference can be made to the previous embodiments, which will not be elaborated here.

[0255] Among them, the computer-readable storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc.

[0256] Since the computer program stored in the computer-readable storage medium can execute the steps in any of the methods for determining the post-processing area provided in the embodiments of the present application, the beneficial effects achievable by any of the methods for determining the post-processing area provided in the embodiments of the present application can be realized. For details, refer to the previous embodiments, which will not be elaborated here.

[0257] The above has introduced in detail a method, device, computer-readable storage medium, and computer device for determining a post-processing area provided in the embodiments of the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.

Claims

1. A method for determining a post-processing area, characterized in that The method includes: Obtaining a scaling parameter, a rotation parameter corresponding to a target control area in a target virtual scene, and a center point position of the center point in a world coordinate system, where the target control area is adjusted based on the scaling parameter, the rotation parameter, and the center point position; Mapping the pixel point position of the pixel points in the target virtual scene in the world coordinate system to the spatial coordinate system corresponding to the target control area to obtain the mapped position of the pixel points in the spatial coordinate system; Performing a rotation process on the pixel points according to the rotation parameter and the mapped position to obtain the rotated position of the rotated pixel points in the spatial coordinate system; Calculating the sum value of the rotated position and the center point position to obtain the target position of the pixel points after the rotation process mapped in the world coordinate system; Determining a post-processing area from the target virtual scene based on the scaling parameter, the rotation parameter, the center point position, and the target position.

2. The method according to claim 1, wherein The axis directions corresponding to the world coordinate system and the spatial coordinate system are parallel to each other; The mapping of the pixel point position of the pixel points in the target virtual scene in the world coordinate system to the spatial coordinate system corresponding to the target control area to obtain the mapped position of the pixel points in the spatial coordinate system includes: Calculating the difference between the pixel point position and the center point position to obtain a vector of the pixel point position relative to the center point position; Determining the mapped position based on the vector.

3. The method according to claim 1, wherein The performing a rotation process on the pixel points according to the rotation parameter and the mapped position to obtain the rotated position of the rotated pixel points in the spatial coordinate system includes: Determining a rotation transformation matrix according to the rotation parameter; Calculating the multiplication value of the mapped position and the rotation transformation matrix to obtain the rotated position.

4. The method according to claim 3, wherein The rotation parameter includes a rotation value in each axis direction in the spatial coordinate system; The determining a rotation transformation matrix according to the rotation parameter includes: Generating a rotation matrix based on the rotation value in each axis direction in the spatial coordinate system to obtain a plurality of rotation matrices; Multiplying the plurality of rotation matrices to obtain the rotation transformation matrix.

5. The method according to claim 1, characterized in that, The determining a post-processing area from the target virtual scene based on the scaling parameter, the rotation parameter, the center point position, and the target position includes: Determining a target area in the world coordinate system based on the scaling parameter, the rotation parameter, and the center point position; Determining a post-processing area from the target virtual scene according to the target area and the target position.

6. The method according to claim 5, wherein The determining a post-processing area from the target virtual scene according to the target area and the target position includes: Determining whether the target position is within the target area to obtain a determination result; Determining target pixel points from the pixel points of the target virtual scene according to the determination result; Constructing the post-processing area based on the target pixel points.

7. The method according to claim 6, characterized in that The determining target pixel points from the pixel points of the target virtual scene according to the determination result includes: If the judgment result indicates that the target position is within the target area, the target pixel is obtained based on the pixel at the target position.

8. The method according to claim 1, characterized in that It further includes: Obtaining a preset post-processing effect; Adding the preset post-processing effect to the pixels in the post-processing area.

9. A determining device for a post-processing area, characterized in that The device includes: A first obtaining unit, configured to obtain a scaling parameter, a rotation parameter, and a center point position of a target control area in a world coordinate system corresponding to a target virtual scene, where the target control area is adjusted based on the scaling parameter, the rotation parameter, and the center point position; A mapping unit, configured to map the pixel position of the pixel in the target virtual scene in the world coordinate system to a spatial coordinate system corresponding to the target control area, to obtain a mapped position of the pixel in the spatial coordinate system; A processing unit, configured to perform a rotation process on the pixel according to the rotation parameter and the mapped position, to obtain a rotated position of the rotated pixel in the spatial coordinate system; A first determining unit, configured to calculate a sum value of the rotated position and the center point position, to obtain a target position of the pixel mapped in the world coordinate system after the rotation process; A second determining unit, configured to determine a post-processing area from the target virtual scene based on the scaling parameter, the rotation parameter, the center point position, and the target position.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein, When the processor executes the program, it implements the method for determining a post-processing area according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores multiple instructions, and the instructions are suitable for being loaded by a processor to execute the method for determining a post-processing area according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method and device for game picture display

    CN110251940A

  • Display method, display device, electronic equipment and storage medium

    CN110602477A