Zurück: Texturen and Materialien

Weiter: Mehr Texturen



5.1 Texturen

Texturen bestimmen das Aussehen und die Eigenschaften von Oberflächen, wie Farbe, Reflektion, Transparenz, und Rauhigkeit ect. Es gibt 4 Arten von Texturen in Art of Illusion: Uniform, image-mapped, prozedural 2-D und prozedural 3-D. Diese sind hier unten im Detail beschrieben. Wählen Sie Szene->Texturen um eine neue Textur zu erstellen oder eine vorhandene zu editieren. Dabei öffnet sich diese Dialogbox:

Die meisten Optionen sind hier selbsterklärend. Falls bereits Texturen erstellt und in der Liste sind, kann man sie mit Löschen (Delete) aus der Liste entfernen, mit Bearbeiten (Edit) kann man die Textur in ihren Parametern verändern und Kopieren (Copy) erwartet die Eingabe eines Namens für die kopierte Textur - die bis zur Bearbeitung identisch mit der Ursprungstextur ist.

Import ermöglicht Texturen aus anderen AoI Dateinen in díe aktuelle Datei zu importieren.
Neu (New) auswählen öffnet den rechten Dialog:

HIer können Sie einen Namen für Ihre Textur eintragen und den Typ aus der Dropdown Liste wählen.


Einmal erstellt können Texturen jedem 3D Objekt zugewiesen werden und können in jeder gewünschten Art gemappt werden indem ihre Skalierung, Orientierung und/oder ihre Position relativ zum Objekt angepaßt werden. Texturen können auch in Layern übereinander gelegt werden, um komplexe real wirkende Oberflächen nachzuahmen.


5.1.1 Uniforme (homogene/einheitliche) Texturen

Uniforme Texturen sind die einfachste Art von Texturen in Art of Illusion. Diese verleihen den Objekten diverse Oberflächeneigenschaften gleichmäßig (uniform) auf das ganze Objekt verteilt. Um nun eine uniforme Textur kreieren einfach nur auf Szene -> Texturen und dann im Texturendialog auf Neu und Uniform klicken. Das bringt diesen Dialog hervor:


Eine gerenderte Kugel oben im Dialog zeigt die aktuelle gewählte Textur an. Auf die Vorschau doppelklicken zeigt folgenden Dialog an:

Das ermöglicht die Ansicht zu rotieren und zu zoomen und andere Objekte als die Kugel zur Vorschau zu nutzen.

Die Vorschau kann mit Hilfe der gedrückten STRG Taste und dem Auf - und Abziehen des Mauscursors gezoomt werden, während man mit gedrückter rechter Maustaste panen kann.
Hier unten sind die verschiedenen Eigenschaften die verändert werden können. Es gibt 4 Farben die bestimmt werden können. Einfach auf das Farbfeld klicken - das öffnet das Farbfeld zur Rechten.

Farben werden in 3 möglichen Farbmodellen bestimmt: Farbschattierung, Sättigung und Ausprägung (HSV), Rot, Grün und Blau (RGB) oder Farbschattierung, Sättigung und Helligkeit (HSL).

Die 4 Farbeigenschaften sind:

Diffuse Farbe (Diffuse Colour)
Das ist die Basisfarbe des Objektes. Bei Abwesenheit anderer Eigenschaften sieht das Objekt so aus.

Reflektierende Farbe (Specular Colour)
Die reflektierende Farbe ist die Farbe die vom Objekt reflektiert wird. Dies funktioniert nur wenn der Wert größer als 0 eingestellt wird. (S. unten).

Transparente Farbe (Transparent Colour)
Wenn die Transparenz größer als Null gesetzt ist, ist es diese Farbe, die durch das Objekt hindurchgeleitet wird. (S. unten).

Emissive Farbe (Emissive Colour)
Diese Eigenschaft wird benutzt um leuchtende Objekte zu simulieren. Die gewählte Farbe wird vom Objekt ausgesender (emittiert). Einige Beispiele sind unten zu sehen. In diesen Beispielen wird die Farbschattierung und Sättigung benutzt, die auch für die diffuse Farbe benutzt wird - und das mit varierenden Werten. Die V-Werte der HSV Farben sind direkt proportional zur emittierten Lichtmenge. Deshalb ist das Zuweisen der Helligkeit über das HSV Farbmodel sicherlich am geeignetsten.



Unter den Farbeigenschaften sind 5 numerische Werte verschiedener Eigenschaften einstellbar per Schiebregler oder mit einem Eintrag in das Werte Feld.

