CN113064540B - Game-based drawing method, game-based drawing device, electronic device, and storage medium - Google Patents

Game-based drawing method, game-based drawing device, electronic device, and storage medium Download PDF

Info

Publication number
CN113064540B
CN113064540B CN202110317276.2A CN202110317276A CN113064540B CN 113064540 B CN113064540 B CN 113064540B CN 202110317276 A CN202110317276 A CN 202110317276A CN 113064540 B CN113064540 B CN 113064540B
Authority
CN
China
Prior art keywords
rendering
initial
rendering target
map
sampling points
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110317276.2A
Other languages
Chinese (zh)
Other versions
CN113064540A (en
Inventor
郑奇晖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202110317276.2A priority Critical patent/CN113064540B/en
Publication of CN113064540A publication Critical patent/CN113064540A/en
Application granted granted Critical
Publication of CN113064540B publication Critical patent/CN113064540B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects
    • G06T15/503Blending, e.g. for anti-aliasing

Abstract

The application provides a drawing method, a drawing device, electronic equipment and a storage medium based on a game, and relates to the technical field of rendering. The method can display a graphical user interface through the terminal equipment, the graphical user interface displays a main scene interface, the main scene interface comprises a drawing area, and the method comprises the following steps: responding to the drawing operation in the drawing area, and acquiring drawing parameters of sampling points in the drawing track; generating a map corresponding to each sampling point according to the drawing parameters of the sampling points and a preset map, wherein the preset map is configured with a preset transparency; according to the method and the device for rendering the mapping, the mapping corresponding to the rendering track is obtained according to the mapping corresponding to each sampling point and the main rendering target, the main rendering target is the rendering target corresponding to the current main scene, and by applying the embodiment of the application, the mapping can be rendered according to the plurality of mappings corresponding to the plurality of sampling points, so that the mapping shows the effect of a brush, and the representation details of the mapping can be enriched.

Description

Game-based drawing method, game-based drawing device, electronic device, and storage medium
Technical Field
The present application relates to the field of game technologies, and in particular, to a drawing method, a drawing apparatus, an electronic device, and a storage medium based on a game.
Background
With the increasing variety of games, in some game scenes, in order to improve the participation and interactivity of players, players may need to perform some free drawing operations, for example, in a card game, players may obtain corresponding game cards through drawing, so as to improve the game interaction experience of players.
In the prior art, when drawing is performed in a game, corresponding track symbols are generally drawn and presented according to the sliding track of the fingers of a player.
However, the existing drawing method is simple, and the expression effect of the track symbol is single.
Disclosure of Invention
In view of the above-mentioned shortcomings in the prior art, an object of the present application is to provide a drawing method, a drawing apparatus, an electronic device and a storage medium based on a game, which can enrich the representation details of a drawing.
In order to achieve the above purpose, the technical solutions adopted in the embodiments of the present application are as follows:
in a first aspect, the present invention provides a drawing method based on a game, in which a graphical user interface is displayed through a terminal device, the graphical user interface displays a main scene interface, the main scene interface includes a drawing area, and the method includes:
responding to the drawing operation in the drawing area, and acquiring drawing parameters of sampling points in a drawing track;
generating a map corresponding to each sampling point according to the drawing parameters of the sampling points and a preset map, wherein the preset map is configured with a preset transparency;
and acquiring a drawing graph corresponding to the drawing track according to the mapping and a main rendering target corresponding to each sampling point, wherein the main rendering target is a rendering target corresponding to the current main scene.
In an alternative embodiment, the method further comprises:
and responding to the drawing operation in the drawing area, acquiring a current touch point according to the drawing track, and generating a particle special effect corresponding to the current touch point.
In an alternative embodiment, the rendering parameters include: the speed at which the frame is drawn;
generating a map corresponding to each sampling point according to the drawing parameters of the sampling points and a preset map, wherein the generating of the map comprises the following steps:
obtaining a mapping size corresponding to the sampling point according to the speed of the drawing frame;
and generating a map corresponding to each sampling point according to the map size and the preset map.
In an optional implementation manner, the obtaining, according to the speed of the drawing frame, a map size corresponding to the sample point includes:
and if the current drawing frame is not the first drawing frame, determining the mapping size corresponding to the sampling point of the current drawing frame according to the mapping size corresponding to the sampling point of the last drawing frame and the speed of the current drawing frame.
In an optional embodiment, the obtaining drawing parameters of the sampling points in the drawing trajectory includes:
if the speed of the drawing frame is determined to be greater than a preset speed threshold value, performing interpolation operation on each sampling point according to a preset interpolation algorithm to obtain interpolated sampling points;
and determining the drawing parameters of the interpolation sampling points according to the drawing parameters of the sampling points.
In an optional embodiment, the obtaining, according to the map and the main rendering target corresponding to each sampling point, a drawing map corresponding to the drawing track includes:
based on the initial rendering target corresponding to the drawing area, overlaying the mapping corresponding to each sampling point to obtain an overlaid initial rendering target;
rendering the initial rendering target after the superposition into the main rendering target, and acquiring a rendering graph corresponding to the rendering track.
In an alternative embodiment, the initial render target is configured not to perform an operation of cleaning color values before rendering each frame;
the step of superposing the maps corresponding to the sampling points based on the initial rendering target corresponding to the drawing area to obtain the superposed initial rendering target comprises the following steps:
and based on the initial rendering target corresponding to the drawing area, performing incremental superposition on the maps corresponding to the sampling points on the initial rendering target to obtain the superposed initial rendering target.
In an optional implementation manner, before the overlaying the maps corresponding to the sampling points based on the initial rendering target corresponding to the drawing area and obtaining the overlaid initial rendering target, the method further includes:
and performing initial clearing operation on an initial rendering target corresponding to the drawing area according to an initial quadrangle, wherein the initial quadrangle is configured to be a pure black and completely transparent quadrangle.
In an optional embodiment, after the overlaying the maps corresponding to the sampling points based on the initial rendering target corresponding to the drawing region and obtaining the overlaid initial rendering target, the method further includes:
and rendering the preset rendering position in the initial rendering target corresponding to the rendering area by adopting a preset transparent surface patch.
In an optional embodiment, the rendering the superimposed initial rendering target to the main rendering target to obtain a drawing graph corresponding to the drawing trajectory includes:
performing mixing operation on the superposed initial rendering target and an initial mapping to obtain a mixed patch, wherein the initial mapping is a preset mapping corresponding to the drawing area;
rendering the mixed patch into the main rendering target, and acquiring a rendering graph corresponding to the rendering track.
In an alternative embodiment, if the rendering mode is a rotationally symmetric mode, the rendering region includes at least two sub-rendering regions;
the step of obtaining the drawing parameters of the sampling points in the drawing track in response to the drawing operation in the drawing area comprises the following steps:
responding to the drawing operation in any one of the sub-drawing areas, and respectively obtaining drawing parameters of sampling points in the drawing tracks of each sub-drawing area;
correspondingly, the obtaining a drawing graph corresponding to the drawing track according to the mapping and the main rendering target corresponding to each sampling point includes:
and acquiring the sub-drawing corresponding to the drawing track of each sub-drawing area according to the mapping and the main rendering target corresponding to the sampling point in the drawing track of each sub-drawing area.
In a second aspect, the present invention provides a drawing device based on a game, which displays a graphical user interface through a terminal device, where the graphical user interface displays a main scene interface, the main scene interface includes a drawing area, and the drawing device includes:
the response module is used for responding to the drawing operation in the drawing area and acquiring the drawing parameters of the sampling points in the drawing track;
the generating module is used for generating a map corresponding to each sampling point according to the drawing parameters of the sampling points and a preset map, wherein the preset map is configured with a preset transparency;
and the obtaining module is used for obtaining a drawing graph corresponding to the drawing track according to the mapping and the main rendering target corresponding to each sampling point, wherein the main rendering target is a rendering target corresponding to the current main scene.
In an optional embodiment, the response module is further configured to, in response to the drawing operation in the drawing area, obtain a current touch point according to the drawing trajectory, and generate a particle special effect corresponding to the current touch point.
In an alternative embodiment, the rendering parameters include: the speed at which the frame is drawn; the generating module is specifically used for acquiring a chartlet size corresponding to the sampling point according to the speed of the drawing frame;
and generating a map corresponding to each sampling point according to the map size and the preset map.
In an optional embodiment, the generating module is specifically configured to, if the current drawing frame is not the first drawing frame, determine, according to a map size corresponding to a sampling point of a previous drawing frame and a speed of the current drawing frame, a map size corresponding to the sampling point of the current drawing frame.
In an optional embodiment, the response module is specifically configured to, if it is determined that the speed of the drawing frame is greater than a preset speed threshold, perform interpolation operation on each sampling point according to a preset interpolation algorithm to obtain interpolated sampling points;
and determining the drawing parameters of the interpolation sampling points according to the drawing parameters of the sampling points.
In an optional embodiment, the obtaining module is specifically configured to superimpose the maps corresponding to the sampling points based on the initial rendering target corresponding to the drawing area, and obtain the superimposed initial rendering target;
rendering the initial rendering target after the superposition into the main rendering target, and acquiring a rendering graph corresponding to the rendering track.
In an alternative embodiment, the initial render target is configured not to perform a color value cleanup operation prior to each frame of rendering; the obtaining module is specifically configured to perform incremental stacking on the maps corresponding to the sampling points on the initial rendering target based on the initial rendering target corresponding to the drawing area, and obtain the stacked initial rendering target.
In an optional embodiment, the obtaining module is further configured to perform an initial clearing operation on an initial rendering target corresponding to the drawing area according to an initial quadrilateral, where the initial quadrilateral is configured as a completely black and transparent quadrilateral.
In an optional embodiment, the obtaining module is further configured to render a preset rendering position in the initial rendering target corresponding to the drawing area by using a preset transparent patch.
In an optional embodiment, the obtaining module is specifically configured to perform a mixing operation on the superimposed initial rendering target and an initial map, and obtain a mixed patch, where the initial map is a preset map corresponding to the drawing area;
rendering the mixed patch into the main rendering target, and acquiring a rendering graph corresponding to the rendering track.
In an alternative embodiment, if the rendering mode is a rotationally symmetric mode, the rendering region includes at least two sub-rendering regions; the response module is specifically used for responding to the drawing operation in any one of the sub-drawing areas and respectively acquiring the drawing parameters of the sampling points in the drawing tracks of each sub-drawing area; correspondingly, the obtaining module is specifically configured to obtain the sub-rendering map corresponding to the drawing track of each sub-drawing area according to the chartlet and the main rendering target corresponding to the sampling point in the drawing track of each sub-drawing area.
In a third aspect, the present invention provides an electronic device comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, when the electronic device runs, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to execute the steps of the game-based rendering method according to any one of the foregoing embodiments.
In a fourth aspect, the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the game-based rendering method according to any one of the preceding embodiments.
The beneficial effect of this application is:
in a drawing method, a drawing apparatus, an electronic device, and a storage medium based on a game provided in an embodiment of the present application, the method may display a graphical user interface through a terminal device, the graphical user interface displaying a main scene interface, the main scene interface including a drawing area, the method including: responding to the drawing operation in the drawing area, and acquiring drawing parameters of sampling points in the drawing track; generating a map corresponding to each sampling point according to the drawing parameters of the sampling points and a preset map, wherein the preset map is configured with a preset transparency; according to the method and the device for rendering the drawing, the drawing corresponding to the drawing track is obtained according to the chartlets corresponding to the sampling points and the main rendering target, the main rendering target is the rendering target corresponding to the current main scene, and by applying the embodiment of the application, the drawing can be rendered according to the plurality of chartlets corresponding to the sampling points, so that the drawing presents the effect of a brush, and the representation details of the drawing can be enriched.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic flow chart of a game-based rendering method according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart diagram of another game-based rendering method provided in an embodiment of the present application;
FIG. 3 is a schematic flow chart diagram illustrating another game-based rendering method according to an embodiment of the present disclosure;
FIG. 4 is a schematic flow chart diagram illustrating another game-based rendering method provided in an embodiment of the present application;
FIG. 5 is a schematic flow chart diagram illustrating another game-based rendering method according to an embodiment of the present disclosure;
FIG. 6 is a schematic flow chart diagram illustrating another game-based rendering method according to an embodiment of the present disclosure;
FIG. 7 is a schematic flow chart diagram illustrating another game-based rendering method according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a rendering chart provided in an embodiment of the present application;
fig. 9 is a schematic functional block diagram of a drawing device based on a game according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the existing game scene, in order to improve the participation and interactivity of the player, the player may need to perform some free drawing operations, which are commonly applied to draw card characters of games or brush strokes of drawing applications, and corresponding trajectory symbols can be presented according to the sliding trajectory of the finger during drawing.
However, the existing drawing method is simple, so that the presented track symbols have single expression effect.
In view of this, the embodiment of the present application provides a drawing method based on a game, and the drawing method can enrich the representation details of a drawing.
The game-based rendering method in one of the embodiments of the present application may be run on a terminal device. In an alternative embodiment, the terminal device may be a local terminal device. Taking a game as an example, the local terminal device stores a game program and is used for presenting a game screen. The local terminal device is used for interacting with the player through a graphical user interface, namely, a game program is downloaded and installed and operated through the electronic device conventionally. The manner in which the local terminal device provides the graphical user interface to the player may include a variety of ways, for example, it may be rendered for display on a display screen of the terminal or provided to the player by holographic projection. For example, the local terminal device may include a display screen for presenting a graphical user interface including a game screen and a processor for running the game, generating the graphical user interface, and controlling display of the graphical user interface on the display screen.
Fig. 1 is a schematic flowchart of a game-based rendering method according to an embodiment of the present disclosure, where the method may be applied to a terminal device, where the terminal device displays a graphical user interface, the graphical user interface displays a main scene interface, and the main scene interface may include a rendering area. As shown in fig. 1, the method may include:
s101, responding to the drawing operation in the drawing area, and obtaining drawing parameters of sampling points in the drawing track.
The drawing parameters of the sampling point may include a speed of drawing the frame, a time of the sampling point, a position of the sampling point in the drawing trace, and the like, which are not limited herein. Optionally, a user may act on a drawing area of the main scene interface through operations such as touch, sliding, clicking, and dragging based on a touch display screen of a terminal device or an input device (e.g., a mouse) to generate a drawing operation, and in response to the drawing operation, a drawing parameter of a sampling point in a drawing trajectory corresponding to the drawing operation may be acquired, optionally, the drawing trajectory may be a straight line, a curve, a circle, a rectangle, a polygon, or any polygon.
Optionally, if the input device includes a mouse, when the input device acts on the drawing area of the main scene interface through operations such as clicking and dragging based on the mouse, the drawing process may include three drawing states of starting to click, clicking to drag, and ending to click; if the drawing area of the main scene interface is acted by touch, sliding and other operations based on the touch display screen, the drawing process may include four drawing states including touch start, touch moving, touch ending and touch cancellation. According to the description, it can be understood that the drawing trace may be generated through at least one complete drawing state, the drawing trace may include a plurality of sampling points, the sampling points may be determined according to a preset touch sampling rate (e.g., 30HZ, 60HZ, etc.), each sampling point may correspond to a different drawing parameter, and the drawing parameter of each sampling point in the drawing trace is obtained.
S102, generating a map corresponding to each sampling point according to the drawing parameters of the sampling points and the preset maps.
The predetermined map is configured with a predetermined transparency, which may be 30%, 50%, 80%, etc., and is not limited herein.
Based on the above description, after the drawing parameters of the sampling points in the drawing track are obtained, the maps corresponding to the sampling points can be generated according to the drawing parameters of the sampling points and the preset maps, optionally, the mapping parameters of the sampling points are different, and the maps corresponding to the sampling points are also different, so that different maps can be displayed according to different sampling points, and various display effects can be displayed during subsequent rendering. It can be understood that, when the drawing track includes a plurality of sampling points, the drawing track will correspond to a plurality of maps, that is, N sampling points will correspond to N maps.
S103, obtaining a drawing corresponding to the drawing track according to the map and the main rendering target corresponding to each sampling point, wherein the main rendering target is a rendering target corresponding to the current main scene.
After the maps corresponding to the sampling points are obtained, the main scene interface and the drawing area can be rendered according to the maps corresponding to the sampling points and the main rendering target, and the drawing graph corresponding to the drawing track is displayed in the drawing area of the main scene interface through rendering. Optionally, according to different application scenarios, preset maps of different patterns may be set so that the drawing may have diversity.
For example, the current main scene may be a main game interface, the main game interface may include a drawing area, and the main rendering target may be a rendering target corresponding to the main game interface, and by the method in the above embodiment, a drawing of any pattern may be displayed in the drawing area of the main game interface through rendering.
To sum up, the game-based drawing method provided by the embodiment of the present application may display a graphical user interface through a terminal device, where the graphical user interface displays a main scene interface, and the main scene interface includes a drawing area, and the method includes: responding to the drawing operation in the drawing area, and acquiring drawing parameters of sampling points in the drawing track; generating a map corresponding to each sampling point according to the drawing parameters of the sampling points and a preset map, wherein the preset map is configured with a preset transparency; according to the method and the device for rendering the drawing, the drawing corresponding to the drawing track is obtained according to the chartlets corresponding to the sampling points and the main rendering target, the main rendering target is the rendering target corresponding to the current main scene, and by applying the embodiment of the application, the drawing can be rendered according to the plurality of chartlets corresponding to the sampling points, so that the drawing presents the effect of a brush, and the representation details of the drawing can be enriched.
Optionally, in an actual drawing process, in order to make a user clearly know a current drawing position, the method further includes:
and responding to the drawing operation in the drawing area, acquiring the current touch point according to the drawing track, and generating the particle special effect corresponding to the current touch point.
The particle special effect can be used for displaying a plurality of particle effects around the current touch point, so that the current touch point is prevented from being shielded by fingers, a user can clearly know the current touch position and the touch state through the particle special effect, and the user can make adjustment in time. It can be understood that when the position of the current touch point changes, the particle special effect corresponding to the current touch point will move along with the current touch point.
Fig. 2 is a schematic flow chart of another game-based rendering method according to an embodiment of the present disclosure. The drawing parameters include: optionally, as shown in fig. 2, the generating a map corresponding to each sampling point according to the drawing parameters of the sampling points and the preset map may include:
s301, obtaining the mapping size corresponding to the sampling point according to the speed of the drawing frame.
And S302, generating a map corresponding to each sampling point according to the size of the map and a preset map.
The drawing frame can be understood as a sampling frame corresponding to the sampling point, and the speed of the current drawing frame can be calculated according to the total length of the current drawing track and the time corresponding to the current drawing track, wherein the total length of the current drawing track is the sum of the distance accumulations between the total sampling points, and the time corresponding to the current drawing track is the time difference between the time of the current first sampling point and the time of the last sampling point.
For example, if a certain drawing track includes 100 sampling points, the speed of the drawing frame corresponding to the 100 th sampling point is the ratio of the total length of the drawing track to the time corresponding to the drawing track, that is, the speed of the drawing frame corresponding to the 100 th sampling point is the sum of the distance accumulations between the 100 sampling points, and the ratio of the time difference between the time of the first sampling point and the time of the 100 th sampling point.
Based on the above description, the mapping size corresponding to each sampling point may be obtained according to the speed of the drawing frame corresponding to each sampling point, and optionally, specifically, when the determination is performed, the speed of the drawing frame corresponding to each sampling point may be compared with a preset speed threshold, and if the difference between the speed of the drawing frame corresponding to the sampling point and the preset speed threshold is larger, the mapping size corresponding to the sampling point may be larger; otherwise, the size of the map corresponding to the sampling point may be smaller, but not limited thereto, and may be flexibly adjusted according to the actual application scenario.
After the size of the map corresponding to the sampling point is obtained, the preset map can be adjusted according to the size of the map, the adjustment mode can include enlargement or reduction, and the map corresponding to each sampling point can be generated through adjustment. It can be understood that if the sizes of the maps corresponding to the sampling points are different, the generated maps corresponding to the sampling points are also different, and the sizes of the maps corresponding to the sampling points can be adjusted according to the drawing speed, so that the finally obtained drawing corresponding to the drawing track can have diversity and the expression effect is enriched. It should be noted that, of course, the color of the map corresponding to each sampling point may also be adjusted according to an actual application scenario, for example, the color may be adjusted to have effects such as gradual change and dynamic change, which is not limited herein.
It can be understood that, in the actual drawing process, the drawing speed of the user may change suddenly, that is, gaps between sampling points may change suddenly, and finally, the speed of drawing a frame may change suddenly; and the sudden change of the speed of the drawing frame causes the sudden change of the size of the chartlet corresponding to the two adjacent sampling points, and finally the local part of the drawing corresponding to the drawing track jumps, so that the expression effect is poor. To solve this problem, optionally, the obtaining the map size corresponding to the sample point according to the speed of the drawing frame may include:
and if the current drawing frame is not the first drawing frame, determining the mapping size corresponding to the sampling point of the current drawing frame according to the mapping size corresponding to the sampling point of the last drawing frame and the speed of the current drawing frame.
Optionally, if the current drawing frame is not the first drawing frame, the size of the map corresponding to the sampling point of the current drawing frame may be determined according to the size of the map corresponding to the sampling point of the previous drawing frame, the speed of the current drawing frame, and preset parameters, so that smooth transition may be performed between the sizes of the maps corresponding to the sampling points.
For example, the mapping size corresponding to the sampling point of the previous drawing frame is ax-1The speed of the current drawing frame is V2The size of the map corresponding to the sampling point of the current drawing frame is AxThen A isxCan be expressed as: a. Thex=Ax-1*0.9+Vx*0.1, certainly, the actual calculation method is not limited thereto, and the parameters in the equation are not limited thereto, alternatively, according to the actual application scenario, 0.9 in the equation may be replaced by 0.7, 0.8, etc., and 0.1 in the equation may be replaced by 0.2, 0.3, etc., which are not limited herein.
Optionally, in some embodiments, in order to make the initial portion of the drawing corresponding to the drawing track exhibit a transition effect and make it more suitable for the drawing habit of the user, the size of the map corresponding to the sampling point of the first drawing frame may be set to 0, and referring to the above formula, it can be understood that, at this time, the size a of the map corresponding to the sampling point of the second drawing frame is set to be 02=A1*0.9+V2*0.1 wherein A1Denotes the firstThe mapping size corresponding to the sampling point of a drawing frame is 0,V2Represents the velocity of the second rendered frame, as can be seen, at this point, a2Is practically equal to V2*0.1, therefore, the initial part of the drawing corresponding to the drawing track can be made to show transition effect, and the detail of the showing is enriched.
Fig. 3 is a schematic flowchart of another game-based rendering method according to an embodiment of the present disclosure. Based on the above description, because the drawing speed of the user may suddenly change, that is, the gap between the sampling points may suddenly change, it can be understood that this will lead to the fact that the local sampling points in the drawing track are relatively discrete, the local sampling points are relatively dense, and the performance effect of the drawing map corresponding to the drawing track is affected. To solve this problem, optionally, as shown in fig. 3, the obtaining of the rendering parameters of the sampling points in the rendering trace may include:
s401, if the speed of the drawing frame is determined to be larger than a preset speed threshold value, performing interpolation operation on each sampling point according to a preset interpolation algorithm to obtain interpolation sampling points.
S402, determining the drawing parameters of the interpolation sampling points according to the drawing parameters of the sampling points.
In some embodiments, the speed of the drawing frame corresponding to each sampling point may be compared with a preset speed threshold, and if it is determined that the speed of the drawing frame corresponding to the sampling point is greater than the preset speed threshold, it indicates that the drawing speed is fast, and at this time, interpolation operation may be performed on each sampling point according to a preset interpolation algorithm to obtain an interpolation sampling point. Optionally, the preset interpolation algorithm may be implemented based on a linear interpolation algorithm, a bezier curve algorithm, a B-spline (B-spline) algorithm, a lagrange algorithm, and the like, which are not limited herein. It can be understood that when the linear interpolation algorithm is used for interpolation, the interpolation sampling points can be uniformly distributed, especially the corners in the drawing track can be smoothly transited, and then the rendering effect of the drawing corresponding to the drawing track can be optimized during subsequent rendering.
Fig. 4 is a schematic flow chart of another game-based rendering method according to an embodiment of the present disclosure. Optionally, as shown in fig. 4, the obtaining a drawing graph corresponding to the drawing track according to the map and the main rendering target corresponding to each sampling point includes:
s501, based on the initial rendering target corresponding to the drawing area, overlaying the maps corresponding to the sampling points, and obtaining the overlaid initial rendering target.
S501, rendering the superposed initial rendering target to a main rendering target, and obtaining a rendering graph corresponding to the rendering track.
Based on the above embodiment, the maps corresponding to the sampling points in the drawing track may be superimposed. Optionally, the superposition may be performed according to the superposition principle of the glBlendFunc function in opengl, and in an optional embodiment, the superposition may be performed according to respective superposition of color and transparency, for example: the final color rgb = (source color factor × source color + target color factor × target color), and the final transparency alpha = (source transparency factor × source transparency + target transparency factor × target transparency), where according to the drawing sequence, a source may refer to a source map, which may be a map to be currently superimposed, and a target may refer to a target map, which may refer to a currently superimposed map, and then the maps corresponding to each sampling point may be superimposed according to the formula to obtain an initial rendering target after the superimposition, and then the initial rendering target after the superimposition may be rendered into a main rendering target, so that a rendering corresponding to a drawing track may be obtained. The specific rendering process can be implemented by referring to the existing rendering principle, and is not described herein again.
Optionally, the initial rendering target is configured not to perform an operation of cleaning color values before rendering each frame; the overlaying the maps corresponding to the sampling points based on the initial rendering target corresponding to the drawing area to obtain the overlaid initial rendering target may include:
and based on the initial rendering target corresponding to the drawing area, incrementally stacking the maps corresponding to the sampling points on the initial rendering target to obtain the stacked initial rendering target.
It can be understood that, when the rendering is performed by using a real-time rendering method, the color buffer area is reset to the initial state before each frame starts to be rendered, and then all objects are completely redrawn once again, so that in the real-time rendering mode, each frame redraws all sampling points on a drawing track once again, which causes overdraw to be excessively drawn, and consumes bandwidth of a Graphics Processing Unit (GPU) rapidly, thereby seriously affecting the Processing performance of the terminal device. Therefore, when the method and the device are used for rendering, the initial rendering target can be configured to be the operation of not executing color value cleaning before each frame is rendered, namely, not executing a clearcolor, so that each frame does not reset a color buffer area before starting, the sampling points drawn before can be reserved, and only new sampling points need to be drawn.
Based on the above description, when performing the overlay, the incremental overlay can be performed on the maps corresponding to the sampling points on the initial rendering target based on the initial rendering target corresponding to the rendering area, so as to obtain the overlaid initial rendering target, thereby realizing that the occurrence of the transitional rendering phenomenon can be reduced by adopting an incremental rendering mode, optimizing the rendering effect, ensuring the processing performance of the terminal device, and improving the rendering effect.
Fig. 5 is a schematic flow chart of another game-based rendering method according to an embodiment of the present disclosure. Optionally, as shown in fig. 5, before the overlaying the maps corresponding to the sampling points based on the initial rendering target corresponding to the drawing area and obtaining the overlaid initial rendering target, the method may further include:
s601, performing initial clearing operation on an initial rendering target corresponding to the drawing area according to an initial quadrangle, wherein the initial quadrangle is configured to be a pure black and completely transparent quadrangle.
When the incremental rendering mode is adopted for superposition, considering that different terminal devices may have a problem of compatibility, that is, there may be a phenomenon that an operation of configuring an initial rendering target as not performing color value cleaning before each frame of rendering on some terminal devices may fail, in order to solve the problem, in the embodiment of the present application, optionally, an initial quadrangle may be set, the initial quadrangle is configured as a pure black and completely transparent quadrangle, and according to the initial quadrangle, an initial clearing operation is performed on an initial rendering target corresponding to a rendering area, so that a process of configuring the initial rendering target as not performing color value cleaning before each frame of rendering may be simulated, and a problem of compatibility is solved, so that the rendering method provided by the embodiment of the present application may be applied to various application scenarios.
Optionally, as shown in fig. 5, after the overlaying the maps corresponding to the sampling points based on the initial rendering target corresponding to the drawing area and obtaining the overlaid initial rendering target, the method further includes:
and S602, rendering the preset rendering position in the initial rendering target corresponding to the rendering area by adopting a preset transparent surface patch.
In some embodiments, in consideration of the problem that compatibility may exist in different terminal devices when the initial rendering target corresponding to the rendering area is not completely rendered, the embodiment of the present application may adopt the preset transparent surface patch to render the preset rendering position in the initial rendering target corresponding to the rendering area, so as to avoid the compatibility problem caused by the empty preset rendering position, and improve the compatibility of the rendering method provided by the embodiment of the present application.
The incomplete drawing may be understood as that the initial rendering target corresponding to the drawing area is initialized, but no point or object is drawn yet, and at this time, some terminal devices may be abnormal, that is, some terminal devices may have a problem of compatibility. Of course, the size and transparency of the preset transparent patch are not limited in the present application, and can be flexibly set according to the actual application scenario.
Fig. 6 is a schematic flow chart of another game-based rendering method according to an embodiment of the present disclosure. Optionally, as shown in fig. 6, the rendering the superimposed initial rendering target into the main rendering target to obtain the drawing corresponding to the drawing track may include:
and S701, performing mixing operation on the overlapped initial rendering target and the initial mapping to obtain a mixed patch, wherein the initial mapping is a preset mapping corresponding to the drawing area.
And S702, rendering the mixed patch to a main rendering target, and acquiring a rendering graph corresponding to the rendering track.
The initial map can be a preset semi-transparent map, the semi-transparent map can have certain transparency, the semi-transparent map can be understood as a rectangular primitive using a fixed picture file, the shape, the size and the map of the semi-transparent map all depend on the picture file, and the picture file can be different according to different application scenes; the mixing patch can be a semi-transparent patch, i.e. a patch with a certain transparency, and the semi-transparent patch can be a rectangular primitive, the shape, size and used map of which are generated during operation, i.e. generated during the mixing process.
Based on the above description, a blending operation may be performed on the superimposed initial render target and the initial map, where the blending operation may refer to an arithmetic formula in a pixel shader, and optionally, the arithmetic formula may be: color0.xyz + color1.xyz × color0.xyz × float3 (3.0 f), where color0.xyz may refer to a color value of the superimposed initial rendering target at a certain pixel point, color1.xyz may refer to a color value of the initial map at the same pixel point, the initial map may be a fixed map of an art output, xyz represents an rgb value of a color, float3 (3.0 f) represents a three-dimensional constant vector, and all three component values may be 3.0, but not limited thereto. It should be understood that the blending operation actually superimposes a value of the color of the rendering target, where the superimposed value is rendering target color value × superimposed color value × 3, and the actual blending manner is not limited to this.
Through the mixing operation, the mixed surface patch can be obtained, and further, the mixed surface patch can be rendered into a main rendering target to obtain a rendering graph corresponding to the rendering track. The process of rendering the hybrid patch to the main rendering target can be understood as superimposing the hybrid patch to the map corresponding to the main rendering target, and the superimposing process can be realized by referring to the glblend func function in opengl, optionally, the superimposing mode can be adjusted during superimposing, so that when the source color is brighter, the superimposed color is less, wherein the source can refer to the hybrid patch. Of course, it should be noted that other superposition manners may also be adopted according to the actual application scenario, and are not limited herein.
Fig. 7 is a schematic flowchart of another game-based drawing method according to an embodiment of the present disclosure, and fig. 8 is a schematic diagram of a drawing diagram according to an embodiment of the present disclosure. If the rendering mode is a rotationally symmetric mode, the rendering region includes at least two sub-rendering regions, for example, the rendering region may include 3 or 5 sub-rendering regions, which is not limited herein. In the rotational symmetry mode, optionally, as shown in fig. 7, the obtaining of the drawing parameters of the sampling points in the drawing trace in response to the drawing operation in the drawing area may include:
s801, responding to the drawing operation in any one sub-drawing area, and respectively acquiring the drawing parameters of the sampling points in the drawing tracks of each sub-drawing area.
In the rotational symmetry mode, if any one of the sub-drawing regions is subjected to drawing operation, in response to the drawing operation in any one of the sub-drawing regions, other sub-drawing regions may be set to synchronize the drawing operation, optionally, the drawing trajectories in the other sub-drawing regions may be obtained by clockwise rotating the drawing trajectory in any one of the sub-drawing regions by a preset angle around a central point, and values of the preset angle may be different according to the number of the sub-drawing regions in the drawing region. Alternatively, as shown in fig. 8, when the drawing region includes 3 sub-drawing regions, the preset angle may be 120 °. At this time, the method may be referred to the foregoing method to respectively obtain the rendering parameters of the sampling points in the rendering trace of each sub-rendering region.
Correspondingly, the obtaining a drawing corresponding to the drawing track according to the map and the main rendering target corresponding to each sampling point may include:
s802, obtaining the sub-drawing corresponding to the drawing track of each sub-drawing area according to the mapping and the main rendering target corresponding to the sampling point in the drawing track of each sub-drawing area.
After obtaining the drawing parameters of the sampling points in the drawing tracks of each sub-drawing area, generating a map corresponding to the sampling points in the drawing tracks of each sub-drawing area according to the drawing parameters and preset maps of the sampling points in the drawing tracks of each sub-drawing area, and further obtaining a sub-drawing map corresponding to the drawing tracks of each sub-drawing area according to the maps and main rendering targets corresponding to the sampling points in the drawing tracks of each sub-drawing area, where the obtaining result may be as shown in fig. 8, where the graphic user interface may include a main scene interface 101, the main scene interface 101 may include a drawing area 102, the drawing area 102 may include a sub-drawing map 103 corresponding to the drawing tracks of each sub-drawing area, and of course, the display mode of the actual drawing is not limited by this.
The process of obtaining the sub-rendering map corresponding to the rendering trajectory of each sub-rendering region may refer to the foregoing related description, and is not described herein again.
Fig. 9 is a schematic functional module diagram of a game-based drawing device according to an embodiment of the present application, where the drawing device may display a graphical user interface through a terminal device, the graphical user interface displays a main scene interface, the main scene interface includes a drawing area, the basic principle and the generated technical effects of the device are the same as those of the corresponding method embodiment, and for brief description, reference may be made to corresponding contents in the method embodiment for a part not mentioned in this embodiment. As shown in fig. 9, the drawing apparatus 100 includes:
a response module 110, configured to obtain a drawing parameter of a sampling point in a drawing trace in response to a drawing operation in the drawing area;
a generating module 120, configured to generate a map corresponding to each sampling point according to the drawing parameters of the sampling point and a preset map, where the preset map is configured with a preset transparency;
an obtaining module 130, configured to obtain, according to the map and a main rendering target corresponding to each sampling point, a rendering map corresponding to the rendering track, where the main rendering target is a rendering target corresponding to a current main scene.
In an optional embodiment, the response module 110 is further configured to, in response to the drawing operation in the drawing area, obtain a current touch point according to the drawing track, and generate a particle special effect corresponding to the current touch point.
In an alternative embodiment, the rendering parameters include: the speed at which the frame is rendered; the generating module 120 is specifically configured to obtain a map size corresponding to the sampling point according to the speed of the drawing frame; and generating a map corresponding to each sampling point according to the map size and the preset map.
In an optional embodiment, the generating module 120 is specifically configured to, if the current drawing frame is not the first drawing frame, determine the map size corresponding to the sampling point of the current drawing frame according to the map size corresponding to the sampling point of the last drawing frame and the speed of the current drawing frame.
In an optional embodiment, the response module 110 is specifically configured to, if it is determined that the speed of the drawing frame is greater than a preset speed threshold, perform interpolation operation on each sampling point according to a preset interpolation algorithm to obtain interpolated sampling points; and determining the drawing parameters of the interpolation sampling points according to the drawing parameters of the sampling points.
In an optional embodiment, the obtaining module 130 is specifically configured to superimpose the maps corresponding to the sampling points based on the initial rendering target corresponding to the drawing area, and obtain the superimposed initial rendering target; rendering the initial rendering target after the superposition into the main rendering target, and acquiring a rendering graph corresponding to the rendering track.
In an alternative embodiment, the initial render target is configured not to perform a color value cleanup operation prior to each frame of rendering; the obtaining module 130 is specifically configured to perform incremental stacking on the initial rendering target based on the initial rendering target corresponding to the drawing area, where the incremental stacking is performed on the maps corresponding to the sampling points, and obtain the stacked initial rendering target.
In an optional embodiment, the obtaining module 130 is further configured to perform an initial clearing operation on an initial rendering target corresponding to the drawing area according to an initial quadrangle, where the initial quadrangle is configured as a pure black and completely transparent quadrangle.
In an optional embodiment, the obtaining module 130 is further configured to render, by using a preset transparent patch, a preset rendering position in an initial rendering target corresponding to the drawing area.
In an optional embodiment, the obtaining module 130 is specifically configured to perform a mixing operation on the superimposed initial rendering target and an initial mapping to obtain a mixed patch, where the initial mapping is a preset mapping corresponding to the drawing area; rendering the mixed surface patch into the main rendering target, and acquiring a rendering graph corresponding to the rendering track.
In an alternative embodiment, if the rendering mode is a rotationally symmetric mode, the rendering region includes at least two sub-rendering regions; the response module 110 is specifically configured to respond to the drawing operation in any one of the sub-drawing regions, and respectively obtain drawing parameters of sampling points in the drawing trace of each sub-drawing region; correspondingly, the obtaining module is specifically configured to obtain the sub-rendering map corresponding to the drawing track of each sub-drawing area according to the chartlet and the main rendering target corresponding to the sampling point in the drawing track of each sub-drawing area.
The above-mentioned apparatus is used for executing the method provided by the foregoing embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
The above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when one of the above modules is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 10, the electronic device may include: a processor 210, a storage medium 220, and a bus 230, wherein the storage medium 220 stores machine-readable instructions executable by the processor 210, and when the electronic device is operated, the processor 210 communicates with the storage medium 220 via the bus 230, and the processor 210 executes the machine-readable instructions to perform the steps of the above-mentioned method embodiments. The specific implementation and technical effects are similar, and are not described herein again.
Optionally, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program performs the steps of the above method embodiments. The specific implementation and technical effects are similar, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or in the form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a portable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other media capable of storing program codes.
It is noted that, in this document, relational terms such as "first" and "second," and the like, are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (13)

1. A drawing method based on a game displays a graphical user interface through a terminal device, wherein the graphical user interface displays a main scene interface, the main scene interface comprises a drawing area, and the method comprises the following steps:
responding to the drawing operation in the drawing area, and acquiring drawing parameters of sampling points in a drawing track;
generating a map corresponding to each sampling point according to the drawing parameters of the sampling points and a preset map, wherein the preset map is configured with a preset transparency;
obtaining a drawing graph corresponding to the drawing track according to the mapping and a main rendering target corresponding to each sampling point, wherein the main rendering target is a rendering target corresponding to the current main scene;
the obtaining of the drawing graph corresponding to the drawing track according to the mapping and the main rendering target corresponding to each sampling point comprises:
based on the initial rendering target corresponding to the drawing area, overlaying the mapping corresponding to each sampling point to obtain an overlaid initial rendering target;
rendering the initial rendering target after the superposition into the main rendering target, and obtaining a drawing corresponding to the drawing track.
2. The rendering method of claim 1, further comprising:
and responding to the drawing operation in the drawing area, acquiring a current touch point according to the drawing track, and generating a particle special effect corresponding to the current touch point.
3. The rendering method of claim 1, wherein the rendering parameters comprise: the speed at which the frame is drawn;
generating a map corresponding to each sampling point according to the drawing parameters of the sampling points and a preset map, wherein the generating of the map comprises the following steps:
obtaining a mapping size corresponding to the sampling point according to the speed of the drawing frame;
and generating a map corresponding to each sampling point according to the map size and the preset map.
4. The method according to claim 3, wherein the obtaining the map size corresponding to the sample point according to the speed of the drawing frame comprises:
and if the current drawing frame is not the first drawing frame, determining the mapping size corresponding to the sampling point of the current drawing frame according to the mapping size corresponding to the sampling point of the last drawing frame and the speed of the current drawing frame.
5. The drawing method according to claim 3, wherein the obtaining of the drawing parameters of the sampling points in the drawing trace comprises:
if the speed of the drawing frame is determined to be larger than a preset speed threshold value, performing interpolation operation on each sampling point according to a preset interpolation algorithm to obtain interpolated sampling points;
and determining the drawing parameters of the interpolation sampling points according to the drawing parameters of the sampling points.
6. The rendering method of claim 1, wherein the initial render target is configured not to perform an operation of cleaning color values before rendering each frame;
the step of superposing the maps corresponding to the sampling points based on the initial rendering target corresponding to the drawing area to obtain the superposed initial rendering target comprises the following steps:
and based on the initial rendering target corresponding to the drawing area, performing incremental superposition on the maps corresponding to the sampling points on the initial rendering target to obtain the superposed initial rendering target.
7. The method according to claim 1, wherein before the overlaying the maps corresponding to the sampling points based on the initial rendering target corresponding to the rendering region and obtaining the overlaid initial rendering target, the method further comprises:
and performing initial clearing operation on an initial rendering target corresponding to the drawing area according to an initial quadrangle, wherein the initial quadrangle is configured to be a pure black and completely transparent quadrangle.
8. The method according to claim 1, wherein after the mapping corresponding to each sampling point is superimposed based on an initial rendering target corresponding to the rendering area and the superimposed initial rendering target is obtained, the method further comprises:
and rendering the preset rendering position in the initial rendering target corresponding to the drawing area by adopting a preset transparent surface patch.
9. The drawing method according to claim 1, wherein the rendering the superimposed initial rendering target into the main rendering target and obtaining the drawing graph corresponding to the drawing trajectory includes:
performing mixing operation on the superposed initial rendering target and an initial chartlet to obtain a mixed patch, wherein the initial chartlet is a preset chartlet corresponding to the drawing area;
rendering the mixed surface patch into the main rendering target, and acquiring a rendering graph corresponding to the rendering track.
10. The rendering method of claim 1, wherein if the rendering mode is a rotationally symmetric mode, the rendering region comprises at least two sub-rendering regions;
the step of obtaining the drawing parameters of the sampling points in the drawing track in response to the drawing operation in the drawing area comprises the following steps:
responding to the drawing operation in any one of the sub-drawing areas, and respectively obtaining drawing parameters of sampling points in the drawing tracks of each sub-drawing area;
correspondingly, the obtaining a drawing graph corresponding to the drawing track according to the mapping and the main rendering target corresponding to each sampling point includes:
and acquiring the sub-drawing corresponding to the drawing track of each sub-drawing area according to the mapping and the main rendering target corresponding to the sampling point in the drawing track of each sub-drawing area.
11. A drawing device based on a game displays a graphical user interface through a terminal device, wherein the graphical user interface displays a main scene interface, the main scene interface comprises a drawing area, and the drawing device comprises:
the response module is used for responding to the drawing operation in the drawing area and acquiring the drawing parameters of the sampling points in the drawing track;
the generating module is used for generating a map corresponding to each sampling point according to the drawing parameters of the sampling points and a preset map, wherein the preset map is configured with a preset transparency;
the acquisition module is used for acquiring a drawing graph corresponding to the drawing track according to the mapping and a main rendering target corresponding to each sampling point, wherein the main rendering target is a rendering target corresponding to the current main scene;
the obtaining module is specifically configured to superimpose the maps corresponding to the sampling points based on the initial rendering target corresponding to the drawing area, and obtain the superimposed initial rendering target;
rendering the initial rendering target after the superposition into the main rendering target, and acquiring a rendering graph corresponding to the rendering track.
12. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating via the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the steps of the game based rendering method according to any one of claims 1-10.
13. A computer-readable storage medium, having stored thereon a computer program for performing, when being executed by a processor, the steps of the game-based rendering method according to any one of claims 1 to 10.
CN202110317276.2A 2021-03-23 2021-03-23 Game-based drawing method, game-based drawing device, electronic device, and storage medium Active CN113064540B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110317276.2A CN113064540B (en) 2021-03-23 2021-03-23 Game-based drawing method, game-based drawing device, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110317276.2A CN113064540B (en) 2021-03-23 2021-03-23 Game-based drawing method, game-based drawing device, electronic device, and storage medium

Publications (2)

Publication Number Publication Date
CN113064540A CN113064540A (en) 2021-07-02
CN113064540B true CN113064540B (en) 2022-11-01

Family

ID=76561990

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110317276.2A Active CN113064540B (en) 2021-03-23 2021-03-23 Game-based drawing method, game-based drawing device, electronic device, and storage medium

Country Status (1)

Country Link
CN (1) CN113064540B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113521725A (en) * 2021-07-26 2021-10-22 网易(杭州)网络有限公司 Pattern effect display method, storage medium, and computer device
CN113821345B (en) * 2021-09-24 2023-06-30 网易(杭州)网络有限公司 Method and device for rendering moving track in game and electronic equipment
CN114022642B (en) * 2021-10-08 2022-07-19 北京津发科技股份有限公司 Method, device, equipment, system and storage medium for collecting and generating space-time behavior trajectory
CN114003163B (en) * 2021-10-27 2023-10-24 腾讯科技(深圳)有限公司 Image processing method and device, storage medium and electronic equipment
CN114035739B (en) * 2021-11-12 2023-12-29 网易(杭州)网络有限公司 Graph drawing method and device, computer readable storage medium and electronic equipment
CN114332311B (en) * 2021-12-05 2023-08-04 北京字跳网络技术有限公司 Image generation method, device, computer equipment and storage medium
CN114119847B (en) * 2021-12-05 2023-11-07 北京字跳网络技术有限公司 Graphic processing method, device, computer equipment and storage medium
CN114419099A (en) * 2022-01-18 2022-04-29 腾讯科技(深圳)有限公司 Method for capturing motion trail of virtual object to be rendered
CN114742856A (en) * 2022-04-08 2022-07-12 北京字跳网络技术有限公司 Video processing method, device, equipment and medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9842416B2 (en) * 2015-05-05 2017-12-12 Google Llc Animated painterly picture generation
CN110665232A (en) * 2019-08-30 2020-01-10 网易(杭州)网络有限公司 Rendering method, device and equipment of ground surface in game and storage medium
CN111127596B (en) * 2019-11-29 2023-02-14 长安大学 Incremental Voronoi sequence-based layered oil painting brush drawing method
CN111340684B (en) * 2020-02-12 2024-03-01 网易(杭州)网络有限公司 Method and device for processing graphics in game
CN112199030B (en) * 2020-10-14 2022-03-25 网易(杭州)网络有限公司 Graph drawing method and device, storage medium and terminal equipment

Also Published As

Publication number Publication date
CN113064540A (en) 2021-07-02

Similar Documents

Publication Publication Date Title
CN113064540B (en) Game-based drawing method, game-based drawing device, electronic device, and storage medium
CN111145326B (en) Processing method of three-dimensional virtual cloud model, storage medium, processor and electronic device
CN108351864B (en) Concave geometric dense paving
EP3129973B1 (en) Gradient adjustment for texture mapping for multiple render targets with resolution that varies by screen location
US7970206B2 (en) Method and system for dynamic, luminance-based color contrasting in a region of interest in a graphic image
CN106780642B (en) Generation method and device of camouflage cover map
CN104718528A (en) Method and device for determining color of interface control, and terminal device
JP2003337562A (en) Hardware-enhanced graphics acceleration of pixel sub- component-oriented image
US20140333669A1 (en) System, method, and computer program product for implementing smooth user interface animation using motion blur
CN108022285A (en) Map rendering intent and device
CN105930464B (en) Web rich media cross-screen adaptation method and device
CN112233215A (en) Contour rendering method, apparatus, device and storage medium
JP2005100176A (en) Image processor and its method
JP2002298154A (en) Image processing program, computer readable recording medium with image processing program recorded thereon, program execution device, image processor and image processing method
CN106971370B (en) System and method for taking picture as background picture plane vector diagram
US20140184633A1 (en) Conservative bounding region rasterization
EP2804149B1 (en) Water representation by color gradients on a digital map
CN107491289B (en) Window rendering method and device
CN102722902A (en) Method for anti-aliasing improvement at rasterization phase in graphic rendering pipeline
CN101114378A (en) Apparatus and method to rotate a bitmap image
CN111158840B (en) Image carousel method and device
KR20040011525A (en) Drawing method
CN114863008B (en) Image processing method, image processing device, electronic equipment and storage medium
EP2992512B1 (en) Anti-aliasing for geometries
CN116563435A (en) Method and system for game dual channel delivery

Legal Events

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