WO2023273134A1 - Game animation generation method and apparatus, storage medium, and computer device - Google Patents

Game animation generation method and apparatus, storage medium, and computer device Download PDF

Info

Publication number
WO2023273134A1
WO2023273134A1 PCT/CN2021/133604 CN2021133604W WO2023273134A1 WO 2023273134 A1 WO2023273134 A1 WO 2023273134A1 CN 2021133604 W CN2021133604 W CN 2021133604W WO 2023273134 A1 WO2023273134 A1 WO 2023273134A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
climbing
node
model
force
Prior art date
Application number
PCT/CN2021/133604
Other languages
French (fr)
Chinese (zh)
Inventor
颜廷超
Original Assignee
完美世界(北京)软件科技发展有限公司
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 完美世界(北京)软件科技发展有限公司 filed Critical 完美世界(北京)软件科技发展有限公司
Publication of WO2023273134A1 publication Critical patent/WO2023273134A1/en

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation

Definitions

  • the present invention relates to the field of data technology, in particular to a method and device for generating game animation, a storage medium, and computer equipment.
  • a construction module configured to determine a target fulcrum of the main body model, and construct an auxiliary model of the main body model at the target fulcrum.
  • a computer device including a memory, a processor, and computer programs/instructions stored on the memory, and the processor implements the computer program/instruction described in the first aspect above when executing the computer program/instruction. method steps.
  • a method for generating a game animation includes: Step 101 , Step 102 and Step 103 .
  • the node data and sub-node data are connected to generate the main model of the climbing object. Since when generating child nodes, nodes of each level can be iterated layer by layer based on a root node, and each node can be used as a child node of the previous level or as a parent node of the next level. Therefore, connecting at least one node with the child node node, the main model of the climbing object can be obtained. For game animation content such as various scenes or accessories in the game engine, it can be constructed through a data model. Therefore, based on the connection between node data and sub-node data, the main model of the climbing object can be established. For example, if the climbing object is a vine, and the main model is a branch model constructed based on node data and sub-node data.
  • the target fulcrum is determined based on the main body model, so as to construct the attachment at the target fulcrum. model to achieve realistic climbing effects.
  • the subsidiary model is an object model that grows or extends based on the main model.
  • the main model is a vine branch model
  • the subsidiary model can be a leaf model.
  • the main model is a skill lightning trunk model
  • the subsidiary model can be a skill lightning branch
  • the model is not specifically limited in the embodiment of the present invention.
  • the target fulcrum is the position point on the main body model that extends the subsidiary model in different directions.
  • the game engine renders the theme model and the subsidiary models constructed at each target fulcrum of the main body model to generate the animation of the climbing object.
  • the theme model is constructed based on at least one node and its corresponding child nodes, the theme model can be an animation of the growth of a vine branch, or a growth animation of a complete vine branch.
  • rendering according to the growth relationship between each node and child nodes. For example, node position, growth child node time are rendered as climbing order.
  • step 1023 if the probability value is greater than a preset probability threshold, it is determined that the vertex data is the target fulcrum.
  • an auxiliary model of the main body model is constructed at the target fulcrum, which specifically includes: step 1024 and step 1025 .
  • the adsorption force data is used as the maximum adsorption distance based on all the faces of the scene object model Mesh, and the MaxAdhesionDistance value of the position closest to the triangle surface projection point and the current node is used as the adsorption force data.
  • the target fulcrum follow the reverse direction of the adsorption force data, that is, the vertical main body model outwards and draw a line at the target fulcrum.
  • the tangent direction of the main model can be determined, and then a polygon is formed as the first polygonal model body.
  • the direction Tangent vector determines a polygon corresponding to the target fulcrum, preferably a quadrilateral, to obtain the first polygonal model body, and converts it in combination with characteristic parameters to obtain an auxiliary model, which is not specifically limited in the embodiment of the present invention.
  • step 101 generates the main body model of the climbing object by connecting the node data and the sub-node data, specifically including: linearizing the node data and the sub-node data connected, and obtain the main body model through three-dimensional scanning of the linearly connected line segments; or, linearly connect the node data and sub-node data, and configure the linearly connected second polygonal model body through the defined In at least one line segment, the body model is synthesized.
  • the initial numerical definition of the node data as the root node is carried out, so as to select a suitable climbing starting point.
  • the operation behavior is determined, which is not specifically limited in this embodiment of the present invention.
  • the nodes are affected by force based on a virtual growth force, so as to obtain the sub-nodes corresponding to the nodes during the climbing process.
  • the growth force data is used In order to represent the data that drives the node data to climb according to different force magnitudes and different force directions.
  • the growth force data includes the main direction force data, random force data, adsorption force data, and gravity data.
  • the force data and the main direction force data, Random force data, adsorption force data, and gravity data are in the same coordinate system, so that the node data is force-driven based on the growth force data.
  • the growth force data includes main direction force data, random force data, adsorption force data, and gravity data
  • step 202 is based on the growth force data.
  • the data is driven by force to obtain the child node data of the climbing object, which specifically includes: Step 2021 , Step 2022 and Step 2023 .
  • the node state is used to represent the state of the node data generating sub-node data
  • the climbing state is used to represent whether the node of the climbing object is in the climbing process, because the node state and the climbing state both represent the current node for climbing The state during the climbing process. Therefore, after each force-driven data in the node data or at the same time, it is necessary to determine the node state and/or climbing state in the node data.
  • the second generation unit is configured to transform the first polygonal model volume into an auxiliary model according to the characteristic parameters.
  • the scanning unit it is used to linearly connect the node data and sub-node data, and obtain the main body model through three-dimensional scanning of the linearly connected line segments; or, the configuration unit is used to perform linear connection on the node data and sub-nodes
  • the data are linearly connected, and the defined second polygonal model volume is arranged in at least one line segment after the linear connection to synthesize the main body model.
  • the driving module is used to force-drive the node data based on the growth force data to obtain the sub-node data of the climbing object, and the growth force data is used to represent and drive the node data according to different force levels Climbing data in different directions of force.
  • the obtaining unit is used to obtain the main force direction data, random force data, gravity data and adsorption force data.
  • the node data includes node status, climbing status, and force data
  • the device further includes: a first determining module, a judging module and a second determining module.
  • FIG. 12 schematically shows a computer device that can implement the method for generating game animation according to an embodiment of the present invention
  • the computer device includes a processor 1210 and a storage medium in the form of a memory 1220 .
  • the memory 1220 is an example of a storage medium having a storage space 1230 for storing computer programs/instructions 1231 .
  • the computer program/instruction 1231 is executed by the processor 1210, various steps in the method for generating game animation described above can be realized.
  • Storage media includes permanent and non-permanent, removable and non-removable media.
  • Information storage can be realized by any method or technology.
  • Information may be computer readable instructions, data structures, modules of a program, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Flash memory or other memory technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by computing devices.
  • PRAM phase change memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • RAM random access memory
  • ROM read only memory
  • EEPROM Electrically Erasable

Abstract

Disclosed in the present invention are a game animation generation method and apparatus, a storage medium, and a computer device. The method comprises: obtaining node data and child node data of a climbing object, and connecting the node data to the child node data to generate a main body model of the climbing object, the node data being used for representing a climbing state of the climbing object attached to an object in a game scene, and the child node data being determined on the basis of the node data; determining a target fulcrum of the main body model, and constructing an accessory model of the main body model at the target fulcrum; and rendering the main body model of the climbing object and the accessory model to generate an animation of the climbing object. The method is mainly used for generating a game animation.

Description

一种游戏动画的生成方法及装置、存储介质、计算机设备A method and device for generating game animation, storage medium, and computer equipment
相关申请的交叉引用Cross References to Related Applications
本申请要求于2021年6月29日提交、申请号为202110727441.1且名称为“一种游戏动画的生成方法及装置、存储介质、终端”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed on June 29, 2021, with application number 202110727441.1 and titled "A method and device, storage medium, and terminal for generating game animation", the entire contents of which are incorporated by reference in In this application.
技术领域technical field
本发明涉及数据技术领域,尤其涉及一种游戏动画的生成方法及装置、存储介质、计算机设备。The present invention relates to the field of data technology, in particular to a method and device for generating game animation, a storage medium, and computer equipment.
背景技术Background technique
随着大世界类型游戏开发需求的逐步仿真化,各种虚拟动画的程序化开发越来越受到关注。尤其是针对大世界类型游戏中随着世界时间的变化,生成具有真实生长效果的场景动画的需求越来越多,例如,生成攀附于房屋、桥体、树等表面动态生长的藤蔓动画。With the gradual simulation of the development needs of big world games, the procedural development of various virtual animations has attracted more and more attention. Especially in large-world games, as the world time changes, there is an increasing need to generate scene animations with real growth effects, for example, to generate vine animations that grow dynamically on surfaces such as houses, bridges, and trees.
目前,现有的对具有覆盖效果的动画生成方法通常直接采用人工添加动画面片,或者利用专业的3D生成软件Spline等生成,然而,人工添加动画面片方式浪费人力资源,且添加的动画面片无法体现动画的真实生长效果,而基于专业软件等方式无法适用于各个游戏引擎中,增大了移动端的渲染压力,无法满足大世界类型游戏的程序化生成需求,也无法满足不同定制化动画仿真生长的需求。At present, the existing methods for generating animations with coverage effects usually directly add animation patches manually, or use professional 3D generation software Spline to generate them. However, adding animation patches manually is a waste of human resources, and the added animation The film cannot reflect the real growth effect of the animation, and methods based on professional software cannot be applied to various game engines, which increases the rendering pressure on the mobile terminal, and cannot meet the programmatic generation needs of large-world games, nor can it meet different customized animations. Simulate growth needs.
发明内容Contents of the invention
有鉴于此,本发明提供一种游戏动画的生成方法及装置、存储介质、计算机设备,主要目的在于解决现有动画仿真生长生成效果差的问题。In view of this, the present invention provides a method and device, storage medium, and computer equipment for generating game animation, the main purpose of which is to solve the problem of poor generation effect of existing animation simulation growth.
依据本发明的一个方面,提供了一种游戏动画的生成方法,包括:获取攀爬对象的节点数据以及子节点数据,连接所述节点数据与所述子节点数据生成所述攀爬对象的主体模型,所述节点数据用于表征所述攀爬对象在游戏场景中依附场景物攀爬的状态,所述子节点数据基于所述节点数据确定。According to one aspect of the present invention, a method for generating a game animation is provided, including: obtaining node data and sub-node data of a climbing object, and connecting the node data and the sub-node data to generate the main body of the climbing object In the model, the node data is used to characterize the climbing state of the climbing object attached to the scene object in the game scene, and the sub-node data is determined based on the node data.
确定所述主体模型的目标支点,并在所述目标支点处构建所述主体模型的附属模型。A target fulcrum of the main body model is determined, and an auxiliary model of the main body model is constructed at the target fulcrum.
对所述攀爬对象的主体模型、所述附属模型进行渲染,生成所述攀爬对象的动画。Rendering the main body model and the subsidiary model of the climbing object to generate an animation of the climbing object.
依据本发明的另一个方面,提供了一种游戏动画的生成装置,包括:获 取模块、构建模块和生成模块。According to another aspect of the present invention, a device for generating game animation is provided, including: an acquisition module, a construction module and a generation module.
获取模块,用于获取攀爬对象的节点数据以及子节点数据,连接所述节点数据与所述子节点数据生成所述攀爬对象的主体模型,所述节点数据用于表征所述攀爬对象在游戏场景中依附场景物攀爬的状态,所述子节点数据基于所述节点数据确定。An acquisition module, configured to acquire node data and sub-node data of a climbing object, connect the node data and the sub-node data to generate a main body model of the climbing object, and the node data is used to characterize the climbing object Depending on the climbing state of scene objects in the game scene, the child node data is determined based on the node data.
构建模块,用于确定所述主体模型的目标支点,并在所述目标支点处构建所述主体模型的附属模型。A construction module, configured to determine a target fulcrum of the main body model, and construct an auxiliary model of the main body model at the target fulcrum.
生成模块,用于对所述攀爬对象的主体模型、所述附属模型进行渲染,生成所述攀爬对象的动画。The generating module is used to render the main model of the climbing object and the auxiliary model, and generate animation of the climbing object.
根据本发明的又一方面,提供了一种存储介质,所述存储介质中存储有至少一可执行指令,所述可执行指令使处理器执行如上述游戏动画的生成方法对应的操作。According to yet another aspect of the present invention, a storage medium is provided, wherein at least one executable instruction is stored in the storage medium, and the executable instruction causes a processor to perform operations corresponding to the above-mentioned method for generating game animation.
根据本发明的再一方面,提供了一种计算机设备,包括存储器、处理器及存储在存储器上的计算机程序/指令,所述处理器执行所述计算机程序/指令时实现上述第一方面所述方法的步骤。According to yet another aspect of the present invention, a computer device is provided, including a memory, a processor, and computer programs/instructions stored on the memory, and the processor implements the computer program/instruction described in the first aspect above when executing the computer program/instruction. method steps.
根据本发明实施例的再一个方面,提供了一种计算机程序产品,包括计算机程序/指令,所述计算机程序/指令被处理器执行时实现上述第一方面所述方法的步骤。According to yet another aspect of the embodiments of the present invention, a computer program product is provided, including computer programs/instructions, and when the computer programs/instructions are executed by a processor, the steps of the method described in the first aspect above are implemented.
借由上述技术方案,本发明实施例提供的技术方案至少具有下列优点:本发明提供了一种游戏动画的生成方法及装置、存储介质、计算机设备,与现有技术相比,本发明实施例通过获取攀爬对象的节点数据以及子节点数据,连接所述节点数据与所述子节点数据生成所述攀爬对象的主体模型,所述节点数据用于表征所述攀爬对象在游戏场景中依附场景物攀爬的状态,所述子节点数据基于所述节点数据确定;确定所述主体模型的目标支点,并在所述目标支点处构建所述主体模型的附属模型;对所述攀爬对象的主体模型、所述附属模型进行渲染,生成所述攀爬对象的动画,实现游戏动画的程序化生成,大大降低了游戏引擎对攀爬类动画的渲染压力以及生成成本,极大地满足了基于不同定制化动画的生成需求,从而提高游戏动画生成效率。By means of the above technical solutions, the technical solutions provided by the embodiments of the present invention have at least the following advantages: The present invention provides a method and device for generating game animations, storage media, and computer equipment. Compared with the prior art, the embodiments of the present invention By obtaining the node data and sub-node data of the climbing object, connecting the node data and the sub-node data to generate the main body model of the climbing object, the node data is used to represent the climbing object in the game scene Attaching to the climbing state of the scene object, the child node data is determined based on the node data; determining the target fulcrum of the main body model, and constructing the subsidiary model of the main body model at the target fulcrum; Render the main model of the object and the attached model, generate the animation of the climbing object, realize the programmatic generation of game animation, greatly reduce the rendering pressure and generation cost of the game engine on the climbing animation, and greatly satisfy the Based on the generation requirements of different customized animations, the efficiency of game animation generation is improved.
附图说明Description of drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的, 而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to designate the same parts. In the attached picture:
图1示出了本发明实施例提供的第一种游戏动画的生成方法流程示意图;FIG. 1 shows a schematic flowchart of a method for generating a first game animation provided by an embodiment of the present invention;
图2示出了本发明实施例提供的第二种游戏动画的生成方法流程示意图;FIG. 2 shows a schematic flowchart of a second method for generating game animation provided by an embodiment of the present invention;
图3示出了本发明实施例提供的第三种游戏动画的生成方法流程示意图;FIG. 3 shows a schematic flowchart of a third method for generating game animation provided by an embodiment of the present invention;
图4示出了本发明实施例提供的一种藤蔓枝干生长方法示意图;Fig. 4 shows a schematic diagram of a vine branch growth method provided by an embodiment of the present invention;
图5示出了本发明实施例提供的第四种游戏动画的生成方法流程示意图;FIG. 5 shows a schematic flowchart of a fourth method for generating game animation provided by an embodiment of the present invention;
图6示出了本发明实施例提供的一种基于目标支点确定叶子模型体的示意图;Fig. 6 shows a schematic diagram of determining a leaf model body based on a target fulcrum provided by an embodiment of the present invention;
图7示出了本发明实施例提供的一种藤蔓攀爬枝干动画示意图;Fig. 7 shows a schematic diagram of a vine climbing branch animation provided by an embodiment of the present invention;
图8示出了本发明实施例提供的第五种游戏动画的生成方法流程示意图;Fig. 8 shows a schematic flowchart of a fifth method for generating game animation provided by an embodiment of the present invention;
图9示出了本发明实施例提供的第六种游戏动画的生成方法流程示意图;FIG. 9 shows a schematic flowchart of a sixth method for generating game animation provided by an embodiment of the present invention;
图10示出了本发明实施例提供的第七种游戏动画的生成方法流程示意图;FIG. 10 shows a schematic flowchart of a seventh game animation generation method provided by an embodiment of the present invention;
图11示出了本发明实施例提供的一种游戏动画的生成装置组成示意框图;Fig. 11 shows a schematic block diagram of a device for generating game animation provided by an embodiment of the present invention;
图12示意性地示出了用于实现根据本发明实施例的方法的计算机设备的框图;Fig. 12 schematically shows a block diagram of a computer device for implementing a method according to an embodiment of the present invention;
图13示意性地示出了实现根据本发明实施例的方法的计算机程序产品的框图。Fig. 13 schematically shows a block diagram of a computer program product implementing a method according to an embodiment of the present invention.
具体实施方式detailed description
下面将参照附图更详细地描述本发明的示例性实施例。虽然附图中显示了本发明的示例性实施例,然而应当理解,可以以各种形式实现本发明而不 应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本发明,并且能够将本发明的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
根据本发明实施例的一个方面,提供了游戏动画的生成方法,如图1所示,该方法包括:步骤101、步骤102和步骤103。According to an aspect of an embodiment of the present invention, a method for generating a game animation is provided. As shown in FIG. 1 , the method includes: Step 101 , Step 102 and Step 103 .
在步骤101,获取攀爬对象的节点数据以及子节点数据,连接所述节点数据与所述子节点数据生成所述攀爬对象的主体模型。In step 101, the node data and sub-node data of the climbing object are obtained, and the node data and the sub-node data are connected to generate a main body model of the climbing object.
在一些实施例中,攀爬对象为在游戏世界中依附场景物生长、覆盖、蔓延的动态或静态物,包括但不限于游戏世界中的物或由游戏角色、游戏器件等产生的特效,例如,在墙上攀爬的藤蔓,在墙上冰冻的雪花,对角色进行攀爬的特效等,本发明实施例不做具体限定。所述子节点数据基于所述节点数据确定,攀爬对象通过节点生成具有攀爬关系的子节点,子节点又可以作为新的父节点得到子节点,依此类推得到依附场景物攀爬的攀爬对象,各个节点的位置处基于Node节点存储节点数据,用于表征所述攀爬对象在游戏场景中依附场景物攀爬的状态,即根据节点数据可以准确确定出待攀爬对象的位置、攀爬状态、受力情况等内容,因此,节点数据以及子节点数据中均包括各自的节点状态、攀爬状态、受力数据。In some embodiments, the climbing object is a dynamic or static object that grows, covers, and spreads attached to scene objects in the game world, including but not limited to objects in the game world or special effects generated by game characters, game devices, etc., for example , vines climbing on the wall, snowflakes frozen on the wall, special effects for climbing characters, etc., are not specifically limited in this embodiment of the present invention. The child node data is determined based on the node data. The climbing object generates a child node with a climbing relationship through the node, and the child node can be used as a new parent node to obtain a child node, and so on to obtain a climbing object that is attached to the scene object. For climbing objects, the position of each node is based on the Node node to store node data, which is used to represent the climbing state of the climbing object in the game scene, that is, the position of the object to be climbed can be accurately determined according to the node data. Climbing status, stress situation, etc. Therefore, node data and sub-node data include their own node status, climbing status, and stress data.
需要说明的是,为了生成具有程序化、逼真效果的攀爬对象,将节点数据、子节点数据进行连接,生成攀爬对象的主体模型。由于在生成子节点时,可以基于一个根节点逐层迭代得到各个层级的节点,每个节点作为上一层级的子节点,也可以作为下一层级的父节点,因此,连接至少一个节点与子节点,可以得到攀爬对象的主体模型。针对游戏引擎中的各个场景物或者附件物等游戏动画内容,可以通过数据模型进行构建,因此,可以基于节点数据与子节点数据进行连接,建立攀爬对象的主体模型,例如,若攀爬对象为藤蔓,主体模型为基于节点数据与子节点数据构建的枝干模型。It should be noted that, in order to generate a climbing object with procedural and realistic effects, the node data and sub-node data are connected to generate the main model of the climbing object. Since when generating child nodes, nodes of each level can be iterated layer by layer based on a root node, and each node can be used as a child node of the previous level or as a parent node of the next level. Therefore, connecting at least one node with the child node node, the main model of the climbing object can be obtained. For game animation content such as various scenes or accessories in the game engine, it can be constructed through a data model. Therefore, based on the connection between node data and sub-node data, the main model of the climbing object can be established. For example, if the climbing object is a vine, and the main model is a branch model constructed based on node data and sub-node data.
在步骤102,确定所述主体模型的目标支点,并在所述目标支点处构建所述主体模型的附属模型。In step 102, a target fulcrum of the main body model is determined, and an auxiliary model of the main body model is constructed at the target fulcrum.
在一些实施例中,为了实现逼真的攀爬对象的生长效果,针对依附场景物生长、覆盖、蔓延的动态或静态物构建主体模型后,基于主体模型确定目标支点,从而在目标支点处构建附属模型,实现逼真的攀爬效果。附属模型为基于主体模型生长、或者延伸出的物模型,例如,若主体模型为藤蔓枝干模型,附属模型可以为叶子模型,若主体模型为技能闪电主干模型,附属模型可以为技能闪电支干模型,本发明实施例不做具体限定,对应的,目标支点即为主体模型上向不同方向延伸附属模型的位置点。In some embodiments, in order to achieve a realistic growth effect of climbing objects, after constructing the main body model for the growth, coverage, and spreading of the dynamic or static objects attached to the scene, the target fulcrum is determined based on the main body model, so as to construct the attachment at the target fulcrum. model to achieve realistic climbing effects. The subsidiary model is an object model that grows or extends based on the main model. For example, if the main model is a vine branch model, the subsidiary model can be a leaf model. If the main model is a skill lightning trunk model, the subsidiary model can be a skill lightning branch The model is not specifically limited in the embodiment of the present invention. Correspondingly, the target fulcrum is the position point on the main body model that extends the subsidiary model in different directions.
需要说明的是,目标支点在主体模型上可以为一个也可以为多个,同时,在一个目标支点处构建的附属模型可以为一个、也可以为多个,从而实现逼真的攀爬效果,本发明实施例不做具体限定。例如,在藤蔓枝干上的一个目标支点处,可以向相对的2个方向分别构建叶子模型,也可以向任意方向构建一个叶子模型或多个叶子模型。It should be noted that there can be one or more target fulcrums on the main body model, and at the same time, there can be one or more subsidiary models built at a target fulcrum, so as to achieve a realistic climbing effect. The embodiments of the invention are not specifically limited. For example, at a target fulcrum on a vine branch, leaf models can be constructed in two opposite directions, or one leaf model or multiple leaf models can be constructed in any direction.
在步骤103,对所述攀爬对象的主体模型、所述附属模型进行渲染,生成所述攀爬对象的动画。In step 103, the main body model and the auxiliary model of the climbing object are rendered to generate an animation of the climbing object.
在一些实施例中,为了实现攀爬对象动画的生成,通过游戏引擎对主题模型以及在主体模型的各个目标支点处构建的附属模型进行渲染,生成得到攀爬对象的动画。由于主题模型为基于至少一个节点、以及与之对应的子节点构建的,因此,主题模型可以为一段藤蔓枝干的生长动画,也可以一根完整藤蔓枝条的生长动画,具体的,在渲染时,按照各个节点、子节点之间的生长关系。例如,节点位置、生长子节点时间作为攀爬的顺序进行渲染。当然的,在渲染过程中,可以设定主体模型与附属模型的渲染顺序,可以设定在主体模型全部渲染完成后,对各目标支点处的附属模型进行渲染,也可以在渲染主体模型的过程中,完成各个目标支点的渲染后,不比等待主体模型的全部渲染,直接在各个目标支点处渲染附属模型,从而实现不同攀爬效果的攀爬对象程序化制造。例如,藤蔓的攀爬动画可以在枝干攀爬的过程中同时渲染叶子,从而完成藤蔓自然生长的攀爬效果。又如,电流技能的攀爬动画可以在主电流攀爬完角色后,渲染各个小电流,完成技能的程序化攀爬效果。In some embodiments, in order to realize the generation of the animation of the climbing object, the game engine renders the theme model and the subsidiary models constructed at each target fulcrum of the main body model to generate the animation of the climbing object. Since the theme model is constructed based on at least one node and its corresponding child nodes, the theme model can be an animation of the growth of a vine branch, or a growth animation of a complete vine branch. Specifically, when rendering , according to the growth relationship between each node and child nodes. For example, node position, growth child node time are rendered as climbing order. Of course, during the rendering process, you can set the rendering order of the main model and the subsidiary models. You can set that after the main model is completely rendered, the subsidiary models at each target fulcrum will be rendered, or you can set the rendering order of the main model in the process of rendering the main model. In , after the rendering of each target fulcrum is completed, instead of waiting for the full rendering of the main model, the subsidiary model is directly rendered at each target fulcrum, so as to realize the procedural manufacturing of climbing objects with different climbing effects. For example, the climbing animation of vines can render leaves at the same time as the branches climb, so as to complete the climbing effect of vines growing naturally. For another example, the climbing animation of the current skill can render each small current after the main current has climbed the character to complete the programmed climbing effect of the skill.
在一些实施例中,为了进一步限定及说明,如图2所示,步骤102中确定所述主体模型的目标支点包括:步骤1021、步骤1022和步骤1023。In some embodiments, for further definition and description, as shown in FIG. 2 , determining the target fulcrum of the main body model in step 102 includes: step 1021 , step 1022 and step 1023 .
在步骤1021,获取所述主体模型的顶点数据以及待构建附属模型的特征参数。In step 1021, the vertex data of the main body model and the feature parameters of the subsidiary model to be constructed are acquired.
在步骤1022,基于预设特征曲线确定与所述顶点数据、所述特征参数对应的权重值,并结合随机参数计算所述顶点数据对应的概率值。In step 1022, the weight value corresponding to the vertex data and the characteristic parameter is determined based on the preset characteristic curve, and the probability value corresponding to the vertex data is calculated in combination with random parameters.
在步骤1023,若所述概率值大于预设概率阈值,则确定所述顶点数据为目标支点。In step 1023, if the probability value is greater than a preset probability threshold, it is determined that the vertex data is the target fulcrum.
由于主体模型是基于数据点以及不同面片组成的,因此,为了实现程序化、效果逼真的攀爬过程,获取主体模型的订单数据,以及构建附属模型的特征参数,从而结合预设特征曲线确定主体模型上的目标支点。顶点数据即为构建主体模型上的各个顶点的数据内容,特征参数用于表征构建附属模型 的密度,不同位置的主体模型可以对应不同大小的特征参数,例如,藤蔓枝干位置越低的主体模型对应叶子密度大,特征参数越大,藤蔓枝干位置越高的主体模型对应叶子密度小,特征参数越小,对于是否为枝干顶部或底部可以通过攀爬高度TotMeshalLength来确定,一般来说,枝干顶部的叶子概率比底部要低,地上的藤曼叶子比垂直上方的藤曼叶子出现的概率要高,本发明实施例不做具体限定。预设特征曲线为预先配置的不同顶点数据、不同特征参数与权重值之间的对应关系,以便在确定特征参数后,在预设特征曲线中查找顶点数据的权重值,进而,基于权重值计算顶点数据作为目标支点的概率值。具体的,预先定义一个随机参数生成函数,随机生成一个随机参数,与基于预设特征曲线确定的权重值进行相乘,确定顶点数据确定为目标支点的概率值,若此概率值大于预设概率阈值,则说明此顶点数据可以作为目标支点,若此概率值小于或等于预设概率阈值,则说明此顶点数据无法作为目标支点,本发明实施例中对预设概率阈值不做具体限定,一般为0-1之间的数值。Since the main model is composed of data points and different patches, in order to realize the programmatic and realistic climbing process, the order data of the main model and the characteristic parameters of the construction of the auxiliary model are obtained, so as to combine with the preset characteristic curve to determine The target pivot point on the host model. The vertex data is the data content of each vertex on the main model. The characteristic parameters are used to represent the density of the auxiliary model. The main models at different positions can correspond to different sizes of characteristic parameters. For example, the main model with the lower vine branches Corresponding to the higher density of leaves, the larger the characteristic parameters, the higher the position of the vine branches, the lower the density of leaves and the smaller the characteristic parameters of the main model. Whether it is the top or bottom of the branch can be determined by the climbing height TotMeshalLength. Generally speaking, The probability of the leaves on the top of the branch is lower than that at the bottom, and the probability of the leaves of the vines on the ground to appear is higher than that of the leaves on the vertical top, which is not specifically limited in the embodiment of the present invention. The preset characteristic curve is the pre-configured correspondence between different vertex data, different characteristic parameters and weight values, so that after the characteristic parameters are determined, the weight value of the vertex data can be found in the preset characteristic curve, and then calculated based on the weight value The probability value that the vertex data is used as the target pivot point. Specifically, a random parameter generation function is defined in advance, a random parameter is randomly generated, multiplied by the weight value determined based on the preset characteristic curve, and the probability value of determining the vertex data as the target fulcrum is determined. If the probability value is greater than the preset probability threshold, it means that the vertex data can be used as the target fulcrum. If the probability value is less than or equal to the preset probability threshold, it means that the vertex data cannot be used as the target fulcrum. In the embodiment of the present invention, the preset probability threshold is not specifically limited. It is a value between 0-1.
需要说明的是,作为主体模型上的每个顶点数据均需要进行概率值计算,因此,基于程序化的遍历方式对主体模型上的全部点进行判断是否为目标支点。另外,若藤蔓为攀爬对象,对于同一根藤蔓顶部和底部配置条件相同的预设概率阈值,并可以选择顶部与底部不同的烘焙参数烘焙出不同的藤蔓支干,垂直的藤蔓为向上攀爬的部分,即与地面垂直的枝干。It should be noted that each vertex data on the main model needs to be calculated with a probability value, therefore, all points on the main model are judged whether they are target fulcrums based on a programmed traversal method. In addition, if the vine is a climbing object, the same preset probability threshold is configured for the top and bottom of the same vine, and different baking parameters for the top and bottom can be selected to bake different vine branches. Vertical vines are climbing upwards. The part, that is, the branches perpendicular to the ground.
在一些实施例中,为了进一步限定及说明,如图3所示,步骤102中在所述目标支点处构建所述主体模型的附属模型,具体包括:步骤1024和步骤1025。In some embodiments, for further definition and description, as shown in FIG. 3 , in step 102 , an auxiliary model of the main body model is constructed at the target fulcrum, which specifically includes: step 1024 and step 1025 .
在步骤1024,获取待构建附属模型的面片贴图,并基于所述目标支点生成点云数据。In step 1024, the patch texture of the auxiliary model to be constructed is obtained, and point cloud data is generated based on the target fulcrum.
在步骤1025,结合所述特征参数将所述面片贴图配置于所述点云数据处,得到附属模型。In step 1025, the patch map is configured on the point cloud data in combination with the feature parameters to obtain an attached model.
为了使攀爬对象适用于不同计算机设备,实现攀爬的程序化,减少数据渲染压力,针对移动端,如图4所示的藤蔓枝干生长方法示意图,在确定目标支点后,通过面片贴图覆盖的方式在目标支点处生成附属模型。具体的,在目标支点处,通过步进方式或者随机方式生成点云数据,然后基于获取到的附属模型的面片图配置与点云数据处,得到主体模型延伸出的附属模型。In order to make the climbing object suitable for different computer equipment, realize the programming of climbing, and reduce the pressure of data rendering, for the mobile terminal, as shown in Figure 4, the schematic diagram of the vine branch growth method, after determining the target fulcrum, through the patch map The overlay method generates a subsidiary model at the target fulcrum. Specifically, at the target fulcrum, the point cloud data is generated step by step or randomly, and then based on the obtained patch image configuration and point cloud data of the auxiliary model, the auxiliary model extended from the main model is obtained.
需要说明的是,为了减少移动端的数据处理压力,可以将主体模型与附属模型作为一个整体模型进行渲染输出,附属模型在主体模型上目标支点的 确定范围以节点与子节点之间的距离以及特征参数进行确定,即为基于攀爬的密度来进行配置面片贴图,从而得到一个连接性完整的模型,以便进行渲染。It should be noted that in order to reduce the data processing pressure on the mobile terminal, the main model and the subsidiary model can be rendered and output as a whole model. The parameters are determined, which is to configure the patch map based on the climbing density, so as to obtain a fully connected model for rendering.
在一些实施例中,为了进一步限定及说明,如图5所示,与步骤1024、步骤1025并列,步骤102中在所述目标支点处构建所述主体模型的附属模型,具体包括:步骤1026、步骤1027和步骤1028。In some embodiments, in order to further define and illustrate, as shown in FIG. 5 , in parallel with step 1024 and step 1025, in step 102, an auxiliary model of the main body model is constructed at the target fulcrum, specifically including: step 1026, Step 1027 and Step 1028.
在步骤1026,获取所述目标支点所对应的吸附力数据。In step 1026, the adsorption force data corresponding to the target fulcrum is acquired.
在步骤1027,根据所述吸附力数据确定所述目标支点的法线,并通过所述法线、所述目标支点与前序支点的位置差确定第一多边形模型体。In step 1027, the normal of the target fulcrum is determined according to the adsorption force data, and a first polygonal model volume is determined through the normal, the position difference between the target fulcrum and the preceding fulcrum.
在步骤1028,按照所述特征参数将所述第一多边形模型体转换生成附属模型。In step 1028, convert the first polygonal model volume into an auxiliary model according to the characteristic parameters.
为了使攀爬对象适用于不同计算机设备,实现攀爬的程序化,减少数据渲染压力,针对PC端,如图4所示的藤蔓枝干生长方法示意图,在确定目标支点后,基于吸附力数据确定法线,进而来构建目标支点的附属模型。吸附力数据用于表征所述攀爬对象依附所述场景物进行攀爬产生吸附作用的数据,通过设定吸附力数据作为节点数据中受力数据与场景物的模型之间的最大距离,从而使得攀爬对象吸附场景物进行攀爬,吸附力数据作为最大吸附距离基于场景物模型Mesh的所有面,将距离三角面投影点与当前节点距离最近的位置的MaxAdhesionDistance值作为吸附力数据。具体的,在目标支点处按照吸附力数据的反向做法线,即垂直主体模型向外在目标支点处做法线,若目标支点处不存在吸附力数据,则可以基于最近距离的顶点数据的吸附力数据做法线,本发明实施例对于最近距离的顶点数据不做具体限定。另外,前序支点为相对于当前目标支点的前一个目标支点,因此,在确定法线后,通过法线、目标支点与前序支点的位置差确定第一多边形模型体,即基于目标支点与前序支点的位置差得到的是目标支点的前进方向,结合法线可以确定主体模型的切线方向,进而组成一个多边形,作为第一多边形模型体,具体以前进方向Forward向量和切线方向Tangent向量确定目标支点对应的一个多边形,优选为四边形,得到第一多边形模型体,并结合特征参数进行转换得到附属模型,本发明实施例不做具体限定。In order to make the climbing object suitable for different computer equipment, realize the programming of climbing, and reduce the pressure of data rendering, for the PC side, the schematic diagram of the vine branch growth method shown in Figure 4, after determining the target fulcrum, based on the adsorption force data Determine the normal, and then construct the auxiliary model of the target fulcrum. The adsorption force data is used to characterize the data that the climbing object clings to the scene object to climb and generate adsorption effect. By setting the adsorption force data as the maximum distance between the force data in the node data and the model of the scene object, thus Make the climbing object adsorb the scene object to climb, the adsorption force data is used as the maximum adsorption distance based on all the faces of the scene object model Mesh, and the MaxAdhesionDistance value of the position closest to the triangle surface projection point and the current node is used as the adsorption force data. Specifically, at the target fulcrum, follow the reverse direction of the adsorption force data, that is, the vertical main body model outwards and draw a line at the target fulcrum. If there is no adsorption force data at the target fulcrum, the adsorption can be based on the closest distance vertex data. The force data is a normal line, and the embodiment of the present invention does not specifically limit the vertex data with the closest distance. In addition, the previous fulcrum is the previous target fulcrum relative to the current target fulcrum. Therefore, after the normal line is determined, the first polygon model body is determined by the position difference between the normal line, the target fulcrum and the previous fulcrum, that is, based on the target The position difference between the fulcrum and the previous fulcrum is the forward direction of the target fulcrum. Combining with the normal line, the tangent direction of the main model can be determined, and then a polygon is formed as the first polygonal model body. Specifically, the forward vector and tangent of the forward direction The direction Tangent vector determines a polygon corresponding to the target fulcrum, preferably a quadrilateral, to obtain the first polygonal model body, and converts it in combination with characteristic parameters to obtain an auxiliary model, which is not specifically limited in the embodiment of the present invention.
需要说明的是,由于在一个目标支点处可以生成至少一个,因此,结合表征生长密度的特征参数对第一多边形模型体进行转换,即将第一多边形模型体转换至本地空间,然后再通过游戏引擎转换至游戏世界的空间中,得到附属模型,在转换过程中,也包括基于特征参数确定第一多边形模型体的个 数、角度、大小等,例如,一个目标支点生成2个叶子或者更多个叶子,枝干中间位置叶子大、两端叶子小等,转换可以通过设置转换矩阵实现,每个叶子之间角度相差40-45度,如图6所示的基于目标支点确定叶子模型体的示意图,本发明实施例不做具体限定。It should be noted that, since at least one fulcrum can be generated at a target fulcrum, the first polygonal model volume is transformed in combination with the characteristic parameters representing the growth density, that is, the first polygonal model volume is transformed into the local space, and then Then convert it to the space of the game world through the game engine to obtain the attached model. During the conversion process, it also includes determining the number, angle, size, etc. of the first polygonal model body based on the characteristic parameters. For example, a target fulcrum generates 2 There are one leaf or more leaves, the leaves in the middle of the branch are large, and the leaves at both ends are small, etc. The transformation can be realized by setting the transformation matrix. The angle difference between each leaf is 40-45 degrees, as shown in Figure 6. Based on the target pivot The schematic diagram of determining the leaf model body is not specifically limited in this embodiment of the present invention.
在一些实施例中,为了进一步限定及说明,步骤101通过连接所述节点数据与所述子节点数据生成所述攀爬对象的主体模型,具体包括:对所述节点数据以及子节点数据进行线性连接,并通过三维扫描线性连接后的线段,得到所述主体模型;或,对所述节点数据以及子节点数据进行线性连接,并通过定义的第二多边形模型体配置于线性连接后的至少一个线段中,合成所述主体模型。In some embodiments, for further definition and description, step 101 generates the main body model of the climbing object by connecting the node data and the sub-node data, specifically including: linearizing the node data and the sub-node data connected, and obtain the main body model through three-dimensional scanning of the linearly connected line segments; or, linearly connect the node data and sub-node data, and configure the linearly connected second polygonal model body through the defined In at least one line segment, the body model is synthesized.
为了实现程序化的攀爬效果,提高动画生成的数据处理效率,在连接节点数据与子节点数据生成主体模型时,可以对节点数据与子节点数据进行线性连接,可以通过三维图像技术Houdini扫描线性连接后的线段Sweep,得到一个圆柱体,作为主体模型;还可以通过定义的第二多边形模型体配置与连接后的线段中,多各个线段中的多个第二多边形模型体进行复制合成为一整个主体模型,例如,将长方形导入枝干段中,然后将长方形复制各个连线的枝干段中,合成为完整的枝干模型,如图7所示的藤蔓攀爬枝干动画示意图,本发明实施例不做具体限定。In order to realize the procedural climbing effect and improve the data processing efficiency of animation generation, when connecting node data and sub-node data to generate the main model, the node data and sub-node data can be connected linearly, and the linear can be scanned through the three-dimensional image technology Houdini Sweep the connected line segment to obtain a cylinder as the main body model; it can also be configured through the defined second polygonal model body and multiple second polygonal model bodies in the connected line segment. Copy and synthesize into a whole main body model, for example, import the rectangle into the branch section, then copy the rectangle into the branch section of each connection line, and synthesize into a complete branch model, as shown in Figure 7, the climbing branch of the vine The animation schematic diagram is not specifically limited in this embodiment of the present invention.
在一些实施例中,为了进一步限定及说明,如图8所示,步骤101获取攀爬对象的节点数据以及子节点数据之前,所述方法还包括:步骤201和步骤202。In some embodiments, for further limitation and description, as shown in FIG. 8 , before step 101 of obtaining node data and child node data of the climbing object, the method further includes: step 201 and step 202 .
在步骤201,获取待攀爬对象的节点数据。In step 201, node data of an object to be climbed is acquired.
在步骤202,基于生长力数据对所述节点数据进行受力驱动,得到所述攀爬对象的子节点数据。In step 202, force-driven the node data based on the growth force data to obtain sub-node data of the climbing object.
为了实现程序化攀爬动画的生成,具体通过节点数据生成子节点数据,进而完成动画素材的准备,所述节点数据用于表征所述攀爬对象在游戏场景中依附场景物攀爬的状态,节点数据包括节点状态、攀爬状态、受力数据。节点状态用于表征所述节点数据生成子节点数据的状态,即表示基于节点是否可以产生子节点,可以包括生长状态与死亡状态,通过预先设定的攀爬层级的最大层级或攀爬悬停长度的最大长度进行确定。攀爬状态用于表征节点是否处于攀爬过程,预先定义节点攀爬过程与墙体等场景物发生碰撞为攀爬状态,不在攀爬状态的节点,即为通过MaxFloatingLength设定攀爬长度值超过阈值长度,则配置为无攀爬状态。受力数据用于表征攀爬的生长特征, 为用于影响生成子节点的坐标数据内容。In order to realize the generation of programmatic climbing animation, the node data is specifically used to generate sub-node data, and then the preparation of the animation material is completed. The node data is used to represent the climbing state of the climbing object in the game scene attached to the scene object, Node data includes node status, climbing status, and force data. The node state is used to represent the state of the node data to generate child node data, that is, whether the node can generate child nodes, which can include growth status and death status, and the maximum level of the preset climbing level or climbing hover The maximum length of the length to be determined. The climbing state is used to indicate whether the node is in the climbing process. It is pre-defined that the node is in the climbing state when it collides with the wall and other scene objects during the climbing process. A node that is not in the climbing state means that the climbing length value set by MaxFloatingLength exceeds Threshold length, it is configured as no climbing state. The force data is used to characterize the growth characteristics of climbing, and is used to influence the coordinate data content of generating sub-nodes.
需要说明的是,在初始化阶段,对作为根节点的节点数据进行初始化的数值定义,从而选取适合的攀爬起始点,此时,根节点位置的确定可以基于用户选取,也可以基于已产生的操作行为进行确定,本发明实施例不做具体限定。It should be noted that in the initialization phase, the initial numerical definition of the node data as the root node is carried out, so as to select a suitable climbing starting point. The operation behavior is determined, which is not specifically limited in this embodiment of the present invention.
另外,为了基于节点生成具有定制化效果、逼真仿真效果的攀爬子节点,则基于一个虚拟的生长力对节点进行受力影响,从而得到攀爬过程中节点对应的子节点,生长力数据用于表征驱动所述节点数据按照不同受力大小向、不同受力方向进行攀爬的数据。生长力数据包括主方向力数据、随机力数据、吸附力数据、重力数据,针对节点数据中的受力数据,为了使攀爬的凌乱程度更为逼真,定义受力数据与主方向力数据、随机力数据、吸附力数据、重力数据处于相同的坐标系下,从而基于生长力数据对节点数据进行受力驱动。主方向力数据表征向上的正向力,针对坐标系中,设定为一个坐标单元大小的力,如(x,y,z)=(0,1,0),通过主方向力数据对节点数据中的受力数据进行作用,得到的子节点数据中的受力数据在y轴方向上进行了向上的受力结果。随机力数据表征为攀爬凌乱程度的各方向力,通过定义标准大小的坐标单元大小的力,可以为1、0.5等,在各个方向上随机定义,结合预先确定的生长强度参数相乘,如将所有力的方向矢量相加之后相乘得到随机力数据,各个方向力优先确定x轴与z轴上随机产生,从而使的子节点在向上的主方向力作用下,结合x轴、y轴产生左右攀爬凌乱的效果,也可以包含有y轴方向上随机确定,产生上下攀爬的凌乱效果,本发明实施例不做具体限定。吸附力数据用于表征所述攀爬对象依附所述场景物进行攀爬产生吸附作用的数据,通过设定吸附力数据作为节点数据中受力数据与场景物的模型之间的最大距离,从而使得攀爬对象吸附场景物进行攀爬,吸附力数据作为最大吸附距离基于场景物模型Mesh的所有面,将距离三角面投影点与当前节点距离最近的位置的MaxAdhesionDistance值作为吸附力数据。重力数据表征为垂直向下的力,在坐标系中,通过定义y轴方向的(0,-1,0)作为向下的重力数据,从而结合其他力数据进行作用与受力数据,产生随机的向下效果。In addition, in order to generate climbing sub-nodes with customized effects and realistic simulation effects based on nodes, the nodes are affected by force based on a virtual growth force, so as to obtain the sub-nodes corresponding to the nodes during the climbing process. The growth force data is used In order to represent the data that drives the node data to climb according to different force magnitudes and different force directions. The growth force data includes the main direction force data, random force data, adsorption force data, and gravity data. For the force data in the node data, in order to make the climbing more realistic, the force data and the main direction force data, Random force data, adsorption force data, and gravity data are in the same coordinate system, so that the node data is force-driven based on the growth force data. The main direction force data represents the upward positive force. For the coordinate system, the force set as a coordinate unit size, such as (x, y, z) = (0, 1, 0), through the main direction force data to the node The force data in the data is acted on, and the force data in the obtained sub-node data is subjected to an upward force result in the y-axis direction. The random force data is characterized by the force in each direction of the degree of climbing disorder. By defining the force of the size of the coordinate unit of the standard size, it can be 1, 0.5, etc., randomly defined in each direction, and multiplied by the predetermined growth intensity parameters, such as Add the direction vectors of all forces and multiply them to obtain random force data. The forces in each direction are prioritized and randomly generated on the x-axis and z-axis, so that the sub-nodes are combined with the x-axis and y-axis under the upward main direction force. The left and right climbing chaotic effect may also include random determination in the y-axis direction to generate the up and down chaotic effect, which is not specifically limited in this embodiment of the present invention. The adsorption force data is used to characterize the data that the climbing object clings to the scene object to climb and generate adsorption effect. By setting the adsorption force data as the maximum distance between the force data in the node data and the model of the scene object, thus Make the climbing object adsorb the scene object to climb, the adsorption force data is used as the maximum adsorption distance based on all the faces of the scene object model Mesh, and the MaxAdhesionDistance value of the position closest to the triangle surface projection point and the current node is used as the adsorption force data. Gravity data is characterized as a vertical downward force. In the coordinate system, by defining (0, -1, 0) in the y-axis direction as the downward gravity data, it can be combined with other force data to act and force data to generate random downward effect.
需要说明的是,根据节点数据中所包含的节点状态、攀爬状态、受力数据,基于生长力数据对节点数据进行受力驱动,受力驱动即可以为按照不同方向力、不同大小力对节点数据的位置进行受力移动,从而得到因受力而改变位置的子节点数据,因此,子节点数据中同样包括节点状态、攀爬状态、 受力数据,以便使得子节点可以作为节点生成对应的子节点,依次完成攀爬过程。同时,由于节点数据存储于在节点的位置处配置的Node节点中,在攀爬的起始阶段,预先确定一个根节点,此根节点对应生成一条攀爬对象的分支,例如,一个根节点对应一条藤蔓枝干,攀爬对象的攀爬过程即为基于根节点得到根节点可以为一个,也可以为多个,每个根节点可以攀爬得到多条分支。同时,节点受力驱动得到的子节点时是作为父节点,对应的,得到的子节点在受力确定时同样可以作为父节点,得到子节点的子节点,即依次迭代完成攀爬过程中全部节点的生成。另外,由于各个节点可以依次进行迭代,为了确保攀爬对象仍然依附在场景物中进行攀爬,每次迭代过程需要对节点数据中的攀爬状态、节点状态进行更新,从而确定是否继续受力驱动,得到子节点。It should be noted that, according to the node state, climbing state, and force data contained in the node data, the node data is driven by force based on the growth force data. The position of the node data is moved by force, so as to obtain the child node data whose position changes due to the force. Therefore, the child node data also includes node status, climbing status, and force data, so that the child node can be used as a node to generate corresponding child nodes, complete the climbing process in turn. At the same time, since the node data is stored in the Node node configured at the position of the node, at the initial stage of climbing, a root node is predetermined, and this root node corresponds to generate a branch of the climbing object, for example, a root node corresponds to A vine branch, the climbing process of the climbing object is based on the root node to get the root node can be one or multiple, and each root node can climb to get multiple branches. At the same time, when the node is driven by force, the child node is used as the parent node. Correspondingly, the obtained child node can also be used as the parent node when the force is determined, and the child node of the child node is obtained, that is, iteratively completes all climbing processes. Generation of nodes. In addition, since each node can be iterated sequentially, in order to ensure that the climbing object is still attached to the scene object for climbing, each iteration process needs to update the climbing state and node state in the node data, so as to determine whether to continue to be stressed Driven to get child nodes.
在一些实施例中,为了进一步限定及说明,如图9所示,所述生长力数据包括主方向力数据、随机力数据、吸附力数据、重力数据,步骤202基于生长力数据对所述节点数据进行受力驱动,得到所述攀爬对象的子节点数据,具体包括:步骤2021,步骤2022和步骤2023。In some embodiments, for further limitation and description, as shown in FIG. 9 , the growth force data includes main direction force data, random force data, adsorption force data, and gravity data, and step 202 is based on the growth force data. The data is driven by force to obtain the child node data of the climbing object, which specifically includes: Step 2021 , Step 2022 and Step 2023 .
在步骤2021,获取主力方向数据、随机力数据、重力数据以及吸附力数据。In step 2021, the main force direction data, random force data, gravity data and adsorption force data are obtained.
在步骤2022,解析所述节点数据中的受力数据。In step 2022, analyze the force data in the node data.
在步骤2023,在所述吸附力数据的范围内,按照不同坐标方向将所述主力方向数据、所述随机力数据、所述重力数据叠加至所述受力数据中,确定子节点数据的受力数据。In step 2023, within the range of the adsorption force data, the main force direction data, the random force data, and the gravity data are superimposed on the force data according to different coordinate directions, and the child node data are determined. force data.
具体的,由于生长力数据包括主方向力数据、随机力数据、吸附力数据、重力数据,为了实现对节点数据进行受力驱动,从而基于一个节点得到攀爬的子节点,获取主力方向数据、随机力数据、重力数据以及吸附力数据,以便对节点数据中的受力数据进行受力驱动。每个节点数据中的主方向力数据均可以预先配置为一个坐标单元大小的力,通过坐标方式表示为(0,1,0),在与主方向力数据相同的坐标系中,随机配置不同方向,相同坐标单位大小的多个力,作为随机力数据,由于随机力数据的方向是随机的,为了体现攀爬的凌乱程度,结合单位大小相同力的数值与预先配置的生长强度参数相乘,最后得到具体的随机力数据的坐标表达内容。重力数据为已配置的垂直向下的力,通过坐标方式标识为(0,-1,0)。吸附力数据作为限制攀爬对象在场景物表面进行攀爬的参数,基于遍历当前节点的位置与场景物的模型三角面投影点之间的距离差,得到最大距离MaxAdhesionDistance进行确定, 然后通过坐标方式进行表达,本发明实施例不做具体限定。另外,由于节点数据中的受力数据表征攀爬的生长特征,所述受力数据用于表征所述攀爬对象的生长特征,即受力数据可以表示为在与主方向力数据相同的坐标系中,节点所处于的坐标位置,从而在此坐标位置上受到主力方向数据、随机力数据、重力数据、吸附力数据的驱动作用。本发明实施例中,通过主力方向数据、随机力数据、重力数据、吸附力数据对受力数据进行受力驱动可以直接将各个力按照不同力的方向进行叠加,从而自动完成攀爬的子节点的生成。Specifically, since the growth force data includes main direction force data, random force data, adsorption force data, and gravity data, in order to realize force-driven node data, and obtain climbing child nodes based on a node, obtain main direction data, Random force data, gravity data, and adsorption force data for force-driven force data in node data. The main direction force data in each node data can be pre-configured as a force of the size of a coordinate unit, which is expressed as (0, 1, 0) by coordinates. In the same coordinate system as the main direction force data, the random configuration is different Direction, multiple forces with the same coordinate unit size, as random force data, because the direction of random force data is random, in order to reflect the degree of messiness of climbing, the value of the same force with the same unit size is multiplied by the pre-configured growth intensity parameter , and finally get the coordinate expression content of the specific random force data. Gravity data is the configured vertical downward force, marked as (0, -1, 0) by coordinates. The adsorption force data is used as a parameter to limit the climbing of the climbing object on the surface of the scene object. Based on the distance difference between the position of the traversed current node and the projection point of the model triangle surface of the scene object, the maximum distance MaxAdhesionDistance is determined, and then determined by the coordinate method Expressed, the embodiment of the present invention does not specifically limit it. In addition, because the force data in the node data characterizes the growth characteristics of climbing, the force data is used to characterize the growth characteristics of the climbing object, that is, the force data can be expressed as the same coordinates as the main direction force data In the system, the coordinate position of the node is located, so the coordinate position is driven by the main force direction data, random force data, gravity data, and adsorption force data. In the embodiment of the present invention, the force data is driven by the force direction data, random force data, gravity data, and adsorption force data, which can directly superimpose each force according to the direction of different forces, thereby automatically completing the sub-nodes of climbing generation.
需要说明的是,生长强度参数用于表示攀爬过程中攀爬对象的密集程度、生长密度等状态,生成强度参数可以与攀爬层级或攀爬悬停长度之间存在第一范围内的正比关系以及第二范围内的反比关系,或者可以在特定范围内随机选取,还可以通过设定与攀爬对象之间的位置具有正比或反比关系进行配置,从而体现攀爬对象的攀爬特征、凌乱程度等,本发明实施例不做具体限定。It should be noted that the growth intensity parameter is used to indicate the density and growth density of climbing objects during the climbing process, and the generation intensity parameter can be directly proportional to the climbing level or the climbing hover length in the first range relationship and the inverse relationship in the second range, or can be randomly selected within a specific range, and can also be configured by setting a proportional or inverse relationship with the position of the climbing object, so as to reflect the climbing characteristics of the climbing object, The degree of messiness and the like are not specifically limited in this embodiment of the present invention.
在一些实施例中,为了进一步限定及说明,如图10所示,所述节点数据包括节点状态、攀爬状态、受力数据,步骤基于生长力数据对所述节点数据进行受力驱动之后,所述方法还包括:步骤301,步骤302和步骤303。In some embodiments, for further limitation and description, as shown in FIG. 10 , the node data includes node status, climbing status, and force data. After the step is to force-drive the node data based on the growth force data, The method further includes: step 301 , step 302 and step 303 .
在步骤301,确定所述节点数据中的节点状态和/或攀爬状态。In step 301, the node status and/or climbing status in the node data is determined.
在步骤302,若所述节点状态为生长状态,和/或所述攀爬状态为攀爬状态,则判断基于受力驱动得到的受力数据是否匹配预设攀爬特征阈值。In step 302, if the state of the node is a growth state, and/or the climbing state is a climbing state, it is judged whether the force data obtained based on force driving matches a preset climbing characteristic threshold.
在步骤303,若匹配预设攀爬特征阈值,则将受力驱动得到的受力数据确定为所述子节点数据的受力数据。In step 303, if the preset climbing characteristic threshold is matched, the force data obtained by force driving is determined as the force data of the sub-node data.
为了实现攀爬对象在攀爬过程中的凌乱效果,并以程序化形式进行体现,在对受力数据进行驱动后,进一步判断是否可以继续生成攀爬对象的子节点数据。所述节点状态用于表征所述节点数据生成子节点数据的状态,所述攀爬状态用于表征攀爬对象的节点是否处于攀爬过程,由于节点状态、攀爬状态均表征当前节点进行攀爬过程中的状态,因此,在每次对节点数据中的受力数据进行受力驱动后或者同时,需要确定所述节点数据中的节点状态和/或攀爬状态,若节点状态为生长状态,和/或攀爬状态为攀爬状态,则说明当前节点可以进行受力驱动得到子节点,从而判断得到的受力数据是否匹配预设攀爬特征阈值。具体的,由于攀爬状态基于攀爬长度值限定,节点状态基于攀爬层级或攀爬悬停长度限定,因此,预设攀爬特征阈值包括但不限于攀爬长度值的阈值长度、攀爬层级的最大层级或攀爬悬停长度的最大长度等,本发明实施例不做具体限定。若匹配预设攀爬特征阈值,说明受力驱动 得到的子节点存在,则将受力驱动得到的受力数据确定为子节点数据的受力数据。为了实现攀爬对象程序化的逼真攀爬效果,若受力数据不匹配预设攀爬特征阈值,则说明无法基于节点进行受力驱动的得到子节点,即无法在当前节点处继续攀爬,因此,清除受力数据,并同时将节点数据中的节点状态更新为死亡状态,和/或将攀爬状态更新为无攀爬状态In order to realize the messy effect of the climbing object during the climbing process and reflect it in a programmatic form, after driving the force data, it is further judged whether it is possible to continue to generate the sub-node data of the climbing object. The node state is used to represent the state of the node data generating sub-node data, and the climbing state is used to represent whether the node of the climbing object is in the climbing process, because the node state and the climbing state both represent the current node for climbing The state during the climbing process. Therefore, after each force-driven data in the node data or at the same time, it is necessary to determine the node state and/or climbing state in the node data. If the node state is the growth state , and/or the climbing state is the climbing state, it means that the current node can be force-driven to obtain child nodes, so as to determine whether the obtained force data matches the preset climbing characteristic threshold. Specifically, since the climbing state is defined based on the climbing length value, and the node state is defined based on the climbing level or climbing hover length, the preset climbing feature thresholds include but are not limited to the threshold length of the climbing length value, the climbing The embodiment of the present invention does not specifically limit the maximum level of the hierarchy or the maximum length of the climbing and hovering length. If it matches the preset climbing characteristic threshold, it means that the child node obtained by force driving exists, and the force data obtained by force drive is determined as the force data of the child node data. In order to realize the realistic climbing effect of the climbing object program, if the force data does not match the preset climbing characteristic threshold, it means that the force-driven child nodes cannot be obtained based on the node, that is, it is impossible to continue climbing at the current node. So, clear the force data, and at the same time update the node status in the node data to dead status, and/or update the climbing status to no climbing status
本发明实施例提供了一种游戏动画的生成方法,与现有技术相比,本发明实施例通过获取攀爬对象的节点数据以及子节点数据,连接所述节点数据与所述子节点数据生成所述攀爬对象的主体模型,所述节点数据用于表征所述攀爬对象在游戏场景中依附场景物攀爬的状态,所述子节点数据基于所述节点数据确定;确定所述主体模型的目标支点,并在所述目标支点处构建所述主体模型的附属模型;对所述攀爬对象的主体模型、所述附属模型进行渲染,生成所述攀爬对象的动画,实现游戏动画的程序化生成,大大降低了游戏引擎对攀爬类动画的渲染压力以及生成成本,极大地满足了基于不同定制化动画的生成需求,从而提高游戏动画生成效率。The embodiment of the present invention provides a method for generating game animation. Compared with the prior art, the embodiment of the present invention obtains the node data and sub-node data of the climbing object, and connects the node data and the sub-node data to generate The main body model of the climbing object, the node data is used to characterize the climbing state of the climbing object in the game scene, and the sub-node data is determined based on the node data; determine the main body model the target fulcrum, and construct the subsidiary model of the main body model at the target fulcrum; render the main model and the subsidiary model of the climbing object, generate the animation of the climbing object, and realize the game animation Procedural generation greatly reduces the rendering pressure of the game engine on climbing animations and generation costs, and greatly meets the generation needs of different customized animations, thereby improving the efficiency of game animation generation.
根据本发明实施例的另一个方面,还提供了一种用于实施上述图1所示方法的游戏动画的生成装置,如图11所示,该装置包括:获取模块41、构建模块42和生成模块43。According to another aspect of the embodiment of the present invention, there is also provided a device for generating game animation for implementing the method shown in FIG. 1 above. As shown in FIG. Module 43.
获取模块41,用于获取攀爬对象的节点数据以及子节点数据,连接所述节点数据与所述子节点数据生成所述攀爬对象的主体模型,所述节点数据用于表征所述攀爬对象在游戏场景中依附场景物攀爬的状态,所述子节点数据基于所述节点数据确定。An acquisition module 41, configured to acquire node data and sub-node data of a climbing object, connect the node data and the sub-node data to generate a main body model of the climbing object, and the node data is used to characterize the climbing In the game scene, the object is attached to the climbing state of the scene object, and the child node data is determined based on the node data.
构建模块42,用于确定所述主体模型的目标支点,并在所述目标支点处构建所述主体模型的附属模型。A construction module 42, configured to determine a target fulcrum of the main body model, and construct an auxiliary model of the main body model at the target fulcrum.
生成模块43,用于对所述攀爬对象的主体模型、所述附属模型进行渲染,生成所述攀爬对象的动画。The generating module 43 is configured to render the main body model of the climbing object and the auxiliary model, and generate an animation of the climbing object.
在一些实施例中,所述构建模块包括:获取单元、计算单元和第一确定单元。In some embodiments, the construction module includes: an acquisition unit, a calculation unit, and a first determination unit.
获取单元,用于获取所述主体模型的顶点数据以及待构建附属模型的特征参数。The acquisition unit is configured to acquire the vertex data of the main body model and the characteristic parameters of the auxiliary model to be constructed.
计算单元,用于基于预设特征曲线确定与所述顶点数据、所述特征参数对应的权重值,并结合随机参数计算所述顶点数据对应的概率值。A computing unit, configured to determine a weight value corresponding to the vertex data and the feature parameter based on a preset characteristic curve, and calculate a probability value corresponding to the vertex data in combination with random parameters.
第一确定单元,用于若所述概率值大于预设概率阈值,则确定所述顶点数据为目标支点。The first determining unit is configured to determine that the vertex data is a target fulcrum if the probability value is greater than a preset probability threshold.
在一些实施例中,所述构建模块还包括:第一生成单元和配置单元。In some embodiments, the building module further includes: a first generation unit and a configuration unit.
第一生成单元,用于获取待构建附属模型的面片贴图,并基于所述目标支点生成点云数据。The first generation unit is used to obtain the patch texture of the auxiliary model to be constructed, and generate point cloud data based on the target fulcrum.
配置单元,用于结合所述特征参数将所述面片贴图配置于所述点云数据处,得到附属模型。The configuration unit is configured to combine the feature parameters to configure the patch map on the point cloud data to obtain an auxiliary model.
在一些实施例中,所述构建模块还包括:获取单元、第二确定单元和第二生成单元。In some embodiments, the building module further includes: an acquiring unit, a second determining unit, and a second generating unit.
获取单元,用于获取所述目标支点所对应的吸附力数据,所述吸附力数据用于表征所述攀爬对象依附所述场景物进行攀爬产生吸附作用的数据。The acquiring unit is configured to acquire the adsorption force data corresponding to the target fulcrum, and the adsorption force data is used to represent the data of the adsorption effect of the climbing object clinging to the scene object for climbing.
第二确定单元,用于根据所述吸附力数据确定所述目标支点的法线,并通过所述法线、所述目标支点与前序支点的位置差确定第一多边形模型体。The second determination unit is configured to determine the normal line of the target fulcrum according to the adsorption force data, and determine the first polygonal model volume through the normal line, the position difference between the target fulcrum and the preceding fulcrum.
第二生成单元,用于按照所述特征参数将所述第一多边形模型体转换生成附属模型。The second generation unit is configured to transform the first polygonal model volume into an auxiliary model according to the characteristic parameters.
在一些实施例中,所述获取模块包括:扫描单元和配置单元。In some embodiments, the acquisition module includes: a scanning unit and a configuration unit.
在扫描单元,用于对所述节点数据以及子节点数据进行线性连接,并通过三维扫描线性连接后的线段,得到所述主体模型;或,配置单元,用于对所述节点数据以及子节点数据进行线性连接,并通过定义的第二多边形模型体配置于线性连接后的至少一个线段中,合成所述主体模型。In the scanning unit, it is used to linearly connect the node data and sub-node data, and obtain the main body model through three-dimensional scanning of the linearly connected line segments; or, the configuration unit is used to perform linear connection on the node data and sub-nodes The data are linearly connected, and the defined second polygonal model volume is arranged in at least one line segment after the linear connection to synthesize the main body model.
在一些实施例中,所述装置还包括:所述获取模块和所述驱动模块。In some embodiments, the device further includes: the acquiring module and the driving module.
所述获取模块,还用于获取待攀爬对象的节点数据,所述节点数据用于表征所述攀爬对象在游戏场景中依附场景物攀爬的状态。The obtaining module is also used to obtain node data of the object to be climbed, and the node data is used to represent the climbing state of the climbing object attached to scene objects in the game scene.
所述驱动模块,用于基于生长力数据对所述节点数据进行受力驱动,得到所述攀爬对象的子节点数据,所述生长力数据用于表征驱动所述节点数据按照不同受力大小向、不同受力方向进行攀爬的数据。The driving module is used to force-drive the node data based on the growth force data to obtain the sub-node data of the climbing object, and the growth force data is used to represent and drive the node data according to different force levels Climbing data in different directions of force.
在一些实施例中,所述生长力数据包括主方向力数据、随机力数据、吸附力数据、重力数据,所述驱动模块包括:获取单元、解析单元和叠加单元。In some embodiments, the growth force data includes main direction force data, random force data, adsorption force data, and gravity data, and the driving module includes: an acquisition unit, an analysis unit, and a superposition unit.
获取单元,用于获取主力方向数据、随机力数据、重力数据以及吸附力数据。The obtaining unit is used to obtain the main force direction data, random force data, gravity data and adsorption force data.
解析单元,用于解析所述节点数据中的受力数据,所述受力数据用于表征所述攀爬对象的生长特征。The analysis unit is used to analyze the force data in the node data, and the force data is used to characterize the growth characteristics of the climbing object.
叠加单元,用于在所述吸附力数据的范围内,按照不同坐标方向将所述主力方向数据、所述随机力数据、所述重力数据叠加至所述受力数据中,确定子节点数据的受力数据,以得到所述子节点数据。The superposition unit is used to superimpose the main force direction data, the random force data, and the gravity data on the force data according to different coordinate directions within the range of the adsorption force data, and determine the sub-node data Force data to get the child node data.
在一些实施例中,节点数据包括节点状态、攀爬状态、受力数据,所述装置还包括:第一确定模块、判断模块和第二确定模块。In some embodiments, the node data includes node status, climbing status, and force data, and the device further includes: a first determining module, a judging module and a second determining module.
第一确定模块,用于确定所述节点数据中的节点状态和/或攀爬状态,所述节点状态用于表征所述节点数据生成子节点数据的状态,所述攀爬状态用于表征攀爬对象的节点是否处于攀爬过程。The first determination module is used to determine the node state and/or climbing state in the node data, the node state is used to characterize the state of the node data generating sub-node data, and the climbing state is used to represent the climbing state Whether the node of the climbing object is in the climbing process.
判断模块,用于若所述节点状态为生长状态,和/或所述攀爬状态为攀爬状态,则判断基于受力驱动得到的受力数据是否匹配预设攀爬特征阈值。A judging module, configured to judge whether the force data obtained based on force driving matches a preset climbing characteristic threshold if the node state is a growing state, and/or the climbing state is a climbing state.
第二确定模块,用于若匹配预设攀爬特征阈值,则将受力驱动得到的受力数据确定为所述子节点数据的受力数据。The second determining module is configured to determine the force data obtained by force driving as the force data of the sub-node data if it matches the preset climbing characteristic threshold.
本发明实施例提供了一种游戏动画的生成装置,与现有技术相比,本发明实施例通过获取攀爬对象的节点数据以及子节点数据,连接所述节点数据与所述子节点数据生成所述攀爬对象的主体模型,所述节点数据用于表征所述攀爬对象在游戏场景中依附场景物攀爬的状态,所述子节点数据基于所述节点数据确定;确定所述主体模型的目标支点,并在所述目标支点处构建所述主体模型的附属模型;对所述攀爬对象的主体模型、所述附属模型进行渲染,生成所述攀爬对象的动画,实现游戏动画的程序化生成,大大降低了游戏引擎对攀爬类动画的渲染压力以及生成成本,极大地满足了基于不同定制化动画的生成需求,从而提高游戏动画生成效率。The embodiment of the present invention provides a game animation generation device. Compared with the prior art, the embodiment of the present invention obtains the node data and sub-node data of the climbing object, and connects the node data and the sub-node data to generate The main body model of the climbing object, the node data is used to characterize the climbing state of the climbing object in the game scene, and the sub-node data is determined based on the node data; determine the main body model the target fulcrum, and construct the subsidiary model of the main body model at the target fulcrum; render the main model and the subsidiary model of the climbing object, generate the animation of the climbing object, and realize the game animation Procedural generation greatly reduces the rendering pressure of the game engine on climbing animations and generation costs, and greatly meets the generation needs of different customized animations, thereby improving the efficiency of game animation generation.
根据本发明一个实施例提供了一种存储介质,所述存储介质存储有至少一可执行指令,该计算机可执行指令可执行上述任意方法实施例中的游戏动画的生成方法。According to one embodiment of the present invention, a storage medium is provided, the storage medium stores at least one executable instruction, and the computer executable instruction can execute the method for generating a game animation in any of the above method embodiments.
图12示意性地示出了可以实现根据本发明实施例的游戏动画的生成方法的计算机设备,该计算机设备包括处理器1210和以存储器1220形式的存储介质。存储器1220是存储介质的一个示例,其具有用于存储计算机程序/指令1231的存储空间1230。当所述计算机程序/指令1231由处理器1210执行时,可实现上文所描述的游戏动画的生成方法中的各个步骤。FIG. 12 schematically shows a computer device that can implement the method for generating game animation according to an embodiment of the present invention, and the computer device includes a processor 1210 and a storage medium in the form of a memory 1220 . The memory 1220 is an example of a storage medium having a storage space 1230 for storing computer programs/instructions 1231 . When the computer program/instruction 1231 is executed by the processor 1210, various steps in the method for generating game animation described above can be realized.
图13示意性地示出了实现根据本发明实施例的方法的计算机程序产品的框图。所述计算机程序产品包括计算机程序/指令1310,当所述计算机程序/指令1310被诸如图12所示的处理器1210之类的处理器执行时,可实现上文所描述的游戏动画的生成方法中的各个步骤。Fig. 13 schematically shows a block diagram of a computer program product implementing a method according to an embodiment of the present invention. The computer program product includes a computer program/instruction 1310, and when the computer program/instruction 1310 is executed by a processor such as the processor 1210 shown in FIG. 12 , the method for generating game animation described above can be realized each step in the .
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当 理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的游戏动画的生成装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置的程序/指令(例如,计算机程序/指令和计算机程序产品)。这样的实现本发明的程序/指令可以存储在存储介质上,或者可以一个或者多个信号的形式存在,这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all functions of some or all of the components in the device for generating game animation according to the embodiment of the present invention. The present invention can also be implemented as programs/instructions (eg, computer programs/instructions and computer program products) of devices or means for performing part or all of the methods described herein. Such programs/instructions for implementing the present invention may be stored on a storage medium, or may exist in the form of one or more signals, such signals may be downloaded from an Internet website, or provided on a carrier signal, or in any other form supply.
存储介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带、磁盘存储、量子存储器、基于石墨烯的存储介质或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算设备来实现,它们可以集中在单个的计算机设备上,或者分布在多个计算机设备所组成的网络上,在一些实施例中它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别生成个集成电路模块,或者将它们中的多个模块或步骤生成个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。Storage media includes permanent and non-permanent, removable and non-removable media. Information storage can be realized by any method or technology. Information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Flash memory or other memory technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by computing devices. Obviously, those skilled in the art should understand that each module or each step of the present invention described above can be realized by a general-purpose computing device, and they can be concentrated on a single computer device, or distributed in a network formed by multiple computer devices In some embodiments, they may be implemented in program code executable by a computing device, thereby, they may be stored in a storage device to be executed by a computing device, and in some cases, may be implemented in a program code different from that described herein. The steps shown or described are performed sequentially, or they are respectively formed into an integrated circuit module, or multiple modules or steps among them are formed into an integrated circuit module for realization. As such, the present invention is not limited to any specific combination of hardware and software.
上文对本说明书特定实施例进行了描述,其与其它实施例一并涵盖于所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定遵循示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可行的或者有利的。The foregoing describes certain embodiments of the specification which, together with other embodiments, are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily follow the particular order shown, or sequential order, to achieve desirable results. Multitasking and parallel processing are also possible or advantageous in certain embodiments.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由 语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes Other elements not expressly listed, or elements inherent in the process, method, commodity, or apparatus are also included. Without further limitations, an element defined by the phrase "comprising a" does not preclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
应可理解,以上所述实施例仅为举例说明本发明之目的而并非对本发明进行限制。在不脱离本发明基本精神及特性的前提下,本领域技术人员还可以通过其他方式来实施本发明。本发明的范围当以后附的权利要求为准,凡在本说明书一个或多个实施例的精神和原则之内所做的任何修改、等同替换、改进等,皆应涵盖其中。It should be understood that the above-mentioned embodiments are only for the purpose of illustrating the present invention rather than limiting the present invention. Without departing from the basic spirit and characteristics of the present invention, those skilled in the art can implement the present invention in other ways. The scope of the present invention shall be based on the appended claims, and any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be covered therein.