Transparenz (Transparency) ist der Grad zu dem das Licht durch das Objekt hindurchgeht. Ein Wert von 1 bedeutet das das Objekt komplett durchsichtig ist, - während ein Wert von 0 bedeutet das das Objekt komplett Opaque (undurchsichtig) ist. Die Bilder unten zeigen Objekte mit einer Transparenz von 0.5. Die Auswirkung der Variierung der Transparenten Farbe ist hier gezeigt. Normalerweise wird ein durchsichtiges Objekt das Licht in einer ähnlichen Farbe wie seine diffuse Farbe hindurch lassen. Aber in der Computergrafik sind wir darauf nicht zwingend angewiesen - und können die Realität verbiegen.

Spekularität ist die Reflektivität des Objekts. EIn Wert von 1 bedeutet das das Objekt ein perfekter Spiegel ist, und seine diffuse Farbe ist dann nicht zu sehen. Ein Wert von 0 ist komplett nicht spiegelnd.

Die Bilder zur Rechten zeigen alle Objekte mit der Spekularität 0.3 und zeigen den Effekt der Variation von Reflekierende Farbe.

Plastikartige Objekte reflektieren normalerweise das Licht weiß während metallische Objekte dazu neigen ihre Refelktionen in der diffusen Farbe zu mellieren. In den Beispielen hier sind Farbschattierung (Hue) und Sättigung (Saturation) der diffusen Farbe auch in der Reflekierende Farbe benutzt worden - mit verschiedenen Werten und verglichen mit der "plastik-weißen" Spekularität.


Zusätzlich zur Spekularität ist der Parameter Glanz (Shininess) der die Intensität von Glanzlichtern kontrolliert. Obwohl glänzende Oberflächen eigentlich nur durch Spiegelungen hervorgerufen werden, ist der Glanz-Parameter sinnvoll wenn man z.B. plastikartige Oberflächen darstellen will ohne eine Spiegelung einzusetzen. In den meisten Fällen wollen Sie beides einsetzen Specularität und Glanz. Weiter hier unten sind Beispiele mit verschiedenen Glanz Werten - mal mit, mal ohne Spiegelung.


Rauhheit (Roughness) Dieser Parameter kann genutzt werden um den Effekt von Rauhigkeit auf Oberflächen nachzuahmen, der die Schärfer und Spiegelung einer Oberfläche herabsetzt. Hohe Werte ergeben stärker "geblurrte" Spiegelungen und weitgezogenen Highlights wie unten gezeigt. Beachten Sie bitte das dafür der Glanz/Lichtdurchlässigkeit "enabled" sein muß in den Rendersettings des Raytracers (siehe Rendering) um den Effekt zu sehen.

Wolkigkeit (Cloudiness) kontrolliert den Grad der Tansluzenz für tranzparente Objekte. Höhere Werte verursachen stärkeres Blurring des transmittierten Lichtes wie unten gezeigt. Wie auch beim Rauheit Parameter muß dafür der Glanz/Lichtdurchlässigkeit während des Renderns "enabled" sein.




5.1.2 Bild basierte/gemappte Texturen


Diese Art der Textur ermöglicht die Oberflächeneingenschaften anhand eines 2-D Bildes anzugeben. Diese Bilder werden normalerweise in 2-D Malprogrammen erstellt. Um eine neue bildbasierte Textur zu erstellen klicken Sie einfach auf Szene->Texturen, dann auch Neu klicken und Image Mapped aus der Dropdown-Liste wählen. Folgender Dialog erscheint daraufhin:

Dieselben Oberflächeneingenschaften wie in den Uniforme Texturen Dialog sind hier auch vorhanden. Diesmal sind aber Farbe und Werte bestimmt durch die Auswahl von 2-D Bildern. Das bedeutet die Werte der Parameter variieren über die Objekt Oberfläche entsprechnde dem(n) verwendeten Bild(ern) - anstatt gleichförmig zu sein.

Auf der linken Seite der Dialogbox sind die diffuse, reflektierende, transparente und emissive Farbe angeordnet. Wenn Sie die quadratische Box zur rechten des Textes anklicken, öffnet sich ein Dialogbox die 'Images' heißt. Klicken Sie auf Laden um ein neues Bild einzulesen. Das Bildformat kann dabei *.jpg, *.png, *.gif oder *.hdr sein. Einfach ein Bild finden und dann "Öffnen" um es in den Dialog aufzunehmen. Ein "Thumpnail" Bildchen davon wird sichtbar. Das Bild kann mit einem Klick selektiert werden - dann auf OK klicken. Wenn kein Bild gewünscht ist einfach auf Nichts auswählen klicken.

