You can assign a material to the Texture tag by dragging the material from the Material manager and dropping it into this box. If multiple Texture tags are selected, the material will be applied to all of them. If you click the triangle button next to the Material box, a menu will appear with the following commands:
Removes the Texture tag’s material.
Show In Manager
Displays the Texture tag’s material in the Material manager.
Selects the Texture tag’s material in the Material manager.
Selection enables you to use different materials on different parts of the same object. This is a convenient way to add, for example, labels to objects. First of all you need a Selection tag. You can also enter a name (Selection tag’s Basic tab) by simply dragging the tag into this field.
!!! TAKEN FROM: TEXTURE MAPPING CHAPTER (pp. 871) !!!
The Offset and Length settings define the position and size of the texture in the X and Y directions on the texture envelope. For example, if Length X and Length Y are both set to 100%, the texture covers the envelope completely.
Spherical mapping projects the texture onto the object in a spherical form.
Spherical projection is rarely suitable for flat objects. There is distortion with cylindrical objects also.
This mapping type projects the texture onto the object in a cylindrical shape.
Cylindrical projection is rarely suitable for flat objects. It also leads to distortion when used with spherical objects. When Cylindrical is applied to a cylinder, notice how the pixels near the top and bottom of the texture map are pulled inwards on the caps. You should apply separate textures to the caps.
Flat mapping projects the texture onto the object in a planar direction.
Flat projection tends to be used with flat objects only. The texture is soon distorted when applied to a sphere or cylinder, as the examples demonstrate.
Cubic mapping projects the texture onto all six sides of a texture cube.
The texture is projected from the camera position onto the object. This ensures that, it you project the texture onto a Polygon object and onto a Background object, the two textures match exactly (assuming the Texture tags for both objects use the same Offset and Length values).
You can create various visual effects using Frontal mapping, or perform compositing tricks directly in CINEMA 4D.
You have probably seen science fiction films where characters or spaceships gradually blend into the background using ‘cloaking’. Use Frontal mapping for such effects. For another interesting effect, remove the Background object and move the polygon around!
Spatial mapping is similar to Flat projection. However, with Spatial mapping, the texture is pulled up and to the left as it passes through the object.
Spatial mapping does, however, cause some distortion and as such it is not suitable for photographic images. Spatial mapping is more suitable for structural textures, such as plaster and marble.
If an object has UVW coordinates, you can select them as the projection type. In this case, the texture geometry is fixed to the object surface and is subject to all subsequent movement and deformation applied to the object. UV projection is explained in the UV Edit Menu.
An example of UVW mapping is the page of a book as it is being turned. First you must fix the texture (e.g. ornate text and a pretty picture) to the page using UVW mapping. Next, animate the turn of the page with a deformation. The texture bends with the page.
All of CINEMA 4D’s primitive objects and NURBS objects have UVW coordinates. If you apply a new texture to these objects, the projection type in the Texture tag will default to UVW mapping.
All Polygon objects with UVW coordinates have a UVW tag in the Object manager.
Primitive objects and NURBS objects have internal UVW coordinates and do not have a UVW tag in the Object manager. You can still use UVW mapping with these objects. If you convert a Primitive object or NURBS to a Polygon object, a UVW tag will appear in the Object manager.
You may be wondering why there are three coordinates (UVW).
What’s the third coordinate for?
Conventional textures have two coordinates, one for the horizontal position (X) and one for the vertical position (Y). In order to make it clear that the coordinates refer to a texture, X is renamed U and Y is renamed V. Two coordinates (U and V) would be sufficient were it not for 3D shaders. These are three dimensional textures and as such they require a third coordinate (W) in order to be fixed to the object.
More than one UVW texture geometry
You can apply more than one UVW texture geometry to an object. Create a new Texture tag for the object, then set the projection you require, such as Flat mapping for a label texture. Next, create new UVW coordinates for the active texture by choosing Generate UVW Coordinates from the Object manager’s Texture menu. The selected Texture tag will be set to UVW mapping and will then deform together with the object.
A new UVW tag is added to the existing ones each time you call Generate UVW Coordinates. A Texture tag (UVW mapping selected) always uses the UVW map directly to its right in the Object manager. This allows you to assign different UVW maps to different Texture tags. If there is no UVW tag to the right of the Texture tag, then the first UVW tag will be used.
The structure of UVW coordinates
What is the structure of UVW coordinates? Imagine a grid divided into a U direction and a V direction (see Figure 1, below).
The UV range starts at 0, 0 and ends at 1, 1. For an upright polygon, 0, 0 describes the top left; 0, 1 the bottom left; 1, 0 the top right and 1, 1 the bottom right. A texture is stretched out between these four coordinates (Figure 2).
But where is the W coordinate in this system? Recall that conventional textures are two-dimensional — the W coordinate is created only when needed. Once created, the W coordinate behaves in the same way as the UV coordinates.
Selective UVW Mapping
CINEMA 4D has two ways of allocating texture projections to polygon selections (rather than to the whole object as described above). The first method is described below. See above for details on the second method.
Selective UVW mapping allows you to apply a different projection type to several regions of the object using the same texture geometry.
Proceed as follows:
The selected polygons use Flat projection while the unselected polygons continue to use the normal UVW mapping. If you deform the object, the texture remains fixed in the selected region.
With this projection type, the center of the texture is fixed to the north pole of a sphere and the rest of the texture is stretched over it. The advantage of this mapping type is that the texture meets itself at the south pole only. This avoids a seam running between the poles. Only a circular section of the texture is used, with the center of the circle corresponding to the center of the picture. The remainder of the picture is discarded.
Suppose you project a texture onto a tube with Flat mapping. If you move the camera around to look at the other side of the surface, you will still see the texture, but it will be the wrong way round. You can solve this problem by using a decal — a material that is projected on one side of the surface only.
The direction of the surface normals for each polygon plays a pivotal role in deciding on which side the texture is mapped. Front is in the direction of the surface normals and Back means in the opposite direction to the surface normals (see Figure 1).
With Flat projection, a texture is projected from the front through to the back of an object. As a result, the texture is also visible where it is not wanted — in this case, on the front as well as on the back of the tube (Figure 2).
You can avoid such problems with decal mapping. Change Side from Both to Front. Now render the tube again. This time the label is visible on the front side only (Figure 3). If the viewing angle (i.e. the camera angle) and the surface normal form an angle of less than 90° to each other, the polygon is a front polygon; otherwise, it is a back polygon (Figure 4).
The only exceptions are for Flat and Spatial mapping. Here there is an additional criterion: the direction of the texture projection’s Zaxis. If the texture’s Zaxis points in the opposite direction to the surface normal and if the viewing angle and surface normal form an angle of less than 90° to each other, the polygon is a front polygon; otherwise, it is a back polygon.
The texture is projected onto the front and back of each polygon, regardless of which mapping type is selected.
You will see the texture where the surface normals point towards the camera. Otherwise, the material is invisible.
You will see the texture only where the surface normals point in the opposite direction to the camera. The material is otherwise invisible.
With camera mapping, the texture is projected from the camera onto the object.
Suppose you want to use a photo and have it interact with your models. For example, perhaps you want a 3D figure to walk behind some of the objects in the photo! Camera mapping can help you to pull off these kinds of tricks.
First, create a Background object. Next, load the photo into the Color channel of a new material. Apply the material to the Background object with camera mapping. For this, you’ll need a camera for projecting the material onto the object. Switch on this camera for the viewport (viewport: Cameras > Scene Cameras).
Now reconstruct (model) any objects in the real picture that the figure (or other objects) will need to pass behind.
For example, if you want a 3D figure to walk behind a crate in the photo, build the crate in 3D (it can be very simple — it is just a screen for the crate texture). Next, project the background texture onto the reconstructed objects (e.g. the crate) using camera mapping. Now your figure can walk behind the crate!.
Attribute manager settings
Drag the camera that should project the texture into this box.
If you click the Calculate button (see below), the size of the texture in pixels will appear here. You can also enter the size manually if you wish.
If the pixel aspect ratio of the image is not 1:1, enter the ratio here. Note that the ratio will always be set to 1:1 when you click the Calculate button, because pixel aspect ratio information is not stored in bitmaps.
Clicking on this button sets the Size X and Size Y values to the size of the bitmap. To render the scene the same size as the bitmap, set the Resolution in the render settings (Output tab) to the same size as the bitmap.
The Offset and Length settings define the position and size of the texture in the X and Y directions on the texture envelope. For example, if Length X and Length Y are both set to 100%, the texture covers the envelope completely
The Tiles values are the number of times the texture fits onto the texture envelope in the X and Y directions (Length X and Length Y).
Hang on a moment, isn’t that the same as changing the length?
Yes, exactly! You can change the length either in terms of tiles (Tiles X, Tiles Y) or as a percentage of the texture envelope (Length X, Length Y). Either way, changing one will cause the other to change. Note that the texture will only be repeated (tiled) if the Tile option is enabled.
CINEMA 4D calculates the size of an individual tile from the current texture size. For example, if you have scaled the texture so that it has a length of 25% in the X direction and 50% in the Y direction, the texture fits four times in the X direction (1, 0.25) and twice in the Y direction (1, 0.5) on the surface. If you change the Tile X or Tile Y settings, the Length settings change automatically. For example, if you change the number to 3, the texture shrinks from 50% to 33.33%.
If this option is enabled, the texture picture will be repeated endlessly on the surface.
The effect becomes visible when you scale down the texture or when the texture geometry has not yet been fitted to the object using the Fit To Object command. Otherwise, the texture map fills the texture geometry once.
If this option is disabled, the texture map will not be repeated on the surface. Any materials that are underneath will show through in the parts not covered by the texture tile.
If the Seamless option is enabled, tiles are mirrored to prevent visible seams. However, this sometimes leads to a butterfly effect in the pattern.
Prior to CINEMA 4D R8.2, the bump was always projected using spherical mapping — even if UVW mapping was defined. Since R8.2, UVW mapping has been used instead provided the Texture tag has UVW Mapping selected. This can lead to problems — see the following picture.
Artefacts may appear in certain areas in the border area between two neighboring UV polygons, especially when using the Noise shader with a high Delta value. This is caused by the discrepancy between the coordinate systems of the object polygon and the mapped UV polygon. This is a general problem and can only be resolved by increasing the geometry’s resolution.
Alternatively, you can use the old variation that was used automatically before version 8.2. However, keep in mind that this will lead to artefacts at the poles and in addition does not support the realignment of UVWs (especially optimal mapping).
Putting a label on a bottle
Done. The texture probably covers the entire object, but now you can scale it down.
Select the Scale tool, then select the Texture Axis tool. You can drag to reduce the scale of the texture. Next, select the Move tool and place the texture in the desired position on the object’s surface.
The texture is often slightly out of proportion after scaling. Select the Texture tag and, in the Attribute manager, set the Length values as desired. Since the length cannot exceed 100%, you may need to divide both values.
For example, if your texture is 800 x 600 pixels, you might set the lengths as follows:
|Length X||Length Y||Conversion Factor|
|32||24||/ 100 x 4|
CINEMA 4D lets you use as many materials and Texture tags on an object as you like. Think of a suitcase with travel stickers — there is a base material (i.e. the leather of the suitcase) and many materials on top (i.e. the stickers).
Naturally, you won’t be able to see the suitcase leather under the stickers. Also, suppose some of the stickers overlap. A sticker will, naturally, cover any stickers that it is on top of. To see one of the stickers underneath such a sticker, you’d have to peel off the top stickers. Or scratch holes in them!
This analogy can be related closely to CINEMA 4D’s behavior. Your object has a base material. You have additional materials on top of the base material. In order to see the base material, the overlying materials must be scaled down and not tiled. You can do this by scaling down the texture geometry and at the same time disabling the Tile option. If two materials overlap and you want to see the bottom one, you must make a hole in the top one. You can do this using the alpha channel or clip mapping.
So how does CINEMA 4D know which layer a material is on?
When you apply several materials, each new material is placed on top of the previous one. Thus the order of the Texture tags in the Object manager defines the order of the layers — the right-most Texture tag in the Object manager is the top layer, the left-most is the bottom layer. You can change the layering order simply by swapping the positions of the Texture tags using drag and drop.
Suppose we’re creating a wall of bricks, on which there is a poster and some graffiti. We’ll use a material with a color channel and a bump channel for the bricks, a plastic-like material for the poster (which is scaled down with no tiling) and a graffiti material that will have an alpha channel so that the bricks and poster show through the writing. See Figure 1, above.
To get the effect shown in Figure 1, we apply these materials to our object so that the order of the Texture tags in the Object manager from left to right is: bricks, poster, graffiti.
The graffiti is the top material layer; it uses an alpha channel to remove the non-graffiti parts, thereby exposing the next layer down, the poster material. Even though the poster material is on a layer above the bricks, the bricks can still be seen because the poster material has been scaled down and is not tiled (i.e. the poster does not cover the entire surface).
The brick material was made using a color channel and a bump channel. The bump channel creates the illusion that the bricks have joints. Now we want to add a second bump map to the wall without changing the texture itself. How can this be done?
The powerful texture tag option that makes this possible is called Mix Textures and can be found on the Tag page in the Attribute manager, for a selected Texture tag. By added, we mean that the material properties are added together, hence the term additive textures.
For example, let’s add two textures that are different colors: red and green; the sum of the colors RGB 100,0,0 (red) and 0,100,0 (green) is 100,100,0 (yellow). If the green color has a brightness of 50%, then only 50% of the color is added. The result in this case would be 100,50,0 (orange).
However, the result cannot exceed the maximum color values. Adding 100,0,0 to 100,100,0 does not produce 200,100,0, but 100,100,0.
Some channels cannot be mixed meaningfully. For example, mixing two materials each with a refractive index of 1 would result in a material with a refractive index of 2, which is probably not what you intended. In such cases, the value of the additive (right-most) material is used (provided that the channel is active).
– Only the following are additive: Color, Transparency, Reflection, Bump, Displacement, Luminance.
– Only active properties are evaluated.
– An additive texture must be to the right of the texture to which it should be added in the Object manager.
– All textures to the left of the first additive texture — up to but not including the next non-additive texture — are added.
Returning to the wall example.
Figure 2 show the results of mixing relief into the poster and graffiti textures. This was accomplished by using the Mix Textures option. Figure 2 shows how this was done.
If this option is enabled, the material will be mixed with the underlying materials. For details on mixing textures, look up Mix textures.
Return to CINEMA 4D Index