System for shading vector objects
By forming a two-dimensional grid at the boundary points of the vector object, generating a three-dimensional grid and determining the color value, the problem of loss of resolution independence after vector objects are colored in the existing system is solved, and a high-quality coloring effect that retains the properties of the vector object is achieved.
Patent Information
- Application Number
- CN202110790378.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-09-28
- Filing Date
- 2021-07-13
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2041-07-13
AI Technical Summary
After existing automatic coloring systems convert vector objects into raster objects, they lose the advantages of resolution independence and compact representation, resulting in coloring effects that no longer conform to the properties of vector objects.
A two-dimensional grid is formed by detecting the boundary points of vector objects, the vertex positions of the three-dimensional grid are used to determine the color values, and the colored vector objects are generated by blending, preserving their resolution independence and compact representation.
The generated shaded vector objects retain resolution independence and compact representation, provide realistic shading effects, and support user-customized light source and diffuse intensity inputs.
Smart Images

Figure CN114332339B_ABST
Abstract
Description
Technical Field
[0001] Various embodiments of the present application relate to a system for shading vector objects. Background Art
[0002] Vector graphics offer several advantages over raster graphics, such as compact representation and resolution independence. This is because vector objects are defined as points, lines, and / or curves, while raster objects are defined as arrays of pixels. For example, points, lines, and curves can be described using relatively small amounts of data, compared to the amount of data required to describe the bit arrays of each pixel included in the pixel array. Because vector-based graphics are not defined based on any specific resolution, vector graphics can be scaled up or down without the negative effects of aliasing that are observed when scaling raster-based graphics.
[0003] Due to the advantages of vector graphics, vector objects are often included in digital artwork, online digital content, and digital content that may be resized or scaled, such as logos, icons, and labels. Vector objects are also often included as part of digital content in scenarios where it is desirable to enhance the aesthetics of the vector objects through the use of lighting and shading. For example, shading vector objects in this manner adds a degree of realism to the digital content.
[0004] Conventional systems for automatically coloring vector objects, for example without user intervention, generate a light and shaded appearance by converting the vector objects into raster objects. These systems apply shading to raster objects by determining the color value of a pixel on a per-pixel basis. For example, conventional systems for automatically coloring vector objects receive a vector object as input and output a colored raster object. This colored raster object no longer possesses desirable vector-based properties, such as compact representation and resolution independence. Summary of the Invention
[0005] To overcome the shortcomings of conventional systems, systems and techniques are described for coloring vector objects, for example, automatically and without user intervention. In one example, a computing device implements a coloring system to detect points along the boundary of a vector-based object. For example, the coloring system forms a two-dimensional grid using the detected points.
[0006] In one example, a shading system generates a three-dimensional mesh by dilating a two-dimensional mesh based on the geometry of a vector-based object. The shading system determines color values based on the positions of vertices of the three-dimensional mesh and applies the color values to the shaded mesh. For example, the shading system generates a shaded vector-based object by blending the vector-based object with the shaded mesh.
[0007] This Summary introduces a selection of concepts in a simplified form that are further described below in the Detailed Description. Therefore, this Summary is not intended to identify essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] The patent or application file contains at least one drawing executed in color. Copies of this patent or patent application publication with color drawing(s) will be provided by the Office upon request and payment of the necessary fee.
[0009] The detailed description is described with reference to the accompanying drawings. The entities shown in the drawings represent one or more entities, and thus reference to the entities in singular or plural form may be made interchangeably in the discussion.
[0010] Figure 1 is an illustration of an environment in an example implementation operable to employ digital systems and techniques for shading vector objects as described herein;
[0011] Figure 2 Depicted is a system in an example implementation showing operation of a shading module for shading vector objects;
[0012] Figure 3A 、 Figure 3B and Figure 3C An example representation of coloring a vector object is shown;
[0013] Figure 4 is a flowchart depicting a procedure in an example implementation in which a three-dimensional mesh is generated by dilating a two-dimensional mesh and color values are applied to the shaded mesh based on positions of vertices of the three-dimensional mesh;
[0014] Figure 5 An example representation of a clipping path for refining the boundaries of a shading mesh of a set of multiple objects is shown;
[0015] Figure 6 An example representation of a user interface for modifying parameters for shading a vector object is shown;
[0016] Figure 7A and Figure 7B shows example representations of input objects and shaded objects; and
[0017] Figure 8 An example system is shown that includes an example computing device that is representative of one or more computing systems and / or devices for implementing the various techniques described herein. DETAILED DESCRIPTION
[0018] Overview
[0019] Vector graphics have several advantages over raster graphics, including resolution independence and compact representation in the form of points, lines, curves, colors, and / or thicknesses. Due to these advantages, vector objects are often included as part of digital content in scenarios where it is desirable to use lighting and shading to enhance the visual appearance of vector objects. Conventional systems for automatically shading vector objects generate the lighting and shading appearance by converting the vector objects into raster objects and generating a rendered raster object. These rendered raster objects no longer possess desirable vector-based properties, such as compact representation and resolution independence.
[0020] To overcome the limitations of conventional systems, systems and techniques are described for coloring vector objects, for example, automatically and without user intervention. In one example, a computing device implements a coloring system to receive input data describing a vector-based object. The coloring system processes the input data and detects points along the boundary of the vector-based object. For example, the coloring system forms a two-dimensional grid based on the detected points.
[0021] In one example, the shading system triangulates the interior of the geometry of the vector-based object using the detected points and forms the two-dimensional mesh into a triangular mesh. In another example, the shading system smoothes the two-dimensional mesh to minimize the Laplacian energy using biharmonic equations subject to the condition that the values of the boundary vertices of the two-dimensional mesh remain the same in the smoothed two-dimensional mesh. The shading system generates a three-dimensional mesh by dilating the two-dimensional mesh based on the geometry of the vector-based object.
[0022] For example, the shading system computes a height field that includes the z value of each vertex of a two-dimensional mesh. In one example, the shading system ensures that the z value varies across the vertices of the two-dimensional mesh to facilitate barycentric interpolation. The two-dimensional mesh is inflated using this height field to generate a three-dimensional mesh.
[0023] A 3D mesh can be used to generate visual features, such as lighting features and shading features. For example, a shading system simulates a light source as part of an illumination model (such as a Lambertian model) and uses this light source to project simulated light onto the 3D mesh. By utilizing the illumination model in this way, the shading system determines color values based on the positions of the vertices of the 3D mesh. In one example, these color values correspond to the lighting features and shading features.
[0024] The shading system applies the color value to the shading mesh and generates a shaded vector-based object by blending (e.g., by multiply blending) the vector-based object and the shading mesh to which the color value is applied. In one example, the shading mesh is a free-form Gouraud-shaded triangle mesh. For example, the shading system refines the boundaries of the shading mesh using the geometry of the vector-based object as a clipping path. In this example, the boundaries of the shading mesh are smoothed based on the refinement, and the shading system blends the vector-based object and the shading mesh to generate the shaded vector-based object.
[0025] In one example, as part of generating a shaded vector-based object, the shading system utilizes a transparency group. In this example, the shading system adds the vector-based object and the shaded mesh to the transparency group. The shading system also transfers the original transparency properties (e.g., opacity and blending mode) of the vector-based object to the transparency group. By including the original transparency properties in the transparency group in this way, the shading system ensures that compositing of the vector-based object can occur as it would without the addition of shading.
[0026] For example, the shading system generates shaded vector-based objects using transparency groups. The shaded vector-based objects retain properties of vector objects, including compact representation and resolution independence. In an example where the input data describes a plurality of vector-based objects arranged in a z-order, the shading system generates a shading mesh for each of the plurality of vector-based objects and applies shading to the objects in reverse z-order.
[0027] The described system improves digital content creation by generating realistic shading effects and automatically applying these visual characteristics to vector objects as shaded vector objects. This is not possible with conventional systems for generating lighting and shading effects by converting vector objects into raster objects that are no longer resolution-independent. The described system can also generate customized shading for vector objects, such as based on user input specifying different colors of light, ambient light intensity, and / or diffuse light intensity.
[0028] For example, the amount by which a two-dimensional mesh is expanded to generate a three-dimensional mesh is also customizable. The described system is also not limited to generating three-dimensional representations by expanding a two-dimensional mesh. Rather, the described system is capable of generating shaded vector objects using any normal map that can be used to map a two-dimensional input to a three-dimensional representation. Because the shaded vector-based objects generated by the described system are compatible with PDF, these shaded vector objects can be used in digital and print workflows in either RGB or CMYK color spaces, which is not possible with conventional systems.
[0029] In the following discussion, an example environment is first described that employs examples of the techniques described herein. Example procedures that can be performed in the example environment as well as other environments are also described. Therefore, execution of the example procedures is not limited to the example environment, and the example environment is not limited to execution of the example procedures.
[0030] Sample Environment
[0031] Figure 1 1 is a diagram of an environment 100 in an example implementation that is operable to employ digital systems and techniques as described herein. The illustrated environment 100 includes a computing device 102 connected to a network 104. The computing device 102 can be configured as a desktop computer, a laptop computer, a mobile device (e.g., assuming a handheld configuration such as a tablet or mobile phone), etc. Thus, the computing device 102 can range from a full-resource device with large amounts of memory and processor resources (e.g., a personal computer, a game console) to a low-resource device with limited memory and / or processing resources (e.g., a mobile device). In some examples, the computing device 102 represents multiple different devices, such as multiple servers for performing operations "through the cloud."
[0032] The illustrated environment 100 also includes a display device 106 communicatively coupled to the computing device 102 via a wired or wireless connection. A variety of device configurations may be used to implement the computing device 102 and / or the display device 106. The computing device 102 includes a storage device 108 and a rendering module 110. The storage device 108 is shown as including digital content 112.
[0033] The coloring module 110 is shown as having, receiving, and / or transmitting input data 114 describing a vector-based object, and a vector-based object 116 is shown as being included in the input data 114. As shown, the vector-based object 116 depicts a zebra with exaggerated and stylized features. Some parts of the zebra appear disconnected from other parts of the zebra. For example, the zebra's legs and tail do not appear to be structurally connected to the zebra's body. This distracts viewers of the vector-based object 116. As a result, the zebra is not visually pleasing.
[0034] The computing device 102 implements a shading module 110 to receive input data 114. The shading module 110 processes the input data 114 and identifies a boundary of a vector-based object 116. For example, the shading module 110 discretizes the boundary and samples points along the boundary that the shading module 110 uses to generate a two-dimensional mesh. In one example, the shading module 110 uses the sampled points to triangulate the interior of the geometric shape of the vector-based object 116.
[0035] The shading module 110 generates a three-dimensional mesh by dilating the two-dimensional mesh (e.g., using harmonic dilation based on the geometry of the vector-based object 116). The three-dimensional mesh can be used to determine color values based on an illumination model (such as a Lambert model). The shading module 110 determines these color values based on the positions of the vertices of the three-dimensional mesh and applies the color values to the two-dimensional shading mesh. For example, the shading module 110 uses the geometry of the vector-based object 116 as a clipping path to refine the boundaries of the shading mesh.
[0036] The shading module 110 composites the vector-based object 116 with the shading mesh (e.g., using a multiplicative blending operation) to generate a shaded vector-based object 118, which is drawn in the user interface 120 of the display device 106. The vector-based object 116 is also drawn in the user interface 120. As shown, the shaded vector-based object 118 is significantly more aesthetically pleasing than the vector-based object 116. Portions of the zebra that appeared disconnected from the zebra's body in the vector-based object 116 appear fully connected in the shaded vector-based object 118.
[0037] The rendered vector-based object 118 also retains all the properties of the vector object and is resolution-independent. For example, in this example, the shading module 110 receives a vector object as input and generates a rendered vector object as output without converting the vector object to a raster object. In another example, the shading module 110 receives a raster object as input and generates a rendered raster object as output. Thus, the shading module 110 is capable of receiving an input object and generating a rendered object regardless of whether the input object is a vector object (e.g., defined by points, lines, and curves) or a raster object (e.g., defined by an array of pixels).
[0038] Figure 2 Depicted is a system 200 in an example implementation illustrating the operation of a shading module 110. The shading module 110 is shown as including a two-dimensional mesh module 202, a dilation module 204, an illumination module 206, a shading mesh module 208, and a blending module 210. The shading module 110 receives input data 114 describing a vector-based object, such as the vector-based object 116. The two-dimensional mesh module 202 receives and processes the input data 114 and generates two-dimensional mesh data 212.
[0039] Figure 3A 、 Figure 3B and Figure 3C An example representation of coloring a vector object is shown. Figure 3A A generated representation 300 of a three-dimensional mesh is shown. Figure 3B A representation 302 is shown including a vector-based object and a shaded mesh in a transparency group. Figure 3CA representation 304 of a shaded vector-based object is shown generated by blending the vector-based object and a shaded mesh.
[0040] refer to Figure 3A , the two-dimensional mesh module 202 receives input data 114 describing a vector-based object 306. As shown in representation 300, the vector-based object 306 is a cardioid-shaped vector object. The two-dimensional mesh module 202 processes the input data 114 to identify a boundary of the vector-based object 306, such as a boundary of the cardioid-shaped vector object. For example, the two-dimensional mesh module 202 identifies and discretizes the boundary of the vector-based object 306, which is shown in representation 300 as a sampling boundary 308 including points 310. In one example, the two-dimensional mesh module 202 detects points 310 along the boundary of the vector-based object 306.
[0041] The two-dimensional mesh module 202 forms a two-dimensional mesh based on the points 310. To this end, in one example, the two-dimensional mesh module 202 samples the points 310 and uses the points 310 to triangulate the interior of the geometry of the vector-based object 306. For example, as part of forming the two-dimensional mesh, the two-dimensional mesh module 202 uses the points 310 to perform a Delaunay triangulation to triangulate the geometry of the vector-based object 306. In this example, the two-dimensional mesh module 202 generates the two-dimensional mesh as a triangular mesh and constrains the minimum angle of the triangles of the triangular mesh so that no triangle has an angle less than the minimum angle. In one example, the two-dimensional mesh module 202 constrains the minimum angle to approximately 15 degrees to ensure the quality of the triangular mesh. In other examples, the two-dimensional mesh module 202 constrains the minimum angle to be less than 15 degrees or greater than 15 degrees.
[0042] The two-dimensional mesh module 202 also ensures spatial smoothness in the triangulated domain Ω. To this end, the two-dimensional mesh module 202 minimizes the Laplacian energy by solving the biharmonic equation under the condition that the values of the boundary vertices remain the same. In one example, this can be expressed as:
[0043] Δ 2 (X, Y) i =0
[0044] Where: x i ,y i represents the position of the i-th vertex of the triangle mesh in the domain Ω, and the values of the vertices on the boundary of this mesh δΩ are the same as those in the input curve and are used as boundary conditions for this solution.
[0045] The two-dimensional grid module 202 generates two-dimensional grid data 212 that describes a spatially smooth two-dimensional grid. Figure 2As shown, the expansion module 204 receives two-dimensional mesh data 212 and processes the two-dimensional mesh data 212 to generate three-dimensional mesh data 214. For example, the expansion module 204 expands the two-dimensional mesh by calculating the height field or z value of each vertex in the two-dimensional mesh. In one example, the expansion module 204 calculates the height field by solving the Laplace operator equation that obeys Dirichlet boundary conditions. In one example, this can be expressed as:
[0046] ΔZ(X, Y) i =f
[0047] Obey Z|δΩ=0
[0048] Where: f corresponds to the dilation magnitude and is normalized using the XY extent of the two-dimensional triangle mesh, and if the input data 114 describes a user-specified dilation parameter, then that parameter is multiplied by that value to calculate the specified dilation.
[0049] In one example, the dilation module 204 iteratively performs the solution by subdividing the triangles of the two-dimensional mesh. In this way, the dilation module 204 ensures that the variation of the z-values of the vertices across any triangle of the mesh is within a reasonable threshold. For example, such variation facilitates approximation by interpolation of the centroids of all interior points. Figure 3A As shown, the dilation module 204 uses the height field to dilate the two-dimensional mesh and generate a three-dimensional mesh 312. The dilation module 204 generates three-dimensional mesh data 214 that describes the three-dimensional mesh 312.
[0050] Illumination module 206 receives three-dimensional mesh data 214 and processes it to generate color value data 216. For example, illumination module 206 generates color value data 216 using a light model, such as the Lambert model. In examples where illumination module 202 utilizes the Lambert model, light from a light source strikes a point on an object and reflects from the object. If the light reflects in all directions after striking the object, the light is considered diffuse light, and the amount of reflected light is determined by the angle between the light and the surface normal vector extending from that point. The intensity of diffuse light can be expressed as:
[0051]
[0052] in: is the light diffusion intensity; L refers to the direction of the light; N refers to the surface normal at that point; K d is the diffuse reflection constant, which determines the reflectivity of the surface and is equal to 1 in one example.
[0053] The lighting module 206 uses the light diffusion intensity To determine the final color, it can be expressed as:
[0054]
[0055] Where: C L is the color of light; C S is the surface color; C R is the final color.
[0056] The lighting module 206 processes the three-dimensional mesh data 214 and calculates the normal direction at each vertex of the three-dimensional mesh. In the example where the light source is orthogonal to the plane containing the geometric shape of the vector-based object 306, the lighting module 206 multiplies the unit normal vector at each vertex of the three-dimensional mesh by the light color (white by default, but user-customizable). The lighting module 206 generates color value data 216 that describes the unit vector at each vertex of the three-dimensional mesh multiplied by the light color.
[0057] The shading grid module 208 receives the color value data 216 and the input data 114 and processes the color value data 216 and / or the input data 114 to generate the shading grid data 218. For example, the shading grid module 208 processes the color value data 216 and generates the following: Figure 3B The shading mesh 314 is shown. To this end, in one example, the shading mesh module 208 represents the color value data 216 as a free-form Gouraud-shaded triangle mesh.
[0058] In one example, the shading mesh module 208 processes the input data 114 and uses the geometry of the vector-based object 306 as a clipping path to refine the boundary of the shading mesh 314. In this example, the shading mesh 314 is not smooth before this refinement because the two-dimensional mesh module 202 discretizes the boundary of the vector-based object 306 into sampling boundaries 308 to form a two-dimensional mesh. By using the geometry of the vector-based object 306 as a clipping path, the shading mesh module 208 smoothes the boundary of the shading mesh 314 so that the boundary is continuous after the points 310 are removed by the clipping path.
[0059] The shading grid module 208 uses a multiplication blending operation in a pre-multiplied color space and uses the color C r As surface color C S To generate the final color C R For example, the multiplication blending equation in premultiplied color space can be defined as:
[0060] C r =(1.0-α b )*C s +(1.0-α s )*C b +C s *Cb Where: C s is the source color; α s is the source alpha; C b is the background color; α b is the background alpha.
[0061] The shading mesh module 208 generates shading mesh data 218 that describes the shading mesh 314. For example, the shading mesh module 208 generates shading mesh data 218 that describes the shading mesh 314 having a refined boundary. The blending module 210 receives the shading mesh data 218 and the input data 114, and the blending module 210 processes the shading mesh data 218 and the input data 114 and adds the vector-based object 306 and the shading mesh 314 to the transparency group 316.
[0062] like Figure 3B As shown, the blending module 210 composites the vector-based object 306 and the shaded mesh 314 using the transparency group 316. For example, the blending module 210 transfers the original transparency properties (e.g., opacity and blending mode) of the vector-based object 306 to the transparency group 316 and resets the alpha of the vector-based object 306 to 1. The blending module 210 also sets the blending mode to multiply the blending applied to the vector-based object 306. As a result, the vector-based object 306 and the shaded mesh 314 both have alpha set to 1 in the transparency group 316.
[0063] In one example, the blending module 210 is implemented to composite the vector-based object 306 and the shaded mesh 314. In this example, because α s and α b are all equal to 1 (because the blending module 210 applies a multiplication blending mode to the vector-based object 306), so this operation is simplified to produce the output color C R Additionally, by transferring the original transparency attribute from the vector-based object 306 to the transparency group 316, the blending module 210 ensures that further compositing occurs in the same manner as would occur if no shading effect were applied.
[0064] Figure 3CThe representation 304 depicted in FIG shows that the blending module 210 uses the transparency group 314 to generate a shaded vector-based object 318 by combining the vector-based object 306 and the shaded mesh 314. As shown, the shaded vector-based object 318 includes all the properties of a vector object, including resolution independence. For example, unlike raster-based objects, which are represented as arrays of pixels, the shaded vector-based object 318 is represented as points, lines, and / or curves and is scalable without aliasing. In this example, the shaded vector-based object 318 is visible in any PDF rendering application, making the shaded vector-based object 318 useful in both digital and print workflows.
[0065] In an example where the shading module 110 is implemented to generate a plurality of shaded vector-based objects from a group comprising a plurality of objects arranged in a z-order, the shading module 110 traverses the group in reverse z-order (e.g., from bottom to top). The shading module 110 generates a shading mesh for each object in the group as described above and adds each object and the corresponding shading mesh to a new group (e.g., a subgroup of the transparency group or a new transparency group). The shading module 110 then applies a multiply blending mode to the objects in the new group. The shading module 110 repeats this process for each object in the plurality of objects.
[0066] The shading module 110 can receive a vector object as input and generate a shaded vector object as output without any additional user input or manual annotation. Although not required, the shading module 110 can also receive user input to customize parameters used to generate the shaded vector object, such as the dilation magnitude, the intensity of the ambient and diffuse components of the light, and the color of the light. For example, the dilated three-dimensional surface used to generate the shaded mesh can also be used to perform other three-dimensional operations, such as texture mapping of the vector object.
[0067] Consider an example where the input data 114 describes a raster-based object rather than a vector-based object as previously described. In this example, the shading module 110 converts the raster-based object into a two-color bitmap and calculates the Laplacian dilation of all pixels within the raster-based object. The shading module 110 utilizes the pixel grid as a two-dimensional matrix for calculating the Laplacian matrix and the dual Laplacian matrix. The shading module 110 generates a shading construct, which is a grayscale raster-based object. The shading module 110 then uses the multiplication blending mode described above to combine the raster-based object and the shading construct to generate a shaded raster-based object.
[0068] In some examples, the shading module 110 is not limited to generating a shaded object by dilating a two-dimensional grid or utilizing a pixel grid as a two-dimensional matrix. In these examples, the shading module 110 is capable of using any normal map that can be used to represent a two-dimensional input object in three dimensions to generate a shaded object. For example, the input data 114 describes other normal maps, such as a normal map specified by user input for projecting a two-dimensional input into a three-dimensional representation. In one example, the shading module 110 uses a z value available in a blue channel (e.g., a blue RGB channel), which is converted to a grayscale shaded raster. The grayscale shaded raster is then composited with the input object to generate the shaded object.
[0069] In general, the functions, features, and concepts described with respect to the above and following examples are employed in the context of the example processes described in this section. In addition, the functions, features, and concepts described with respect to the different figures and examples in this document are interchangeable with each other and are not limited to implementation in the context of a particular figure or process. In addition, the blocks associated with the different representative processes and corresponding figures herein can be applied individually, together, and / or in combination in different ways. Therefore, the individual functions, features, and concepts described in relation to the different example environments, devices, components, figures, and processes herein can be used in any suitable combination and are not limited to the specific combinations represented by the examples listed in this specification.
[0070] Example Process
[0071] The following discussion describes techniques that can be implemented using the previously described systems and devices. Aspects of each process can be implemented in hardware, firmware, software, or a combination thereof. These processes are shown as a set of blocks that specify operations performed by one or more devices and are not necessarily limited to the order shown for performing the operations by the respective blocks. In portions of the following discussion, reference is made to Figure 1 To Figure 3. Figure 4 is a flow chart depicting a procedure 400 in an example implementation in which a three-dimensional mesh is generated by dilating a two-dimensional mesh and color values are applied to the shaded mesh based on positions of vertices of the three-dimensional mesh.
[0072] Points are detected along a boundary of a vector-based object (block 402). For example, computing device 102 implements shading module 110 to detect points along a boundary of a vector-based object. In another example, shading module 110 samples points along the boundary of the vector-based object. A two-dimensional grid is formed based on the detected points (block 404). In one example, shading module 110 forms a two-dimensional grid based on the detected points.
[0073] The geometry of the vector-based object is determined (block 406). In some examples, the shading module 110 determines the geometry of the vector-based object. A three-dimensional mesh is generated by dilating the two-dimensional mesh based on the geometry of the vector-based object (block 408). For example, the computing device 102 implements the shading module 110 to generate the three-dimensional mesh. Color values are applied to the shaded mesh based on the positions of the vertices of the three-dimensional mesh (block 410). In one example, the shading module 110 applies the color values to the shaded mesh.
[0074] Figure 5 An example representation 500 of a clipping path used to refine the boundaries of a shading mesh for a group of multiple objects is shown. Representation 500 includes a first object 502 and a second object 504 in the group of objects. As shown, first object 502 is an ellipse and second object 504 is a rounded rectangle. First object 502 is a foreground object relative to second object 504. Therefore, second object 504 is a background object relative to first object 502.
[0075] Representation 500 also includes a clipping group workflow 506, which is shown as including a first clipping group 508 and a second clipping group 510. As shown, first clipping group 508 corresponds to first object 502 and second clipping group 510 corresponds to second object 504. First clipping group 508 is depicted as including a clipping path 512, which is the outline or boundary of first object 502. First clipping group 508 is also depicted as including a shading mesh 514, which is generated based on a dilated two-dimensional mesh formed using points sampled along the boundary of first object 502.
[0076] The second clipping group 510 includes a clipping path 516 and a shading mesh 518 generated based on the second object 504. For example, the shading module 110 samples points along the boundary of the second object 504 and uses these points to form a two-dimensional mesh by triangulating the interior of the boundary. In one example, the shading module 110 expands the two-dimensional mesh into a three-dimensional mesh that the shading module 110 can use to generate the shading mesh 518. In another example, the shading module 110 refines the boundary of the shading mesh 518 by applying the geometry of the second object 504 as the clipping path 516 to smooth the boundary of the shading mesh 518.
[0077] Figure 6An example representation 600 of a user interface 602 for modifying parameters for coloring a vector object is shown. The user interface 602 includes user interface elements 604 through 610. For example, a user interacts with an input device such as a mouse or stylus (e.g., with respect to the user interface 120 of the display device 106), and an indication of the user interaction is included in the input data 114. If the input data 114 describes a user interaction with the first user interface element 604, the computing device 102 implements the coloring module 110 to modify the parameters for coloring a vector object by adjusting the parameters for coloring the vector object. Figure 2 Increasing the heightfield generally increases the z-value of vertices, while decreasing the heightfield generally decreases the z-value.
[0078] If input data 114 describes a user interaction with second user interface element 606, tinting module 110 adjusts the ambient intensity of the light used to generate color value data 216. In the example where input data 114 describes a user interaction with third user interface element 608, tinting module 110 processes input data 114 and adjusts the diffuse intensity of the light used to determine the color value described by color value data 216. Finally, if input data 114 describes a user interaction with fourth user interface element 610, tinting module 110 modifies the color of the light used to generate color value data 216 (which defaults to white).
[0079] Figure 7A and Figure 7B Example representations 700, 702 of input objects and rendered objects are shown. Figure 7A As shown, representation 700 includes an input object 704 and a rendered object 706. In one example, input object 704 is a vector object and rendered object 706 is also a vector object. In another example, input object 704 is a raster object and rendered object 706 is also a raster object. For example, rendering module 110 receives input data 114 describing input object 704 as a home or building, and rendering module 110 generates rendered object 706. Rendered object 706 has an improved visual appearance compared to input object 704.
[0080] Representation 700 also includes an input object 708 depicting a speech bubble or balloon and a rendered object 710 that is more aesthetically pleasing than input object 708. Finally, representation 700 includes input object 712, which is a group of balloons, and rendered object 714. For example, rendering module 110 receives input data 114 describing input object 712 and rendering module 110 generates rendered object 714.
[0081] like Figure 7BAs shown, representation 702 includes input object 716, which is a teddy bear, and rendered object 718, which is a rendered teddy bear. As shown, rendered object 718 has an improved visual appearance relative to input object 716. Rendering module 110 receives input data 114 describing input object 716, which is a vector object or a raster object, and Rendering module 110 generates rendered object 718, which is a vector object or a raster object.
[0082] Representation 720 also includes input object 724 depicting a lion and rendered object 722 depicting a rendered lion. Input object 724 depicts a landscape, and rendered object 726 depicts a landscape with an improved visual appearance. For example, rendering module 110 receives input data 114 describing input object 724 and render module 110 processes input data 114 to generate rendered object 726.
[0083] Example systems and devices
[0084] Figure 8 An example system 800 is shown that includes an example computing device that is representative of one or more computing systems and / or devices that may be used to implement the various techniques described herein. This is illustrated by the inclusion of a shading module 110. Computing device 802 includes, for example, a server of a service provider, a device associated with a client (e.g., a client device), a system on a chip, and / or any other suitable computing device or computing system.
[0085] The illustrated example computing device 802 includes a processing system 804, one or more computer-readable media 806, and one or more I / O interfaces 808, all of which are communicatively coupled to one another. Although not shown, the computing device 802 also includes a system bus or other data and command transmission system that couples the various components to one another. For example, the system bus includes any one or combination of different bus structures, such as a memory bus or memory controller, a peripheral bus, a universal serial bus, and / or a processor or local bus utilizing any one of a variety of bus architectures. Various other examples are also contemplated, such as control lines and data lines.
[0086] Processing system 804 represents the functionality of performing one or more operations using hardware. Thus, processing system 804 is shown as including hardware elements 810 configured as processors, functional blocks, and the like. This includes example implementations in hardware as application specific integrated circuits or other logic devices formed using one or more semiconductors. Hardware elements 810 are not limited by the materials from which they are formed or the processing mechanisms employed therein. For example, a processor may be comprised of (a plurality of) semiconductors and / or transistors (e.g., electronic integrated circuits (ICs)). In such a context, processor-executable instructions are, for example, electronically executable instructions.
[0087] Computer-readable media 806 is shown as including memory / storage 812. Memory / storage 812 represents memory / storage capacity associated with one or more computer-readable media. In one example, memory / storage 812 includes volatile media (such as random access memory (RAM)) and / or non-volatile media (such as read-only memory (ROM), flash memory, optical disks, magnetic disks, etc.). In another example, memory / storage component 812 includes fixed media (e.g., RAM, ROM, fixed hard drive, etc.) and removable media (e.g., flash memory, removable hard drive, optical disks, etc.). Computer-readable media 806 can be configured in a variety of other ways as further described below.
[0088] Input / output interface(s) 808 represent functionality that allows a user to input commands and information to the computing device 802 and also allows information to be presented to the user and / or other components or devices using various input / output devices. Examples of input devices include a keyboard, a cursor control device (e.g., a mouse), a microphone, a scanner, touch functionality (e.g., a capacitive or other sensor configured to detect physical touch), a camera (e.g., using visible or invisible wavelengths (such as infrared frequencies) to recognize motion as gestures that do not involve touch), and the like. Examples of output devices include a display device (e.g., a monitor or projector), speakers, a printer, a network card, a tactile response device, and the like. Thus, the computing device 802 can be configured to support user interaction in a variety of ways, as further described below.
[0089] Various techniques are described herein in the general context of software, hardware elements, or program modules. Typically, such modules include routines, programs, objects, elements, components, data structures, etc. that perform specific tasks or implement specific abstract data types. As used herein, the terms "module," "function," and "component" generally refer to software, firmware, hardware, or a combination thereof. Features of the techniques described herein are platform-independent, meaning that these techniques are implementable on a variety of commercial computing platforms having a variety of processors.
[0090] An implementation of the described modules and techniques may be stored on or transmitted via some form of computer-readable media. For example, computer-readable media includes various media accessible by computing device 802. By way of example and not limitation, computer-readable media includes "computer-readable storage media" and "computer-readable signal media."
[0091] "Computer-readable storage media" refers to media and / or devices that enable persistent and / or non-transitory storage of information, as compared to simple signal transmission, carrier waves, or signals themselves. Therefore, computer-readable storage media refers to non-signal-bearing media. Computer-readable storage media include hardware such as volatile and non-volatile, removable and non-removable media, and / or storage devices implemented with methods or technologies suitable for storing information such as computer-readable instructions, data structures, program modules, logic elements / circuits, or other data. Examples of computer-readable storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other storage technology, CD-ROM, digital versatile disk (DVD) or other optical storage, hard disk, magnetic cassette, magnetic tape, disk storage or other magnetic storage devices, or other storage devices, tangible media, or articles of manufacture suitable for storing desired information and accessible by a computer.
[0092] "Computer-readable signal media" refers to signal-bearing media that is configured to transmit instructions to the hardware of computing device 802, such as via a network. Signal media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave, data signal, or other transport mechanism. Signal media also includes any information delivery media. The term "modulated data signal" refers to a signal that has one or more characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media, such as a wired network or direct-wired connection, and wireless media, such as acoustic, RF, infrared, and other wireless media.
[0093] As previously described, hardware elements 810 and computer-readable media 806 represent modules, programmable device logic, and / or fixed device logic implemented in hardware that, in some embodiments, can be used to implement at least some aspects of the technology described herein, such as executing one or more instructions. Hardware includes components of integrated circuits or systems on a chip, application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), complex programmable logic devices (CPLDs), and other implementations of silicon or other hardware. In this context, hardware serves as a processing device for executing program tasks defined by instructions and / or logic embodied by the hardware, and hardware for storing instructions for execution, such as the computer-readable storage media previously described.
[0094] Combinations of the foregoing may also be used to implement the various techniques described herein. Thus, software, hardware, or executable modules may be implemented as one or more instructions and / or logic embodied on some form of computer-readable storage medium and / or by one or more hardware elements 810. For example, computing device 802 is configured to implement specific instructions and / or functions corresponding to software and / or hardware modules. Thus, the implementation of a module executable by computing device 802 as software is at least partially implemented in hardware, such as by using computer-readable storage media and / or hardware elements 810 of processing system 804. Instructions and / or functions are executable / operable by one or more articles of manufacture (e.g., one or more computing devices 802 and / or processing systems 804) to implement the techniques, modules, and examples described herein.
[0095] The techniques described herein are supportable by various configurations of computing device 802 and are not limited to the specific examples of the techniques described herein. The functionality may also be implemented in whole or in part using a distributed system, such as through the "cloud" 814 described below.
[0096] Cloud 814 includes and / or represents a platform 816 for resources 818. Platform 816 abstracts the underlying functionality of the hardware (e.g., servers) and software resources of cloud 814. For example, resources 818 include applications and / or data used when performing computer processing on servers remote from computing device 802. In some examples, resources 818 also include services provided over the Internet and / or over a subscriber network (such as a cellular or Wi-Fi network).
[0097] Platform 816 abstracts resources 818 and is used to connect computing device 802 with other computing devices. In some examples, platform 816 is also used to abstract the scaling of resources to provide a corresponding level of scaling to the demand encountered on the resources implemented via the platform. Thus, in an interconnected device embodiment, the implementation of the functionality described herein can be distributed throughout system 800. For example, the functionality can be implemented partially on computing device 802 and via platform 816 that abstracts the functionality of cloud 814.
[0098] in conclusion
[0099] Although the implementation of a system for coloring vector objects has been described using language specific to structural features and / or methods, it should be understood that the appended claims are not necessarily limited to the specific features or methods described. Rather, the specific features and methods are disclosed as example implementations of a system for coloring vector objects, and other equivalent features and methods are intended to be within the scope of the appended claims. Furthermore, various different examples have been described, and it should be understood that each described example can be implemented independently or in combination with one or more other described examples.
Claims
1. A method implemented by a computing device in a digital media vector object rendering environment, the method comprising: detecting, by the computing device, points along a boundary of the vector-based object; forming, by the computing device, a two-dimensional grid based on the detected points; determining, by the computing device, a geometry of the vector-based object; generating, by the computing device, a three-dimensional mesh by dilating the two-dimensional mesh based on the geometric shape of the vector-based object and multiplying height values of vertices of the two-dimensional mesh by a dilation magnitude; as well as Color values are applied, by the computing device, to a shaded mesh based on positions of vertices of the three-dimensional mesh. 2 . The method of claim 1 , further comprising generating a shaded vector-based object for display in a user interface by blending the vector-based object and the shaded mesh. The method of claim 2 , wherein the rendered vector-based object is resolution independent. 4 . The method of claim 2 , wherein generating the shaded vector-based object comprises compositing the vector-based object and the shaded mesh using a multiplicative blending operation. The method of claim 1 , wherein the color value is determined using Lambert's cosine law. 6 . The method of claim 1 , further comprising refining a boundary of the shading mesh using the geometric shape of the vector-based object as a clipping path. 7 . The method of claim 1 , wherein generating the two-dimensional mesh comprises connecting the points of the boundary with line segments and performing conformal Delaunay triangulation to triangulate the geometric shape of the vector-based object.
8. The method of claim 1, further comprising receiving user input defining the magnitude of the expansion.
9. The method according to claim 1, further comprising: receiving user input defining at least one of a color of light, an ambient intensity of the light, or a diffuse intensity of the light; as well as The shading grid is generated based at least in part on the user input.
10. The method of claim 1, wherein the shaded mesh is a free-form Gouraud shaded triangle mesh.
11. A system in a digital media vector object rendering environment, comprising: A two-dimensional grid module, implemented at least in part in hardware of a computing device, to: Detecting points along the boundaries of vector-based objects; as well as forming a two-dimensional grid based on the detected points; an expansion module, implemented at least in part in the hardware of the computing device to: determining a geometry of the vector-based object; as well as generating a three-dimensional mesh by dilating the two-dimensional mesh based on the geometric shape of the vector-based object and multiplying height values of vertices of the two-dimensional mesh by a dilation magnitude; a lighting module implemented at least in part in the hardware of the computing device to determine color values based on positions of vertices of the three-dimensional mesh; as well as A shading mesh module is implemented at least in part in the hardware of the computing device to generate a shading mesh having the determined color values.
12. The system of claim 11, further comprising a blending module implemented at least in part in the hardware of the computing device to generate a shaded vector-based object by compositing the vector-based object and the shaded mesh using a multiplicative blending operation.
13. The system of claim 12, wherein the rendered vector-based object is resolution independent.
14. The system of claim 11, wherein the shading mesh module is further implemented to refine a boundary of the shading mesh using the geometric shape of the vector-based object as a clipping path.
15. The system of claim 11, further comprising a mixing module implemented at least in part in the hardware of the computing device to: generating a transparency group comprising transparency attributes of the vector-based object, the shaded mesh, and the vector-based object; and A shaded vector-based object is generated by compositing the transparency groups, the shaded vector-based object including the transparency attribute of the vector-based object.
16. One or more computer-readable storage media comprising instructions stored thereon, the instructions, in response to being executed by a computing device, causing the computing device to perform operations comprising: Detecting points along the boundaries of vector-based objects; forming a two-dimensional grid based on the detected points; generating a three-dimensional mesh by dilating the two-dimensional mesh based on a geometry of the vector-based object and multiplying height values of vertices of the two-dimensional mesh by a dilation magnitude; determining color values based on positions of vertices of the three-dimensional mesh; as well as A shaded mesh is generated using the determined color values.
17. The one or more computer-readable storage media of claim 16, wherein the operations further comprise generating a shaded vector-based object by compositing the vector-based object and the shaded mesh using a multiplicative blend operation.
18. The one or more computer-readable storage media of claim 16, wherein the operations further comprise: generating a transparency group comprising the vector-based object, the shaded mesh, and transparency attributes of the vector-based object; as well as A shaded vector-based object is generated by compositing the transparency groups, the shaded vector-based object including the transparency attribute of the vector-based object.
19. The one or more computer-readable storage media of claim 16, wherein the shaded mesh is a free-form Gouraud-shaded triangle mesh.
20. The one or more computer-readable storage media of claim 16, the operations further comprising refining a boundary of the shading mesh using the geometric shape of the vector-based object as a clipping path.
Citation Information
Patent Citations
System and Method for Scalable Rendering of Diffusion Curves
US20130127856A1
Diffusion coloring using weighted color points
US20190087980A1