CN108090945B - Object rendering method and device, storage medium and electronic device - Google Patents

Object rendering method and device, storage medium and electronic device Download PDF

Info

Publication number
CN108090945B
CN108090945B CN201711081196.1A CN201711081196A CN108090945B CN 108090945 B CN108090945 B CN 108090945B CN 201711081196 A CN201711081196 A CN 201711081196A CN 108090945 B CN108090945 B CN 108090945B
Authority
CN
China
Prior art keywords
vector
vertex
target object
rendering
strategy
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
CN201711081196.1A
Other languages
Chinese (zh)
Other versions
CN108090945A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201711081196.1A priority Critical patent/CN108090945B/en
Publication of CN108090945A publication Critical patent/CN108090945A/en
Priority to PCT/CN2018/112196 priority patent/WO2019085838A1/en
Application granted granted Critical
Publication of CN108090945B publication Critical patent/CN108090945B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/02Non-photorealistic rendering
    • 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
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/66Methods for processing data by generating or executing the game program for rendering three dimensional images

Abstract

The invention discloses a kind of object rendering method and devices, storage medium and electronic device.Wherein, this method comprises: obtaining target object to be rendered by the applications client run on mobile terminal, wherein include multiple for controlling the vector controlled vertex of rendering in target object;Using the normal vector on multiple vector controlled vertex, rendering strategy of the target object in each scene of applications client is determined by predefined function, wherein rendering strategy is including the illumination render strategy of target object in the scene and retouches side rendering strategy;According to rendering strategy post-processing object object in the scene of applications client.The present invention, which solves, renders second-rate technical problem present in the object rendering method of prior art offer.

Description

