CN101127127B - Shade drafting method and rendering device - Google Patents

Shade drafting method and rendering device Download PDF

Info

Publication number
CN101127127B
CN101127127B CN2007101615338A CN200710161533A CN101127127B CN 101127127 B CN101127127 B CN 101127127B CN 2007101615338 A CN2007101615338 A CN 2007101615338A CN 200710161533 A CN200710161533 A CN 200710161533A CN 101127127 B CN101127127 B CN 101127127B
Authority
CN
China
Prior art keywords
shade
shadow
light source
color
pixel
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
CN2007101615338A
Other languages
Chinese (zh)
Other versions
CN101127127A (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 CN2007101615338A priority Critical patent/CN101127127B/en
Publication of CN101127127A publication Critical patent/CN101127127A/en
Application granted granted Critical
Publication of CN101127127B publication Critical patent/CN101127127B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Generation (AREA)

Abstract

The utility model relates to graphics rendering technology and discloses the embodiment of the shadow rendering method. The method comprises the operations of obtaining the umbra region grain and the penumbra region grain of the shading object shadow on the receiving object based on the preset light source and the view point; for the visible picture elements viewed from the preset view point into the scene, judging whether the picture element in the umbra region or in the penumbra region respectively; as for the visible picture element in the umbra region, rendering the color of the visible picture element to the picture element color corresponding to the coordinate of the visible picture element in the umbra region grain; as for the visible picture element in the penumbra region, rendering the color of the visible picture element to the picture element color corresponding to the coordinate of the visible picture element in the penumbra region grain. The utility model also discloses the corresponding embodiment of rendering devices. The embodiment not only simulates the effect of the umbra region and the penumbra region, but also simulates the gradual brightening effect of the shadow color from the umbra region to the penumbra region in the penumbra region.

Description

Shade drafting method and rendering device
Technical field
The present invention relates to graphics rendering technology, relate in particular to shade drafting method and rendering device.
Background technology
In the illumination world, when light is blocked by opaque article, form the dark space blocking the object back side in communication process, the dark space projects and promptly forms shade on another object.Shade can embody the information such as position of spatial relationship between object in the scene and light source, therefore, and in three-dimensional scenic is played up, for increasing the sense of reality and the stereovision of scene, enrich the expression effect of scene, need lighting effect that is virtually reality like reality, shade is drawn.
Light source has size dimension in real world, the shade that light source forms on object can comprise this shadow zone and penumbra region, with reference to shown in Figure 1, this shadow zone (the area B Y among the figure) is the shadow region isolated fully with light source, penumbra region (area B Y1 among the figure and area B Y2) is the shadow region that can receive part light from light source, and the part near umbra in the penumbra region only is subjected to the very irradiation of fraction light source, and is relatively darker; Can be subjected to irradiation from umbra part far away in the penumbra region than many parts light source, brighter.Therefore, the color of shade has the effect that brightens gradually usually in the penumbra region according to the direction from this shadow zone to the penumbra region.
Some general shadow algorithms in the prior art, as umbra volume (Shadow volume) algorithm, echo (Shadowmap) algorithm etc., can draw out this shadow zone of shade, and in order to simulate the penumbra region of shade, usually adopt the profile to this shadow zone of the shade that generates directly to carry out Fuzzy processing, the shortcoming of this scheme is to simulate the effect that the color of shade in the penumbra region brightens gradually according to the direction from this shadow zone to the penumbra region.
Summary of the invention
The technical matters that embodiments of the invention will solve provides a kind of shade drafting method and rendering device, and the shade that can simulate generation has the effect of umbra and penumbra.
For solving the problems of the technologies described above, embodiments of the invention provide following technical scheme:
A kind of shade drafting method comprises:
Based on light source that presets and viewpoint, obtain into the shadow object at this shadow zone texture and the penumbra region texture that receive the shade that produces on the object;
For seeing each visible pixels when the scene from presetting viewpoint, judge respectively whether this pixel is in this shadow zone or the penumbra region, if be in this shadow zone, then the color with this visible pixels is plotted as the color of pixel corresponding with the coordinate of this visible pixels in described this shadow zone texture, if be in the penumbra region, then the color with this visible pixels is plotted as color of pixel corresponding with the coordinate of this visible pixels in the described penumbra region texture.
Wherein, the described shadow object that obtains into specifically comprises at the penumbra region texture that receives the shade that produces on the object:
Based on the light source that presets, be specified to the silhouette edge of shadow object;
Obtain each self-corresponding shade softening prod cast type of each silhouette edge summit based on described light source;
Shade softening awl according to silhouette edge and silhouette edge summit correspondence obtains each self-corresponding shade softening quadrilateral model of each silhouette edge;
In light source space, obtain into the depth map of shadow object and the depth map of reception object;
In view space, depth map according to the depth map that becomes the shadow object, reception object, and the vertex set of shade softening prod cast type and shade softening quadrilateral model, be specified to pixel and corresponding color value in the penumbra region that the shadow object produced on receiving object, described color of pixel value meets this shadow zone of pixel distance when near more, the rule that its color is dark more.
A kind of shade rendering device comprises:
Based on light source that presets and viewpoint, obtain into the device of shadow object at this shadow zone texture that receives the shade that is produced on the object;
Based on light source that presets and viewpoint, obtain into the device of shadow object at the penumbra region texture that receives the shade that is produced on the object;
For seeing each visible pixels when the scene, judge respectively whether this pixel is in the device in this shadow zone or the penumbra region from presetting viewpoint; And,
Carry out the device of shade drafting according to above-mentioned judged result; Describedly carry out shade drafting according to above-mentioned judged result and comprise: if above-mentioned judged result is that visible pixels is in this shadow zone, then the color with this visible pixels is plotted as the color of pixel corresponding with the coordinate of this visible pixels in described this shadow zone texture, if above-mentioned judged result is that visible pixels is in the penumbra region, then the color with this visible pixels is plotted as color of pixel corresponding with the coordinate of this visible pixels in the described penumbra region texture.
Wherein, the device of described acquisition penumbra region texture comprises:
Based on the light source that presets, be specified to the device of the silhouette edge of shadow object;
Obtain the device of each self-corresponding shade softening prod cast type of each silhouette edge summit based on described light source;
According to the shade softening awl of silhouette edge and silhouette edge summit correspondence, obtain the device of each self-corresponding shade softening quadrilateral model of each silhouette edge;
In light source space, obtain into the depth map of shadow object and the device of the depth map that receives object;
In view space, depth map according to the depth map that becomes the shadow object, reception object, and the vertex set of shade softening prod cast type and shade softening quadrilateral model, be specified to the pixel in the penumbra region that the shadow object produced and the device of corresponding color value on receiving object, wherein, described color of pixel value meets this shadow zone of pixel distance when near more, the rule that its color is dark more.
As can be seen from the above technical solutions, embodiments of the invention are by generating into the shadow object respectively at this shadow zone texture and the penumbra region texture that receive the shade that produces on the object, when drawing shade, the color of pixel that will be in this shadow zone is plotted as color of pixel corresponding with the coordinate of this pixel in this shadow zone texture, the color of pixel that will be in the penumbra region is plotted as color of pixel corresponding with the coordinate of this pixel in the penumbra region texture, draws the effect that shade promptly can simulate umbra and penumbra by this scheme.
Further, the embodiment of the invention is when generating the penumbra region texture, the shade softening prod cast type by obtaining into summit, shadow contour of object limit and the shade softening quadrilateral model of silhouette edge, and with on shade softening prod cast type and the shade softening quadrilateral model, meeting in light source space the summit that is not only become the shadow object blocks but also be not received the condition of object blocks projects to and receives on the object, promptly can determine the penumbra zone of shade, and in drawing the penumbra zone during color of pixel, by making in the penumbra region color of pixel value meet this shadow zone of pixel distance when near more, the rule that its color is dark more just can simulate the effect that the color of shade in the penumbra region brightens gradually according to the direction from this shadow zone to the penumbra region.
Description of drawings
Fig. 1 is this shadow zone and the penumbra region synoptic diagram of shade in the prior art;
Fig. 2 is the basic flow sheet of shade drafting method one embodiment of the present invention;
Fig. 3 is the process flow diagram that generates the penumbra region texture among shade drafting method one embodiment of the present invention;
Fig. 4 is the synoptic diagram of shade softening awl among shade drafting method one embodiment of the present invention;
Fig. 5 is the tetragonal synoptic diagram of shade softening among shade drafting method one embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the preferred embodiment of shade drafting method provided by the invention and rendering device is described in detail.
One embodiment of shade drafting method of the present invention, with reference to figure 2, this method comprises:
A1, based on light source that presets and viewpoint, obtain into the shadow object at this shadow zone texture and the penumbra region texture that receive the shade that is produced on the object of shade (hereinafter to be referred as receiving object).
Wherein, the generation of this shadow zone texture can be passed through general shadow algorithm, realizes as methods such as echo or umbra volumes, does not repeat them here.
A2, for seeing each visible pixels when the scene from presetting viewpoint, judge respectively whether this pixel is in this shadow zone or the penumbra region, if be in this shadow zone, then the color with this visible pixels is plotted as the color of pixel corresponding with the coordinate of this visible pixels in described this shadow zone texture, if be in the penumbra region, then the color with this visible pixels is plotted as color of pixel corresponding with the coordinate of this visible pixels in the described penumbra region texture.
Wherein, judge whether visible pixels is in this shadow zone or the penumbra region and can realize by the following method: judge at this shadow zone texture, and/or whether the color of pixel value corresponding with the coordinate of this visible pixels is non-shadow color value in the penumbra region texture, if the color value of respective pixel is not non-shadow color value in the penumbra region texture, then visible pixels is in the penumbra region; If the color value of respective pixel is not non-shadow color value in this shadow zone texture, then visible pixels is in this shadow zone; If the color value of respective pixel all is non-shadow color values in this shadow zone texture and penumbra region texture, visible pixels (neither in this shadow zone again not in the penumbra region) not in shade then.
In embodiments of the present invention, the described shadow object that obtains into can specifically comprise with reference to figure 3 at the penumbra region texture that receives the shade that is produced on the object:
B1, based on the light source that presets, be specified to the silhouette edge of shadow object.
In the general graphic plotting system, usually the object in the scene is dispersed and be a series of polygon (as triangle, quadrilateral etc.), therefore, object in the scene can be represented by a series of polygons, there are two summits on polygonal every limit, and is shared by two adjacent polygons, if in two adjacent polygons sharing a limit, just one towards light source, and this edge can be considered as a silhouette edge of object so.
When being specified to the silhouette edge of shadow object, the polygonal limit that constitutes into the shadow object is traveled through; If share in two adjacent polygons on a limit, have only one towards light source, determine that then this edge is into a silhouette edge of shadow object.
Judge polygonal towards the time, can come by the following method to determine: judge from light source and see that whether the angle between the normal vector on direction of visual lines and plane, polygon place when the polygon spend less than 90, if then polygon is towards light source, if not, polygon backlight then.
B2, obtain each self-corresponding shade softening prod cast type of each silhouette edge summit based on described light source.
With reference to shade softening awl synoptic diagram shown in Figure 4, in the drawings, AB represents light source, HG represents to constitute into a polygonal limit of shadow object, IJ represents to receive object, when the light of the terminal A of light source AB arrives HG, the subpoint of summit G on IJ of HG is E, when the light of the terminal B of light source AB arrives HG, the subpoint of summit G on IJ of HG is D, then DE is exactly that summit G is based on light source AB formed penumbra region on IJ, D, E, 3 of G can determine with G to be the cone on summit in three dimensions, this cone is exactly the shade softening awl of summit G, and the bottom surface of this cone for example can be to be the circle of diameter with DE, perhaps can be according to based on a D, E and the regular determined some other geometric configuration that sets in advance.
According to above-mentioned definition, the described shade softening prod cast type that obtains silhouette edge summit correspondence based on light source can realize by the following method: obtain the silhouette edge summit respectively with respect to the summit at light source two ends at the subpoint that receives on the object; The cone of being determined by described silhouette edge summit and described subpoint is carried out discrete processes, obtain to be used to represent the vertex set of this cone.
B3, according to the shade softening of silhouette edge and each silhouette edge summit correspondence awl, obtain the tetragonal model of each self-corresponding shade softening of each silhouette edge.
With reference to shade softening quadrilateral synoptic diagram shown in Figure 5, in the drawings, PQ represents a silhouette edge, U and V represent the shade softening awl of silhouette edge summit P and Q correspondence respectively, can determine the shade softening quadrilateral PQRS of silhouette edge PQ correspondence by silhouette edge PQ and shade softening awl U, V, wherein, P, Q are wherein two summits of shade softening quadrilateral, receive on the object of shade parallel with silhouette edge PQ and with two point of contact S, R on the tangent straight line of shade softening awl U, V are tetragonal two other summits of shade softening.
After obtaining shade softening quadrilateral, same, this quadrilateral is dispersed, obtain to be used for this tetragonal vertex set of expression.
B4, in light source space, obtain into the depth map of shadow object and receive the depth map of object.
The depth map of the one-tenth shadow object that obtains in the light source space is to see that from light source complete scene (had both comprised into the shadow object the scene, comprise again and receive object) time, visible pixels in the scene (at this moment, it is visible becoming the pixel of shadow object on the face of light source, and receiving object then is sightless towards the pixel that is become shadow object shield portions on the face of light source) set formed with respect to the depth value (being the distance value between pixel and the light source) of light source.
The depth map of the object of the reception shade that obtains in the light source space is to see when having removed the scene of one-tenth shadow object the set that the visible pixels in the scene (receive object this moment is visible fully towards the pixel on the face of light source) is formed with respect to the depth value (being the distance value between pixel and the light source) of light source from light source.
B5, in view space, depth map according to the depth map that becomes the shadow object, reception object, and the vertex set of shade softening prod cast type and shade softening quadrilateral model, be specified to pixel and corresponding color value in the penumbra region that the shadow object produced on receiving object, described color of pixel value meets this shadow zone of pixel distance when near more, the rule that its color is dark more.
Can realize by following treatment scheme is carried out on each summit of shade softening prod cast type and shade softening quadrilateral model respectively:
B51, the summit is projected to light source space, to the limit at the depth value d1 of respective pixel and this respective pixel of light source space.
B52, obtain in the depth map of shadow object and the depth value d2 of described summit in the corresponding pixel of coordinate of the respective pixel of light source space.
B53, above-mentioned two depth values are compared, if the former is greater than the latter (being that d1 is greater than d2), then this summit is become the shadow object to block, and its color value is set is predetermined non-shadow color value, process ends; Otherwise the depth map of acquisition reception object and described summit are at the depth value d3 of the corresponding pixel of respective coordinates of light source space.
B54, to described summit at the depth value d1 of the respective pixel of light source space with receive in the depth map of object and compare with the depth value d3 of described summit in the corresponding pixel of coordinate of the respective pixel of light source space, if the former is greater than the latter (being that d1 is greater than d3), then this summit is received object and blocks, its color value is set is predetermined non-shadow color value, process ends; Otherwise, carry out B55.
B55, in view space, obtain described summit and receiving the subpoint on the object and determining its color value with respect to light source, the color value of described subpoint meets corresponding vertex with respect to the depth value of light source more hour, the rule that its color is dark more.
Still with reference to figure 4, among the figure, DGE represents the shade softening awl of silhouette edge summit G, GE can be a shade softening quadrilateral, and some K represents the shade softening awl of silhouette edge summit A or a summit on the shade softening quadrilateral model, and L is a K with respect to the projection of light source AB on the object IJ that receives shade (in the drawings, mid point C with AB represents light source AB, determine the projection of some K on IJ, when specific implementation, also can choose on the AB other and represent light source AB more arbitrarily); Shade softening awl and the tetragonal geometric properties of shade softening according to the silhouette edge summit, summit on shade softening prod cast type and the shade softening quadrilateral model is more little with respect to the depth value of light source, this summit is near more apart from the umbra that becomes the shadow object with respect to the subpoint of light source on the object that receives shade, therefore, the color value at this subpoint place also should be dark more.
Below provide an instantiation that can reach above-mentioned effect:
Following processing is carried out on described summit:
fsubD=d3-d1;
D=D1-D2;
colorD=f(fsubD/D);
Wherein, d1 represents the depth value of summit in the respective pixel of light source space;
D3 represents to receive in the depth map of object and the depth value of described summit in the corresponding pixel of coordinate of the respective pixel of light source space;
D1 represents that the mid point of light source and described summit are with respect to the distance (as the CF among Fig. 4) between the subpoint of mid point on receiving object of light source;
D2 represents the distance (as the GF among Fig. 4) between the mid point of described summit and light source;
F (x) can be a subtraction function arbitrarily, according to geometric relationship as can be known the fsubD on all summits all satisfy 0<fsubD<D, therefore, the input and output that can guarantee f (x) are all within (0,1).
In another embodiment of shade drafting method of the present invention, for the color value that reaches described subpoint meets the summit with respect to the depth value of light source more hour, the effect that its color is dark more, also can set in advance summit on shade softening prod cast type and the shade softening quadrilateral model with respect to the corresponding relation between the color value of the depth value of light source and its subpoint, it is more little that this corresponding relation should meet depth value, the rule that color value is dark more; When determining that the summit is receiving the color value of the subpoint on the object of shade with respect to light source,, obtain the color value corresponding and get final product with the depth value on this summit directly according to described corresponding relation.
The present invention also provides an embodiment of rendering device, comprising:
Based on light source that presets and viewpoint, obtain into the device of shadow object at this shadow zone texture that receives the shade that is produced on the object;
Based on light source that presets and viewpoint, obtain into the device of shadow object at the penumbra region texture that receives the shade that is produced on the object;
For seeing each visible pixels when the scene, judge respectively whether this pixel is in the device in this shadow zone or the penumbra region from presetting viewpoint; And,
Carry out the device of shade drafting according to above-mentioned judged result; Describedly carry out shade drafting according to above-mentioned judged result and comprise: if above-mentioned judged result is that visible pixels is in this shadow zone, then the color with this visible pixels is plotted as the color of pixel corresponding with the coordinate of this visible pixels in described this shadow zone texture, if above-mentioned judged result is that visible pixels is in the penumbra region, then the color with this visible pixels is plotted as color of pixel corresponding with the coordinate of this visible pixels in the described penumbra region texture;
Wherein, the device of described acquisition penumbra region texture comprises:
Based on the light source that presets, be specified to the device of the silhouette edge of shadow object;
Obtain the device of each self-corresponding shade softening prod cast type of each silhouette edge summit based on described light source;
According to the shade softening awl of silhouette edge and each silhouette edge summit correspondence, obtain the device of each self-corresponding shade softening quadrilateral model of each silhouette edge;
In light source space, obtain into the depth map of shadow object and the device of the depth map that receives object;
In view space, depth map according to the depth map that becomes the shadow object, reception object, and the vertex set of shade softening prod cast type and shade softening quadrilateral model, be specified to the pixel in the penumbra region that the shadow object produced and the device of corresponding color value on receiving object, wherein, described color of pixel value meets this shadow zone of pixel distance when near more, the rule that its color is dark more.
In above-mentioned rendering device embodiment, the shade softening quadrilateral model of the described silhouette edge that is specified to the shadow object, the shade softening prod cast type that obtains the silhouette edge summit, silhouette edge and the correlation technique that obtains into the penumbra region texture etc. of the shade that the shadow object produced provide in can be with reference to shade drafting method embodiment of the present invention on the object that receives shade are realized, repeat no more herein.
Embodiments of the invention are by generating into the shadow object respectively at this shadow zone texture and the penumbra region texture that receive the shade that produces on the object, when drawing shade, the color of pixel that will be in this shadow zone is plotted as color of pixel corresponding with the coordinate of this pixel in this shadow zone texture, the color of pixel that will be in the penumbra region is plotted as color of pixel corresponding with the coordinate of this pixel in the penumbra region texture, draws the effect that shade promptly can simulate umbra and penumbra by this scheme.
Further, the embodiment of the invention is when generating the penumbra region texture, the shade softening prod cast type by obtaining into summit, shadow contour of object limit and the shade softening quadrilateral model of silhouette edge, and with on shade softening prod cast type and the shade softening quadrilateral model, meeting in light source space the summit that is not only become the shadow object blocks but also be not received the condition of object blocks projects to and receives on the object, promptly can determine the penumbra zone of shade, and in drawing the penumbra zone during color of pixel, by making in the penumbra region color of pixel value meet this shadow zone of pixel distance when near more, the rule that its color is dark more just can simulate the effect that the color of shade in the penumbra region brightens gradually according to the direction from this shadow zone to the penumbra region.
More than shade drafting method and rendering device that the embodiment of the invention provided are described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and thought thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (8)

1. a shade drafting method is characterized in that, comprising:
Based on light source that presets and viewpoint, obtain into the shadow object at this shadow zone texture and the penumbra region texture that receive the shade that produces on the object; The described shadow object that obtains into specifically comprises at the penumbra region texture that receives the shade that produces on the object: based on the light source that presets, be specified to the silhouette edge of shadow object; Obtain each self-corresponding shade softening prod cast type of each silhouette edge summit based on described light source; Shade softening awl according to silhouette edge and silhouette edge summit correspondence obtains each self-corresponding shade softening quadrilateral model of each silhouette edge; In light source space, obtain into the depth map of shadow object and the depth map of reception object; In view space, depth map according to the depth map that becomes the shadow object, reception object, and the vertex set of shade softening prod cast type and shade softening quadrilateral model, be specified to pixel and corresponding color value in the penumbra region that the shadow object produced on receiving object, described color of pixel value meets this shadow zone of pixel distance when near more, the rule that its color is dark more;
For seeing each visible pixels when the scene from presetting viewpoint, judge respectively whether this pixel is in this shadow zone or the penumbra region, if be in this shadow zone, then the color with this visible pixels is plotted as the color of pixel corresponding with the coordinate of this visible pixels in described this shadow zone texture, if be in the penumbra region, then the color with this visible pixels is plotted as color of pixel corresponding with the coordinate of this visible pixels in the described penumbra region texture.
2. shade drafting method as claimed in claim 1 is characterized in that, described pixel and the corresponding color value that is specified in the penumbra region that the shadow object produced on receiving object specifically comprises:
To each summit in the vertex set of shade softening prod cast type or shade softening quadrilateral model, carry out following flow process respectively:
The summit is projected to light source space, to the limit at the depth value of respective pixel and this respective pixel of light source space;
Obtain in the depth map of shadow object and the depth value of described summit in the corresponding pixel of coordinate of the respective pixel of light source space;
Above-mentioned two depth values are compared, if the former is greater than the latter, then described summit is become the shadow object to block, and its color value is set is predetermined non-shadow color value, process ends; Otherwise, to receive in the depth map of object and the depth value of described summit in the corresponding pixel of coordinate of the respective pixel of light source space;
To described summit at the depth value of the respective pixel of light source space with receive in the depth map of object and compare with the depth value of described summit in the corresponding pixel of coordinate of the respective pixel of light source space, if the former is greater than the latter, then this summit is received object and blocks, its color value is set is predetermined non-shadow color value, process ends; Otherwise, in view space, obtaining described summit and receiving the subpoint on the object and determining its color value with respect to light source, the color value of described subpoint meets corresponding vertex with respect to the depth value of light source more hour, the rule that its color is dark more.
3. shade drafting method as claimed in claim 2 is characterized in that, described based on the light source that presets, the silhouette edge that is specified to the shadow object specifically comprises: the polygonal limit that constitutes into the shadow object is traveled through; If have only one towards light source in two adjacent polygons on a shared limit, determine that then this edge is into a silhouette edge of shadow object.
4. shade drafting method as claimed in claim 2 is characterized in that, describedly judges whether visible pixels is in this shadow zone or the penumbra region is realized by the following method:
Judgement is at this shadow zone texture, and/or whether the color of pixel value corresponding with the coordinate of this visible pixels is non-shadow color value in the penumbra region texture, if the color value of respective pixel is not non-shadow color value in the penumbra region texture, then visible pixels is in the penumbra region; If the color value of respective pixel is not non-shadow color value in this shadow zone texture, then visible pixels is in this shadow zone; If the color value of respective pixel all is non-shadow color values in this shadow zone texture and penumbra region texture, then visible pixels is not in shade.
5. shade drafting method as claimed in claim 2 is characterized in that, described shade softening prod cast type based on light source acquisition silhouette edge summit correspondence realizes by the following method:
Obtain the silhouette edge summit respectively with respect to the summit at light source two ends at the subpoint that receives on the object;
The cone of being determined by described silhouette edge summit and described subpoint is carried out discrete processes, obtain to be used to represent the vertex set of this cone.
6. shade drafting method as claimed in claim 2 is characterized in that, the shade softening quadrilateral model of described silhouette edge correspondence is realized by the following method:
Determine parallelly on the object receiving, and bore two point of contacts on the tangent straight line with each self-corresponding shade softening of two summits of silhouette edge with silhouette edge;
The shade softening quadrilateral of being determined by two summits and described two point of contacts of described silhouette edge is carried out discrete processes, obtain to be used for this tetragonal vertex set of expression.
7. as each described shade drafting method of claim 2 to 6, it is characterized in that described summit is determined by the method below carrying out at the color value that receives the subpoint on the object with respect to light source:
fsubD=d3-d1;
D=D1-D2;
colorD=f(fsubD/D);
Wherein, d1 represents the depth value of summit in the respective pixel of light source space;
D3 represents to receive in the depth map of object and the depth value of described summit in the corresponding pixel of coordinate of the respective pixel of light source space;
D1 represents the mid point of light source and the described summit distance of mid point between the subpoint that receives on the object with respect to light source;
D2 represents the distance between the mid point of described summit and light source;
F (x) is a subtraction function.
8. a shade rendering device is characterized in that, comprising:
Based on light source that presets and viewpoint, obtain into the device of shadow object at this shadow zone texture that receives the shade that is produced on the object;
Based on light source that presets and viewpoint, obtain into the device of shadow object at the penumbra region texture that receives the shade that is produced on the object; The device of described acquisition penumbra region texture comprises: based on the light source that presets, be specified to the device of the silhouette edge of shadow object; Obtain the device of each self-corresponding shade softening prod cast type of each silhouette edge summit based on described light source; According to the shade softening awl of silhouette edge and silhouette edge summit correspondence, obtain the device of each self-corresponding shade softening quadrilateral model of each silhouette edge; In light source space, obtain into the depth map of shadow object and the device of the depth map that receives object; In view space, depth map according to the depth map that becomes the shadow object, reception object, and the vertex set of shade softening prod cast type and shade softening quadrilateral model, be specified to the pixel in the penumbra region that the shadow object produced and the device of corresponding color value on receiving object, wherein, described color of pixel value meets this shadow zone of pixel distance when near more, the rule that its color is dark more;
For seeing each visible pixels when the scene, judge respectively whether this pixel is in the device in this shadow zone or the penumbra region from presetting viewpoint; And,
Carry out the device of shade drafting according to above-mentioned judged result; Describedly carry out shade drafting according to above-mentioned judged result and comprise: if above-mentioned judged result is that visible pixels is in this shadow zone, then the color with this visible pixels is plotted as the color of pixel corresponding with the coordinate of this visible pixels in described this shadow zone texture, if above-mentioned judged result is that visible pixels is in the penumbra region, then the color with this visible pixels is plotted as color of pixel corresponding with the coordinate of this visible pixels in the described penumbra region texture.
CN2007101615338A 2007-09-29 2007-09-29 Shade drafting method and rendering device Active CN101127127B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2007101615338A CN101127127B (en) 2007-09-29 2007-09-29 Shade drafting method and rendering device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2007101615338A CN101127127B (en) 2007-09-29 2007-09-29 Shade drafting method and rendering device

Publications (2)

Publication Number Publication Date
CN101127127A CN101127127A (en) 2008-02-20
CN101127127B true CN101127127B (en) 2011-07-27

Family

ID=39095151

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2007101615338A Active CN101127127B (en) 2007-09-29 2007-09-29 Shade drafting method and rendering device

Country Status (1)

Country Link
CN (1) CN101127127B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4513887B2 (en) * 2008-03-31 2010-07-28 ブラザー工業株式会社 Image generating apparatus and printing apparatus
CN102396003B (en) * 2009-04-17 2015-10-07 设计代码公司 For adding the method for shade to the object in computer graphical
CN105513122B (en) * 2014-09-24 2019-01-25 中兴通讯股份有限公司 The method for building up and device of umbra volume
CN104574496B (en) * 2014-12-30 2017-09-29 北京像素软件科技股份有限公司 A kind of method and device of the static shade for calculating illumination pattern and dynamic shadow fusion
EP3062293A1 (en) * 2015-02-25 2016-08-31 Samsung Electronics Co., Ltd. Shadow rendering apparatus and control method thereof
CN107045729B (en) * 2017-05-05 2018-09-18 腾讯科技(深圳)有限公司 A kind of image rendering method and device
JP2019070872A (en) * 2017-10-05 2019-05-09 カシオ計算機株式会社 Image processing device, image processing method, and program
CN109448099B (en) * 2018-09-21 2023-09-22 腾讯科技(深圳)有限公司 Picture rendering method and device, storage medium and electronic device
CN111131807B (en) * 2019-12-30 2021-11-23 华人运通(上海)云计算科技有限公司 Method and system for simulating and displaying vehicle light projection
CN113920238B (en) * 2021-12-14 2022-03-15 深圳市大头兄弟科技有限公司 Three-dimension method of two-dimensional target pattern and related equipment
CN117252789B (en) * 2023-11-10 2024-02-02 中国科学院空天信息创新研究院 Shadow reconstruction method and device for high-resolution remote sensing image and electronic equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5808620A (en) * 1994-09-16 1998-09-15 Ibm Corporation System and method for displaying shadows by dividing surfaces by occlusion into umbra penumbra, and illuminated regions from discontinuity edges and generating mesh

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5808620A (en) * 1994-09-16 1998-09-15 Ibm Corporation System and method for displaying shadows by dividing surfaces by occlusion into umbra penumbra, and illuminated regions from discontinuity edges and generating mesh

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
JP特开2001-101445A 2001.04.13
JP特开2001-84400A 2001.03.30
JP特开2004-13202A 2004.01.15

Also Published As

Publication number Publication date
CN101127127A (en) 2008-02-20

Similar Documents

Publication Publication Date Title
CN101127127B (en) Shade drafting method and rendering device
CN112316420B (en) Model rendering method, device, equipment and storage medium
CN109427088B (en) Rendering method for simulating illumination and terminal
JP7362044B2 (en) Shape improvement of triangular 3D mesh using modified shape-from-shading (SFS) scheme
US9741158B2 (en) Graphic processing unit and tile-based rendering method
CN102523473B (en) A kind of three-dimensional interface display device, method and terminal
CN100468462C (en) Shadows plotting method and rendering device thereof
CN108230435B (en) Graphics processing using cube map textures
WO2013184534A4 (en) Non-static 3d map views
WO2006069310A3 (en) 2d/3d line rendering using 3d rasterization algorithms
CN102044084A (en) Two-dimensional plane expression method of three-dimensional graph
WO2023066121A1 (en) Rendering of three-dimensional model
CN104517313B (en) The method of ambient light masking based on screen space
CN103679818B (en) A kind of real-time scene method for drafting based on virtual surface light source
CN108280870A (en) A kind of point cloud model texture mapping method and system
KR20020041736A (en) APPARATUS AND METHOD FOR DRAWING THREE DIMENSIONAL GRAPHICS BY CONTROLLING α VALUE BASED ON Z COORDINATE VALUE
CN101511034A (en) Truly three-dimensional stereo display method facing Skyline
CN107633548B (en) The method and device of figure rendering is realized in a computer
CN115845369A (en) Cartoon style rendering method and device, electronic equipment and storage medium
WO2012079775A1 (en) Method for estimation of information representative of a pixel of a virtual object
CN104346825A (en) Processing method and device for converting nonlinear depth into linear depth
KR20180108184A (en) Real-time rendering method for full lighting for mobile
US20230206567A1 (en) Geometry-aware augmented reality effects with real-time depth map
JP4847910B2 (en) Curvature-based rendering method and apparatus for translucent material such as human skin
KR100900076B1 (en) Texturing System and Method for Border Lins is Natural

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant