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 |
|
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
|
|
|
|
|
Guide to new lighting features in 4.0RC1
By: jonwil on Thu, 30 August 2012 02:47
|
|
|
Re: Guide to new lighting features in 4.0RC1
By: jonwil on Thu, 30 August 2012 08:18
|
|
|
Re: Guide to new lighting features in 4.0RC1
By: jonwil on Thu, 30 August 2012 08:30
|
|
|
Re: Guide to new lighting features in 4.0RC1
By: Mauler on Thu, 30 August 2012 12:29
|
|
|
Re: Guide to new lighting features in 4.0RC1
By: jonwil on Thu, 30 August 2012 18:54
|
|
|
Re: Guide to new lighting features in 4.0RC1
By: Mauler on Sat, 01 September 2012 04:20
|
|
|
Re: Guide to new lighting features in 4.0RC1
By: saberhawk on Sat, 01 September 2012 14:05
|
|
|
Re: Guide to new lighting features in 4.0RC1
By: Mauler on Sat, 01 September 2012 20:55
|
|
|
Re: Guide to new lighting features in 4.0RC1
By: Mauler on Sun, 02 September 2012 09:52
|
|
|
Re: Guide to new lighting features in 4.0RC1
By: saberhawk on Sun, 02 September 2012 15:27
|
|
|
Re: Guide to new lighting features in 4.0RC1
By: Mauler on Sun, 02 September 2012 19:23
|
|
|
Re: Guide to new lighting features in 4.0RC1
By: jonwil on Mon, 03 September 2012 03:31
|
|
|
Re: Guide to new lighting features in 4.0RC1
By: Mauler on Mon, 03 September 2012 04:11
|
|
|
Re: Guide to new lighting features in 4.0RC1
By: Jerad2142 on Mon, 03 September 2012 13:17
|
|
|
Re: Guide to new lighting features in 4.0RC1
By: Mauler on Mon, 03 September 2012 19:31
|
|
|
Re: Guide to new lighting features in 4.0RC1
By: jonwil on Mon, 03 September 2012 22:57
|
|
|
Re: Guide to new lighting features in 4.0RC1
By: Mauler on Mon, 03 September 2012 23:09
|
|
|
Re: Guide to new lighting features in 4.0RC1
By: jonwil on Mon, 03 September 2012 23:27
|
|
|
Re: Guide to new lighting features in 4.0RC1
By: Mauler on Mon, 03 September 2012 23:34
|
|
|
Re: Guide to new lighting features in 4.0RC1
By: jonwil on Tue, 04 September 2012 00:30
|
|
|
Re: Guide to new lighting features in 4.0RC1
By: Mauler on Tue, 04 September 2012 00:36
|
|
|
Re: Guide to new lighting features in 4.0RC1
By: Mauler on Sat, 22 September 2012 21:01
|
|
|
Re: Guide to new lighting features in 4.0RC1
By: roszek on Sat, 10 November 2012 10:57
|
|
|
Re: Guide to new lighting features in 4.0RC1
|
|
|
Re: Guide to new lighting features in 4.0RC1
By: jonwil on Wed, 21 November 2012 21:40
|
|
|
Re: Guide to new lighting features in 4.0RC1
|
|
|
Re: Guide to new lighting features in 4.0RC1
|
|
|
Re: Guide to new lighting features in 4.0RC1
|
|
|
Re: Guide to new lighting features in 4.0RC1
|
|
|
Re: Guide to new lighting features in 4.0RC1
|
|
|
Re: Guide to new lighting features in 4.0RC1
By: Mauler on Sat, 22 December 2012 12:52
|
Goto Forum:
Current Time: Fri Nov 08 20:21:55 MST 2024
Total time taken to generate the page: 0.01097 seconds
|