Beachten Sie das rechts vom Bild immer noch eine "uniform colour" Box ist. Die Farbe die Sie hier wählen beeinflußt das ausgewählte Bild gleichförmig/gleichmäßig.

Wie auch beim Uniform Textur Dialog, wird mit einem Doppelklick auf das Vorschau- Fenster eine Auswahl für das Vorschau Objekt gezeigt. Die Vorschau kann gezoomt (STRG + RMB hoch und runterziehen) und gepant werden (RMB + ziehen).


Die Bilder unten rechts zeigen die Auswirkung vom Zuweisen der Bilder zu den verschiedenen Farbeigenschaften. Das Bild selbst ist links davon gezeigt:



Auf der rechten Seite des Image-mapping Dialoges sind numerische Eigenschaften einzustellen. Die Eigenschaften Transparenz, Specularität, Glanz und Wolkigkeit die auch im Uniform Texturen Dialog verfügbar sind da zunächst, aber zusätzlich sind weitere Eigenschaften vorhanden; Bump Höhe and Verdrängung (Displacement). Diese kontrollieren die "Hügeligkeit" einer Oberfläche. Bump Mapping variiert die Oberflächennormale so, das man glaubt die Oberfläche wäre hügelig oder rauh, während Verdrängung (Displacement Mapping) tatsächlich die Geometrie verändert.

Bei Bildbasierten Texturen ist die Stärke der Tranzparenz, Spiegelung usw. von der gewählten Imagemap bestimmt, die ausgesucht wird indem man auf die quadratischen Boxen neben der Schiebereglern klickt. Wenn kein Bild ausgesucht wurde/wird kann eine gleichmäßige Farbe mit Hilfe der Slider ausgewählt werden. Wenn jedoch ein Bild ausgewählt wird. dann variieren die Eingenschaften über die Oberflächen entsprechend dem Bild. Sie können auswählen, ob mehr die Roten, Grünen oder Blauen Werte benutzt werden um diese jeweiligen Eigenschaften zu bestimmen (in der Stärke). Dieses Auswählen der bestimmenden Farb- Komponente geschieht mit dem Dropdown Feld zur Rechten des Dialogs. Für Bilder die einen Alpha-Kanal oder Transparenz unterstützen (Gif und PNG) wird - sofern so ein Kanal im Bild vorhanden ist eine Komponente namens Mask verfügbar. Das kann hervorragend genutzt werden um Effekte auf der Oberfläche zu begrenzen. Zudem kann der Grad der Transparenz genutzt werden um die Stärke des Effektes zu beeinflußen - natürlich nur im Rahmen des Wertes der mit dem Slider eingestellt wurde. Der am häufigsten auftretende Verwendungsgrund für Masken ist die Textur an bestimmten Stellen durchsichtig zu machen - also im Transparenz Kanal (s. untenstehendes Beispiel). Aber die Benutzung einer Maske kann eben auch in jedem anderen Kanal/Eingenschaft sinnvoll sein.



Die Schieberegleer (Sliders) ändern die Stärke des jeweiligen Effektes. Auf diese Weise kann man nur Teile der Oberfläche transparent oder glänzend aussehen lassen. Einige Beispiele sind hier unten zu sehen:



Der Imagemap Dialog ermöglicht auch eine Kachelung (tiling) des Bildes (default: Angestellt) - es wird also endos aneinandergereiht - so das die gesamte Oberfläche des Objekts immer bedeckt ist- auch wenn das Bild kleiner skaliert ist, als das Objekt. Auch kann das Bild in beide Richtungen gespiegelt werden.

(Pixel)Bilder die für Texturen benutzt werden können über Szene -> Bilder direkt gehandhabt werden. In diesem Dialog können Bilder geladen, gesichert und/oder gelöscht werden. Diese Bilder werden in der AoI Datei ohne weitere Komprimierung (als die der AoI Datei selbst = verlustfrei) gespeichert.


5.1.3 Prozedurale Texturen


