Information Processing Method, Apparatus, Readable Storage Medium, and Electronic Device
By splitting the vegetation model and setting the target point, generating target maps and rendering it, the problem of low dynamic effect efficiency of the vegetation model is solved, and the natural wind blowing and interactive effects are improved.
Patent Information
- Application Number
- CN202111676732.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2041-12-31
AI Technical Summary
In the prior art, the dynamic effect of the vegetation model is inefficient and cannot meet the natural and vivid wind blowing effects and interactive needs.
By splitting the target vegetation model, generating sub-vegetation models and setting target points, generating target maps based on these target points, and importing them into the target engine for rendering operations, the natural dynamic effect of the vegetation model is achieved.
The dynamic effect performance of the vegetation model is improved, the natural wind blowing effect and the plant model that interacts with the characters is realized, and the problem of inefficiency is solved.
Smart Images

Figure CN114419216B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular, to an information processing method, apparatus, readable storage medium, and electronic device. Background Art
[0002] Currently, in order to achieve the wind blowing effect of plants, the swinging effect of plants is usually achieved by binding bone animations, but this method has a large workload and limitations; another method is to use material distortion to achieve regular fluctuations of plants, which lacks interactivity and has the technical problem of low efficiency in realizing the dynamic effect of vegetation models.
[0003] Aiming at the technical problem of low efficiency in realizing the dynamic effect of vegetation models in the related art, no effective solution has been proposed yet. Summary of the Invention
[0004] At least some embodiments of the present invention provide an information processing method, apparatus, readable storage medium, and electronic device to at least solve the technical problem of being unable to achieve the dynamic effect of vegetation models.
[0005] To achieve the above object, according to one embodiment of the present invention, an information processing method is provided. The method includes: splitting at least one first sub-vegetation model from a target vegetation model; determining a target point corresponding to each first sub-vegetation model, where each first sub-vegetation model is in a moving state around the corresponding target point in a game scene; generating a first target texture map of the target vegetation model based on the target points of each first sub-vegetation model; and importing the first target texture map into a target engine to perform a rendering operation.
[0006] Optionally, splitting at least one second sub-vegetation model from the target vegetation model, where each second sub-vegetation model is in a static state in the game scene; obtaining attachment information between at least one first sub-vegetation model and at least one second sub-vegetation model, where the attachment information is used to represent the attachment relationship between at least one first sub-vegetation model and at least one second sub-vegetation model; generating a first target texture map of the target vegetation model based on the target points of each first sub-vegetation model, including: generating the first target texture map on the target vegetation model based on the attachment information and the target points of each first sub-vegetation model.
[0007] Optionally, generating the first target texture map on the target vegetation model based on the attachment information and the target points of each first sub-vegetation model, including: when the target vegetation model includes a real trunk model, generating the first target texture map on the target vegetation model based on the attachment information and the target points of each first sub-vegetation model.
[0008] Optionally, determining the target points of each first sub-vegetation model includes: generating the target points of each first sub-vegetation model based on the real trunk model.
[0009] Optionally, on the target vegetation model, generating a first target texture based on the attachment information and the target points of each first sub-vegetation model, including: adjusting the position information of the real trunk model according to the target coordinate axis, where the target coordinate axis is one of the coordinate axes in the target coordinate system of the game scene; on the target vegetation model including the adjusted real trunk model, generating a first target texture based on the attachment information and the target points of each first sub-vegetation model.
[0010] Optionally, on the target vegetation model, generating a first target texture based on the attachment information and the target points of each first sub-vegetation model, including: when the target vegetation model includes a reference trunk model, deleting the reference trunk vegetation model from the target vegetation model, and on the target vegetation model after deleting the reference trunk vegetation model, generating a first target texture based on the attachment information and the target points of each first sub-vegetation model, where the reference trunk model is the trunk model created for the target vegetation model.
[0011] Optionally, determining the target points of each first sub-vegetation model includes: generating the target points of each first sub-vegetation model based on the reference trunk model.
[0012] Optionally, creating the polygons located in the target vegetation model as the reference trunk model.
[0013] Optionally, at least one second sub-vegetation model includes the root model of the target vegetation model and the real trunk model, the first sub-vegetation model includes the foliage model of the target vegetation model, and the attachment information is used to represent that the foliage model attaches to the real trunk model, and the real trunk model attaches to the root model.
[0014] Optionally, importing the first target texture into the target engine to perform a rendering operation, including: importing the first target texture into the target engine, and obtaining the wind force parameters in the game scene to perform the rendering operation.
[0015] Optionally, in the target vegetation model, determining a third sub-vegetation model to interact with the virtual game character; determining the color of the transparency channel of the vertices of the third sub-vegetation model, where the third sub-vegetation model is obtained by splitting the target vegetation model; generating a second target texture based on the color of the transparency channel of the vertices of the third sub-vegetation model; importing the first target texture into the target engine to perform a rendering operation, including: importing the second target texture and the first target texture into the target engine to perform the rendering operation.
[0016] Optionally, when the target vegetation model includes at least two root models, adjust the axial parameters of the true trunk model corresponding to the at least two root models, where the axial parameters are used to determine the range of the area where the trunk model corresponding to the at least two root models interacts with the virtual game character.
[0017] Optionally, in the local coordinate system of the game scene, verify whether the target points of each first sub-vegetation model are correct; generate a first target texture map of the target vegetation model based on the target points of each first sub-vegetation model, including: generating the first target texture map based on the correct target points.
[0018] To achieve the above object, according to another aspect of the present invention, there is also provided an information processing device, which may include: a splitting unit for splitting at least one first sub-vegetation model from the target vegetation model; a determining unit for determining the target point corresponding to each first sub-vegetation model, where each first sub-vegetation model is in a moving state around the corresponding target point in the game scene; a generating unit for generating a first target texture map of the target vegetation model based on the target points of each first sub-vegetation model; and an importing unit for importing the first target texture map into the target engine to perform a rendering operation.
[0019] To achieve the above object, according to another aspect of the present invention, there is also provided a computer-readable storage medium. The computer-readable storage medium stores a computer program, where when the computer program is run by a processor, it controls the device where the computer-readable storage medium is located to execute the information processing method of the embodiments of the present invention.
[0020] To achieve the above object, according to another aspect of the present invention, there is also provided an electronic device. The electronic device may include a memory and a processor, characterized in that the memory stores a computer program, and the processor is configured to run the computer program to execute the information processing method of the embodiments of the present invention.
[0021] In at least some embodiments of the present invention, at least one first sub-vegetation model is split from the target vegetation model; the target point corresponding to each first sub-vegetation model is determined, where each first sub-vegetation model is in a moving state around the corresponding target point in the game scene; a first target texture map of the target vegetation model is generated based on the target points of each first sub-vegetation model; and the first target texture map is imported into the target engine to perform a rendering operation. That is to say, the present invention splits the target vegetation model to obtain the first sub-vegetation model; sets the target points (anchor point information) of the first sub-vegetation model so that the first sub-vegetation model moves around the target points, thereby rendering natural and dynamic interactive plants, and thus achieving the technical effect of improving the efficiency of realizing the dynamic effect of the vegetation model, and solving the technical problem of low efficiency in realizing the dynamic effect of the vegetation model. Brief Description of the Drawings
[0022] The drawings described herein are used to provide a further understanding of the present invention, and constitute a part of this application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention, and do not constitute an improper limitation of the present invention. In the drawings:
[0023] Figure 1 is a hardware structure block diagram of a mobile terminal for an information processing method according to one embodiment of the present invention;
[0024] Figure 2 is a flowchart of an information processing method according to one embodiment of the present invention;
[0025] Figure 3 is a schematic diagram of making a plant according to the related art;
[0026] Figure 4 is a schematic diagram of importing a model according to one embodiment of the present invention;
[0027] Figure 5 is a schematic diagram of dragging a model into a plug-in according to one embodiment of the present invention;
[0028] Figure 6 is a schematic diagram of selecting a splitting tool according to one embodiment of the present invention;
[0029] Figure 7 is a schematic diagram of selecting a splitting object according to one embodiment of the present invention;
[0030] Figure 8(a) is a schematic diagram of a method for processing objects without a main body according to one embodiment of the present invention;
[0031] Figure 8(b) is a schematic diagram of a method for processing objects with a main body according to one embodiment of the present invention;
[0032] Figure 9(a) is a schematic diagram of creating a selection set according to one embodiment of the present invention;
[0033] Figure 9(b) is a schematic diagram of generating a pivot point according to one embodiment of the present invention;
[0034] Figure 10(a) is a schematic diagram of a coordinate orientation selection interface according to one embodiment of the present invention;
[0035] Figure 10(b) is a schematic diagram of an anchor point display interface according to one embodiment of the present invention;
[0036] Figure 11 is a schematic diagram of an anchor point setting interface according to one embodiment of the present invention;
[0037] FIG12( a ) is a schematic diagram of an interface for setting a hierarchical relationship according to one embodiment of the present invention;
[0038] FIG12( b ) is a schematic diagram of a hierarchical relationship interface according to one embodiment of the present invention;
[0039] Figure 13 is a schematic diagram of a hierarchical skeletal connection according to one embodiment of the present invention;
[0040] Figure 14 This is a schematic diagram of a flower attached to a stem and leaf according to one embodiment of the present invention;
[0041] Figure 15 is a schematic diagram of a selection model according to one embodiment of the present invention;
[0042] Figure 16 is a schematic diagram for realizing dynamic effect mapping according to one embodiment of the present invention;
[0043] Figure 17 is a schematic diagram of a coordinate map according to one embodiment of the present invention;
[0044] Figure 18 is a schematic diagram of calculating a vertex transparency channel according to one embodiment of the present invention;
[0045] Figure 19 is a schematic diagram of a vertex transparent channel color according to one embodiment of the present invention;
[0046] Figure 20 is a schematic diagram of another coordinate map according to one embodiment of the present invention;
[0047] FIG21( a ) is a schematic diagram of an interface for adjusting coordinate mapping settings according to one embodiment of the present invention;
[0048] FIG21( b ) is a schematic diagram of adjusting a coordinate map according to one embodiment of the present invention;
[0049] Figure 22 is a schematic diagram of an imported texture according to one embodiment of the present invention;
[0050] Figure 23 is a schematic diagram of creating a material ball according to one embodiment of the present invention;
[0051] Figure 24 is a schematic diagram of imparting a material according to one embodiment of the present invention;
[0052] FIG25( a ) is a schematic diagram of selecting a map according to one embodiment of the present invention;
[0053] Figure 25(b) is a schematic diagram of the setting of various material parameters according to one embodiment of the present invention;
[0054] Figure 26 is a schematic diagram of the setting of a wind power parameter according to one embodiment of the present invention;
[0055] Figure 27 is a schematic diagram of a natural dynamic effect according to one embodiment of the present invention;
[0056] Figure 28 is a structural block diagram of an information processing device according to one embodiment of the present invention. Detailed implementation manners
[0057] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0058] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order different from those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily need to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0059] According to one embodiment of the present invention, an embodiment of an information processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a sequence different from that here.
[0060] The method embodiments can be executed on a mobile terminal, a computer terminal, or a similar computing device. Taking the operation on a mobile terminal as an example, the mobile terminal can be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a personal digital assistant, a Mobile Internet Device (abbreviated as MID), a PAD, a game console, and other terminal devices. Figure 1 is a hardware structure block diagram of a mobile terminal for an information processing method according to an embodiment of the present invention. As Figure 1 shown, the mobile terminal may include one or more ( Figure 1 only one is shown in the figure) processors 102 (the processor 102 may include, but is not limited to, a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microprocessor (MCU), a programmable logic device (FPGA), a neural network processor (NPU), a tensor processor (TPU), an artificial intelligence (AI) type processor, and other processing devices) and a memory 104 for storing data. Optionally, the above mobile terminal may further include a transmission device 106 for communication functions, an input / output device 108, and a display device 110. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above mobile terminal. For example, the mobile terminal may further include more or fewer components than Figure 1 shown in the figure, or have a different configuration from Figure 1 shown in the figure.
[0061] The memory 104 can be used to store computer programs. For example, software programs and modules of application software, such as the computer program corresponding to the information processing method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above information processing method. The memory 104 may include a high-speed random access memory, and may further include a non-volatile memory, such as one or more magnetic storage devices, a flash memory, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories may be connected to the mobile terminal through a network. Examples of the above network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0062] The transmission device 106 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wireless network provided by a communication provider of a mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0063] The input in the input / output device 108 can come from multiple Human Interface Devices (HIDs). For example: keyboards and mice, gamepads, other dedicated game controllers (such as: steering wheels, fishing rods, dance pads, remote controls, etc.). Some human interface devices can provide output functions in addition to input functions. For example: force feedback and vibration of gamepads, audio output of controllers, etc.
[0064] The display device 110 can be, for example, a Head-Up Display (HUD), a touch-screen Liquid Crystal Display (LCD), and a touch display (also referred to as a "touch screen" or "touch display screen"). The liquid crystal display enables a user to interact with the user interface of the mobile terminal. In some embodiments, the above-mentioned mobile terminal has a Graphical User Interface (GUI), and the user can perform human-computer interaction with the GUI through finger contacts and / or gestures on the touch-sensitive surface. The human-computer interaction function may optionally include the following interactions: creating web pages, drawing, word processing, creating electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital videos, playing digital music, and / or web browsing, etc. Executable instructions for performing the above human-computer interaction functions are configured / stored in a computer program product or readable storage medium executable by one or more processors.
[0065] In this embodiment, an information processing method running on the above-mentioned mobile terminal is provided. Figure 2 It is a flowchart of an information processing method according to one embodiment of the present invention. As Figure 2 shown, the method includes the following steps:
[0066] Step S202, splitting at least one first sub-vegetation model from the target vegetation model.
[0067] In the technical solution provided in step S202 of the present invention, a drawn target vegetation model is selected, and the target vegetation model is split using a model splitting tool to obtain a plurality of first sub-vegetation models. Among them, the target vegetation model can be a vegetation model in a game, such as shrubs, trees, and grass in the game, and can include target vegetation models with and without main trunks, and can be a vegetation model drawn using three-dimensional computer graphics software; the plurality of first sub-vegetation models can be integrated into a target vegetation model.
[0068] Optionally, a model splitting tool can be used to split the target vegetation model to split out a plurality of first sub-vegetation models.
[0069] Step S204: Determine the target point corresponding to each first sub-vegetation model, where each first sub-vegetation model is in a moving state around the corresponding target point in the game scene.
[0070] In the technical solution provided in step S204 of the present invention, a drawn target vegetation model is selected, and the target vegetation model is split using a model splitting tool to obtain a plurality of first sub-vegetation models. All the split first sub-vegetation models are selected and calculated to obtain the target point corresponding to each first sub-vegetation model. Among them, the target point can also be called an anchor point. Each first sub-vegetation model is in a moving state around the corresponding target point in the game scene. The target point is used to ensure that the holographic image of the target vegetation model can be maintained at the placed physical position, that is, the target vegetation model can exist in the form of texture coordinates (UV coordinates).
[0071] Optionally, the first sub-vegetation model for which the target point is to be generated can be selected, and the component for generating a new target point (create new pivot) can be clicked to calculate the first sub-vegetation model to obtain the target point corresponding to the selected first sub-vegetation model. If the target points of individual first sub-vegetation models are automatically set incorrectly at this time, manual adjustment can be made according to the actual situation to achieve the purpose of obtaining appropriate target points. Among them, the target point can be set on the leaves with relatively large patch intersections.
[0072] Step S206: Generate a first target texture map of the target vegetation model based on the target points of each first sub-vegetation model.
[0073] In the technical solution provided in step S206 of the present invention above, select the drawn target vegetation model, use the split model tool to split the target vegetation model, and split it into multiple first sub-vegetation models. Select all the split first sub-vegetation models, calculate for all the split first sub-vegetation models to obtain the target points of each first sub-vegetation model, and generate a first target texture map of the target vegetation model with the positions of the target points as vertices. Among them, the first target texture map can be used to render and display the wind force and interaction effects of the target vegetation model and can be a coordinate information texture map.
[0074] Optionally, calculate the coordinate information of the target points of the first sub-vegetation models, and generate a first target texture map according to the coordinate information of the target points of the first sub-vegetation models. The first target texture map can be a coordinate information texture map.
[0075] Step S208, import the first target texture map into the target engine to perform a rendering operation.
[0076] In the technical solution provided in step S208 of the present invention above, calculate the coordinate information of the target points of the first sub-vegetation models, generate a first target texture map according to the coordinate information of the target points of the first sub-vegetation models, import the first target texture map into the target engine, assign a material set according to requirements to the first target texture map, and render and display the target vegetation model with the first target texture map with the material assigned, to obtain a target vegetation model with wind force and interaction effects.
[0077] Through steps S202 to S208 of the present application above, at least one first sub-vegetation model is split from the target vegetation model; determine the target points corresponding to each first sub-vegetation model, where each first sub-vegetation model is in a moving state around the corresponding target point in the game scene; generate a first target texture map of the target vegetation model based on the target points of each first sub-vegetation model; import the first target texture map into the target engine to perform a rendering operation. That is to say, the present invention splits the target vegetation model to obtain the first sub-vegetation models; sets the target points (anchor point information) of the first sub-vegetation models, so that the first sub-vegetation models move around the target points, in order to render natural and dynamic interactive plants, thereby achieving the technical effect of improving the efficiency of realizing the dynamic effect of the vegetation model and solving the technical problem of low efficiency in realizing the dynamic effect of the vegetation model.
[0078] The above method of this embodiment will be further introduced below.
[0079] As an alternative implementation, at least one second sub-vegetation model is split from the target vegetation model, where each second sub-vegetation model is in a static state in the game scene; attachment information between at least one first sub-vegetation model and at least one second sub-vegetation model is obtained, where the attachment information is used to represent the attachment relationship between the at least one first sub-vegetation model and the at least one second sub-vegetation model; a first target texture map of the target vegetation model is generated based on the target points of each first sub-vegetation model, including: on the target vegetation model, a first target texture map is generated based on the attachment information and the target points of each first sub-vegetation model.
[0080] In this embodiment, the target vegetation model is split to obtain multiple second sub-vegetation models and multiple first sub-vegetation models. Attachment information between at least one first sub-vegetation model and at least one second sub-vegetation model is obtained. A first target texture map is generated on the target vegetation model based on the attachment information and the target points of each first sub-vegetation model. Among them, the first sub-vegetation model can be a model in a dynamic state in the game scene, and the second sub-vegetation model can be a model in a static state in the game scene. The target vegetation model includes the first sub-vegetation model and the second sub-vegetation model; the attachment information can be the hierarchical relationship of model connections, such as: the hierarchical relationship of trunk < branch = root system < leaf, which is used to establish a hierarchical relationship between the first sub-vegetation model and the second sub-vegetation model layer by layer, and can be a hierarchical relationship set in advance according to requirements.
[0081] Optionally, the target vegetation model is imported into the modeling software, and the target vegetation model is split using the Detach Selected Model's Elements tool to obtain multiple dynamic first sub-vegetation models and multiple static second sub-vegetation models. The hierarchical relationship is established layer by layer according to the hierarchy of trunk < branch = root system < leaf. The select and link tool is used to connect the multiple first sub-vegetation models and the multiple static second sub-vegetation models to obtain attachment information with a hierarchical connection relationship, so that the entire target vegetation model can be dragged as long as the trunk is moved. Based on the target points and the obtained attachment information, the target points and the obtained attachment information are processed through the components of the Process The Selected Object Hierarchy to obtain the first target texture map.
[0082] As an alternative implementation, on the target vegetation model, a first target texture map is generated based on the attachment information and the target points of each first sub-vegetation model, including: when the target vegetation model includes a real trunk model, on the target vegetation model, a first target texture map is generated based on the attachment information and the target points of each first sub-vegetation model.
[0083] In this embodiment, when the target vegetation model includes a real trunk model, the trunk of the real trunk model is directly used as a reference, the coordinates of the real trunk model are adjusted to face the X-axis, the coordinates of the target point are set to zero, the real trunk model is selected, and based on the attachment information and the target points of each first sub-vegetation model, the Process The Selected Object Hierarchy component is selected to process the real trunk model based on the attachment information and the target points of each first sub-vegetation model to obtain a first target texture map. Among them, the real trunk model can be a plant model with a trunk. By establishing a hierarchical relationship between the first sub-vegetation model and the trunk, the purpose of controlling the target vegetation model can be achieved by controlling the trunk. That is, moving the trunk can drag the entire tree, making the operation more convenient.
[0084] Optionally, for a model with a trunk, the trunk model can be directly selected, and a first target texture map can be obtained by processing the real trunk model based on the attachment information and the target points of each first sub-vegetation model.
[0085] As an alternative implementation, determining the target points of each first sub-vegetation model includes: generating the target points of each first sub-vegetation model based on the real trunk model.
[0086] In this embodiment, the trunk model in the real trunk model is directly used as a reference, the coordinates of the trunk model in the real trunk model are adjusted so that the X-axis faces up, and the trunk model in the real trunk model is placed in the center. By clicking the update in the Generate New Pivot Points component, the first sub-vegetation model obtained by splitting is selected, the mesh is checked, and the trunk model in the real trunk model, such as the trunk of a tree, is selected. Then, by clicking the button of the Generate New Pivot Points component, the calculation starts to obtain the target points of the first sub-vegetation model obtained by splitting.
[0087] As an alternative implementation, on the target vegetation model, generating a first target texture map based on the attachment information and the target points of each first sub-vegetation model includes: adjusting the position information of the real trunk model according to the target coordinate axis, where the target coordinate axis is one of the coordinate axes in the target coordinate system of the game scene; on the target vegetation model including the adjusted real trunk model, generating a first target texture map based on the attachment information and the target points of each first sub-vegetation model.
[0088] In this embodiment, the position information of the real backbone model is adjusted according to one coordinate axis in the target coordinate system of the game scene. On the target vegetation model of the adjusted real backbone model, a first target texture map is generated based on the attachment information and the target points of each first sub-vegetation model.
[0089] Optionally, after obtaining the target points of each first sub-vegetation model, check the coordinate system of the target vegetation model as the local mode (Local), and then check the target points of each obtained first sub-vegetation model. The target vegetation model can be adjusted by adjusting the target points. Adjust the backbone model coordinates of the real backbone model so that the X-axis is upward. The direction pointed by the positive direction of the X-axis can be the direction of the leaves or rhizomes, and the orientation of the tree trunk. On the target vegetation model of the adjusted real backbone model, a first target texture map is generated based on the attachment information and the target points of each first sub-vegetation model.
[0090] As an alternative implementation, generating a first target texture map on the target vegetation model based on the attachment information and the target points of each first sub-vegetation model includes: when the target vegetation model includes a reference backbone model, delete the reference backbone vegetation model from the target vegetation model, and on the target vegetation model after deleting the reference backbone vegetation model, generate a first target texture map based on the attachment information and the target points of each first sub-vegetation model, where the reference backbone model is the backbone model created for the target vegetation model.
[0091] In this embodiment, for a model without a backbone, the reference backbone model set in the target vegetation model can be used to establish the hierarchical relationship in the target vegetation model, obtain the target points of the target vegetation model, and the set reference backbone model can be deleted. Perform a select-all model operation on the target vegetation model with the hierarchical relationship established, click on the component that processes the hierarchy of the selected objects, and generate the first target texture map based on the attachment information and the target points of each first sub-vegetation model, where the reference backbone model is the backbone model created for the target vegetation model, and can also be called the backbone box model.
[0092] As an alternative implementation, determining the target points of each first sub-vegetation model includes: generating the target points of each first sub-vegetation model based on the reference backbone model.
[0093] In this embodiment, directly use the reference main trunk model of the target vegetation model set according to the actual situation as a reference. Adjust the coordinates of the set reference main trunk model so that the X-axis faces upward, place the set reference main trunk model in the middle, click the upgrade button in the newly generated pivot point component, select the first sub-vegetation model obtained by splitting, check the mesh option to select the set reference main trunk model, and click the button of the newly generated pivot point component to start the calculation to obtain the target points of the first sub-vegetation model obtained by splitting.
[0094] As an alternative implementation, create the polygons located in the target vegetation model as the reference main trunk model.
[0095] In this embodiment, the reference main trunk model, as a reference object, should be placed in the middle and at the same time converted into an editable polygon.
[0096] Optionally, in response to the target vegetation model including a real main trunk model, directly use the main trunk of the real main trunk model as a reference, adjust the coordinates of the real main trunk model so that the X-axis faces, set the target point coordinates to zero. At the same time, convert the reference main trunk model into an editable polygon, so that plugins can be used to select and process the reference main trunk model.
[0097] As an alternative implementation, at least one second sub-vegetation model includes the root model and the real main trunk model of the target vegetation model, the first sub-vegetation model includes the branch and leaf model of the target vegetation model, and the attachment information is used to represent that the branch and leaf model attaches to the real main trunk model, and the real main trunk model attaches to the root model.
[0098] In this embodiment, the second sub-vegetation model includes the root model, the real main trunk model, and the branch and leaf model of the target vegetation model. The root model and the real main trunk model are in a static state, and the branch and leaf model is in a dynamic state. Among them, the real main trunk model attaches to the root model, and the branch and leaf model attaches to the real main trunk model, that is, the leaves are bound to the branches, and all branches are bound to the main trunk.
[0099] Optionally, use the select and link tool to bind the branch and leaf model to the real main trunk model and the real main trunk model to the root model.
[0100] As an alternative implementation, import the first target texture map into the target engine to perform a rendering operation, including: import the first target texture map into the target engine and obtain the wind force parameters in the game scene to perform the rendering operation.
[0101] In this embodiment, the high dynamic range image (HDR) mode can be selected to set the engine picture reading information, so as to import the first target texture map into the target engine, create a self-material sphere from the specified main material, set the parameters of the material of the self-material sphere, obtain the wind force parameters in the game scene. For example, the first-layer wind force of the grass can be obtained, and other layers are turned off. Then, a rendering operation is performed on the first target texture map with the obtained wind force parameters, so as to achieve a natural wind force effect.
[0102] As an alternative implementation, in the target vegetation model, determine the third sub-vegetation model to interact with the virtual game character, where the third sub-vegetation model is obtained by splitting the target vegetation model; determine the color of the transparency channel of the vertices of the third sub-vegetation model; generate the second target texture map based on the color of the transparency channel of the vertices of the third sub-vegetation model; import the first target texture map into the target engine to perform a rendering operation, including: importing the second target texture map and the first target texture map into the target engine to perform a rendering operation.
[0103] In this embodiment, in the target vegetation model, determine the third sub-vegetation model obtained by splitting the target vegetation model to interact with the virtual game character; determine the color of the transparency channel of the vertices of the third sub-vegetation model; generate the second target texture map based on the color of the transparency channel of the vertices of the third sub-vegetation model; import the second target texture map and the first target texture map into the target engine to perform a rendering operation, where the third sub-vegetation model can be the leaves in the target vegetation model, and the second target texture map can be the third set of coordinate information texture map for rendering the third sub-vegetation model.
[0104] Optionally, drag the target vegetation model into the Top Draw (PivotPainter.ms) plug-in, enter the Select Painting Object (Per Object Painter) interface, select all parts that need to interact with the character, such as the third sub-vegetation model (leaves), enter a new group in the Create Selection Set on the interface, then upgrade in the Pick Your Object Selection Set, adjust the 3D multiplier (dist to pivmultiplier) to 1, check the Alpha channel, and then click Paint Current Selection to perform a calculation process on the selected third vegetation model to obtain the color of the transparency channel of the vertices of the third vegetation model. Generate the second target texture map based on the color of the transparency channel of the vertices of the third sub-vegetation model, import the second target texture map and the first target texture map into the target engine, and perform a rendering operation on the target vegetation model.
[0105] As an alternative implementation, when the target vegetation model includes at least two root models, adjust the axial parameters of the real trunk models corresponding to the at least two root models, where the axial parameters are used to determine the range of the area where the trunk models corresponding to the at least two root models interact with the virtual game character.
[0106] In this embodiment, for special types such as models with two roots, the axial parameters of the real trunk models corresponding to the at least two root models can be adjusted to determine the range of the area where the trunk models corresponding to the at least two root models interact with the virtual game character.
[0107] Optionally, for special types such as models with two roots, the main trunk can be separated into a single group, and then different axial parameters of the parameters can be adjusted to control the range. The black part is immovable and the white part is interactive. That is, for a model with two roots, click on the group to be moved, and the group to be moved is white, and the other non-moving group is black. Then, the moving range of the white group can be controlled by setting the abscissa parameter of the white group.
[0108] As an alternative implementation, in the local coordinate system of the game scene, verify whether the target points of each first sub-vegetation model are correct; generate the first target texture map of the target vegetation model based on the target points of each first sub-vegetation model, including: generating the first target texture map based on the correct target points.
[0109] In this embodiment, in the local coordinate system of the game scene, select the components in the local mode to verify the target points, and verify whether the target points of each first sub-vegetation model are correct; then generate the first target texture map of the target vegetation model based on the correct target points of each first sub-vegetation model.
[0110] Optionally, check the local mode to check whether the target points generated by each first sub-vegetation model are correct. If the anchor points of individual objects are automatically set incorrectly, the target points can be manually moved to a suitable position. When there are many trees in the first sub-vegetation model, the coordinates need to be at the root of a single component. Generate the first target texture map of the target vegetation model based on the correct target points of each first sub-vegetation model.
[0111] In this embodiment, at least one first sub-vegetation model is split from the target vegetation model; target points corresponding to each first sub-vegetation model are determined, where each first sub-vegetation model is in a moving state around the corresponding target point in the game scene; a first target texture map of the target vegetation model is generated based on the target points of each first sub-vegetation model; and the first target texture map is imported into the target engine to perform a rendering operation. That is to say, in the present invention, by splitting the target vegetation model, the first sub-vegetation model is obtained; the target points (anchor point information) of the first sub-vegetation model are set, so that the first sub-vegetation model moves around the target point, thereby rendering natural and dynamic interactive plants, thus achieving the technical effect of improving the efficiency of realizing the dynamic effect of the vegetation model and solving the technical problem of low efficiency in realizing the dynamic effect of the vegetation model.
[0112] The technical solutions of the embodiments of the present invention will be further introduced by way of example in combination with the preferred embodiments below.
[0113] Naturally dynamic and interactive plants have always been a difficult point in the performance of art effects. In the process of developing realistic games, naturally dynamic plants are resources with a large quantity and occupied area in the map, and are crucial to the art effect. There are several problems with traditional model plants: static plant models have no dynamic and interactive performance, and are not vivid and realistic enough; binding bone actions by traditional methods requires a large amount of production time and can only produce loop actions, which is not realistic enough.
[0114] Figure 3 It is a schematic diagram of making plants in related technologies. As Figure 3 shown, currently, plants in games are basically made using static models. Sometimes, in order to achieve the wind blowing effect of plants, two methods are used. One is to achieve the swinging effect of plants by binding bone animations, and the other is to use material distortion to achieve regular fluctuations of plants.
[0115] However, the traditional production methods have many defects. Using static plant models for scene natural environment editing will make the scene look less realistic, and the player interactivity will be greatly weakened. If the bone method is used to bind animations to achieve the swinging effect of plants, on the one hand, animations need to be made for each plant model, and the workload will be very large, and there are also relatively large limitations in terms of actions, and 360-degree natural interaction cannot be achieved. Using material distortion to achieve regular fluctuations of plants can only achieve mechanical swinging, without interactivity and the swinging method is not natural enough.
[0116] Therefore, in order to make the vegetation model natural and vivid, shrubs and grasses can present their states in the natural environment and swing with the wind and interact with players in a credible manner. The present invention proposes a solution for implementing natural dynamic interactive plants. By calculating the vertex information and normal orientation of the plant model, splitting the model to set the plant anchor information, setting the hierarchical relationship, and establishing the hierarchical relationship layer by layer according to the hierarchy of the main trunk < branches = roots < leaves, calculating the vertex transparency channel and the target texture map, natural wind effects and interactive effects can be achieved in the engine, so that when the wind blows the branches, roots, and leaves of the plants in the natural state, they have different degrees of swinging effects, thus ensuring the natural plant state where the roots and main trunks do not move when the plants swing and interact with the wind, and the branches and leaves swing and interact, etc., and being able to distinguish the branches, roots, and directions, enabling the plants to interact with the characters naturally.
[0117] Next, a further introduction is made to the implementation method of the natural dynamic interactive plants provided by the present invention.
[0118] First, import the model and calculate the top and bottom information. Figure 4 It is a schematic diagram of importing a model according to one embodiment of the present invention. As Figure 4 shown, open the model in the 3D modeling and rendering software (3dsmax), delete the level of detail (lod), zero the model coordinate points (reset Xform), and then reset the model information, which may include:
[0119] One, import the model. Figure 5 It is a schematic diagram of dragging the model into the plug-in according to one embodiment of the present invention. As Figure 5 shown, drag the plug-in (PivotPainter2.ms) of the 3D computer graphics software, store the model hub and rotation information in the model vertex data to create a 3D model. After dragging the model into the plug-in, set the parameters of the target point position (pivotposition), the three primary colors of the material (TEXURE RGB), and the transparency channel (ALPHA).
[0120] Two, split the model. Figure 6 It is a schematic diagram of selecting the splitting tool according to one embodiment of the present invention. As Figure 6 shown, select the model, split the model, check the Preserve CustomNormals(Slow), and click the Detach Selected Model's Elements tool to split the model. Generally, a simple model will be split quickly. The parts that do not require dynamics should be separated during model production, that is, first split them and then manually merge the parts that need to be combined. They can be merged into a whole model. For example, Figure 7It is a schematic diagram of selecting and splitting an object according to one embodiment of the present invention. As Figure 7 shown, the roots at the upper part of the cactus below should be movable, so it is necessary to split it out;
[0121] Optionally, there are different requirements for plants without a main trunk and those with a main trunk. Figure 8(a) is a schematic diagram of a method for processing an object without a main trunk according to one embodiment of the present invention. As shown in Figure 8(a), for a plant without a main trunk, it is necessary to create a new main trunk as a reference object, create a box and set it to zero. Figure 8(b) is a schematic diagram of a method for processing an object with a main trunk according to one embodiment of the present invention. As shown in Figure 8(b), for a plant with a main trunk, the main trunk can be directly used as a reference. The model of the main trunk needs to be oriented in the direction of the model's orientation along the X-axis, that is, adjust the coordinates of the main trunk model so that the X-axis points upward. It should be noted that the reference object must be placed in the very middle, the coordinate points should be set to zero, and it should be converted into an editable polygon, otherwise it cannot be selected using the plug-in;
[0122] Third, generate model anchor points. Figure 9(a) is a schematic diagram of creating a selection set according to one embodiment of the present invention. As shown in Figure 9(a), select all the components that need to be dynamic after splitting, and enter a custom group name in the Create selection set above. Figure 9(b) is a schematic diagram of generating a pivot point according to one embodiment of the present invention. As shown in Figure 9(b), click Update in the newly generated pivot point component, and the group just split will appear. Then select the name of the group that just appeared in the selection set list, check the Mesh option, select the main trunk box model just created, or directly select the main trunk model. For example, for the trunk of a tree, click the button to create an anchor point and start the calculation to generate the pivot point of the target model. During the calculation process, the larger the number of models, the slower it will be. Wait for the calculation and do not operate randomly;
[0123] Fourth, adjust the coordinate orientation. Figure 10(a) is a schematic diagram of a coordinate orientation selection interface according to one embodiment of the present invention. As shown in Figure 10(a), check the coordinate system of the object as the Local mode. Generally, the anchor point of the object has been set. Select the Local mode. Figure 10(b) is a schematic diagram of an anchor point display interface according to one embodiment of the present invention. As shown in Figure 10(b), check whether the generated anchor points are correct. Figure 11 It is a schematic diagram of an anchor point setting interface according to one embodiment of the present invention. As Figure 11 shown, the direction pointed by the positive X-axis is the direction of the leaves or rhizomes, and the orientation of the tree trunk. If the anchor points of individual objects are automatically set incorrectly, it is necessary to manually move the anchor points to a suitable position. Generally, there are many trees, and the coordinates need to be at the root of a single component.
[0124] Optionally, for leaves with large patch intersections, Figure 11 is a schematic diagram of another anchor point setting interface according to one embodiment of the present invention, as Figure 11 shown. For leaves with large patch intersections, anchor points need to be set. The wind force of the system is completely the movement of the model itself around the anchor points. Setting the anchor points determines the model effect. For relatively scattered branches, they can be directly attached to the main trunk to form a single module;
[0125] V. Set the hierarchical relationship. Fig. 12(a) is a schematic diagram of a hierarchical relationship setting interface according to one embodiment of the present invention. As shown in Fig. 12(a), select and connect components, and establish a hierarchical relationship layer by layer according to the hierarchy of main trunk < branches = roots < leaves using select and link. Fig. 12(b) is a schematic diagram of a hierarchical relationship interface according to one embodiment of the present invention. As shown in Fig. 12(b), bind the leaves to the model, bind a cluster of leaves to the branches, and bind all branches to the main trunk. Figure 13 is a schematic diagram of the skeletal connection of the hierarchical relationship according to one embodiment of the present invention, as Figure 13 shown. Finally, a skeletal connection diagram of the main trunk, branches, and leaves is obtained. Moving the main trunk can drag the entire tree. Figure 14 is a schematic diagram of a flower attached to the stem and leaves according to one embodiment of the present invention, as Figure 14 shown. The flowers in the box are relatively scattered. The relatively scattered flowers can be directly attached to the branches.
[0126] VI. Output coordinate information texture maps. There are different requirements for plants with and without a main trunk. Figure 15 is a schematic diagram of a model selection without a main trunk according to one embodiment of the present invention, as Figure 15 shown. For models without a main trunk, first delete the previous main trunk box, and then select the entire model; for models with a main trunk, directly select the main trunk model.
[0127] Optionally, select the option to process the hierarchy of the selected object, and select the folder directory where the generation is required. Figure 16 is a schematic diagram for realizing a dynamic effect texture map according to one embodiment of the present invention, as Figure 16 shown. After that, two generated pictures will be seen, which are used to realize the dynamic effect of the wind blowing.
[0128] Figure 17 is a schematic diagram of a coordinate texture map according to one embodiment of the present invention, as Figure 17 shown. The model should have set the second set of coordinate texture maps at this time, which are used to render and display the dynamic effect of the plant, and are generally square-distributed and within the UV frame.
[0129] VII. Calculate the transparent channel color of the vertices and the third set of UVs. The third set of UVs is used to render and display the plant interaction effects. Figure 18 FIG. Figure 18 is a schematic diagram of calculating the vertex transparent channel according to one embodiment of the present invention. As Figure 18 shown, drag the vegetation model into the top drawing plug-in, enter the drawing object selection interface, select all parts that need to interact with the character, such as leaves, enter a new group in the creation selection set on the interface, and then upgrade in the selection processing object set. Adjust the 3D multiplier to 1, check the transparent channel, and select all parts that need to interact with the character, so as to obtain the transparent channel color of the vertices. Figure 19 FIG. Figure 19 is a schematic diagram of the vertex transparent channel color according to one embodiment of the present invention. As Figure 19 shown, after calculation, the transparent channel color is obtained, and the information can also be confirmed by checking the color.
[0130] At the same time, the third set of UVs of the model has been set at this time. Figure 20 FIG. Figure 20 is a schematic diagram of another coordinate mapping according to one embodiment of the present invention. As Figure 20 shown, the third set of UVs is distributed outside the UV frame in a square shape.
[0131] For special types of models with two roots, FIG. 21(a) is a schematic diagram of an interface for adjusting coordinate mapping settings according to one embodiment of the present invention. As shown in FIG. 21(a), the main trunk can be separated into a separate group, and then the different axial parameters of the parameters can be adjusted to control the range. FIG. 21(b) is a schematic diagram of adjusting coordinate mapping according to one embodiment of the present invention. As shown in FIG. 21(b), black means immovable and white means interactive. That is, for a model with two roots, click on the group to be moved, then the group to be moved is white, and the other non-moving group is black. Then, the moving range of the white group can be controlled by setting the abscissa parameter of the white group.
[0132] VIII. Import into the engine. Import the model into the general model format (FBX format), select vertex color replacement (replace in vertex color) in combine mesh, and at the same time, remove the automatic collision. Figure 22 FIG. Figure 22 is a schematic diagram of importing a texture map according to one embodiment of the present invention. As Figure 22 shown, select the high-definition mode and import the texture map to set the engine picture reading information.
[0133] Figure 23 FIG. Figure 23 is a schematic diagram of creating a material sphere according to one embodiment of the present invention. As Figure 23 shown, select a suitable material in the engine according to the project requirements, and specify the main material to create a self-material sphere. Figure 24It is a schematic diagram of endowing a material according to one embodiment of the present invention. As Figure 24 shown, assign the texture map exported in the previous step to the set material. Figure 25(a) is a schematic diagram of selecting a texture map according to one embodiment of the present invention. As shown in Figure 25(a), select the texture map to be operated. Figure 25(b) is a schematic diagram of setting various material parameters according to one embodiment of the present invention. As shown in Figure 25(b), select the texture map to be operated and set the material parameters of the texture map to be operated according to the design situation. Figure 26 It is a schematic diagram of setting a wind force parameter according to one embodiment of the present invention. As Figure 26 shown, generally only set the first layer of wind force for grass, and close the other layers.
[0134] Nine, render the picture. Figure 27 It is a schematic diagram of a natural dynamic effect according to one embodiment of the present invention. As Figure 27 shown, obtain a target model with natural wind force effect and interaction effect.
[0135] The present invention calculates the vertex information and normal direction of the plant model, performs model splitting, sets the plant anchor point information and hierarchical relationship, establishes the hierarchical relationship layer by layer according to the hierarchy of main trunk < branches = roots < leaves, calculates the alpha channel and mesh texture map of the vertices, sets the material, assigns the set material to the mesh texture map, and sets the material parameters, thereby obtaining a natural dynamic interactive plant, and further achieving the technical effect of realizing natural wind force effect and interaction effect in the engine, and solving the technical problem that natural wind force effect and interaction effect cannot be realized in the engine.
[0136] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present invention.
[0137] The embodiment of the present invention also provides an information processing device, which is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used below, the term "unit" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0138] Figure 28 is a structural block diagram of an information processing device according to an embodiment of the present invention. As Figure 28 shown, the information processing device 280 may include: a splitting unit 281, a determining unit 282, a generating unit 283, and an importing unit 284.
[0139] The splitting unit 281 is configured to split at least one first sub-vegetation model from the target vegetation model.
[0140] The determining unit 282 is configured to determine a target point corresponding to each first sub-vegetation model, wherein each first sub-vegetation model is in a moving state around the corresponding target point in the game scene.
[0141] The generating unit 283 is configured to generate a first target texture map of the target vegetation model based on the target points of each first sub-vegetation model.
[0142] The importing unit 284 is configured to import the first target texture map into the target engine to perform a rendering operation.
[0143] In the information processing device of this embodiment, the present invention uses the splitting unit to split at least one first sub-vegetation model from the target vegetation model; uses the determining unit to determine the target point corresponding to each first sub-vegetation model, wherein each first sub-vegetation model is in a moving state around the corresponding target point in the game scene; uses the generating unit to generate a first target texture map of the target vegetation model based on the target points of each first sub-vegetation model; and uses the importing unit to import the first target texture map into the target engine to perform a rendering operation. That is to say, the present invention splits the target vegetation model to obtain the first sub-vegetation model; sets the target points (anchor point information) of the first sub-vegetation models, so that the first sub-vegetation models move around the target points, in order to render natural and dynamic interactive plants, thereby achieving the technical effect of improving the efficiency of realizing the dynamic effect of the vegetation model, and solving the technical problem of low efficiency in realizing the dynamic effect of the vegetation model.
[0144] It should be noted that the above-mentioned various units can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to this: the above-mentioned units are all located in the same processor; or, the above-mentioned various units are separately located in different processors in any combination form.
[0145] An embodiment of the present invention also provides a non-volatile storage medium, in which a computer program is stored, wherein the computer program is configured to execute the data processing method of the embodiment of the present invention when being run by a processor.
[0146] Optionally, in this embodiment, the non-volatile storage medium may be configured to store a computer program for performing the following steps:
[0147] S1. Split at least one first sub-vegetation model from the target vegetation model;
[0148] S2. Determine the target point corresponding to each first sub-vegetation model, where each first sub-vegetation model is in a moving state around the corresponding target point in the game scene;
[0149] S3. Generate a first target texture map of the target vegetation model based on the target points of each first sub-vegetation model;
[0150] S4. Import the first target texture map into the target engine to perform a rendering operation.
[0151] Optionally, in this embodiment, the non-volatile storage medium may include but is not limited to: various media such as USB flash drives, read-only memories (ROM), random access memories (RAM), external hard drives, magnetic disks, or optical discs that can store computer programs.
[0152] An embodiment of the present invention further provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0153] Optionally, the above electronic device may further include a transmission device and an input / output device, where the transmission device is connected to the above processor, and the input / output device is connected to the above processor.
[0154] Optionally, in this embodiment, the above processor may be configured to execute the following steps through the computer program:
[0155] S1. Split at least one first sub-vegetation model from the target vegetation model;
[0156] S2. Determine the target point corresponding to each first sub-vegetation model, where each first sub-vegetation model is in a moving state around the corresponding target point in the game scene;
[0157] S3. Generate a first target texture map of the target vegetation model based on the target points of each first sub-vegetation model;
[0158] S4. Import the first target texture map into the target engine to perform a rendering operation.
[0159] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and alternative embodiments, and will not be elaborated herein.
[0160] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0161] In the above embodiments of the present invention, the descriptions of the respective embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0162] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are merely illustrative. For example, the division of the units can be a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the units or modules can be in electrical or other forms.
[0163] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0164] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0165] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs that can store program codes.
[0166] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. An information processing method, characterized in that, Including: Splitting at least one first sub-vegetation model from the target vegetation model, where the target vegetation model includes: at least one of the first sub-vegetation models and at least one second sub-vegetation model, and each of the second sub-vegetation models is in a static state in the game scene; Determining a target point corresponding to each of the first sub-vegetation models, where each of the first sub-vegetation models is in a moving state around the corresponding target point in the game scene; Generating a first target texture map of the target vegetation model based on the target points and attachment information of each of the first sub-vegetation models, where the attachment information is used to represent the attachment relationship between the at least one first sub-vegetation model and the at least one second sub-vegetation model; Importing the first target texture map into a target engine to perform a rendering operation.
2. The method according to claim 1, characterized in that, The method further includes: Splitting at least one of the second sub-vegetation models from the target vegetation model; Obtaining the attachment information between the at least one first sub-vegetation model and the at least one second sub-vegetation model.
3. The method according to claim 2, wherein Generating the first target texture map of the target vegetation model based on the target points and the attachment information of each of the first sub-vegetation models includes: When the target vegetation model includes a real trunk model, generating the first target texture map on the target vegetation model based on the attachment information and the target points of each of the first sub-vegetation models.
4. The method according to claim 3, characterized in that, Determining the target points of each of the first sub-vegetation models includes: Generating the target points of each of the first sub-vegetation models based on the real trunk model.
5. The method according to claim 3, characterized in that, Generating the first target texture map of the target vegetation model based on the target points and the attachment information of each of the first sub-vegetation models includes: Adjusting the position information of the real trunk model according to a target coordinate axis, where the target coordinate axis is one of the coordinate axes in the target coordinate system of the game scene; Generating the first target texture map on the target vegetation model including the adjusted real trunk model based on the attachment information and the target points of each of the first sub-vegetation models.
6. The method according to claim 2, wherein Generating the first target texture map of the target vegetation model based on the target points and the attachment information of each of the first sub-vegetation models includes: When the target vegetation model includes a reference trunk model, deleting the reference trunk model from the target vegetation model, and generating the first target texture map on the target vegetation model after deleting the reference trunk model based on the attachment information and the target points of each of the first sub-vegetation models, where the reference trunk model is a trunk model created for the target vegetation model.
7. The method according to claim 6, characterized in that, Determining the target points of each of the first sub-vegetation models includes: generating the target points of each of the first sub-vegetation models based on the reference trunk model.
8. The method according to claim 6, characterized in that, The method further includes: Creating a polygon located in the target vegetation model as the reference trunk model.
9. The method according to claim 2, characterized in that, The at least one second sub-vegetation model includes a root model and a real trunk model of the target vegetation model, the first sub-vegetation model includes a foliage model of the target vegetation model, and the attachment information is used to represent that the foliage model is attached to the real trunk model, and the real trunk model is attached to the root model.
10. The method according to any one of claims 1 to 9, characterized in that, Importing the first target texture map into a target engine to perform a rendering operation includes: Importing the first target texture map into the target engine and obtaining a wind force parameter in the game scene to perform a rendering operation.
11. The method according to any one of claims 1 to 9, characterized in that The method further includes: in the target vegetation model, determining a third sub-vegetation model to interact with a virtual game character, wherein the third sub-vegetation model is obtained by splitting the target vegetation model; Determining a color of a transparency channel of vertices of the third sub-vegetation model; generating a second target texture map based on the color of the transparency channel of the vertices of the third sub-vegetation model; Importing the first target texture map into the target engine to perform a rendering operation includes: importing the second target texture map and the first target texture map into the target engine to perform a rendering operation.
12. The method according to any one of claims 1 to 9, characterized in that, The method further includes: When the target vegetation model includes at least two root models, adjusting axial parameters of real trunk models corresponding to the at least two root models, wherein the axial parameters are used to determine a range of an area where the trunk models corresponding to the at least two root models interact with the virtual game character.
13. The method according to any one of claims 1 to 9, characterized in that The method further includes: Verifying whether target points of each of the first sub-vegetation models are correct in a local coordinate system of the game scene; Generating the first target texture map of the target vegetation model based on the target points of each of the first sub-vegetation models includes: generating the first target texture map based on the correct target points.
14. An information processing apparatus, characterized in that, Includes: A splitting unit, configured to split at least one first sub-vegetation model from a target vegetation model, wherein the target vegetation model includes: at least one of the first sub-vegetation models and at least one second sub-vegetation model, and each of the second sub-vegetation models is in a stationary state in the game scene; A determining unit, configured to determine target points corresponding to each of the first sub-vegetation models, wherein each of the first sub-vegetation models is in a moving state around the corresponding target point in the game scene; A generating unit, configured to generate a first target texture map of the target vegetation model based on the target points of each of the first sub-vegetation models and attachment information, wherein the attachment information is used to represent an attachment relationship between the at least one first sub-vegetation model and the at least one second sub-vegetation model; An importing unit, configured to import the first target texture map into a target engine to perform a rendering operation.
15. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, wherein the computer program is configured to execute the method according to any one of claims 1 to 13 when being run by a processor.
16. An electronic device, comprising a memory and a processor, characterized in that, A computer program is stored in the memory, and the processor is configured to run the computer program to execute the method described in any one of claims 1 to 13.
Citation Information
Patent Citations
Collaborative rendering method for virtual reality
CN107274469A