Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Guide to new lighting features in 4.0RC1
Re: Guide to new lighting features in 4.0RC1 [message #473757 is a reply to message #473749] Thu, 30 August 2012 08:18 Go to previous messageGo to previous message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma:
General (3 Stars)

And here is part 2.
Some things you will need to know: (some of which may be familiar to advanced modders but not everyone will know them)
1.Buildings have a prefix set in the building definition
2.Meshes that contain the building prefix followed by the ^ character are exterior meshes for that building
3.Meshes that contain the building preset followed by the # character are interior meshes for that building
4.Buildings can also have lights associated with them. Lights will match the building if the name of the light (which is taken from the .wlt file, see below) matches with the mesh prefix of the building.
5.Lights in renegade can come from 2 places, they can be directly placed into leveledit or they can be placed via a .wlt file
6.Every light in renegade has a "group ID" and a name.
7.A .wlt file is a file that is associated with a terrain .w3d file and contains one or more groups of lights.
8.When a .wlt file is loaded into leveledit, the lights are given names matching the .wlt filename.
9.The first group of lights in the .wlt file are given a "group ID" of 0, the second group is given a "group ID" of 1 and so on.
10.When a building is initialized, it creates 4 lists (actually 5 if you count the building aggregates but that doesn't matter for this discussion) and fills them with the appropriate data. The InteriorMeshes list contains all the interior meshes for the building. The ExteriorMeshes list contains all the exterior meshes for the building. The PowerOffLights list contains all the lights with a name that matches the building and a "Group ID" of 1. The PowerOnLights list contains all the lights with a name that matches the building and a "Group ID" of 0.
10.Meshes can have "Alternate materials" associated with them. This is basically a second set of material data stored in the .w3d file. (this second set of data may contain textures, shader settings, material settings, texture coordinates etc)
11.When a building is destroyed, the alternate materials on both the interior and exterior meshes are enabled. When a building goes low power, the alternate materials on the interior meshes are enabled.
14.When a building is destroyed or goes low power, all the lights in the PowerOnLights list are disabled and all the lights in the PowerOffLights list are enabled.

In part 3 I will post details of the wltmake tool and the altmat tool which will let you use the alternate light sets and the alternate materials. These 2 tools, an associated LE feature, the Prelit=true feature mentioned in part 1 and some method of generating the actual light map textures (I think 3D Studio Max can do it although I am not 100% sure) are all you need in order to produce meshes that function identically to the standard Renegade maps/buildings and use the same light mapping features including having the materials and lighting change when a building dies or goes low power.



Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: I need something :o
Next Topic: Applying Texture onto a map
Goto Forum:
  


Current Time: Fri Nov 08 20:21:55 MST 2024

Total time taken to generate the page: 0.01097 seconds