Procedurale Texturen sind solche, in denen die oben beschriebenen Eigenschaften mit Hilfe mathematischer Algorithmen beschreiben werden. Es gibt 2 Arten von prozeduralen Texturen in Art of Illusion: Prozedurale 2D und prozedurale 3D Texturen. Die 2D Texturen kann man sich als "bemaltes Blatt Papier" vorstellen die um das Objekt herumgewickelt werden - so wie in der Sektion Mapping (siehe 5.1.4) beschrieben. Prozedurale 3D Texturen andererseits, sind sozusagen "Körperliche - solide" Texturen und Objekte denen si ezugewiesen werden sehen aus als wären sie aus einem Block dieses Materials herausgeschnitten worden.

Das graphische Interface (Gui) sieht jedoch für beide Typen fast identisch aus - somit werden beide in diesem einen Abschnitt beschrieben.

Um eine neue prozedurale Textur zu erstellen gehen Sie auf Szene -> Texturen klicken auf Neu und wählen Prozedural 2D oder 3D als Textur Type. Es wird folgender Dialog erscheinen:

Es wird dazu ein Vorschaufenster angezeigt das die aktuelle Textur im Editor darstellt - auf einer Kugel. Das Vorschau Fenster wird automatisch upgedatet wenn die Textur verändert wird. Die Größe des Vorschaufensters kann geändert werden, indem am an einer Ecke zieht. Ebenfalls kann in das Vorschaufenster gezoomt (STRG ziehen mit RMB) werden und ein Drehen (MMB) wie Verschieben (schieben mit RMB) des Vorschauobjektes ist ebenfalls möglich. Wie im Uniformen Texture Dialog kann mit Doppelklick auf das Vorschaufenster ein Dialog aufgerufen werden, der es ermöglicht die Art des Vorschau Objektes einzustellen.



To start with, the preview shows a uniform white texture as this is the default. Please note, however, that 2D textures are shown using projection mapping (link to mapping section), whereas 3D textures are shown using linear mapping. Thus, the same procedural texture might look different for the 2D and 3D preview. All the following examples in this section have been created using 3D procedural textures. As an exercise, you might want to check if they look different for a 2D procedural texture, and if it's the case, why.

The boxes at the right hand side of the procedural texture editor show the surface texture properties that were described above for the other type of textures. The idea of the procedural texture editor is to pass values (either colours or numbers) into the relevant property boxes. This is done by inserting values, functions and transforms and connecting them to the property boxes. This produces a set of values which are calculated for each point on the surface thus creating the texture. Values, functions etc are inserted from the Insert menu of the procedural texture editor.


Let's take a simple example: a uniform diffuse colour. Click on Insert -> Values -> Color. A small square is placed on the blank texture 'canvas' which looks like To apply this colour, connect it to the Diffuse colour box by clicking on the pink solid arrow on the end of the 'color' box, hold the mouse button down, drag to the pink arrow on the Diffuse box and let go. A line should now be displayed connecting the 2 boxes The preview window will be unchanged since the colour in the 'Color' box is white by default. Double-click on it and the colour chooser dialogue will be displayed. Select the colour of choice and click on OK. The preview window will now show the new uniform diffuse colour texture.

Each of the values, functions etc. boxes selected from the insert menu has at least one output (shown as arrows pointing outwards) which is either a colour or a number; pink arrows indicate colours, black arrows are numbers. To be precise, the outputs are a set of values representing the colour or value at each point on the surface. Most also have at least one input value which are shown as arrows pointing inwards.

Let's try something slightly more complicated; a gradient across the surface. Click on the 'Color' box and press delete to remove it. This time, click on Insert -> Color Functions -> Custom. This produces a colour map . Connect the output of this to the Diffuse property box. The preview now shows a black sphere. This is because the colour chosen from this colour map depends on the input black solid arrow of this box. If you click and hold on this arrow, you will see that it says Index (0) meaning that the colour map function requires an index and the default for this is 0 which corresponds to black in the colour map. To get a gradient, we need the colour selected from this map to vary according to its spatial position. So, if the gradient is going to run in the X direction, we need to input X to the colour map box. Click on Insert -> Values and select X from the list. This produces a box labelled X. The output from this box is the x value of each particular point on the surface. Connect this output to the input of the colour map and the preview window will now show a gradient as shown below:



If we had connected a Y box to this, we would have got a gradient in the y-direction. What if we wanted a gradient diagonally ? In this case, we need to feed (X+Y) to the input of the color map. Select both X and Y from the Insert -> Values menu. To perform an addition, we need to select Insert -> Functions -> Add . Then connect the outputs of the X and Y boxes to the input arrow of the Add box, and the output of the Add box to the input of the color map as shown on the right:

There is another way we could have achieved this. Under the Insert -> Functions menu is a powerful function called Expression. Select this and double-click on it. This function allows the entry of any mathematical expression of x,y,z, time and the box inputs. Enter 'x+y' in the box and click OK. Connect the output of this box to the gradient and the same effect is achieved. This is also shown on the right:


Let's look now in more detail at the values, functions and transforms available.

Values

This is the Insert -> Value menu.

Most of the entries here are self-explanatory:

Number inserts a box with a single constant number. Double-click to change the value.

Color inserts a single constant colour box. Double-click to bring up the colour chooser dialogue to change the colour.

X, Y and Z simply bring up boxes with the x,y,and z values at each point on the surface. For procedural 2D textures, Z is zero.

Time This inserts a box, the output of which is the time value. In animations, this value will change and thus textures, themselves, can be animated.


View Angle This module can be used to vary surface properties of an object depending on the angle between the camera and the point on the surface. It has uses in simulating Fresnel effects where the specularity is less at near normal angles of incidence and increases at glancing angles. The View Angle module outputs the Cosine of the angle of incidence and the example below shows how it can be used to generate a Fresnel effect: In this example, the procedural texture shown below left was used to make the left vase more 'plasticky' by enhancing reflections at glancing angles. The metallic vase on the right has a higher specularity which is also applied uniformly.


This module has many other uses, one of which is a simple 'toon' texture as shown below:



Parameter This allows textures to be dependent on user-defined parameters which can be specified when mapping the texture indivually for objects and even for particular parts of objects. See Texture Parameters for more details.

Comment Thus module is purely a text box allowing comments to be placed in the procedure, e.g. to describe parts of the procedure as shown in the example below:


Functions

This is the Insert -> Function menu.

These entries are applied to numerical values to modify them in various ways:

Expression allows the entry of any mathematical expression of x, y, z, t (representing time) and any of 3 inputs to the box. The inputs are identified as input1, input2 and input3.

Expressions can use the following mathematical operations: +,-,/(division),*(multiplication), ^(to the power of),%(modulus) and can contain the following functions: sin(a): sine of a, cos(a): cosine of a, sqrt(a): square root of a, abs(a): absolute value of a, log(a): natural logarithm of a, exp(a): e to the a power (same as e^a),min(a, b): minimum of a and b, max(a, b): maximum of a and b,pow(a, b): a to the b power (same as a^b), angle(a, b) : the angle formed by a right triangle with sides a and b, bias(a, b): the Bias function with a bias of b,,gain(a, b): the Gain function with a gain of b.
The constants, pi and e are also recognised.

Custom allows a curve to be drawn relating the output to the input. New points can be added by <ctrl> clicking on the graph and existing points can be moved by clicking and dragging. The curve can be smoothed by checking the appropriate box. In addition, the function can be made periodic, i.e. it repeats itself forever outside the 0-1 range. Otherwise, input values less than 0 produce the same output as an input of 0 and input values greater than 1 give the same outputs are input values of 1.

Scale/Shift multiplies the input value by a constant value and adds an offset value. Double-click on the box to alter both these values.

Add, Subtract, Multiply, Divide These boxes each have 2 inputs which are added, subtracted (bottom input from top input),multiplied together or divided (top divided by bottom) depending on the operation selected.

Abs returns the absolute value of the input, i.e. if the input is greater than 0, there is no change, if the input is negative, the positive value is returned (e.g. -5 becomes +5).

Blur Produces a blurring effect. There 2 inputs, one is set of values that you want to apply the operation to, the other is a value defining the amount of blurring. More accurately, this second value is the range over which the smoothing is performed.

Clip This function limits the input to be within a range specified by double-clicking the box. Input values between the limits are unchanged, values less than the minimum are set equal to the minimum, and inputs greater than the maximum are set equal to the maximum.

Greater Than returns 1 if the top input is greater than the bottom and 0 otherwise.

Min, Max Both these have 2 inputs. These are compared and the minimum or maximum respectively is returned as the output.


Interpolate outputs a value based on 3 inputs. Value 1 and value 2 (top and bottom inputs) specify the maximum and minimum and the fraction input determines the value between the min and max. For example, if the fraction was 0.5, the output would be half-way between the extremes, if it was 0.25, the output would be a quarter of the way between them etc.

Mod has 2 inputs, the dataset to be operated on and a Modulus value. It returns the remainder of dividing the dataset input by the Modulus, e.g if the input was 5 and the Modulus was 4, the output would be the remainder of dividing 5 by 4 which equals 1.

