CN112767522A - Virtual object wind animation rendering method and device, storage medium and electronic device - Google Patents

Virtual object wind animation rendering method and device, storage medium and electronic device Download PDF

Info

Publication number
CN112767522A
CN112767522A CN202110166379.3A CN202110166379A CN112767522A CN 112767522 A CN112767522 A CN 112767522A CN 202110166379 A CN202110166379 A CN 202110166379A CN 112767522 A CN112767522 A CN 112767522A
Authority
CN
China
Prior art keywords
data
virtual object
wind
virtual
abstract model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110166379.3A
Other languages
Chinese (zh)
Inventor
王斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Perfect World Network Technology Co Ltd
Original Assignee
Chengdu Perfect World Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Perfect World Network Technology Co Ltd filed Critical Chengdu Perfect World Network Technology Co Ltd
Priority to CN202110166379.3A priority Critical patent/CN112767522A/en
Publication of CN112767522A publication Critical patent/CN112767522A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • G06T13/603D [Three Dimensional] animation of natural phenomena, e.g. rain, snow, water or plants
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/006Mixed reality

Landscapes

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

Abstract

The application provides a rendering method and device of virtual object wind animation, a storage medium and an electronic device, relates to the technical field of computers, and is used for solving the problem that the rendering effect of accurate and vivid virtual wind animation cannot be met. The method comprises the following steps: acquiring wind field data of a virtual object in a virtual scene, wherein the wind field data is a first position offset value of a vertex of an abstract model of the virtual object after a wind field map of a wind field collides with the abstract model of the virtual object, and the wind field data of the virtual object in the virtual scene is stored in the vertex of the abstract model of the virtual object and comprises axis point data and gradient data; acquiring material data of a virtual object, wherein the material data of the virtual object is used for describing a second position offset value interval of an abstract model vertex of the virtual object; and comparing the first position offset value interval with the second position offset value interval, determining a third position offset value of the top point of the abstract model of the virtual object, and generating the wind animation.

Description

