270 likes | 415 Views
CSE4MOD Textures and Materials. Paul Taylor 2009. Texturing in 2k4. From now on we will consider Textures to be the image that is used for painting the objects When it is applied to a BSP the texture, it is used as a Material. Texture Formats.
E N D
CSE4MODTextures and Materials Paul Taylor 2009
Texturing in 2k4 From now on we will consider Textures to be the image that is used for painting the objects When it is applied to a BSP the texture, it is used as a Material
Texture Formats • Powers of 2 from 32 up to 2048 (now 4096 I believe) • Formats • DirectX Texture Compression (DXTC) • 1 – Fails on older Nvidia hardware - 1 bit alpha • 3 – 4-bit Alpha • 5 – 4-bit interpolated alpha • 8-bit palettized (P8) (256 colour) • Used in U and UT they can save 75% of disk and ram usage whilst retaining up to 100% of detail • 32-bit RGBA textures • Big, Fat and Beautiful – 8bit alpha • 8-bit and 16-bit greyscale heightmaps.
F is for Fallback • This shows the most basic version of a texture • Used when UT is running on economy hardware
The Checkerboard • This places a coloured checkerboard behind your texture • This guy is for Alpha testing!
Layer-Looking • This guy toggles showing the layer you are working on, or the overall view of the material
Geometry Wrapping • These three allow you to test your material on different surfaces • You can drag the 3D views using: • Left mouse for Z • Right mouse for Z and Y • Use alt to rotate around the Y axis
The Texture Properties • Animation • AnimNext • MaxFrameRate • MinFrameRate • PrimeCount • Pre render cycles
The Texture Properties • Material • Fallback • SurfaceType • Sets the surface type which is referenced by the engine for effects
The Texture Properties • Surface • bAlphaTexture • Disable/Enable the alpha filter • bMasked • The cheap version of alpha blending • bTwoSided • Useful for sheet polygons • Texture • TextureFormat
The Texture Properties • Texture • Detail • A greyscale texture that is faded in as you approach the material – Keeping the average of this texture to ~127 will keep the brightness from changing • Used for wood-grain effects as a micro texture, or rock crevice effects as a macro texture (to reduce tiling effect) • DetailScale • 8 or above for a Macro Texture, 0.25 or smaller for a micro texture • LODSet • This helps the engine decide on the detail levels and mipmaps to use, based on the user settings • NormalLOD • This is the ‘normal’ level of detail for your texture. Basically how many Mip levels are skipped. Unknown if it is the first ones, or just some!
LOD Values • -4 UltraHigh-3 VeryHigh-2 High -1 Higher 0 Normal +1 Lower +2 Low +3 VeryLow+4 UltraLow
The Texture Properties • Texture • Palette • Used for 8-bit textures. I’ve never used it! • Uclamp • Used for Scripted Textures, useless on a normal texture • UClampMode • Sets the wrapping mode of the texture to TC_Wrap or TC_Clamp • Clamp will stretch the last pixels across the screen! (Alpha) • Vclamp • As above • VClampMode • As above
The Texture Properties • TextureFormat • DXT1 • DXT3 • DXT5 • AGBR • 8BIT • You can compress a 32bit image to DXT 1/3/5 with the Compress option when you right click a texture in UnrealEd
Now you know everything important about textures It’s time to start creating materials!
Shaders Shaders are materials that apply effects to your surface These include things such as: Secular Lighting Diffuse Lighting Self Illumination
Creating a Shader Texture Browser File->New
Each Stub can use either an existing texture, or a new material
References • http://www.warp2search.net/contentteller/news_story/nv30_to_unlock_advanced_graphic_features_in_unreal_tournament_2003.html • http://www.oldunreal.com/editing/s3tc/Unreal%20Textures.doc • http://udn.epicgames.com/Two/TextureSpecifications.html