Special effect generation method and device, computer equipment and storage medium

By obtaining the feature data of the target object and combining the special effects matching relationship, special effects are dynamically mounted, the problem of limited texture in the special effects prop package is solved, and diversified generation of special effects and user experience is achieved.

CN119152083APending Publication Date: 2024-12-17BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202310706064.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-14
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

In the prior art, the texture in the special effect prop package is limited, resulting in a single special effect generation, which makes it difficult to bring rich user experience to the user.

Method used

By obtaining the feature data of the target object, combining the matching relationship between the special effects and the target feature data, dynamically mount the corresponding special effects to ensure that the special effects are mounted differently by different target objects, thereby improving the diversity and user experience of the special effects.

Benefits of technology

It realizes the diversified generation of special effects, improves the user experience, and ensures the richness and diversity of special effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119152083A_ABST
    Figure CN119152083A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of special effect generation, and discloses a special effect generation method and device, computer equipment and a storage medium. The method comprises the following steps: in response to a trigger operation of a current target object on a special effect, obtaining at least one piece of feature data corresponding to the current target object based on the trigger operation; determining target feature data of the current target object based on the at least one feature data; determining a target special effect corresponding to the target feature data based on a matching relationship between the target feature data and the special effect; and mounting the target special effect to a preset part of the target object according to a preset mode. According to the technical scheme, it is guaranteed that the target special effects mounted on different target objects are different, special effect props are richer, and the special effect use experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of special effect generation, and in particular to a special effect generation method, device, computer equipment and storage medium. Background Art

[0002] With the development of special effects technology, special effects props in various applications have emerged. At present, the special effects in various applications are mostly built-in special effects props packages with a limited number of textures to achieve special effects of switching between multiple textures. However, for different users, the generation of special effects is the same, which makes it difficult to provide users with a rich special effects experience. Summary of the invention

[0003] In view of this, the present disclosure provides a method, apparatus, computer device and storage medium for generating special effects to solve the problem of poor special effects usage experience.

[0004] In a first aspect, the present disclosure provides a method for generating special effects, comprising: in response to a trigger operation of the current target object for the special effect, acquiring at least one feature data corresponding to the current target object based on the trigger operation; determining target feature data of the current target object based on the at least one feature data; determining a target special effect corresponding to the target feature data based on a matching relationship between the target feature data and the special effect; and mounting the target special effect to a preset position of the target object in a preset manner.

[0005] In the method for generating special effects provided by the embodiments of the present disclosure, target feature data corresponding to different target objects are not the same. The target feature data of the current target object is detected, and the corresponding target special effect is determined in combination with the matching relationship between the target feature data and the special effect, and the target special effect is mounted on a preset position of the target object. This ensures that the target special effects mounted on different target objects are different, making the generation of special effects richer, making the special effects more diversified, and improving the user experience of special effects.

[0006] In a second aspect, the present disclosure provides a special effect generation device, which includes: a trigger module, which is used to respond to a trigger operation of the current target object for the special effect, and obtain feature data corresponding to the current target object based on the trigger operation; a feature determination module, which is used to determine target feature data of the current target object based on at least one feature data; a special effect determination module, which is used to determine a target special effect corresponding to the target feature data based on a matching relationship between the target feature data and the special effect; and a mounting module, which is used to mount the target special effect to a preset position of the target object in a preset manner.

[0007] In a third aspect, the present disclosure provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for generating special effects of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0008] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for generating special effects of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0010] Figure 1 is a flowchart of a method for generating special effects according to an embodiment of the present disclosure;

[0011] Figure 2 is a flowchart of another method for generating special effects according to an embodiment of the present disclosure;

[0012] Figure 3 is a flowchart of another method for generating special effects according to an embodiment of the present disclosure;

[0013] Figure 4 is a schematic diagram of generating a wing special effect prop according to an embodiment of the present disclosure;

[0014] Figure 5 is a structural block diagram of a device for generating special effects according to an embodiment of the present disclosure;

[0015] Figure 6 It is a schematic diagram of the hardware structure of the computer device of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0016] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0017] At present, most of the special effect props in various applications in the related art have a limited number of textures built into the special effect props to achieve special effects of switching between multiple textures. However, for different users, the generation of special effects is the same, resulting in a relatively single and insufficient special effect, which makes it difficult to provide users with a rich special effect experience.

[0018] Based on this, the technical solution disclosed in the present invention obtains the target feature data of the current target object to determine the corresponding target special effect, and mounts the target special effect to the target object. The target feature data corresponding to different target objects are not the same, and the special effects generated thereby are also different, enriching the user experience of the special effects.

[0019] According to an embodiment of the present disclosure, an embodiment of a method for generating special effects is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0020] In this embodiment, a method for generating special effects is provided, which can be used in the above-mentioned computer devices, such as mobile phones, tablet computers, computers, etc. Figure 1 is a flow chart of a method for generating special effects according to an embodiment of the present disclosure, such as Figure 1 As shown, the process includes the following steps:

[0021] Step S101 , in response to a triggering operation of a current target object for a special effect, obtaining at least one feature data corresponding to the current target object based on the triggering operation.

[0022] The target object is a user who triggers the application to generate special effects, and the application is installed in the computer device. An application icon is displayed on the display screen of the computer device, and the target object can select the application icon through a touch screen, keyboard or mouse to start the application.

[0023] After the application is started, the target object can select a special effect function in the display interface of the application, or issue a specified gesture command to trigger the special effect function, or issue a specified action (such as turning a circle) to trigger the special effect function. Correspondingly, the application in the computer device can respond to the current target object's triggering operation on the special effect function and enter the special effect generation interface.

[0024] Feature data is used to characterize the feature attributes corresponding to the target object. Different target objects have different feature attributes. The feature data may specifically include body proportions, clothing, space environment, etc. When the application enters the special effects generation interface, it will trigger the camera of the computer device to start, collect the image of the target object through the camera, and parse one or more feature data corresponding to the target object from the image.

[0025] Step S102: determining target feature data of the current target object based on at least one feature data.

[0026] The target feature data is obtained by fusing at least one feature data. Specifically, when there is one feature data, the feature data is the final target feature data; when there are multiple feature data, the multiple feature data are weighted and fused to obtain the final target feature data.

[0027] Step S103, based on the matching relationship between the target feature data and the special effects, determine the target special effects corresponding to the target feature data.

[0028] There is a matching relationship between special effects and target feature data, that is, different target feature data corresponds to different special effects. Specifically, the matching relationship is pre-built by the technician and stored in the computer device or the cloud. Special effects of different styles are stored in a special effect set, which can be stored in the cloud to break through the volume limit of the special effect prop package and facilitate the request to obtain rich special effect resources from the cloud server during the special effect generation process.

[0029] In a specific implementation, the computer device can generate a request message for a special effect based on the target feature data it obtains, and send the request message to the cloud server. Accordingly, after receiving the request message, the cloud server combines the target feature data carried in the request message with the matching relationship between the target feature data and the special effect, selects the corresponding target special effect from the special effect set, and sends it to the computer device. The computer device can then receive the target special effect sent by the cloud server.

[0030] Step S104, mounting the target special effect to a preset position of the target object according to a preset method.

[0031] The preset mode is a dynamic gradual appearance mode of a preset special effect. The preset part is a preset special effect mounting position. By obtaining the human body contour of the target object, the preset part to be mounted is extracted from the human body contour, and the target special effect is blocked, that is, the front side of the preset part of the target object is blocked, and the back side is not blocked, so that the target special effect is mounted on the preset part of the target object.

[0032] Specifically, the input information of the camera on the computer device is identified through computer vision and artificial intelligence algorithms, the human joint point position and rotation matrix of the target object are obtained, and the portrait and background areas are separated, and the mask of the portrait area and the front and back information of the character are output. Then, the spatial position of the special effect props is set according to the human joint point position and the rotation matrix, and the occlusion relationship between the special effect props and the character is set according to the mask of the portrait area and the front and back information of the character. Specifically, only when the character is facing the camera lens of the computer device, it needs to be occluded. In this way, the target special effect can be mounted in the target object. While mounting, the target special effect is dynamically displayed in a preset manner, realizing the dynamic gradual appearance effect of the target special effect.

[0033] In the special effects generation method provided in this embodiment, the target feature data corresponding to different target objects are not the same. The target feature data of the current target object is detected, and the corresponding target special effect is determined in combination with the matching relationship between the target feature data and the special effect, and the target special effect is mounted on a preset position of the target object. This ensures that the target special effects mounted on different target objects are different, making the generation of special effects richer, making the special effects more diversified, and improving the user experience of special effects.

[0034] In this embodiment, a method for generating special effects is provided, which can be used in the above-mentioned computer devices, such as mobile phones, tablet computers, computers, etc. Figure 2 is a flow chart of a method for generating special effects according to an embodiment of the present disclosure, such as Figure 2 As shown, the process includes the following steps:

[0035] Step S201, in response to a trigger operation of the current target object for a special effect, at least one feature data corresponding to the current target object is acquired based on the trigger operation. Detailed descriptions refer to the relevant descriptions of the corresponding steps in the above embodiment, which will not be repeated here.

[0036] Step S202: determining target feature data of the current target object based on at least one feature data.

[0037] Specifically, the above step S202 may include:

[0038] S2021, obtain the weight corresponding to each feature data.

[0039] The weight indicates the contribution of each feature data to determining the target feature data. The weight is pre-set by the technician according to actual needs. The correspondence between the weight and the feature data can be stored in the storage space of the computer device. Specifically, after obtaining the image data for the current target object, one or more feature data of the current target object is parsed from the image data, and the correspondence between the feature data and the weight can be accessed, and the weight for each feature data is obtained in combination with the correspondence.

[0040] S2022: Perform weighted processing on the feature data based on the weights to determine target feature data.