Object rendering method and device, storage medium and electronic device
Technical field
The present invention relates to computer fields, in particular to a kind of object rendering method and device, storage medium and electricity Sub-device.
Background technique
Nowadays, terminal device usually can be by way of rendering, and Lai Shixian shows game application on terminal device screen In specific picture purpose.Wherein, rendering mode generally includes following two: 1) tradition rendering.Often in game application In the rendering that is carried out for the purpose of truly simulating so that the object more closer to reality after rendering;2) cartoon rendering.Usually Be in game application to go the sense of reality simulation for the purpose of rendering that is carried out so that object and caricature or cartoon after rendering Achieve the effect that likeness in form.
However, being directed to cartoon rendering mode at present, due to rendering exorbitant expenditure, thus also it is difficult to directly apply to processing energy On the lower mobile terminal device of power.That is, it is second-rate in the presence of rendering to carry out cartoon rendering on the mobile terminal device The problem of.
For above-mentioned problem, currently no effective solution has been proposed.
Summary of the invention
The embodiment of the present invention provides a kind of object rendering method and device, storage medium and electronic device, at least to solve Second-rate technical problem is rendered present in the object rendering method that the prior art provides.
According to an aspect of an embodiment of the present invention, a kind of object rendering method is provided, comprising: by mobile terminal The applications client of operation obtains target object to be rendered, wherein includes multiple in above-mentioned target object for controlling rendering Vector controlled vertex;Using the normal vector on multiple above-mentioned vector controlled vertex, above-mentioned target pair is determined by predefined function As the rendering strategy in each scene of above-mentioned applications client, wherein above-mentioned rendering strategy includes that above-mentioned target object exists Illumination render strategy in above-mentioned scene renders strategy with side is retouched;According to above-mentioned rendering strategy in the above-mentioned of above-mentioned applications client Above-mentioned target object is rendered in scene.
According to another aspect of an embodiment of the present invention, a kind of object rendering device is additionally provided, comprising: first obtains list Member obtains target object to be rendered for the applications client by running on mobile terminal, wherein in above-mentioned target object Including multiple for controlling the vector controlled vertex of rendering;Determination unit, for the method using multiple above-mentioned vector controlled vertex Line vector determines rendering strategy of the above-mentioned target object in each scene of above-mentioned applications client by predefined function, In, above-mentioned rendering strategy include illumination render strategy of the above-mentioned target object in above-mentioned scene and retouch side rendering strategy;Rendering Unit, for rendering above-mentioned target object in the above-mentioned scene of above-mentioned applications client according to above-mentioned rendering strategy.
Optionally, in the present embodiment, above-mentioned determination unit includes: that third obtains module, for utilizing multiple above-mentioned arrows The normal vector for measuring control vertex is pushed up by the boundary that above-mentioned predefined function successively obtains each above-mentioned vector controlled vertex correspondence Point vector;Second determining module, for determining that the above-mentioned of above-mentioned target object retouches side rendering plan according to above-mentioned border vertices vector Slightly.
Optionally, in the present embodiment, it includes: the second determining submodule that above-mentioned third, which obtains module, above-mentioned for determining Render mode of the target object in above-mentioned applications client;Second acquisition submodule is used for being determined according to above-mentioned render mode In the calculating space for obtaining above-mentioned border vertices vector, wherein in the case where above-mentioned render mode is first mode, in determination Stating and calculating space is the first space;In the case where above-mentioned render mode is second mode, determine that above-mentioned calculating space is second Space;Third acquisition submodule, for obtaining above-mentioned vector controlled vertex pair by above-mentioned predefined function in above-mentioned calculating space The above-mentioned border vertices vector answered.
Optionally, in the present embodiment, above-mentioned third acquisition submodule is realized by following steps in above-mentioned calculating space The above-mentioned border vertices vector of above-mentioned vector controlled vertex correspondence is obtained by above-mentioned predefined function: obtaining above-mentioned vector controlled top The normal vector of point and the product of normal control coefrficient;According to both the position vector on above-mentioned vector controlled vertex and above-mentioned product The sum of determine above-mentioned border vertices vector.
Optionally, in the present embodiment, above-mentioned apparatus further include: the 4th acquisition submodule, for above by above-mentioned After predefined function successively obtains the border vertices vector of each above-mentioned vector controlled vertex correspondence, obtain above-mentioned target object with The distance between reference position in the above-mentioned scene of above-mentioned applications client;Third determines submodule, for according to it is above-mentioned away from From the above-mentioned normal control coefrficient of determination, wherein in the case where above-mentioned distance is greater than first threshold, adjustment increases above-mentioned method line traffic control Coefficient processed;In the case where above-mentioned distance is less than above-mentioned first threshold, adjustment reduces above-mentioned normal control coefrficient.
Optionally, in the present embodiment, above-mentioned second determining module includes: the 4th determining submodule, is used for for basis The above-mentioned normal control coefrficient for obtaining above-mentioned border vertices vector determines that above-mentioned side of retouching renders strategy, wherein above-mentioned to retouch side rendering Strategy is used to indicate the display width for retouching side of above-mentioned target object, and the above-mentioned side of retouching of above-mentioned target object is according to above-mentioned vector control The position vector on vertex processed is obtained with the determination of above-mentioned border vertices vector.
According to another aspect of an embodiment of the present invention, a kind of storage medium is additionally provided, above-mentioned storage medium includes storage Program, wherein above procedure run when execute the above method.
According to another aspect of an embodiment of the present invention, it additionally provides a kind of electronic device, including memory, processor and deposits The computer program that can be run on above-mentioned memory and on above-mentioned processor is stored up, above-mentioned processor passes through above-mentioned computer journey Sequence executes the above method.
In embodiments of the present invention, the applications client run on mobile terminals utilizes the mesh to be rendered got The normal vector on the multiple vector controlled vertex for including in mark object, according to predefined function operation, to determine applications client The rendering strategy of target object in each scene, to realize according to above-mentioned rendering strategy to the target object in applications client It is rendered, cartoon rendering can not be applied in the terminal in the related technology to overcome, do not can guarantee on mobile terminal Target object carries out the problem of rendering quality of cartoon rendering, and then realizes that improving target object on mobile terminal carries out cartoon wash with watercolours The rendering quality of dye, improves the display effect of rendering.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is a kind of application environment schematic diagram of optional object rendering method according to an embodiment of the present invention;
Fig. 2 is a kind of flow chart of optional object rendering method according to an embodiment of the present invention;
Fig. 3 is the flow chart of another optional object rendering method according to an embodiment of the present invention;
Fig. 4 is a kind of schematic diagram of optional object rendering method according to an embodiment of the present invention;
Fig. 5 is the schematic diagram of another optional object rendering method according to an embodiment of the present invention;
Fig. 6 is the schematic diagram of another optional object rendering method according to an embodiment of the present invention;
Fig. 7 is a kind of schematic diagram of optional object rendering device according to an embodiment of the present invention;
Fig. 8 is the schematic diagram of determination unit in a kind of optional object rendering device according to an embodiment of the present invention;
Fig. 9 is the schematic diagram of determination unit in a kind of optional object rendering device according to an embodiment of the present invention;
Figure 10 is a kind of schematic diagram of optional electronic device according to an embodiment of the present invention.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work It encloses.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, " Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way Data be interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein can in addition to illustrating herein or Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover Cover it is non-exclusive include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to Step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, product Or other step or units that equipment is intrinsic.
In embodiments of the present invention, a kind of embodiment of above-mentioned object rendering method is provided.As a kind of optional reality Mode is applied, which can be, but not limited to be applied in application environment as shown in Figure 1, on mobile terminal 102 Operation has the applications client of scheduled application, and the display interface of the applications client can be, but not limited to mobile terminal as shown in figure 1 Effect shown in 102 tops realizes the target object that the method preview in through this embodiment is got.Pass through the applications client It obtains in mobile terminal target object to be rendered to display, wherein include multiple in the target object for controlling wash with watercolours The vector controlled vertex of dye;Using the normal vector on multiple vector controlled vertex, determine that target object is being answered by predefined function With the rendering strategy in each scene of client, wherein rendering strategy includes the illumination render plan of target object in the scene Omit and retouch side rendering strategy;Then, according to rendering strategy post-processing object object in the scene of applications client.
In the present embodiment, after the applications client by running on mobile terminal obtains target object to be rendered, It is multiple for controlling the normal vector on the vector controlled vertex of rendering using include in target object, by predefined function come really Set the goal rendering strategy of the object in each scene of above-mentioned applications client, and in mobile device according to above-mentioned rendering strategy Above-mentioned target object is rendered in the scene of above-mentioned applications client, wherein above-mentioned rendering strategy include illumination render strategy and Retouch side rendering strategy.That is, the applications client run on mobile terminals, utilizes the target pair to be rendered got The normal vector on the multiple vector controlled vertex for including as in, according to predefined function operation, to determine each of applications client The rendering strategy of target object in scene carries out the target object in applications client according to above-mentioned rendering strategy to realize Rendering, can not apply cartoon rendering to overcome in the terminal in the related technology, not can guarantee to the target on mobile terminal Object carries out the problem of rendering quality of cartoon rendering, and then realizes that improving target object on mobile terminal carries out cartoon rendering Quality is rendered, the display effect of rendering is improved.
Optionally, in the present embodiment, above-mentioned mobile terminal can include but is not limited at least one of: mobile phone is put down Plate computer, laptop and other need the mobile hardware equipment for rendering objects.A kind of above-mentioned only example, this implementation Example does not do any restriction to this.
According to embodiments of the present invention, a kind of object rendering method is provided, as shown in Fig. 2, this method comprises:
S202 obtains target object to be rendered by the applications client run on mobile terminal, wherein target object In include it is multiple for control render vector controlled vertex;
S204 determines target object in application visitor using the normal vector on multiple vector controlled vertex by predefined function Rendering strategy in each scene at family end, wherein rendering strategy include the illumination render strategy of target object in the scene and Retouch side rendering strategy;
S206, according to rendering strategy post-processing object object in the scene of applications client.
Optionally, in the present embodiment, above-mentioned object rendering method can be, but not limited to be applied in mobile terminal In the upper application for carrying out real-time rendering, for example, above-mentioned application can include but is not limited to game application.Wherein, the game application It can include but is not limited at least one of: two-dimentional (Two Dimension, abbreviation 2D) game application, three-dimensional (Three Dimension, abbreviation 3D) game application, virtual reality (Virtual Reality, abbreviation VR) game application, augmented reality (Augmented Reality, abbreviation AR) game application, mixed reality (Mixed Reality, abbreviation MR) game application.With Upper only a kind of example, the present embodiment are not limited in any way this.
It should be noted that the applications client run on mobile terminals, utilizes the target pair to be rendered got The normal vector on the multiple vector controlled vertex for including as in, according to predefined function operation, to determine each of applications client The rendering strategy of target object in scene carries out the target object in applications client according to above-mentioned rendering strategy to realize Rendering, can not apply cartoon rendering to overcome in the terminal in the related technology, not can guarantee to the target on mobile terminal Object carries out the problem of rendering quality of cartoon rendering, and then realizes that improving target object on mobile terminal carries out cartoon rendering Quality is rendered, the display effect of rendering is improved.
Optionally, in the present embodiment, above-mentioned target object to be rendered can include but is not limited to apply in wait operate Object, object such as to be operated can include but is not limited at least one of: static object and dynamic object.For example, with For game application, above-mentioned target object can include but is not limited at least one of: trees, house in game application Person model Deng, weaponry etc. in game application, in game application.Above-mentioned is only a kind of example, right in the present embodiment This does not do any restriction.
Optionally, in the present embodiment, the illumination render strategy in above-mentioned rendering strategy can be, but not limited to be used to indicate The target object light and shade region to be rendered, that is to say, that using above-mentioned multiple vector controlled vertex according to predefined function operation, To obtain in target object for area pellucida domain or dark areas belonging to each region, to realize for indicated by illumination render strategy Different light and shade regions, are rendered respectively.Wherein, for determining that the predefined function of above-mentioned illumination render strategy may include but not It is limited to spheric harmonic function, wherein the spheric harmonic function is the angle part of the spherical coordinate system formal solution of Laplace's equation.Above-mentioned ball is humorous Function is only a kind of example, does not do any restriction to this in the present embodiment.
Optionally, in the present embodiment, the side rendering strategy of retouching in above-mentioned rendering strategy can be, but not limited to be used to indicate The display width for retouching side of target object, that is to say, that using above-mentioned multiple vector controlled vertex according to predefined function operation, with The display width (also referred to as fineness) for retouching side of target object is obtained, to realize that the different piece for target object is pressed Side is retouched according to different display width renderings.Wherein, for determining that the above-mentioned predefined function for retouching side rendering strategy may include but not It is limited to the superposing control vector on the position vector on vector controlled vertex, which can be, but not limited to according to vector controlled The normal vector on vertex determines.
Optionally, in the present embodiment, illumination render plan of the target object in each scene of applications client is determined Slightly include: the normal vector using multiple vector controlled vertex, each vector controlled vertex is successively obtained by predefined function and is existed Global illumination brightness in scene;Obtain the local light degree of illuminating on each vector controlled vertex;According to each vector controlled vertex Global illumination brightness and local illumination brightness, determine to render the light and shade region to be rendered in target object and used Illumination render strategy.
It should be noted that in the present embodiment, obtaining each vector controlled using the normal vector on vector controlled vertex The global illumination brightness on vertex carries out hybrid operation further combined with local light degree of illuminating, to determine wanted wash with watercolours in target object Light and shade region in the region of dye, and rendered.Global illumination is introduced by the render process in mobile terminal to realize In the case where darker to avoid the scene shown by applications client, there is extra light and shade and has a common boundary in brightness.
In addition, in the present embodiment, during being calculated by predefined function, by retaining vector controlled vertex Normal vector normal component in one direction, smoothing processing bring fade effect when being up to reduction rendering, to guarantee The target object rendered more close to cartoon or caricature effect, improves cartoon rendering effect.
Optionally, in the present embodiment, rendering strategy packet of the target object in each scene of applications client is determined It includes: using the normal vector on multiple vector controlled vertex, each vector controlled vertex correspondence is successively obtained by predefined function Border vertices vector;Determine that the side of retouching of target object renders strategy according to border vertices vector.
It should be noted that in the present embodiment, rendering is one bigger than the ontology of target object, and only the back side is rendered Shell, and the major part of the shell is blocked by ontology, only exposes edge, retouched to be reached for target object and provide rendering The effect on side.Wherein, the border vertices for constituting the above-mentioned outer for retouching side can be, but not limited to through the position on vector controlled vertex It sets superposing control vector on vector to obtain, which can be, but not limited to the normal vector according at least to vector controlled vertex It determines.
In addition, in the present embodiment, can be, but not limited to the thickness that control difference retouches edge position by above-mentioned control vector Degree (i.e. display width).Wherein, normal vector and method line traffic control which can be, but not limited to as vector controlled vertex The product of coefficient processed.It can achieve the purpose of adjustment control vector by adjusting above-mentioned normal control coefrficient, and then guarantee above-mentioned Target object retouches side and can render different display widths according to different parts, to improve rendering effect.In addition, by upper Stating normal control coefrficient can also keep the above-mentioned pixel for retouching side to show thickness.As (being such as used for regardless of the reference position in application Determine display the visual field video camera position) distance, can be by adjusting the size of normal control coefrficient, so that shown Retouch side pixel show thickness be consistent.
It should be noted that in the present embodiment, can with but be not limited by front and back offset carried out to above-mentioned shell, such as The offset of the border vertices vector of shell is adjusted, shown in target object extra retouches side to reach to reject.
By embodiment provided by the present application, the applications client run on mobile terminals, using getting to wash with watercolours The normal vector on the multiple vector controlled vertex for including in the target object of dye, according to predefined function operation, to determine using visitor The rendering strategy of target object in each scene at family end, to realize according to above-mentioned rendering strategy to the mesh in applications client Mark object is rendered, and can not apply cartoon rendering in the terminal in the related technology to overcome, and not can guarantee to mobile whole The problem of target object on end carries out the rendering quality of cartoon rendering, and then realize that improving target object on mobile terminal carries out The rendering quality of cartoon rendering, improves the display effect of rendering.
Mesh is determined by predefined function using the normal vector on multiple vector controlled vertex as a kind of optional scheme Marking rendering strategy of the object in each scene of applications client includes:
S1 successively obtains each vector controlled top by predefined function using the normal vector on multiple vector controlled vertex The global illumination brightness of point in the scene;
S2 obtains the local light degree of illuminating on each vector controlled vertex;
S3 is determined according to the global illumination brightness on each vector controlled vertex and local illumination brightness in target object The light and shade region to be rendered rendered used in illumination render strategy.
Optionally, in the present embodiment, the illumination render strategy in above-mentioned rendering strategy can be, but not limited to be used to indicate The target object light and shade region to be rendered, that is to say, that using above-mentioned multiple vector controlled vertex according to predefined function operation, To obtain in target object for area pellucida domain or dark areas belonging to each region, to realize for indicated by illumination render strategy Different light and shade regions, are rendered respectively.Wherein, for determining that the predefined function of above-mentioned illumination render strategy may include but not It is limited to spheric harmonic function, wherein the spheric harmonic function is the angle part of the spherical coordinate system formal solution of Laplace's equation.Above-mentioned ball is humorous Function is only a kind of example, does not do any restriction to this in the present embodiment.
Optionally, in the present embodiment, step S1 passes through predetermined letter using the normal vector on multiple vector controlled vertex Number successively obtains the global illumination brightness of each vector controlled vertex in the scene and includes:
S12 executes following steps to each of target object vector controlled vertex:
S12-1 obtains the normal vector of current vector control vertex;
S12-2 retains the normal vector normal component in one direction of current vector control vertex;
The normal component of current vector control vertex is passed to the spheric harmonic function in predefined function, is currently sweared by S12-3 Measure the global illumination brightness of control vertex.
Specifically example is illustrated as shown in connection with fig. 3, by taking a vector controlled vertex A as an example, obtains vector controlled vertex A Normal vector, retain normal vector normal component in one direction, for example, as shown in Figure 3 retain y normal component, by x Normal component and z normal component zero setting.Then, above-mentioned y normal component is passed to global illumination spheric harmonic function, to obtain global light Degree of illuminating, wherein above-mentioned global illumination brightness can be, but not limited to be obtained according to the calculating color value brightness of global illumination color value; Further, above-mentioned global illumination brightness and local light degree of illuminating are subjected to hybrid operation, to obtain the color knot of light and shade calculating Fruit, for identification the light and shade region in the target object region to be rendered.Furthermore in conjunction with other color results in scene, Final result is obtained, then the target object in scene rendered according to obtained final result.
In addition, in the present embodiment, by retaining the normal component in a direction, smoothing processing when being up to reduction rendering Bring fade effect.For example, as shown in figure 4, Fig. 4 on the left of lower section box in wrist at have apparent fade effect, and Extra fade effect is then avoided at wrist in the box of Fig. 4 lower right-hand side, so that the target object rendered is more Stick on nearly cartoon or caricature effect, improves cartoon rendering effect.Wherein, need to illustrate that, above-mentioned removal fade effect Control mode, be to become apparent compared with effect under dark scene in scene.Above-mentioned is only a kind of example, is not done in the present embodiment to this Any restriction.
It is the step pair shown in dotted line frame it should be noted that being performed process step in solid box shown in Fig. 3 The data that should be obtained default can not also execute in addition, having shaded background is optional execution step.
By embodiment provided by the present application, by the global illumination brightness and the local light that combine each vector controlled vertex Degree of illuminating, determine to the light and shade region to be rendered in target object rendered used in illumination render strategy, thus reality The light and shade region in the region to be rendered in target object is recognized accurately, now to avoid the side in unnecessary light and shade region Boundary further by retaining individual normal component, can also reduce fade effect, so that the target object after rendering is more Close to the cartoon or caricature effect after cartoon rendering.
As a kind of optional scheme, determine used in being rendered to the light and shade region to be rendered in target object Illumination render strategy includes:
S1 obtains the color result on each vector controlled vertex, wherein the color result packet on each vector controlled vertex It includes: the product of the local light degree of illuminating of the global illumination brightness and vector controlled vertex on vector controlled vertex;
S2 identifies the light and shade region to be rendered in target object according to the color result on each vector controlled vertex, and Determine illumination render strategy, wherein illumination render strategy is used to indicate the light and shade area to be rendered in the target object identified Domain.
It is specifically still illustrated taking what is shown in fig. 3 as an example, to the global illumination brightness on vector controlled vertex and vector controlled The local light degree of illuminating on vertex carries out hybrid operation, for example, Fig. 3 show multiplying, with obtain the vector controlled vertex into The color result that row light and shade calculates, consequently facilitating the target object region to be rendered is recognized accurately according to the color result In light and shade region.Further combined with other color results in scene, can further hybrid operation, obtain for in scene The final result that is rendered of target object.
By embodiment provided by the present application, by obtaining the color result on each vector controlled vertex, to identify target The light and shade region to be rendered in object, and determination is used to indicate the light and shade region to be rendered in the target object identified Illumination render strategy improves rendering effect to realize the rendering for carrying out high quality to target object.
Mesh is determined by predefined function using the normal vector on multiple vector controlled vertex as a kind of optional scheme Marking rendering strategy of the object in each scene of applications client includes:
S1 successively obtains each vector controlled top by predefined function using the normal vector on multiple vector controlled vertex The corresponding border vertices vector of point;
S2 determines that the side of retouching of target object renders strategy according to border vertices vector.
Optionally, in the present embodiment, determine that the side rendering strategy of retouching of target object includes: root according to border vertices vector It is determined according to the normal control coefrficient for obtaining border vertices vector and retouches side rendering strategy, wherein retouch side rendering strategy for referring to Show that the display width for retouching side of target object, target object retouch side according to the position vector and border vertices on vector controlled vertex Vector determination obtains.
Optionally, in the present embodiment, the side rendering strategy of retouching in above-mentioned rendering strategy can be, but not limited to be used to indicate The display width for retouching side of target object.That is, using above-mentioned multiple vector controlled vertex according to predefined function operation, with The display width (also referred to as fineness) for retouching side of target object is obtained, to realize that the different parts for target object are pressed Side is retouched according to different display width renderings.Wherein, for determining that the above-mentioned predefined function for retouching side rendering strategy may include but not It is limited to for the superposing control vector on the position vector on vector controlled vertex, which can be, but not limited to as vector control The normal vector on vertex processed and the product of normal control coefrficient.Such as obtain normal vector and the normal control system on vector controlled vertex Several products;Border vertices vector is determined according to the position vector on vector controlled vertex and product sum of the two.
Wherein, above-mentioned calculating process can be, but not limited to as follows:
Ps=Pm+nm×rs(1)
Wherein, PsIndicate border vertices vector, PmIndicate the position vector on vector controlled vertex, nmIndicate vector controlled top The normal vector of point, rsRepresentation line traffic control coefficient.
For example, specific side effect of retouching as shown in connection with fig. 5 is illustrated, filled circles shown in Fig. 5 are the arrow in target object Control vertex is measured, the circle of cable shade shown in Fig. 5 is border vertices, it is assumed that normal control coefrficient is predetermined coefficient.Specifically, will arrow The position vector and normal vector for measuring control vertex substitute into above-mentioned formula (1), then border vertices vector can be calculated, thus The position of border vertices into target object.
It should be noted that since the shell that border vertices are constituted is bigger than the ontology of target object, and it is most of by target The ontology of object covers, thus retouches side for obtain the target object provided in the present embodiment.In addition, in the present embodiment, leading to Crossing above-mentioned formula (1) can be for different parts, and obtain different display widths (also referred to as fineness) retouches side, such as Fig. 5 Shown filled black region.So that it is more accurate to retouch side.
By embodiment provided by the present application, by obtaining border vertices vector, the display for retouching side is used to indicate to determine Width retouches side rendering strategy, to realize that the different parts for target object provided different display widths retouches side, makes Target object after must rendering is more close to cartoon rendering effect.
As a kind of optional scheme, using the normal vector on multiple vector controlled vertex, successively obtained by predefined function The border vertices vector for taking each vector controlled vertex correspondence includes:
S1 determines target object in the render mode of applications client;
S2 determines the calculating space for obtaining border vertices vector according to render mode, wherein in render mode is the In the case where one mode, determine that calculating space is the first space;In the case where render mode is second mode, determines and calculate sky Between be second space;
S3 passes through the border vertices vector of predefined function acquisition vector controlled vertex correspondence calculating space.
It should be noted that including the model space (model in the object render process provided in the present embodiment Space), observation space (view space, also referred to as video camera space camera space), clip space (clip space).First space can be, but not limited to the corresponding model space, wherein the operation efficiency highest of the model space.For example, input The position vector v on vector controlled vertex, by calculating output boundary vertex vector according to above-mentioned formula (1), then again by boundary Vertex vector median filters obtain final border vertices vector o to clip space;In addition, second space can be, but not limited to correspond to Clip space, wherein the operation result of clip space is more accurate.For example, the position vector v of input vector control vertex, first The position vector v on above-mentioned vector controlled vertex is transformed into clip space, calculates output boundary vertex vector according still further to above-mentioned (1) o。
It should be noted that above-mentioned render mode can be, but not limited to include: 1) efficiency mode and accurate mode, wherein The calculating of the first space can be used under efficiency mode, and second space calculating can be used under accurate mode;2) visual field apotype With visual field plesiotype, wherein the calculating of the first space can be used under the apotype of the visual field, and can be used second under the plesiotype of the visual field Space calculates.Above-mentioned is only a kind of example, does not do any restriction to this in the present embodiment
By embodiment provided by the present application, border vertices are obtained using different calculating spaces according to different render modes Vector improves the flexibility of rendering to achieve the purpose that meet different rendering demands.
As a kind of optional scheme, pushed up on the boundary for successively obtaining each vector controlled vertex correspondence by predefined function After point vector, further includes:
S1 obtains the distance between the reference position in the scene of target object and applications client;
S2 determines normal control coefrficient according to distance, wherein in the case where distance is greater than first threshold, adjustment increases Normal control coefrficient;In the case where distance is less than first threshold, adjustment reduces normal control coefrficient.
Optionally, in the present embodiment, above-mentioned to can be, but not limited to reference to seat as video camera in application (camera) Position.By adjusting normal control coefrficient, side fineness is retouched not by between video camera (camera) and target object to realize Distance influence, remained unchanged so as to ensure to retouch the thickness pixel size on side.For example, retouching the rendering effect such as Fig. 6 on side Shown overstriking lines.
By embodiment provided by the present application, guarantee the pixel thick for retouching side not by visual field distance by normal control coefrficient Variation influences, and guarantees the accurate true of rendering effect.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because According to the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules is not necessarily of the invention It is necessary.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned implementation The method of example can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but it is very much In the case of the former be more preferably embodiment.Based on this understanding, technical solution of the present invention is substantially in other words to existing The part that technology contributes can be embodied in the form of software products, which is stored in a storage In medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, calculate Machine, server or network equipment etc.) method that executes each embodiment of the present invention.
According to another aspect of an embodiment of the present invention, it additionally provides a kind of for implementing the object of above-mentioned object rendering method Rendering device, if Fig. 7 shows, which includes:
1) first acquisition unit 702 obtain target to be rendered for the applications client by running on mobile terminal Object, wherein include multiple for controlling the vector controlled vertex of rendering in target object;
2) determination unit 704 determine target by predefined function for the normal vector using multiple vector controlled vertex Rendering strategy of the object in each scene of applications client, wherein rendering strategy includes the light of target object in the scene According to rendering strategy and retouch side rendering strategy;
3) rendering unit 706, for according to rendering strategy post-processing object object in the scene of applications client.
Optionally, in the present embodiment, above-mentioned object rendering device can be, but not limited to be applied in mobile terminal In the upper application for carrying out real-time rendering, for example, above-mentioned application can include but is not limited to game application.Wherein, the game application It can include but is not limited at least one of: two-dimentional (Two Dimension, abbreviation 2D) game application, three-dimensional (Three Dimension, abbreviation 3D) game application, virtual reality (Virtual Reality, abbreviation VR) game application, augmented reality (Augmented Reality, abbreviation AR) game application, mixed reality (Mixed Reality, abbreviation MR) game application.With Upper only a kind of example, the present embodiment are not limited in any way this.
It should be noted that the applications client run on mobile terminals, utilizes the target pair to be rendered got The normal vector on the multiple vector controlled vertex for including as in, according to predefined function operation, to determine each of applications client The rendering strategy of target object in scene carries out the target object in applications client according to above-mentioned rendering strategy to realize Rendering, can not apply cartoon rendering to overcome in the terminal in the related technology, not can guarantee to the target on mobile terminal Object carries out the problem of rendering quality of cartoon rendering, and then realizes that improving target object on mobile terminal carries out cartoon rendering Quality is rendered, the display effect of rendering is improved.
Optionally, in the present embodiment, above-mentioned target object to be rendered can include but is not limited to apply in wait operate Object, object such as to be operated can include but is not limited at least one of: static object and dynamic object.For example, with For game application, above-mentioned target object can include but is not limited at least one of: trees, house in game application Person model Deng, weaponry etc. in game application, in game application.Above-mentioned is only a kind of example, right in the present embodiment This does not do any restriction.
Optionally, in the present embodiment, the illumination render strategy in above-mentioned rendering strategy can be, but not limited to be used to indicate The target object light and shade region to be rendered, that is to say, that using above-mentioned multiple vector controlled vertex according to predefined function operation, To obtain in target object for area pellucida domain or dark areas belonging to each region, to realize for indicated by illumination render strategy Different light and shade regions, are rendered respectively.Wherein, for determining that the predefined function of above-mentioned illumination render strategy may include but not It is limited to spheric harmonic function, wherein the spheric harmonic function is the angle part of the spherical coordinate system formal solution of Laplace's equation.Above-mentioned ball is humorous Function is only a kind of example, does not do any restriction to this in the present embodiment.
Optionally, in the present embodiment, the side rendering strategy of retouching in above-mentioned rendering strategy can be, but not limited to be used to indicate The display width for retouching side of target object, that is to say, that using above-mentioned multiple vector controlled vertex according to predefined function operation, with The display width (also referred to as fineness) for retouching side of target object is obtained, to realize that the different piece for target object is pressed Side is retouched according to different display width renderings.Wherein, for determining that the above-mentioned predefined function for retouching side rendering strategy may include but not It is limited to the superposing control vector on the position vector on vector controlled vertex, which can be, but not limited to according to vector controlled The normal vector on vertex determines.
Optionally, in the present embodiment, illumination render plan of the target object in each scene of applications client is determined Slightly include: the normal vector using multiple vector controlled vertex, each vector controlled vertex is successively obtained by predefined function and is existed Global illumination brightness in scene;Obtain the local light degree of illuminating on each vector controlled vertex;According to each vector controlled vertex Global illumination brightness and local illumination brightness, determine to render the light and shade region to be rendered in target object and used Illumination render strategy.
It should be noted that in the present embodiment, obtaining each vector controlled using the normal vector on vector controlled vertex The global illumination brightness on vertex carries out hybrid operation further combined with local light degree of illuminating, to determine wanted wash with watercolours in target object Light and shade region in the region of dye, and rendered.Global illumination is introduced by the render process in mobile terminal to realize In the case where darker to avoid the scene shown by applications client, there is extra light and shade and has a common boundary in brightness.
In addition, in the present embodiment, during being calculated by predefined function, by retaining vector controlled vertex Normal vector normal component in one direction, smoothing processing bring fade effect when being up to reduction rendering, to guarantee The target object rendered more close to cartoon or caricature effect, improves cartoon rendering effect.
Optionally, in the present embodiment, rendering strategy packet of the target object in each scene of applications client is determined It includes: using the normal vector on multiple vector controlled vertex, each vector controlled vertex correspondence is successively obtained by predefined function Border vertices vector;Determine that the side of retouching of target object renders strategy according to border vertices vector.
It should be noted that in the present embodiment, rendering is one bigger than the ontology of target object, and only the back side is rendered Shell, and the major part of the shell is blocked by ontology, only exposes edge, retouched to be reached for target object and provide rendering The effect on side.Wherein, the border vertices for constituting the above-mentioned outer for retouching side can be, but not limited to through the position on vector controlled vertex It sets superposing control vector on vector to obtain, which can be, but not limited to the normal vector according at least to vector controlled vertex It determines.
In addition, in the present embodiment, can be, but not limited to the thickness that control difference retouches edge position by above-mentioned control vector Degree (i.e. display width).Wherein, normal vector and method line traffic control which can be, but not limited to as vector controlled vertex The product of coefficient processed.It can achieve the purpose of adjustment control vector by adjusting above-mentioned normal control coefrficient, and then guarantee above-mentioned Target object retouches side and can render different display widths according to different parts, to improve rendering effect.In addition, by upper Stating normal control coefrficient can also keep the above-mentioned pixel for retouching side to show thickness.As (being such as used for regardless of the reference position in application Determine display the visual field video camera position) distance, can be by adjusting the size of normal control coefrficient, so that shown Retouch side pixel show thickness be consistent.
It should be noted that in the present embodiment, can with but be not limited by front and back offset carried out to above-mentioned shell, such as The offset of the border vertices vector of shell is adjusted, shown in target object extra retouches side to reach to reject.
By embodiment provided by the present application, the applications client run on mobile terminals, using getting to wash with watercolours The normal vector on the multiple vector controlled vertex for including in the target object of dye, according to predefined function operation, to determine using visitor The rendering strategy of target object in each scene at family end, to realize according to above-mentioned rendering strategy to the mesh in applications client Mark object is rendered, and can not apply cartoon rendering in the terminal in the related technology to overcome, and not can guarantee to mobile whole The problem of target object on end carries out the rendering quality of cartoon rendering, and then realize that improving target object on mobile terminal carries out The rendering quality of cartoon rendering, improves the display effect of rendering.
As a kind of optional scheme, as shown in figure 8, determination unit 704 includes:
1) first module 802 is obtained, for the normal vector using multiple vector controlled vertex, successively by predefined function Obtain the global illumination brightness of each vector controlled vertex in the scene;
2) second module 804 is obtained, for obtaining the local light degree of illuminating on each vector controlled vertex;
3) the first determining module 806, for bright according to the global illumination brightness on each vector controlled vertex and local illumination Degree, determine to the light and shade region to be rendered in target object rendered used in illumination render strategy.
Optionally, in the present embodiment, the illumination render strategy in above-mentioned rendering strategy can be, but not limited to be used to indicate The target object light and shade region to be rendered, that is to say, that using above-mentioned multiple vector controlled vertex according to predefined function operation, To obtain in target object for area pellucida domain or dark areas belonging to each region, to realize for indicated by illumination render strategy Different light and shade regions, are rendered respectively.Wherein, for determining that the predefined function of above-mentioned illumination render strategy may include but not It is limited to spheric harmonic function, wherein the spheric harmonic function is the angle part of the spherical coordinate system formal solution of Laplace's equation.Above-mentioned ball is humorous Function is only a kind of example, does not do any restriction to this in the present embodiment.
Optionally, in the present embodiment, the first acquisition module 802 includes:
(1) submodule is handled, for executing following steps to each of target object vector controlled vertex: acquisition is worked as The normal vector on preceding vector controlled vertex;Retain the normal vector normal component in one direction of current vector control vertex; The normal component of current vector control vertex is passed to the spheric harmonic function in predefined function, obtains the complete of current vector control vertex Office's illumination brightness.
Specifically example is illustrated as shown in connection with fig. 3, by taking a vector controlled vertex A as an example, obtains vector controlled vertex A Normal vector, retain normal vector normal component in one direction, for example, as shown in Figure 3 retain y normal component, by x Normal component and z normal component zero setting.Then, above-mentioned y normal component is passed to global illumination spheric harmonic function, to obtain global light Degree of illuminating, wherein above-mentioned global illumination brightness can be, but not limited to be obtained according to the calculating color value brightness of global illumination color value; Further, above-mentioned global illumination brightness and local light degree of illuminating are subjected to hybrid operation, to obtain the color knot of light and shade calculating Fruit, for identification the light and shade region in the target object region to be rendered.Furthermore in conjunction with other color results in scene, Final result is obtained, then the target object in scene rendered according to obtained final result.
In addition, in the present embodiment, by retaining the normal component in a direction, smoothing processing when being up to reduction rendering Bring fade effect.For example, as shown in figure 4, Fig. 4 on the left of lower section box in wrist at have apparent fade effect, and Extra fade effect is then avoided at wrist in the box of Fig. 4 lower right-hand side, so that the target object rendered is more Stick on nearly cartoon or caricature effect, improves cartoon rendering effect.Wherein, need to illustrate that, above-mentioned removal fade effect Control mode, be to become apparent compared with effect under dark scene in scene.Above-mentioned is only a kind of example, is not done in the present embodiment to this Any restriction.
It is the step pair shown in dotted line frame it should be noted that being performed process step in solid box shown in Fig. 3 The data that should be obtained default can not also execute in addition, having shaded background is optional execution step.
By embodiment provided by the present application, by the global illumination brightness and the local light that combine each vector controlled vertex Degree of illuminating, determine to the light and shade region to be rendered in target object rendered used in illumination render strategy, thus reality The light and shade region in the region to be rendered in target object is recognized accurately, now to avoid the side in unnecessary light and shade region Boundary further by retaining individual normal component, can also reduce fade effect, so that the target object after rendering is more Close to the cartoon or caricature effect after cartoon rendering.
As a kind of optional scheme, the first determining module 806 includes:
1) the first acquisition submodule, for obtaining the color result on each vector controlled vertex, wherein each vector controlled The color result on vertex includes: the global illumination brightness on vector controlled vertex and the local light degree of illuminating on vector controlled vertex multiplies Product;
2) it identifies submodule, to be rendered for being identified in target object according to the color result on each vector controlled vertex Light and shade region;
3) first submodule is determined, for determining illumination render strategy, wherein illumination render strategy, which is used to indicate, to be identified Target object in the light and shade region to be rendered.
It is specifically still illustrated taking what is shown in fig. 3 as an example, to the global illumination brightness on vector controlled vertex and vector controlled The local light degree of illuminating on vertex carries out hybrid operation, for example, Fig. 3 show multiplying, with obtain the vector controlled vertex into The color result that row light and shade calculates, consequently facilitating the target object region to be rendered is recognized accurately according to the color result In light and shade region.Further combined with other color results in scene, can further hybrid operation, obtain for in scene The final result that is rendered of target object.
By embodiment provided by the present application, by obtaining the color result on each vector controlled vertex, to identify target The light and shade region to be rendered in object, and determination is used to indicate the light and shade region to be rendered in the target object identified Illumination render strategy improves rendering effect to realize the rendering for carrying out high quality to target object.
As a kind of optional scheme, as shown in figure 9, determination unit 704 includes:
1) third obtains module 902, for the normal vector using multiple vector controlled vertex, successively by predefined function Obtain the border vertices vector of each vector controlled vertex correspondence;
2) the second determining module 904, for determining that the side of retouching of target object renders strategy according to border vertices vector.
Optionally, in the present embodiment, the second determining module 904 includes: the 4th determining submodule, for according to for obtaining It takes the normal control coefrficient of border vertices vector to determine and retouches side rendering strategy, wherein retouch side rendering strategy and be used to indicate target pair The side of retouching of the display width for retouching side of elephant, target object is determined according to the position vector and border vertices vector on vector controlled vertex It obtains.
Optionally, in the present embodiment, the side rendering strategy of retouching in above-mentioned rendering strategy can be, but not limited to be used to indicate The display width for retouching side of target object.That is, using above-mentioned multiple vector controlled vertex according to predefined function operation, with The display width (also referred to as fineness) for retouching side of target object is obtained, to realize that the different parts for target object are pressed Side is retouched according to different display width renderings.Wherein, for determining that the above-mentioned predefined function for retouching side rendering strategy may include but not It is limited to for the superposing control vector on the position vector on vector controlled vertex, which can be, but not limited to as vector control The normal vector on vertex processed and the product of normal control coefrficient.Such as obtain normal vector and the normal control system on vector controlled vertex Several products;Border vertices vector is determined according to the position vector on vector controlled vertex and product sum of the two.
Wherein, above-mentioned calculating process can be, but not limited to as follows:
Ps=Pm+nm×rs(2)
Wherein, PsIndicate border vertices vector, PmIndicate the position vector on vector controlled vertex, nmIndicate vector controlled top The normal vector of point, rsRepresentation line traffic control coefficient.
For example, specific side effect of retouching as shown in connection with fig. 5 is illustrated, filled circles shown in Fig. 5 are the arrow in target object Control vertex is measured, the circle of cable shade shown in Fig. 5 is border vertices, it is assumed that normal control coefrficient is predetermined coefficient.Specifically, will arrow The position vector and normal vector for measuring control vertex substitute into above-mentioned formula (2), then border vertices vector can be calculated, thus The position of border vertices into target object.
It should be noted that since the shell that border vertices are constituted is bigger than the ontology of target object, and it is most of by target The ontology of object covers, thus retouches side for obtain the target object provided in the present embodiment.In addition, in the present embodiment, leading to Crossing above-mentioned formula (2) can be for different parts, and obtain different display widths (also referred to as fineness) retouches side, such as Fig. 5 Shown filled black region.So that it is more accurate to retouch side.
By embodiment provided by the present application, by obtaining border vertices vector, the display for retouching side is used to indicate to determine Width retouches side rendering strategy, to realize that the different parts for target object provided different display widths retouches side, makes Target object after must rendering is more close to cartoon rendering effect.
As a kind of optional scheme, third obtains module 902 and includes:
1) second submodule is determined, for determining target object in the render mode of applications client;
2) the second acquisition submodule, for determining the calculating space for obtaining border vertices vector according to render mode, Wherein, in the case where render mode is first mode, determine that calculating space is the first space;It is second mode in render mode In the case where, determine that calculating space is second space;
3) third acquisition submodule, for passing through the boundary that predefined function obtains vector controlled vertex correspondence in calculating space Vertex vector.
It should be noted that including the model space (model in the object render process provided in the present embodiment Space), observation space (view space, also referred to as video camera space camera space), clip space (clip space).First space can be, but not limited to the corresponding model space, wherein the operation efficiency highest of the model space.For example, input The position vector v on vector controlled vertex, by calculating output boundary vertex vector according to above-mentioned formula (2), then again by boundary Vertex vector median filters obtain final border vertices vector o to clip space;In addition, second space can be, but not limited to correspond to Clip space, wherein the operation result of clip space is more accurate.For example, the position vector v of input vector control vertex, first The position vector v on above-mentioned vector controlled vertex is transformed into clip space, calculates output boundary vertex according still further to above-mentioned formula (2) Vector o.
It should be noted that above-mentioned render mode can be, but not limited to include: 1) efficiency mode and accurate mode, wherein The calculating of the first space can be used under efficiency mode, and second space calculating can be used under accurate mode;2) visual field apotype With visual field plesiotype, wherein the calculating of the first space can be used under the apotype of the visual field, and can be used second under the plesiotype of the visual field Space calculates.Above-mentioned is only a kind of example, does not do any restriction to this in the present embodiment
By embodiment provided by the present application, border vertices are obtained using different calculating spaces according to different render modes Vector improves the flexibility of rendering to achieve the purpose that meet different rendering demands.
As a kind of optional scheme, further includes:
1) the 4th acquisition submodule, on the boundary for successively obtaining each vector controlled vertex correspondence by predefined function After the vector of vertex, the distance between the reference position in the scene of target object and applications client is obtained;
2) third determines submodule, for determining normal control coefrficient according to distance, wherein is greater than first threshold in distance In the case where, adjust augmentativity line traffic control coefficient;In the case where distance is less than first threshold, adjustment reduces normal control system Number.
Optionally, in the present embodiment, above-mentioned to can be, but not limited to reference to seat as video camera in application (camera) Position.By adjusting normal control coefrficient, side fineness is retouched not by between video camera (camera) and target object to realize Distance influence, remained unchanged so as to ensure to retouch the thickness pixel size on side.For example, retouching the rendering effect such as Fig. 6 on side Shown overstriking lines.
By embodiment provided by the present application, guarantee the pixel thick for retouching side not by visual field distance by normal control coefrficient Variation influences, and guarantees the accurate true of rendering effect.
Another aspect according to an embodiment of the present invention additionally provides a kind of for implementing the electronics of above-mentioned object rendering method Device, as shown in Figure 10, the electronic device include: one or more (one is only shown in figure) processors 1002, memory 1004, user interface 1006, display 1008 and transmitting device 1010.
Wherein, memory 1004 can be used for storing software program and module, such as the object rendering in the embodiment of the present invention Corresponding program instruction/the module of method and apparatus, the software program that processor 1002 is stored in memory 1004 by operation And module realizes above-mentioned object rendering thereby executing various function application and data processing.Memory 1004 can wrap Include high speed random access memory, can also include nonvolatile memory, as one or more magnetic storage device, flash memory or Other non-volatile solid state memories of person.In some instances, 1004 cocoas further comprise long-range relative to processor 1002 The memory of setting, these remote memories can pass through network connection to terminal.The example of above-mentioned network includes but is not limited to Internet, intranet, local area network, mobile radio communication and combinations thereof.
Aforementioned display device 1008 is for showing above-mentioned applications client according to the above-mentioned object rendering method mesh to be rendered Object is marked, above-mentioned user interface 1006 is sent to place by the operation panel operational order generated on display for obtaining Reason device 1002 is handled.
Above-mentioned transmitting device 1010 is used to that data to be received or sent via a network.Above-mentioned network specific example It may include cable network and wireless network.In an example, transmitting device 1010 includes a network adapter (Network Interface Controller, NIC), can be connected by cable with other network equipments with router so as to interconnection Net or local area network are communicated.Transmitting device 1010 is radio frequency (Radio Frequency, RF) module in an example, For wirelessly being communicated with internet.
Wherein, specifically, memory 1004 is used to store information, the Yi Jiying of deliberate action condition and default access user Use program.
Optionally, the specific example in the present embodiment can be with reference to example described in above-described embodiment, the present embodiment Details are not described herein.
The another aspect of the embodiment of the present invention, additionally provides a kind of storage medium.Optionally, in the present embodiment, on State at least one network equipment that storage medium can be located in multiple network equipments in network.
Optionally, in the present embodiment, storage medium is arranged to store the program code for executing following steps:
S1 obtains target object to be rendered by the applications client run on mobile terminal, wherein in target object Including multiple for controlling the vector controlled vertex of rendering;
S2 determines target object in application client using the normal vector on multiple vector controlled vertex by predefined function Rendering strategy in each scene at end, wherein rendering strategy includes the illumination render strategy of target object in the scene and retouches Side rendering strategy;
S3, according to rendering strategy post-processing object object in the scene of applications client.
Optionally, storage medium is also configured to store the program code for executing following steps:
S1 successively obtains each vector controlled top by predefined function using the normal vector on multiple vector controlled vertex The global illumination brightness of point in the scene;
S2 obtains the local light degree of illuminating on each vector controlled vertex;
S3 is determined according to the global illumination brightness on each vector controlled vertex and local illumination brightness in target object The light and shade region to be rendered rendered used in illumination render strategy.
Optionally, storage medium is also configured to store the program code for executing following steps:
S1 successively obtains each vector controlled top by predefined function using the normal vector on multiple vector controlled vertex The corresponding border vertices vector of point;
S2 determines that the side of retouching of target object renders strategy according to border vertices vector.
Optionally, in the present embodiment, above-mentioned storage medium can include but is not limited to: USB flash disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or The various media that can store program code such as CD.
Optionally, the specific example in the present embodiment can be with reference to example described in above-described embodiment, the present embodiment Details are not described herein.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
If the integrated unit in above-described embodiment is realized in the form of SFU software functional unit and as independent product When selling or using, it can store in above-mentioned computer-readable storage medium.Based on this understanding, skill of the invention Substantially all or part of the part that contributes to existing technology or the technical solution can be with soft in other words for art scheme The form of part product embodies, which is stored in a storage medium, including some instructions are used so that one Platform or multiple stage computers equipment (can be personal computer, server or network equipment etc.) execute each embodiment side of the present invention The all or part of the steps of method.
In the above embodiment of the invention, it all emphasizes particularly on different fields to the description of each embodiment, does not have in some embodiment The part of detailed description, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed client, it can be by others side Formula is realized.Wherein, the apparatus embodiments described above are merely exemplary, such as the division of unit, and only one kind is patrolled Volume function division, there may be another division manner in actual implementation, such as multiple units or components can combine or can be with It is integrated into another system, or some features can be ignored or not executed.Another point, it is shown or discussed mutual Coupling, direct-coupling or communication connection can be through some interfaces, the indirect coupling or communication connection of unit or module, can To be electrically or in the form of others.
Unit may or may not be physically separated as illustrated by the separation member, shown as a unit Component may or may not be physical unit, it can and it is in one place, or may be distributed over multiple networks On unit.It can some or all of the units may be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
The above is only the preferred embodiment of the present invention, it is noted that those skilled in the art are come It says, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications also should be regarded as Protection scope of the present invention.

Claims (13)

1. a kind of object rendering method characterized by comprising
Target object to be rendered is obtained by the applications client run on mobile terminal, wherein wrap in the target object It includes multiple for controlling the vector controlled vertex of rendering;
Using the normal vector on multiple vector controlled vertex, determine the target object in the application by predefined function Rendering strategy in each scene of client, wherein the rendering strategy includes the target object in the scene Illumination render strategy renders strategy with side is retouched;
The target object is rendered in the scene of the applications client according to the rendering strategy;
Wherein, the normal vector using multiple vector controlled vertex, determines the target object by predefined function Rendering strategy in each scene of the applications client includes: to be sweared using the normal on multiple vector controlled vertex Amount, successively obtains global illumination brightness of each vector controlled vertex in the scene by the predefined function;It obtains Take the local light degree of illuminating on each vector controlled vertex;The global illumination according to each vector controlled vertex is bright Degree and the local light degree of illuminating, determination carry out the light and shade region to be rendered in the target object to render used institute State illumination render strategy.
2. the method according to claim 1, wherein the normal using multiple vector controlled vertex is sweared Amount, successively obtains global illumination brightness packet of each vector controlled vertex in the scene by the predefined function It includes:
Following steps are executed to vector controlled vertex described in each of described target object:
Obtain the normal vector of current vector control vertex;
Retain the normal vector of current vector control vertex normal component in one direction;
The normal component of the current vector control vertex is passed to the spheric harmonic function in the predefined function, is obtained described The global illumination brightness of current vector control vertex.
3. the method according to claim 1, wherein the determination is bright to be rendered in the target object Dark areas rendered used in the illumination render strategy include:
Obtain the color result on each vector controlled vertex, wherein the color knot on each vector controlled vertex Fruit includes: the global illumination brightness on the vector controlled vertex and the local light degree of illuminating on the vector controlled vertex Product;
The light and shade area to be rendered in the target object is identified according to the color result on each vector controlled vertex Domain, and determine the illumination render strategy, wherein the illumination render strategy is used to indicate in the target object identified The light and shade region to be rendered.
4. the method according to claim 1, wherein the normal using multiple vector controlled vertex is sweared Amount, determines rendering strategy of the target object in each scene of the applications client by predefined function further include:
Using the normal vector on multiple vector controlled vertex, each vector control is successively obtained by the predefined function The border vertices vector of vertex correspondence processed;
It is determined according to the border vertices vector and retouches rendering strategy in side described in the target object.
5. according to the method described in claim 4, it is characterized in that, the normal using multiple vector controlled vertex is sweared It measures, includes: by the border vertices vector that the predefined function successively obtains each vector controlled vertex correspondence
Determine the target object in the render mode of the applications client;
The calculating space for obtaining the border vertices vector is determined according to the render mode, wherein in the rendering mould In the case that formula is first mode, determine that the calculating space is the first space;In the feelings that the render mode is second mode Under condition, determine that the calculating space is second space;
The border vertices vector of the vector controlled vertex correspondence is obtained by the predefined function in the calculating space.
6. according to the method described in claim 5, it is characterized in that, described obtained in the calculating space by the predefined function The border vertices vector for taking the vector controlled vertex correspondence includes:
Obtain the normal vector on the vector controlled vertex and the product of normal control coefrficient;
The border vertices vector is determined according to the position vector on the vector controlled vertex and the product sum of the two.
7. according to the method described in claim 6, it is characterized in that, successively obtaining each institute by the predefined function described After the border vertices vector for stating vector controlled vertex correspondence, further includes:
Obtain the distance between the reference position in the scene of the target object and the applications client;
The normal control coefrficient is determined according to the distance, wherein in the case where the distance is greater than first threshold, adjustment Increase the normal control coefrficient;In the case where the distance is less than the first threshold, adjustment reduces the method line traffic control Coefficient.
8. according to the method described in claim 6, it is characterized in that, described determine the target according to the border vertices vector Side rendering strategy is retouched described in object includes:
Rendering strategy in side is retouched according to the normal control coefrficient determination for obtaining the border vertices vector, wherein Described retouch is used to indicate display width when retouching of the target object in rendering strategy, and the described of the target object retouches side root It is obtained according to the position vector and border vertices vector determination on the vector controlled vertex.
9. a kind of object rendering device characterized by comprising
First acquisition unit obtains target object to be rendered for the applications client by running on mobile terminal, wherein It include multiple for controlling the vector controlled vertex of rendering in the target object;
Determination unit determines the target by predefined function for the normal vector using multiple vector controlled vertex Rendering strategy of the object in each scene of the applications client, wherein the rendering strategy includes the target object Illumination render strategy in the scene renders strategy with side is retouched;
Rendering unit, for rendering the target pair in the scene of the applications client according to the rendering strategy As;
Wherein, the determination unit includes: the first acquisition module, for being sweared using the normal on multiple vector controlled vertex Amount, successively obtains global illumination brightness of each vector controlled vertex in the scene by the predefined function;The Two obtain module, for obtaining the local light degree of illuminating on each vector controlled vertex;First determining module, for according to each The global illumination brightness on a vector controlled vertex and the local light degree of illuminating are determined to institute in the target object The light and shade region to be rendered rendered used in the illumination render strategy.
10. device according to claim 9, which is characterized in that described first, which obtains module, includes:
Submodule is handled, for executing following steps to vector controlled vertex described in each of described target object: obtaining The normal vector of current vector control vertex;Retain the normal vector of current vector control vertex normal in one direction Component;The normal component of the current vector control vertex is passed to the spheric harmonic function in the predefined function, obtains institute State the global illumination brightness of current vector control vertex.
11. device according to claim 10, which is characterized in that first determining module includes:
First acquisition submodule, for obtaining the color result on each vector controlled vertex, wherein each vector control The color result on vertex processed include: the vector controlled vertex the global illumination brightness and the vector controlled vertex The local light degree of illuminating product;
Submodule is identified, for identifying institute in the target object according to the color result on each vector controlled vertex The light and shade region to be rendered;
First determines submodule, for determining the illumination render strategy, wherein the illumination render strategy is used to indicate identification The light and shade region to be rendered in the target object out.
12. a kind of storage medium, which is characterized in that the storage medium includes the program of storage, wherein when described program is run Execute method described in any one of claim 1 to 8.
13. a kind of electronic device, including memory, processor and it is stored on the memory and can transports on the processor Capable computer program, which is characterized in that the processor executes the claim 1 to 8 times by the computer program Method described in one.
CN201711081196.1A 2017-11-03 2017-11-03 Object rendering method and device, storage medium and electronic device Active CN108090945B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201711081196.1A CN108090945B (en) 2017-11-03 2017-11-03 Object rendering method and device, storage medium and electronic device
PCT/CN2018/112196 WO2019085838A1 (en) 2017-11-03 2018-10-26 Object rendering method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711081196.1A CN108090945B (en) 2017-11-03 2017-11-03 Object rendering method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN108090945A CN108090945A (en) 2018-05-29
CN108090945B true CN108090945B (en) 2019-08-02