Claims (11)

  1. 一种游戏动画的生成方法,包括:A method for generating game animation, comprising:
    获取攀爬对象的节点数据以及子节点数据,连接所述节点数据与所述子节点数据生成所述攀爬对象的主体模型,所述节点数据用于表征所述攀爬对象在游戏场景中依附场景物攀爬的状态,所述子节点数据基于所述节点数据确定;Obtain the node data and sub-node data of the climbing object, connect the node data and the sub-node data to generate the main body model of the climbing object, and the node data is used to represent the attachment of the climbing object in the game scene The climbing status of scene objects, the child node data is determined based on the node data;
    确定所述主体模型的目标支点,并在所述目标支点处构建所述主体模型的附属模型;determining a target fulcrum of the main body model, and constructing an auxiliary model of the main body model at the target fulcrum;
    对所述攀爬对象的主体模型、所述附属模型进行渲染,生成所述攀爬对象的动画。Rendering the main body model and the subsidiary model of the climbing object to generate an animation of the climbing object.
  2. 根据权利要求1所述的方法,其中,所述确定所述主体模型的目标支点包括:The method according to claim 1, wherein said determining the target fulcrum of said subject model comprises:
    获取所述主体模型的顶点数据以及待构建附属模型的特征参数;Obtaining the vertex data of the main body model and the characteristic parameters of the subsidiary model to be constructed;
    基于预设特征曲线确定与所述顶点数据、所述特征参数对应的权重值,并结合随机参数计算所述顶点数据对应的概率值;determining a weight value corresponding to the vertex data and the feature parameter based on a preset characteristic curve, and calculating a probability value corresponding to the vertex data in combination with random parameters;
    若所述概率值大于预设概率阈值,则确定所述顶点数据为目标支点。If the probability value is greater than a preset probability threshold, it is determined that the vertex data is the target fulcrum.
  3. 根据权利要求2所述的方法,其中,所述在所述目标支点处构建所述主体模型的附属模型包括:The method according to claim 2, wherein said constructing the subsidiary model of the subject model at the target fulcrum comprises:
    获取待构建附属模型的面片贴图,并基于所述目标支点生成点云数据;Obtain the patch texture of the attached model to be constructed, and generate point cloud data based on the target fulcrum;
    结合所述特征参数将所述面片贴图配置于所述点云数据处,得到附属模型。Combining with the characteristic parameters, the patch map is configured on the point cloud data to obtain an auxiliary model.
  4. 根据权利要求2所述的方法,其中,所述在所述目标支点处构建所述主体模型的附属模型包括:The method according to claim 2, wherein said constructing the subsidiary model of the subject model at the target fulcrum comprises:
    获取所述目标支点所对应的吸附力数据,所述吸附力数据用于表征所述攀爬对象依附所述场景物进行攀爬产生吸附作用的数据;Acquiring the adsorption force data corresponding to the target fulcrum, the adsorption force data is used to represent the data that the climbing object climbs by attaching to the scene object to generate adsorption effect;
    根据所述吸附力数据确定所述目标支点的法线,并通过所述法线、所述目标支点与前序支点的位置差确定第一多边形模型体;determining the normal of the target fulcrum according to the adsorption force data, and determining a first polygonal model body through the normal, the position difference between the target fulcrum and the preceding fulcrum;
    按照所述特征参数将所述第一多边形模型体转换生成附属模型。Converting the first polygonal model volume according to the characteristic parameters to generate an auxiliary model.
  5. 根据权利要求1所述的方法,其中,所述通过连接所述节点数据与所述子节点数据生成所述攀爬对象的主体模型包括:The method according to claim 1, wherein the generating the main body model of the climbing object by connecting the node data and the sub-node data comprises:
    对所述节点数据以及子节点数据进行线性连接,并通过三维扫描线性连接后的线段,得到所述主体模型;或,Linearly connect the node data and sub-node data, and obtain the main body model by three-dimensional scanning of the linearly connected line segments; or,
    对所述节点数据以及子节点数据进行线性连接,并通过定义的第二多边形模型体配置于线性连接后的至少一个线段中,合成所述主体模型。The node data and sub-node data are linearly connected, and the defined second polygonal model body is arranged in at least one line segment after the linear connection to synthesize the main body model.
  6. 根据权利要求1-5任一项所述的方法,其中,所述获取攀爬对象的节点数据以及子节点数据之前,所述方法还包括:The method according to any one of claims 1-5, wherein, before obtaining the node data and sub-node data of the climbing object, the method further comprises:
    获取待攀爬对象的节点数据,所述节点数据用于表征所述攀爬对象在游 戏场景中依附场景物攀爬的状态;Obtain the node data of the object to be climbed, and the node data is used to characterize the climbing state of the climbing object in the game scene depending on the scene object;
    基于生长力数据对所述节点数据进行受力驱动,得到所述攀爬对象的子节点数据,所述生长力数据用于表征驱动所述节点数据按照不同受力大小向、不同受力方向进行攀爬的数据。Based on the growth force data, the node data is force-driven to obtain the sub-node data of the climbing object, and the growth force data is used to represent and drive the node data according to different force directions and different force directions. climbing data.
  7. 根据权利要求6所述的方法,其中,所述生长力数据包括主方向力数据、随机力数据、吸附力数据、重力数据,所述基于生长力数据对所述节点数据进行受力驱动,得到所述攀爬对象的子节点数据包括:The method according to claim 6, wherein the growth force data includes main direction force data, random force data, adsorption force data, and gravity data, and the node data is force-driven based on the growth force data to obtain The child node data of the climbing object includes:
    获取主力方向数据、随机力数据、重力数据以及吸附力数据;Obtain main force direction data, random force data, gravity data and adsorption force data;
    解析所述节点数据中的受力数据,所述受力数据用于表征所述攀爬对象的生长特征;Analyzing the force data in the node data, the force data is used to characterize the growth characteristics of the climbing object;
    在所述吸附力数据的范围内,按照不同坐标方向将所述主力方向数据、所述随机力数据、所述重力数据叠加至所述受力数据中,确定子节点数据的受力数据,以得到所述子节点数据。Within the scope of the adsorption force data, according to different coordinate directions, the main force direction data, the random force data, and the gravity data are superimposed on the force data to determine the force data of the sub-node data, so as to Obtain the child node data.
  8. 根据权利要求6所述的方法,其中,所述节点数据包括节点状态、攀爬状态、受力数据,所述基于生长力数据对所述节点数据进行受力驱动之后,所述方法还包括:The method according to claim 6, wherein the node data includes node status, climbing status, and force data, and after the node data is driven by force based on the growth force data, the method further includes:
    确定所述节点数据中的节点状态和/或攀爬状态,所述节点状态用于表征所述节点数据生成子节点数据的状态,所述攀爬状态用于表征攀爬对象的节点是否处于攀爬过程;Determine the node state and/or climbing state in the node data, the node state is used to characterize the state of the node data generating sub-node data, and the climbing state is used to characterize whether the node of the climbing object is in the climbing state climbing process;
    若所述节点状态为生长状态,和/或所述攀爬状态为攀爬状态,则判断基于受力驱动得到的受力数据是否匹配预设攀爬特征阈值;If the node state is a growth state, and/or the climbing state is a climbing state, then judge whether the force data obtained based on the force drive matches the preset climbing characteristic threshold;
    若匹配预设攀爬特征阈值,则将受力驱动得到的受力数据确定为所述子节点数据的受力数据。If it matches the preset climbing characteristic threshold, the force data obtained by force driving is determined as the force data of the sub-node data.
  9. 一种游戏动画的生成装置,包括:A device for generating game animation, comprising:
    获取模块,用于获取攀爬对象的节点数据以及子节点数据,连接所述节点数据与所述子节点数据生成所述攀爬对象的主体模型,所述节点数据用于表征所述攀爬对象在游戏场景中依附场景物攀爬的状态,所述子节点数据基于所述节点数据确定;An acquisition module, configured to acquire node data and sub-node data of a climbing object, connect the node data and the sub-node data to generate a main body model of the climbing object, and the node data is used to characterize the climbing object In the game scene, depending on the climbing state of the scene object, the child node data is determined based on the node data;
    构建模块,用于确定所述主体模型的目标支点,并在所述目标支点处构建所述主体模型的附属模型;a construction module, configured to determine a target fulcrum of the main body model, and construct an auxiliary model of the main body model at the target fulcrum;
    生成模块,用于对所述攀爬对象的主体模型、所述附属模型进行渲染,生成所述攀爬对象的动画。The generating module is used to render the main model of the climbing object and the auxiliary model, and generate animation of the climbing object.
  10. 一种存储介质,所述存储介质中存储有至少一可执行指令,所述可执行指令使处理器执行如权利要求1-8中任一项所述的游戏动画的生成方法对应的操作。A storage medium, wherein at least one executable instruction is stored in the storage medium, and the executable instruction causes a processor to perform operations corresponding to the method for generating game animation according to any one of claims 1-8.
  11. 一种计算机设备,包括存储器、处理器及存储在存储器上的计算机程序/指令,所述处理器执行所述计算机程序/指令时实现根据权利要求1-8中任一项所述的游戏模型的补光方法的步骤。12、一种计算机 程序产品,包括计算机程序/指令,所述计算机程序/指令被处理器执行时实现根据权利要求1-8中任一项所述的游戏模型的补光方法的步骤。A computer device comprising a memory, a processor, and computer programs/instructions stored on the memory, the processor implements the game model according to any one of claims 1-8 when executing the computer program/instructions Steps in the fill light method. 12. A computer program product, comprising computer programs/instructions, when the computer program/instructions are executed by a processor, the steps of the method for supplementing light of a game model according to any one of claims 1-8 are realized.