Sine, Cosine, Square Root, Exponential, Log These are straightforward mathematical expressions with a single input and output. The inputs for Sine and Cosine are in radians. The Log module is a natural (i.e. to the base e) logarithm.

Power The output of this is the left input to the power of the exponent (top input).

Bias This module calculates Ken Perlin's Bias function. Given an input value between 0 and 1, it calculates an output value which is also between 0 and 1 according to: y(x) = x^(log(B)/log(0.5)) where the input value x and bias B correspond to the two input ports. If B=0.5, then y(x)=x. Values of B less than 0.5 push the output toward smaller values, while values of B greater than 0.5 push the output toward larger values.

Gain This module calculates Ken Perlin's Gain function. Given an input value between 0 and 1, it calculates an output value which is also between 0 and 1 according to: y(x) = Bias(2*x, 1-G)/2 if x<0.5 1-Bias(2-2*x, 1-G)/2 if x>0.5 where the input value x and gain G correspond to the two input ports, and Bias(x, B) is the Bias function described above. If G=0.5, then y(x)=x. Values of G less than 0.5 smooth the input by pushing the output toward 0.5, while values of G greater than 0.5 sharpen the input by pushing the output toward 0 or 1.

Random This is a one-dimensional random noise pattern. It has 2 inputs, one of which is the dimension over which the random noise is applied and the other is the amount of noise. The input dimension is time by default as this function is most commonly used to vary position/rotation during an animation. This function could, however, be used to create random patterns in space or, indeed, to apply random variations to texture patterns. Also, similarly to some of the Patterns described below, double-clicking the Random module allows the Amplitude and number of Octaves to be specified. See the description of the Noise pattern below for more details of these parameters.

Color Functions

This is the Insert -> Color Function menu.

These functions are used to create or change colour values in various ways:

Custom As we have already seen, this is used to created colour maps from which colours are selected depending on the input numbers. The default colour map has black at one end and white at the other. Double-click on the colour bar box to edit it as shown on the right. To change a colour, click on the small arrow beneath it on the bar - the arrow will turn red to show it is selected. Then click on the colour square which will display the colour chooser dialogue to enable a new colour to be selected. Colours can be added to the colour map by clicking on Add. This creates a new arrow on the bar which can be coloured as required. The positions of the colour along the bar can be altered either by dragging the arrows to the required place or by entering a number between 0 and 1 into the Value box. The colour map can be made periodic by checking the appropriate box. This means that the colour map repeats itself indefinitely for all points on the surface. If not selected, then parts of the surface outside the map will be a uniform colour the same as the appropriate end of the colour bar.

Blend is another way of defining a colour from a range. It takes 2 input colours and blends them according to the numerical input. The important difference between this and the custom colour function is that the colours are inputs are can thus be created by other functions. This is a simple example where one of the colour inputs is a fixed red colour and the other is a colour selected from a custom colour map. The function selecting the colour from the map is simply Y so this would create a gradient in the Y direction. The colour selected and fed into the blend function thus varies from white to black depending on the Y position. This then gets mixed with red according to the X position which is the function fed into the Blend colour function. Obviously much more complicated functions can be defined.


Add, Subtract, Multiply are simple functions that take 2 colour inputs and perform the appropriate mathematical operation on their RGB components.

Lighter, Darker Both these functions take 2 colour inputs and output whichever of the 2 colours is lighter or darker. This is determined by the luminance component of the CIE XYZ color system.

Scale allows the input colour to be scaled by a numerical input. Each component of the input colour is multipled by the input number. One somewhat hidden feature of the colour Scale module is that it can be used to increase properties such as Specularity, Shininess, Transparency etc beyond their normal maximum value of 1. This is done by scaling the appropriate colour (i.e. Specular Color for Specularity and Shininess, Transparent Color for Transparency) by numbers greater than 1. The resulting property value is the product of the scaled colour value and the Number input to the property. An example is shown below: In the left hand image, the Specular Color is white (i.e. Hue-0, Saturation-0 and Value of 1) and the Shininess is set to 1. The overall Shininess is then the product, i.e 1 x 1 = 1. The right hand image uses the Scale module to increase the Specular Color Value to 20; the product is thus 1 x 20 = 20 and the result is a much (artifically) brigher specular highlight which could, for example, be used as a cartoon-like shiny texture.