[0041] When there is one feature data, the weight corresponding to the feature data is 1, and the target feature data can be represented by the feature data. When there are multiple feature data, each feature data is weighted according to the corresponding weight to generate the target feature data. Specifically, if the multiple feature data are clothing texture, lighting data, and body proportion, and their corresponding parameter values ​​are A, B, and C, and their corresponding weights are a, b, and c, respectively, then the weighted value A×a+B×b+C×c of each feature data can be obtained, and the target feature data can be represented by this weighted value.

[0042] The special effects generation method provided in this embodiment combines the weight of each feature data to determine the target feature data, and then combines the target feature data to determine the corresponding target special effects. Thus, the corresponding target special effects can be determined by combining multiple feature data, ensuring that different target objects can be matched with the corresponding target special effects, making the generation of target special effects more diversified.

[0043] Step S203, based on the matching relationship between the target feature data and the special effects, determine the target special effects corresponding to the target feature data.

[0044] Specifically, when there are multiple feature data, the above step S203 may include:

[0045] Step S2031, obtaining the preset weight parameters corresponding to each special effect.

[0046] The preset weight parameter is a preset weight parameter for each special effect, and the preset weight parameter can be a fixed value or a range. Each special effect has a corresponding preset weight parameter, and the preset weight parameter is stored together with the special effect in the special effect set.

[0047] Step S2032, comparing the target weight corresponding to the target feature data with each preset weight parameter, and determining the target weight parameter that matches the target weight.

[0048] The target weight is the weight that characterizes the target feature data. The target weight is compared with the preset weight parameters of each special effect to determine a matching target weight parameter from multiple preset weight parameters.

[0049] Specifically, when the preset weight parameter is a fixed value, if the target weight is consistent with the fixed value, it means that the target weight matches the preset weight parameter; when the preset weight parameter is a range, if the target weight is within the range, it means that the target weight matches the preset weight parameter.

[0050] Step S2033, determining the target special effect corresponding to the target weight parameter.

[0051] After the target weight parameter is determined from a plurality of preset weight parameters, the target special effect corresponding to the target weight parameter can be determined in combination with the matching relationship between the preset weight parameter and the special effect.

[0052] Here, when there are multiple feature data, the matching relationship between the weight parameters and the special effects can be combined to determine the target special effects for different target weight parameters, thereby generating different special effects for different target objects, thereby ensuring the richness of the target special effects to the greatest extent.

[0053] In some optional implementations, the above step S203 may further include:

[0054] Step A: when there is no target weight parameter matching the target weight, determining the difference between the target weight and each preset weight parameter.

[0055] After comparing the target weight with the preset weight parameters of each special effect, and determining that there is no target weight parameter matching the target weight among the multiple preset weight parameters, the difference value between the target weight and each preset weight parameter is further calculated.

[0056] Step B: determining the preset weight parameter having the minimum difference value with the target weight as the target weight parameter, and determining the target special effect corresponding to the target weight parameter.

[0057] The difference values ​​are sorted, and the minimum difference value is determined from the multiple difference values. The preset weight parameter corresponding to the minimum difference value is the target weight parameter corresponding to the current target weight. Then, the target special effect corresponding to the target weight parameter is determined in combination with the matching relationship between the preset weight parameter and the special effect.

[0058] Here, by detecting the difference between the target weight and the preset weight parameter, the target special effect matched by the target weight is determined to the greatest extent, thereby further ensuring the fit between the target special effect and the target object.

[0059] Specifically, when the feature data is stored as one, the above step S203 may include:

[0060] Step S2034, when the target characteristic data are the same, obtaining the trigger time for the special effect.

[0061] When different target objects trigger the special effect function of the application, it is detected whether the feature data of the different target objects are the same. When the feature data corresponding to the different target objects are the same, the triggering time of the special effect for the different target objects is obtained.

[0062] Specifically, there is a sequence in the triggering time of the special effect triggering operation received by the application, that is, the application cannot receive different special effect generation requests at the same time. Among them, each target object has a corresponding unique identifier, that is, different target objects have different identification information. When the feature data corresponding to different target objects are the same, at this time, the application can detect the triggering time of the special effects obtained from different target objects. For example, if the feature data is illumination data, then the target feature data is represented by illumination data, then when different target objects trigger special effects generation in a space with the same illumination data, the application can obtain the triggering time of the special effects for different target objects.

[0063] In some optional implementations, the application can also determine whether the special effect generation is triggered by different target objects based on different identification information. If the target object with the same identification information continuously triggers the generation of special effects, the application can detect the interval between the two trigger times. When the interval is less than the preset value, it can be considered that the target object has been triggered by mistake. When the interval is greater than the preset value, it means that the target object has triggered the generation of special effects again. At this time, the application can obtain a target special effect different from the last time from the special effect set, further improving the target object's experience of using special effects.

[0064] Step S2035, generating different target special effects based on different trigger times.

[0065] For adjacent trigger times, the application can obtain different target special effects from the special effect set. That is, for adjacent trigger times, when the target feature data is the same, the target special effects obtained are different, thereby achieving the most diversified special effect.

