News Design Artwork Photos Articles
Creative Commons All use of my digital work is covered by this Creative Commons Deed.
Please do not use any of my work for commercial purposes, thank you.
 Phong Shading Previous Page Articles page
Editor Viewpoint During brushwork editing it is often useful to know which shaders have been applied to which brush surfaces. By creating special editor images, you can keep track of which shaders are where in the map.

Take the original texture and open it up in a paint package. Add the relevant text in spaced intervals across the surface of the texture. Save the new image to the same location as either a TGA or JPG file. Change the filename so that it has the word '_phong' at the end.

ie. textures \ myrockmap \ myrock_phong.tga

Open up the relevant shader file and find the shader command called 'qer_editorimage' and change it to point to the new editor image. If this command does not exist in the shader then make sure you are using a Phong shader template as specified above.
 Square peg round hole    
Low Shader Angles Phong Shading has one parameter which can be altered and is located in the shader file. The 'q3map_shadeangle' command is used to specify on what angle the smooth shading will start to be applied.

The angle between two brush planes (surfaces) can be rounded down to a value of between 0 and 179. When the brush plane angle is greater than the q3map_shadeangle value, then Phong Shading is applied to the edges.

This can be demonstrated by the use of two simple geometrical objects a square and octagonal block. As in the image to the side demonstrates, as the q3map_shadeangle value is increased the shadows become softer at the edges until the accent of the edge disappears.
   
High Shader Angles As the q3map_shadeangle increases beyond the brush plane angle of a square brush, the shape starts to lose its original profile and look like a cylinder, as the image to left illustrates.

Unfortunately as the q3map_shadeangle increases the shadows can become too soft and form into blobs or round lumps across the surface of a mesh for example. This is where the shadows being cast onto upon its self are being Phong Shaded and the whole surface starts to look like liquid.

It is always recommended to start with a low value of 45 and work your way up to a limit of 120. Really high q3map_shadeangle values do not produce good results and look too smooth causing brushwork profiles to be lost.
Prev Page Articles Page
Mememe
Articles 
Level Design -
GameDev Advice -
Creating Terrain -
Terrain Blending -
Rockwall Corridors -
Rockwall Detail -
2 Point Clipping -
Phong Shading -
3D Puzzle Scripting -
Triggerable Shaders -
RTCW Scripting -
Scripted Doors -
Basic Lift -
Advanced Lift -
Cooking -
Apple Crumble -
This site has been cobbled together by Simon O'Callaghan
Contact Information: Simon O'Callaghan
All content is Copyright © 2000-2024
Hosted by ApisNetwork