Rad Worm

This utility is a helper function to generate a RAD file for your level based off of all the materials in your level. A rad file defines materials that give off light or have no shadows, and models that should cast detailed shadows.

  • Rad Worm will generate light casting materials, forcetextureshadow for relevant models and noshadow entry for relevant materials.

Using Rad Worm

Run Rad Worm after you have added all the materials into your scene that should generate light.

  1. For each material that should give off light, turn on the Self Illumination and choose a color (do not give the self-illumation texture slot any textures--only use color).
  2. For each model that does not have the $opaque setting turned on in the WWMT helper, a forcetextureshadow entry will be made for that model.
  3. For each material that should not cast shadows, add a WW Shader attribute to the material and check the No Shadows in RAD checkbox in the miscelanneous rollout. Now those materials will get a noshadow entry.
  4. Click Wall Worm > Wall Worm Level Design > Utilities > Rad Worm
  5. You will be prompted to save the file. The file name must be YOURMAPNAME.rad (swapping YOURMAPNAME with the real name of your map. Save it to your mapsrc directory for your mod (where your VMFs are stored). For example, for Counter-Strike:Source it would be saved to sdkcontent\cstrike\mapsrc.
    Example

    If my map is called cs_funmap for Counter-Strike, I would save this file as cs_funmap.rad in the directory listed above.

  • The name of the material will be the name of the path/name used in the rad file. So if you want the material buildings/brick01 to give off light, give the material name buildings/brick01.
  • The self-illumination color defines the color (RGB) of the light emminated (and brightness of the light for materials that do not have the Wall Worm Source Shader parameters added).
  • To control the specific brightness of a light from a material, you should add the Source Shader to your material. With such materials, the brightness is controlled by the Radiosity Amount in the Source Shader. Otherwise, the brightness is calculated based on the formula explained below. 
  • The value (Dark to Light in the color picker) is multiplied by 10. This is an arbitray number. I chose this because the value in the color picker is a range of 0-255... whereas the value in the RAD file will often be thousands... (Meaning that if you want the RAD intensity to be 1000, set the Value in the color picker to 100; it also means that this tool will only set values up to 2,550 ... and you'll have to edit your file manually for higher values.) You will likely have to tweak this to meet the needs of your scene. You can always edit it after it's been generated... and recompile the map.
  • The rad file does not include HDR values. You must set them manually if that is something you need. This will likely change in the future.
  • The following Material types are used:
    1. Standard Material
    2. Multi/Sub-Object where the material list is composed of other allowed types
    3. DirectX Material where the Render Material is an allowed type

Newsletter Subscription