[0066] In some optional implementations, if there are two or more target objects in the special effect generation interface, the application program may obtain different target special effects for different target objects.

[0067] Step S2036: when the target feature data are different, determine the target special effect corresponding to each target feature data based on the different target feature data.

[0068] When the target feature data is different, different target special effects can be generated according to different target feature data in combination with the matching relationship between the target feature data and the features.

[0069] The special effects generation method provided in this embodiment, when it is detected that the target feature data corresponding to different target objects are the same, obtains different target special effects by detecting the triggering time of the special effects for different target objects, thereby ensuring that the target special effects displayed at adjacent triggering times are different, thereby ensuring the generation diversity of target special effects to the greatest extent.

[0070] In some optional implementations, when the characteristic data is illumination data, the above step S203 may specifically include:

[0071] Step a1, collecting the lighting data of the space environment where the target object is currently located, and different lighting data correspond to different special effects.

[0072] Step a2, according to the matching relationship between the illumination data and the special effects, obtaining the target special effects corresponding to the illumination data.

[0073] The camera set up on the computer device can collect images of the target object and its current spatial environment. The illumination data in the image is extracted through the image processing algorithm, and the illumination data is the illumination data of the current spatial environment. For different illumination data, the corresponding target special effects are also different. The application selects the special effects that match the illumination data of the current spatial environment of the target object from the special effects set.

[0074] In some optional implementations, if there is only one special effect prop in the special effect set that matches the current illumination data, then the special effect is determined as the target special effect. If there are multiple special effects in the special effect set that match the current illumination data, then one is randomly selected as the target special effect. Of course, the target special effect can also be determined from multiple special effects in combination with other feature data of the target object to ensure the mounting realism of the target special effect.

[0075] Here, by analyzing the lighting data of the spatial environment in which the target object is located, the target special effects that match it are selected according to the lighting data, so that the target special effects mounted on the same target object in different lighting environments are also different, and the target special effects mounted on different target objects in different lighting environments are also different, bringing users a rich special effects usage experience.

[0076] In some optional implementations, when the feature data is a texture feature, the above step S203 may specifically include:

[0077] Step b1, collecting the clothing image currently worn by the target object and analyzing the texture features of the clothing image.

[0078] Step b2: acquiring a target special effect corresponding to the current texture feature according to the matching relationship between the texture feature and the special effect.

[0079] The image of the target object can be captured by the camera set on the computer device, and the image of the clothing worn by the target object can be determined through the image of the target object. Then, the clothing texture features in the clothing image can be analyzed, including color texture, pattern texture, etc. Since the special effect set contains special effects of various texture styles, in order to ensure that the special effects can fit the current clothing of the target object, the application can obtain the target special effects that match the current texture features from the special effect set to enhance the mounting fit and mounting realism of the target special effects and the target object.

[0080] Here, by analyzing the texture features of the target object's clothing image, a target special effect that matches it is selected from the special effects set based on the texture features, thereby ensuring that the target special effects mounted on target objects with different clothing are different, thereby improving the user's special effects usage experience.

[0081] In some optional implementations, when the feature data is object attribute data, the above step S203 may specifically include:

[0082] Step c1, collecting an image of the target object and analyzing object attribute data of the target object.

[0083] Step c2, obtaining special effects of multiple styles corresponding to the object attribute data.

[0084] Step c3, determining one of the multiple styles of special effects as the target special effect prop.

[0085] The image of the target object can be captured by a camera set on the computer device, and the object attribute data of the target object can be analyzed through the image of the target object, and the object attribute data includes body data, expression data, etc. In combination with the object attribute data, multiple styles of special effects corresponding to the object attribute data are obtained from the special effect set, and a style of special effect is randomly selected from the multiple special effects to be determined as the target special effect.

[0086] Taking facial expression data as an example, different facial expressions correspond to different styles of special effects. For example, if the special effect prop is a butterfly wing prop, when the target object is smiling, spots are displayed in the butterfly wing prop mounted at the preset position of the target object, while when the target object is angry, spots are not displayed in the butterfly wing prop mounted at the preset position of the target object. Similarly, special effect generation can also be adaptively adjusted in combination with the target object's body data.

[0087] Here, by analyzing the object attribute data, different styles of target special effects correspond to different object attribute data, thereby ensuring that the target special effects mounted on target objects with different object attribute data are different. Since different object attribute data have different requirements for special effects display, compared with the generation of a single special effect, generating different special effects based on object attribute data greatly satisfies the user's needs for the use of special effects and improves the user's experience of using special effects.

[0088] Step S204, mount the target special effect to the preset part of the target object in a preset manner. For detailed description, please refer to the relevant description of the corresponding steps in the above embodiment, which will not be repeated here.

[0089] The special effect generation method provided in this embodiment generates different target special effects by detecting feature data corresponding to the target object, thereby realizing the diversification of the special effects and making the generation of special effects richer.