Virtual object wind animation rendering method and device, storage medium and electronic device
The application requires a divisional application of a chinese patent application entitled "rendering method and apparatus for virtual object wind animation, storage medium, and electronic apparatus" filed by the chinese patent office on 27/11/2020 and having an application number of 2020113568691.
Technical Field
The application relates to the technical field of computers, in particular to a rendering method and device of virtual object wind animation, a storage medium and an electronic device.
Background
With the development of computer graphics in the related art, people pursue higher and higher image fidelity. More and more real images can be described by using imaging technology, wherein the method of normal mapping can improve the fidelity of three-dimensional image description.
In the related art, model data for dynamic special effects such as wind animation and the like in games are generally manually specified in a 3D modeling tool through art, art workers manually specify the position of a rotating axis of each leaf and trunk through 3DsMax software, and after the model wind data are generated, the wind field data are generally realized through a noise function or a translation animation of a single noise map, for example, an environment wind field is realized through the noise function by a wind carrying system of an illusion engine.
However, when a static map is manually created, for each plant of a wind animation, an artist needs to specify relevant data of each group of leaves and branches, the data generally includes a spatial position of an axis point, a leaf gradient and a trunk gradient, for a plant with different complexity, tens of groups of leaves and branches are possible, and because each plant has different forms and is difficult to render the wind animation without a complex algorithm and highly-configured hardware, the wind animation is created by directly using a method manually specified by the art, the wind animation is played through multiple frames of continuous pictures, and once an original plant model is changed (such as adding or deleting leaves or changing positions of characters), all wind data are re-created, so that an iteration period and labor cost are increased, and an accurate and vivid rendering effect of the virtual wind animation cannot be satisfied.
In view of the above problems in the related art, no effective solution has been found at present.
Disclosure of Invention
The embodiment of the application provides a rendering method and device of virtual object wind animation, a storage medium and an electronic device, which are used for solving the problem that the accurate and vivid rendering effect of the virtual wind animation cannot be met.
According to an embodiment of the application, a rendering method of a virtual object wind animation is provided, and comprises the following steps:
acquiring wind field data of a virtual object in a virtual scene, wherein the wind field data of the virtual object in the virtual scene is a first position offset value of a vertex of an abstract model of the virtual object after a wind field map of a wind field collides with the abstract model of the virtual object, and the wind field data of the virtual object in the virtual scene is stored in the vertex of the abstract model of the virtual object and comprises axis point data and gradient data;
acquiring material data of a virtual object, wherein the material data of the virtual object is used for describing a second position offset value interval of the top point of an abstract model of the virtual object, and the material data is stored in the top point of the abstract model of the virtual object;
and comparing the first position offset value interval and the second position offset value interval of the abstract model vertex of the virtual object, determining a third position offset value of the abstract model vertex of the virtual object, and generating a pneumatic drawing of the virtual object in a virtual scene.
According to another embodiment of the present application, there is provided a rendering apparatus of a virtual object wind animation, including:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring wind field data of a virtual object in a virtual scene, the wind field data of the virtual object in the virtual scene is a first position offset value of a vertex of an abstract model of the virtual object after a wind field map of a wind field collides with the abstract model of the virtual object, and the wind field data of the virtual object in the virtual scene is stored in the vertex of the abstract model of the virtual object and comprises axial point data and gradient data;
a second obtaining module, configured to obtain material data of a virtual object, where the material data of the virtual object is used to describe a second position offset value interval of a vertex of an abstract model of the virtual object, and the material data is stored in the vertex of the abstract model of the virtual object;
and the generating module is used for comparing the first position offset value and the second position offset value interval of the abstract model vertex of the virtual object, determining a third position offset value of the abstract model vertex of the virtual object, and generating a pneumatic picture of the virtual object in a virtual scene.
According to still another aspect of the present application, a storage medium is provided, and the storage medium stores at least one executable instruction, which causes a processor to perform operations corresponding to the rendering method of the virtual object wind animation.
According to still another aspect of the present application, there is provided a terminal including: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the rendering method of the virtual object wind animation.
By means of the technical scheme, the technical scheme provided by the embodiment of the application at least has the following advantages:
the application provides a rendering method and device of a virtual object wind animation, a storage medium and an electronic device, wherein the method comprises the steps of obtaining wind field data with axis point data and gradient data as data structures, wherein the wind field data is stored in an abstract model vertex in a virtual scene, the wind field data is a first position offset value of the abstract model vertex after a wind field chartlet of a wind field collides with an abstract model of the virtual object, obtaining material data of a second position offset value interval of the abstract model vertex of the virtual object, comparing the first position offset value with the second position offset value interval, determining a third position offset value of the abstract model vertex of the virtual object, generating the wind animation of the virtual object in the virtual scene, greatly reducing the processing complexity of generating the wind animation of different virtual objects, and being capable of being repeatedly applied to various different virtual objects, the method avoids a large amount of manpower processing cost and data processing complexity, and enables the pneumatic painting effect generated by rendering to be matched with the real pneumatic effect, so that the accurate and vivid rendering effect of the virtual wind animation is realized.
Drawings
FIG. 1 is a block diagram of a hardware structure of a screenshot computer according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of rendering a virtual object wind animation according to an embodiment of the application;
FIG. 3 is an effect diagram of rendering a wind animation on a garment according to an embodiment of the application;
FIG. 4 is a schematic diagram of rendering a wind animation through a wind field according to an embodiment of the application;
fig. 5 is a block diagram of a rendering apparatus for a virtual object wind animation according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method embodiment provided by one embodiment of the application can be executed in a mobile phone, a tablet, a computer or a similar electronic terminal. Taking an example of the present invention running on a computer, fig. 1 is a block diagram of a hardware structure of a wind rendering computer according to an embodiment of the present invention. As shown in fig. 1, computer 10 may include one or more (only one shown in fig. 1) processors 102 (processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally may also include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those of ordinary skill in the art that the configuration shown in FIG. 1 is illustrative only and is not intended to limit the configuration of the computer described above. For example, computer 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program and a module of an application software, such as a computer program corresponding to a method for rendering wind in the embodiment of the present application, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 104 may further include memory located remotely from processor 102, which may be connected to computer 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. In the present embodiment, the processor 104 is configured to control the target virtual character to perform a specified operation to complete the game task in response to the human-machine interaction instruction and the game policy. The memory 104 is used for storing program scripts of the electronic game, configuration information, attribute information of the virtual character, and the like.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of such networks may include wireless networks provided by the communications provider of computer 10. In one example, the transmission device 106 includes a Network adapter (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 in a wireless manner.
Optionally, the input/output device 108 further includes a human-computer interaction screen for acquiring a human-computer interaction instruction through a human-computer interaction interface and for presenting a game picture in a game task;
in this embodiment, a method for rendering an object wind animation is provided, and fig. 2 is a flowchart of a method for rendering an object wind animation according to an embodiment of the present application, and as shown in fig. 2, the flowchart includes the following steps:
201. and acquiring wind field data of the virtual object in the virtual scene.
The wind field data of the virtual object in the virtual scene is a first position offset value of a vertex of an abstract model of the virtual object after a wind field map of a wind field collides with the abstract model of the virtual object, and the wind field data of the virtual object in the virtual scene is stored in the vertex of the abstract model of the virtual object and comprises axis point data and gradient data. Specifically, the virtual scene may be a scene in a virtual game, or a scene in a cartoon video, or other resources that need to produce real-time or baked picture data, the wind field is resource data of simulated real wind that needs to be baked in the virtual scene, and in the virtual scene, the effect of a pneumatic picture is generated in animation through wind field chartlet baking. In addition, the virtual object includes, but is not limited to, a plant, a pendant, and a character accessory in a virtual scene, and when the virtual object is baked in an animation, the motion of the virtual object is created and adjusted by an abstract model of the virtual object, and animation content is generated by a game engine. In the embodiment of the application, a data structure with axis point data and gradient data is constructed in a vertex of an abstract model of a virtual object, so that a first position offset value generated after a wind field map collides with the abstract model of the virtual object is stored in the vertex by the data structure of the axis point data and the gradient data, and wind field data of the virtual object in a virtual scene is formed. The abstract model of the virtual object is a model for making different animation forms and colors in the game engine, for example, the abstract model of the character is displayed as a character model of the character in the virtual animation, the top point of the abstract model of the virtual object is a data unit for forming the colors, shapes and effects of the abstract model, the finished abstract model is formed, and various data for forming the abstract model are stored.
Since the wind maps of the wind farm constructed by the game engine have different wind directions and wind speeds, when the wind farm map collides with the abstract model of the virtual object, the pivot point data and the gradient data at each vertex of the abstract model of the virtual object are displaced, and the first displacement value is obtained as the magnitude of the displacement of the pivot point data and the gradient data corresponding to the different directions, thereby rendering animation of the virtual object in accordance with the wind swing effect, such as animation of a grass wind, animation of a flag wind, animation of a player character clothes wind, and the like.
202. And acquiring the material data of the virtual object.
The material data of the virtual object are used for describing a second position offset value interval of the top point of the abstract model of the virtual object, the material data are stored in the top point of the abstract model of the virtual object, and specific to the material data, the material data can be used for representing a pneumatic effect of the virtual object in a virtual scene under the impact of a wind field patch, so that the pneumatic drawing with different swing effects is operated on the virtual object by combining the wind direction and the wind speed of the wind field patch.
In the embodiment of the present application, a second position offset value interval is defined in a vertex of the abstract model for different virtual objects, and is used to limit a range in which the axis point data and the gradient data generate displacement, that is, the second position offset value interval is a maximum value and a minimum value for limiting the position offset of the axis point data and the gradient data in different directions, so as to achieve different pneumatic effects. For example, if the second position offset value section of the vertex 1 of the abstract model is large, it means that the vertex 1 is displaced greatly due to collision, and if the second position offset value section of the vertex 2 of the abstract model is small, it means that the vertex 2 is displaced slightly due to collision, so that the generated pneumatic effect is different.
203. And comparing the first position offset value interval and the second position offset value interval of the abstract model vertex of the virtual object, determining a third position offset value of the abstract model vertex of the virtual object, and generating a pneumatic drawing of the virtual object in a virtual scene.
And the third position offset value is the displacement of the abstract model of the virtual object actually impacted by the wind field map under the limitation of the material data, and the wind-driven picture of the virtual object is generated based on the displacement. In the embodiment of the application, when the virtual object is collided by the wind field map, the wind animation with the same real wind-driven effect is generated, and the first position offset value of the data structure with the axis point data and the gradient data is compared with the second position offset value interval of the material data representing the wind-driven influence degree, so that the offset range is limited, the third position offset value is obtained, and the vivid wind-driven effect is obtained. For example, if the first position offset value exceeds the second position offset value interval, which indicates that the offset is too large, the maximum displacement of the second position offset value interval may be used as the third position offset value; if the first position offset value does not exceed the second position offset value interval, indicating that the offset is proper, the first position offset value can be used as a third position offset value, and the wind animation with the same real wind effect is generated by rendering.
In one embodiment, in order to make the effect of the pneumatic painting of the virtual object generated by rendering consistent with the effect of the real wind blowing, in the process of game production, a data structure containing axis point data and gradient data is stored at the vertex of an abstract model configured by a game engine, wherein the axis point data comprises full-offset object axis point data and half-offset object axis point data, and the gradient data comprises full-offset object gradient data and half-offset object gradient data.
The virtual object may be a plant, a pendant, a character accessory, or the like, and further, a virtual object is divided into a full-offset object and a half-offset object, that is, the full-offset object is a part that can be collided by a wind field map and shifted as a whole in an abstract model of the virtual object, and the half-offset object is a part that can be collided by a wind field map and shifted as a part in an abstract model of the virtual object, for example, the virtual object is a plant, the full-offset object is a leaf, when blown by wind, the whole leaf can be shifted as a whole, the half-offset object is a trunk, when blown by wind, the root of the trunk is not shifted or shifted less, and the top of the trunk is shifted more. Specifically, the vertex of the abstract model stored in the virtual object includes axis point data and gradient data, and correspondingly, the axis point data is used to define coordinates of a reference point that is collided by the wind field map and is shifted, and includes full-shift axis point data and half-shift axis point data, and the gradient data is used to define a reference distance range that is collided by the wind field map and is shifted, and includes full-shift object gradient data and half-shift object gradient data.
In one embodiment, in order to enable different virtual objects to have the same pneumatic effect as objects in a real scene and reduce resource consumption of data processing of a game engine when rendering a wind animation, the acquiring wind field data of the virtual objects in the virtual scene includes: defining full offset object axis point data and half offset object axis point data, respectively, of an abstract model of the virtual object to be impacted by the wind farm map.
In the embodiment of the application, because the axis point data is used for limiting the coordinates of the reference points which are deviated due to the collision of the wind field maps, in order to enable a game engine to repeatedly perform automatic rendering of different wind field maps on the same virtual object and reduce the rendering complexity of wind animation, the axis point data of a full-deviation object and the axis point data of a half-deviation object of an abstract model of the virtual object are predefined before the rendering of the wind animation. The full-offset object axis point data is characterized as the position data with the minimum distance to the half-offset object, the half-offset object axis point data is characterized as the preset position corresponding to the material data in the second position offset value interval of the abstract model vertex used for describing the half-offset object, for example, the full-offset object is a leaf, the half-offset object is a trunk, the leaf axis point data of each leaf can be defined as the position point closest to the trunk in each vertex of the leaves, the trunk axis point data can be defined as the threshold position in the material data, such as the origin, so that the axis point of the trunk is fixed as one position point, which is not specifically limited in the embodiment of the application.
It should be noted that, in the embodiment of the present application, by removing a Branch (Branch) concept, for a plant, that is, a tree or a virtual object, only a leaf is used as a full-offset object, and a trunk is used as a half-offset object, so that a one-level hierarchical relationship can be introduced less, 3 floating point data can be saved at a vertex, and material data calculation is simpler, and the rendering of a pneumatic effect is not affected while the data calculation amount is reduced.
In one embodiment, in order to enable different virtual objects to have the same pneumatic effect as objects in a real scene and reduce resource consumption of data processing of a game engine when rendering a wind animation, the acquiring of the wind field data of the virtual objects in the virtual scene is performed before the acquiring of the wind field data of the virtual objects in the virtual scene, and the method further includes: full offset object gradient data and half offset object gradient data, respectively, defining an abstract model of the virtual object to be impacted by the wind field map.
In the embodiment of the application, since the gradient data is used for limiting the reference distance range of the deviation degree caused by the collision of the wind field maps, in order to enable the game engine to repeatedly perform automatic rendering of different wind field maps on the same virtual object and reduce the rendering complexity of wind animation, the gradient data of a full-deviation object and the gradient data of a half-deviation object of an abstract model of the virtual object are predefined before the rendering of the wind-driven painting. The gradient data of the full-offset object are characterized by being calculated according to the distance between at least two position data in an abstract model of the full-offset object and a preset maximum distance, the gradient data of the half-offset object are characterized by being calculated according to the distance between at least two position data in the abstract model of the half-offset object, the preset maximum distance is used for representing one of the maximum distance of all the full-offset objects and the maximum distance of a single full-offset object, and in the embodiment of the application, the preset maximum distance is selected in advance so as to realize pneumatic drawing with different effects. For example, the full-offset object is a leaf, the half-offset object is a trunk, the trunk gradient data may be defined as a numerical interval of 0 to 1, the numerical interval is obtained by dividing a distance from each vertex to an origin in the trunk abstract model by a maximum distance from a farthest vertex to the origin, the leaf gradient data may also be defined as a numerical interval of 0 to 1, and when the maximum distance from the farthest vertex to the origin is calculated, the maximum distance is set to be a maximum distance of all leaves or a maximum distance of a single leaf, which is not specifically limited in the embodiment of the present application.
In one embodiment, in order to enable different virtual objects to have the same pneumatic effect as objects in a real scene and reduce resource consumption of data processing of a game engine in the process of rendering a wind animation, the degree of deviation of the different virtual objects due to collision of wind field maps is defined and distinguished through material data, the material data stored in the vertexes of the abstract model of the virtual objects comprises full-deviation object material data and half-deviation object material data, and the acquiring of the wind field data of the virtual objects in the virtual scene comprises: the full-offset object material data and the half-offset object material data in each vertex are respectively configured to correspond to the maximum offset value and the shape warping parameter in the UV coordinate space.
For the embodiment of the present application, the abstract model based on the virtual object includes a structure of a full-offset object and a half-offset object, and in order to embody different pneumatic effects generated by different parts based on different materials, the material data is used to describe the second position offset value interval of the vertex of the abstract model of the virtual object, so the full-offset object material data and the half-offset object material data in each vertex of the abstract model of the virtual object are configured in advance corresponding to the maximum offset value and the shape bending parameter of the UV coordinate space. The spatial data such as position, offset and the like in the embodiment of the application are constructed based on a UV coordinate space, correspondingly, for material data, a range of offset caused by collision of a full offset object and a half offset object caused by wind is limited from two dimensions of an offset distance and a shape bending degree, that is, a second offset value interval is determined based on a maximum offset value and a shape bending parameter, and a specific configured numerical value is not specifically limited in the embodiment of the application. For example, the Leaf material data configuration includes a Leaf bending curve degree value Leaf and a Leaf top maximum offset distance value Leaf, the Trunk material data configuration includes a Trunk bending curve degree value Trunk, the larger the degree value is, the worse the wind blowing effect of the root is (the harder the animation effect is displayed) is, and the Trunk top maximum offset distance Trunk is.
In one embodiment, in order to realize that the virtual object is influenced by the collision of the wind field map in the virtual scene, so as to generate a wind-driven picture with a realistic effect and reduce the resource effect of artificially making a frame animation with the wind-driven effect, the acquiring the wind field data of the virtual object in the virtual scene comprises: configuring a wind field map matched with the virtual scene, and determining a wind direction parameter and a wind speed parameter of the wind field map; and after the wind field map collides with the abstract model of the virtual object, performing offset calculation on the axis point data and the gradient data in the vertex of the abstract model of the virtual object according to the wind direction parameter and the wind speed parameter to generate a first offset position value, and storing the first offset position value in the vertex of the abstract model of the virtual object as the wind field data of the virtual object in the virtual scene.
In the embodiment of the application, in order to present a pneumatic effect that natural wind (environmental wind, static wind) blows in a virtual scene, a wind field map is a UV map animation, and according to requirements of different natural wind scenes, a tiling size can be selected to be 100 meters, 50 meters and the like in the virtual environment, and a wind direction and a wind speed are set, that is, a moving direction and a moving speed of the wind map, which is not specifically limited in the embodiment of the application. Specifically, the map size of the environmental wind in the map is uniform in the whole map in the virtual scene, and is input and set through the map parameter AmbientWind in the MF _ TreeWind in the game engine, which is not specifically limited in the embodiment of the present application.
When a wind animation is baked on a different virtual object by the game engine, the wind direction and the wind speed moving according to the wind field map of the environmental wind collide with the abstract model of the virtual object such as a plant, a pendant, and a character attachment. Because the vertex of the abstract model of the virtual object comprises the axis point data and the gradient data which respectively correspond to the data structures of the full-offset object and the half-offset object, when collision occurs, the axis point data and the gradient data are subjected to offset calculation based on the wind direction parameter and the wind speed parameter of the wind field map, and a first offset position value is generated, namely the offset value blown by the wind of the virtual object.
In addition, when the wind animation is baked in the game engine, different virtual objects may be abstracted as a full-offset object and a half-offset object, for example, the virtual object is a game Character, and may be a Player-Controlled Character (PCC) or a Non-Player Character (NPC), the corresponding half-offset object is a bone model, and the bone model of the Character may be determined not to be affected by the collision of the wind field map by setting the general-purpose material data, that is, the general-purpose material data is configured to be a fixed value, so that there is no second position offset value interval in the collision, or the general-purpose material data corresponds to a fixed origin, so that the virtual object does not offset when being collided by the wind field map. The general material data is set so that the clothes, hairs, and the like attached to the skeleton model are subjected to the influence of the wind field mapping collision, that is, so that the second position offset value section exists, and the clothes, hairs, and the like are subjected to the full offset, and the clothes, hairs, and the like are offset when the clothes, hairs, and the like are equal to the wind field mapping collision. The skeleton model of the game character can be determined as gradient data through one channel of the vertex color, and can also be determined as gradient data through one pipeline of the mask map, and the gradient data are stored in the coordinate data UV of the texture map as floating point values, namely the vertex values are correspondingly stored in the abstract model.
In one embodiment, in order to enable a virtual object to generate the same pneumatic effect with a real different object when a wind field map collides, the configuring a wind field map matched with the virtual scene, and the determining the wind direction parameter and the wind speed parameter of the wind field map comprises: acquiring general texture data in the texture data of the virtual object, wherein the general texture data is used for determining whether an abstract model of the virtual object collides with the wind field map or not; and determining material data comprising full offset object material data and half offset object material data from a material file according to the universal material data, and storing the material data in the top point of the abstract model of the virtual object.
In the baking process aiming at static environment wind, compared with a real pneumatic effect, different pneumatic effects are generated when different virtual objects in a virtual scene are collided by wind mapping, for example, even if stones, houses and the like in a game are collided by the wind mapping, deviation does not occur, trees, flags, role clothes and the like are collided by the wind mapping, the pneumatic effects can be generated, so that the wind blowing effect in the virtual scene is more real, and therefore, whether the wind is influenced by the pneumatic effect is determined by configuring general material data for the different virtual objects. The method comprises the steps of obtaining general material data when wind animation baking is needed, determining material data of a full-offset object and material data of a half-offset object based on a material file, and storing the material data in the top point of the abstract model. The material file is pre-configured with material data matched with full-offset object material data and half-offset object material data corresponding to different universal material data, and when the wind animation needs to be baked, the material file is called and inquired, so that the material data of the virtual object is stored in the top point of the abstract model, the processing efficiency of generating the wind animation for the virtual object is improved, and the manufacturing difficulty of the wind animation is reduced.
When the static wind is used for baking the wind-driven painting of the virtual object in the game engine, the generation method of each universal material data in the material file is to compare the material identification with the material path based on the material identification of each region on the surface of the input virtual object, and the material file comprises the material data of each vertex of the virtual object.
In one embodiment, for further definition and illustration, the comparing the first and second intervals of position offset values for the abstract model vertices of the virtual object, and the determining the third position offset value for the abstract model vertex of the virtual object comprises: if the first position offset value is within the second position offset value interval, determining the first position offset value as a third position offset value; and if the first position offset value exceeds the second position offset value interval, determining a third position offset value based on an extreme value of the second position offset value interval.
Specifically, when the third position offset value is determined, it is determined that the first position offset value is within the second position offset value interval, which indicates that the first position offset value does not exceed the limit of the material of the virtual object, i.e., the offset generated by the virtual object being collided by the wind field map can be directly used as the offset value of the wind animation, and therefore, the first position offset value is directly determined as the third position offset value. And judging that the first position offset value exceeds the second position offset interval, and indicating that the first position offset value exceeds the limit of the material of the virtual object, namely the offset generated by the virtual object being collided by the wind field map cannot be used as the offset value of the wind animation, so that the extreme value based on the second position offset value interval is determined as the third position offset value. Generally, the second position offset value interval is set to be an interval range from 0 value to a specific value, so that the position range of the virtual object which can be offset under the influence of material is limited, the smaller the interval is, the smaller the effect of the virtual object blown by wind is, and the larger the interval is, the larger the effect of the virtual object blown by wind is, therefore, when the first position offset value exceeds the second position offset interval, the effect of the virtual object blown by wind is already beyond the effect of the virtual object capable of being offset, and therefore, the maximum value of the second position offset interval is used as the third position offset value, so that the consistency between the pneumatic effect of the virtual object and the pneumatic effect of the virtual object blown by wind is further improved.
In one embodiment, in order to render the wind field data stored in the vertices of the abstract model of the virtual object in an optimal data structure form, thereby improving the efficiency of game production, the wind field data stored in the vertices of the abstract model of the virtual object further includes a random value for distinguishing the phases of the virtual object.
Specifically, the axis point data and the gradient data stored in the vertex respectively represent coordinate data of the texture map by using a floating point value, and for a scene in which a leaf is a full-offset object and a trunk is a half-offset object, since the axis point of the trunk can correspond to a fixed origin in the material data, the axis point (such as a root) representing the trunk cannot be offset, the floating point value stored in the vertex comprises: the X-axis coordinate of the leaf axis point, the Y-axis coordinate of the leaf axis point, the Z-axis coordinate of the leaf axis point, the gradient coefficient of the leaf, the gradient coefficient of the trunk, and a random value for distinguishing the virtual object phase.
The leaf axis point (leaf pivot) is used for representing the rotating axis point when the leaves are blown, and is the root of the leaves. Leaf gradient (LeafGradient), the larger the gradient value indicates that the leaves are more far apart when blown by wind, so the root gradient of the leaves is generally 0 and the top gradient is close to 1. Trunk gradient (trunk gradient), the larger the gradient value, the farther the blow, so the trunk generally has a root gradient of 0 and a top gradient close to 1. The trunk axis point is at the origin, such as the root, so the trunk axis point can be directly set. Leaf random value (partland): this value is to distinguish each leaf animation phase, avoiding duplicate baking of the same phase leaves.
In the embodiment of the present application, for baking the virtual object, baking may be performed using a plurality of special effect creation tools such as Houdini, in one example, baking is performed using a Houdini component, and the baking operation includes: selecting a middle object (virtual object) in a virtual scene, wherein the middle object can be a plurality of objects or even a blueprint with a Static Mesh component, and the plurality of objects can be baked at one time; selecting a Houdini object for moving or modifying parameters through a Bake Tree Pivot in a Houdini Engien Shelf tool set; and inputting the identification character String and any character in the tree Trunk Material name in the Trunk Material String, comparing the Material paths by the HDA file, and determining the Trunk in the vertex based on the comparison result. For example, the material name MI _ Tree _ LvShuGan _01_ LOD1 may be input as "LvShuGan", or "shugan". For a plurality of materials, the character strings are connected by commas, such as: "ShuGan, MuTuo, Trunk" inputs the identification character String of the Leaf Material in Leaf Material String, the method is the same as above. Triggering a Recook Asset tool to bake, and finishing correct baking when the Houdini object is changed into a marker ball for showing the material effect from the Houdini Logo after baking is finished.
Fig. 3 shows an effect diagram of the wind animation rendering on the clothes according to the embodiment of the present application, in which the decorations and the hairs are placed to the right to raise the wind effect.
In an application scenario in the embodiment, in the method for specifically rendering the pneumatic drawing of the cloth, first, the axis point data and the trunk gradient data in the vertex are configured as fixed parameters to represent that the pneumatic drawing is not affected. The role model is generally complex, and in order to improve the data processing efficiency, it is more convenient to wrap a mask chartlet by using the role model UV as gradient data. Specifically, the cloth can be made in two ways, one is Dynamic Bone, and the other is cloth physics. For the material physics, the displacement animation of each vertex can be accurately controlled, an MF _ SkelWind material function is added at the tail end of the character material, the material function can output a vertex displacement, and the displacement is the distance and the direction blown by wind. The game engine adds an offset value to the apex position, which superimposes the wind effect on the display of the cloth motion.
In the embodiment of the application, in order to improve the production effect of wind animation on different virtual objects, the setting and adjusting steps of the material data comprise: setting the current scene wind to a parameter of 0.8 using a wind test tool; configuring material Wind, namely EnableWind in the General group; adjusting leaf movement, leaf movementrange ensures that the leaves have different effects for different wind levels; adjusting the leaf hardness LeafStiffness, wherein the elastic SpringScal is equal to the leaf baking related parameter; in the process, the pneumatic effect can be displayed simultaneously, and the parameters are modified and set simultaneously, so that the optimal expected pneumatic effect is achieved. In addition, in order to avoid the joint action of a plurality of wind field maps on the virtual object, the method for emptying the wind field data comprises the following steps: clicking a model needing to clear wind data in a Content Browser by a right key; selecting scaled Actions > Reset Mesh Wind Data; and finally, storing the model.
In this embodiment, the wind field map is the environmental wind, certainly, the virtual object in the virtual scene produces the pneumatic effect and not only can receive the influence of environmental wind, to the motion or the release skill of role, can produce dynamic wind, make virtual object such as grass when receiving the influence of environmental wind, receive the influence of dynamic wind simultaneously, for example, under the effect of environmental wind, the plant swings towards a direction, under the effect of dynamic wind, the plant returns the swing towards a plurality of directions, environmental wind + dynamic wind is then the stack of two effects, as shown in fig. 4, the pneumatic effect of tree under the effect of single environmental wind that obtains respectively, the pneumatic effect of tree under the effect of single noise wind, and the pneumatic effect of tree under the combined action of environmental wind and noise wind.
The dynamic wind, such as noise wind, is wind generated in a local area of a map in the game running process, and the dynamic wind supports direction change unlike environmental wind. The dynamic wind is realized by a plurality of winds (including noise wind, special effect wind, character wind and the like) on the virtual object, and the wind effect generated by a fan or a weapon swung by a player can be realized by using the dynamic wind. The environment wind is finished by a UV mapping animation, the default tiling size is 100 meters (optional), so the environment wind can only control the wind intensity in a large range, and the complex wind shaking effect is finished by matching with dynamic wind.
Taking dynamic wind manager BP _ dynamic windmanager as an example of a tool for realizing dynamic wind, the simulatesp function of the blueprint at each frame Tick performs the following steps:
checking all the Motor motors collected in the frame (the Motor is responsible for injecting wind into the wind field), adding the Motor motors into a Pending Upload queue, and directly discarding the redundant motors if the queue overflows (too many motors waiting for uploading) to obtain a default maximum of 10, wherein too far Motor motors are already removed during adding; uploading (drawing) the earliest Motor in the queue to RT (RT _ Velocity _); the fluid is resolved (see the wind simulation explanation behind) to generate the effect of pushing the wind forwards; after the simulation is finished, RT of a dynamic wind field is generated, the direction and the speed (vector) of dynamic wind around a player (default 30 meters) are stored in the RT, and then the RT is added into the material of the object by using MF _ ApplidynamicWind and environmental wind together to calculate a final deviant WPO (world Position offset) by using a material function MF _ TreeWind, so that the wind-driven effect of the dynamic wind is obtained.
The input parameters for the baked trunk, Bake Tree, Pivot, are explained and illustrated below:
trunk Material String, identification String in the Tree Trunk Material name, any character, through HDA and Material path comparison, such as the Material name MI _ Tree _ LvShuGan _01_ LOD 1-can input "LvShuGan", or "shugan". The default value here is "ShuGan". For a plurality of materials, the character strings are connected by commas, such as: "ShuGan, MuTuo, Trunk".
Leaf Pivot Method, Leaf axis point calculation Method. Default (defaults) would use the point closest to the trunk as the axis point, toppost and bottomost would use the top or bottom vertex on the leaf as the axis point, respectively.
Leaf Gradient Method, Leaf Gradient calculation Method. Distance calculation is used by default, or the fade direction, Up (Up) or Down (Down) may be selected.
Root Method, Method of calculating trunk axis points, default to the origin, you can choose either toppost or bottomost. It should be noted that this method only affects the baked data, and the specific origin point determined by the trunk axis point inside the material.
The Isolated Leaves Min Dist, when using Isolated Leaf binding, determines the minimum distance if a block belongs to the same Leaf. This value is useful when the Isolated Leaves In-Bounding Method and the Isolated Leaves Out-Bounding Method are Merge by Min Distance. While this value is useful when merging In-Bounding leaves and Out-Bounding leaves.
(iii) Isolated Leaves In-Bounding Method, i.e.Isolated Leaves Bounding the body (crossing) and Leaves are merged.
Unmerge.
Merge by Min Distance blocks with a Distance less than Isolated Leaves Min Distance are the same leaf.
Merge by interaction the intersected blocks are considered to be the same leaf.
Isolated Leaves Out-Bounding Method
Evaluation method when Isolated Leaf binding surrounds in vitro leaves.
Unmerge.
Merge by Min Distance blocks with a Distance less than Isolated Leaves Min Distance are the same leaf.
Merge by interaction the intersected blocks are considered to be the same leaf.
Per Leaf Gradient, the length of each Leaf is used as the base when calculating the Leaf Gradient. By default, the longest leaf is taken as the base, which has the advantage that short leaves can move a small distance, long leaves can move a large distance, and the method is reasonable, but sometimes art does a special leaf, so that most of other leaves have dark gradients, and the option may be used.
Uniform Scale, zoom value, too large or too small object if the baking result is not correct, may attempt to modify this value. When the rice and the centimeter are mistaken when the model is uploaded by the art, the following values are preferably modified, for example: 100.
mesh, where the model to be baked is selected, and Input type selects World Outliner Input. Support multiple selection and support the Static Mesh in the baking blueprint. When baking multiple objects it is necessary to ensure that the selected objects are all at the same location on the map.
Trunk Bounding volume. After the object is blocked, all blocks intersecting this bounding volume will be considered as the trunk.
Leaf Bounding, Leaf Bounding volume. After the object is blocked, all blocks intersecting this bounding volume will be considered leaves, and each bounding volume is a leaf and can be used to merge "two leaves" into "one leaf".
Fake Trunk, if the desired Trunk location is not on the model, may "forge" a Trunk. For example, the kite animation is baked, the shaft point of the kite swing is not on the kite model, a ball can be placed at any position in space by using the function and used as a trunk, and the ball is not used after the baking is finished.
Black Out Bounding, the animation data of the vertices inside the Bounding volume is deleted. When the cloth is swung, the cloth is used for ensuring that the top point of the root part is not swung out.
The Leaf Bounding box is a box that contains all the leaves of the Leaf, which is different from Leaf Bounding box, as shown in the following exemplary Isolated Leaf Bounding box.
The algorithms involved in the baking process include Leaf binding and Isolated Leaf binding, as described herein. Leaf Bounding is to merge single leaves, each Bounding is a Leaf, the lower graph is a string of two lanterns that would be considered two leaves if Houdini were allowed to automatically group, an animation is split, and the left two lanterns can be counted as a Leaf using Leaf Bounding. Isolated Leaf binding is a powerful function, especially for shrub plants, flowers, grasses, as such plants are easily mistaken for the self-partitioning function to assume that the flower stem and the top Leaf part are two "leaves", which in fact are one Leaf. One solution is to frame each Leaf with N Leaf bounces, but this is a heavy task and it is difficult to frame a flower stem to a middle as shown in the following figure, which requires an Isolated Leaf bounces.
In an embodiment of this embodiment, the obtaining of the material data of the virtual object includes at least one of: acquiring general material data of the virtual object, wherein the general material data is used for indicating whether the virtual object needs to start a wind animation or not and whether the virtual object is a leaf or not, and whether a father node of the leaf in the tree diagram is a trunk or a grass or not; obtaining trunk material data of the virtual object, wherein the trunk material data is used for indicating a trunk bending curve shape and a trunk top maximum moving distance of the virtual object; the leaf material data of virtual object is obtained, wherein the leaf material data are used for indicating the leaf bending curve degree of the virtual object, the maximum moving distance of the top of the leaf, the moving distance of the top of the leaf caused by noise wind, the speed of the noise wind, the leaf hardness and the stretching length of the leaf.
The texture data of this embodiment can be divided into three groups (general texture data, trunk texture data, leaf texture data), each group includes a plurality of parameters, which are exemplified here:
generic texture data comprising:
EnableWind requires a wind animation to turn it on.
IsLeaves, the leaves are hooked, and the trunks are not hooked.
NoTrunk for leaves, the parent node (trunk) is hooked up if it is not moving, so that the performance can be optimized.
Windon ground is used for grass, the direction of wind is set to blow upwards obliquely, the wind is limited to blow only horizontally by the windon, and ground plants need to be hooked and selected, so that the grass is prevented from blowing upwards obliquely.
The tree Trunk material data Wind comprises the following data:
trunk curve shape, the larger the value, the harder the label root. By means of an exponential function (POW) it is achieved that the trunk bends more from the top the larger the value, and starts to bend from the bottom the smaller the value.
TrunkMovement is the maximum moving distance of the top of the trunk.
Leaf material data Wind, which comprises:
leaf bend curve degree, the larger the value the harder the root is marked. The leaf band algorithm is the same as the trunkfind, this effect is not evident on leaves on trunks because the leaf apex density is generally not sufficient, and care is taken to observe the curved arc of the top left leaf;
leaf movement is the maximum moving distance of the top of the leaf;
LeafMovementRange the distance that the leaf vertex moves due to wind noise will eventually be within the LeafMovement +/-LeafMovementRange, the leaf "flutter" distance, and the vertex will flutter around this range movement +/-LeafMovementRange.
LeafNoisexpected, the wind noise velocity, determines the leaf shake velocity. This value change is not really necessary, the basic default value is true. The right plant is shaken quickly, the default value is generally 0.1, and the shaking intensity is better adjusted by using LeafMovementRange;
leaf stiffness, achieved by scaling the wind noise toward the pivot point. The upper left-hand leaf is arranged, the left part is beautifully enchanted, and the noodles can be stroked into steel bars by the beautifully enchanting leaf.
SpringScale default leaves have a spring effect of 0.2, i.e. the leaves can "stretch" by 20% when blown. Leaves are provided on the right part of the plant, which "pulls" longer than leaves on the left plant when the wind is strong. This is true because each vertex only considers itself when calculating the offset, and does not consider the leaf bends of other vertices in the front part of the leaf, i.e., some leaves are seen as long as the whole when SpringScale is 0.
PivotOnFoot, for grasses, especially grass clippings, forces the pivot point to be directly below.
The embodiment of the application provides a method for rendering a virtual object wind animation, which comprises the steps of obtaining a wind field data with an axis point data and a gradient data as data structures, wherein the wind field data is stored in an abstract model vertex in a virtual scene, the wind field data is a first position offset value of the abstract model vertex after a wind field mapping of a wind field collides with an abstract model of the virtual object, obtaining a second position offset value interval material data used for describing the abstract model vertex of the virtual object, comparing the first position offset value interval with the second position offset value interval, determining a third position offset value of the abstract model vertex of the virtual object, generating a picture of the virtual object in the virtual scene, greatly reducing the processing complexity of generating the wind animation for different wind-driven virtual objects, being capable of being repeatedly applied to various different virtual objects, and avoiding a large amount of human processing cost, The data processing is complicated, so that the pneumatic drawing effect generated by rendering is more matched with the real pneumatic effect, and the accurate and vivid rendering effect of the virtual wind animation is realized.
Further, as an implementation of the method shown in fig. 2, an embodiment of the present invention provides an apparatus for rendering an object wind animation, where as shown in fig. 5, the apparatus includes:
the first obtaining module 31 is configured to obtain wind field data of a virtual object in a virtual scene, where the wind field data of the virtual object in the virtual scene is a first position offset value of a vertex of an abstract model of the virtual object after a wind field map of a wind field collides with the abstract model of the virtual object, and the wind field data of the virtual object in the virtual scene is stored in the vertex of the abstract model of the virtual object and includes axis point data and gradient data;
a second obtaining module 32, configured to obtain material data of a virtual object, where the material data of the virtual object is used to describe a second position offset value interval of a vertex of an abstract model of the virtual object, and the material data is stored in the vertex of the abstract model of the virtual object;
the generating module 33 is configured to compare the first position offset value and the second position offset value of the abstract model vertex of the virtual object, determine a third position offset value of the abstract model vertex of the virtual object, and generate a pneumatic drawing of the virtual object in a virtual scene.
Further, the axis point data includes full-offset object axis point data and half-offset object axis point data, and the gradient data includes full-offset object gradient data and half-offset object gradient data.
Further, the first obtaining module is specifically configured to respectively define full-offset object axis point data and half-offset object axis point data of an abstract model of the virtual object to be collided by the wind farm map, where the full-offset object axis point data is represented by position data with a minimum distance from the half-offset object, and the half-offset object axis point data is represented by a preset position corresponding to material data of a second position offset value interval used for describing a vertex of the abstract model of the half-offset object.
Further, the second obtaining module is specifically configured to respectively define full-offset object gradient data and half-offset object gradient data of the abstract model of the virtual object to be collided by the wind field map, where the full-offset object gradient data is characterized by being calculated according to a distance between at least two position data in the abstract model of the full-offset object and a preset maximum distance, and the half-offset object gradient data is characterized by being calculated according to a distance between at least two position data in the abstract model of the half-offset object.
Further, the material data stored in the vertex of the abstract model of the virtual object includes material data of a full-offset object and material data of a half-offset object, the first obtaining module is further configured to configure the material data of the full-offset object and the material data of the half-offset object in each vertex respectively corresponding to a maximum offset value and a shape warping parameter of a UV coordinate space, and the second offset value interval is determined based on the maximum offset value and the shape warping parameter.
Further, the first obtaining module comprises:
the determining unit is used for configuring a wind field map matched with the virtual scene and determining a wind direction parameter and a wind speed parameter of the wind field map;
and the storage unit is used for performing offset calculation on the axis point data and the gradient data in the vertex of the abstract model of the virtual object according to the wind direction parameter and the wind speed parameter after the wind field map collides with the abstract model of the virtual object, generating a first offset position value, and storing the first offset position value as the wind field data of the virtual object in the virtual scene in the vertex of the abstract model of the virtual object.
Further, the air conditioner is provided with a fan,
the determining unit is further configured to obtain general material data in the material data of the virtual object, where the general material data is used to determine whether a collision occurs between the abstract model of the virtual object and the wind field map;
and the storage unit is further used for determining the material data comprising the material data of the full offset object and the material data of the half offset object from the material file according to the general material data, and storing the material data in the top point of the abstract model of the virtual object.
Further, the determining module is specifically configured to determine the first position offset value as a third position offset value if the first position offset value is within the second position offset value interval; and if the first position offset value exceeds the second position offset value interval, determining a third position offset value based on an extreme value of the second position offset value interval.
Further, the wind field data further comprises a random value for distinguishing a virtual object phase.
Further, the virtual objects include, but are not limited to, plants, pendants, character attachments in the virtual scene.
The embodiment of the application provides a virtual object wind animation rendering device, which is characterized in that a virtual object is obtained and stored in the vertex of an abstract model in a virtual scene, axis point data and gradient data are used as wind field data of a data structure, the wind field data is a first position offset value of the vertex of the abstract model after a wind field mapping of a wind field collides with the abstract model of the virtual object, the material data of a second position offset value interval of the vertex of the abstract model of the virtual object is obtained, the first position offset value interval and the second position offset value interval are compared, a third position offset value of the vertex of the abstract model of the virtual object is determined, a drawing of the virtual object in the virtual scene is generated, the processing complexity of generating wind animation for different wind-driven virtual objects is greatly reduced, the device can be repeatedly applied to multiple different virtual objects, and a large amount of manpower processing cost and a large amount of labor processing cost are avoided, The data processing is complicated, so that the pneumatic drawing effect generated by rendering is more matched with the real pneumatic effect, and the accurate and vivid rendering effect of the virtual wind animation is realized.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (13)

1. A method for rendering a virtual object wind animation is characterized by comprising the following steps:
acquiring wind field data of a virtual object in a virtual scene, wherein the wind field data of the virtual object in the virtual scene is a first position offset value of a vertex of an abstract model of the virtual object after a wind field map of a wind field collides with the abstract model of the virtual object, and the wind field data of the virtual object in the virtual scene is stored in the vertex of the abstract model of the virtual object and comprises axis point data and gradient data;
acquiring material data of a virtual object, wherein the material data of the virtual object is used for describing a second position offset value interval of the top point of an abstract model of the virtual object, and the material data is stored in the top point of the abstract model of the virtual object;
and comparing a first position offset value interval and a second position offset value interval of the abstract model vertex of the virtual object according to the acquired wind field data and the acquired material data, determining a third position offset value of the abstract model vertex of the virtual object, and generating a wind-driven picture of the virtual object in a virtual scene.
2. The method of claim 1, wherein the axis point data comprises full offset object axis point data and half offset object axis point data, and the gradient data comprises full offset object gradient data and half offset object gradient data.
3. The method of claim 2, wherein the obtaining wind farm data for the virtual object in the virtual scene comprises:
and respectively defining full-offset object axis point data and half-offset object axis point data of the abstract model of the virtual object to be collided by the wind field map, wherein the full-offset object axis point data is represented as position data with the minimum distance from the half-offset object, and the half-offset object axis point data is represented as a preset position corresponding to material data of a second position offset value interval for describing the vertex of the abstract model of the half-offset object.
4. The method of claim 2, wherein the obtaining wind farm data for the virtual object in the virtual scene comprises:
and defining full-offset object gradient data and half-offset object gradient data of the abstract model of the virtual object to be collided by the wind field map respectively, wherein the full-offset object gradient data are characterized by being calculated according to the distance between at least two position data in the abstract model of the full-offset object and a preset maximum distance, and the half-offset object gradient data are characterized by being calculated according to the distance between at least two position data in the abstract model of the half-offset object.
5. The method of claim 1, wherein the material data comprises full-offset object material data and half-offset object material data, and wherein the obtaining wind field data of the virtual object in the virtual scene comprises:
and respectively configuring the maximum deviation value and the shape bending parameter of the full deviation object material data and the half deviation object material data corresponding to the UV coordinate space in each vertex, wherein the second deviation value interval is determined based on the maximum deviation value and the shape bending parameter.
6. The method of claim 1, wherein the obtaining wind farm data for the virtual object in the virtual scene comprises:
configuring a wind field map matched with the virtual scene, and determining a wind direction parameter and a wind speed parameter of the wind field map;
and after the wind field map collides with the abstract model of the virtual object, performing offset calculation on the axis point data and the gradient data in the vertex of the abstract model of the virtual object according to the wind direction parameter and the wind speed parameter to generate a first offset position value, and storing the first offset position value in the vertex of the abstract model of the virtual object as the wind field data of the virtual object in the virtual scene.
7. The method of claim 6, wherein configuring a wind field map matched with the virtual scene, and determining a wind direction parameter and a wind speed parameter of the wind field map comprises:
acquiring general texture data in the texture data of the virtual object, wherein the general texture data is used for determining whether an abstract model of the virtual object collides with the wind field map or not;
and determining material data comprising full offset object material data and half offset object material data from a material file according to the universal material data, and storing the material data in the top point of the abstract model of the virtual object.
8. The method of claim 1, wherein comparing the first and second intervals of position offset values of the vertices of the abstract model of the virtual object according to the obtained wind farm data and the material data, and wherein determining the third interval of position offset values of the vertices of the abstract model of the virtual object comprises:
if the first position offset value is within the second position offset value interval, determining the first position offset value as a third position offset value;
and if the first position offset value exceeds the second position offset value interval, determining a third position offset value based on an extreme value of the second position offset value interval.
9. The method of claim 1, wherein the wind farm data further comprises random values for distinguishing virtual object phases.
10. The method according to any of claims 1-9, wherein the virtual object comprises at least any of: plants, pendants, and role attachments in the virtual scene.
11. An apparatus for rendering a virtual object wind animation, comprising:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring wind field data of a virtual object in a virtual scene, the wind field data of the virtual object in the virtual scene is a first position offset value of a vertex of an abstract model of the virtual object after a wind field map of a wind field collides with the abstract model of the virtual object, and the wind field data of the virtual object in the virtual scene is stored in the vertex of the abstract model of the virtual object and comprises axial point data and gradient data;
a second obtaining module, configured to obtain material data of a virtual object, where the material data of the virtual object is used to describe a second position offset value interval of a vertex of an abstract model of the virtual object, and the material data is stored in the vertex of the abstract model of the virtual object;
and the generating module is used for comparing a first position offset value interval and a second position offset value interval of the abstract model vertex of the virtual object according to the acquired wind field data and the acquired material data, determining a third position offset value of the abstract model vertex of the virtual object, and generating a wind-driven picture of the virtual object in the virtual scene.
12. A computer storage medium, in which a computer program is stored, wherein the computer program is arranged to perform a method of rendering a virtual object wind animation as claimed in any one of claims 1 to 10 when executed.
13. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and the processor is arranged to execute the computer program to perform a method of rendering a virtual object wind animation as claimed in any one of claims 1 to 10.
CN202110166379.3A 2020-11-27 2020-11-27 Virtual object wind animation rendering method and device, storage medium and electronic device Pending CN112767522A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110166379.3A CN112767522A (en) 2020-11-27 2020-11-27 Virtual object wind animation rendering method and device, storage medium and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011356869.1A CN112200896B (en) 2020-11-27 2020-11-27 Virtual object wind animation rendering method and device, storage medium and electronic device
CN202110166379.3A CN112767522A (en) 2020-11-27 2020-11-27 Virtual object wind animation rendering method and device, storage medium and electronic device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202011356869.1A Division CN112200896B (en) 2020-11-27 2020-11-27 Virtual object wind animation rendering method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN112767522A true CN112767522A (en) 2021-05-07

Family

ID=74034368

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202110166379.3A Pending CN112767522A (en) 2020-11-27 2020-11-27 Virtual object wind animation rendering method and device, storage medium and electronic device
CN202011356869.1A Active CN112200896B (en) 2020-11-27 2020-11-27 Virtual object wind animation rendering method and device, storage medium and electronic device

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202011356869.1A Active CN112200896B (en) 2020-11-27 2020-11-27 Virtual object wind animation rendering method and device, storage medium and electronic device

Country Status (2)

Country Link
CN (2) CN112767522A (en)
WO (1) WO2022111037A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113239442A (en) * 2021-06-03 2021-08-10 中移智行网络科技有限公司 Three-dimensional model construction method, device, equipment and computer readable storage medium
CN114053696A (en) * 2021-11-15 2022-02-18 完美世界(北京)软件科技发展有限公司 Image rendering processing method and device and electronic equipment

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112767522A (en) * 2020-11-27 2021-05-07 成都完美时空网络技术有限公司 Virtual object wind animation rendering method and device, storage medium and electronic device
CN113888398B (en) * 2021-10-21 2022-06-07 北京百度网讯科技有限公司 Hair rendering method and device and electronic equipment
CN116384207B (en) * 2023-05-17 2023-12-05 核工业航测遥感中心 Attribute value fusion rendering method based on wind field flow track and flow texture

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109559366A (en) * 2018-12-18 2019-04-02 珠海格力电器股份有限公司 Display methods, device, storage medium and the equipment of potted plant growth course
DE102019204242A1 (en) * 2018-03-28 2019-10-02 Robert Bosch Gmbh Method and system for efficient rendering of cloud weathering graphics in three-dimensional maps
CN110827391A (en) * 2019-11-12 2020-02-21 腾讯科技(深圳)有限公司 Image rendering method, device and equipment and storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8269777B2 (en) * 2003-12-12 2012-09-18 Presisio Labs, Inc. Method and system for system visualization
CN102306389B (en) * 2011-08-03 2013-05-08 湖南互动传媒有限公司 Method for realizing embossment effect of animation character and background of mobile phone
CN102930095A (en) * 2012-10-26 2013-02-13 吴振东 Digitalized interaction system and method for home decoration, furniture and decorative product integrated design
CN105438493B (en) * 2014-08-01 2017-12-08 深圳中集天达空港设备有限公司 A kind of aircraft docking tracing-positioning system and method based on laser scanning
CN106920271B (en) * 2017-01-18 2020-06-02 钱进 Method for constructing streamline animation of particle system under wind field drive based on GS (generalized modeling language)
US10768776B1 (en) * 2017-08-24 2020-09-08 Amazon Technologies, Inc. Streaming virtual objects for incorporation in virtual environments
CN108230436A (en) * 2017-12-11 2018-06-29 网易(杭州)网络有限公司 The rendering intent of virtual resource object in three-dimensional scenic
CN109671137B (en) * 2018-10-26 2023-05-23 广东智媒云图科技股份有限公司 Picture text matching method, electronic equipment and storage medium
CN112767522A (en) * 2020-11-27 2021-05-07 成都完美时空网络技术有限公司 Virtual object wind animation rendering method and device, storage medium and electronic device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102019204242A1 (en) * 2018-03-28 2019-10-02 Robert Bosch Gmbh Method and system for efficient rendering of cloud weathering graphics in three-dimensional maps
US20190304159A1 (en) * 2018-03-28 2019-10-03 Robert Bosch Gmbh Method and System for Efficient Rendering of Cloud Weather Effect Graphics in Three-Dimensional Maps
CN110335333A (en) * 2018-03-28 2019-10-15 罗伯特·博世有限公司 For efficiently rendering the method and system of skies gas effect figure in three-dimensional map
US10535180B2 (en) * 2018-03-28 2020-01-14 Robert Bosch Gmbh Method and system for efficient rendering of cloud weather effect graphics in three-dimensional maps
CN109559366A (en) * 2018-12-18 2019-04-02 珠海格力电器股份有限公司 Display methods, device, storage medium and the equipment of potted plant growth course
CN110827391A (en) * 2019-11-12 2020-02-21 腾讯科技(深圳)有限公司 Image rendering method, device and equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
周琪琪: "基于虚拟现实技术的风电仿真系统", 《中国优秀硕士学位论文全文数据库(电子期刊)工程科技Ⅱ辑》, no. 01 *
赵鹏飞: "基于IFS的树木摇曳的动态模拟方法研究", 《中国优秀硕士学位论文全文数据库(电子期刊)信息科技辑》, no. 02, pages 138 - 889 *
赵鹏飞等: "快速模拟IFS树木动态摇曳的方法研究", 《计算机工程与应用》, vol. 49, no. 14 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113239442A (en) * 2021-06-03 2021-08-10 中移智行网络科技有限公司 Three-dimensional model construction method, device, equipment and computer readable storage medium
CN113239442B (en) * 2021-06-03 2022-05-03 中移智行网络科技有限公司 Three-dimensional model construction method, device, equipment and computer readable storage medium
CN114053696A (en) * 2021-11-15 2022-02-18 完美世界(北京)软件科技发展有限公司 Image rendering processing method and device and electronic equipment
CN114053696B (en) * 2021-11-15 2023-01-10 完美世界(北京)软件科技发展有限公司 Image rendering processing method and device and electronic equipment

Also Published As

Publication number Publication date
WO2022111037A1 (en) 2022-06-02
CN112200896B (en) 2021-03-02
CN112200896A (en) 2021-01-08

Similar Documents

Publication Publication Date Title
CN112200896B (en) Virtual object wind animation rendering method and device, storage medium and electronic device
CN109934897B (en) Swing effect simulation system, method, computing device and storage medium
CN100570641C (en) Plant leaf analogy method based on physics
US9056247B2 (en) System and method for efficient character animation
CN110930484B (en) Animation configuration method and device, storage medium and electronic device
CN111773719A (en) Rendering method and device of virtual object, storage medium and electronic device
CN108379841A (en) Processing method, device and the terminal of game special
Beneš et al. Interactive modeling of virtual ecosystems
CN109147052B (en) Method and system for simulating and making hair based on Unity3D engine
CN114627222A (en) Feather map and feather effect model generation method and device and electronic equipment
CN113160368A (en) Animation data processing method and device
CN112562050A (en) Virtual object wind animation generation method and device, storage medium and terminal
Ratul et al. Applicability of space colonization algorithm for real time tree generation
CN115564878A (en) Virtual object updating method and device
Wang et al. Dynamic modeling and rendering of grass wagging in wind
CN113457136B (en) Game animation generation method and device, storage medium and terminal
CN113298923B (en) Method, device, equipment and storage medium for generating simulated electronic picture
US20100144448A1 (en) Information storage medium, game device, and game system
CN116402989B (en) Data processing method, device, equipment and medium
US11783516B2 (en) Method for controlling digital feather generations through a user interface in a computer modeling system
CN117475045A (en) Method and device for generating software flutter effect and electronic equipment
Hempe et al. Efficient real-time generation and rendering of interactive grass and shrubs for large sceneries
CN114419216A (en) Information processing method, information processing apparatus, readable storage medium, and electronic apparatus
CN106110658A (en) A kind of analogy method used in gaming and device
WO2023023404A1 (en) Method for controlling digital object generations through a user interface in a computer modeling system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination