Model creation method, apparatus and computer-readable storage medium
Patent Information
- Application Number
- CN202310969406.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-02
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2043-08-02
AI Technical Summary
[0003]在对现有技术的研究和实践过程中发现,在现有的模型创建方法中,在创建多个相同类型、且具有细微区别的模型时,即使每一相同类型的模型之间只是存在细小的区别,也需要重复进行一整个模型的创建流程,使得模型的创建效率较低
[0018]本申请实施例通过获取一虚拟对象类型的预设模板模型的模型曲线信息,预设模板模型包括主体模型和分布在主体模型上的至少一种部件模型,模型曲线信息包括反映主体模型走向的主体曲线,以及关联在主体曲线上的部件模型在主体模型上的分布信息;响应于曲线绘制指令,在模型创建页面中显示绘制的目标主体曲线,基于目标主体曲线生成待创建的对象模型的目标主体模型;根据主体曲线和目标主体曲线,以及主体曲线关联的分布信息,确定部件模型中复用到目标主体模型上的目标部件模型以及目标部件模型的目标分布信息;基于目标分布信息将目标部件模型添加到目标主体模型上,得到根据预设模板模型创建的虚拟对象类型下的对象模型。以此,通过在预设模板模型对应的模型创建页面中绘制目标主体曲线,并根据预设模板模型对应的主体曲线以及部件模型在主体模型上的分布信息,确定部件模型中复用到目标主体曲线生成的目标主体模型上的目标部件模型,以及目标部件模型在目标主体模型上的目标分布信息,从而根据目标分布信息将目标部件模型添加到目标主体模型上,得到对象模型,实现了通过绘制简单曲线来快速的重复创建与预设模板模型相同类型又存在自然区别的对象模型,避免了对相似模型的重复创建,进而提升了模型创建效率。
Smart Images

Figure CN116870473B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of game technology, and more specifically to a model creation method, apparatus, and computer-readable storage medium. Background Technology
[0002] With the rapid development of life and technology, people often use games for entertainment and relaxation. In the creation of game scenes, it's often necessary to create multiple models of the same type for reuse. For example, objects like trees, rocks, and vines need to be displayed in groups or clusters in the environment to create natural and realistic game scenes. Existing model creation methods often involve creating multiple models of the same type with subtle differences to reduce the repetitiveness caused by placing identical objects in the game scene, thereby improving the realism and naturalness of the game scene.
[0003] Research and practice on existing technologies have revealed that in existing model creation methods, when creating multiple models of the same type with subtle differences, even if there are only minor differences between each model of the same type, the entire model creation process needs to be repeated, resulting in low model creation efficiency. Summary of the Invention
[0004] This application provides a model creation method, apparatus, and computer-readable storage medium, which can avoid the repeated creation of similar models and thus improve model creation efficiency.
[0005] This application provides a model creation method, including:
[0006] Obtain model curve information of a preset template model of a virtual object type. The preset template model includes a main model and at least one component model distributed on the main model. The model curve information includes a main curve reflecting the direction of the main model, and the distribution information of the component models associated with the main curve on the main model.
[0007] In response to the curve drawing command, the target subject curve is displayed on the model creation page, and the target subject model of the object model to be created is generated based on the target subject curve.
[0008] Based on the main body curve and the target main body curve, as well as the distribution information associated with the main body curve, determine the target component model reused on the target main body model in the component model and the target distribution information of the target component model;
[0009] Based on the target distribution information, the target component model is added to the target main body model to obtain an object model of the virtual object type created according to the preset template model.
[0010] Accordingly, embodiments of this application provide a model creation apparatus, including:
[0011] An acquisition unit is used to acquire model curve information of a preset template model of a virtual object type. The preset template model includes a main model and at least one component model distributed on the main model. The model curve information includes a main curve reflecting the direction of the main model and distribution information associated with the main curve. The distribution information includes the distribution information of the component models on the main model.
[0012] The drawing unit is used to respond to curve drawing instructions, display the target subject curve to be drawn on the model creation page, and generate the target subject model of the object model to be created based on the target subject curve;
[0013] The determining unit is used to determine the target component model reused on the target main body model and the target distribution information of the target component model based on the main body curve, the target main body curve, and the distribution information associated with the main body curve;
[0014] A creation unit is used to add the target component model to the target main body model based on the target distribution information, thereby obtaining an object model of the virtual object type created according to the preset template model.
[0015] Furthermore, embodiments of this application also provide a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute steps in any of the model creation methods provided in embodiments of this application.
[0016] Furthermore, this application also provides a computer device, including a processor and a memory, wherein the memory stores an application program, and the processor is used to run the application program in the memory to implement the model creation method provided in this application.
[0017] This application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in the model creation method provided in this application.
[0018] This application embodiment obtains model curve information of a preset template model of a virtual object type. The preset template model includes a main model and at least one component model distributed on the main model. The model curve information includes a main curve reflecting the direction of the main model and the distribution information of the component models associated with the main curve on the main model. In response to the curve drawing instruction, the target main curve is displayed on the model creation page, and the target main model of the object model to be created is generated based on the target main curve. According to the main curve, the target main curve, and the distribution information associated with the main curve, the target component model reused on the target main model and the target distribution information of the target component model are determined. Based on the target distribution information, the target component model is added to the target main model to obtain the object model under the virtual object type created according to the preset template model. In this way, by drawing the target main body curve on the model creation page corresponding to the preset template model, and based on the main body curve corresponding to the preset template model and the distribution information of the component models on the main body model, the target component models that are reused on the target main body model generated by the target main body curve in the component models, as well as the target distribution information of the target component models on the target main body model, are determined. Thus, the target component models are added to the target main body model according to the target distribution information to obtain the object model. This realizes the rapid and repeated creation of object models of the same type as the preset template model but with natural differences by drawing simple curves, avoiding the repeated creation of similar models and thus improving the model creation efficiency. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram illustrating an implementation scenario of a model creation method provided in this application embodiment;
[0021] Figure 2 This is a flowchart illustrating a model creation method provided in an embodiment of this application;
[0022] Figure 3a This is a schematic diagram of the lofted model of a model creation method provided in an embodiment of this application;
[0023] Figure 3b This is a schematic diagram of the main model of a model creation method provided in an embodiment of this application;
[0024] Figure 3cThis is another schematic diagram of a main model of a model creation method provided in an embodiment of this application;
[0025] Figure 3d This is a schematic diagram illustrating the main model coarseness setting of a model creation method provided in an embodiment of this application;
[0026] Figure 3e This is a schematic diagram of the first component model distribution setting of a model creation method provided in an embodiment of this application;
[0027] Figure 3f This is a schematic diagram of the tree branch model distribution of a model creation method provided in an embodiment of this application;
[0028] Figure 3g This is another schematic diagram of the branch model distribution of a model creation method provided in this application embodiment;
[0029] Figure 3h This is another schematic diagram of a tree branch model distribution for a model creation method provided in this application embodiment;
[0030] Figure 3i This is a schematic diagram of a tree-type preset template model of a model creation method provided in this application embodiment;
[0031] Figure 3j This is a schematic diagram of the mapping relationship of a model creation method provided in an embodiment of this application;
[0032] Figure 4 This is a schematic diagram of a tree-type object model of a model creation method provided in an embodiment of this application;
[0033] Figure 5 This is a schematic diagram of the structure of the model creation apparatus provided in the embodiments of this application;
[0034] Figure 6 This is a schematic diagram of the structure of the computer device provided in the embodiments of this application. Detailed Implementation
[0035] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0036] This application provides a model creation method, apparatus, and computer-readable storage medium. The model creation apparatus can be integrated into a computer device, which may be a server or a terminal, etc.
[0037] The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN) acceleration services, and big data and artificial intelligence platforms. The terminal can include, but is not limited to, mobile phones, computers, smart voice interaction devices, smart home appliances, vehicle terminals, and aircraft. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited herein.
[0038] Please see Figure 1 Taking the integration of model creation devices into computer equipment as an example, Figure 1 This is a schematic diagram illustrating an implementation scenario of the model creation method provided in this application. The computer device can be a terminal. The computer device can acquire model curve information of a preset template model of a virtual object type. The preset template model includes a main model and at least one component model distributed on the main model. The model curve information includes a main curve reflecting the direction of the main model, and the distribution information of the component models associated with the main curve on the main model. In response to a curve drawing instruction, the target main curve is displayed on the model creation page, and a target main model of the object model to be created is generated based on the target main curve. According to the main curve, the target main curve, and the distribution information associated with the main curve, the target component model reused on the target main model and the target distribution information of the target component model are determined. Based on the target distribution information, the target component model is added to the target main model to obtain an object model of the virtual object type created according to the preset template model.
[0039] It should be noted that, Figure 1 The illustrated scenario of the model creation method is merely an example. The implementation environment of the model creation method described in this application is intended to more clearly illustrate the technical solutions of this application and does not constitute a limitation on the technical solutions provided in this application. Those skilled in the art will recognize that, with the evolution of data processing and the emergence of new business scenarios, the technical solutions provided in this application are equally applicable to similar technical problems.
[0040] The solutions provided in this application are specifically illustrated through the following embodiments. It should be noted that the order of description of the following embodiments is not intended to limit the preferred order of the embodiments.
[0041] This embodiment will be described from the perspective of a model creation device, which can be integrated into a computer device, which can be a terminal and / or a server, and this application does not impose any limitations on this.
[0042] Please see Figure 2 , Figure 2 This is a flowchart illustrating the model creation method provided in an embodiment of this application. The model creation method includes:
[0043] In step 101, the model curve information of a preset template model of a virtual object type is obtained.
[0044] The virtual object type can be a specific type of virtual object. It can be an object with a directional shape or a two-dimensional continuous pattern, or an object existing in a group or cluster. For example, it can be a directional object such as a plant, a stone, or a road. Plants can include trees, vines, flowers, etc., or buildings with two-dimensional continuous patterns such as houses, railings, or walls. The preset template model can be a model used as a template to create multiple similar models under the virtual object type. The preset template model can include a main model and at least one component model distributed on the main model. The main model can be a model reflecting the main trend of the preset template model. For example, when the preset template model is a tree type model, the main model can be a tree trunk shape; when the preset template model is a vine type model, the main model can be a vine stem shape; when the preset template model is a road type model, the main model can be a shape indicating the width, length, and direction of the road, etc. The specific settings can be configured according to actual needs.
[0045] The model curve information can describe the direction and distribution of models in the preset template model. This information can include a main curve reflecting the direction of the main model, and the distribution information of component models associated with the main curve on the main model. The main curve can indicate the direction of the main model. For example, when the preset template model is a plant type model, the main curve can be the curve indicating the trend of the plant's main stem or trunk; when the preset template model is a building type model, the main curve can be the curve indicating the length and direction of buildings such as fences, walls, and buildings; when the preset template model is a road type model, the main curve can be the curve indicating the direction and length of the road's meandering, etc. The component models can be models of components distributed on the main model. For example, they can be models of branches, bark, flowers, leaves, fruits, etc., in a plant type preset template model; models of speed bumps, road signs, potholes, etc., in a road type preset template model; and models of windows, doors, tiles, etc., in a building type preset template model. Optionally, the component models can be directly or indirectly connected to the main model. The distribution information can be information indicating the distribution status of component models on the main model. It can include the distribution range and distribution situation of component models on the main model. The distribution range can be the range of distribution positions on the main model, such as the bottom area, middle area, and upper area of the main model. The distribution situation can include information such as the spacing, density, and direction of component models distributed on the main model.
[0046] Optionally, before obtaining the model curve information of a preset template model of a virtual object type, the preset template model can be created. For example, the main curve corresponding to the preset template model to be created can be drawn on the model creation page, the main model of the preset model template can be created based on the main curve, multiple component models to be added to the main model can be obtained, and the preset template model can be created on the model creation page in response to the setting of the distribution information of the component models on the main model.
[0047] The model creation page can be used to create models. It's important to note that during the creation process, the default template model is still displayed as a main curve on the model creation page; the addition of component models and the final creation effect are not visible. Optionally, a "Curve to Mesh" node can be used to visually display the model creation effect, allowing developers to preview the model's creation result, rather than viewing it as a solid model. Alternatively, since the main model remains a main curve during the default template model creation process, adding component models to the main model actually adds them to the main curve. To achieve a realistic and aesthetically pleasing default template model, a "Curve to Mesh" node can be used to preview the model creation effect. This allows for adjustments to the position of the component models added to the main curve based on the preview, ensuring accurate and realistic addition of component models to the main model when converting the created model to a solid model, thus improving the overall model creation effect.
[0048] There are several ways to draw the main curve corresponding to the preset template model to be created on the model creation page. For example, you can use the curve tool in 3D graphics software (such as Blender) to draw the main curve corresponding to the preset template model to be created on the model creation page.
[0049] After drawing the main curve corresponding to the preset template model to be created on the model creation page, you can create the main model of the preset template based on the main curve. There are several ways to create the main model of the preset template based on the main curve. For example, you can draw the cross-sectional shape corresponding to the main body of the preset template model, and then loft the main curve according to the cross-sectional shape to generate the main model of the preset template model to be created. Specifically, you can use the two-dimensional cross-sectional shape as a section along the path indicated by the main curve to loft and generate the main model of the preset template model.
[0050] For example, to create a preset template model of a tree type, please refer to... Figure 3a , Figure 3a This is a schematic diagram of a lofted model based on a model creation method provided in this application embodiment. It involves drawing a main curve reflecting the trend and length of the tree trunk, as well as drawing the cross-sectional shape of the trunk. This cross-sectional shape can be square, heart-shaped, circular, irregular, etc., thereby generating a lofted model corresponding to the main curve and cross-sectional shape. The main model can then be obtained from the lofted model. Optionally, to achieve a more realistic effect, material, color, and other attributes can be set for the lofted model, making the main model more closely resemble the texture and material of a real tree trunk. For example, please refer to... Figure 3b , Figure 3b This is a schematic diagram of the main model of a model creation method provided in an embodiment of this application, which can be used to obtain the main model after setting the attributes.
[0051] Optionally, to obtain a main model that more closely resembles a real tree trunk, the thickness of the main model can be adjusted. For example, please refer to... Figure 3c , Figure 3c This is another schematic diagram of the main model provided in the embodiments of this application for a model creation method. Based on the actual shape characteristics of a tree trunk, the main model can be set to be thinner at the top and thicker at the bottom to conform to the basic shape of a tree. Specifically, the thickness variation of the main model can be set using the ColorRamp node in 3D graphics software such as Blender. For example, please refer to... Figure 3d , Figure 3d This is a schematic diagram of the thickness setting of the main model in a model creation method provided in this application embodiment. It can be based on the color gradient node ColorRamp, and use a black and white linear gradient to control the thickness change of the curve of the main model. White is thick and black is thin. In this way, the curve of the main model can be set to transition from black to white from top to bottom, thereby achieving the shape of the main model that is thin at the top and thick at the bottom.
[0052] Optionally, there are several ways to obtain multiple component models to be added to the main model. For example, based on the shape characteristics of the virtual object type, the required components for the model under that virtual object type can be pre-modeled, thus obtaining multiple component models to be added to the main model. For instance, taking the creation of a tree-type preset template model as an example, component models of bark, branches, leaves, flowers, and fruits can be created. Optionally, when creating a component model of one type, multiple different component models with slight differences can be created simultaneously to improve the realism and diversity of the model creation. Optionally, since component models of the same type have the same distribution pattern, they can be placed in a group. By setting the distribution information of a component model group, the distribution information of all component models in the group can be synchronously set, thus facilitating the management and setting of these component models and improving modeling efficiency.
[0053] In response to the setting of the distribution information of the component models on the main model, there are multiple ways to create a preset template model on the model creation page. For example, in response to the distribution setting of the first component model in the component model, the distribution of the first component model on the main model can be set. In response to the distribution setting of the second component model in the component model, the distribution position and distribution direction of the second component model on the main model can be set. Based on the first and second component models after the distribution settings, a preset template model is generated on the model creation page.
[0054] The first component model can be a component model that is entirely distributed on the main model, while the second component model can be a component model that is partially distributed on the main model. For example, when the preset template model is a tree type model, the first component model can be a bark model that is entirely distributed on the trunk of the main model, while the second component model can be a branch, leaf, fruit, or other model that is partially distributed on the trunk of the main model. The distribution position can be the location where the second component model is added directly or indirectly to the main model. For example, the second component model can be added indirectly to the main model by adding it to the first component model, or it can be added indirectly to the main model by attaching it to other types of second component models. For example, a branch model can be added directly to the main model, or it can be added indirectly to the main model through a bark model, and a leaf model can be added indirectly to the main model by adding it to a branch model, etc. The distribution direction can be the orientation of the second component model distributed on the main model. In addition, the second component model can be set to rotate its distribution on the main model, and the distribution information such as the number, size, and size variation of the second component model on the main model at different positions can also be set.
[0055] Optionally, to facilitate model creation and later modification, component models can be added to the main model as instances. This allows modification of the component models to modify the instances of the component models added to the preset template model.
[0056] For example, continuing with the example of creating a tree-type preset template model using the 3D graphics software Blender, please refer to... Figure 3e , Figure 3eThis is a schematic diagram of the first component model distribution setting of a model creation method provided in this application embodiment. The bark model can be added to the main model corresponding to the trunk in the form of an instance. The position and quantity of the bark model and other models that need to be scattered on the trunk can be controlled by the Distribute Points on Faces node. At the same time, the attributes of the scattered bark model and other models can be controlled by the Instance on points node. For example, it can include attributes such as type, direction, color, material, size, etc. In order to respond to the distribution setting of the bark model in the component model, the distribution information such as the position, quantity and attributes of the bark model on the trunk model can be set.
[0057] After adding the bark model to the main model, you can add secondary component models such as branches and leaves to further decorate the model. Similarly, you can create some usable branch models and add them as model instances to the trunk. Pay attention to the model's coordinate position, as this will affect the direction and position of the component models. Since the branch models and bark models are distributed differently (not uniformly), you can redefine the distribution direction of the branch models on the trunk model using the Resample Curve node. If you haven't redefining the branch model's distribution direction, you can refer to... Figure 3f , Figure 3f This is a schematic diagram of the branch model distribution in a model creation method provided in this application embodiment. It shows the effect of multiple branch models distributed on the main model without redefining the branch model's distribution direction. Therefore, the distribution spacing of the branch models can be set through the Resample Curve node. For example, please refer to... Figure 3g , Figure 3gThis is another schematic diagram of the branch model distribution in a model creation method provided in this application embodiment. Multiple branch models can be obtained by distributing them according to a set distribution interval. However, at this time, all multiple branch models are distributed on the same side. To enrich the distribution of multiple branch models and make it more natural, the ColorRamp node can be used to control the position and size changes of the branch model distribution. For example, for the distribution position, black positions can be set to have no branch models distributed, and white positions to have branch models distributed. For the size change (smaller black, larger white), smaller branch models can be distributed in black positions, and larger branch models can be distributed in white positions, etc. Branch models closer to the top of the main model can be set to be smaller, and branch models closer to the bottom of the main model to be larger, etc. Furthermore, the Rotate Instances node can be used to control the rotational distribution of the branch models, thereby controlling the rotational distribution of multiple branch models on the main model in response to the branch model distribution settings. For further details, please refer to... Figure 3h , Figure 3h This is another schematic diagram of the tree branch model distribution of a model creation method provided in this application embodiment, which shows the distribution effect of the tree branch model in the figure.
[0058] After setting the distribution of the tree branches, you can continue to add leaf models to the top of the tree model to be created. For example, please refer to... Figure 3i , Figure 3i This is a schematic diagram of a tree-type preset template model provided in an embodiment of this application for model creation, which can produce a complete stylized tree, i.e., a tree-type preset template model. Optionally, other component models can be added to the model according to business needs to enrich the display effect of the preset template model.
[0059] Optionally, there are several ways to set the distribution information of the component model on the main model. For example, it can be set by writing a script, or it can be set by using the geometric node editor provided by the 3D graphics software Blender, according to the distribution pattern of the component model.
[0060] In step 102, in response to the curve drawing instruction, the target subject curve is displayed on the model creation page, and the target subject model of the object model to be created is generated based on the target subject curve.
[0061] The curve drawing command can be a command to request the drawing of a new curve. The target main curve can be the newly drawn main curve, used to reflect the main trend of the model created based on the preset target model. For example, if the preset template model is a tree type, the target main curve can be drawn as a curve in the vertical direction; if the preset template model is a road type, the target main curve can be drawn as a curve curving in the horizontal direction, and so on. The target main model can be a main model created according to the direction indicated by the target main curve. The object model can be a model created using the preset template model as a template. The object model can be a model of the same virtual object type as the preset template model. Based on the difference between the main curve and the target main curve, the object model can be differentiated based on the preset template model. Therefore, based on the newly drawn target main curve and the preset template model, multiple similar models of the same type with minor differences can be quickly created, avoiding the repeated creation process of similar models and improving the modeling efficiency.
[0062] There are several ways to display the target main body curve in the model creation page in response to the curve drawing command. For example, you can select the main body curve of the preset template model in the model creation page and set the main body curve to edit mode. In the edit mode, you can use curves to draw a new target main body curve, and then display the target main body curve in response to the curve drawing command.
[0063] After responding to the curve drawing command and displaying the drawn target body curve on the model creation page, the target body model of the object to be created can be generated based on the target body curve. There are several ways to generate the target body model of the object to be created based on the target body curve. For example, the model curve information can also include the cross-sectional shape information of the body model. Based on this cross-sectional shape information, the cross-sectional shape of the object to be created can be determined, and the target body curve can be lofted according to the cross-sectional shape of the object model to generate the target body model of the object to be created.
[0064] The cross-sectional shape information can be information describing the cross-sectional shape of the main model. This cross-sectional shape information can be set during the creation of the preset template model, so that the cross-sectional shape information corresponding to the main curve associated with the preset template model can be obtained in the editing state of the main curve of the preset template model.
[0065] In step 103, based on the main body curve and the target main body curve, as well as the distribution information associated with the main body curve, the target component model that is reused on the target main body model and the target distribution information of the target component model are determined.
[0066] The target component model can be a component model reused on the target main body model. The type of the target component model can be the same as other component models, but the number can vary depending on the size of the main body curve and the target main body curve. For larger sizes, more target component models need to be added. Optionally, the target component model can be the same as the model in the component model, or it can be a part of the model, or it can include all component models and reuse component models. The specific settings can be configured according to the actual situation. The target distribution information can be information indicating the distribution of the target component model on the main body model. For example, it can indicate the number, location, size, direction, and spacing of the target component models on the main body model. Optionally, the target main body curve drawn in the editing state of the main body curve of the preset template model can be associated with the distribution information set based on the preset template model. For example, during the creation of a preset template model based on the main body curve, the distribution information configured by the nodes provided by the geometry node editor can be mapped to the drawn target main body curve in the editing state of the main body curve, thereby achieving rapid creation of similar models.
[0067] There are several ways to determine the target component model reused on the target main model and the target distribution information of the target component model based on the main curve, the target main curve, and the distribution information associated with the main curve. For example, the main curve may include the first curve start point and the first curve end point. The distribution information can indicate the distribution range and distribution of the component model in the main model from the first curve start point to the first curve end point. In this way, the second curve start point and the second curve end point in the target main curve can be determined. Based on the distribution range of the component model in the main model from the first curve start point to the first curve end point, and the mapping relationship between the first curve start point and the first curve end point and the second curve start point and the second curve end point, the target component model reused on the target main model and the target distribution range of the target component model on the target main model can be determined. Based on the distribution of the component model on the main model, the target distribution of the target component model in the target distribution range can be determined. The target distribution range and the target distribution are used as the target distribution information of the target component model.
[0068] The first curve start point can be the start point of the main curve, and the first curve end point can be the end point of the main curve. For example, the bottom endpoint of the main curve can be the first curve start point, and the top endpoint can be the first curve end point. Alternatively, the leftmost endpoint of the main curve can be set as the first curve start point, and the rightmost endpoint as the first curve end point, etc. The specific settings can be configured according to actual needs. The distribution range can indicate the position range of the component model in the main model from the first curve start point to the first curve end point. For example, it can include position ranges such as bottom, middle, top, left side, and right side. The distribution pattern can indicate the distribution state of the component model in the main model from the first curve start point to the first curve end point. For example, it can include information such as the distribution position, distribution spacing, quantity, size, and direction of the component model in the distribution range. The starting point of the second curve can be the starting point of the target main body curve, and the ending point of the second curve can be the ending point of the target main body curve. The rules for determining the starting point and ending point of the first curve, as well as the starting point and ending point of the second curve, are the same, and the starting point and ending point of the first curve correspond to each other, thus obtaining the mapping relationship between the starting point and ending point of the first curve and the starting point and ending point of the second curve and the ending point of the second curve. The target distribution interval can be the position interval of the target component model on the target main body model, and the target distribution situation can be the distribution situation of the target component model in the target distribution interval.
[0069] The method for determining the target component model reused in the target main body model, and the target distribution range of the target component model on the target main body model, can be varied based on the distribution range of the component model along the path from the starting point to the ending point of the first curve in the main body model, and the mapping relationship between the starting point and ending point of the first curve and the starting point and ending point of the second curve. For example, this mapping relationship could be a mapping relationship between the main body curve based on the path from the starting point to the ending point of the first curve and the target main body curve based on the path from the starting point to the ending point of the second curve. For example, please refer to... Figure 3j , Figure 3j This is a schematic diagram of the mapping relationship of a model creation method provided in this application embodiment. Assuming the length of the main curve is 10cm, a tree branch model is added at the 5cm to 8cm position along the direction from the first curve start point to the first curve end point in the main curve. That is, in the main model, the position interval from the 5cm to the 8cm position along the direction from the first curve start point to the first curve end point is the distribution interval of the tree branch model. At the same time, assuming the length of the target main curve is 20cm, then the corresponding position interval from the 10cm to the 16cm position along the direction from the second curve start point to the second curve end point in the target main model is the target distribution interval of the tree branch model.
[0070] There are several ways to determine the target distribution of the target component model in the target distribution interval based on the distribution of the component model on the main model. For example, the distribution of the component model on the main model can be used as the target distribution of the target component model in the target distribution interval. Alternatively, the distribution in the target distribution interval can be adaptively adjusted according to the specific parameters of the distribution to obtain the target distribution interval. Thus, based on the same distribution, the number of target component models added in the target distribution interval can change when the size of the target distribution interval is different. For example, suppose that in the main model, the interval from 5cm to 8cm along the direction from the start point to the end point of the first curve is the distribution interval of the tree branch model. In the target main model, the interval from 10cm to 16cm along the direction from the start point to the end point of the second curve is the target distribution interval of the tree branch model. At the same time, suppose that there are 4 tree branch models evenly distributed in the distribution interval corresponding to the tree branch models in the main model. Then, correspondingly, there can be 8 tree branch models evenly distributed in the target distribution interval corresponding to the tree branch models in the target main model.
[0071] In step 104, the target component model is added to the target main body model based on the target distribution information to obtain an object model under the virtual object type created according to the preset template model.
[0072] There are several ways to add the target component model to the target main body model based on the target distribution information to obtain an object model of the virtual object type created according to the preset template model. For example, the target component model can be added to the target main body model as an instance based on the target distribution information to obtain an object model created based on the preset template model. In this way, by adding the target component model in the form of an instance, when it is necessary to modify the target component model, the instance of the target component model added to the object model can be modified by modifying the target component model, thereby improving the modeling efficiency.
[0073] When a solid model is needed for use in other 3D software, the object model can be converted into a solid model, resulting in an object solid model created based on a preset template model and belonging to the virtual object type. This object solid model can be a solid object model. Solid models are not easily modified; therefore, a suitable object solid model can be obtained by modifying the object model. Optionally, the Realize Instances node provided by Blender software can be used to convert the object model into a solid model.
[0074] Optionally, the size of the target component model added to the target main model can be adjusted proportionally according to the size ratio between the target main model and the main model. Specifically, before or after adding the target component model to the target main model, the attribute adjustment parameters of the target component model can be determined based on the mapping relationship between the starting point and ending point of the first curve and the starting point and ending point of the second curve, and the attribute adjustment processing of the target component model can be performed based on the attribute adjustment parameters.
[0075] The attribute adjustment parameter is used to adjust the attributes of the target component model. The adjusted attributes can include the size of the target component model. When the length of the main curve from the first curve's starting point to its ending point is 'a', and the length of the target main curve from the second curve's starting point to its ending point is 'b', the attribute adjustment parameter can be b / a. For example, assuming the length of the main curve from the first curve's starting point to its ending point is 15cm, and the size of component model c in the main curve is 2cm, when the length of the target main curve from the second curve's starting point to its ending point is 30cm, the attribute adjustment parameter can be 30 / 15 = 2. Therefore, the size of component model c in the target main curve can be 2 × 2 = 4cm.
[0076] In one embodiment, the corresponding target component model in the created object model can be synchronously adjusted by adjusting the component model in the preset target model. For example, in response to a model adjustment operation on the component model to be adjusted on the preset template model, adjustment information corresponding to the component model to be adjusted can be obtained, and the component model to be adjusted in the object model can be synchronously adjusted based on the adjustment information.
[0077] The component model to be adjusted can be a specific model within a component model that requires adjustment. The model adjustment operation can be any operation performed on the model to be adjusted, such as adjusting its size, color, orientation, or position. The adjustment information can be information describing the adjustments made to the model by the operation to be adjusted.
[0078] Optionally, the preset template model can be configured with multiple component model groups. Each component model group can store a type of component model. The model adjustment operation includes a model distribution adjustment operation. In response to a model adjustment operation on a component model to be adjusted on the preset template model, the method of obtaining the adjustment information corresponding to the component model to be adjusted can include obtaining the distribution adjustment information corresponding to the target component model group in response to a model distribution adjustment operation on a target component model group in the component model group, and synchronously adjusting the component model to be adjusted in the object model based on the adjustment information. This can also include adjusting the distribution of component models added to the object model from the target component model group based on the distribution adjustment information.
[0079] The component model group can be a group containing component models of the same type. The distribution information, such as the distribution range and distribution pattern, of the component models within a component model group can be identical. Therefore, by adjusting the distribution information of the component model group, the distribution of instances belonging to that component model group in the object model can be synchronously adjusted, thereby improving model creation efficiency. The model distribution adjustment operation can be an operation that adjusts the distribution of component models within the target component model group, and the distribution adjustment information can be information describing the adjustment details of the component model distribution within the target component model group.
[0080] Optionally, by replacing the component models in the object model, object models with various effects or object models of other virtual object types can be obtained. Specifically, the model adjustment operation can include a model replacement operation, and the adjustment information includes replacement model information. The method of synchronously adjusting the component models to be adjusted in the object model based on the adjustment information can include determining the replacement model corresponding to the component model to be adjusted based on the replacement model information, and replacing the component model to be adjusted added in the object model with the replacement model.
[0081] The model replacement operation can be used to replace a component model in a preset template model with another component model. The replacement model information can be information indicating the replacement model. The replacement model can be the model that replaces a component model in the preset template model.
[0082] Optionally, during the model creation process for developers, please refer to Figure 4 , Figure 4This is a schematic diagram of a tree-type object model provided in an embodiment of this application. By selecting the drawing tool in the main curve editing mode, multiple curves can be drawn to obtain multiple models of the same type with subtle differences. This greatly improves the efficiency of creating models of the same type with natural differences. The operation is simple, and component models can be added, removed, or modified according to different business needs, realizing batch creation and batch processing of models and improving modeling efficiency. In addition, object models of different virtual object types can also improve modeling efficiency through simple model replacement. It has good extensibility and can not only create linear models such as trees, vines, and roads, but also achieve diversity and flexibility in effects by replacing instance models and drawing curves. Thus, the model creation method provided in this embodiment of the application can generate object models corresponding to target main curves by drawing simple target main curves based on a preset template model and associated main curves, and generating object models corresponding to the target main curves according to the distribution information of the main curves associated with the preset template model. In this way, multiple target main curves can be drawn to quickly create multiple object models of the same virtual object type with natural differences, improving modeling efficiency.
[0083] As can be seen from the above, this application embodiment obtains the model curve information of a preset template model of a virtual object type. The preset template model includes a main model and at least one component model distributed on the main model. The model curve information includes a main curve reflecting the direction of the main model and the distribution information of the component models associated with the main curve on the main model. In response to the curve drawing instruction, the target main curve is displayed on the model creation page, and the target main model of the object model to be created is generated based on the target main curve. According to the main curve and the target main curve, as well as the distribution information associated with the main curve, the target component model reused on the target main model and the target distribution information of the target component model are determined. Based on the target distribution information, the target component model is added to the target main model to obtain the object model under the virtual object type created according to the preset template model. In this way, by drawing the target main body curve on the model creation page corresponding to the preset template model, and based on the main body curve corresponding to the preset template model and the distribution information of the component models on the main body model, the target component models that are reused on the target main body model generated by the target main body curve in the component models, as well as the target distribution information of the target component models on the target main body model, are determined. Thus, the target component models are added to the target main body model according to the target distribution information to obtain the object model. This realizes the rapid and repeated creation of object models of the same type as the preset template model but with natural differences by drawing simple curves, avoiding the repeated creation of similar models and thus improving the model creation efficiency.
[0084] To better implement the above methods, embodiments of the present invention also provide a model creation apparatus, which can be integrated into a computer device, which can be a terminal.
[0085] For example, such as Figure 5 The diagram shown is a schematic representation of the model creation apparatus provided in this application embodiment. The model creation apparatus may include an acquisition unit 201, a drawing unit 202, a determination unit 203, and a creation unit 204, as follows:
[0086] The acquisition unit 201 is used to acquire model curve information of a preset template model of a virtual object type. The preset template model includes a main model and at least one component model distributed on the main model. The model curve information includes a main curve reflecting the direction of the main model and distribution information associated with the main curve. The distribution information includes the distribution information of the component models on the main model.
[0087] The drawing unit 202 is used to respond to the curve drawing command, display the target body curve to be drawn on the model creation page, and generate the target body model of the object model to be created based on the target body curve;
[0088] The determining unit 203 is used to determine the target component model and the target distribution information of the target component model that are reused on the target main body model, based on the main body curve, the target main body curve, and the distribution information associated with the main body curve;
[0089] Create unit 204 to add the target component model to the target main body model based on the target distribution information, and obtain the object model under the virtual object type created according to the preset template model.
[0090] In some embodiments, the creation unit 204 is used for:
[0091] Based on the target distribution information, the target component model is added to the target main body model as an instance to obtain an object model created based on the preset template model;
[0092] The model creation apparatus also includes a solid transformation unit for:
[0093] Convert the object model into an entity model to obtain an object entity model under the virtual object type created based on the preset template model.
[0094] In some embodiments, the main body curve includes a first curve start point and a first curve end point. Distribution information indicates the distribution range and distribution of the component model in the main body model along the path from the first curve start point to the first curve end point. The determining unit 203 is used for:
[0095] Determine the starting point and ending point of the second curve in the target main curve;
[0096] Based on the distribution range of the component model in the main body model from the starting point of the first curve to the ending point of the first curve, and the mapping relationship between the starting point and the ending point of the first curve and the starting point and the ending point of the second curve, determine the target component model that is reused in the target main body model, and the target distribution range of the target component model in the target main body model.
[0097] Based on the distribution of component models on the main model, the target distribution of the target component model in the target distribution interval is determined, and the target distribution interval and the target distribution are used as the target distribution information of the target component model.
[0098] In some embodiments, the model creation apparatus further includes an attribute adjustment unit for:
[0099] Based on the mapping relationship between the starting point and ending point of the first curve, and the starting point and ending point of the second curve, the attribute adjustment parameters of the target component model are determined.
[0100] The target component model is subjected to attribute adjustment processing based on attribute adjustment parameters.
[0101] In some embodiments, the model creation apparatus further includes:
[0102] The curve drawing unit is used to draw the main curve corresponding to the preset template model to be created on the model creation page;
[0103] The main model creation unit is used to create a main model based on a preset model template using the main curve.
[0104] The component model acquisition unit is used to acquire multiple component models to be added to the main model.
[0105] The distribution setting unit is used to create a preset template model in response to the setting of the distribution information of the component model on the main model.
[0106] In some embodiments, the distribution setting unit is configured to:
[0107] In response to the distribution settings of the first component model in the component model, the distribution of the first component model on the main body model is set, and the first component model is a component model that is distributed on the main body model as a whole;
[0108] In response to the distribution settings of the second component model in the component model, the distribution position and distribution direction of the second component model on the main model are set, and the second component model is a component model that is locally distributed on the main model;
[0109] Based on the first and second component models after the distribution settings, a preset template model is generated on the model creation page.
[0110] In some embodiments, the model creation apparatus further includes:
[0111] The adjustment information acquisition unit is used to respond to the model adjustment operation on the model of the component to be adjusted on the preset template model and acquire the adjustment information corresponding to the model of the component to be adjusted.
[0112] The model adjustment unit is used to synchronously adjust the model of the component to be adjusted in the object model based on the adjustment information.
[0113] In some embodiments, the preset template model is configured with multiple component model groups, each component model group storing a type of component model. The model adjustment operation includes a model distribution adjustment operation, and an adjustment information acquisition unit is used for:
[0114] In response to the model distribution adjustment operation for the target component model group in the component model group, obtain the distribution adjustment information corresponding to the target component model group;
[0115] Model adjustment unit, used for:
[0116] The distribution of component models added to the object model is adjusted based on the distribution adjustment information.
[0117] In some embodiments, the model adjustment operation includes a model replacement operation, the adjustment information includes replacement model information, and the model adjustment unit is used for:
[0118] Based on the replacement model information, determine the replacement model corresponding to the model of the component to be adjusted;
[0119] Replace the model of the component to be adjusted added in the object model with the replacement model.
[0120] In practice, each of the above units can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units, please refer to the previous method embodiments, which will not be repeated here.
[0121] As can be seen from the above, in this embodiment of the application, the acquisition unit 201 acquires the model curve information of a preset template model of a virtual object type. The preset template model includes a main model and at least one component model distributed on the main model. The model curve information includes a main curve reflecting the direction of the main model and the distribution information of the component models associated with the main curve on the main model. The drawing unit 202 responds to the curve drawing instruction, displays the target main curve to be drawn on the model creation page, and generates the target main model of the object model to be created based on the target main curve. The determining unit 203 determines the target component model reused on the target main model and the target distribution information of the target component model based on the main curve, the target main curve, and the distribution information associated with the main curve. The creation unit 204 adds the target component model to the target main model based on the target distribution information to obtain the object model under the virtual object type created according to the preset template model. In this way, by drawing the target main body curve on the model creation page corresponding to the preset template model, and based on the main body curve corresponding to the preset template model and the distribution information of the component models on the main body model, the target component models that are reused on the target main body model generated by the target main body curve in the component models, as well as the target distribution information of the target component models on the target main body model, are determined. Thus, the target component models are added to the target main body model according to the target distribution information to obtain the object model. This realizes the rapid and repeated creation of object models of the same type as the preset template model but with natural differences by drawing simple curves, avoiding the repeated creation of similar models and thus improving the model creation efficiency.
[0122] This application also provides a computer device, such as... Figure 6 The diagram illustrates the structure of a computer device according to an embodiment of this application. This computer device can be a terminal; specifically:
[0123] The computer device 300 includes a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 is electrically connected to the memory 302. Those skilled in the art will understand that the computer device structure shown in the figures does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0124] The processor 301 is the control center of the computer device 300. It connects various parts of the computer device 300 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, it performs various functions of the computer device 300 and processes data, thereby monitoring the computer device 300 as a whole.
[0125] In this embodiment, the processor 301 in the computer device 300 loads the instructions corresponding to the processes of one or more applications into the memory 302 according to the following steps, and the processor 301 runs the applications stored in the memory 302 to achieve various functions:
[0126] The acquisition unit is used to acquire model curve information of a preset template model of a virtual object type. The preset template model includes a main model and at least one component model distributed on the main model. The model curve information includes a main curve reflecting the direction of the main model and distribution information associated with the main curve. The distribution information includes the distribution information of the component models on the main model.
[0127] The drawing unit is used to respond to curve drawing instructions, display the target body curve to be drawn on the model creation page, and generate the target body model of the object model to be created based on the target body curve;
[0128] The determination unit is used to determine the target component model and the target distribution information of the target component model that are reused on the target main body model, based on the main body curve, the target main body curve, and the distribution information associated with the main body curve;
[0129] Create a unit to add the target component model to the target main body model based on the target distribution information, and obtain an object model under the virtual object type created according to the preset template model.
[0130] In some embodiments, a target component model is added to a target body model based on target distribution information to obtain an object model of a virtual object type created according to a preset template model, including:
[0131] Based on the target distribution information, the target component model is added to the target main body model as an instance to obtain an object model created based on the preset template model;
[0132] The model creation method provided in this application embodiment also includes:
[0133] Convert the object model into an entity model to obtain an object entity model under the virtual object type created based on the preset template model.
[0134] In some embodiments, the main body curve includes a first curve start point and a first curve end point. Distribution information indicates the distribution range and distribution of the component model in the main body model along the path from the first curve start point to the first curve end point. Based on the main body curve and the target main body curve, as well as the distribution information associated with the main body curve, the target component model reused on the target main body model and the target distribution information of the target component model are determined, including:
[0135] Determine the starting point and ending point of the second curve in the target main curve;
[0136] Based on the distribution range of the component model in the main body model from the starting point of the first curve to the ending point of the first curve, and the mapping relationship between the starting point and the ending point of the first curve and the starting point and the ending point of the second curve, determine the target component model that is reused in the target main body model, and the target distribution range of the target component model in the target main body model.
[0137] Based on the distribution of component models on the main model, the target distribution of the target component model in the target distribution interval is determined, and the target distribution interval and the target distribution are used as the target distribution information of the target component model.
[0138] In some embodiments, the model creation method provided in this application further includes:
[0139] Based on the mapping relationship between the starting point and ending point of the first curve, and the starting point and ending point of the second curve, the attribute adjustment parameters of the target component model are determined.
[0140] The target component model is subjected to attribute adjustment processing based on attribute adjustment parameters.
[0141] In some embodiments, before obtaining the model curve information of a preset template model of a virtual object type, the model creation method provided in this application embodiment further includes:
[0142] Draw the main curves corresponding to the preset template model to be created on the model creation page;
[0143] The main model is created based on the main curve and a preset model template.
[0144] Get multiple component models to be added to the main model;
[0145] In response to the settings of the distribution information of the component models on the main model, a preset template model is created on the model creation page.
[0146] In some embodiments, in response to setting the distribution information of the component models on the main body model, a preset template model is created in the model creation page, including:
[0147] In response to the distribution settings of the first component model in the component model, the distribution of the first component model on the main body model is set, and the first component model is a component model that is distributed on the main body model as a whole;
[0148] In response to the distribution settings of the second component model in the component model, the distribution position and distribution direction of the second component model on the main model are set, and the second component model is a component model that is locally distributed on the main model;
[0149] Based on the first and second component models after the distribution settings, a preset template model is generated on the model creation page.
[0150] In some embodiments, the model creation method provided in this application further includes:
[0151] In response to a model adjustment operation on a component model to be adjusted on a preset template model, obtain the adjustment information corresponding to the component model to be adjusted;
[0152] Based on the adjustment information, the model of the component to be adjusted in the object model is adjusted synchronously.
[0153] In some embodiments, the preset template model is configured with multiple component model groups, each component model group storing a type of component model. The model adjustment operation includes a model distribution adjustment operation. In response to the model adjustment operation on the component model to be adjusted on the preset template model, adjustment information corresponding to the component model to be adjusted is obtained, including:
[0154] In response to the model distribution adjustment operation for the target component model group in the component model group, obtain the distribution adjustment information corresponding to the target component model group;
[0155] Based on the adjustment information, the model of the component to be adjusted in the object model is adjusted synchronously, including:
[0156] The distribution of component models added to the object model is adjusted based on the distribution adjustment information.
[0157] In some embodiments, the model adjustment operation includes a model replacement operation, the adjustment information includes replacement model information, and the model of the component to be adjusted in the object model is synchronously adjusted based on the adjustment information, including:
[0158] Based on the replacement model information, determine the replacement model corresponding to the model of the component to be adjusted;
[0159] Replace the model of the component to be adjusted added in the object model with the replacement model.
[0160] This solution obtains the model curve information of a preset template model of a virtual object type. The preset template model includes a main model and at least one component model distributed on the main model. The model curve information includes a main curve reflecting the direction of the main model and the distribution information of the component models associated with the main curve on the main model. In response to the curve drawing instruction, the target main curve is displayed on the model creation page, and the target main model of the object model to be created is generated based on the target main curve. According to the main curve, the target main curve, and the distribution information associated with the main curve, the target component model reused on the target main model and the target distribution information of the target component model are determined. Based on the target distribution information, the target component model is added to the target main model to obtain the object model under the virtual object type created according to the preset template model. In this way, by drawing the target main body curve on the model creation page corresponding to the preset template model, and based on the main body curve corresponding to the preset template model and the distribution information of the component models on the main body model, the target component models that are reused on the target main body model generated by the target main body curve in the component models, as well as the target distribution information of the target component models on the target main body model, are determined. Thus, the target component models are added to the target main body model according to the target distribution information to obtain the object model. This realizes the rapid and repeated creation of object models of the same type as the preset template model but with natural differences by drawing simple curves, avoiding the repeated creation of similar models and thus improving the model creation efficiency.
[0161] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0162] Optional, such as Figure 6 As shown, the computer device 300 also includes: a touch screen display 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. The processor 301 is electrically connected to the touch screen display 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307. Those skilled in the art will understand that... Figure 6 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0163] The touch display screen 303 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The touch display screen 303 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the computer device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Optionally, the display panel can be configured using a liquid crystal display (LCD), organic light-emitting diode (OLED), or other similar technologies. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program according to the operation commands. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, transmitting the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 301. It can also receive and execute commands from the processor 301. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 301 to determine the type of touch event. Subsequently, the processor 301 provides corresponding visual output on the display panel based on the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the touch display screen 303 to achieve input and output functions. However, in some embodiments, the touch panel and the touch display screen 303 can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 303 can also be used as part of the input unit 306 to achieve input functions.
[0164] The radio frequency circuit 304 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other computer devices, and to transmit and receive signals with network devices or other computer devices.
[0165] Audio circuitry 305 can be used to provide an audio interface between a user and a computer device via a speaker and a microphone. Audio circuitry 305 converts received audio data into electrical signals, transmits them to the speaker, and the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 305, converted back into audio data, and output to processor 301 for processing. The audio data is then transmitted via radio frequency circuitry 304 to, for example, another computer device, or output to memory 302 for further processing. Audio circuitry 305 may also include an earphone jack to facilitate communication between peripheral headphones and the computer device.
[0166] The input unit 306 can be used to receive input numbers, characters, or user characteristic information (such as fingerprints, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
[0167] Power supply 307 is used to supply power to various components of computer device 300. Optionally, power supply 307 can be logically connected to processor 301 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 307 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0168] although Figure 6 As not shown in the diagram, computer equipment 300 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.
[0169] In the above embodiments, the descriptions of each embodiment have their own emphasis. Parts not described in detail in a particular embodiment can be found in the relevant descriptions of other embodiments. It should be noted that the computer device provided in this application embodiment and the applicable model creation method in the above embodiments belong to the same concept, and its specific implementation process is detailed in the above method embodiments, and will not be repeated here.
[0170] As can be seen from the above, the computer device provided in this application embodiment can obtain model curve information of a preset template model of a virtual object type. The preset template model includes a main model and at least one component model distributed on the main model. The model curve information includes a main curve reflecting the direction of the main model and the distribution information of the component models associated with the main curve on the main model. In response to the curve drawing instruction, the target main curve is displayed on the model creation page, and a target main model of the object model to be created is generated based on the target main curve. According to the main curve and the target main curve, as well as the distribution information associated with the main curve, the target component model reused on the target main model and the target distribution information of the target component model are determined. Based on the target distribution information, the target component model is added to the target main model to obtain an object model under the virtual object type created according to the preset template model. In this way, by drawing the target main body curve on the model creation page corresponding to the preset template model, and based on the main body curve corresponding to the preset template model and the distribution information of the component models on the main body model, the target component models that are reused on the target main body model generated by the target main body curve in the component models, as well as the target distribution information of the target component models on the target main body model, are determined. Thus, the target component models are added to the target main body model according to the target distribution information to obtain the object model. This realizes the rapid and repeated creation of object models of the same type as the preset template model but with natural differences by drawing simple curves, avoiding the repeated creation of similar models and thus improving the model creation efficiency.
[0171] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0172] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the model creation methods provided in embodiments of this application. For example, the instructions can execute the following steps:
[0173] The acquisition unit is used to acquire model curve information of a preset template model of a virtual object type. The preset template model includes a main model and at least one component model distributed on the main model. The model curve information includes a main curve reflecting the direction of the main model and distribution information associated with the main curve. The distribution information includes the distribution information of the component models on the main model.
[0174] The drawing unit is used to respond to curve drawing instructions, display the target body curve to be drawn on the model creation page, and generate the target body model of the object model to be created based on the target body curve;
[0175] The determination unit is used to determine the target component model and the target distribution information of the target component model that are reused on the target main body model, based on the main body curve, the target main body curve, and the distribution information associated with the main body curve;
[0176] Create a unit to add the target component model to the target main body model based on the target distribution information, and obtain an object model under the virtual object type created according to the preset template model.
[0177] In some embodiments, a target component model is added to a target body model based on target distribution information to obtain an object model of a virtual object type created according to a preset template model, including:
[0178] Based on the target distribution information, the target component model is added to the target main body model as an instance to obtain an object model created based on the preset template model;
[0179] The model creation method provided in this application embodiment also includes:
[0180] Convert the object model into an entity model to obtain an object entity model under the virtual object type created based on the preset template model.
[0181] In some embodiments, the main body curve includes a first curve start point and a first curve end point. Distribution information indicates the distribution range and distribution of the component model in the main body model along the path from the first curve start point to the first curve end point. Based on the main body curve and the target main body curve, as well as the distribution information associated with the main body curve, the target component model reused on the target main body model and the target distribution information of the target component model are determined, including:
[0182] Determine the starting point and ending point of the second curve in the target main curve;
[0183] Based on the distribution range of the component model in the main body model from the starting point of the first curve to the ending point of the first curve, and the mapping relationship between the starting point and the ending point of the first curve and the starting point and the ending point of the second curve, determine the target component model that is reused in the target main body model, and the target distribution range of the target component model in the target main body model.
[0184] Based on the distribution of component models on the main model, the target distribution of the target component model in the target distribution interval is determined, and the target distribution interval and the target distribution are used as the target distribution information of the target component model.
[0185] In some embodiments, the model creation method provided in this application further includes:
[0186] Based on the mapping relationship between the starting point and ending point of the first curve, and the starting point and ending point of the second curve, the attribute adjustment parameters of the target component model are determined.
[0187] The target component model is subjected to attribute adjustment processing based on attribute adjustment parameters.
[0188] In some embodiments, before obtaining the model curve information of a preset template model of a virtual object type, the model creation method provided in this application embodiment further includes:
[0189] Draw the main curves corresponding to the preset template model to be created on the model creation page;
[0190] The main model is created based on the main curve and a preset model template.
[0191] Get multiple component models to be added to the main model;
[0192] In response to the settings of the distribution information of the component models on the main model, a preset template model is created on the model creation page.
[0193] In some embodiments, in response to setting the distribution information of the component models on the main body model, a preset template model is created in the model creation page, including:
[0194] In response to the distribution settings of the first component model in the component model, the distribution of the first component model on the main body model is set, and the first component model is a component model that is distributed on the main body model as a whole;
[0195] In response to the distribution settings of the second component model in the component model, the distribution position and distribution direction of the second component model on the main model are set, and the second component model is a component model that is locally distributed on the main model;
[0196] Based on the first and second component models after the distribution settings, a preset template model is generated on the model creation page.
[0197] In some embodiments, the model creation method provided in this application further includes:
[0198] In response to a model adjustment operation on a component model to be adjusted on a preset template model, obtain the adjustment information corresponding to the component model to be adjusted;
[0199] Based on the adjustment information, the model of the component to be adjusted in the object model is adjusted synchronously.
[0200] In some embodiments, the preset template model is configured with multiple component model groups, each component model group storing a type of component model. The model adjustment operation includes a model distribution adjustment operation. In response to the model adjustment operation on the component model to be adjusted on the preset template model, adjustment information corresponding to the component model to be adjusted is obtained, including:
[0201] In response to the model distribution adjustment operation for the target component model group in the component model group, obtain the distribution adjustment information corresponding to the target component model group;
[0202] Based on the adjustment information, the model of the component to be adjusted in the object model is adjusted synchronously, including:
[0203] The distribution of component models added to the object model is adjusted based on the distribution adjustment information.
[0204] In some embodiments, the model adjustment operation includes a model replacement operation, the adjustment information includes replacement model information, and the model of the component to be adjusted in the object model is synchronously adjusted based on the adjustment information, including:
[0205] Based on the replacement model information, determine the replacement model corresponding to the model of the component to be adjusted;
[0206] Replace the model of the component to be adjusted added in the object model with the replacement model.
[0207] This solution obtains the model curve information of a preset template model of a virtual object type. The preset template model includes a main model and at least one component model distributed on the main model. The model curve information includes a main curve reflecting the direction of the main model and the distribution information of the component models associated with the main curve on the main model. In response to the curve drawing instruction, the target main curve is displayed on the model creation page, and the target main model of the object model to be created is generated based on the target main curve. According to the main curve, the target main curve, and the distribution information associated with the main curve, the target component model reused on the target main model and the target distribution information of the target component model are determined. Based on the target distribution information, the target component model is added to the target main model to obtain the object model under the virtual object type created according to the preset template model. In this way, by drawing the target main body curve on the model creation page corresponding to the preset template model, and based on the main body curve corresponding to the preset template model and the distribution information of the component models on the main body model, the target component models that are reused on the target main body model generated by the target main body curve in the component models, as well as the target distribution information of the target component models on the target main body model, are determined. Thus, the target component models are added to the target main body model according to the target distribution information to obtain the object model. This realizes the rapid and repeated creation of object models of the same type as the preset template model but with natural differences by drawing simple curves, avoiding the repeated creation of similar models and thus improving the model creation efficiency.
[0208] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0209] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0210] Since the instructions stored in the computer-readable storage medium can execute the steps in any of the model creation methods provided in the embodiments of this application, the beneficial effects that any of the model creation methods provided in the embodiments of this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0211] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations of the above embodiments.
[0212] The above provides a detailed description of a model creation method, apparatus, and computer-readable storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A model creation method, characterized in that, include: Obtain model curve information of a preset template model of a virtual object type. The preset template model includes a main model and at least one component model distributed on the main model. The model curve information includes a main curve reflecting the direction of the main model and distribution information of the component models associated with the main curve on the main model. The main curve includes a first curve start point and a first curve end point. The distribution information indicates the distribution range and distribution of the component models in the main model from the first curve start point to the first curve end point. In response to the curve drawing command, the target subject curve is displayed on the model creation page, and the target subject model of the object model to be created is generated based on the target subject curve. Determine the starting point and ending point of the second curve in the target main curve; Based on the distribution range of the component model in the main body model from the starting point of the first curve to the ending point of the first curve, and the mapping relationship between the starting point and the ending point of the first curve and the starting point and the ending point of the second curve, the target component model reused in the target main body model and the target distribution range of the target component model in the target main body model are determined. Based on the distribution of the component models on the main body model, the target distribution of the target component models in the target distribution interval is determined, and the target distribution interval and the target distribution are used as the target distribution information of the target component models; Based on the target distribution information, the target component model is added to the target main body model to obtain an object model of the virtual object type created according to the preset template model.
2. The model creation method as described in claim 1, characterized in that, The step of adding the target component model to the target main body model based on the target distribution information to obtain an object model of the virtual object type created according to the preset template model includes: Based on the target distribution information, the target component model is added to the target main body model in the form of an instance to obtain an object model created based on the preset template model; The method further includes: The object model is converted into an entity model to obtain an object entity model of the virtual object type created based on the preset template model.
3. The model creation method as described in claim 1, characterized in that, The method further includes: Based on the mapping relationship between the first curve start point and the first curve end point, and the second curve start point and the second curve end point, the attribute adjustment parameters of the target component model are determined; The target component model is subjected to attribute adjustment processing based on the attribute adjustment parameters.
4. The model creation method as described in claim 1, characterized in that, Before obtaining the model curve information of a preset template model of a virtual object type, the method further includes: Draw the main curves corresponding to the preset template model to be created on the model creation page; The main model of the preset template model is created based on the main curve; Obtain multiple component models to be added to the main model; In response to the setting of the distribution information of the component model on the main body model, the preset template model is created in the model creation page.
5. The model creation method as described in claim 4, characterized in that, In response to setting the distribution information of the component models on the main model, creating the preset template model on the model creation page includes: In response to the distribution setting of the first component model in the component model, the distribution of the first component model on the main body model is set, wherein the first component model is a component model that is distributed entirely on the main body model; In response to the distribution settings of the second component model in the component model, the distribution position and distribution direction of the second component model on the main body model are set, and the second component model is a component model that is locally distributed on the main body model; Based on the first component model and the second component model after the distribution settings, the preset template model is generated on the model creation page.
6. The model creation method according to any one of claims 1 to 5, characterized in that, The method further includes: In response to a model adjustment operation on the model of the component to be adjusted on the preset template model, the adjustment information corresponding to the model of the component to be adjusted is obtained; Based on the adjustment information, the model of the component to be adjusted in the object model is adjusted synchronously.
7. The model creation method as described in claim 6, characterized in that, The preset template model is configured with multiple component model groups, each component model group storing a type of component model. The model adjustment operation includes a model distribution adjustment operation. In response to the model adjustment operation on the component model to be adjusted on the preset template model, obtaining the adjustment information corresponding to the component model to be adjusted includes: In response to a model distribution adjustment operation for a target component model group in the component model group, obtain the distribution adjustment information corresponding to the target component model group; The step of synchronously adjusting the model of the component to be adjusted in the object model based on the adjustment information includes: Based on the distribution adjustment information, the distribution of the component models added to the object model in the target component model group is adjusted.
8. The model creation method as described in claim 6, characterized in that, The model adjustment operation includes a model replacement operation, the adjustment information includes replacement model information, and the synchronous adjustment of the component model to be adjusted in the object model based on the adjustment information includes: Based on the replacement model information, determine the replacement model corresponding to the model of the component to be adjusted; Replace the model of the component to be adjusted in the object model with the replacement model.
9. A model creation apparatus, characterized in that, include: An acquisition unit is used to acquire model curve information of a preset template model of a virtual object type. The preset template model includes a main model and at least one component model distributed on the main model. The model curve information includes a main curve reflecting the direction of the main model and distribution information associated with the main curve. The distribution information includes the distribution information of the component models on the main model. The main curve includes a first curve start point and a first curve end point. The distribution information indicates the distribution range and distribution of the component models in the main model from the first curve start point to the first curve end point. The drawing unit is used to respond to curve drawing instructions, display the target subject curve to be drawn on the model creation page, and generate the target subject model of the object model to be created based on the target subject curve; The determining unit is used to determine the starting point and ending point of the second curve in the target main body curve, and based on the distribution range of the component model in the main body model from the starting point to the ending point of the first curve, and the mapping relationship between the starting point and the ending point of the first curve and the starting point and the ending point of the second curve, determine the target component model reused on the target main body model in the component model, and the target distribution range of the target component model on the target main body model, and based on the distribution of the component model on the main body model, determine the target distribution of the target component model in the target distribution range, and use the target distribution range and the target distribution as the target distribution information of the target component model; A creation unit is used to add the target component model to the target main body model based on the target distribution information, thereby obtaining an object model of the virtual object type created according to the preset template model.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the steps of the model creation method according to any one of claims 1 to 8.
11. A computer device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the model creation method of any one of claims 1 to 8.
Citation Information
Patent Citations
Tree modeling method, device and equipment
CN112634432A
Three-dimensional model generation method and device, electronic equipment and computer storage medium
CN115100358A