[0090] In this embodiment, a method for generating special effects is provided, which can be used in the above-mentioned computer devices, such as mobile phones, tablet computers, computers, etc. Figure 3 is a flow chart of a method for generating special effects according to an embodiment of the present disclosure, such as Figure 3 As shown, the process includes the following steps:

[0091] Step S301, in response to a trigger operation of the current target object for a special effect, at least one feature data corresponding to the current target object is acquired based on the trigger operation. Detailed descriptions refer to the relevant descriptions of the corresponding steps in the above embodiment, which will not be repeated here.

[0092] Step S302: Determine target feature data of the current target object based on at least one feature data. For detailed description, please refer to the relevant description of the corresponding steps in the above embodiment, which will not be repeated here.

[0093] Step S303: Determine the target special effect corresponding to the target feature data based on the matching relationship between the target feature data and the special effect. For detailed description, please refer to the relevant description of the corresponding steps in the above embodiment, which will not be repeated here.

[0094] Step S304: mount the target special effect to the preset position of the target object in a preset manner. For detailed description, please refer to the relevant description of the corresponding steps in the above embodiment, which will not be repeated here.

[0095] Step S305 , in response to a switch operation instruction of the target object for the target special effect prop, the target special effect prop is switched based on the switch operation instruction.

[0096] The switching operation instruction is a switching instruction issued by the target object for the target special effect. Specifically, the switching instruction can be a palm facing outward, a hand waving to the left, a hand waving to the right, a voice message, etc. When the target object issues a switching operation instruction for the target special effect, the application can respond to the switching operation instruction of the target object to switch the target special effect of other texture styles.

[0097] Step S306: acquiring the motion posture of the target object.

[0098] The motion posture is used to characterize the motion posture and motion direction of the target object, for example, turning left, turning right, etc. When the target special effect is mounted on the target object, if the target object moves, the motion posture of the target object can be captured by the camera.

[0099] Step S307, adjusting the display form of the target special effect based on the motion posture.

[0100] The display form is used to characterize the display effect of the target special effect mounted on the target object, including changes in light and shadow, changes in form, etc. When the target object moves with the target special effect mounted on it, the target special effect will be adaptively adjusted according to the movement of the target object to adjust its display form.

[0101] The special effect generation method provided in this embodiment supports the target object to switch the target special effect, which is convenient for flexibly switching the target special effect to generate a special effect display effect that meets the user's needs. When the target object is mounted with the target special effect and moves, the target special effect can be dynamically adjusted according to the movement posture of the target object, so that the target special effect can be more in line with the actual scene and more realistic.

[0102] In some optional implementations, the method for generating the special effect set includes:

[0103] Step d1, displaying a model patch creation page, which includes multiple model parameters.

[0104] Step d2, in response to an adjustment operation on one or more model parameters, a model parameter combination set is obtained.

[0105] Step d3, programmatic generation is performed based on the model parameter combination set to obtain a special effect model set.

[0106] Step d4, generating a special effects set for augmented virtual reality based on the special effects model set.

[0107] A model creation tool based on programmatic generation is installed in the computer device. The technician can develop a model plug-in in the model creation tool and create a model patch through the model plug-in. The creation page of the model patch is the display page of the model plug-in. The creation page of the model patch includes a plurality of model parameters for adjusting the model patch, including: contour shape, color attributes (such as hue, brightness, purity, etc.), grid attributes (such as grid density, grid shape, etc.), superimposed element attributes (such as element type, element number, element shape, element color, element superimposed position, etc.), black edge range, gradient attributes, hue difference degree attributes, etc.

[0108] By adjusting the parameter value of any model parameter, a set of model parameter combinations can be obtained. Therefore, the computer device can respond to the technician's adjustment operation on the parameter value corresponding to one or more model parameters to obtain multiple sets of model parameter combinations, and different model parameter combinations constitute a model parameter combination set.

[0109] A model creation tool is used to construct a special effect model for the model parameter combination. Specifically, the model creation tool creates a basic graphic of the model patch according to each parameter included in the model parameter combination, synthesizes the texture of the model patch; converts the current texture from Cartesian coordinates to polar coordinates to obtain a new texture; cuts the new texture in combination with the contour shape in the model parameter combination to obtain the model contour; and processes the model contour using a preset processing algorithm to obtain a special effect model. The preset processing algorithms include edge detection algorithm, blur algorithm, floodfill algorithm, color mapping algorithm, tone mapping algorithm, height to normal mapping algorithm, and texture overlay algorithm.

[0110] By sequentially processing each model parameter combination in the model parameter combination set through the model creation tool, a special effect model set consisting of multiple special effect models can be obtained.

[0111] The preset special effects creation tool is a preset image editing tool. The computer device imports the generated special effects model into the preset special effects creation tool, and generates special effects props for augmented virtual reality through the preset special effects creation tool. Each special effects model in the special effects model set is input into the preset special effects creation tool, thereby enabling batch generation of corresponding special effects sets.