Another use is with emissive textures; the Scale can be used in a similar way to increase the light produced by an emissive object when rendered with Global Illumination. The image below shows the effect of applying the colour Scale module to the Emissive Color; the numerical inputs to the Scale module being 1,2,5 and 10 respectively: The image was rendered with Photon Mapping for Global Illumination.



RGB This module allows Red, Green and Blue components to be determined via numerical inputs. is a seemingly simple function, its power lies in the fact that the components are inputs are can therefore be calculated by other function combinations. In the example on the right, the Red component is determined from a Noise module, the Green component is obtained from a Wood pattern and the Blue component is dependent on the View Angle to the Power of 3.


HSV As with the RGB module, this function has 3 numerical inputs; one for each of the colour components. This time the Hue, Saturation and Value components can be controlled via numerical inputs as shown in the simple example on the right in which the Hue is determined by the x-position.


HLS As with the previous two modules, this function has 3 numerical inputs; one for each of the colour components. This time the Hue, Lightness and Saturation components can be controlled as shown on the example on the right in which the Lightness varies sinusoidally and the Saturation is determined from a scaled Cells pattern.


Transforms

The modules in this menu perform transformations on the co-ordinate system. This is the Insert -> Transforms menu:



Linear
This module allows scaling, rotation and translation of x,y or z. Double-clicking on the box brings up a dialogue allowing entry of the relevant transformation parameters.

An example is shown on the right. Here is the same basic texture we had in the HSV example above. The X output of the linear transform is fed into the Hue component of the HSV colour function. With the default transformation settings, this would result in the same texture as before. However, a scaling factor of 5 has been entered in the x column and a 45 degree rotation has been applied in the z-axis to produce the modified texture seen.


Polar
The polar module transforms the linear co-ordinate system of x and y to the polar co-ordinate system defined by r (radial distance) and theta (angle). An example is shown on the left.

The top example shows the result of feeding the r co-ordinate into the Hue of the HSV function producing a pattern where the colour is the same for points at the same distance from the centre, thereby producing rings of colour.

Similarly with the theta co-ordinate, points at the same angle have the same colour as shown in the lower image.


Spherical
This transforms the linear co-ordinate system to a spherical coordinate system.

The example on the right shows an example using the Grid pattern (see below). This is used to select a colour from the custom colour function giving the result in the upper image.

Applying a spherical transfrom to the co-ordinate system before the Grid pattern produces the image below.


Jitter
This transform keeps a linear co-ordinate system but applies a random jittering effect. Double-clicking on the box displays a dialogue allowing control of the amplitude of the jitter and the range over which the jittering takes place.

In the example on the left, we have the texture used as an example above under 'Polar'. This ordinarily produces a set of rings of different colours. This time, however, a jitter has been applied to the x and y co-ordinates of amplitude 0.5. The top image shows the effect with a scale of 1 and the lower image shows what happens when this scale is reduced.



Patterns


There are several pre-defined texture patterns in Art of Illusion accessible through the Insert -> Patterns menu as shown on the left. Each pattern has 3 inputs for x, y and z coordinates.
Below we will look at each colour pattern and its variations. In each case, the output from the pattern box has been fed into the default custom colour function and then into the Diffuse property box.

Noise

This module creates a fractal noise pattern by adding together several octaves of Ken Perlin's gradient noise function. Each octave has twice the frequency of the previous octave. You can specify the number of octaves to use, and the amplitude of the first octave by double-clicking on the noise box. The amplitude of each higher octave is obtained by multiplying the amplitude of the preceding octave by the value of the noise input port (which is typically between 0 and 1, although this is not strictly required). Because this is an input port rather than a parameter, it does not need to be a constant. This is very useful for creating noise patterns whose character varies over the surface of an object.

The noise function is scaled so that output values will typically be between 0 and 1. Depending on the values of the parameters and the noise input, however, the output value may sometimes go outside this range.

Some examples are given below:




Turbulence

This module is like the Noise module, except that it takes the absolute value of each octave of noise before adding them together. This creates "creases" in the output where its derivative changes discontinuously. The result is somewhat reminiscent of turbulent flows in liquids. The noise function is scaled so that output values will typically be between 0 and 1. Depending on the values of the parameters and the noise input, however, the output value may sometimes be greater than 1.

Some examples are given below:




Grid

This module is useful for creating patterns that are based on a uniform grid. It defines a uniform, three dimensional grid of "feature points". The value at any point is equal to the distance from that point to the nearest feature point. Double-click the module to change the spacing between feature points. Some examples are shown below:




Cells

This texture pattern is similar to the grid function but, instead of the feature points being evenly spaced in a grid, they are positioned randomly. The Cells module box has 3 outputs; The cell port outputs a value between 0 and 1 which identifies the nearest feature point. This value is the same for every point in the "cell" defined by that feature point. This is useful for creating irregularly shaped cells, where each cell is a different color. The distance 1 and distance 2 ports output the distance to the nearest and second nearest feature points, respectively. Distance 1 for the cells pattern is analagous to the grid pattern.

In addition, the distances between each point and the feature points can be calculated using 3 mathematical formula which result in 3 different pattern types; Euclidean, City Block and Chessboard. The type is selected by double-clicking the module box.

The results with each of the 3 outputs and 3 distance types for the default custom colour function are shown below:



The expression distance2-distance1 is a very useful function:

Here, it is plugged into the default custom colour module for the diffuse colour and emissive colour.


Marble

This is a mathematical pattern that simulates marble. In addition to the x, y and z inputs is a noise input. Double-clicking the module box allows the spacing of the marble bands to be altered as well as the noise amplitude and number of octaves. Some examples are given below:



Wood

Not surprisingly, this pattern is useful for producing wood-like textures. Its output for a given point is proportional to the distance from the Y axis, plus a turbulence function. Double-clicking the Wood module allows the various parameters to be altered; noise amplitude, ring spacing and number of noise octaves. Some examples are given below:

If you select the "Only Output Fraction" option, the output is taken mod 1, so that it consists of a series of concentric rings, with the output increasing from 0 to 1 over the width of each ring. The most common use of this module is to send its output into a Custom color function, which creates an appropriate series of color bands. When used this way, it is generally best not to select the "Only Output Fraction" option, and instead to make the color function periodic. Otherwise, the anti-aliasing of the wood function may lead to visible artifacts.

Checker

This pattern produces the checker board pattern so often seen in 3D computer graphic imagery. There are no options for this pattern but the spacings can be altered by applying scaling to the input x, y and z coordinates:


Bricks

This module produces a brick pattern with the 'bricks' having an output value of 1 and the 'mortar' an output of 0. Double-clicking on the module allows the brick height, gap width and row offset to be varied as shown in the examples below:


Image

This module allows the use of an image within the texture. As with image mapped textures, the image must be in either .gif, .png, .jpg or .hdr format. The image module has 5 outputs: a colour map of the image and 4 numerical outputs corresponding to the red, green and blue components and a Mask output which can be used to vary surface properties based on image alpha selections/masks or transparent image regions (see here for more details) .

Double-clicking brings up the dialgue box on the right:

Clicking on the outlined square brings up a dialogue enabling you to select or load an image.

The X-size and Y-size are the relative sizes of the image.

The remaining options allow the image to be tiled (simply repeating ad infinitem) in either the x or y direction or to be mirrored. In the latter case, the images are tiled in such a way that adjacent tiles are mirror images; this allows a seamless blend across the surface.


Below is an example of the image module. The outputs from the module are the colour and 4 numerical outputs in the following order: Red, Green, Blue and Mask. Here the blue stars are being given a glow by applying the Blue output of the image module to a Color Scale module which scales a blue Color module input to the Emissive property box. The Red output (which is most prevalent in the orange star) is being used to control the Specularity and the Colour output is a straight input to the Diffuse property.


Edit Menu

The other menu available in the procedural texture editor is the Edit Menu:

Undo/Redo This allows the last action to be undone or redone.

Cut copies the currently selected modules into the clipboard and deletes them from the procedure.

Copy copies the currently selected modules into the clipboard without deleting them.

Paste creates new copies of any modules placed in the clipboard by the Copy and Cut tools.

Clear deletes the currently selected module(s).

Properties This allows the antialiasing of the texture to be altered. Normally the default value of 1 is fine. Values greater than this will cause more smoothing of the texture.


Example Procedural Textures

The procedural texture tool is a very powerful way of creating surface textures. The above sections have detailed the various modules available but these only go some way to showing how flexible this approach to textures can be. Most of the modules have been demonstrated only using a simple custom colour map plugged into the diffuse colour property. The modules can however be used to vary any of the colour and number properties and a wide variety of interesting textures can be created.

Below are 3 example textures obtained using a small selection of the available modules in slightly more sophisticated ways. Click on the images to find out more about how they were created.










Zurück: Texturen and Materialien

Next: More Textures

Zurück zum Inhalt