Family

ID=62170332

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711081196.1A Active CN108090945B (en) 2017-11-03 2017-11-03 Object rendering method and device, storage medium and electronic device

Country Status (2)

Country Link
CN (1) CN108090945B (en)
WO (1) WO2019085838A1 (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108090945B (en) * 2017-11-03 2019-08-02 腾讯科技(深圳)有限公司 Object rendering method and device, storage medium and electronic device
CN108830923B (en) * 2018-06-08 2022-06-17 网易(杭州)网络有限公司 Image rendering method and device and storage medium
CN109224448B (en) * 2018-09-25 2021-01-01 北京天马时空网络技术有限公司 Method and device for stream rendering
CN109785448B (en) * 2018-12-06 2023-07-04 广州西山居网络科技有限公司 Method for adding printing on surface of three-dimensional model
CN109794062B (en) * 2019-01-15 2022-08-30 珠海金山网络游戏科技有限公司 Method and device for realizing MMO game ground surface applique
CN109978968B (en) * 2019-04-10 2023-06-20 广州虎牙信息科技有限公司 Video drawing method, device and equipment of moving object and storage medium
CN110310224B (en) * 2019-07-04 2023-05-30 北京字节跳动网络技术有限公司 Light effect rendering method and device
CN111127611B (en) * 2019-12-24 2023-09-22 北京像素软件科技股份有限公司 Three-dimensional scene rendering method and device and electronic equipment
CN111760277A (en) * 2020-07-06 2020-10-13 网易(杭州)网络有限公司 Illumination rendering method and device
CN112070873B (en) * 2020-08-26 2021-08-20 完美世界(北京)软件科技发展有限公司 Model rendering method and device
CN112509131B (en) 2020-11-20 2022-12-06 上海莉莉丝网络科技有限公司 Rendering method, system and computer readable storage medium for map area boundary in game map
CN112836469A (en) * 2021-01-27 2021-05-25 北京百家科技集团有限公司 Information rendering method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103065357A (en) * 2013-01-10 2013-04-24 电子科技大学 Manufacturing method of shadow figure model based on common three-dimensional model
CN104766361A (en) * 2015-04-29 2015-07-08 腾讯科技(深圳)有限公司 Ghosting effect realization method and device
CN105427366A (en) * 2015-11-11 2016-03-23 广州华多网络科技有限公司 Image rendering method and image rendering system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103310480B (en) * 2007-01-24 2016-12-28 英特尔公司 By the method and apparatus using replaceable rejecting program to improve graphics performance
WO2012079775A1 (en) * 2010-12-16 2012-06-21 Thomson Licensing Method for estimation of information representative of a pixel of a virtual object
CN103400404A (en) * 2013-07-31 2013-11-20 北京华易互动科技有限公司 Method for efficiently rendering bitmap motion trail
CN104574495B (en) * 2014-12-22 2017-08-08 北京像素软件科技股份有限公司 A kind of image rendering method and device
CN106780709B (en) * 2016-12-02 2018-09-07 腾讯科技(深圳)有限公司 A kind of method and device of determining global illumination information
CN106652007B (en) * 2016-12-23 2020-04-17 网易(杭州)网络有限公司 Virtual sea surface rendering method and system
CN108090945B (en) * 2017-11-03 2019-08-02 腾讯科技(深圳)有限公司 Object rendering method and device, storage medium and electronic device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103065357A (en) * 2013-01-10 2013-04-24 电子科技大学 Manufacturing method of shadow figure model based on common three-dimensional model
CN104766361A (en) * 2015-04-29 2015-07-08 腾讯科技(深圳)有限公司 Ghosting effect realization method and device
CN105427366A (en) * 2015-11-11 2016-03-23 广州华多网络科技有限公司 Image rendering method and image rendering system

Also Published As

Publication number Publication date
WO2019085838A1 (en) 2019-05-09
CN108090945A (en) 2018-05-29

Similar Documents

Publication Publication Date Title
CN108090945B (en) Object rendering method and device, storage medium and electronic device
US11386528B2 (en) Denoising filter
CN106875352B (en) A kind of enhancement method of low-illumination image
EP3631754B1 (en) Image processing apparatus and method
US9607429B2 (en) Relightable texture for use in rendering an image
US9449412B1 (en) Adaptive, calibrated simulation of cosmetic products on consumer devices
CN107045729B (en) A kind of image rendering method and device
US10846836B2 (en) View synthesis using deep convolutional neural networks
US8289342B2 (en) Image processing apparatus and storage medium having stored therein an image processing program
CN109448089A (en) A kind of rendering method and device
CN110211218A (en) Picture rendering method and device, storage medium and electronic device
CN107492067B (en) A kind of image beautification method and mobile terminal
CN107665482B (en) Video data real-time processing method and device for realizing double exposure and computing equipment
CN108111911B (en) Video data real-time processing method and device based on self-adaptive tracking frame segmentation
CN108665494A (en) Depth of field real-time rendering method based on quick guiding filtering
US20160086365A1 (en) Systems and methods for the conversion of images into personalized animations
CN110084765A (en) A kind of image processing method, image processing apparatus and terminal device
CN107609946A (en) A kind of display control method and computing device
Jun-Seong et al. Hdr-plenoxels: Self-calibrating high dynamic range radiance fields
CN110378250A (en) Training method, device and the terminal device of neural network for scene cognition
CN107766803B (en) Video character decorating method and device based on scene segmentation and computing equipment
CN105959593A (en) Exposure method for camera device and camera device
Jena et al. Neural mesh-based graphics
CN109493376A (en) Image processing method and device, storage medium and electronic device
Khan et al. Offset aperture: A passive single-lens camera for depth sensing

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