[0112] Take the butterfly wings prop as an example. Figure 4 As shown, the process of generating the wing special effects props is described as follows:

[0113] 1) Create the basic shape of the wing patch (such as a square) through the model patch creation page and set various model parameters.

[0114] 2) Generate texture for the basic graphics to obtain strip texture of the wing patch.

[0115] 3) The strip texture is transformed from Cartesian coordinates to polar coordinates to convert the strip texture into a circular texture.

[0116] 4) The circular texture is contour cropped in combination with the contour shape corresponding to the wing patch. The wing contour is cropped by the transparency channel of the basic color texture to obtain the wing contour. During the contour cropping process, the UV distribution of the patches on the left and right sides of the wing is ensured to be symmetrical, so that the wing patches on both sides can use the same material, reducing the amount of data.

[0117] 5) The wing outline is processed by combining the edge detection algorithm and the blur algorithm to generate an ambient occlusion map corresponding to the wing outline, and the ambient occlusion map is converted into a normal map by combining the mapping algorithm.

[0118] 6) Processing the wing outline in combination with the filling algorithm to obtain the filled wing outline, performing gradient mapping of color and gradient mapping of hue on the filled wing outline to generate a mapping map of the wing outline.

[0119] 7) Combined with the texture overlay algorithm, shadows, spot textures, etc. are added to the mapping map of the wing outline to obtain the color map of the wing.

[0120] 8) Combine the wing color map and the wing normal map to generate a wing special effects model.

[0121] 9) Input the wing special effects model into the preset special effects creation tool to generate wing special effects props.

[0122] Here, by adjusting each model parameter on the creation page of the model patch, a model parameter combination set is obtained. Therefore, for complex textures, the corresponding model parameter combination set can be obtained by flexibly adjusting the model parameters. Then, a variety of special effect models can be generated by combining the programmatic generation method to obtain a special effect model set. Therefore, a special effect set for augmented virtual reality can be generated through the special effect creation tool. In this way, batch generation of special effects is achieved.

[0123] In some optional implementations, the method for generating the special effects set may further include: adding corresponding animation data to each special effect in the special effects set, and controlling the dynamic display of the special effects based on the animation data.

[0124] The animation data represents the gradient transition animation of the pre-set model, and the gradient appearance of the special effect is controlled by the animation data. Taking the wing special effect as an example, the vertex color attribute of the wing special effect model corresponding to the wing special effect is gradually transitioned from the root of the wing to the end of the wing to realize the control of the dissolving direction of the wing.

[0125] Specifically, the corresponding vertex color attribute value is calculated in combination with the vertex color attribute change from the wing root to the wing end, and the range of the vertex color attribute value is [0, 1], wherein the vertex color attribute value corresponding to the wing root is 1, and the vertex color attribute value corresponding to the wing end is 0; the noise texture is sampled according to the spatial coordinates of the wing special effect model corresponding to the wing special effect prop, and the noise texture is superimposed on the noise of the wing special effect model; the superimposed noise value and the dissolution value (the dissolution value gradually changes from 1 to 0 over time) are compared to determine whether to display the current pixel. In this way, the dissolution of the wing special effect prop is gradually displayed / faded.

[0126] Here, based on the direction of the vertex color attribute, the wings are dissolved and gradually appear / fade out, and noise is added to the wing special effect model to increase the randomness of the wing edge, so as to achieve the effect of butterfly wings gradually appearing from the wing root to the wing tip. By adding animation data to the special effect, the special effect can be dynamically displayed according to the animation data, which enhances the flexibility of special effect generation and improves the user's entertainment experience.

[0127] In some optional implementations, the method for generating the special effect set may further include:

[0128] Step e1, in response to a material adjustment instruction for a special effect prop, updating the material texture of the special effect.

[0129] Step e2, storing the special effects after updating the material texture into the special effects prop set.

[0130] The technician can select a material of interest from the material library to adjust the material of the special effect and update the material texture of the special effect. Accordingly, the computer device can respond to the technician's material adjustment instruction for the special effect, update the material texture of the special effect, and obtain the special effect with the new material texture. Furthermore, the computer device can store the special effect with the updated material texture into the special effect set for storage.

[0131] After obtaining the special effects set, the special effects set is packaged and compressed and uploaded to the cloud server for cloud storage, breaking the size limit of the special effects prop package. When deleting the special effects files loaded in the special effects prop package, the texture files need to be deleted level by level, otherwise the re-loading of the special effects will fail.

[0132] The above method supports material adjustment operations for special effects, realizes flexible adjustment of material textures for special effects, and stores special effects after material texture updates into special effects collection, enriching the style of special effects and ensuring that the target object has more choices when switching the mounted target special effects.

[0133] In this embodiment, a special effect generation device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0134] This embodiment provides a device for generating special effects, such as Figure 5 As shown, including:

[0135] The trigger module 401 is used to respond to a trigger operation of the current target object for a special effect and obtain at least one feature data corresponding to the current target object based on the trigger operation.

