Drawing program, drawing device, control method, and recording medium
The method generates textures with pre-placed elements for multiple length patterns, addressing computational inefficiencies and flickering in digital illustrations by ensuring seamless texture representation during line segment deformations.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- LIVE2D
- Filing Date
- 2023-01-13
- Publication Date
- 2026-06-25
AI Technical Summary
Existing methods for generating textures on deformed line segments in digital illustrations suffer from computational inefficiencies and flickering due to the need to determine placement positions, sizes, and transparencies of texture-forming elements as the line length changes, especially in animations.
A method that generates textures with pre-placed texture-forming elements for multiple length patterns, allowing seamless switching based on the deformation state of the reference line, reducing computational requirements by determining placement positions and sizes only once.
Ensures uniform texture representation and reduces computational load, preventing flickering during length changes, thus enhancing the viewing experience in animations.
Smart Images

Figure 0007880443000007 
Figure 0007880443000008 
Figure 0007880443000009
Abstract
Description
[Technical Field]
[0001] The present invention relates to a drawing program, a drawing apparatus, a drawing method, and a recording medium, and more particularly to a line segment drawing technique that includes texture representation. [Background technology]
[0002] One method of creating electronic illustrations using information processing devices such as tablets (digital illustration or computer illustration). Digital illustration applications are configured to allow various textures to be applied to line segments (reference lines or outlines) input by pointing devices such as styluses or mice, in order to achieve drawing expressions similar to those of hand-drawn illustrations. Such textures include, for example, expressions that mimic brushstrokes, similar to those created with writing instruments such as pencils or paintbrushes.
[0003] In vector-based digital illustrations, the texture of a line segment representing a brush stroke is achieved by placing a number of texture-forming elements (unit elements for forming texture, which have a unique image pattern corresponding to the texture to be expressed; so-called sprites) relative to the length of the reference line. In other words, a line segment representing a brush stroke was represented by multiple layers of texture-forming elements with image patterns defined for the brush in question, arranged according to the shape and length of the line segment.
[0004] However, texture representation using this method may not be suitable for applications such as generating animations by deforming 2D images related to the created illustration. More specifically, in methods where texture-forming elements are placed according to the shape and length of the deformed line segment, the continuity of the placement pattern between the texture-forming elements placed for the line segment before deformation cannot be guaranteed, and a uniform representation may not be achieved. For example, when a reference line changes (stretches) as shown in Figures 14A to 14D, if texture-forming elements are placed according to the length, changes in placement density and flickering may occur during the transition of that change, as shown in Figures 15A to 15D. As a result, animations that connect 2D images before and after deformation may exhibit representations that hinder stable viewing.
[0005] Patent Document 1 discloses a line segment drawing method that ensures uniform texture representation even when the reference line is deformed. [Prior art documents] [Patent Documents]
[0006] [Patent Document 1] Patent No. 6663066 [Overview of the Initiative] [Problems that the invention aims to solve]
[0007] However, in the drawing method described in Patent Document 1, the placement position of texture-forming elements is determined according to the length of the reference line, the size and transparency of the texture-forming elements are set, and the texture-forming elements are placed on the reference line for drawing. As a result, the amount of computation increases as the length of the reference line increases. In other words, when generating animation while deforming a 2D image in real time, the amount of computation can become excessive, potentially causing processing delays and hindering a satisfactory viewing experience.
[0008] The present invention has been made in view of the above-mentioned problems, and aims to provide a drawing program, drawing apparatus, drawing method, and recording medium that generate textures that form a desired texture expression and can be seamlessly switched in response to changes in length. [Means for solving the problem]
[0009] To achieve the aforementioned objectives, the drawing program of the present invention causes a computer that outputs a texture of a predetermined width, which is placed in a region corresponding to the line segment to form a texture representation of the line segment, and which has multiple types of output lengths that are selectively placed according to the length of the line segment, to execute the following: an acquisition process for a reference texture of a predetermined width having a reference length, which is placed in a reference texture that forms a texture representation of the line segment; a first determination process for determining multiple types of output lengths that indicate the length of the texture to be generated, which are different from the reference length; a second determination process for determining the placement position of the texture-forming elements in each type of texture having the output length based on the distribution information acquired in the acquisition process; and a generation process for generating and outputting the predetermined width texture having multiple types of output lengths by placing the texture-forming elements at the placement positions determined in the second determination process. [Effects of the Invention]
[0010] With this configuration, according to the present invention, it is possible to generate textures that form a desired texture expression and can be seamlessly switched in response to changes in length.
[0011] Other features and advantages of the present invention will become apparent from the following description with reference to the accompanying drawings. In the accompanying drawings, the same or similar components are given the same reference numeral. [Brief explanation of the drawing]
[0012] The accompanying drawings are included in the specification, form a part thereof, show embodiments of the present invention, and are used to explain the principle of the present invention together with the description. [Figure 1] Block diagram illustrating the hardware configuration of PC100 according to embodiments and variations of the present invention [Figure 2A] Diagram for explaining the drawing of line segments with texture-based texture expression [Figure 2B] Diagram for explaining the drawing of line segments with texture-based texture expression [Figure 3] Diagram illustrating texture formation elements (particles) [Figure 4] Diagram for explaining the distribution pattern of particles of a reference texture according to embodiments and variations of the present invention [Figure 5] Diagram illustrating a reference texture and a connected texture according to embodiments and variations of the present invention [Figure 6A] Diagram for explaining a reference texture according to embodiments and variations of the present invention [Figure 6B] Diagram for explaining a connected texture according to embodiments and variations of the present invention [Figure 7A] Diagram for explaining the association of particles according to embodiments and variations of the present invention [Figure 7B] Another diagram for explaining the association of particles according to embodiments and variations of the present invention [Figure 7C] Yet another diagram for explaining the association of particles according to embodiments and variations of the present invention [Figure 7D] Diagram illustrating particles of the first classification according to embodiments and variations of the present invention [Figure 7E] Diagram illustrating the first particles of the second classification according to embodiments and variations of the present invention [Figure 7F] Diagram illustrating the second particles of the second classification according to embodiments and variations of the present invention [Figure 8] Diagram for explaining the arrangement frequency of particles of an extended intermediate texture according to embodiments and variations of the present invention [Figure 9A]Figure illustrating a shortened intermediate texture relating to embodiments and modified versions of the present invention. [Figure 9B] Figure illustrating a shortened intermediate texture relating to embodiments and modified versions of the present invention. [Figure 9C] Figure illustrating a shortened intermediate texture according to embodiments and modified examples of the present invention. [Figure 10] Figure illustrating the particle arrangement frequency of shortened intermediate texture according to embodiments and modifications of the present invention. [Figure 11] Another figure illustrating a shortened intermediate texture according to embodiments and modifications of the present invention. [Figure 12] A flowchart illustrating the generation process for generating line segment drawing textures, which is performed in PC100 according to embodiments and modifications of the present invention. [Figure 13] A flowchart illustrating a drawing process that draws line segments using a line segment drawing texture, which is performed in PC100 according to embodiments and modifications of the present invention. [Figure 14A] A diagram illustrating the drawing of line segments with texture representation using conventional techniques. [Figure 14B] A diagram illustrating the drawing of line segments with texture representation using conventional techniques. [Figure 14C] A diagram illustrating the drawing of line segments with texture representation using conventional techniques. [Figure 14D] A diagram illustrating the drawing of line segments with texture representation using conventional techniques. [Figure 15A] A diagram illustrating the change in appearance when drawing line segments with texture representation using conventional technology. [Figure 15B] A diagram illustrating the change in appearance when drawing line segments with texture representation using conventional technology. [Figure 15C] A diagram illustrating the change in appearance when drawing line segments with texture representation using conventional technology. [Figure 15D] A diagram illustrating the change in appearance when drawing line segments with texture representation using conventional technology. [Modes for carrying out the invention]
[0013] [Embodiment] The embodiments will be described in detail below with reference to the attached drawings. Note that the following embodiments do not limit the invention as defined in the claims, and not all combinations of features described in the embodiments are essential to the invention. Two or more of the features described in the embodiments may be combined in any way. Furthermore, identical or similar configurations will be given the same reference numeral, and redundant descriptions will be omitted.
[0014] One embodiment described below illustrates an example of applying the present invention to a PC, which is an example of a drawing device capable of generating textures that represent texture and drawing line segments with texture representation using said textures. However, the present invention is applicable to any device capable of generating textures that represent texture or drawing line segments with texture representation using said textures.
[0015] 《PC100 Configuration》 Figure 1 is a block diagram showing the hardware configuration of PC100 according to an embodiment of the present invention.
[0016] The control unit 101 is a control device such as a CPU, and controls the operation of each block in the PC 100. Specifically, the control unit 101 reads programs related to the operating system stored in the storage device 102, programs related to illustration editing applications including drawing line segments with texture representation, and other such programs, expands them into memory 103, and executes them to control the operation of each block.
[0017] The storage device 102 is, for example, a non-volatile memory such as a rewritable ROM, or an information storage device such as an HDD that is detachably connected to the PC 100. The storage device 102 may also include a recording medium such as a disk that stores a program having functions provided by an illustration editing application, which can be accessed via a predetermined read / write interface such as an optical drive. The storage device 102 stores not only the program described above, but also information such as parameters necessary for the operation of each block, and various data used for presenting drawing objects.
[0018] Memory 103 is a volatile memory such as RAM. Memory 103 is used not only as an expansion area for expanding programs read from storage device 102, but also as a storage area for storing intermediate data output during the operation of each block. Alternatively, memory 103 can also be used as an area for storing intermediate calculation results or calculation results during the execution of arbitrary processing.
[0019] The drawing unit 104 is a drawing device such as a GPU. The drawing unit 104 generates a screen (image) that is displayed in the display area of the display unit 110. In this embodiment, the drawing unit 104 generates a screen to be displayed on the display unit 110 by drawing an object that is unfolded on a two-dimensional plane, has a variable length, and includes line segments (straight and curved lines) with texture representation. The screen generated by the drawing unit 104 in relation to the illustration editing application is controlled (display updated) by the display control unit 105 to be displayed on the display unit 110.
[0020] The display unit 110 may be a display device such as an LCD. In this embodiment, the display unit 110 is described as a component of the PC 100, but the implementation of the present invention is not limited to this. The display unit 110 does not need to have the same housing configuration as the PC 100, and may be an external display device that is detachably connected to the PC 100.
[0021] The operation input unit 106 is a user interface of the PC 100, such as a mouse, keyboard, pen tablet, or game controller. When the operation input unit 106 detects an operation input made to any of these interfaces, it outputs a control signal corresponding to that operation input to the control unit 101. Alternatively, the operation input unit 106 notifies the control unit 101 of the occurrence of an event corresponding to that operation input.
[0022] Drawing line segments with texture representation The following describes a method for drawing line segments with texture representations such as brush strokes in the illustration editing application of this embodiment.
[0023] As described above, in conventional illustration editing applications, texture representation was formed by arranging multiple texture-forming elements along a reference line that defines the shape of a line segment. For example, the texture representation of a brush is formed by arranging texture-forming elements, which are provided in accordance with the frequency of placement of texture-forming elements per unit length determined according to the density of the "paint" of the brush, within a two-dimensional area defined by the line width set for the brush and the reference line. That is, the longer the reference line, the larger the size of the two-dimensional area becomes, and the more texture-forming elements are placed in the area. Furthermore, in the method described in Patent Document 1, in order to avoid flickering of the appearance due to deformation of the reference line, the placement position, size, and transparency of each texture-forming element are sequentially determined, and the longer the reference line, the more computational work required to draw the line segment.
[0024] In the PC100 of this embodiment, a method is employed in which textures (raster images) with texture-forming elements pre-placed for a predetermined texture expression are generated for multiple length patterns, and textures of the corresponding length are placed on the reference line according to the deformation state of the reference line (especially the length in the longitudinal direction) to draw line segments. That is, since the texture-forming elements are already placed on the texture, when drawing line segments, it is not necessary to determine the placement position, size, and transparency of each texture-forming element according to the state of the reference line, thus reducing the amount of computation required for line segment drawing compared to the method described in Patent Document 1.
[0025] <Generating Textures> First, we will explain the generation of textures of multiple length patterns that exhibit a common texture representation, which are used for drawing line segments. In this embodiment, the generation of these textures is provided as a function of the illustration editing application.
[0026] As described above, in the method of drawing line segments by applying a texture corresponding to the length of the reference line from among the textures generated for multiple length patterns, it is necessary that a variety of length patterns of textures be generated for a single texture representation. That is, since the length of the reference line is expected to vary considerably, in order to suitably represent texture using textures, it is necessary that a variety of patterns of textures be generated with a certain degree of length resolution.
[0027] If a texture with the same length as the reference line is generated, applying that texture directly to the reference line will allow the line segment to be drawn with the texture representation shown by that texture. On the other hand, if a texture with the same length as the reference line is not generated, the line segment will be drawn by, for example, stretching / shortening the texture with the closest length and applying it to the reference line. In this case, the stretching / shortening rate of the texture is determined according to the difference between the length of the texture and the length of the reference line, but if this ratio deviates extremely far from 1, the texture representation of the texture will not be guaranteed in the drawn line segment.
[0028] For example, consider a scenario where, with respect to a baseline of length L0, the closest length is selected from the length patterns for which textures have been generated, and the texture having that length is stretched to L0 and applied to the baseline. As shown in Figure 2A, if the closest length is L1, which is slightly shorter than L0, then stretching a texture 201 having length L1 and applying it to the baseline will result in a line segment that, to some extent, preserves the texture representation of the texture 201. On the other hand, as shown in Figure 2B, if the closest length is L2, which is extremely short (about half the length in the figure), then stretching a texture 202 having length L2 to L1 and applying it to the baseline will result in a line segment that does not preserve the texture representation of the texture 202.
[0029] Thus, in order to render line segments whose length may change with a specific texture representation using textures, it is necessary, as a prerequisite, that multiple types of length pattern textures be generated with a length resolution sufficient to ensure texture representation even when stretched or resized.
[0030] However, in illustration editing applications, the length of line segments is arbitrarily set according to the purpose of the illustration, so it is not practical to prepare textures for infinite lengths. Furthermore, considering the prerequisite that textures must be generated with a length resolution sufficient to ensure texture representation even when scaled, the number of length patterns for which textures can be generated becomes enormous.
[0031] In particular, in scenarios where the length of a line segment changes continuously, such as in animation, it is necessary to select a texture appropriate to the length and apply it to the line segment for rendering. That is, in such scenarios, it is necessary to load the textures for each length pattern into memory in advance. However, if the number of length patterns is enormous, the memory usage will be strained by the loaded textures, which can reduce the calculation accuracy and efficiency of other processes.
[0032] Therefore, textures generated for drawing line segments with texture representation must be generated within a limited range of lengths. In other words, textures generated for drawing line segments should be generated only for certain length patterns, and line segments of lengths not included in those length patterns should be generated in a way that allows them to be represented by combining textures of those length patterns.
[0033] Furthermore, in the case of animations or other methods where the length of a line segment changes continuously, it is required that uniform texture representation be ensured regardless of length when comparing textures of multiple length patterns. That is, in the case of selecting a texture to apply according to the length of a reference line, if the length of the line segment changes continuously, the display will transition by switching to textures of different lengths in stages. Therefore, if there is a discrepancy in the distribution of texture-forming elements (hereinafter sometimes simply referred to as particles) between the switched textures, the aforementioned flickering of the appearance may occur due to changes in the density of particle placement, etc.
[0034] Therefore, textures generated for drawing line segments with texture representation (hereinafter sometimes referred to as line segment drawing textures) must ensure continuity in the distribution of particles on the line segment before and after switching texture patterns in accordance with gradual changes in the length of the line segment. In other words, line segment drawing textures with multiple length patterns must maintain a constant particle placement frequency and keep the relative positional change of particles exhibiting the same appearance constant, even when switching sequentially to textures of different lengths.
[0035] Furthermore, as mentioned above, since line segments of arbitrary length are drawn by combinations of limited length patterns, it is necessary that the particle distribution remains uniform even when multiple textures are placed side by side along the longitudinal direction of the line segment, resulting in a homogeneous texture representation. In other words, when textures are placed adjacent to each other, the particles must be distributed in the boundary region in the same way as in the other regions, ensuring a seamless texture representation.
[0036] The following describes specific methods for generating line segment drawing textures with multiple length patterns for a single texture representation.
[0037] (Base texture) First, conditional information is obtained that defines the rules for generating the texture representation shown by each line segment drawing texture (the conditions for particle placement).
[0038] The texture of pencils and brushes cannot be expressed by uniformly coloring the two-dimensional area on which the line segment with that texture is drawn with a single color at a fixed density (especially the shading and blurring). Therefore, as mentioned above, it is formed by distributing particles with a specific pixel pattern somewhat irregularly. For example, by arranging particles with varying density (or hue, lightness, opacity, etc.) based on random numbers or the like (or in a specific pattern), a non-uniform, heterogeneous texture expression, such as the brushstrokes of a pencil or brush, can be formed. On the other hand, if particles are arranged completely irregularly throughout the entire line segment, consistency in the particle distribution may not be guaranteed, such as the density of particles being sparse in some areas, and the texture expression may not be formed satisfactorily throughout the entire line segment.
[0039] In other words, in order to generate a line drawing texture that exhibits a common texture representation, it is necessary to define the placement conditions so that, although particles are arranged irregularly locally to include heterogeneous representation, these particles exhibit a certain distribution pattern globally. In one embodiment, the particle distribution pattern may be defined as the frequency of particle placement per unit length (number of placements per unit length ≈ density). Alternatively, the average or variance of changes in the hue, lightness, opacity, etc., of the particles can also be used as the particle distribution pattern.
[0040] Therefore, the condition information defines the particle placement frequency per unit length that should be guaranteed when generating texture representations for line segment drawing. In this embodiment, a texture with a specified length in the longitudinal direction (hereinafter referred to as the reference length) is generated based on the condition information, and line segment drawing textures of other length patterns are generated based on this texture. That is, one of the line segment drawing textures to be generated is a texture with the reference length (hereinafter referred to as the reference texture), which is generated by determining the placement position of particles according to the condition information, and then placing and drawing the particles at those placement positions.
[0041] The condition information may be generated, for example, by the user setting various parameters related to particle type and particle placement for a line segment drawing texture to be generated. Generally, when drawing line segments with texture representation, multiple types of particles are placed in the drawing area. Each particle is selected according to the texture representation to be created. For example, in the case of a pencil, by using eight patterns of particles (raster images) as shown in Figure 3, it is possible to represent a somewhat heterogeneous texture. More specifically, by scaling, adjusting the opacity, and rotating one of the eight particle patterns, it is possible to create a texture representation in which the regularity of particle placement is not easily perceived. One type of particle may be used, but it is preferable to use multiple types of particles because the regularity becomes easier to perceive. Therefore, in this embodiment, the condition information includes information on the particle placement frequency per unit length, as well as information on the types of particles placed in the texture.
[0042] The following describes an example of generating a reference texture in detail with reference to Figure 4. In the example shown in Figure 4, the condition information defines a placement frequency such that 32 particles are placed in a drawing area whose longitudinal direction is the reference length. More specifically, the condition information defines that for the line width used to generate the texture, 32 particles (specifically, a two-dimensional distribution of 8 particles in the longitudinal direction and 4 particles in the width (short direction)) are placed in a region 401 having a reference length in the longitudinal direction. Note that in the example in Figure 4, to facilitate understanding of the invention, the particle type is shown as one type (circle).
[0043] The determination of particle placement during the generation of the base texture is achieved, for example, by dividing region 401 into a grid based on conditional information and randomly determining the center coordinates of the particles to be placed in each grid. In the example in Figure 4, 36 grids (9 divisions in the longitudinal direction (=8+1) × 4 divisions in the width direction) are defined for region 401. The grids lined up at the edges in the width direction (top and bottom edges) are defined with margins because, depending on the position of the center coordinates of the particles to be placed, the image of the particles may be drawn outside the grid.
[0044] In this illustration editing application, if the length of a line segment is longer than any of the line segment drawing textures, the line segment is drawn by placing multiple textures adjacent to each other. Therefore, each line segment drawing texture is configured such that when placed adjacent to each other, the particles distributed at its ends (boundaries) are not discontinuous. Accordingly, the reference texture needs to be configured so that when multiple reference textures are placed adjacent to each other, a common particle pattern recursively appears in units of reference length.
[0045] In other words, among the grids defined in region 401, the grid group 402 in the leftmost column and the grid group 403 in the rightmost column share the same particle placement positions. Furthermore, since grid group 402 and grid group 403 are configured such that only half of the region 401 is contained within it, the number of grids contained within region 401 is effectively the same as the placement frequency per standard length defined in the condition information, which is 32.
[0046] In this way, by defining the same number of grids in region 401 as the placement frequency defined in the condition information, and placing one raster image of a particle in each grid, a constant placement frequency is maintained for the entire region 401, resulting in a globally homogeneous texture representation. On the other hand, since the placement position of particles within each grid is determined randomly, the distribution of particles becomes irregular, and as a result, a locally heterogeneous texture representation can be formed.
[0047] The information regarding the particle placement positions determined for the reference texture is stored as information about the particle distribution pattern in the reference texture (hereinafter referred to as reference distribution information). In the example in Figure 4, only one type of particle was used for explanation, but if multiple types of particles are included, it goes without saying that the distribution information will include information that identifies the type of particle placed at each placement position.
[0048] (Generating textures other than the standard length) Once a base texture is generated in this way, textures of other lengths for line drawing are generated based on that base texture.
[0049] As described above, the reference texture is configured to show a common particle distribution pattern at its longitudinal edges, so by placing them adjacent to each other, it is possible to draw longer line segments that exhibit a predetermined texture representation. That is, line segments of length that are integer multiples of the reference length can be drawn using only the reference texture while ensuring globally uniform texture representation. Here, the shortest line segment length that can be drawn using only the reference texture is the reference length, and the next line segment length that can be drawn using only the reference texture is twice the reference length (hereinafter referred to as twice the length). Therefore, the illustration editing application of this embodiment generates line segment drawing textures for each length determined by subdividing the length range up to twice the length with a predetermined length resolution.
[0050] In other words, the reference texture can render line segments of the reference length, integer multiples of the reference length, or lengths with only a small difference from these, while ensuring a suitable texture representation. However, for line segments of lengths that do not fall into these categories, namely, line segments from 0 to the reference length, and line segments from the reference length to twice the length, the reference texture cannot render them while ensuring a suitable texture representation. Therefore, the illustration editing application of this embodiment generates line segment rendering textures of progressively different lengths for lengths from 0 to the reference length and for lengths from the reference length to twice the length.
[0051] The length patterns for generating line segment drawing textures are defined as the lengths corresponding to each step when the length range up to twice the length is divided into 32 or 64 steps, etc. (Step 0 is excluded because there is no need to place a line segment drawing texture for length 0). In the example shown below, the base length is set to 64 pixels, and the range up to twice that length, 128 pixels, is evenly divided into 32 steps. For each step excluding length 0 and the base length, a line segment drawing texture is generated based on the base texture.
[0052] In the following examples, the length resolution is conveniently set to 32 levels, but as mentioned above, the length resolution can be set to be finer or coarser depending on how smoothly the switching of line segment drawing textures is presented in relation to changes in line segment length. Furthermore, equal division is not a mandatory element; the length for generating line segment drawing textures may be defined sparsely for some length ranges and densely for other length ranges.
[0053] The method for generating line segment drawing textures differs depending on the length of the texture to be generated (hereinafter referred to as the output length). Therefore, the methods for generating textures longer than the standard length (extended representation from the standard length) and shorter than the standard length (shortened representation from the standard length) are explained below.
[0054] (1) Texture generation related to stretching representation The texture for line segment drawing with an output length longer than the reference length, i.e., having a length that is S times the reference length (1 < S ≤ 2), is generated such that the arrangement pattern of the particles is the same as when two reference textures are adjacent to each other at the point of doubling the length. That is, the texture for line segment drawing related to the stretching expression is generated based on the reference texture 501 as shown in FIG. 5 and the texture with a length twice as long (hereinafter referred to as the concatenated texture) 502 generated by concatenating two of the reference textures 501 in the longitudinal direction and the distribution pattern of the particles. More specifically, the texture with a length that is S times the reference length (1 < S ≤ 2) is generated by determining the arrangement positions of the particles in the texture based on the reference distribution information related to the reference texture and the information indicating the distribution pattern of the particles in the concatenated texture (hereinafter referred to as the concatenated distribution information).
[0055] Here, the concatenated texture 502 corresponds to the texture for line segment drawing at S = 2 (the 32nd stage). In this embodiment, the concatenated texture 502 will be described as being generated as one of the textures for line segment drawing. However, since the concatenated texture 502 is formed by connecting two reference textures 501 and will be replaced by two reference textures 501 even when drawing a line segment as described later, the generation of the concatenated texture 502 is not essential for the implementation of the present invention.
[0056] Since the texture related to the stretching expression is the texture applied when the line segment to be applied is sequentially stretched from the reference length to twice as long, it is necessary to ensure the texture expression shown by the reference texture 501 during the stretching process. Also, when switching the texture to be applied, it is necessary to ensure similarity in the distribution pattern of the particles so that no flicker in the appearance occurs. That is, the texture related to the stretching expression must be configured to show a certain similarity between textures with respect to the local arrangement positions of the particles while keeping the arrangement frequency of the particles constant globally. That is, the texture applied in the process of sequentially stretching the line segment from the reference length to twice as long is generated by controlling the arrangement positions of the particles according to the output length such that the distribution pattern of the particles shown by the reference distribution information gradually approaches the distribution pattern of the particles shown by the concatenated distribution information.
[0057] The method for determining the arrangement positions of particles related to the generation of a line segment drawing texture (hereinafter referred to as an extended intermediate texture) with an output length that is S times the reference length (1 < S < 2) will be described with reference to FIGS. 6A and 6B. In the example of the figures, for the sake of easy understanding of the invention, it is assumed that the particles constituting the line segment drawing texture are of two patterns, A and B, and in the figures, each particle is represented in a distinguishable manner by taking the appearance as the character "A" or "B". For example, when the particles in the reference texture 601 are distributed as shown in FIG. 6A, the concatenated texture 602 related to twice the length is generated by concatenating two reference length textures 601 in the longitudinal direction, so the particles are distributed as shown in FIG. 6B.
[0058] In generating the extended intermediate texture, first, the particles distributed in the reference texture 601 and the particles distributed in the concatenated texture 602 are associated. Here, association means associating particles with the same relative position in the texture and showing the same pattern as the same particles between the reference texture 601 and the concatenated texture 602.
[0059] That is, the particles that can be associated are the particles that are maintained at a certain relative position regardless of the change in the longitudinal length in the expression where the reference texture 601 extends and changes to the concatenated texture 602. In other words, the particles that can be associated are the particles that do not disappear in the process of extending the line segment to twice the reference length and remain in the region with a common relative position, and are the particles arranged at the same relative position in the extended intermediate texture. That is, the particles that can be associated are the particles that are necessarily arranged in the region with a common relative position regardless of the length at an output length longer than the reference length.
[0060] Here, the region with a common relative position may be defined based on the grid defined when the reference texture 601 was generated, as shown in Figures 7A to 7C. Let's consider the case where the reference texture 601 is generated by defining essentially 10 grids (5 divisions in the longitudinal direction × 2 divisions in the width direction) within the region 701 related to the texture, as shown in Figure 7A, and placing either A or B particles in each grid. In this case, if the region 701 related to the reference texture 601 is stretched by a factor of 2 in the longitudinal direction, each grid is also stretched by a factor of 2 in the longitudinal direction, resulting in Figure 7B. Since the region 711 in Figure 7B is the same size as the region related to the linked texture 602, the region indicated by each grid that has been stretched by a factor of 2 in the longitudinal direction identifies the region in the linked texture 602 that corresponds to each grid of the reference texture 601. Figure 7C shows the grid of Figure 7B superimposed on the linked texture 602. Therefore, the grid region of the reference texture 601 and the grid region of the linked texture 602, which are identified by grid coordinates (M,N) using the grid row number M and column number N, are regions that share a common relative position.
[0061] In Figure 7A, a particle 703 of pattern B is placed in the grid region 702, which is specified by the grid coordinates (4,1), and in Figure 7C, a particle 713 of pattern B is also placed in the grid region 712, which is specified by the same grid coordinates. Therefore, particles 703 and 713 placed in the grid region of grid coordinates (4,1) can be associated between the reference texture 601 and the linked texture 602.
[0062] On the other hand, in Figure 7A, the grid region 704 identified by the grid coordinates (3,1) contains particles 705 of pattern A, but in Figure 7C, the grid region 714 identified by the same grid coordinates does not contain particles of pattern A. Therefore, the particle 705 located in the grid region at grid coordinates (3,1) cannot be associated with the reference texture 601 and the linked texture 602. In other words, the particle 705 cannot be associated with the linked texture 602 because there are no particles of the same pattern with small relative positional changes.
[0063] Through this mapping, each particle distributed in the reference texture 601 and the linked texture 602 is first classified into two categories: a first category of particles that can be mapped, and a second category of particles that cannot be mapped. In other words, particles of the first category are those shown in black in Figure 7D, whose placement is maintained in a region of a constant relative position regardless of the length of the stretched intermediate texture. On the other hand, particles of the second category are those whose placement in a region of a constant relative position changes depending on the length of the stretched intermediate texture. More specifically, particles of the second category include the first particle shown in black in Figure 7E, which is present in the reference texture 601 but disappears from the region of common relative position as the length of the stretched intermediate texture increases, and the second particle shown in black in Figure 7F, which is not present in the reference texture 601 but appears as the length of the stretched intermediate texture increases.
[0064] Furthermore, since linked texture 602 is generated by linking base texture 601, the particles in the grid region at the edges of base texture 601 are always classified into the first category. As a result, the stretched intermediate texture, like base texture 601, will not have discontinuities in the particles at the boundaries even if it is placed adjacent to other textures on a line segment when drawing a line segment longer than twice its length.
[0065] Based on the classification results of the particles distributed in the base texture 601 and the linked texture 602, the placement position of each particle is determined for each length stage related to the stretching representation, and the stretched intermediate texture is generated. In other words, when the particle distribution pattern at the base length (base distribution information) and the particle distribution pattern at twice the length (linked distribution information) are determined, if particles are randomly placed in the stretched intermediate texture that shows the stretching process, the continuity of the particle distribution pattern cannot be guaranteed, which may cause flickering in appearance. For this reason, only the particles distributed in the base texture 601 and the linked texture 602 are used to generate the stretched intermediate texture, and in determining the placement position of each particle, these particles are classified according to their characteristics, and the determination method is made different for each classification according to the texture length as follows.
[0066] For the particles of the first classification, there are particles associated with both the reference texture 601 and the connection texture 602. Therefore, the arrangement position of the particle in the elongation intermediate texture is determined based on the relative position of the particle in the reference texture 601 and the relative position of the particle in the connection texture 602.
[0067] As described above, since the particles of the first classification are particles distributed in a region with the same pattern and the relative positions in each texture being common, the relative positions of the particles can be strictly different between the reference texture 601 and the connection texture 602. For example, defining the X coordinate (absolute coordinate) of the left end of each texture as X = 0, if the X coordinate (absolute coordinate) of particle [i] in the reference texture 601 is X i , then in the connection texture 602, the X coordinate (absolute coordinate) of the associated particle [i] is not necessarily 2X i and may be close to 2X i ’ at 2X i ’. Therefore, the arrangement position of the particle [i] in the elongation intermediate texture is determined by approaching the relative X coordinate from X i to X i ’ as the output length increases. That is, as the output length increases, the arrangement position of the particle [i] is determined to sequentially move from the relative coordinate in the reference texture 601 to the position of the relative coordinate in the connection texture 602. Specifically, the X coordinate (absolute coordinate) X out of the arrangement position of particle [i] in the elongation intermediate texture with an output length L out may be derived as JPEG0007880443000001.jpg28154. Here, L is the reference length, and L ref indicates twice the length. dub is shown as twice the length.
[0068] Furthermore, for particles of the first classification placed at the ends of the stretched intermediate texture, the determination of their placement position is controlled so that they are placed at the same relative position in both the base texture 601 and the linked texture 602. In other words, for particles of the first classification at the ends, the relative position is controlled to be the same in stretched intermediate textures of any length, so no process is required to move the relative position of the particles according to the output length.
[0069] In contrast, for particles of the second classification, they exist in one of the textures, the base texture 601 and the linked texture 602, but the other texture does not have a corresponding particle. Therefore, in the process of stretching, it is not necessary to move their placement to a different relative position, as is the case with particles of the first classification. Accordingly, for the first particle of the second classification that is included only in the base texture 601, the placement position in the stretched intermediate texture is determined so as to maintain the relative position of that particle in the base texture 601. That is, if the X coordinate (absolute coordinate) in the base texture 601 is Xa i The output length L of particle [i] out X coordinate (absolute coordinate) of the placement position in the stretched intermediate texture Xa out teeth, It can be derived as JPEG0007880443000002.jpg2873.
[0070] Furthermore, for the second particle included only in linked texture 602 of the second classification, its placement position in the stretched intermediate texture is determined so as to maintain the relative position of the particle in linked texture 602. That is, for particle [i] whose X coordinate (absolute coordinate) is Xbi in linked texture 602, the output length L out X coordinate (absolute coordinate) Xb of the placement position in the stretched intermediate texture out teeth, It can be derived as JPEG0007880443000003.jpg2774.
[0071] Furthermore, for the particles of the second classification, their placement size is determined in order to show in the extended intermediate texture how they disappear or appear depending on the output length. Specifically, for the first particles, a visible placement size is determined for output lengths close to the standard length, and an invisible placement size (0) is determined for output lengths close to twice the standard length. Similarly, for the second particles, an invisible placement size (0) is determined for output lengths close to the standard length, and a visible placement size is determined for output lengths close to twice the standard length. In other words, the placement size of the first particles becomes smaller (disappears) as the output length increases, and larger (becomes visible) as the output length decreases. Similarly, the placement size of the second particles becomes larger (becomes visible) as the output length increases, and smaller (disappears) as the output length decreases.
[0072] The output length and placement size of each particle can be determined according to the particle placement frequency defined for the reference texture 601. In other words, by maintaining the particle placement frequency per unit length related to the reference texture 601, a uniform texture representation can be ensured in the stretched intermediate texture.
[0073] Here, maintaining the particle placement frequency means, as shown in Figure 8, that when a grid of the same size as the one used when generating the reference texture 601 is defined, the area occupied by the particles placed within each grid region is adjusted to be equivalent to the area of one particle in the reference texture 601. In other words, depending on the output length, multiple particle placement positions may be included within a single grid region. In this case, the placement size of each particle is adjusted to 1 (default size) or less so that the sum of the sizes of all particles is 1. To put it another way, in this embodiment where a placement frequency of one particle per grid region is defined, if the particle placement positions determined for the output length are included in the same grid region, the placement frequency cannot be guaranteed. Therefore, the placement frequency is maintained by adjusting the particle size to include 0.
[0074] Figure 8 shows an example where, within a region 801 having an output length in the longitudinal direction, it is possible to define substantially 14 grids of the same size as those defined when generating the reference texture shown in Figure 7 (specifically, a two-dimensional distribution of 7 in the longitudinal direction and 2 in the width direction). Since the grid region 802 contains two particles 803 and 804, the placement size of these two particles is determined according to their classification. For example, if one of the particles is a particle of the first classification, its placement size will remain 1 regardless of the output length in the stretched representation, and the placement size of the other particle will be determined to be 0. Alternatively, if both particles are particles of the second classification, the placement size of the first particle will be determined according to (output length - reference length), and the placement size of the second particle will be determined according to (double length - output length).
[0075] Figure 8 illustrates an output length in which an integer number of grids of the same size as those defined during the generation of the reference texture can be defined in the longitudinal direction. However, it goes without saying that the implementation of the present invention is not limited to this. Depending on the output length, it may not be possible to define an integer number of grids in the longitudinal direction, and therefore the particle placement frequency may not necessarily be the same as that of the reference texture. In this case, the particle placement frequency of the stretched intermediate texture should be controlled so that the difference from the particle placement frequency of the reference texture falls below a predetermined threshold. Here, the threshold should be set to such an extent that no visual difference is visible between the stretched intermediate texture and the reference texture.
[0076] Furthermore, in this embodiment, the method for generating the stretched intermediate texture is described as using a method to adjust the particle placement size in order to maintain the particle placement frequency, but the implementation of the present invention is not limited to this. For example, the particle placement frequency in the stretched intermediate texture may be maintained by adjusting the opacity of the particles. Alternatively, it may be maintained by adjusting both the particle placement size and opacity.
[0077] (2) Texture generation related to abbreviated expressions On the other hand, for a texture for drawing a line segment with an output length shorter than the reference length, that is, a texture having a length that is S times the reference length (0 < S < 1) (hereinafter referred to as a shortened intermediate texture), there is no texture that should be used as a specific standard for the arrangement positions of particles like the concatenated texture. Therefore, when determining the arrangement positions of particles in the shortened intermediate texture related to the shortened expression, a texture obtained by shortening the reference texture so that the longitudinal direction becomes the output length (hereinafter simply referred to as a shortened texture) is generated, and the distribution pattern of particles in the shortened texture is referred to. That is, in the illustration editing application, the arrangement positions of particles in the shortened intermediate texture with the output length are determined based on the reference distribution information related to the reference texture and the shortened distribution information indicating the distribution pattern of particles in the shortened texture generated for the output length.
[0078] FIG. 9A illustrates a reference texture 901 and a shortened texture 902 obtained by shortening the reference texture 901 to half in the longitudinal direction. As shown in the illustration, in the shortened texture 902, since the particles are overall in a shape compressed in the longitudinal direction, the same texture expression as the reference texture 901 is not ensured. On the other hand, if the shape of the particles is made the same as that of the reference texture 901, as shown in FIG. 9B, the arrangement density of the particles can become higher than that of the reference texture 901. That is, if all the particles of the shortened texture 902 are made the same in shape and size as the particles of the reference texture 901, the arrangement frequency of the particles will change. Therefore, in order to generate a shortened intermediate texture, it is necessary to adjust the arrangement size of the particles in the same way as in the elongation expression.
[0079] The adjustment of the arrangement size may be performed in the same way as that performed for the particles of the second classification in the elongated intermediate texture. For example, as shown in FIG. 10, when a lattice of the same size as that used at the time of generating the reference texture 901 is defined in the region related to the shortened texture 902, the sum of the sizes of all the particles arranged in the region in each lattice region may be made 1.
[0080] Here, if multiple particles are placed in a grid region, for example, a priority can be set according to the distance from the center of each grid region (the closer to the center, the higher the priority), and the size of the particles can be determined based on that priority (the particles with higher priority will be larger than those with lower priority). This setting of priority is merely an example, and other methods can be used. The reason why such prioritization of particles is necessary is because the shortened texture is generated by deforming the base texture. That is, the base distribution information and shortened distribution information referenced in the generation of the shortened intermediate texture are both determined based on the same single base texture, so all particles can be associated with the base texture and the shortened texture, and therefore fall under the first classification in the stretched representation.
[0081] Furthermore, similar to the base texture, stretched intermediate texture, and linked texture, it is necessary to control the placement position and size of particles at the edges so that when they are placed adjacent to each other, the particles do not become discontinuous at the boundary. Therefore, for the grid regions corresponding to the edges, the placement position of the relevant particles is fixed to maintain the particle distribution pattern at the edges in the base texture 901, and the placement size of other particles included in the grid region where these particles are placed is forcibly set to 0. A shortened intermediate texture with half the length, generated by determining the placement position and size of the particles in this way, is illustrated in Figure 9C.
[0082] Furthermore, in the 1 / 2 length shortened intermediate texture shown in Figure 9C, there was sufficient length in the longitudinal direction of the area where the particles were placed, so the particle placement size at the edges could be the same as that of the base texture 901. However, depending on the output length, the longitudinal length of the particles may exceed the output length. Therefore, for output lengths that are less than or equal to the longitudinal length of the particles, the particles may be compressed in the longitudinal direction as shown in Figure 11 to prevent the texture representation from changing due to particle overlap.
[0083] Furthermore, in this embodiment, the method for generating a shortened intermediate texture is described as adjusting the particle placement size to maintain the particle placement frequency, but the implementation of the present invention is not limited to this. For example, similar to the stretched intermediate texture, the particle placement frequency in the shortened intermediate texture may be maintained by adjusting the opacity of the particles. Alternatively, it may be maintained by adjusting both the particle placement size and opacity.
[0084] By arranging the particles of each pattern at the determined placement positions and sizes, it is possible to generate textures with a common texture representation for multiple output lengths up to twice the length. As will be explained in detail later, the generated line-drawing textures (base texture, linked texture, extended intermediate texture, and shortened intermediate texture) can be used to show a uniform texture representation for line segments of lengths from 0 to twice the length. Furthermore, since each of the line-drawing textures is configured to be placed adjacent to each other, it is possible to show a uniform texture representation for line segments longer than twice the length by using multiple line-drawing textures.
[0085] In this embodiment, line segment drawing textures are generated for each of the 32 equally divided length steps up to twice the length, and when drawing line segments of varying length, these textures are sequentially switched and applied according to the line segment length. As will be described in detail later, when drawing line segments of length less than twice the length for which no line segment drawing texture has been generated, for example, the longest line segment drawing texture with a length shorter than the length in question is stretched to the length of the line segment and used. Then, when the line segment extends to the next length step, the texture is switched to the texture for that length step.
[0086] Therefore, it is preferable that the line segment drawing texture is configured so that the user does not perceive a change in the applied texture on the drawn line segment. Accordingly, information regarding the arrangement of particles is determined so that a certain degree of similarity in the particle distribution pattern is ensured between the line segment drawing texture of one length stage (first length) and the line segment drawing texture of the next longer length stage (second length).
[0087] More specifically, the texture of the first length (hereinafter referred to as the first texture) is stretched and applied as needed to line segments with a length greater than or equal to the first length but less than the second length. Therefore, when a line segment extends from the first length to the second length, a switch occurs from the first texture to the texture of the second length (hereinafter referred to as the second texture).
[0088] According to the line segment drawing texture generation method described above, the placement size of each particle is adjusted according to the output length so that the particle placement frequency remains constant regardless of the output length, and the placement position is also adjusted according to the output length based on the distribution pattern in the reference texture or linked texture so that the relative position within the texture area is maintained. Therefore, the extent to which there is a difference in the particle distribution pattern between the first texture and the second texture, that is, how easily the user perceives the switch when switching from the first texture to the second texture, depends on the difference in the lengths of the corresponding textures (the length of the first and the length of the second).
[0089] Furthermore, when the first texture is stretched to approximately the same length as the second texture, the shape of the particles in the first texture changes. Therefore, the perceived ease of switching from the first texture to the second texture varies depending on the degree of stretching applied immediately before switching to the second texture. In other words, the extent to which the first texture is stretched before switching to the second texture also depends on the magnitude of the length difference between the corresponding textures.
[0090] That is, in order to generate a texture for line drawing that ensures a certain texture expression and makes it difficult for the user to perceive the switching, it is preferable to configure such that the similarity when the first texture and the second texture have the same length is not less than a threshold value. In other words, when the first texture is extended to the second length, if the texture expression (appearance) formed by the distributed particles is similar to the second texture, the user will not perceive the switching of the texture for line drawing during the process of stretching or shrinking the line segment, and will get the impression that a seamless texture expression is ensured.
[0091] Next, a general description will be given for the case where each of N (N = 32 in this embodiment) types of textures generated as textures for line drawing is generated as T[m] (m is an integer where 0 ≦ m < N). In this case, the texture for line drawing is N types excluding 0 times of N + 1 textures that change stepwise up to Se (an integer value, Se = 2 in this embodiment) times the reference length, and numerical values from 0 to N - 1 are assigned as m to these in ascending order of length, and one texture can be specified as T[m] based on the numerical value (number) m. At this time, if the longitudinal length of T[m] is S[m] times the reference length, the relationship between m and S[m] can be expressed as JPEG0007880443000004.jpg2573 (when dividing up to Se times evenly to determine the length). At this time, if the number corresponding to the first length is m and the number corresponding to the second length is m + 1, then T[m] has a length that is S[m] times the reference length, and T[m + 1] has a length that is S[m + 1] times the reference length. Therefore, the difference in the longitudinal lengths between the texture T[m] of the first length and the texture T[m + 1] of the second length is JPEG0007880443000005.jpg25153. Here, L refThis is the base length. In other words, the larger the number of length patterns of the line segment drawing texture, i.e., the number of divisions N of the length from 0 to Se times, the less likely it is that the user will perceive the change when switching to the next longer line segment drawing texture. This is because the smaller the difference between S[m] and S[m+1], the narrower the length range (intermediate length between S[m] and S[m+1]) to apply by stretching T[m], and the fewer opportunities there are to display a texture where the particle shape has changed (stretched in the longitudinal direction).
[0092] Preferably, by configuring the system to switch to a different line segment drawing texture each time the length of the line segment changes by one pixel, it is possible to present a stretched / stretched representation that ensures a more uniform texture without displaying the stretched texture. The number N of such length patterns is: It can be derived as JPEG0007880443000006.jpg1855.
[0093] In this way, by appropriately selecting the base length and the number of line segment drawing textures to be generated, it is possible to generate a set of line segment drawing textures that ensure uniform texture representation, just as when drawing line segments by appropriately placing particles. Therefore, the number of length patterns is not limited to the 32 mentioned above, but can be set to any value such as 64 or 128, depending on the required quality of the line segment drawing texture (how inconspicuous the difference is when switching) and the base length.
[0094] <Drawing line segments using textures> Next, we will outline the process of drawing line segments with the corresponding texture representation using the line segment drawing textures of multiple length patterns generated in this manner. In this embodiment, the drawing of such line segments is provided as a function of the illustration editing application. The process of drawing line segments using textures can be classified into the following three types depending on the length of the line segment.
[0095] (1) Line segments of less than twice the length For line segments shorter than twice the length of the line segment, drawing is performed by applying one of the generated line segment drawing textures. The texture selected in this case is either the texture with the length of the line segment if one exists, or the texture with the longest length among those shorter than the line segment if no texture with the length of the line segment exists.
[0096] For example, standard length L ref Therefore, if the length of the line segment is 1 / 2 (0.5 = 2 × 8 / 32) times the length, texture T[7], which is assigned to 7 (= 8-1), is used for rendering. Similarly, T[7] is used until the length of the line segment exceeds 1 / 2 of the length of texture 7 and reaches the length of texture 8 (2 × (8 + 1) / 32 ≈ 0.56 times the length). In this case, T[7] is stretched according to the length of the line segment and applied. When the length of the line segment reaches the length of texture 8, the applied texture is switched from T[7] to T[8].
[0097] (2) Line segment twice the length For line segments twice as long, the 32nd texture T
[31] among the generated line segment drawing textures has the same length. Here, since T
[31] is a concatenated texture, there is no visual difference from placing two reference textures adjacent to each other. Also, since there is no texture longer than T
[31] among the line segment drawing textures, it is not possible to switch to a longer texture if the line segment is further extended. For this reason, although the concatenated texture T
[31] is selected based on the length of the line segment, the two reference textures T
[15] are selected in its place.
[0098] In other words, if the length of the line segment is twice as long, the line segment can be drawn using a single texture T
[31] , but it is replaced with two reference textures T
[15] for drawing. That is, since the concatenated texture T
[31] is originally generated by concatenating two reference textures T
[15] , even if T
[30] is replaced with two T
[15] at the length where the switch from T
[30] to T
[31] occurs, the user cannot perceive this replacement.
[0099] (3) Line segments with a length greater than twice the length On the other hand, for line segments longer than twice the original length, applying only one of the generated line segment drawing textures is insufficient to achieve a suitable texture representation. When a line segment doubles in length, the texture applied to it changes from one (T
[31] ) to two (T
[15] × 2). Therefore, for line segments longer than twice the original length, texture representation is achieved by switching each of these replaced textures to a longer texture and applying it.
[0100] For example, if the length of a line segment is three times the standard length, two textures T
[23] with a length of 1.5 are applied adjacent to each other to render a line segment with texture representation. That is, as the line segment is sequentially extended, the two standard textures that were replaced and applied when the line segment was twice the length are sequentially switched to longer textures according to the length of the line segment. When the line segment reaches four times the standard length, both textures are switched to two-times-long textures T
[31] (linked textures), and as with the rendering of the twice-length line segment, these are each replaced by two standard textures T
[15] . Therefore, when the line segment extends beyond four times the standard length, each sequentially replaced texture is switched to a texture of a different length.
[0101] In other words, the number of line segment drawing textures applied is 2 times the base length of the line segment. N It doubles each time it doubles (2 N(It is replaced by a reference texture). Therefore, the number of textures used to draw a line segment is derived from the number of times N can be bit-shifted to the right until it becomes 0 when the value obtained by dividing the length of the line segment by the reference length is cast to an integer type and the integer value is represented in binary (2 N ) can be done.
[0102] In this way, the illustration editing application of this embodiment makes it possible, in principle, to draw line segments of infinite length while maintaining a uniform texture representation, using a limited number of line segment drawing textures.
[0103] In this embodiment, to facilitate understanding of the invention, when drawing a line segment by applying multiple line segment drawing textures, these textures are described as representing the same length. That is, multiple textures of one type are applied to the drawing of a line segment at one time. This makes it possible to make the particle distribution uniform throughout the entire line segment. However, the implementation of the present invention is not limited to this, and for example, line segment drawing textures of different lengths may be combined and applied according to the length of the line segment.
[0104] 《Generation Process》 The following describes the process for generating line segment drawing textures in the illustration editing application of this embodiment, using the flowchart in Figure 12. The process corresponding to the flowchart can be realized by the control unit 101 reading the corresponding processing program stored in the storage device 102, for example, loading it into memory 103 and executing it. This generation process will be described as starting, for example, when condition information related to the generation rules of a reference texture is input.
[0105] In S1201, the control unit 101 generates a reference texture based on the input condition information and obtains reference distribution information for the generated reference texture. Here, the condition information includes information on the particle pattern to be placed on the reference texture, information on the particle placement frequency per unit length, and reference length information. Based on this condition information, the control unit 101 obtains reference distribution information by determining the particle placement positions for each pattern so as to satisfy the particle placement frequency.
[0106] In S1202, the control unit 101 determines the output length for each of the line drawing textures generated in addition to the reference texture. The output length for each texture is determined by setting the maximum length to the reference length multiplied by a predetermined integer value, and dividing the length range from 0 to the maximum length equally into a predetermined number of divisions. In the example described above, the predetermined integer value is 2 and the number of divisions is 32. Here, the predetermined integer value and the number of divisions may be predetermined, or they may be determined based on user input, for example.
[0107] In S1203, the control unit 101 determines the particle placement position for each of the line segment drawing textures to be generated based on the reference distribution information. The control unit 101 also determines the particle placement size as needed. More specifically, the control unit 101 determines the particle placement position using different methods for output lengths longer than the reference length (output length related to extended representation) and output lengths shorter than the reference length (output length related to shortened representation) among the output lengths determined in S1202.
[0108] Regarding the output length related to the extended representation, the control unit 101 first generates a concatenated texture by concatenating reference textures and obtains the concatenation distribution information of the generated concatenated texture. Then, based on the reference distribution information and the concatenation distribution information, the control unit 101 associates the particles distributed in the reference texture with the particles distributed in the concatenated texture and classifies the particles. Subsequently, for each output length, the control unit 101 determines the placement position of each particle according to the classification. Furthermore, for particles of the second classification, the control unit 101 also determines the placement size based on the reference distribution information, the concatenation distribution information, the particle classification information, and the particle placement frequency information.
[0109] Furthermore, regarding the output length related to the abbreviated representation, the control unit 101 obtains abbreviated distribution information corresponding to each output length by converting the reference distribution information according to each output length. The control unit 101 then determines the placement position of each particle based on the abbreviated distribution information. The control unit 101 also determines the placement size based on the abbreviated distribution information, particle priority, and particle placement frequency information.
[0110] In S1204, the drawing unit 104, under the control of the control unit 101, generates line segment drawing textures (extended intermediate textures and shortened intermediate textures) for each output length based on the information of the placement position and placement size of each particle determined in S1203. That is, the drawing unit 104 generates line segment drawing textures for each output length by placing particles of the corresponding pattern at the determined placement positions. The generated textures are stored in the storage device 102 in association with the output length.
[0111] 《Drawing Process》 Next, the drawing process for drawing line segments with texture representation in the illustration editing application of this embodiment will be explained using the flowchart in Figure 13. The process corresponding to the flowchart can be realized by the control unit 101 reading the corresponding processing program stored in the storage device 102, for example, expanding it into memory 103 and executing it. This drawing process will be described as starting when, for example, an input related to changing the length of the line segment is received, and being executed repeatedly for the duration of that input. Prior to the execution of this drawing process, it will be assumed that line segment drawing textures of each length related to the texture representation of the object to be drawn are expanded into memory 103 or the GPU memory of the drawing unit 104. Furthermore, in the following description, it will be assumed that these line segment drawing textures are generated for a length range up to twice the standard length.
[0112] In S1301, the control unit 101 obtains the length of the line segment to be drawn. The length of the line segment is derived based on the vector information of the reference line input to define the line segment.
[0113] In S1302, the control unit 101 determines whether the length of the line segment obtained in S1301 is less than twice the length of the reference texture, twice the length, or greater than twice the length. If the control unit 101 determines that the length of the line segment is less than twice the length, it moves the process to S1303; if it determines that it is twice the length, it moves the process to S1305; and if it determines that it is greater than twice the length, it moves the process to S1307.
[0114] In S1303, the control unit 101 selects one line segment drawing texture corresponding to the length of the line segment. More specifically, the control unit 101 selects one of the line segment drawing textures related to the texture representation of the object to be drawn, which has the longest length that is less than or equal to the length of the line segment.
[0115] In S1304, the drawing unit 104, under the control of the control unit 101, applies the line segment drawing texture selected in S1303 to a reference line to draw the line segment. At this time, if the length of the line segment drawing texture and the length of the line segment are different, the drawing unit 104 stretches the line segment drawing texture to the length of the line segment before applying it. The drawn line segment is included in the screen related to the illustration editing application and displayed on the display unit 110 by the display control unit 105.
[0116] On the other hand, if it is determined in S1302 that the length of the line segment is twice as long, the control unit 101 selects a line segment drawing texture corresponding to the length of the line segment in S1305. At this time, the line segment drawing texture corresponding to the length of the line segment is a concatenated texture, but when the control unit 101 selects a concatenated texture, it replaces it with two reference length textures.
[0117] In S1306, the drawing unit 104, under the control of the control unit 101, applies the line segment drawing texture (two reference textures) selected in S1305 to the reference line to draw the line segment. The drawn line segment is similarly included in the screen related to the illustration editing application and displayed on the display unit 110 by the display control unit 105.
[0118] In S1307, the control unit 101 determines the number of line segment drawing textures to be used (hereinafter referred to as the number of textures) based on the length of the line segment.
[0119] In S1308, the control unit 101 derives the length of the section to which one line segment drawing texture is applied (section length) by dividing the length of the line segment by the number of textures.
[0120] In S1309, the control unit 101 selects one line segment drawing texture corresponding to the section length. More specifically, the control unit 101 selects one line segment drawing texture related to the texture representation of the object to be drawn, which has the longest length less than or equal to the section length.
[0121] In S1310, the drawing unit 104, under the control of the control unit 101, applies the line segment drawing textures selected in S1308 to the reference line, arranging them according to the number of textures, to draw the line segment. At this time, if the length of the line segment drawing texture and the section length are different, the drawing unit 104 extends each line segment drawing texture to the section length before applying it. The drawn line segment is similarly included in the screen related to the illustration editing application and displayed on the display unit 110 by the display control unit 105.
[0122] In this embodiment, the drawing of line segments with texture representation was described using a line segment drawing texture in an illustration editing application, but the implementation of the present invention is not limited to this. The drawing of line segments with texture representation may be performed in any application that can utilize the line segment drawing texture generated by the generation process. In other words, the present invention relating to line segment drawing can be performed in any information processing device that acquires and stores the line segment drawing texture generated by the generation process, and it is not essential that it be performed in the application that generates the line segment drawing texture or in the information processing device that generates it.
[0123] As described above, the drawing program of this embodiment makes it possible to draw line segments with desired texture representation while avoiding an increase in computational load. For example, any curve composed of two or more control points can be configured to show a uniform texture representation throughout by drawing a line segment drawing texture corresponding to the length between two consecutive control points (segments) on the curve based on the drawing process. In this case, since each line segment drawing texture is configured to have a common particle distribution pattern at its ends, it is possible to show a drawing representation in which particles are naturally connected at the connection points of consecutive segments. Furthermore, even when the length of each segment is changed, it is sequentially replaced with a corresponding number of reference textures each time the length reaches an integer multiple of the reference length, so as a result, line segments that can smoothly expand and contract from length 0 to infinite length and show a uniform texture representation can be shown with a small amount of computation.
[0124] In this embodiment, the concatenated texture is described as being generated by concatenating two reference textures, but the implementation of the present invention is not limited to this. From the viewpoint of minimizing the number of textures generated, as described above, it is preferable that the length of the concatenated texture that serves as the basis for generating the extended intermediate texture is twice the reference length, but it goes without saying that the length of the concatenated texture may be any length that is a predetermined integer multiple of the reference length, and an integer value of 3 or more may be used as the predetermined integer.
[0125] For example, if the given integer is "3", a concatenated texture is generated by concatenating three base textures, and a line segment drawing texture is generated for lengths ranging from 0 to 3 times the base length. Then, in the drawing process using this line segment drawing texture, the length of the line segment is 3 times the base length. N Each time the length doubles, the section to which the concatenated texture is applied should be replaced with three reference textures instead.
[0126] [Example 1] In the embodiments described above, when there is no line segment drawing texture with the same length as the line segment to be drawn, that is, when the length of the line segment is an intermediate length between the first length and the second length in the length pattern, it was explained that a texture shorter than the length of the line segment is stretched and applied. However, the implementation of the present invention is not limited to this, and for line segments of intermediate length, a texture of intermediate length may be generated and applied by averaging or weighted addition of line segment drawing textures having multiple lengths.
[0127] [Differentiation 2] Furthermore, in the embodiments described above, when generating an extended intermediate texture, the first classification of particles is performed when particles of the same pattern are distributed in a grid region with common grid coordinates. However, the present invention is not limited to this. The first classification of particles may be performed when, for any particle in the reference texture, particles of the same pattern are distributed within a predetermined distance from a point on a linked texture that shares relative coordinates with that particle.
[0128] [Other embodiments] The invention is not limited to the embodiments described above, and various modifications and changes are possible within the scope of the gist of the invention.
Claims
1. A computer that outputs a texture that, when drawing a line segment of a predetermined width, is placed in the area corresponding to the line segment to form the texture representation of that line segment, and which outputs a plurality of types of textures of different output lengths that are selectively placed according to the length of the line segment, A process for acquiring distribution information regarding the distribution pattern of texture-forming elements that form a texture representation in a standard texture of a predetermined width having a standard length, A first determination process that determines multiple types of output lengths that indicate the length of the texture to be generated, which are different from the reference length, A second determination process determines the placement position of the texture-forming elements in each type of texture having the output length, based on the distribution information obtained in the acquisition process. A generation process that generates and outputs a texture of a predetermined width having multiple types of output lengths by arranging the texture forming element at the position determined in the second determination process, A program characterized by causing the execution of a specific action.
2. The program according to claim 1, characterized in that, when the output length is longer than the reference length, in the second determination process, the placement position of the texture forming elements is determined based on the distribution pattern of the texture forming elements in the reference texture and the distribution pattern of the texture forming elements in a concatenated texture obtained by concatenating a predetermined integer number of the reference textures without overlapping.
3. The aforementioned program, A mapping process is performed to map the distributed texture-forming elements between the reference texture and the linked texture. A classification process is performed to classify each of the texture-forming elements distributed in the reference texture and the linked texture according to the result of the aforementioned correspondence, The computer is then made to perform the following: If the output length is longer than the reference length, the second determination process determines the placement position of the texture-forming element using a different determination method depending on the classification result of the classification process. The program according to feature 2.
4. Multiple types of texture-forming elements are distributed in the aforementioned reference texture. In the aforementioned correspondence process, the same type of texture-forming element whose relative positions in the regions distributed between the reference texture and the linked texture are common is associated, In the classification process described above, the texture-forming elements that have been associated are classified into a first classification, and the texture-forming elements that have not been associated are classified into a second classification different from the first classification. The program according to feature 3.
5. The program according to claim 4, characterized in that, when the output length is longer than the reference length, in the second determination process, the placement position of the texture-forming element classified into the first classification is determined based on the relative position of the texture-forming element in the reference texture, the relative position of the texture-forming element in the linked texture, and the output length.
6. The program according to claim 4, characterized in that, when the output length is longer than the reference length, in the second determination process, in addition to the placement position, at least one of the placement size and opacity is further determined for the texture-forming element classified into the second classification.
7. The second classification mentioned above includes: A first texture-forming element which is a texture-forming element distributed in the reference texture, wherein no other texture-forming elements of the same type exist in the region of the linked texture where the relative positions are common, A second texture-forming element which is a texture-forming element distributed in the linked texture, wherein no other texture-forming element of the same type exists in the region of the reference texture where the relative positions are common, It includes, If the output length is longer than the reference length, in the second determination process, The position of the first texture-forming element is determined based on the relative position of the first texture-forming element in the reference texture and the output length. The placement position of the second texture-forming element is determined based on the relative position of the second texture-forming element in the linked texture and the output length. L according to feature 6.
8. If the output length is longer than the reference length, in the second determination process, The arrangement size of the first texture-forming element is determined such that it becomes smaller as the output length increases. The arrangement size of the second texture-forming element is determined such that it becomes smaller as the output length decreases. The program according to feature 7.
9. If the output length is longer than the reference length, in the second determination process, The opacity of the first texture-forming element is determined such that it decreases as the output length increases. The opacity of the second texture-forming element is determined such that it decreases as the output length decreases. The program according to feature 7.
10. The program according to claim 2, characterized in that the multiple types of output lengths determined in the first determination process do not exceed the length of the concatenated texture.
11. The program according to claim 2, characterized in that the predetermined integer is 2.
12. The program according to claim 1, characterized in that, when the output length is shorter than the reference length, in the second determination process, the placement position of the texture forming elements is determined based on the distribution pattern of the texture forming elements in the reference texture and the distribution pattern of the texture forming elements in a shortened texture obtained by shortening the reference texture to the length of the output length.
13. The program according to claim 12, characterized in that, when the output length is shorter than the reference length, in the second determination process, for each of the texture-forming elements distributed in the reference texture, in addition to the placement position in the texture having the output length, at least one of the placement size and opacity is further determined.
14. The program according to claim 1, characterized in that the distribution of the texture-forming elements at the end of the texture having the output length is the same as that of the reference texture.
15. The program according to claim 1, characterized in that the difference in the frequency of placement of the texture-forming elements per unit length between the texture having the output length and the reference texture is below a predetermined threshold for the visual identifiability of the appearance.
16. The program according to claim 1, characterized in that the texture having the output length generated in the generation process is a texture in which a common texture representation with the reference texture is formed by distributed texture-forming elements.
17. A drawing device that outputs a texture that forms the texture representation of a line segment by being placed in the area corresponding to the line segment when drawing a line segment of a predetermined width, and which outputs a plurality of types of textures of output length that are selectively placed according to the length of the line segment, Regarding a reference texture of a predetermined width having a reference length, an acquisition means for acquiring distribution information relating to the distribution pattern of texture-forming elements that form a texture representation in the reference texture, A first determination means for determining multiple types of output lengths that indicate the length of the generated texture, which are different from the reference length, A second determination means determines the placement position of the texture-forming elements in each type of texture having the output length based on the distribution information acquired by the acquisition means, A generation means that generates and outputs a texture of a predetermined width having multiple types of output lengths by arranging the texture forming element at the position determined by the second determination means, A drawing device characterized by having the following features.
18. A control method for a drawing device that outputs a texture of a line segment of a predetermined width, which is placed in the area corresponding to the line segment when drawing the line segment, and which outputs a plurality of types of textures of different output lengths that are selectively placed according to the length of the line segment. A step of acquiring distribution information relating to the distribution pattern of texture-forming elements that form a texture expression in a standard texture of a predetermined width having a standard length, A first determination step involves determining multiple types of output lengths that indicate the length of the texture to be generated, which are different from the reference length. A second determination step, based on the distribution information acquired in the acquisition step, determines the placement position of the texture-forming elements in each type of texture having the output length. A generation step in which the texture forming element is placed at the placement position determined in the second determination step, thereby generating and outputting a texture of a predetermined width having multiple types of output lengths, A control method characterized by having the following features.
19. A computer-readable recording medium having a program according to any one of claims 1 to 16 recorded on it.