PCT/CN2021/133604 2021-06-29 2021-11-26 Game animation generation method and apparatus, storage medium, and computer device WO2023273134A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110727441.1A CN113457136B (en) 2021-06-29 2021-06-29 Game animation generation method and device, storage medium and terminal
CN202110727441.1 2021-06-29

Publications (1)

Publication Number Publication Date
WO2023273134A1 true WO2023273134A1 (en) 2023-01-05

Family

ID=77873764

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/133604 WO2023273134A1 (en) 2021-06-29 2021-11-26 Game animation generation method and apparatus, storage medium, and computer device

Country Status (2)

Country Link
CN (1) CN113457136B (en)
WO (1) WO2023273134A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113457136B (en) * 2021-06-29 2022-05-31 完美世界(北京)软件科技发展有限公司 Game animation generation method and device, storage medium and terminal

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120225414A1 (en) * 2011-03-03 2012-09-06 Korea National University Of Education Industry-Academy Coopration Foundation Method and apparatus for teaching biology using virtual living organism
US20130198693A1 (en) * 2011-11-30 2013-08-01 Seyet Llc Three-dimensional animation technology for describing and manipulating plant growth
CN109670454A (en) * 2018-12-21 2019-04-23 Oppo广东移动通信有限公司 A kind of biological information introduces method, biological information introduces device and terminal device
CN110163946A (en) * 2019-05-27 2019-08-23 网易(杭州)网络有限公司 The rendering method and device of vegetation in game
CN110808970A (en) * 2019-10-28 2020-02-18 上海掌门科技有限公司 Method and equipment for providing plant growth information
CN112669430A (en) * 2020-12-23 2021-04-16 北京像素软件科技股份有限公司 Method and device for simulating plant growth, mobile terminal and storage medium
CN113457136A (en) * 2021-06-29 2021-10-01 完美世界(北京)软件科技发展有限公司 Game animation generation method and device, storage medium and terminal

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104794742B (en) * 2015-05-08 2017-12-01 中国科学院软件研究所 A kind of ballooning animation simulation method based on finite element method
CN106582012B (en) * 2016-12-07 2018-12-11 腾讯科技(深圳)有限公司 Climbing operation processing method and device under a kind of VR scene
CN109550250B (en) * 2018-11-16 2022-04-29 网易(杭州)网络有限公司 Virtual object skeleton data processing method and device, storage medium and electronic equipment
CN110930486B (en) * 2019-11-28 2023-11-17 网易(杭州)网络有限公司 Virtual grass rendering method and device in game and electronic equipment
CN112562050B (en) * 2020-11-27 2023-07-18 成都完美时空网络技术有限公司 Virtual object wind animation generation method and device, storage medium and terminal
CN112316429A (en) * 2020-11-27 2021-02-05 腾讯科技(深圳)有限公司 Virtual object control method, device, terminal and storage medium
CN113018865B (en) * 2021-03-31 2022-07-29 腾讯科技(深圳)有限公司 Climbing line generation method and device, computer equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120225414A1 (en) * 2011-03-03 2012-09-06 Korea National University Of Education Industry-Academy Coopration Foundation Method and apparatus for teaching biology using virtual living organism
US20130198693A1 (en) * 2011-11-30 2013-08-01 Seyet Llc Three-dimensional animation technology for describing and manipulating plant growth
CN109670454A (en) * 2018-12-21 2019-04-23 Oppo广东移动通信有限公司 A kind of biological information introduces method, biological information introduces device and terminal device
CN110163946A (en) * 2019-05-27 2019-08-23 网易(杭州)网络有限公司 The rendering method and device of vegetation in game
CN110808970A (en) * 2019-10-28 2020-02-18 上海掌门科技有限公司 Method and equipment for providing plant growth information
CN112669430A (en) * 2020-12-23 2021-04-16 北京像素软件科技股份有限公司 Method and device for simulating plant growth, mobile terminal and storage medium
CN113457136A (en) * 2021-06-29 2021-10-01 完美世界(北京)软件科技发展有限公司 Game animation generation method and device, storage medium and terminal