[0136] The feature determination module 402 is used to determine target feature data of the current target object based on at least one feature data.

[0137] The special effect determination module 403 is used to determine the target special effect corresponding to the target feature data based on the matching relationship between the target feature data and the special effect.

[0138] The mounting module 404 is used to mount the target special effect to a preset position of the target object in a preset manner.

[0139] In some optional implementations, the feature determination module 402 may include:

[0140] The weight acquisition unit is used to obtain the weight corresponding to each feature data.

[0141] The weighting unit is used to perform weighted processing on the feature data based on the weight to determine the target feature data.

[0142] In some optional implementations, when there are multiple feature data, the special effect determination module 403 may include:

[0143] The parameter acquisition unit is used to obtain the preset weight parameters corresponding to each special effect.

[0144] The weight parameter determination unit is used to compare the target weight corresponding to the target feature data with each preset weight parameter to determine the target weight parameter that matches the target weight.

[0145] The first special effect determination unit is used to determine a target special effect corresponding to a target weight parameter.

[0146] In some optional implementations, the special effect determination module 403 may include:

[0147] The difference value determining unit is used to determine the difference value between the target weight and each preset weight parameter when there is no target weight parameter matching the target weight.

[0148] The second special effect determination unit is used to determine the preset weight parameter having the minimum difference value with the target weight as the target weight parameter, and determine the target special effect corresponding to the target weight parameter.

[0149] In some optional implementations, when there is one feature data, the special effect determination module 403 may include:

[0150] The trigger time acquisition unit is used to acquire the trigger time for the special effect when the target characteristic data are the same.

[0151] The third special effect determination unit is used to generate different target special effects based on different triggering times.

[0152] The fourth special effect determining unit is used to determine the target special effect corresponding to each target feature data based on the different target feature data when the target feature data are different.

[0153] In some optional embodiments, when the characteristic data is illumination data, the special effects determination module 403 is specifically used to: collect illumination data of the spatial environment in which the target object is currently located, different illumination data corresponding to different special effects; and obtain target special effects corresponding to the illumination data according to the matching relationship between the illumination data and the special effects.

[0154] In some optional embodiments, when the feature data is a texture feature, the special effect determination module 403 is specifically used to: collect an image of clothing currently worn by the target object, and analyze the texture features of the clothing image; and obtain a target special effect corresponding to the current texture feature according to the matching relationship between the texture feature and the special effect.

[0155] In some optional embodiments, when the feature data is object attribute data, the special effect determination module 403 is specifically used to: capture an image of the target object and analyze the object attribute data of the target object; obtain multiple styles of special effects corresponding to the object attribute data; and determine one of the multiple styles of special effects as the target special effect prop.

[0156] In some optional implementations, the above-mentioned special effect generation device may further include:

[0157] The switching module is used to respond to the switching operation instruction of the target object for the target special effect prop, and switch the target special effect prop based on the switching operation instruction.

[0158] The posture acquisition module is used to acquire the motion posture of the target object.

[0159] The adjustment module is used to adjust the display form of the target special effects based on the motion posture.

[0160] In some optional implementations, the above-mentioned special effect generation device may further include:

[0161] The prop set generation module is used to generate special effect prop sets.

[0162] Specifically, the above-mentioned prop set generation module may include:

[0163] The display unit is used to display a creation page of a model patch, wherein the creation page includes a plurality of model parameters.

[0164] The parameter adjustment unit is used to obtain a model parameter combination set in response to an adjustment operation on one or more model parameters.

[0165] The model set generation unit is used to perform programmatic generation based on the model parameter combination set to obtain a special effect model set.

[0166] The prop set generation unit is used to generate a special effect set for augmented virtual reality based on a special effect model set.

[0167] In some optional implementations, the above-mentioned prop set generation module may further include:

[0168] The animation adding unit is used to add corresponding animation data to each special effect in the special effect set, and control the dynamic display mode of the special effect based on the animation data.

[0169] In some optional implementations, the above-mentioned prop set generation module may further include:

[0170] The material adjustment unit is used to update the material texture of the special effect prop in response to the material adjustment instruction for the special effect prop.

[0171] The storage unit is used to store the special effects after the material texture is updated into the special effects set.

[0172] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0173] The special effects generating device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that provide the above functions.

[0174] The special effects generation device provided in this embodiment has different target feature data corresponding to different target objects. The target feature data of the current target object is detected to determine the corresponding target special effect in combination with the matching relationship between the target feature data and the special effect, and the target special effect is mounted on a preset position of the target object. This ensures that the target special effects mounted on different target objects are different, making the generation of special effects richer, making the special effects more diversified, and improving the user experience of special effects.

[0175] The present disclosure also provides a computer device having Figure 5 A device for generating the special effects shown.

[0176] See also Figure 6 , Figure 6 is a schematic diagram of a computer device provided by an optional embodiment of the present disclosure, such as Figure 6 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.

[0177] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0178] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0179] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0180] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0181] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.

[0182] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0183] The computer device also includes a communication interface, which is used for the computer device to communicate with other devices or a communication network.

[0184] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0185] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for generating special effects, characterized in that: include: In response to a triggering operation of a current target object for a special effect, acquiring at least one feature data corresponding to the current target object based on the triggering operation; Determining target feature data of the current target object based on the at least one feature data; Based on the matching relationship between the target feature data and the special effect, determining a target special effect corresponding to the target feature data; The target special effect is mounted on a preset position of the target object in a preset manner.

2. The method according to claim 1, characterized in that The determining, based on the at least one feature data, target feature data of the current target object comprises: Obtaining a weight corresponding to each of the feature data; The feature data is weighted based on the weight to determine the target feature data.

3. The method according to claim 2, characterized in that When there are multiple feature data, determining the target special effect corresponding to the target feature data based on the matching relationship between the target feature data and the special effect includes: Obtaining preset weight parameters corresponding to each of the special effects; Comparing the target weight corresponding to the target feature data with each of the preset weight parameters to determine a target weight parameter that matches the target weight; Determine the target special effect corresponding to the target weight parameter.

4. The method according to claim 3, characterized in that The determining of a target special effect corresponding to the target feature data based on a matching relationship between the target feature data and the special effect further includes: When there is no target weight parameter matching the target weight, determining a difference value between the target weight and each of the preset weight parameters; The preset weight parameter having the minimum difference value with the target weight is determined as the target weight parameter, and the target special effect corresponding to the target weight parameter is determined.

5. The method according to claim 2, characterized in that: When the feature data is one, determining a target special effect corresponding to the target feature data based on a matching relationship between the target feature data and the special effect includes: When the target characteristic data are the same, obtaining a trigger time for a special effect; Based on the different triggering times, different target special effects are generated; When the target characteristic data are different, a target special effect corresponding to each target characteristic data is determined based on the different target characteristic data.

6. The method according to claim 5, characterized in that The characteristic data is illumination data, and determining a target special effect corresponding to the target characteristic data based on a matching relationship between the target characteristic data and the special effect includes: Collecting illumination data of the space environment where the target object is currently located, where different illumination data correspond to different special effects; According to the matching relationship between the illumination data and the special effects, a target special effect corresponding to the current illumination data is obtained.

7. The method according to claim 5, characterized in that The feature data is a texture feature, and determining a target special effect corresponding to the target feature data based on a matching relationship between the target feature data and the special effect includes: Collecting an image of clothing currently worn by the target object, and analyzing texture features of the clothing image; According to the matching relationship between the texture feature and the special effect, a target special effect corresponding to the current texture feature is obtained.

8. The method according to claim 5, characterized in that The feature data is object attribute data, and obtaining a target special effect corresponding to the feature data based on a matching relationship between the feature data and the special effect includes: Acquire an image of the target object and analyze object attribute data of the target object; Acquire special effects of multiple styles corresponding to the object attribute data; A special effect of one style among the multiple styles of special effects is determined as the target special effect.

9. The method according to claim 1, characterized in that: After the target special effect prop is mounted to the preset position of the target object in a preset dynamic manner, the method further includes: In response to a switching operation instruction for the target special effect, the target special effect is switched based on the switching operation instruction.

10. The method according to claim 1 or 9, characterized in that: After the target special effect is mounted on the preset position of the target object in a preset manner, the method further includes: Acquire the motion posture of the target object; The display form of the target special effect is adjusted based on the motion posture.

11. The method according to claim 1, characterized in that: Each of the special effects is stored in a special effect set, and the method for generating the special effect set includes: Displaying a creation page of a model patch, wherein the creation page includes a plurality of model parameters; In response to an adjustment operation on one or more of the model parameters, a model parameter combination set is obtained; Perform programmatic generation based on the model parameter combination set to obtain a special effect model set; The special effects set of augmented virtual reality is generated based on the special effects model set.

12. The method according to claim 11, characterized in that Also includes: Corresponding animation data is added to the special effects in the special effects set, and the dynamic display mode of the special effects is controlled based on the animation data.

13. The method according to claim 11, characterized in that Also includes: In response to a material adjustment instruction for a special effect prop, updating a material texture of the special effect; The special effects after updating the material texture are stored in the special effects set.

14. A device for generating special effects, characterized in that: The device comprises: A trigger module, configured to respond to a trigger operation of a current target object for a special effect and acquire feature data corresponding to the current target object based on the trigger operation; A feature determination module, configured to determine target feature data of the current target object based on the at least one feature data; A special effect determination module, used to determine a target special effect corresponding to the target feature data based on a matching relationship between the target feature data and the special effect; The mounting module is used to mount the target special effect to a preset position of the target object in a preset manner.

15. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for generating special effects according to any one of claims 1 to 13 by executing the computer instructions.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for generating special effects according to any one of claims 1 to 13.

Citation Information

Cited By

  • Scene special effect processing method and device, electronic equipment and readable storage medium

    CN119701341A

  • Entity special effect configuration method and device, equipment and medium

    CN121490400A