The present invention relates to computer graphics, and in particular to procedural maps, applied in various environments such as shader. Shader relates to the surface properties of a given simulated material. It may for instance define the type of reaction of a surface to its surrounding environment, and in particular to lighting. This reaction may follow a given lighting model such as one of the following: Phong, Gouraud, Blinn, etc. All these properties could be defined using constant values. However, maps allow to define more complex environments such as 2D or 3D environments, or time dependant parameters. Shaders may be used or applied either in 2D (surface) or 3D (volume) applications. They involve for instance, texture, displacement, bump, reflectivity, specularity, transparency, color, etc.
Procedural maps are well known in computer science, in particular in computered design, imaging or drawing. Three main techniques are currently used in the industry in order to produce maps. These techniques are now examplified in the field of textures. However, similar comparisons are possible in other fields of shader.
First, the use of libraries. Depending on the type of design to prepare, specialized libraries are available to provide a wide selection of existing textures, in various fields, such as wood, stone, clouds, terrain, etc. These “of the shelf” textures are easy to use, and easy to install in a wide variety of different applications. However, they are of a given (finite) dimension. If the application relates to the use of a large size texture, in particular larger than the current size of the standard existing texture of the library, the user has to duplicate the texture a certain number of times, depending on the size of its application. If many duplications are necessary, the resulting “enlarged” texture could look like a kind of puzzle or “patchwork”, using a unique tile or path many times. The resulting effect may be far away from the original intention to provide a uniform and homogeneous wide size texture. In addition to this, the possibilities to modify the resulting large size texture are very limited and necessitate an important amount of work.
The second technique relates to the uses of photographs of original textures. This technique has the same drawbacks as the first one, that is to say the given (limited) size of the image, and the difficulties to modify a texture. For instance, if an original texture is photographed with a given type of light with a certain angle, this may not be appropriate for the particular further use of the picture. Modifications and corrections may only be made using known type image processing tools and software. However, these tools are rather time consuming. Moreover, the formats used to save the related images require important memory space.
The third type of technique relates to the use of known drafting tools such as Adobe Photoshop™, allowing to construct a texture. The preceding drawbacks (except the required memory space) do not, in theory, apply to this technique. However, the time required to produce textures is very important. “Hand-made” textures are thus very expensive to produce because the process is time and resource consuming, and can not be used at large scale at a reasonable cost.
Shaders and textures using procedural maps have been developed in recent years to try to avoid these various drawbacks. However, with current methods, it is not possible to modify the resulting maps, shaders or textures.
To avoid these (and further) drawbacks, the invention provides a method for modifying a procedural map for use with a tree driven procedural map comprising a plurality of levels (at least two levels) each having at least one node associated to at least one parameter, comprising the steps of:
In a variant, the modified parameters are recursively affected to the children nodes of said selected node.
According to an example of the invention, the tree driven procedural map is represented by the following equation:
The possibility to modify a map on a local basis or scale, is possible due to the tree arrangement of the map. Such a structure allows to act locally, for instance on a node or a branch, without affecting the remaining nodes or branches. Moreover, the tree arrangement allows to provide recursive or non-recursive modifications. The method and tools of the invention allow to operate either on a local (node) or global (entire map) basis or scale.
The modifiable parameters are advantageously selected in the list comprising: the morphlet F, the maximum number of levels (jmax).
In a variant, the tree may comprise an intermittency parameter (p). In a further variants, the tree may also comprise a displacement parameter (D), a Hurst parameter (H) (for instance a roughness value), a random value (ν).
In another example, the tree driven procedural map is represented by the following equation:
According to this equation, the modifiable parameters are advantageously selected in the list comprising: the morphlet F, the maximum number of levels (jmax), a Hurst parameter (roughness value) (H), a random number (ξ), an intermittency parameter (p), a displacement value (D).
The procedural map may be a texture map, or the procedural map type may be selected from the list comprising: displacement, bump, reflectivity, specularity, ambient color, diffuse color, specular color, transparency, color, shininess, self-emission, anisotropy, refractive index.
The sum (of the above equations) is advantageously a generalised sum. Thus, any type of operation or function may be provided, such as substraction, maximum, multiplication, etc.
In another variant, the map is time dependant: any, or all parameter may be time dependent. This type of map is very important for many types of applications related to animation, video, etc. The present method and tools also apply to these maps.
The invention also provides a software product, or computer program product readable by a computer and encoding instructions for executing the above mentioned computer process.
The invention also provides a procedural map modification tool for use with a tree driven procedural map comprising a plurality of levels (at least two levels) each having at least one node associated to at least one parameter, comprising:
In a variant, the tool is advantageously adapted for the modification of a tree driven procedural map represented by the following equation:
The tool is advantageously adapted for the modification of at least one parameter selected in the list comprising: the morphlet F, the maximum number of levels (jmax).
In another variant, the tool is advantageously adapted for the modification of a tree driven procedural map represented by the following equation:
In a variant, the tool is advantageously adapted for the modification of at least one parameter selected in the list comprising: the function F, the current level (j), the maximum number of levels (jmax), a Hurst parameter (H) (roughness value), a random value (ξ), an intermittency parameter (p), a displacement value (D).
The node selection tool is advantageously provided with a “deepness” selection unit allowing the selection of a given level (j) of said tree.
The node selection tool advantageously comprises a movable screen target, for the localisation and/or selection of a node-object. The movable screen target may be operable with a computer cursor displacement device.
The map modification tool is advantageously comprised in a tree driven procedural map generation tool.
The invention also provides a procedural map generation tool, for the generation of tree driven procedural maps comprising a plurality of levels (at least two levels) each having at least one node associated to at least one parameter, comprising:
The procedural map generation tool advantageously comprises an output for a map display unit, allowing the presentation of said map on a display.
Objects, features, advantages and alternative aspects of the invention will become apparent to those skilled in the art from a consideration of the following detailed description taken in combination with the accompanying drawings, which illustrate:
FIGS. 1 to 20 illustrate different examples of layers and maps;
FIGS. 21 to 25 illustrate examples of local modifications on maps;
FIGS. 26 to 30 show examples of different trees:
FIGS. 32 to 37 illustrates examples of interfaces of the tool of the invention.
The present invention is based on the use of tree driven procedural maps. FIGS. 21 to 25 illustrate examples of structures of such a tree (in the specific case for which n=1, wherein n is the dimension of the support. For instance, n=2 for an image, n=1 for a curve, n=3 for a volume). In the example of
forming a tree T, and also represented in this document by:
The effect of each parameter, from one level to another one, is thus clearly visible. The parameter j indicates the current level, the parameter k allows the displacement of a node-object, in this example from the center of the map to the center of a quarter. The morphlet F remains unchanged from one level to the other.
FIGS. 6 to 10 are comparable to FIGS. 1 to 4, but with a different morphlet: F(x,y)=exp(−x2−y2). The resulting node-object is then a two dimensional Gauss type function, instead of a disk. The comparison of the figures of similar layers, for instance
The comparison of
In the previous examples, from level j to level j+1, the support size is divided by two. If the amplitude of the function or morphlet to sum is kept unchanged, the energy level in the node-object is doubled. To avoid this situation, and to control the energy level from one level to the other, the equation may be adapted (adding 2−j to the equation), with the following result:
In the previous examples, the maps are always configurated with a uniform structure, systematically repeated at each level or layer. The resulting maps, in particular when used to define procedural textures, may sometimes have a tendency to look rather <<artificial>>. This is mainly due to the fact that natural objects are in general not based on such uniform, and rigourously repetitive structures. Thus, in order to better simulate natural objects, the mathematical equation, in a further variant, may be completed with a random number ξ(j, k).
The resulting mathematical equation is thus:
where ξ is a random number.
In the case of a map having of a tree structure including a random number, the tree is no longer homogeneous and the distribution of the different node-objects is based on a given random law for ξ(j, k).
In a further variant, the mathematical equation may still be optimised with the use of a HURST parameter, designated H. For a given map, H is advantageously a constant. For example, Hε[0, 1]. This parameter contributes to the management of scale laws in self-similar processes. With the use of this parameter, the tree driven sum process is then self-similar by itself. Following such a law, even after a change of scale, a similar object is observable as before the scale modification. For instance, a cloud fragment looks like a complete cloud. H is also linearly linked to the fractal dimension. For a low value of H, the signal is irregular, and the fractal dimension is high. In texture maps, the Hurst parameter corresponds in practice to a roughness parameter. With H→1, the surface is smoother; with H→0, the surface becomes rougher, as illustrated in FIGS. 14 to 16.
In
In
In
The resulting mathematical equation is then:
In another variant, the mathematical equation may be further improved with the addition of Tp representing a tree provided with an intermittency parameter (p), and
The tree structure or configuration also allows to provide a further specific effect or map modification, with a further parameter, D, corresponding to a displacement of one of more nodes from their original positions.
The corresponding equation is then:
Of course, different equations are also possible, by the suppression or addition of one or more parameters, for instance in the different sequence than the one presented in the previous examples. Any other equation using a different combination of these parameters is also considered within the scope of the present invention.
According to the invention, the map generation/modification tool 10 comprises a node selection tool 20, having a level (J) selection unit 21 and a node selection unit 22, which allows the selection of a node in the selected level. In practice, as described herebelow, the user will select a layer (corresponding to a given level (j)) and a node-object (corresponding to a node (k)).
The map generation/modification tool 10 also comprises a parameter setting tool 30 allowing to select a parameter to modify and set its value (either new or modified). To perform a modification of a given map 50, a node 41 or a plurality of nodes shall first be selected. The node selection tool 20 provides this possibility. Such a tool is advantageously provided with at least two features or functions: a level selection unit 21, such as a cursor, as in
The node selection unit is provided with a mobile screen target 23. The movable screen target 23 is advantageously shaped in order to delimit at least one node-object 51 in a given layer. In the various examples, the display 23 is of a substantially square shape. To make easier the selection of nodes, the tool is advantageously provided with a displacement mode such as to allow the automatic positioning of the display on a node-object or a set of nodes, for instance the nearest ones, when the movable screen target is not properly positioned on a given node-object. The movable screen target may be controlled with any known computer command such as a mouse, a pointer, keyboard keys such as for instance the arrows, or a remote control unit such as a command software, circuit or machine. It may also be controlled directly from the interface of the node selection tool 20, for instance with a cursor 24 controlling the positioning of the movable screen target 23 in the map.
In addition to
The node selection tool 20 is advantageously provided with a node enhancement feature, allowing to indicate to the user which nodes are selected. Such an indication may be provided either with a change of color or brightness or with a flashing mode, or any other visual indication.
The map modification tool 10 is also preferably provided with a deepness selection unit 26, allowing to user to indicate if the modifications relate only to the nodes of the given level, or if the sub-trees shall also be modified accordingly. In such a case, all dependent nodes, or a certain proportion or percentage of them are modified with the selected nodes with the same modifications.
The parameter setting tool 30 allows first to select which parameter shall be modified, and the new value of this parameter. The parameter setting tool 30 allows the selection and modification of at least one parameter, and preferably of many parameters, such as, for instance the parameters previously described in this document: F: 34, H: 35, ξ: 36, p: 33, D(x): 31, D(y): 32.
The map modification tool 10 preferably comprises two modes: Global (G)/Local (L). The global mode is selected with selector 37 to modify an entire map. The level and node selection units are then either not used or desactiviated. The modification of one or more parameters is performed as described earlier, but, according to this mode, it applies to the complete map, and the step relating to the selection of a level and a node-object are not required. If the local mode is selected, local modifications are possible. Local modifications means modification performed at the scale of the node-objects, for at least one node-object.
As a variant, the modification tool 10 may provide the possibility to delete or suppress a node or a set of nodes.
FIGS. 21 to 25 illustrate examples of map modifications, performed on a local scale, with the tool and method according to the invention.
Further local modifications are performed. In
The following morphlet corresponds to
Further examples of modifications are provided in FIGS. 33 to 37. In
It should be realized that while the preferred embodiment of this invention is described and illustrated with texture maps, the method and device of the invention could also be implemented for use with other types of maps. For instance, in the field of shader, the method and devices of the invention also applies to the following types of maps: displacement, bump, reflectivity, specularity, ambient color, diffuse color, specular color, transparency, color, shininess, self-emission, anisotropy, refractive index, etc.
In an alternative embodiment, the present invention could also be provided as a plug-in to an existing software.
The above described arrangements are only used for example only. Modifications and alternative arrangements could be provided by those skilled in the art without departing from the spirit and scope of the present invention. The appended claims are intended to cover such modifications and arrangements.
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/EP04/00661 | 1/12/2004 | WO | 7/11/2006 |