Unreal Developer Network Content Creation
Welcome to the Unreal Developer Network The EngineThe Engine Unreal Powered Content Creation Technical Playstation2 Xbox Gamecube Licensee Log In

Content Creation

Content Creation home

Documents listed below, but not hyperlinked, are restricted to engine licensees only.

As certain texts become relevant, due to released games using that technology, new documents will be made available. Check back often!
 
Getting Started
   - WhatToReadFirst
   Support
   - UnEdit (mailing list)
   - UnEditTraffic (summaries)
   - UnDevIRC (chat)
   - UnDevIRCTraffic (summaries)
   - UnrealEdSux0rs (bug list)
   Engine Prerequisites
   - BasicConcepts?
   - TextureSpecifications
   - TextureComparison
   - Etc.

General Editor
   Basics
   - IntroToUnrealEd
   - UnrealEdInterface
   - RotationGizmo
   - UnrealEdKeys
   - BrushClipping
   - VertexEditing
   - BoxSelection
   - ShapeEditor
   - ExampleMaps
   - TriggersTutorial
   - WorkFlow
   Primitives
   - BspBrush
   - MirrorsAndWarpZones
   - HardwareBrush
   - MoversTutorial
   - UKXPackagesTutorial
   - TerrainTutorial
   - VolumesTutorial
   - LightingTutorial
   - ProjectiveTutorial
   - MaterialTutorial
   - CollisionTutorial
   - FluidSurfaceTutorial
   Animation
   - AnimNotifies
   Particles
   - EmittersTutorial
   - EmittersExamples
   New Particle Editor
   - ParticleSystems
   - ExampleParticleSystems
   Matinee
   - MatineeTutorial
   - MatineeExample
   - MatineeDemoOpening
   - MatineeDemoDropship
   - MatineeDemoSoldiers?
   - SampleMatineeTips
   Scripted Sequences
   - ScriptedSequenceTutorial
   - ScriptedSequenceActions
   - AIControllers
   Techniques
   - LevelOptimization
   - GroupsBrowser
   - NavigationAI
   - VertexBlendingTutorial
   - ConvertingContent739To829

Tools
   - ActorX
   - UmodWizard
   - UnrealModelTutorial
   - UnrealModeling
   - UnrealTexturing
   - ActorXTutorial
   - ActorXMayaTutorial
   - ActorXPhysiqueNotes
   - SkeletalSetup
   - WarfareSkeletalNotes
   - ObjToASEConverter
   - MayaBrushExport
   - VertexAnimationWith3ds2unr

mathengine.gif
Karma Physics
   - KarmaReference
   - KarmaExample1
   - KarmaExample2
   - ImportingPhysicsAssets
   - RagdollsInUT2003
   - KarmaExampleUT2003
   - ExampleMapsKarmaColosseum

secretlevel.gif
PlayStation2 and GameCube
   - ConsoleDevelopment

Contribute!
You can create a new page, and then you can edit this list to add it to the categories, as well as edit the Content Creation homepage to tell everyone about it!

Make Requests!
You can also stop by the UdnStaff page to see what we're working on, and edit it to add your own document requests.


Please take note! For mod developers working with Unreal Tournament 2003, this documentation is meant to be a starting point for your own explorations into UT2003, not a definitive guide. There will be differences between the documentation here and the product in your hands, and you may have to figure out quite a bit for yourself. Check out the Unreal Tournament 2003 page in the Unreal Powered area for links to community sites if you're having problems. UDN is a licensee support site, and cannot provide technical support or game-specific assistance to end users.

MaterialTutorial

Licensees can log in.

Interested in the Unreal engine? Check out the licensing page.

Questions about UDN itself? Contact the UDN Staff.

Materials

Last updated by Jason Lentz (DemiurgeStudios), for the 2110 build. Original author was Lode Vandevenne (UdnStaff).

  • Materials
    • Overview
    • Interface
    • Types of Materials
    • FinalBlend
    • Cubemap
    • TexEnvMap
    • Shaders
      • Opacity
      • Specularity
      • SelfIllumination
      • OutputBlending
    • Combiner
    • ColorModifier
    • TexOscillator
    • TexPanner
    • TexRotate
      • Example
    • TexScaler

Overview

With the material system you can add effects to the textures like opacity, specularity, panning, rotating, changing color, ...

demo1.jpg demo2.jpg

Due to the lack of opacity maps on non-GF3/Radeon cards, 829 requires you to use the FallbackTexture on older cards. A better solution is in the works.

Save your texture pack often, the editor may crash when you press the wrong button...

Interface

To make a new material, open the Texture Browser --> File --> New... and you get the New Material window. Set the Package, Group and Name, and make sure Class is set to Raw Material. Then in Properties you can choose what kind of material you want, for example a material that rotates the texture, changes it's color, blends it or combines two other materials. All the different choices are explained soon. A lot of the materials in the list make the editor crash, only the ones described in this tutorial work.

new.gif

When you create a new material, you get the Texture Properties window. In here you can edit all the properties of the material and preview it. You can also get this window at any time if you right click on a texture in the browser and choose "Properties".

textureproperties.jpg

At the bottom half are the Properties of the material. On the right is the Material Tree, here you can view and select all the sub items of the material.

If you select one, the properties of that sub item will appear at the bottom.

On the left is the preview window. If you press the cube button cubebutton.jpg your material will be mapped onto a cube. You can rotate the cube around with the mouse. You can also preview the environment maps on the cube.

cube.jpg cubeenvironment.jpg

You can also view the material on a sphere if you press the sphere button spherebutton.jpg .

sphere.jpg

To make the material flat again press this button: flatbutton.jpg . Note though that if you have a texture smaller than 256x256 if you try to go back to the flattened texture view from either the cube view or the sphere view it may attempt to redraw just the upper left corner of the image as if it were a 256x256 texture. To correctly view simple close the Texture Properties window and reopen it.

With this button: checkerbutton.jpg you can add a checkerboard behind the material, this is handy to see the translucency. With the 2110 build though, this option only seems to work when viewing the flattened texture (the flatbutton.jpg ).

checkerboard.jpg

With this button: layerbutton.jpg not selected, you can only see the selected sub item of the material in the preview, if it's pressed you'll see the complete material.

subitem.jpg

Types of Materials

There are different kinds of materials:

  • Textures: these are normal textures with nothing special, or Procedural Textures. All the other materials need normal textures to cast their effects on. They have no border.
  • Shaders: these can add Opacity, Specularity, SelfIllumination and some other effects to a texture. In the Texture Browser, Shaders get a red border around them.
  • Modifiers: these materials modify another material or texture in a certain way, for example the TexRotate rotates a texture, or TexEnvMap turns a CubeMap into an EnvironmentMap. They are displayed with a blue border around them in the Texture Browser.
  • Combiners: these materials combine two other materials together in a way you can choose. They get a green border.
  • FinalBlends: these can add some simple effects to a texture like translucency, darkening, ... and you can recognize them because of their yellow border in the Texture Browser.

Here are some different kinds of materials grouped together in the Texture Browser:

texturebrowser.jpg

In the menu Filter you can choose to view only certain types of materials for a better overview.

FinalBlend

This material adds a blending effect to another material or texture. Create a new material and choose FinalBlend from the list, then in the Texture Browser select the texture that you want to blend, and then in the FinalBlend Properties window click on the Material property and then press the Use button. You can use any texture for this, even a Procedural Texture or the most complicated material. The chosen texture should appear in the Material Tree as a sub item.

finalblend.jpg

In FrameBufferBlending you can set how to blend the texture. Here's how the different effects look on two different textures. The first texture is a RGBA8 texture (left picture) with an alphachannel (center picture), and the second texture is a masked white texture with a hole in the center (right picture):

texture1.jpg texture1alpha.jpg texture2.jpg.

FB_Overwrite: this displays the texture without any effects; even the masked texture becomes opaque.

overwrite1.jpg overwrite2.jpg

FB_Modulate: If you modulate a texture, the values of the R, G and B channels smaller than 127 will darken the surface it is projected on, and the values larger than 127 will brighten it. The grey color with R=G=B=127 is 100% transparent.

modulate1.jpg modulate2.jpg

FB_AlphaBlend: this blends the alphachannel of the texture for opacity, if it has one. The black parts of the alphachannel will become 100% transparent, the white parts 100% opaque and the grey parts semi-transparent. This setting also works for masked textures to make the masked parts transparent. You can get the same effect on any material or RGBA8 texture if you set in the Texture Properties --> Surface --> bAlphaTexture to True.

alphablend1.jpg translucent2.jpg

FB_AlphaModulate_MightNotFogCorrectly: this one seems to be broken (?).

overwrite1.jpg overwrite2.jpg

FB_Translucent: this makes the black parts of the texture 100% transparent, the white parts 100% opaque, and the other colors semi-transparent

translucent1.jpg translucent2.jpg

FB_Darken: this darkens the texture on the background, so the colors of the texture look negative.

darken1.jpg darken2.jpg

FB_Brighten: this brightens the texture on the background.

brighten1.jpg brighten2.jpg

FB_Invisible: this makes the texture completely invisible, useful for ZonePortals and stuff, though the original Invisible still works too.

invisible.jpg

With the setting TwoSided you can make the texture two sided, otherwise the surface will have one invisible side, for example the sides outside the map.

onesided.jpg twosided.jpg

If AlphaTest is True, you can make the alphachannel more transparent with AlphaRef: all values of the alphachannel lower than AlphaRef will become 0. For example if AlphaRef is 127, all the semi-transparent parts of the texture lower than 127 will become 100% transparent, but the semi-transparent parts higher than 127 will stay semi-transparent (if FrameBufferBlending is set to AlphaBlend at least). If you set AlphaRef to 255, the whole texture will become invisible.

alpharef0.jpg alpharef127.jpg alpharef192.jpg

To avoid confusion, it's the FinalBlend material that you have to use in your map. The source texture that you chose isn't modified and can freely be used for other materials or on walls.

Cubemap

A Cubemap is needed for the TexEnvMap. Create the new Cubemap, then in Cubemap --> Faces you have to set the 6 textures used for the <nopEnvironmentMap. These textures are 6 directions in which you can look: north, east, south, west, up and down, or the 6 faces of a cube. To create them you can just create black textures with a large blurry white dot for a shiny effect, or you can take 6 screenshots in the 6 directions in your map. The easiest way to do this is to press Alt-Enter to go to windowed mode, enter "SETRES 256x256" in the console (or 512x512 if you want huge textures). The numpad keys 0 through 5 are set by default in Unreal Warfare to change the camera rotation to match the 6 views needed for the cube map. So just go where you want the shots from, press 0, F9, 1, F9 etc. until you have all 6 shots. Numberpad 6 returns the view to normal.

texenvmap.jpg

If you took screenshots, make sure the textures are rotated correctly, and for a better overview give their names the same number as the numbers used in the Cubemap Properties. [0] to [3] are the 4 sides, [4] is the sky or ceiling and [5] is the ground or floor. This screenshot shows how to rotate and number the textures:

environment.jpg

faces.jpg

TexEnvMap

A Cubemap isn't an EnvironmentMap yet, it's just a placeholder for 6 textures. The TexEnvMap uses the Cubemap for an EnvironmentMap. When you create a new TexEnvMap, select a Cubemap in the Texture Browser, and then click on Material and press the Use button. To preview the EnvironmentMap click the cube or sphere button of the preview window.

texenvmap2.jpg

If the EnvMapType is EM_CameraSpace, the ground will be in front of you, but if you set it to EM_WorldSpace it'll be at the bottom:

worldspace.jpg

You can use TexEnvMap materials on Static Meshes as well as on BSP Surfaces. A TexEnvMap looks very shiny because it only has the EnvironmentMap, with other materials, for example Shaders, you can blend the EnvironmentMap on a flat texture.

Shaders

Shaders can add an Opacity layer, Specularity and SelfIllumination to textures, together with some other effects. You can set the main texture in Diffuse. If you don't set a diffuse texture, the effects of the Shader will be cast on a white texture instead.

Opacity

In Opacity, you can set a texture that has an alpha channel or a masked texture. The alpha channel of that texture will act as an Opacity layer for the Shader (the texture itself is ignored; only its alphachannel is used). The white parts of the alphachannel become opaque, the grey parts semi-transparent and the black parts invisible. For example here the alphachannel of the "platecaution" texture is used on a FireTexture (the texture that was set in Diffuse).

opacity.jpg

opacity2.jpg

Specularity

With this, you can blend an EnvironmentMap on the Shader: set a TexEnvMap texture in Specular and the Shader will look shiny.

You can also add a SpecularityMask, this is a texture with an alphachannel, or a masked texture, that tells how shiny the Shader has to be in each pixel. The black parts of the alphachannel leave it mat, and the white parts become the shiniest. Of course, the SpecularityMask doesn't do anything if you didn't set a TexEnvMap in Specular.

This is a Shader with Specularity on it, and the SpecularityMask is a white alphachannel with a black circle in it:

specular.jpg

SelfIllumination

This adds a second texture on the Shader, and makes this texture unlit so you can see it in the dark. You can set this texture in SelfIllumination.

You can also add a SelfIlluminationMask, again this is an alphatexture or a masked texture. The white parts of the alphachannel will become the brightest (completely unlit) and use the SelfIllumination texture. The black parts need an external lightsource before you can see it, and use the Diffuse texture.

For example, this texture uses the same texture for Diffuse and SelfIllumination, and there's added a SelfIlluminationMask. There's a red light source in the center of the room, and the light is only visible on the grey or black parts of the SelfIlluminationMask:

selfillumination.jpg

OutputBlending

With this you can modulate, make translucent, ... the complete shader. Its effect is somewhat similar to the FrameBufferBlending option of the FinalBlend, but there are other options. If you need for example the Brighten option of the FinalBlend (an option that doesn't exist in OutputBlending), you can make a new FinalBlend with your shader set in Material.

OB_Normal: this displays the shader as you would expect it, with all the effects such as Opacity and Specularity.

obnormal.jpg

OB_Masked: this makes the first color in the palette of a P8 texture invisible, or if the texture has an alphachannel makes the alpha values lower than 128 invisible.

obmasked.jpg

OB_Modulate: this makes the R=G=B=127 grey parts of the texture invisible and the other parts semi-transparent.

obmodulate.jpg

OB_Translucent: this makes the darkest parts of the texture most transparent, and the brigher parts more opaque.

obtranslucent.jpg

OB_Invisible: this makes the complete shader invisible, though the EnvironmentMap remains visible if the Opacity is used.

obinvisible.jpg

TwoSided: with this you can make the shader two-sided, the same as you can do with the FinalBlend.

WireFrame: if this is True, the shader will be displayed as a wireframe in the map.

wireframe.jpg

Detail doesn't do anything yet, but should add a Detail Texture later.

Combiner

This material combines two other materials together: put one material in Material1 and another one in Material2. Then you can choose how to combine them with CombineOperation. In this example, Material1 and Material2 look like this:

material1.jpg material2.jpg

CO_Use_Color_From_Material1 and CO_Use_Color_From_Material2 both only show one of the materials and completely hide the other one.

CO_Multiply multiplies the colors of both textures with each other:

multiply.jpg

CO_Add adds the colors of both textures to each other:

add.jpg

CO_Substract substracts the colors:

substract.jpg

CO_AlphaBlend_With_Mask: this operation uses the alphachannel of a third texture as a mask. You can set this texture in Mask. Material2 will be in front of Material1, or of you set InvertMask to True Material1 will be in front of Material2. The white parts of the mask make the upper material opaque so you can't see the other material behind it, but the more grey the alphachannel becomes, the more transparent the upper material becomes.

mask1.jpg mask2.jpg

CO_Add_With_Mask_Modulation: this doesn't use the Mask, but instead uses the alphachannel of Material2, or if it hasn't got one modulates it on Material1.

On the first screenshot, the platecaution texture is Material1 (this texture has an alphachannel) and the lion is Material2. On the second screenshot, the lion is Material1 and the platecaution Material2. Here the alphachannel becomes visible.

modulation1.jpg modulation2.jpg

ColorModifier

This material changes the color of another material. In Material, set the material to cast the effect on. Then choose a color in the Color property. You can type in the RGB value manually, or if you press the "..." button you can choose the color with the Windows Color Dialog Box. With the Pick button, you can pick the color in any of the editor views with a dropper.

color1.jpg

color2.jpg color3.jpg

The white color leaves the original texture unchanged, and the darker the color the darker the texture becomes.

TexOscillator

This can make a texture to move from side to side, or shrink and grow all the time. Again, first set the material you want in the Material property.

With UOscillationRate and VOscillationRate, you can set the number of oscillations per second, U is for the horizontal movement and V for the vertical movement. For example if you set UOscillationRate to 0.1, the texture will go from left to right and back to left in 10 seconds. You can also use negative numbers, this makes the movement start in the opposite direction. Combinations of a different U and V make the material to follow sinuous curves.

UOscillationPhase and VOscillationPhase determinate where the animation starts. 0 represents the start of the animation, 0.5 is halfway, here the material is in the center again, and 1 is the end of it (and the start of a new cycle).

UOscillationAmplitude and VOscillationAmplitude determinate how much the texture will move from left to right / up and down, or how much it'll shrink and grow.

With UOscillationType and VOscillationType you can set what the material will do in the U or V direction: OT_Pan makes it to move from side to side, and OT_Stretch makes it to grow and shrink.

oscillator.jpg

TexPanner

This continiously pans the texture in one direction. Again set a material in Material. PanRate determinates the speed of the panning, for example 0.5 means the complete texture will be one tile further after two seconds. Use negative values to make it pan in the other direction.

In PanDirection you can set the direction of the movement, but this is not working as expected yet (?). Try to set Yaw to 9999 to see some difference.

panner.jpg

TexRotate

This rotates a texture around one point. Set a material in Material, and then you can set the Pitch, Roll and Yaw values in Rotation. Only Yaw is really useful, because Pitch and Roll try to rotate the texture in a 3rd dimension that the texture doesn't have so it looks rather weird.

weirdrotate.jpg

If ConstantRotation = False, the Rotation determinates the rotation of the texture, but the texture stays still. A Yaw of 65536 rotates the texture 360 degree so it's back at its original position. 16384 rotates the texture 90 degree counterclockwise and -16384 rotates it 90 degree clockwise.

If ConstantRotation = True, the texture will rotate all the time, a Yaw of 65536 then means 1 rotation per second, and 16384 means one rotation every 4 seconds. A positive Yaw makes it rotate counterclockwise and a negative Yaw clockwise.

rotate.jpg

rotate3.jpg

In your map, the texture will rotate around one point (the upper left corner of one tile), and you can move this point together with the texture if you pan it with the Texture Pan button texturepanbutton.jpg

You can also make EnvironmentMaps rotate with the TexRotate, if you put a TexEnvMap in Material. Now also Pitch and Roll do something useful, so you can make the EnvironmentMap rotate around the 3 axes. You can now use the TexRotate in the Specular setting of Shaders.

rotate2.jpg

Example

This is an example of a rotating fan. The rotating fan itself is a TexRotate material, and it's combined with a still texture so that only the round fan itself rotates and not the corners of the fan texture.

The original fan texture looks like this:

fan.jpg

but because the texture will rotate around one of it's corners, the center of the fan is brought to the corners of the texture:

fan2.jpg

This texture is imported into the editor, and a new TexRotate is made with this fan texture as Material, ConstantRotation = True and a value in Yaw. But if you'd now use this texture in your map, the complete texture rotates instead of only the actual fan. With a combiner, another texture can be laid over the fan, with a mask that creates a round hole in the second texture. Because the center of the fan texture was brought to the corners, you need to do the same with the mask, so it looks like this:

fanmask.jpg

The black parts will become invisible, so only there the fan will show up.

Then you can set up the combiner: Material1 is the fan, Material2 is another texture, Mask is the mask and CombineOperation is CO_AlphaBlend_With_Mask.

rotatingfan.jpg

Now you can add this combiner in the map, and if you place the center of the fan in the center of a wall it should look fine. To center it exactly, you can open the Surface Properties --> Alignment and these choose Align to Wall.

rotatingfan.gif

TexScaler

The TexScaler can scale a material. Put a material in Material, and then you can scale it horizontally with UScale and vertically with VScale. For example if you set VScale to 3, the texture will be stretched vertically so it becomes three times higher.

In UOffset and VOffset you can set the number of pixels to move the texture away from the center.

scaler.jpg

scaler2.jpg


MaterialTutorial - r1.9 - 04 Apr 2003 - 20:54 GMT - Copyright © 2001-2003 Epic Games
Unreal Developer Network Content by those crazy Perilith guysSite design and art by 2 design