Method, device and electronic equipment for producing marquee special effects
By using the display hidden settings of the light strip model and the first map, the problem of too many surfaces of the marble special effect model is solved, and more efficient special effect production and game operation is achieved, and model adjustment is simplified.
Patent Information
- Application Number
- CN202210579785.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-26
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2042-05-26
AI Technical Summary
When making special effects of marquee lanterns, the existing technology contains a large number of lamp bead models, resulting in too many model surfaces, which consumes a lot of special effects production and game operation, affecting game smoothness and adjustment efficiency.
The light strip model is used instead of multiple light bead models, and the display and hidden settings of the first map are used to form the effect of virtual light beads to reduce the number of model faces.
It effectively reduces the number of model faces for the marquee special effects, reduces the performance consumption of special effects production and game operation on the computer, makes the game run smoother, and simplifies the model adjustment process.
Smart Images

Figure CN115131480B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of animation production technology, and in particular to a method, device, electronic device and computer-readable storage medium for producing a marquee special effect. Background Art
[0002] In order to enhance the visual effects of the game and make the game more interesting, various game effects are usually added to the game scenes. Among them, the marquee effect is used in many game scenes. Figure 3 As shown, the marquee special effect generally includes a plurality of virtual lamp beads distributed along the extension direction of the marquee special effect. When the special effect is displayed, the virtual lamp beads light up or change colors in sequence in the form of a marquee special effect.
[0003] When producing a marquee effect, the related technology usually first produces multiple lamp bead models along the direction of light effect transmission (i.e., the extension direction of the marquee effect), and then assigns textures to the multiple lamp bead models and creates a flow effect, thereby forming a marquee effect.
[0004] Since the marquee special effects usually contain hundreds or even thousands of lamp bead models, the number of lamp bead models is very large, resulting in a large number of model faces of the marquee special effects. This makes the special effects production process and the game running process consume a lot of computer performance, which is not conducive to the smooth operation of the game. Summary of the Invention
[0005] This application provides a method, device, electronic device, and computer-readable storage medium for creating a marquee special effect. These methods can reduce the number of facets in the marquee special effect model, thereby reducing the computer's performance consumption during the special effect creation process and the game running process, and making the game run more smoothly. The specific solution is as follows.
[0006] In a first aspect, an embodiment of the present application provides a method for producing a marquee special effect, wherein the marquee special effect includes a plurality of virtual lamp beads distributed along an extension direction of the marquee special effect, the method comprising:
[0007] Obtaining a light strip model of a marquee special effect, wherein the shape of the light strip model is consistent with the overall appearance of the marquee special effect;
[0008] Assigning a first texture to the light strip model, where the first texture is used to form an image displayed by the virtual lamp beads;
[0009] Displaying a first portion of the first texture and hiding portions of the first texture other than the first portion to obtain a model assigned to the texture, wherein the first portion is a portion corresponding to the plurality of virtual lamp beads;
[0010] The marquee special effect is produced based on the model assigned with the texture.
[0011] Optionally, before displaying the first portion of the first map and hiding portions of the first map other than the first portion, the method further includes:
[0012] Assigning a mask map to the light strip model, wherein the mask map includes a plurality of lamp bead graphics, and the plurality of lamp bead graphics are consistent with the distribution of the plurality of virtual lamp beads;
[0013] The displaying the first portion of the first map and hiding the portion of the first map other than the first portion includes:
[0014] Using the mask map as a mask, the first map is masked and fused with the mask map to hide the area outside the first area of the first map and display the first area of the first map. The first area is: the area corresponding to each of the lamp bead patterns.
[0015] Optionally, the mask map is a grayscale map, the color of the lamp bead pattern is white and / or gray, and the color of the area in the mask map other than the lamp bead pattern is black;
[0016] The masking and fusing the first map with the mask map to hide areas outside the first area of the first map and to display the first area of the first map includes:
[0017] Based on the principle that the degree of transparency is proportional to the grayscale of the corresponding mask map, the transparency of the first map is adjusted so that the area outside the first area of the first map is completely transparent, and the transparency of the areas in the first area corresponding to the white area and the gray area of the mask map are opaque and semi-transparent, respectively, where a larger grayscale indicates a color closer to black.
[0018] Optionally, the multiple virtual lamp beads have the same shape and size, and the multiple virtual lamp beads are evenly distributed;
[0019] Assigning a mask map to the light strip model includes:
[0020] Assign a material map to the light strip model, and set the number of repetitions of the material map in the direction consistent with the extension direction to N, so that the material map is divided into N equal maps along the extension direction, where N is the same as the number of the plurality of virtual lamp beads;
[0021] The second areas of each of the N equal parts of the map are set to white or gray, and the areas other than the second areas are set to black, to obtain a mask map assigned to the light strip model, where the second areas are areas corresponding to the virtual lamp beads.
[0022] Optionally, before assigning a material map to the light strip model, the method further includes:
[0023] UV unfolding the light strip model to obtain a UV unfolded model, wherein a U direction or a V direction in the UV unfolded model is consistent with the extension direction;
[0024] Assigning a material map to the light strip model includes:
[0025] Add a material map to the UV unfolded model, wherein the material map of the light strip model changes synchronously with the material map of the UV unfolded model.
[0026] Optionally, before assigning a material to the UV unfolded model, the method further includes:
[0027] Separating the U channel and the V channel of the UV unfolded model to obtain a U channel model and a V channel model;
[0028] The step of setting the number of repetitions of the material map in the extension direction to N includes:
[0029] The number of repetitions of the material map of the first channel model is set to N, and the first channel model is a channel model whose corresponding directions in the U channel model and the V channel model are consistent with the extension direction.
[0030] Optionally, the multiple virtual lamp beads are circular virtual lamp beads, the second area is a circular area, the circular area has the center of each map as the center, and the radius of the circular area is the same as the radius of the virtual lamp beads.
[0031] Optionally, setting the second area of each material map in the N equal maps to white or gray includes:
[0032] Calculate the distance between each pixel point in the circular area and the center of the circular area;
[0033] Based on the rule that the distance is proportional to the grayscale of the pixel points, the grayscale of the pixel points within the circular area in each material map is calculated to set the second area corresponding to the virtual lamp bead in each material to white and / or gray.
[0034] Optionally, the light effect of the marquee special effect is transmitted in a manner that the colors of the virtual lamp beads are transmitted and changed in a marquee manner;
[0035] Before assigning the first texture to the light strip model, the method further includes:
[0036] Acquire an image to be pasted, wherein the image to be pasted comprises a plurality of image regions distributed along a second direction, wherein two adjacent image regions have different colors, and the second direction is any direction;
[0037] Assigning a first texture to the light strip model includes:
[0038] Based on the principle that the second direction of the image to be pasted is consistent with the extension direction, the image to be pasted is assigned to the light strip model to obtain a first texture assigned to the light strip model.
[0039] Optionally, the widths of the image regions along the second direction are equal, and the number of the plurality of virtual lamp beads is an integer multiple of the number of the plurality of image regions;
[0040] Assigning the image to be attached to the light strip model to obtain a first texture assigned to the light strip model includes:
[0041] Based on the way that the map is tiled n times in the extension direction, the image to be pasted is assigned to the light strip model so that the first map contains N image areas along the extension direction, and the first map assigned to the light strip model is obtained, where n=N / m, m is the number of the multiple image areas.
[0042] Optionally, determining the marquee special effect based on the model assigned to the map includes:
[0043] Setting the moving step length of the first map to be equal to the length of the image area in the first map along the extension direction;
[0044] The map is controlled to move along the extension direction with the moving step length to obtain the marquee special effect.
[0045] Optionally, the method further includes:
[0046] The information values corresponding to the material information of the marquee special effect are standardized so that the values obtained after standardization are within the range of 0 to 1, wherein the proportional relationship between the values obtained after standardization is consistent with the proportional relationship between the values before standardization.
[0047] In a second aspect, an embodiment of the present application provides a device for producing a marquee special effect, wherein the marquee special effect includes a plurality of virtual lamp beads distributed along an extension direction of the marquee special effect, and the device includes:
[0048] a determining unit, configured to obtain a light strip model of a marquee special effect, wherein a shape of the light strip model is consistent with an overall appearance of the marquee special effect;
[0049] A texture assigning unit, configured to assign a first texture to the light strip model, wherein the first texture is used to form an image displayed by the virtual lamp beads;
[0050] a texture setting unit, configured to display a first portion of the first texture and hide portions of the first texture other than the first portion, to obtain a model assigned to the texture, wherein the first portion is a portion corresponding to the plurality of virtual lamp beads;
[0051] A production unit is used to produce the marquee special effect based on the model assigned with the texture.
[0052] Optionally, the texture assigning unit is further configured to: assign a mask texture to the light strip model, wherein the mask texture includes a plurality of lamp bead graphics, and the plurality of lamp bead graphics are consistent with a distribution mode of the plurality of virtual lamp beads;
[0053] The mapping setting unit is specifically used for:
[0054] Using the mask map as a mask, the first map is masked and fused with the mask map to hide the area outside the first area of the first map and display the first area of the first map. The first area is: the area corresponding to each of the lamp bead patterns.
[0055] Optionally, the mask map is a grayscale map, the color of the lamp bead pattern is white and / or gray, and the color of the area in the mask map other than the lamp bead pattern is black;
[0056] The mapping setting unit is specifically used for:
[0057] Based on the principle that the degree of transparency is proportional to the grayscale of the corresponding mask map, the transparency of the first map is adjusted so that the area outside the first area of the first map is completely transparent, and the transparency of the areas in the first area corresponding to the white area and the gray area of the mask map are opaque and semi-transparent, respectively, where a larger grayscale indicates a color closer to black.
[0058] Optionally, the multiple virtual lamp beads have the same shape and size, and the multiple virtual lamp beads are evenly distributed;
[0059] The mapping unit is specifically used for:
[0060] Assign a material map to the light strip model, and set the number of repetitions of the material map in the direction consistent with the extension direction to N, so that the material map is divided into N equal maps along the extension direction, where N is the same as the number of the plurality of virtual lamp beads;
[0061] The second areas of each of the N equal parts of the map are set to white or gray, and the areas other than the second areas are set to black, to obtain a mask map assigned to the light strip model, where the second areas are areas corresponding to the virtual lamp beads.
[0062] Optionally, the device further comprises:
[0063] an unfolding unit, configured to perform UV unfolding on the light strip model to obtain a UV unfolded model, wherein a U direction or a V direction in the UV unfolded model is consistent with the extension direction;
[0064] The mapping unit is specifically used for:
[0065] Add a material map to the UV unfolded model, wherein the material map of the light strip model changes synchronously with the material map of the UV unfolded model.
[0066] Optionally, the unfolding unit is further configured to: separate the U channel and the V channel of the UV unfolding model to obtain a U channel model and a V channel model;
[0067] The mapping unit is specifically used to set the number of repetitions of the material mapping of the first channel model to N, and the first channel model is a channel model whose corresponding directions in the U channel model and the V channel model are consistent with the extension direction.
[0068] Optionally, the multiple virtual lamp beads are circular virtual lamp beads, the second area is a circular area, the circular area has the center of each map as the center, and the radius of the circular area is the same as the radius of the virtual lamp beads.
[0069] Optionally, the map assigning unit is specifically used to:
[0070] Calculate the distance between each pixel point in the circular area and the center of the circular area;
[0071] Based on the rule that the distance is proportional to the grayscale of the pixel points, the grayscale of the pixel points within the circular area in each material map is calculated to set the second area corresponding to the virtual lamp bead in each material to white and / or gray.
[0072] Optionally, the light effect of the marquee special effect is transmitted in a manner that the colors of the virtual lamp beads are transmitted and changed in a marquee manner;
[0073] The device further comprises:
[0074] An image acquisition unit is configured to acquire an image to be pasted, wherein the image to be pasted comprises a plurality of image regions distributed along a second direction, wherein two adjacent image regions have different colors, and the second direction is any direction;
[0075] The mapping unit is specifically used for:
[0076] Based on the principle that the second direction of the image to be pasted is consistent with the extension direction, the image to be pasted is assigned to the light strip model to obtain a first texture assigned to the light strip model.
[0077] Optionally, the widths of the image regions along the second direction are equal, and the number of the plurality of virtual lamp beads is an integer multiple of the number of the plurality of image regions;
[0078] The mapping unit is specifically used for:
[0079] Based on the way that the map is tiled n times in the extension direction, the image to be pasted is assigned to the light strip model so that the first map contains N image areas along the extension direction, and the first map assigned to the light strip model is obtained, where n=N / m, m is the number of the multiple image areas.
[0080] Optionally, the production unit is specifically configured to:
[0081] Setting the moving step length of the first map to be equal to the length of the image area in the first map along the extension direction;
[0082] The map is controlled to move along the extension direction with the moving step length to obtain the marquee special effect.
[0083] Optionally, the making further includes:
[0084] A processing unit is used to standardize the information values corresponding to the material information of the marquee special effect so that the values obtained after standardization are within the range of 0 to 1, wherein the proportional relationship between the various values obtained after standardization is consistent with the proportional relationship between the various values before standardization.
[0085] In a third aspect, the present application further provides an electronic device, comprising:
[0086] processor; and
[0087] The memory is used to store a data processing program. After the electronic device is powered on and the program is run by the processor, the method as described in any one of the first aspects is executed.
[0088] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium storing a data processing program, which is run by a processor to execute the method as described in any one of the first aspects.
[0089] Compared with the prior art, this application has the following advantages:
[0090] The present application provides a method for producing a marquee special effect, in which the light strip model of the determined marquee special effect is consistent with the overall appearance of the marquee special effect. Since the overall appearance of the marquee special effect is usually a simple shape such as a long strip, a frame, or a curve, the determined light strip model is usually also a very simple model, and the number of model faces of the light strip model is usually very small. After the light strip model is determined, the first part of the first texture assigned to the light strip model is displayed, and the part of the first texture other than the first part is hidden. In this way, the first texture of the part of the light strip model corresponding to the virtual lamp beads is displayed, and the texture corresponding to the part other than the virtual lamp beads is hidden. Since the first texture is used to form the image displayed by the virtual lamp beads, the texture of the displayed part of the model assigned to the first texture can display the image displayed by each virtual lamp bead, so that the model assigned to the first texture can display the effect of the virtual lamp beads, so that the marquee special effect can be conveniently determined according to the model assigned to the first texture.
[0091] As can be seen, the production solution for the marquee special effect provided by this application does not require the production of multiple lamp bead models. Instead, a light strip model corresponding to the overall shape of the marquee special effect is simply produced. The virtual lamp bead effect is then created by setting whether the first texture is displayed. Since only one light strip model is required instead of multiple lamp bead models, the model surface area of the marquee special effect can be significantly reduced, resulting in minimal consumption of computer performance during the special effect production process and the game running process, allowing the game to run more smoothly.
[0092] In addition, since only one light strip model is needed to produce the marquee special effect, compared with the process of producing a large number of lamp bead models in the existing technology, the model creation process of the solution provided by this application is also very simple, thereby making the production process of the marquee special effect simpler. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] Figure 1 This is a flowchart of an example of a method for producing a marquee special effect provided by an embodiment of the present application;
[0094] Figure 2 This is a flowchart of another example of a method for producing a marquee special effect provided in an embodiment of the present application;
[0095] Figure 3 It is a schematic diagram of a lamp bead model made in the related art;
[0096] Figure 4Schematic diagram of the light strip model and UV unfolding model created in the embodiment of the present application;
[0097] Figure 5 Schematic diagram of the visual operation interface of the design software in the embodiment of the present application;
[0098] Figure 6 It is a schematic diagram of the settings of the U and V directions in the embodiment of the present application;
[0099] Figure 7 This is an effect diagram of setting the number of tiling copies of a material map in an embodiment of the present application;
[0100] Figure 8 This is an effect diagram of the light strip model in the embodiment of the present application with different tile numbers of material maps;
[0101] Figure 9 This is the effect diagram after the light strip model is assigned the material map when the number of tile copies of the material map is 1, 10, and 100;
[0102] Figure 10 This is the effect diagram after the model's material mapping is processed by the DISTANCE function;
[0103] Figure 11 This is the effect diagram after reverse processing of the model material map;
[0104] Figure 12 This is a comparison chart of the reverse processing of the material map;
[0105] Figure 13 This is a comparison chart of the virtual lamp beads presented by the material map after adjusting the radius of the circular area;
[0106] Figure 14 This is a comparison chart of the effects of adjusting the blur effect of the material map;
[0107] Figure 15 It is the effect diagram of assigning the image to be pasted to the light strip model;
[0108] Figure 16 This is a comparison chart of the effects after adjusting the number of tiles of the image to be pasted;
[0109] Figure 17 It is the effect image obtained by fusing the first texture of the light strip model with the mask texture;
[0110] Figure 18 This is an effect chart for adjusting the brightness intensity of the marquee effect;
[0111] Figure 19 This is an effect diagram of the marquee special effect produced by the production method provided by this application and applied in a game scene;
[0112] Figure 20 This is a structural block diagram of an example of a device for producing a marquee special effect provided by an embodiment of the present application;
[0113] Figure 21 This is a structural block diagram of an example of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0114] The following description sets forth many specific details to facilitate a thorough understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of the present application. Therefore, the present application is not limited to the specific implementations disclosed below.
[0115] In order to enhance the display effect of the interface, many display interfaces will display a marquee effect, such as game interface, web interface, instant messaging software chat interface, online shopping interface, etc. Figure 3 As shown, usually, multiple lamp bead models are first made along the extension direction of the marquee special effect, and then textures are assigned to the multiple lamp bead models and flow effects are created to form the marquee special effect.
[0116] Since the number of lamp bead models included in the marquee special effect is usually very large, the number of model faces of the marquee special effect is very large. For example, Figure 3 As shown, the number of faces of the multiple lamp bead models created is 1568, which makes the special effects production process and the game running process consume a lot of computer performance, which is not conducive to the smooth running of the game.
[0117] In addition, the process of creating a large number of lamp bead models is usually very cumbersome. When designers need to adjust the size, spacing, etc. of virtual lamp beads, they need to readjust the size and spacing of each lamp bead model. Due to the large number of lamp bead models, the adjustment process is very cumbersome and the adjustment efficiency is low. Moreover, since model creation and animation production are likely to be created in different software, it may be inconvenient to adjust the model in the animation production software, and the model adjustment needs to be made in the original model creation software, which further makes the model adjustment inconvenient.
[0118] Based on the above reasons, in order to reduce the number of model faces of the marquee special effects, make the special effects production process and the game running process consume less performance of the computer, and make the game run smoother, the first embodiment of the present application provides a method for producing a marquee special effect, which is applied to electronic devices. The electronic devices can be desktop computers, laptops, mobile phones, tablet computers, servers, terminal devices, etc., or other electronic devices that can create animation special effects. The embodiments of this application are not specifically limited.
[0119] The above-mentioned marquee special effect includes multiple virtual lamp beads distributed along the extension direction of the marquee special effect. In the embodiment of the present application, the multiple virtual lamp beads along the extension direction can be circular, rectangular, triangular, etc., or other shapes. The multiple virtual lamp beads can be distributed at equal intervals along the extension direction of the marquee special effect, or they can be distributed at non-equal intervals. The multiple virtual lamp beads along the extension direction can be equal in size and shape, or they can be unequal. A row of virtual lamp beads can be distributed in a direction perpendicular to the extension direction, or multiple rows of virtual lamp beads can be distributed. A row of virtual lamp beads is a plurality of virtual lamp beads along the extension direction. The present application does not limit the specific distribution method of the virtual lamp beads of the marquee special effect.
[0120] The overall shape of the marquee effect can be a long strip, or a curved shape formed by the long strip, a frame shape, a ring shape, an S shape, a digital shape, etc., but is not limited to these. The overall shape of the marquee effect can be understood as the shape of the virtual light strip corresponding to the marquee effect, and the multiple virtual light beads are located within the scope of the overall shape of the marquee effect.
[0121] like Figure 1 As shown, the method for producing the marquee special effect provided in the first embodiment of the present application includes the following steps S110 to S140.
[0122] Step S110: Obtain a light strip model of a marquee special effect.
[0123] The above-mentioned light strip model is consistent with the overall appearance of the marquee special effect.
[0124] In an embodiment of the present application, a light strip model with a marquee special effect can be created in a three-dimensional drawing software. The three-dimensional drawing software can be, for example, 3DMAX, PRO / E, SolidWorks, MAYA, etc., but is not limited thereto.
[0125] The shape of the light strip model can be determined according to the overall shape of the marquee special effect to be created. For example, if the overall shape of the marquee special effect is a ring, then the shape of the light strip model is also a ring; if the overall shape of the marquee special effect is a frame, then the shape of the light strip model is also a frame; if the overall shape of the marquee special effect is a wave, then the shape of the light strip model is also a wave. This application does not limit the specific shape of the light strip model. Figure 4 As shown in the left picture, the overall shape of the marquee special effect is frame-shaped, so the shape of the light strip model is frame-shaped. Figure 4 The number of faces of the middle light strip model is 68.
[0126] In step S110 , the designer may create a light strip model in 3D drawing software according to the desired marquee special effect, and the electronic device determines the light strip model created by the designer as the light strip model for the marquee special effect.
[0127] Step S120: assigning a first texture to the light strip model.
[0128] The first texture is used to form the image displayed by the virtual lamp beads of the marquee special effect.
[0129] In step S120, an image to be attached can be obtained, and then the obtained image to be attached can be assigned to the light strip model, thereby obtaining a first texture assigned to the light strip model. Specifically, the designer can import or select an image from the design interface, and the electronic device can determine the image selected by the designer as the image to be attached.
[0130] In step S120 , a first texture may be assigned to the light strip model in response to a texture operation performed by a designer.
[0131] After the first texture is assigned to the light strip model, the surface of the light strip model assigned with the first texture can display the texture.
[0132] The specific content of the above-mentioned image to be pasted can be determined according to the specific effect of the marquee special effect. For example, when the marquee special effect is the continuous transmission and change of the graphics on the virtual lamp beads, the image to be pasted can include multiple different graphics distributed along the length direction. When the marquee special effect is the continuous transmission and change of the colors on the virtual lamp beads, the image to be pasted can include multiple different color blocks distributed along the length direction.
[0133] Step S130: displaying a first portion of the first texture of the light strip model, and hiding portions of the first texture of the light strip model except the first portion, to obtain a model assigned with the texture.
[0134] The first part mentioned above is the part corresponding to multiple virtual lamp beads.
[0135] The portion of the first texture of the light strip model corresponding to the multiple virtual lamp beads is displayed, and the portion of the first texture of the light strip model other than the portion corresponding to the multiple virtual lamp beads is hidden. In this way, the first texture of the model portion corresponding to the virtual lamp beads is displayed, and the first texture of the model portion other than the virtual lamp beads is not displayed. The resulting model with the texture can be displayed in a manner corresponding to the virtual lamp beads, thereby enabling the virtual lamp beads to be displayed.
[0136] Step S130 can also be understood as setting the display parameters of the first portion of the first tile to the first display parameter, and setting the display parameters of the portion of the first tile other than the first portion to the second display parameter. The first display parameter is a parameter for displaying the first tile, and the second display parameter is a parameter for hiding the first tile. These display parameters can be at least one of transparency, brightness, and chroma, but are not limited thereto.
[0137] In step S130, the designer can manually select the part of the light strip model corresponding to the multiple virtual lamp beads from the design interface according to the marquee special effect, and the electronic device can determine the part selected by the designer as the first part. Alternatively, the electronic device can also obtain special effect information corresponding to the marquee special effect to be produced. The special effect information can be information such as pictures, text descriptions, etc. that can express the marquee special effect, and determine the first part corresponding to the multiple virtual lamp beads based on the special effect information. The electronic device can also determine the first part in other ways, which are not specifically limited in this application. After determining the first part, the electronic device can display the first part of the first map of the light strip model and hide the part of the first map other than the first part.
[0138] In step S130, the electronic device may display a first portion of the first texture of the light strip model and hide other portions of the first texture in response to the designer's texture setting operation. The designer may perform the texture setting operation in a visual design interface of a game engine or 3D drawing software.
[0139] In the embodiment of the present application, displaying the first sticker can be either completely displaying the first sticker or partially displaying the first sticker. Partial display can be understood as the transparency of the first sticker being less than 100% and greater than 0 (i.e., semi-transparent), full display can be understood as the transparency of the sticker being 100% (i.e., opaque), and sticker hiding can be understood as the transparency of the sticker being 0 (i.e., completely transparent). The degree of sticker display or hiding can also be characterized by other parameters (such as brightness, contrast, chromaticity, etc.), which are not specifically limited in this application.
[0140] Step S140: creating a marquee special effect based on the model assigned with the texture.
[0141] In step S140, a flow effect can be added to the assigned texture to create a marquee effect. Specifically, a moving step length of the assigned texture can be set, and the texture can be controlled to move along the extension direction of the marquee effect over time according to the moving step length.
[0142] In step S140, a marquee special effect can be produced for the model assigned with the texture according to the special effect production operation of the designer. The specific operation method of the designer can refer to step S130 and will not be repeated here.
[0143] In the embodiment of the present application, steps S120 to S140 can be performed based on design software such as the above-mentioned 3D mapping software, animation production engine, etc., and can specifically be performed based on a game engine. The game engine can be, for example, Unreal Engine 4 (UE), Unity3D, etc., but is not limited thereto.
[0144] In the embodiment of the present application, the designer can perform design operations in the visual design interface of the design software, and the electronic device can produce the marquee special effect in response to the designer's operations in the visual design interface. The visual design interface can be, for example, Figure 5 The interface shown in the figure allows designers to input, adjust, and create numerical values, which is very convenient to operate.
[0145] The present application provides a method for producing a marquee special effect, in which the light strip model of the determined marquee special effect is consistent with the overall appearance of the marquee special effect. Since the overall appearance of the marquee special effect is usually a simple shape such as a long strip, a frame, or a curve, the determined light strip model is usually also a very simple model, and the number of model faces of the light strip model is usually very small. After the light strip model is determined, the first part of the first texture assigned to the light strip model is displayed, and the part of the first texture other than the first part is hidden. In this way, the first texture of the part of the light strip model corresponding to the virtual lamp beads is displayed, and the texture corresponding to the part other than the virtual lamp beads is hidden. Since the first texture is used to form the image displayed by the virtual lamp beads, the texture of the displayed part of the model assigned to the first texture can display the image displayed by each virtual lamp bead, so that the model assigned to the first texture can display the effect of the virtual lamp beads, so that the marquee special effect can be conveniently determined according to the model assigned to the first texture.
[0146] It can be seen that the production solution of the marquee special effect provided by this application does not require the production of multiple lamp bead models, but only requires the production of a light strip model corresponding to the overall shape of the marquee special effect, and the virtual lamp bead effect is produced by setting whether the first map is displayed. Since it is not necessary to produce multiple lamp bead models but only one light strip model, the model surface of the marquee special effect can be greatly reduced. For example, Figure 3 、 Figure 4 As shown in the figure, the number of model faces has been reduced from 1568 to 68, which makes the special effects production process and the game running process consume very little computer performance, allowing the game to run more smoothly.
[0147] In addition, since only one light strip model is needed to produce the marquee special effects, compared with the existing technology of producing a large number of lamp bead models, the solution provided by this application optimizes the special effects production process, and the model creation process is very simple, which makes the production process of the marquee special effects simpler and reduces the art production cost.
[0148] When designers need to adjust the size and spacing of the virtual lamp beads, since adjustments to the first texture are usually made in the animation production software, designers only need to adjust the visible and hidden parts of the first texture of the light strip model in the animation production software, without having to import the model into the 3D model production software for adjustment, making the adjustment process more convenient. In addition, designers do not need to manually adjust the size and spacing of each model, but can directly adjust the display parameters of the first texture, reducing the need for repeated model modifications and making special effects adjustments easier to operate.
[0149] In one embodiment, Figure 2 As shown, before step S130, the above manufacturing method may further include the following step S150.
[0150] Step S150: assigning a mask map to the light strip model.
[0151] The mask map includes a plurality of lamp bead graphics, and the plurality of lamp bead graphics are consistent with the distribution of the plurality of virtual lamp beads.
[0152] The multiple lamp bead graphics contained in the mask map can be distinguished from the graphics other than the lamp bead graphics in the mask map. Specifically, the color information (such as RGB value, CMYK value, etc.) of the area corresponding to the lamp bead graphics and the area corresponding to the graphics other than the lamp bead graphics can be different.
[0153] The lamp bead pattern can be a solid color pattern, a gradient color pattern, or a combination of multiple colors, which is not specifically limited in this application.
[0154] For example, when the distribution of multiple virtual lamp beads of the marquee special effect is as follows Figure 18 When the mask map is assigned to the light strip model as shown on the left or right side of the figure, the mask map can be as follows Figure 14 The figure on the right.
[0155] In step S150, a mask texture can be assigned to the light strip model based on design software such as 3D drawing software or a game engine. Specifically, the designer can select an image from a gallery that matches the distribution of the virtual lamp beads, or draw an image that matches the distribution of the virtual lamp beads. The electronic device can then assign the image selected or drawn by the designer to the light strip model to obtain a mask texture for the light strip model.
[0156] In step S150 , the electronic device may assign a mask map to the light strip model in response to the designer's mask map assignment operation.
[0157] Step S130 can be implemented according to the following step S131.
[0158] Step S131: using the mask map as a mask, masking and fusing the first map with the mask map to hide areas outside the first area of the first map and display the first area of the first map.
[0159] The first area is an area corresponding to each lamp bead pattern of the mask map.
[0160] Mask fusion is an image processing technique that uses a mask image as a mask to adjust the visibility of the image being processed. The areas of the image being processed that correspond to the masked areas of the mask image are hidden, while the areas corresponding to the unmasked areas of the mask image are displayed. In step S131, the areas corresponding to the lamp bead patterns of the mask image are the unmasked areas, and the areas outside the areas corresponding to the lamp bead patterns of the mask image are the masked areas.
[0161] Since the mask map usually only needs to display the lamp bead graphic, that is, the mask map only needs to distinguish the lamp bead graphic from other parts of the mask map, and there is no need to limit the specific color, image and other information in the lamp bead graphic to be the same as the color displayed by the marquee, therefore, it is relatively easy to obtain the mask map and assign it to the model. Therefore, this embodiment can easily realize the display of the first part of the first map of the light strip model and the hiding of the part of the first map of the light strip model except the first part through the mask fusion method, thereby making the production of the marquee special effect simpler, more convenient and more operational.
[0162] In a specific embodiment, the mask map may be a grayscale map, the color of the lamp bead pattern may be white and / or gray, and the color of the area other than the lamp bead pattern in the mask map may be black.
[0163] Specifically, the color of the lamp bead image can be white, gray, or partially white and partially gray. The grayscale of the lamp bead image can be determined based on the specific effect of the marquee special effect. For example, if the virtual lamp beads of the marquee special effect have a color gradient from dark to light, the color of the lamp bead image can also have a color gradient from low gray to high gray. A higher grayscale indicates a color closer to black.
[0164] In step S131 , the following step S131 a may be performed to hide the area outside the first area of the first map and display the first area of the first map.
[0165] Step S131a: Based on the principle that the degree of transparency is proportional to the grayscale of the corresponding mask map, the transparency of the first map is adjusted so that the area outside the first area of the first map is completely transparent, and the transparency of the areas in the first area corresponding to the white area and the gray area of the mask map are opaque and semi-transparent, respectively.
[0166] Since the color of the area outside the lamp bead pattern in the mask map is black, the area outside the first area of the first map is made completely transparent in step S131a, that is, the area of the first map corresponding to the black area of the mask map is completely transparent. The area outside the first area is completely transparent, that is, the area outside the first area is hidden.
[0167] The opaque portion of the first region is fully displayed. For the semi-transparent portion of the first region, the greater the grayscale of the mask map corresponding to the portion, the more transparent it is and the less clear it is. The smaller the grayscale of the mask map corresponding to the portion, the more opaque it is and the clearer it is.
[0168] In this embodiment, when the virtual lamp beads of the marquee special effect are solid-color lamp beads (ie, the colors of each pixel are the same), the color of the lamp bead graphics of the mask map may be white.
[0169] In this embodiment, the mask map is set to a grayscale image, which makes it easier to perform fusion calculations based on grayscale during mask fusion, making the mask fusion calculation more convenient. In addition, grayscale images are easier to produce and have a smaller image size, making the creation of the marquee effect simpler and more convenient, using less memory, and making it easier to modify the special effects later.
[0170] In a specific embodiment, Figure 17 As shown, the shapes and sizes of the multiple virtual lamp beads of the marquee special effect can be the same, and the multiple virtual lamp beads are evenly distributed along the extension direction of the marquee special effect. Even distribution means that the intervals between every two adjacent virtual lamp beads are the same.
[0171] Step S150 can be implemented according to the following steps S151 to S152.
[0172] Step S151: assign a material map to the light strip model, and set the number of repetitions of the material map in the direction consistent with the extension direction of the marquee special effect to N, so that the assigned material map is divided into N equal maps along the above extension direction.
[0173] The above N is the same as the number of multiple virtual lamp beads distributed along the extension direction of the marquee special effect, and the N equal-part maps correspond to the multiple virtual lamp beads one by one.
[0174] By setting the number of repetitions of a texture map to N, each of the N equal-part textures can be used as a texture calculation unit for texture calculation. This makes it easier to calculate textures for individual texture units, making it easier to create a marquee effect. The process of assigning texture maps to light strip models is also very convenient, making it easy to calculate, set, and adjust the assigned textures, making the creation of marquee effects even easier. Furthermore, by assigning texture maps to the light strip model, you can also give it the material of lamp beads, making the resulting marquee effect more realistic and vivid.
[0175] In step S151, the electronic device may, in response to the designer's operation on setting the number of repetitions on the design interface, set the number of material texture tiles of the light strip model along the extension direction of the marquee effect to N. The designer may manually enter N on the design interface, and the electronic device then obtains the number of repetitions N entered by the designer.
[0176] Step S162: setting each second area of each of the N equal parts of the map to white or gray, and setting the areas other than the second area to black, to obtain a mask map assigned to the light strip model.
[0177] The second area is the area corresponding to the virtual lamp beads of the marquee special effect.
[0178] In step S162, the second area of any one of the N equal-part textures can be set to white or gray, and the other parts of the N equal-part texture can be updated synchronously. This makes material texture setup more convenient and simple, and reduces the performance consumption of special effects creation and operation. When setting up, designers only need to set up one of the material textures. If designers need to adjust the size of the virtual lamp beads of the marquee special effect later, they only need to adjust one lamp bead, and the other lamp beads will be updated synchronously, making the special effects creation process simpler for designers.
[0179] In this embodiment, the shapes and sizes of the multiple virtual lamp beads are the same, and the multiple virtual lamp beads are evenly distributed, so the material map can be divided into N equal parts by setting the number of repetitions to N. When the number of virtual lamp beads changes, the designer only needs to reset the number of repetitions N, and there is no need to adjust the size and distribution of each lamp bead model through related technologies, which makes it easier and more convenient for designers to adjust the distribution of lamp beads.
[0180] In a specific embodiment, before step S151, the above-mentioned production method may further include the following steps: UV unfolding the light strip model to obtain a UV unfolded model, wherein the U direction or the V direction in the UV unfolded model is consistent with the extension direction of the virtual light strip.
[0181] Step S151 can be implemented by the following steps: adding a material map to the above UV unfolded model.
[0182] Among them, the material map of the light strip model changes synchronously with the material map of the UV unfolded model.
[0183] In this embodiment, UV unfolding may be performed in response to a UV unfolding operation by a designer.
[0184] Among them, UV unfolding refers to the process of creating UV maps for three-dimensional models. UV mapping and unfolding is a process of unfolding a three-dimensional image onto a two-dimensional plane for mapping, so that each vertex has a UV parameter value. UV coordinates are also called texture coordinates. UV coordinates are usually coordinates within the range of 1 for both U coordinates and V coordinates. Figure 4 As shown, you can Figure 4 The UV image on the left is expanded into Figure 4 The image on the right shows the UV unfolded model.
[0185] After adding material mapping to the UV unfolded model, subsequent operations such as material mapping setting or adjustment, first mapping assignment, first mapping setting or adjustment, etc. can be performed on the basis of the UV unfolded model with the material mapping added. In other words, operations on the light strip model can be achieved through operations on the UV unfolded model.
[0186] In many 3D design software or game engines, it is very convenient to assign material mapping or other mapping through UV unfolding models, which can make the mapping more reasonable and prevent the mapping from being deformed. This embodiment performs UV unfolding and produces a marquee special effect based on the UV unfolding model. The effect of the light strip model changes synchronously with the UV unfolding model, which makes it more convenient for designers to produce marquee special effects.
[0187] The above step S151 can be specifically implemented as follows: the number of repetitions of the texture map of the UV unfolded model along the first direction is set to N, where the first direction is the direction in the U direction and the V direction that is consistent with the extension direction of the marquee effect. In this way, the texture map assigned to the UV unfolded model can include N equal parts of the texture map along the first direction. Figure 6 As shown, the extension direction of the marquee special effect can be used as the U direction, and the width direction of the light strip model can be used as the V direction.
[0188] Exemplarily, taking the production of special effects based on the UE4 engine as an example, with the first direction being the U direction, step S151 can be specifically implemented according to the following process: the repetition value of the material map of the UV unfolded model along the first direction is set to N, and the coordinate value of the material map of the UV unfolded model in the U direction is calculated by modulus, so as to set the number of material repetitions of the UV unfolded model along the first direction to N. In this example, the designer can perform the repetition value setting operation and the modulus operation in the design interface, and the electronic device can respond to the designer's repetition value setting operation and the modulus operation, set the repetition value of the material map of the UV unfolded model along the first direction to N, and perform the modulus calculation on the coordinate value of the material map of the UV unfolded model in the U direction. Different software can set the number of repetitions in different ways, which is not specifically limited in this application.
[0189] Taking the special effects production based on the UE4 engine as an example, the above-mentioned remainder calculation can be implemented through the Frac function of the UE4 engine.
[0190] In this example, taking N as 10, the texture map repetition value of the UV unfolded model along the first direction is set to 10. Figure 7 As shown, the value corresponding to the material map of the UV unfolded model becomes 1 to 10. After the remainder operation, the value corresponding to the material map of the UV unfolded model becomes 0 to 1, 0 to 1..., 0 to 1. In this way, the material map assigned to the UV unfolded model can be divided into 10 equal maps along the first direction.
[0191] like Figure 8 As shown, Figure 8 The left picture shows the effect of the light strip model after assigning the material map when N is 10. Figure 8 The right side of the picture is the effect of the light strip model after the material map is assigned when N is 100. Figure 9 As shown, Figure 9 The figure below shows the effect of the light strip model after assigning the material map when N is distributed as 1, 10, and 100. The value of N can be determined according to the number of virtual lamp beads, and this application does not specifically limit it.
[0192] The above example is an exemplary operation for dividing the material map assigned by the UV unfolding model into N equal parts along the first direction. Those skilled in the art can also divide the material map assigned by the UV unfolding model into N equal parts along the first direction through other methods.
[0193] In one specific embodiment, during UV unwrapping, to improve texture resolution, the UV unwrapped model can occupy a larger proportion of the UV coordinate system than a preset proportion. The preset proportion can be any ratio between 80% and 95%, for example, 80%, 88%, or 90%, or other larger proportions. Optionally, the UV unwrapped model can occupy the entire UV coordinate system, which also makes the texture display clearer and with higher resolution.
[0194] Before the step of assigning a material map to the UV unfolded model, the above-mentioned production method may further include the following step S190.
[0195] Step S190: Separate the U channel and the V channel of the UV unfolded model to obtain a U channel model and a V channel model.
[0196] In step 151 , the number of repetitions of the material map in the direction consistent with the extension direction of the marquee effect may be set to N according to the following steps: the number of material tiles of the first channel model is set to N.
[0197] The first channel model is a channel model whose corresponding direction in the U channel model and the V channel model is consistent with the above-mentioned extension direction.
[0198] After setting the number of material tiles of the first channel model to N, you can merge the U channel model and the V channel model into a UV channel. This allows you to perform operations based on the merged model before executing subsequent steps.
[0199] After separating the U and V channels in this embodiment, the first channel model can be operated separately, which makes it easier to set the number of repetitions of the material map of the light strip model along the extension direction of the marquee special effect to N.
[0200] In one embodiment, the multiple evenly distributed virtual lamp beads included in the marquee special effect can be circular virtual lamp beads, and the above-mentioned second area is a circular area, which has the center of each of the N equal parts of the map as the center of the circle, and the radius of the circular area is the same as the radius of the virtual lamp beads.
[0201] This embodiment can easily realize the production of the marquee special effect of circular virtual lamp beads, and the size of the virtual lamp beads obtained can be adjusted by setting the diameter or radius of the circular area. The adjustment process is very convenient. Figure 13 As shown, by adjusting the radius of the circular area, the shape of the lamp beads in the mask map also changes accordingly. This results in circular virtual lamp beads. Since circular virtual lamp beads are a very widely used lamp bead shape, this embodiment can make the created marquee special effect more applicable to a wider range of applications.
[0202] In this embodiment, when the virtual lamp bead is a circular virtual lamp bead, the second area of each material map in the N equal parts map can be set to white or gray in the following way: calculate the distance between each pixel point in the circular area (i.e., the second area) and the center of the circular area; based on the rule that the calculated distance is proportional to the grayscale of the pixel point, calculate the grayscale of the pixel points in the circular area of each material map to set the second area corresponding to the virtual lamp bead in each material to white and / or gray.
[0203] This embodiment calculates the distance from the center of the circular area. The closer to the center of the circular area, the closer to white (can be white), and the farther away from the center of the circular area, the closer to black (but not black). This makes it easy to set the second area corresponding to the virtual lamp bead in each material to white and / or gray.
[0204] Alternatively, all pixels in the circular area may be directly set to white or gray. Those skilled in the art may perform specific settings of the material map according to the specific effect of the marquee effect, and this application does not specifically limit this.
[0205] Specifically, when assigning materials to the above UV unfolded model, take UE4 engine as special effects production software as an example, Figure 10 As shown in the figure, the DISTANCE function can be used to make the grayscale of each pixel in the circular area of the texture map inversely proportional to the distance from the center of the circular area, and then the result processed by the DISTANCE function is subjected to the reverse operation of the color grayscale, so that the distance calculated above is proportional to the grayscale of the pixel. Specifically, Figure 11 As shown, the reverse operation can be achieved through the One Minus node of the UE4 engine.
[0206] Taking the grayscale value range of 0 to 1 as an example, 0 represents black, 1 represents white, and values greater than 0 and less than 1 represent gray. In this case, the color inversion operation can be specifically: the value obtained by subtracting the grayscale value from 1 is determined as the inverted grayscale value. Figure 12 As shown, Figure 12 The left graph can be obtained by reverse operation Figure 12 The picture on the right.
[0207] In one embodiment, the light effect of the marquee special effect can be transmitted in a manner such that the colors of each virtual lamp bead are transmitted and changed in a marquee manner. For example, if the color of a virtual lamp bead is red at the current moment, the color of the lamp bead next to it will change to red at the next moment; or, if the color of a group of virtual lamp beads is red at the current moment, the color of the next group of virtual lamp beads next to it will change to red at the next moment, where a group of virtual lamp beads includes multiple consecutive virtual lamp beads. Transmitting and changing colors in a marquee manner may also be done in other ways, which are not specifically limited in this application.
[0208] Before step S120, the above manufacturing method may further include the following step S170.
[0209] Step S170: Acquire the image to be posted.
[0210] The acquired image to be pasted includes a plurality of image areas distributed along a second direction, and the colors of every two adjacent image areas are different. The second direction is any direction.
[0211] Specifically, such as Figure 15 As shown in the left figure, the colors of each of the multiple image regions can be different, that is, the colors corresponding to the multiple image regions are different, that is, no two regions of the multiple image regions have the same color. In this way, the colors of the marquee special effect can be more diverse. Figure 15 The figure on the right is a schematic diagram after the image to be pasted is directly assigned to the light strip model.
[0212] The overall shape of the image to be pasted can be a square, a strip, or other regular shapes to facilitate pasting. The overall shape of the image to be pasted can also be an irregular shape, such as a curved shape, a box shape, etc. This application does not specifically limit the shape of the image to be pasted. Since the diameter of the virtual lamp beads is usually relatively small, the width of each image area along the second direction can be set to be relatively small, so that the image to be pasted can contain more image areas, making the colors of the marquee special effect richer. However, the width of the image area along the second direction should not be too small to avoid the resolution being too low after pasting, which affects the special effect.
[0213] When the present application is to set up the mapping based on the UV unfolding model, since the UV coordinates are square, in order to facilitate mapping, such as Figure 15 As shown in the left figure, the acquired image to be pasted can also be a square, so that the clarity of the virtual lighting effect after mapping is better.
[0214] Step S120 can be implemented according to the following step S121.
[0215] Step S121: Based on the principle that the second direction of the image to be pasted is consistent with the extension direction of the marquee special effect, the image to be pasted is assigned to the light strip model to obtain a first texture assigned to the light strip model.
[0216] According to this embodiment, after the first texture is assigned to the light strip model, when a flow effect is added to the first texture, the colors of the virtual lamp beads can be transmitted and changed in a marquee manner.
[0217] In one specific embodiment, the widths of the image regions along the second direction may be equal, and the number of virtual light beads included in the marquee effect is an integer multiple of the number of image regions included in the image to be pasted. This integer multiple may be, for example, 1, 2, 3, etc., but is not limited thereto. For example, the marquee effect may include 100 virtual light beads, and the image to be pasted may include 10 or 5 image regions.
[0218] In step S121, the image to be pasted can be assigned to the light strip model according to the following steps: based on the method of tiling the image to be pasted into n parts in the extension direction of the marquee special effect, the image to be pasted is assigned to the light strip model so that the first map assigned to the light strip model contains N of the above-mentioned image areas along the above-mentioned extension direction.
[0219] Wherein n=N / m, m is the number of the plurality of image regions included in the image to be pasted.
[0220] For example, Figure 15 As shown, the number m of image regions included in the image to be pasted is 10, the number N of virtual lamp beads included in the marquee special effect is 100, and the number n of copies of the image to be pasted tiled in the extension direction of the marquee special effect is 10. Figure 16 This is the effect of the model after the number of tiles of the image to be pasted in the extension direction is changed from 1 to 10.
[0221] like Figure 17 As shown, Figure 17 The upper half of the left picture is the above-mentioned first texture effect picture given by the light strip model, and the upper half of the left picture is the above-mentioned mask texture effect picture given by the light strip model. Figure 17 The picture on the right is the effect of the model with the texture added after the first texture and the mask texture of the light strip model are masked and fused.
[0222] This embodiment can make each image area in the N image areas correspond one-to-one with each material in the above-mentioned N equal-division map, so that the N image areas correspond one-to-one to N virtual lamp beads. Since the colors or images corresponding to different image areas are usually different, the same image area usually constitutes a complete image or the same color. Therefore, this embodiment can make one virtual lamp bead in the marquee special effect correspond to one color or one complete graphic, and it is not easy to have color stringing or image stringing between adjacent virtual lamp beads, so that the effect of the marquee special effect is better.
[0223] The above-mentioned color string position may be, for example, that the red image area is displayed on the first virtual lamp bead and also on the virtual lamp bead adjacent to the first virtual lamp bead, affecting the marquee effect.
[0224] In a specific embodiment, the above step S140 can be implemented according to the following steps S141 to S142.
[0225] Step S141: setting the moving step length of the first map assigned to the model of the map to be equal to the length of the image area in the first map along the above-mentioned extension direction.
[0226] For example, when the length of each image area included in the first map along the extension direction is 5, the moving step length is also set to 5.
[0227] Step S142: controlling the first texture of the model assigned to the texture to move along the extension direction of the marquee special effect with the above-mentioned moving step length to obtain the marquee special effect.
[0228] Step S142 sets a flow effect for the first tile. In step S142, the first tile assigned to the tile model can be controlled to move one step along the aforementioned extension direction at intervals of a set duration. The set duration can be 1 second, 0.5 seconds, 2 seconds, or other durations. Those skilled in the art can set the unit duration based on the specific flow effect of the marquee effect, and this application does not specifically limit this.
[0229] This embodiment controls the first map to move one step each time. Since one step is the width of an image area of the first map, and an image area of the first map corresponds to a virtual lamp bead, after the first map moves one step, the image area of the first map can be moved to the position of the next virtual lamp bead, which can make the flow effect of the marquee special effect clearer and the visual effect better.
[0230] In one embodiment, the above manufacturing method may further include the following step S180.
[0231] Step S180: normalizing the information value corresponding to the material mapping information of the marquee special effect so that the value obtained after the normalization is within the range of 0 to 1.
[0232] The proportional relationship between the values obtained after the normalization process is consistent with the proportional relationship between the values before the normalization process.
[0233] Specifically, the information values corresponding to the above material mapping information can be normalized using a clamp function, a normalize function, or other functions, which are not specifically limited in this application. Among them, the clamp function can limit the value to a set value range, for example, the value range set in this application is 0 to 1.
[0234] Since the information values corresponding to the material mapping information are sometimes of a large magnitude, for example, the information values may be 200, 3000, etc., these values will result in a very large amount of calculation after being calculated with each other, affecting the speed of game operation and the speed of special effects production, and consuming a large amount of system performance. This implementation standardizes the information values corresponding to the material mapping information so that the processed values are within the range of 0 to 1, greatly reducing the order of magnitude of the information values. Even if the information values are calculated with each other, the calculated values are still between 0 and 1, thereby greatly reducing the amount of calculation, improving the speed of game operation and the speed of special effects production, and reducing the consumption of system performance.
[0235] In a specific embodiment, the above production method may further include the following steps: in response to the designer's edge blurring operation, controlling the degree of virtuality of the adjacent edges of the lamp bead graphics in the above mask map. Specifically, taking the UE engine as an example, the degree of virtuality of the adjacent edges of the lamp bead graphics can be determined according to the softening value input by the designer in the design interface, so as to produce a blurring effect that meets the requirements according to the designer's operation. Figure 14 Shown is a comparison chart of different blur effects. Figure 14 The picture on the left is the effect of the softening value of 1. Figure 14 The image on the right shows the effect of setting the softening value to infinite.
[0236] In a specific embodiment, the above production method may further include the following steps: in response to the brightness adjustment operation of the designer, adjusting the brightness of the above first map. Specifically, taking the UE engine as an example, the brightness of the map can be adjusted according to the brightness value input by the designer in the design interface to produce a brightness effect that meets the requirements. Figure 18 The following is a comparison chart of brightness adjustment. Figure 18 The picture on the left is the effect picture when the brightness intensity is low. Figure 18 The picture on the right shows the effect when the brightness intensity is higher.
[0237] In this embodiment, the adjustment of the degree of virtuality and brightness can also be understood as the adjustment of the color of the pixel points. That is, the change of the degree of virtuality and brightness of the image is achieved by adjusting the color information of the pixel points. The specific adjustment process is not repeated here.
[0238] Figure 19 This is an effect diagram of the marquee special effect produced by the production method provided in this application and applied in the game scene. Designers can adjust the brightness, blurring effect, etc. of the virtual lamp beads in the visual design interface according to actual needs, and the adjustment is very convenient.
[0239] Corresponding to the method for producing the marquee special effect provided in the first embodiment of the present application, the second embodiment of the present application provides a device for producing the marquee special effect, wherein the marquee special effect comprises a plurality of virtual lamp beads distributed along the extension direction of the marquee special effect, such as Figure 20 As shown, the device includes:
[0240] The determining unit 2001 is configured to obtain a light strip model of a marquee special effect, wherein the shape of the light strip model is consistent with the overall appearance of the marquee special effect;
[0241] A texture assigning unit 2002 is configured to assign a first texture to the light strip model, where the first texture is used to form an image displayed by the virtual lamp beads;
[0242] A texture setting unit 2003 is configured to display a first portion of the first texture and hide portions of the first texture other than the first portion, thereby obtaining a model assigned to the texture, wherein the first portion is a portion corresponding to the plurality of virtual lamp beads;
[0243] The production unit 2004 is used to produce the marquee special effect based on the model assigned with the texture.
[0244] Optionally, the texture assigning unit is further configured to: assign a mask texture to the light strip model, wherein the mask texture includes a plurality of lamp bead graphics, and the plurality of lamp bead graphics are consistent with a distribution mode of the plurality of virtual lamp beads;
[0245] The mapping setting unit is specifically used for:
[0246] Using the mask map as a mask, the first map is masked and fused with the mask map to hide the area outside the first area of the first map and display the first area of the first map. The first area is: the area corresponding to each of the lamp bead patterns.
[0247] Optionally, the mask map is a grayscale map, the color of the lamp bead pattern is white and / or gray, and the color of the area in the mask map other than the lamp bead pattern is black;
[0248] The mapping setting unit is specifically used for:
[0249] Based on the principle that the degree of transparency is proportional to the grayscale of the corresponding mask map, the transparency of the first map is adjusted so that the area outside the first area of the first map is completely transparent, and the transparency of the areas in the first area corresponding to the white area and the gray area of the mask map are opaque and semi-transparent, respectively, where a larger grayscale indicates a color closer to black.
[0250] Optionally, the multiple virtual lamp beads have the same shape and size, and the multiple virtual lamp beads are evenly distributed;
[0251] The mapping unit is specifically used for:
[0252] Assign a material map to the light strip model, and set the number of repetitions of the material map in the direction consistent with the extension direction to N, so that the material map is divided into N equal maps along the extension direction, where N is the same as the number of the plurality of virtual lamp beads;
[0253] The second areas of each of the N equal parts of the map are set to white or gray, and the areas other than the second areas are set to black, to obtain a mask map assigned to the light strip model, where the second areas are areas corresponding to the virtual lamp beads.
[0254] Optionally, the device further comprises:
[0255] an unfolding unit, configured to perform UV unfolding on the light strip model to obtain a UV unfolded model, wherein a U direction or a V direction in the UV unfolded model is consistent with the extension direction;
[0256] The mapping unit is specifically used for:
[0257] Add a material map to the UV unfolded model, wherein the material map of the light strip model changes synchronously with the material map of the UV unfolded model.
[0258] Optionally, the unfolding unit is further configured to: separate the U channel and the V channel of the UV unfolding model to obtain a U channel model and a V channel model;
[0259] The mapping unit is specifically used to set the number of repetitions of the material mapping of the first channel model to N, and the first channel model is a channel model whose corresponding directions in the U channel model and the V channel model are consistent with the extension direction.
[0260] Optionally, the multiple virtual lamp beads are circular virtual lamp beads, the second area is a circular area, the circular area has the center of each map as the center, and the radius of the circular area is the same as the radius of the virtual lamp beads.
[0261] Optionally, the map assigning unit is specifically used to:
[0262] Calculate the distance between each pixel point in the circular area and the center of the circular area;
[0263] Based on the rule that the distance is proportional to the grayscale of the pixel points, the grayscale of the pixel points within the circular area in each material map is calculated to set the second area corresponding to the virtual lamp bead in each material to white and / or gray.
[0264] Optionally, the light effect of the marquee special effect is transmitted in a manner that the colors of the virtual lamp beads are transmitted and changed in a marquee manner;
[0265] The device further comprises:
[0266] An image acquisition unit is configured to acquire an image to be pasted, wherein the image to be pasted comprises a plurality of image regions distributed along a second direction, wherein two adjacent image regions have different colors, and the second direction is any direction;
[0267] The mapping unit is specifically used for:
[0268] Based on the principle that the second direction of the image to be pasted is consistent with the extension direction, the image to be pasted is assigned to the light strip model to obtain a first texture assigned to the light strip model.
[0269] Optionally, the widths of the image regions along the second direction are equal, and the number of the plurality of virtual lamp beads is an integer multiple of the number of the plurality of image regions;
[0270] The mapping unit is specifically used for:
[0271] Based on the way that the map is tiled n times in the extension direction, the image to be pasted is assigned to the light strip model so that the first map contains N image areas along the extension direction, and the first map assigned to the light strip model is obtained, where n=N / m, m is the number of the multiple image areas.
[0272] Optionally, the production unit is specifically configured to:
[0273] Setting the moving step length of the first map to be equal to the length of the image area in the first map along the extension direction;
[0274] The map is controlled to move along the extension direction with the moving step length to obtain the marquee special effect.
[0275] Optionally, the making further includes:
[0276] A processing unit is used to standardize the information values corresponding to the material information of the marquee special effect so that the values obtained after standardization are within the range of 0 to 1, wherein the proportional relationship between the various values obtained after standardization is consistent with the proportional relationship between the various values before standardization.
[0277] Corresponding to the method for producing the marquee special effect provided in the first embodiment of the present application, the third embodiment of the present application further provides an electronic device for producing the marquee special effect. Figure 21 As shown, the electronic device includes: a processor 2001; and a memory 2002, which is used to store a program for a method for producing a marquee special effect. After the device is powered on and the program for producing the marquee special effect is run by the processor, the following steps are performed:
[0278] Obtaining a light strip model of a marquee special effect, wherein the shape of the light strip model is consistent with the overall appearance of the marquee special effect;
[0279] Assigning a first texture to the light strip model, where the first texture is used to form an image displayed by the virtual lamp beads;
[0280] Displaying a first portion of the first texture and hiding portions of the first texture other than the first portion to obtain a model assigned to the texture, wherein the first portion is a portion corresponding to the plurality of virtual lamp beads;
[0281] The marquee special effect is produced based on the model assigned with the texture.
[0282] Corresponding to the method for producing a marquee special effect provided in the first embodiment of the present application, the fourth embodiment of the present application provides a computer-readable storage medium storing a program for producing a marquee special effect. The program is executed by a processor to perform the following steps:
[0283] Obtaining a light strip model of a marquee special effect, wherein the shape of the light strip model is consistent with the overall appearance of the marquee special effect;
[0284] Assigning a first texture to the light strip model, where the first texture is used to form an image displayed by the virtual lamp beads;
[0285] Displaying a first portion of the first texture and hiding portions of the first texture other than the first portion to obtain a model assigned to the texture, wherein the first portion is a portion corresponding to the plurality of virtual lamp beads;
[0286] The marquee special effect is produced based on the model assigned with the texture.
[0287] It should be noted that for the detailed description of the devices, electronic devices and computer-readable storage media provided in the second, third and fourth embodiments of the present application, reference can be made to the relevant description of the first embodiment of the present application, and no further details will be given here.
[0288] Although the present application is disclosed as above with the preferred embodiments, it is not intended to limit the present application. Any person skilled in the art may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
[0289] In a typical configuration, a node device in a blockchain includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0290] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0291] 1. Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), random access memory (RAM) of other types, read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage media, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.
[0292] 2. Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0293] Although the present application is disclosed as above with the preferred embodiments, it is not intended to limit the present application. Any person skilled in the art may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
Claims
1. A method for producing a marquee special effect, characterized in that: The marquee special effect includes a plurality of virtual lamp beads distributed along an extension direction of the marquee special effect, and the method includes: Obtaining a light strip model of a marquee special effect, wherein the shape of the light strip model is consistent with the overall appearance of the marquee special effect; Assigning a first texture to the light strip model, where the first texture is used to form an image displayed by the virtual lamp beads; Assigning a mask map to the light strip model, wherein the mask map includes a plurality of lamp bead graphics, and the plurality of lamp bead graphics are consistent with the distribution of the plurality of virtual lamp beads; Displaying a first portion of the first texture and hiding portions of the first texture other than the first portion, comprising: using the mask texture as a mask, mask-fusion the first texture and the mask texture to hide areas other than the first area of the first texture, and displaying the first area of the first texture to obtain a model assigned to the texture, wherein the first portion is a portion corresponding to the plurality of virtual lamp beads, and the first area is an area corresponding to each of the lamp bead graphics; The marquee special effect is produced based on the model assigned with the texture.
2. The method according to claim 1, characterized in that The mask map is a grayscale map, the color of the lamp bead pattern is white and / or gray, and the color of the area in the mask map other than the lamp bead pattern is black; The masking and fusing the first map with the mask map to hide an area outside the first area of the first map and display the first area of the first map includes: Based on the principle that the degree of transparency is proportional to the grayscale of the corresponding mask map, the transparency of the first map is adjusted so that the area outside the first area of the first map is completely transparent, and the transparency of the areas in the first area corresponding to the white area and the gray area of the mask map are opaque and semi-transparent, respectively, where a larger grayscale indicates a color closer to black.
3. The method according to claim 2, characterized in that The multiple virtual lamp beads have the same shape and size, and are evenly distributed; Assigning a mask map to the light strip model includes: Assign a material map to the light strip model, and set the number of repetitions of the material map in the direction consistent with the extension direction to N, so that the material map is divided into N equal maps along the extension direction, where N is the same as the number of the plurality of virtual lamp beads; The second areas of each of the N equal parts of the map are set to white or gray, and the areas other than the second areas are set to black, to obtain a mask map assigned to the light strip model, where the second areas are areas corresponding to the virtual lamp beads.
4. The method according to claim 3, characterized in that Before assigning a material map to the light strip model, the method further includes: Performing UV unfolding on the light strip model to obtain a UV unfolded model, wherein a U direction or a V direction in the UV unfolded model is consistent with the extension direction; Assigning a material map to the light strip model includes: Add a material map to the UV unfolded model, wherein the material map of the light strip model changes synchronously with the material map of the UV unfolded model.
5. The method according to claim 4, characterized in that Before assigning a material map to the UV unfolded model, the method further includes: Separating the U channel and the V channel of the UV unfolded model to obtain a U channel model and a V channel model; The step of setting the number of repetitions of the material map in the extension direction to N includes: The number of repetitions of the material map of the first channel model is set to N, and the first channel model is a channel model whose corresponding directions in the U channel model and the V channel model are consistent with the extension direction.
6. The method according to claim 3, characterized in that The multiple virtual lamp beads are circular virtual lamp beads, the second area is a circular area, the circular area has the center of each map as the center, and the radius of the circular area is the same as the radius of the virtual lamp beads.
7. The method according to claim 6, characterized in that The step of setting the second area of each of the N equal parts of the texture map to white or gray includes: Calculate the distance between each pixel point in the circular area and the center of the circular area; Based on the rule that the distance is proportional to the grayscale of the pixel points, the grayscale of the pixel points within the circular area in each material map is calculated to set the second area corresponding to the virtual lamp bead in each material to white and / or gray.
8. The method according to claim 3, characterized in that The light effect of the marquee special effect is transmitted in the following manner: the colors of the virtual lamp beads are transmitted and changed in the manner of a marquee; Before assigning the first texture to the light strip model, the method further includes: Acquire an image to be pasted, wherein the image to be pasted comprises a plurality of image regions distributed along a second direction, wherein two adjacent image regions have different colors, and the second direction is any direction; Assigning a first texture to the light strip model includes: Based on the principle that the second direction of the image to be pasted is consistent with the extension direction, the image to be pasted is assigned to the light strip model to obtain a first texture assigned to the light strip model.
9. The method according to claim 8, characterized in that The widths of the image regions along the second direction are equal, and the number of the plurality of virtual lamp beads is an integer multiple of the number of the plurality of image regions; Assigning the image to be attached to the light strip model to obtain a first texture assigned to the light strip model includes: Based on the manner in which the image to be pasted is tiled n times in the extension direction, the image to be pasted is assigned to the light strip model so that the first map assigned to the light strip model contains N image areas along the extension direction, where n=N / m, and m is the number of the multiple image areas.
10. The method according to claim 9, characterized in that The determining the marquee special effect based on the model assigned to the map includes: Setting the moving step length of the first map to be equal to the length of the image area in the first map along the extension direction; The first map is controlled to move along the extension direction with the moving step length to obtain the marquee special effect.
11. The method according to any one of claims 1 to 10, characterized in that The method further comprises: The information values corresponding to the material mapping information of the marquee special effect are standardized so that the values obtained after standardization are within the range of 0 to 1, wherein the proportional relationship between the values obtained after standardization is consistent with the proportional relationship between the values before standardization.
12. A device for producing a marquee special effect, characterized in that: The marquee special effect includes a plurality of virtual lamp beads distributed along the extension direction of the marquee special effect, and the device includes: a determining unit, configured to obtain a light strip model of a marquee special effect, wherein a shape of the light strip model is consistent with an overall appearance of the marquee special effect; a texture assigning unit, configured to assign a first texture to the light strip model, the first texture being used to form an image displayed by the virtual lamp beads; and assign a mask texture to the light strip model, the mask texture comprising a plurality of lamp bead patterns, the plurality of lamp bead patterns being consistent with a distribution pattern of the plurality of virtual lamp beads; a texture setting unit, configured to display a first portion of the first texture and hide portions of the first texture other than the first portion, to obtain a model assigned to the texture, wherein the first portion is a portion corresponding to the plurality of virtual lamp beads; A production unit, configured to produce the marquee special effect based on the model assigned with the texture; The mapping setting unit is specifically used for: Using the mask map as a mask, the first map is masked and fused with the mask map to hide the area outside the first area of the first map and display the first area of the first map. The first area is: the area corresponding to each of the lamp bead patterns.
13. An electronic device, characterized in that: include: processor; as well as The memory is used to store a data processing program. After the electronic device is powered on and the program is run by the processor, the method according to any one of claims 1 to 11 is executed.
14. A computer-readable storage medium, characterized in that A data processing program is stored, and the program is run by a processor to perform the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Image display method and device, electronic equipment and computer readable storage medium
CN111583398A