Also Published As

Publication number Publication date
CN113457136B (en) 2022-05-31
CN113457136A (en) 2021-10-01

Similar Documents

Publication Publication Date Title
WO2019242454A1 (en) Object modeling movement method, apparatus and device
CN109934897B (en) Swing effect simulation system, method, computing device and storage medium
US20090174703A1 (en) Particle-based method of generating and animating three-dimensional vegetation
Zhang et al. Data-driven synthetic modeling of trees
WO2022111037A1 (en) Method and device for rendering virtual object wind animation, program, and readable medium
KR20080090671A (en) Apparatus and method for mapping textures to object model
WO2023273134A1 (en) Game animation generation method and apparatus, storage medium, and computer device
JP2008027441A (en) Method for generating surround visual field including a plurality of elements, surround visual field system for generating surround visual field including a plurality of elements, and method for generating surround visual field to respond to input stream
JP4842242B2 (en) Method and apparatus for real-time expression of skin wrinkles during character animation
CN110298136A (en) Application based on BIM technology scene method of construction and system and in garden landscape digital modeling
CN111915710A (en) Building rendering method based on real-time rendering technology
Lawrence et al. A painting interface for interactive surface deformations
Sen et al. Modelling trees and their interaction with the environment: A survey
CN116894922A (en) Night vision image generation method based on real-time graphic engine
CN113298923B (en) Method, device, equipment and storage medium for generating simulated electronic picture
Murdock Kelly L. Murdock's Autodesk 3ds Max 2016 Complete Reference Guide
Weier et al. Generating and rendering large scale tiled plant populations
CN113470146B (en) Game animation material generation method and device, storage medium and terminal
Knutzen et al. Generating climbing plants using l-systems
Lu et al. Design and implementation of three-dimensional game engine
Catanese et al. Rendering of 3d dynamic virtual environments
Jung et al. Virtual Worlds
Patrick et al. Extending space colonization tree modeling for artistic control and environmental interactions
CN117611781B (en) Flattening method and device for live-action three-dimensional model
CN115423917B (en) Real-time drawing method and system for global three-dimensional wind field

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21948060

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE