XBLAH's Modding Tool | Create custom detail props

Create custom detail props

Home |Wiki
Source Source
Note:This tutorial was written for XBLAH's Modding Tool XBLAH's Modding Tool v2.5.3. Please be aware that subsequent updates might have introduced alterations in terminologies, introduced novel features, or reorganized certain elements within the interface.

Creating custom detail props for Source Source games, such as grass sprites or rocks, can be achieved with the XBLAH's Modding Tool XBLAH's Modding Tool using the Details Editor. This tool allows you to enhance your scenes by adding various detail props to displacements.

The compile uses data from a selected details.vbsp, usually located in the mod's root folder, and from a vmt that sets up a sprite sheet, usually located under materials/detail/.

Accessing the feature

This can be accessed within the tool via Materials Dashboard > Details Editor.

Creating a Sprite Sheet

You can create a sprite sheet or use an existing one from the game.

To create a new sprite sheet, click on the the Sprite Sheet dropdown and select New Sprite Sheet. Right-clicking the Selected Tile control, and choose 'Import Image'.

Tip:You can also edit individual parts of the sheet by adjusting their bounds and importing specific sprites.

Creating Detail Props

Detail Types

A single file can contain multiple detail types.

To add a new Detail Type, click on the plus sign beside the Detail Type list to create a new detail type and assign it a unique name.

Name <string>
A unique name for the detail type. This string will be used in the Material Editor to define which detail type will be used.
Density <int>
A parameter used in the equation amount * density * surface_area * 1e-6 to define the number of detail models per unit square.
 Example: A density of 1.000.000 will produce one detail model per square unit.

Detail Groups

A detail type must have at least one Detail Group. Create a new detail group by clicking on the plus sign in the Detail Groups control.

Alpha <float>
A value between 0.0 and 0.1 that defines the opacity of the whole group.
 Example: alpha "0.0" - invisible; alpha "1.0" - fully visible

Detail Models

A detail group must have at least one Detail Model. Models can be sprites from the sprite sheet or low-poly models.

Amount <float>
The proportion of the group that this model will account for. The parameter is used in the equation amount * density * surface_area * 1e-6.
 Example: If the amount values of a group add up to less than 1, fewer detail props will be emitted than specified by density.

Using Sprites

For sprites, set the type to Sprite, then use the edit button to adjust sprite bounds and preview in the Selected Tile control.

Sprite bounds <string>
UV maps the sprite in the sprite sheet. Click on the edit button and drag the sliders to set the sprite bounds.
Size <int>
Define the sprite width and height in world units.
Orientation <int>
Determines how the sprite will react to the camera's perspective.
Random scale <float>
Specifies how much the sprite's size can randomly vary, ranging from 0.0 to 1.0.
 Example: spriterandomscale "0.0" - the sprite has a fixed size; spriterandomscale "0.5" - the sprite size will vary +-50%.

Using props

For props, set the type to Model, then select the model file.

Finishing up

Once everything is set up, click Top Menu > File > Save. If you have set a custom sprite sheet, you will be prompted to save it too.

In Hammer++ Hammer++, navigate to Map > Map Properties and set the path to the details.vbsp you created and to the sprite sheet's material.