Editing method and device for interaction model in game scene, electronic equipment and storage medium
By configuring interactive object models in the game scene and allowing users to edit and render them, the problem of low model utilization in existing technologies is solved, achieving more efficient resource utilization and an immersive experience.
Patent Information
- Application Number
- CN202311616643.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-29
- Publication Date
- 2025-01-10
AI Technical Summary
Existing games lack effective utilization of existing scene models, leading to an increase in the number of models and resource consumption burden, which affects the user's immersive experience.
In game scenarios, scene models are configured as interactive objects, and edited and rendered to meet interactive response conditions through user operations. This utilizes existing models to achieve interactive experiences and reduces the workload of model creation.
It improves the usability and utilization of scene models, enhances the user's immersive experience, and reduces the resource burden on game design.
Smart Images

Figure CN119280798A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for editing an interactive model in a game scene. Background Art
[0002] With the development of game technology, "open world" games are emerging, and their immersive realism strongly attracts users. Among them, the degree of freedom of the game will greatly affect the user's immersive experience.
[0003] Most games require a model that meets the requirements at the current location for users to interact with based on the plot, gameplay, etc. Therefore, game planners will propose art requirements and create new interactive models (if the game resource library is large enough, they may be able to find suitable ones in the resource library). This leads to an increasing number of models in the game, and the game volume is also increasing, and there is a lack of effective use of existing scene models. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the embodiments of the present application provide a method, device, electronic device and storage medium for editing an interactive model in a game scene.
[0005] According to one aspect of an embodiment of the present application, a method for editing an interaction model in a game scene is provided, comprising:
[0006] Determine the scene model to be edited according to the first operation of the user, and obtain configuration information corresponding to the scene model; wherein the scene model is set as an interactive object in the map editor and is associated with the configuration information, and the configuration information includes an interactive response condition corresponding to the scene model as an interactive object;
[0007] In a case where it is determined that the interactive operation on the scene model satisfies the interactive response condition, acquiring the editing operation of the user on the scene model;
[0008] Determining a current model texture corresponding to the scene model according to the editing operation;
[0009] The scene model is rendered using the current model texture.
[0010] According to another aspect of an embodiment of the present application, there is provided a device for editing an interaction model in a game scene, comprising:
[0011] A model determination module, used to determine the scene model to be edited according to the user's first operation, and obtain configuration information corresponding to the scene model; wherein the scene model is set as an interactive object in the map editor and is associated with the configuration information, and the configuration information includes the interactive response condition corresponding to the scene model as the interactive object;
[0012] an acquisition module, configured to acquire the editing operation of the user on the scene model when it is determined that the interactive operation on the scene model satisfies the interactive response condition;
[0013] A texture determination module, used to determine the current model texture corresponding to the scene model according to the editing operation;
[0014] A rendering module is used to render the scene model using the current model texture.
[0015] According to another aspect of an embodiment of the present application, a storage medium is further provided, which includes a stored program, and the above steps are executed when the program is run.
[0016] According to another aspect of the embodiment of the present application, an electronic device is provided, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0017] The memory is used to store computer programs;
[0018] The processor is used to implement the above method steps when executing a computer program.
[0019] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above method steps are implemented.
[0020] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art:
[0021] In this embodiment, the scene model in the game is used as an interactive object, and the user can edit the scene model and render the texture corresponding to the edited model. By using the existing models in the game scene, the user's interactive experience in the game is realized, the practicality and utilization rate of the scene model in the existing game are improved, the user's immersive experience in the game is enhanced, and the workload of model making in game design is reduced, and the resource occupation burden brought by the new resources on the game is avoided. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0024] Figure 1 A flowchart of a method for editing an interactive model in a game scene provided by an embodiment of the present application;
[0025] Figure 2 A flowchart of a method for editing an interactive model in a game scene provided by another embodiment of the present application;
[0026] Figure 3 A schematic diagram of a scene model provided for an embodiment of the present application;
[0027] Figure 4 A flowchart of a method for editing an interactive model in a game scene provided by another embodiment of the present application;
[0028] Figure 5 A schematic diagram of a scene model provided for another embodiment of the present application;
[0029] Figure 6 A flowchart of a method for editing an interactive model in a game scene provided by another embodiment of the present application;
[0030] Figure 7 A flowchart of a method for editing an interactive model in a game scene provided by another embodiment of the present application;
[0031] Figure 8 A schematic diagram of a scene model provided for another embodiment of the present application;
[0032] Fig. 9 A flowchart of a method for editing an interactive model in a game scene provided by another embodiment of the present application;
[0033] Fig.10 A flowchart of a method for editing an interactive model in a game scene provided by another embodiment of the present application;
[0034] Fig.11 A schematic diagram of a scene model provided for another embodiment of the present application;
[0035] Fig.12 A flowchart of a method for editing an interactive model in a game scene provided by another embodiment of the present application;
[0036] Fig.13A block diagram of a device for editing an interactive model in a game scene provided by an embodiment of the present application;
[0037] Fig.14 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0039] In the embodiment of the present application, the game designer can configure the game scene model in advance in the map editor, configure the scene model as an interactive object, and associate the configuration information of the interactive object. The configuration information of the interactive object may include the interaction type and the interaction response condition.
[0040] Interaction types can include: general interaction, self-drawn texture interaction, multi-option interaction, etc. General interaction means that users can perform pre-defined operations on interactive objects, such as rotation, splicing, combination, etc. Self-drawn texture interaction means that users can draw textures in the specified area of the scene model and apply them to the game scene. Multi-option interaction means that users can draw textures on the scene model by selecting different texture types, so as to obtain different feedback, such as different rewards or different plot lines.
[0041] Interaction response conditions may include: interaction premise, number of interactions, special point determination, etc. For example, the user interacts with the wine jar on the table in the game tavern. By rotating the wine jar to a specific angle, the text on the bottom of the jar can be found. At this time, the interaction is judged to be successful and the result is recorded.
[0042] Optionally, the configuration information of the interactive object may also include items required for interaction, brush parameters used to draw the interactive object, optional texture effect types, and corresponding model variables changed after interaction, etc. For example, the user needs to spend a certain amount of game coins to draw the interactive object; or the user needs to use the corresponding props to draw a specific texture effect on the interactive object, etc.
[0043] After the game developers complete the interactive configuration of the scene model, users can interact and edit the scene model during the game.
[0044] The following is an introduction to a method for editing an interactive model in a game scene provided by an embodiment of the present invention.
[0045] Figure 1 The following is a flow chart of a method for editing an interactive model in a game scene provided by an embodiment of the present application. Figure 1 As shown, the method includes the following steps S11-S14.
[0046] Step S11, determining the scene model to be edited according to the user's first operation, and obtaining configuration information corresponding to the scene model; wherein the scene model is set as an interactive object in the map editor and associated with configuration information, and the configuration information includes the interactive response conditions corresponding to the scene model as an interactive object.
[0047] Step S12: when it is determined that the interactive operation on the scene model satisfies the interactive response condition, obtaining the user's editing operation on the scene model.
[0048] When the interactive operation on the scene model meets the interactive response conditions, the game enters the interactive interface, and the user can edit the scene model in the interactive interface.
[0049] Step S13: determining the current model texture corresponding to the scene model according to the editing operation.
[0050] After the user edits the scene model, the current model texture of the scene model can be generated according to the user's editing operation. For example, the scene model is a torn prescription in a pharmacy. The user rotates the prescription fragments and pieces them together to obtain a complete prescription by operating the editing controls on the interactive interface. At this time, a current model texture corresponding to the complete prescription is generated.
[0051] Step S14: Rendering the scene model using the current model texture.
[0052] In this embodiment, the scene model in the game is used as an interactive object, and the user can edit the scene model and render the texture corresponding to the edited model. By using the existing models in the game scene, the user's interactive experience in the game is realized, the practicality and utilization rate of the scene model in the existing game are improved, the user's immersive experience in the game is enhanced, and the workload of model making in game design is reduced, and the resource occupation burden brought by the new resources on the game is avoided.
[0053] In an optional embodiment, when it is determined that the interactive operation on the scene model satisfies the interactive response condition, the method further includes: determining a control parameter corresponding to an edit control of the scene model according to the configuration information. The above step S12 obtains the user's edit operation on the scene model, including: obtaining the user's edit operation on the scene model using the edit control.
[0054] On the interactive interface, editing controls for editing the scene model may be provided, such as a button for rotating the model, a brush for drawing or erasing graphics, a button for adjusting the brush color, size, shape, etc., an option box for selecting texture effects, such as flame, water flow, sand, etc. The user can use the editing controls on the interactive interface to edit the scene model, such as rotating, drawing textures, erasing textures, drawing by selecting a texture type, etc.
[0055] Among them, the control parameters of the editing control can be pre-set by the game producer when configuring the scene model, for example, the rotation angle of the interactive object each time the rotation button is clicked, the color and size of the brush for drawing the texture, the type of optional texture effect, etc.
[0056] For the user's editing operation on the scene model, the editing effect can take effect when certain conditions are met, such as the user consuming a specified prop. In an optional embodiment, the configuration information includes: the editing effect taking effect condition; the above step S14 may further include: determining whether the editing effect taking effect condition is met; when the editing effect taking effect condition is met, rendering the scene model using the current model texture.
[0057] The following describes in detail the editing method of the interaction model in the game scene of the present application, taking several interaction scenarios as examples.
[0058] (I) General Interaction
[0059] The following takes the example of a user rotating and splicing an interactive object to explain the common interaction process in detail. Figure 2 As shown, the method of the embodiment of the present application includes the following steps S21-S24:
[0060] Step S21, detecting a user's interactive operation on an interactive object model in a scene;
[0061] Step S22, determining whether the interactive operation meets the conditions such as the interactive premise and the number of possible interactions; if so, executing step S23, if not, no response;
[0062] Step S23, triggering the interactive interface;
[0063] Step S24, rotating the interactive object model according to detecting a drag operation on the interactive object model;
[0064] Step S25, judging whether the rotation angle reaches the special point target according to the direction of the interactive object model; if so, the interaction is successfully completed and the result is recorded; if not, returning to step S24.
[0065] like Figure 3As shown, for example, the user interacts with a torn prescription in a pharmacy. The configuration information corresponding to the prescription includes: interaction prerequisite—click on the prescription fragments, number of interactions—at least once, special point target—rotate the prescription fragments to a specific angle. After the user clicks on the prescription, the interaction interface is triggered, and the prescription is assembled by rotating the prescription fragments to a specific angle. At this time, it is judged as successful and the result is recorded. The result meets the acceptance conditions of the medicine picker side quest, and the user can accept this task.
[0066] In the normal interaction process, since the interactive objects are existing scene models that the game developers have configured in advance in the map editor as interactive objects, the game developers do not need to create new models, nor do they need to create new model IDs for the new models, store the resource files corresponding to the new models in the resource library, and put the new models back into the game map. For the common interactions that exist in large numbers in the game, directly configuring the existing scene models as interactive objects is suitable for large-scale deployment in the game, and reduces the model production workload of the game design, does not bring a large amount of resource occupation burden to the game, and is cost-effective.
[0067] (II) Self-drawn texture interaction
[0068] In an optional embodiment, for self-drawn texture interaction, the user can draw a texture on the scene model, such as Figure 4 As shown, the above step S13 includes steps S31 and S32.
[0069] Step S31, generating a dynamic texture corresponding to the editable area according to the user's editing operation on the editable area of the scene model;
[0070] Step S32, merging the dynamic texture with the original model texture corresponding to the editable area to obtain the current model texture.
[0071] In this embodiment, in the self-drawn texture interaction mode, the user can draw the texture in the editable area of the scene model in the interactive interface and apply it to the game scene. This can better stimulate the user's creative enthusiasm and enhance the user's experience of open world games.
[0072] Optionally, in the above step S32, the fusion of the dynamic texture and the original model texture may be to superimpose the dynamic texture on the original model texture, or to use the dynamic texture to replace the original model texture in the editable area of the scene model.
[0073] like Figure 5 As shown, the user can draw a texture on the specified area of the box. After the user draws a pattern, the pattern can be displayed in the specified area of the box, which has realized the user's self-drawn texture interaction with the scene model.
[0074] The following takes the example of a user drawing a texture on a box to explain the process of self-drawn texture interaction in detail. Figure 6 As shown, the method of the embodiment of the present application includes the following steps S41-S44:
[0075] Step S41, detecting a user's interactive operation on a box in the scene;
[0076] Step S42, determining whether the interactive operation meets the conditions such as the interactive premise and the number of possible interactions; if so, executing step S43, if not, no response;
[0077] Step S43, triggering an interactive interface, which includes a drawing area and displays unlocked editing controls such as brushes and colors;
[0078] Optionally, the drawable area can be the same shape as the editable area of the box to make it easier for users to draw graphics.
[0079] Step S44, identifying the drawing content of the user in the drawable area, automatically generating a dynamic texture according to the drawing content, and fusing the dynamic texture with the original model texture of the editable area of the box to obtain the current model texture of the box;
[0080] Since the drawable area and the editable area of the box have the same shape but may be different in size, when generating dynamic textures, the drawn content needs to be adaptively scaled according to the size of the editable area.
[0081] Step S45, after detecting that the user consumes the specified prop, the self-drawn texture is applied;
[0082] Step S46, updating the box texture to the current model texture;
[0083] In this way, the user uses a brush to draw textures in the interactive interface, and the program will automatically generate dynamic textures for the content drawn by the user, and merge the dynamic textures with the original model texture corresponding to the editable area to achieve real-time display of the user-drawn texture on the scene model.
[0084] Optionally, in the self-drawn texture mode, the editing controls on the interactive interface can be editing controls corresponding to the editable mode of the scene model. For example, if the editable mode of the scene model is preset to use a brush with selectable colors to draw graphics, only the editing controls for the brush and the selectable colors are displayed on the interactive interface, or only the editing controls corresponding to the brush and the selectable colors are unlocked. The editing controls available on the interactive interface can also vary according to different user permissions, that is, different users have different editing permissions for the scene model, and the available editing controls provided on the interactive interface are also different. For different users, such as differences in the user's role, level, game progress, etc. in the game, the editable area of the same scene module can also be different.
[0085] Optionally, the updated model texture can be synchronized to the game server so that it can be seen by other users. Other users with modification permissions can also modify and update the scene model.
[0086] (III) Multi-option interaction
[0087] In the multi-option interaction mode, users can select different textures to draw on the scene model, so as to obtain different feedback - that is, different rewards, different plot directions and other personalized experiences.
[0088] In an optional embodiment, for multi-option interaction, the user can select different texture effects to perform texture drawing on the scene model, such as Figure 7 As shown, the above step S13 includes steps S51-S54.
[0089] Step S51, when the user uses the editing control to perform editing operations on the screen, a detection ray of the world space is generated on the screen, and the detection ray is used to detect whether the editing control intersects with the scene model.
[0090] The editing control is a control corresponding to the texture effect selected by the user.
[0091] Step S52: when the editing control intersects with the scene model, the UV coordinates of the intersection point of the editing control and the scene model in the original model texture of the scene model are obtained.
[0092] Step S53, generating an editing result at the UV coordinates on the newly created texture according to the editing operation to obtain a dynamic texture.
[0093] Step S54, merging the dynamic texture with the original model texture to obtain the current model texture.
[0094] Specifically, the dynamic texture created by the game program (referred to as texture A) has an initial color alpha of 0.0. When the user draws a pattern on the interface, the user-drawn pattern will be drawn at the same position of texture A according to the UV of the scene model texture (referred to as texture B), and the corresponding color value will be modified and the alpha will be changed to 1.0. The modification of the alpha value can be directly updated through the graphics API. At this time, texture A is the pattern drawn by the user, and texture B is the texture of the scene model itself. When the scene model is rendered and the color is sampled, texture A and texture B will be merged through the alpha value of texture A.
[0095] In this embodiment, the user can select different texture effects to perform texture drawing on the scene model. In this way, the user can easily and quickly create a content presentation, avoiding the increase of game costs such as recognizing user actions, creating special effects, and judging results.
[0096] In an optional embodiment, the configuration information also includes the model variables corresponding to the editing operation. The method also includes: determining the model variables of the scene model according to the editing operation; and playing the animation corresponding to the change process of the model variables. Optionally, based on different model variables, the game can also be directed to different plots.
[0097] For example, in the interactive interface, an option box is provided for selecting different texture effects, such as flame, water flow, sand and other texture effects. Figure 8 As shown, if the scene model is a box on fire. After the user selects the flame texture effect, when the brush is used to draw on the box, the fire will become bigger. By changing the model variable corresponding to the box, an animation of the fire in the box growing from small to large will be played, and the user will be led to the branch plot of failed fire fighting; if the water texture effect is selected, when the brush is used to draw on the box, the fire will be extinguished but the box will be soaked in water. By changing the model variable corresponding to the box, an animation of the box extinguishing the fire but soaking in water will be played, and the user will be led to the branch plot of the goods being scrapped; if the sand texture effect is selected, when the brush is used to draw on the box, the fire will be successfully extinguished and the box will be protected. By changing the model variable corresponding to the box, an animation of the box successfully extinguishing the fire and remaining intact will be played, and the user will be led to the branch plot of the delivery on time.
[0098] The following takes the example of a user drawing a texture on a box to explain the process of multi-option interaction in detail. Fig. 9 As shown, the method of the embodiment of the present application includes the following steps S61-S66:
[0099] Step S61, detecting a user's interactive operation on a box in the scene;
[0100] Step S62, determining whether the interactive operation meets the conditions such as the interactive premise and the number of possible interactions; if so, executing step S63, if not, no response;
[0101] Step S63, detecting the texture effect and brush selected by the user on the interactive interface;
[0102] Step S64, when it is detected that the user clicks the screen, a ray in the world space is generated, and the ray is used to detect whether the brush intersects with the box;
[0103] Step S65, when the brush intersects with the box, the UV coordinates of the intersection point on the original model texture are obtained, and the editing result is generated at the UV coordinates on the newly created texture to obtain a dynamic texture;
[0104] Step S66, judging and executing corresponding feedback according to the brush selected by the player and the area drawn, and changing the model variables.
[0105] Optionally, when there are multiple editable areas in the scene model and the user draws textures on the multiple editable areas, since the textures drawn in different areas may be different, it is necessary to make a judgment by area, and the model variable can be determined according to the texture with the largest area surface.
[0106] Optionally, after selecting a texture effect, the user can get different feedback if the position or area of the area painted with the brush is different. For example, if the scene model is a house, and the user selects a fire texture effect, when the user uses the brush to paint on the door, the door is on fire and the user can enter the room; but if the user uses the brush to paint on the roof or wall, the house is on fire.
[0107] In summary, after the user uses different texture effects to interact with the scene model for texture drawing, the scene model changes the texture rendering effect based on the user's interactive operation, and the model variables of the scene model itself also change, thus giving different feedback to the user. The user's editing interaction with the game is more convenient and faster, making the game experience more diverse without increasing the additional cost of the game, and improving the user's immersive experience in the game.
[0108] In the multi-option interaction mode, the user can also replace the model texture with a specific texture by drawing. Texture replacement can be applied to the interactive purpose of wiping. For example, the user can erase the surface of the interactive object to show the pattern covering the surface of the object.
[0109] In an alternative embodiment, for texture replacement, such as Fig.10 As shown, step S13 includes steps S71-S74.
[0110] Step S71, when the user uses the editing control to perform editing operations on the screen, a detection ray of the world space is generated on the screen, and the detection ray is used to detect whether the editing control intersects with the scene model.
[0111] Step S72: when the editing control intersects with the scene model, the UV coordinates of the intersection point of the editing control and the scene model in the original model texture of the scene model are obtained.
[0112] Step S73, according to the editing operation, modify the first alpha value at the UV coordinate on the newly created texture to the second alpha value to obtain a dynamic texture.
[0113] Step S74, merging the dynamic texture with the original model texture to obtain the current model texture.
[0114] To achieve the erasing texture, the original model texture of the scene model may include two textures, namely a first original model texture and a second original model texture. The above step S14 includes: displaying the first original model texture at the coordinate of the first alpha value in the dynamic texture, and displaying the second original model texture at the coordinate of the second alpha value in the dynamic texture.
[0115] Specifically, the game program creates a dynamic texture (referred to as texture A), with the initial color alpha = 0.0, and the drawn points will modify the alpha to 1.0. This scene model has two original textures (referred to as texture B and texture C). When rendering the model, in the pixel shader, when texture A's alpha = 0, the color of texture B is displayed, and when texture A's alpha = 1, the color of texture C is displayed. That is, out_color = lerp (b_color, c_color, a_alpha). The final effect is that the position drawn by the player will be partially replaced by texture C.
[0116] like Fig.11 As shown, the scene model is a box. By erasing the texture, the items inside the box can be displayed.
[0117] The following takes the example of a user erasing the texture of a box to explain the erasing interaction process in detail. Fig.12 As shown, the method of the embodiment of the present application includes the following steps S81-S86:
[0118] Step S81, detecting a user's interactive operation on a box in the scene;
[0119] Step S82, determining whether the interactive operation meets the conditions such as the interactive premise and the number of possible interactions; if so, executing step S83, if not, no response;
[0120] Step S83, detecting that the user selects a brush on the interactive interface;
[0121] Step S84, when it is detected that the user clicks the screen, a ray in the world space is generated, and the ray is used to detect whether the brush intersects with the box;
[0122] Step S85, when the brush intersects with the box, the UV coordinates of the intersection point in the original model texture are obtained, and the white area is rendered with texture B on the same UV coordinates of the texture, and the black area is rendered with texture A on the same UV coordinates of the texture.
[0123] To facilitate judgment, the texture of the user-drawn area is set to black, and the texture of the undrawn area is set to white. In this way, the texture can be quickly erased later.
[0124] In this embodiment, by erasing the texture, the user's customization experience is enhanced while ensuring the aesthetics of the game model, thereby further improving the diversity and experience of the game.
[0125] In the technical solution of this application, the ways in which users interact with scene models are not limited to the above methods. According to the game plot and user editing requirements, more ways of interacting with scene models can also be designed. These interactive methods realize the interactive experience of users in the game, improve the practicality and utilization rate of scene models in existing games, improve the user's immersive experience in the game, reduce the workload of model making in game design, and avoid the resource occupation burden brought by the new resources on the game.
[0126] The following are device embodiments of the present application, which can be used to execute method embodiments of the present application.
[0127] Fig.12 This is a block diagram of an editing device for an interactive model in a game scene provided by an embodiment of the present application. The device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Fig.12 As shown, the editing device of the interactive model in the game scene includes:
[0128] The model determination module 101 is used to determine the scene model to be edited according to the first operation of the user, and obtain configuration information corresponding to the scene model; wherein the scene model is set as an interactive object in the map editor and is associated with the configuration information, and the configuration information includes the interactive response condition corresponding to the scene model as the interactive object;
[0129] An acquisition module 102, configured to acquire the editing operation of the user on the scene model when it is determined that the interactive operation on the scene model satisfies the interactive response condition;
[0130] A texture determination module 103, used to determine a current model texture corresponding to the scene model according to the editing operation;
[0131] The rendering module 104 is used to render the scene model using the current model texture.
[0132] Optionally, when it is determined that the interactive operation on the scene model satisfies the interactive response condition, the device further includes:
[0133] A control determination module, used to determine the control parameters corresponding to the edit control of the scene model according to the configuration information;
[0134] The acquisition module 102 is used to acquire the editing operation of the user on the scene model using the editing control.
[0135] Optionally, the texture determination module 103 is used to generate a dynamic texture corresponding to the editable area according to the user's editing operation on the editable area of the scene model; and merge the dynamic texture with the original model texture corresponding to the editable area to obtain the current model texture.
[0136] Optionally, the texture determination module 103 is used to generate a detection ray in the world space on the screen when the user uses the editing control to perform an editing operation on the screen, and detect whether the editing control intersects with the scene model through the detection ray; when the editing control intersects with the scene model, obtain the UV coordinates of the intersection point of the editing control and the scene model in the original model texture of the scene model; according to the editing operation, generate an editing result at the UV coordinates on the newly created texture to obtain a dynamic texture; and merge the dynamic texture with the original model texture to obtain the current model texture.
[0137] Optionally, the texture determination module 103 is used to generate a detection ray in the world space on the screen when the user uses the editing control to perform an editing operation on the screen, and detect whether the editing control intersects with the scene model through the detection ray; when the editing control intersects with the scene model, obtain the UV coordinates of the intersection point of the editing control and the scene model on the original model texture of the scene model; according to the editing operation, modify the first alpha value at the UV coordinate on the newly created texture to a second alpha value to obtain a dynamic texture; and merge the dynamic texture with the original model texture to obtain the current model texture.
[0138] Optionally, the original model texture includes a first original model texture and a second original model texture; the rendering module 104 is used to display the first original model texture at the coordinates of the first alpha value in the dynamic texture, and display the second original model texture at the coordinates of the second alpha value in the dynamic texture.
[0139] Optionally, the configuration information also includes model variables corresponding to the editing operation.
[0140] The device also includes:
[0141] A model variable determination module, used to determine the model variables of the scene model according to the editing operation;
[0142] The playing module is used to play the animation corresponding to the change process of the model variables.
[0143] Optional. The configuration information includes: an editing effect effective condition; a rendering module 104, used to determine whether the editing effect effective condition is satisfied; when the editing effect effective condition is satisfied, using the current model texture to render the scene model.
[0144] The present application also provides an electronic device, such as Fig.14 As shown, the electronic device may include: a processor 1501 , a communication interface 1502 , a memory 1503 and a communication bus 1504 , wherein the processor 1501 , the communication interface 1502 , and the memory 1503 communicate with each other via the communication bus 1504 .
[0145] Memory 1503, used for storing computer programs;
[0146] The processor 1501 is used to implement the steps of the above method embodiment when executing the computer program stored in the memory 1503.
[0147] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0148] The communication interface is used for communication between the above electronic device and other devices.
[0149] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0150] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0151] The present application also provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the steps of the above method embodiment when executed by a processor.
[0152] It should be noted that, for the above-mentioned device, electronic device and computer-readable storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0153] It should be further noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0154] The above is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.
Claims
1. A method for editing an interactive model in a game scene, characterized in that: include: Determine the scene model to be edited according to the first operation of the user, and obtain configuration information corresponding to the scene model; wherein the scene model is set as an interactive object in the map editor and is associated with the configuration information, and the configuration information includes an interactive response condition corresponding to the scene model as an interactive object; In a case where it is determined that the interactive operation on the scene model satisfies the interactive response condition, acquiring the editing operation of the user on the scene model; Determining a current model texture corresponding to the scene model according to the editing operation; The scene model is rendered using the current model texture.
2. The method according to claim 1, characterized in that The step of determining the editing model texture corresponding to the scene model according to the editing operation includes: Generating a dynamic texture corresponding to the editable area according to the user's editing operation on the editable area of the scene model; The dynamic texture is merged with the original model texture corresponding to the editable area to obtain the current model texture.
3. The method according to claim 1, characterized in that: The determining, according to the editing operation, a current model texture corresponding to the scene model comprises: When the user performs an editing operation using an editing control on the screen, a detection ray of the world space is generated in the screen, and whether the editing control intersects with the scene model is detected by the detection ray; When the editing control intersects with the scene model, obtaining the UV coordinates of the intersection point of the editing control and the scene model in the original model texture of the scene model; According to the editing operation, generating an editing result at the UV coordinates on the newly created texture to obtain a dynamic texture; The dynamic texture is merged with the original model texture to obtain the current model texture.
4. The method according to claim 1, characterized in that The determining, according to the editing operation, a current model texture corresponding to the scene model comprises: When the user performs an editing operation using an editing control on the screen, a detection ray of the world space is generated in the screen, and whether the editing control intersects with the scene model is detected by the detection ray; When the editing control intersects with the scene model, obtaining the UV coordinates of the intersection point of the editing control and the scene model in the original model texture of the scene model; According to the editing operation, the first alpha value at the UV coordinate on the newly created texture is modified to a second alpha value to obtain a dynamic texture; The dynamic texture is merged with the original model texture to obtain the current model texture.
5. The method according to claim 4, characterized in that The original model texture includes a first original model texture and a second original model texture; The step of rendering the scene model by using the current model texture includes: The first original model texture is displayed at the coordinate of the first alpha value in the dynamic texture, and the second original model texture is displayed at the coordinate of the second alpha value in the dynamic texture.
6. The method according to claim 1, characterized in that The configuration information also includes model variables corresponding to the editing operation; The method further comprises: Determining model variables of the scene model according to the editing operation; Play the animation corresponding to the change process of the model variables.
7. The method according to claim 1, characterized in that The configuration information includes: editing effect effectiveness conditions; The step of rendering the scene model by using the current model texture includes: Determining whether the editing effect effectiveness condition is met; When the editing effect validation condition is met, the scene model is rendered using the current model texture.
8. A device for editing an interactive model in a game scene, characterized in that: include: A model determination module, used to determine the scene model to be edited according to the user's first operation, and obtain configuration information corresponding to the scene model; wherein the scene model is set as an interactive object in the map editor and is associated with the configuration information, and the configuration information includes the interactive response condition corresponding to the scene model as the interactive object; an acquisition module, configured to acquire the editing operation of the user on the scene model when it is determined that the interactive operation on the scene model satisfies the interactive response condition; A texture determination module, used to determine the current model texture corresponding to the scene model according to the editing operation; A rendering module is used to render the scene model using the current model texture.
9. An electronic device, characterized in that: include: A processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; The memory is used to store computer programs; The processor is used to implement the method steps described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method steps described in any one of claims 1 to 7 are implemented.