Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

BuildingBuster

Buy me a Coffee

Overview

BuildingBuster is a script to generate dead (alternate) versions of buildings by applying burn spots on lightmapped buildings generated by Luminous, similar to the buildings in stock Westwood maps. BuildingBuster is written in MAXScript and is tested on 3ds Max 2023.

Installation

Download and copy buildingbuster.ms to your "scripts" folder. Usually, it's located in C:\Program Files\Autodesk\3ds Max 2023\scripts\.
Then, execute the script by following "Scripting > Run Script..." in 3ds Max UI.

Operation

This section details operating BuildingBuster.

Warning

BuildingBuster works by modifying lightmaps and expects Luminous to be already ran on the scene. If not, please run Luminous first. These steps assume that Luminous was already ran on the scene and picks it up from its operation steps.

Preparation

  • After running Luminous, discard the exported W3D file (WLT file can still be used), make a backup of the scene and create two clones.
    • First clone should only contain building elements.
    • Second clone should be identical to the first one. We will mainly operate on this second clone.
    • Organization of other elements (terrain, blockers, etc.) are not within the scope of this tutorial. But the exported terrain should not include buildings again as they are already provided by clones created earlier.
  • Load and export the first scene. This should contain alive versions of your buildings.
  • Load the second scene and run BuildingBuster. It will automatically generate spots, combine them with the existing lightmap and bake into a new texture.
  • Export the second scene. This contains the dead versions of your buildings.
  • Combine both exports using altmat tool. It is bundled with tools package of Tiberian Technologies patch and can be downloaded from here.
    • Example Run: altmat bldfinal.w3d bldalive.w3d blddeadd.w3d
      • bldfinal.w3d: output file
      • bldalive.w3d: exported model from the first scene
      • blddeadd.w3d: exported model from the second scene
      • It is suggested that all model files have the same name length to avoid rare issues.
  • Import and 'Make' the output W3D file in level editor. No extra steps necessary as the game automatically switches appearance when the building dies.

Example Setup

Consider a lightmapped scene with terrain parts "TERRAIN001", "TERRAIN002", "TERRAIN003" and GDI & Nod Tiberium Refineries that have all their meshes grouped under "MGREF" and "MNREF" respectively.
Make a backup of this scene (eg. "Backup.max") and create two clones. (eg. "Terrain.max", "BuildingsAlive.max")
Load "Terrain.max" and delete "MGREF" and "MNREF" groups. Save and export as "mymap_terrain.w3d".
Load "BuildingsAlive.max" and delete "TERRAIN001", "TERRAIN002" and "TERRAIN003". Save and export as "mymap_bldalive.w3d".
Make a clone of "BuildingsAlive.max", name it "BuildingsDead.max", and open it. Then, run BuildingBuster on the scene. Save and export as "mymap_blddeadd.w3d".
Combine both building exports using altmat.exe mymap_building.w3d mymap_bldalive.w3d mymap_blddeadd.w3d.
Add mymap_building.w3d and mymap_terrain.w3d into the level and 'Make'.

Operation

BuildingBuster performs following tasks in order:

  • UVW Map Creation: Creates a UVW map on channel 1.
  • Read Existing Lightmap: Reads and loads existing lightmaps of scene elements.
  • Create Material: Creates a Cellular material and configures it. Parameters of the material are pre-tuned to look as similar to stock maps as possible.
  • Apply & Bake: Applies the material to each element and bakes a new texture containing burn spots.
  • Blend Lightmaps: Blends burn spot texture into existing lightmap using Multiply mode, and saves the resulting texture as a new file.
  • Applying Materials: Applies new textures to each material.

About

Dead building skin generator for C&C Renegade based on Luminous.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages