Meshes on terrain?

Joined
Jul 19, 2003
Messages
8,037
Reaction score
2
How do I go about getting radial meshes to appear on a terrain material? Things like larger tufts of grass. In Unreal it's called a decolayer.

I can't find the tutorial anywhere since I'm not sure what to type into google.

Also, can you control where they appear like in UnrealEd? Since I wouldn't want them appearing on any paths.
 
I have a tutorial saved on this, it's all to do with the detail.vbsp file. I forget who's tutorial this is, i probably got it off interlopers, so credit goes to whoever made it. Hope it helps you out...as for controlling where they appear, the detail.vbsp file allows you to basically assign 'grass' to a texture, so as long as u don't assign it to the path texture you mention, grass won't appear on it. You will however have to make sure the displacement with the grass-enabled-texture on it doesn't pass under the path, or the grass will stick up through the path. All gets a bit fiddly, you can use alpha painting on the displacement to make the bit going under the path a different texture i suppose, i think that works. Sorry, i'm waffling, here's the tutorial...

-----------

Step 1 - First, find a material (or create one) which has a detail prop type. The example I will be using for this tutorial is "nature/blendsandgrass008a", which uses the "coastline_grass01" detail prop type (important to remember).

Step 2 - Apply this texture to a displacement map in your map. (Displacement map tutorial - http://www.valve-erc.com/srcsdk/Levels/displacements.html)

Step 3 - Create a new file called "detail.vbsp" in the same directory as the gameinfo.txt file is located. I am working on an HL2 DM map, and my gameinfo.txt file is located in "C:\Program Files\Valve\Steam\SteamApps\<my email address>\sourcesdk\hl2mp_sample_content". You may need to put the detail.vbsp in another directory depending on the mod you are working on.

Step 4 - Put the following text in the detail.vbsp file:
details

{

coastline_grass01

{

"density" "500.0"

Group1

{

"alpha" "1.0"

Model1

{

"sprite" "288 0 128 128 512"

"spritesize" "0.5 0.0 19 25"

"spriterandomscale" "0.2"

"amount" "0.2"

"detailOrientation" "2"

}

Model2

{

"sprite" "0 0 128 128 512"

"spritesize" "0.5 0.0 23 30"

"spriterandomscale" "0.2"

"amount" "0.1"

"detailOrientation" "2"

}

}

Group2

{

"alpha" "0.0"

}

}

}
This file has a definition for the coastline_grass01 detail prop type, which is the type the example texture uses. You can make your own detail prop types (or other ones for valve textures). For information on the file format of detail.vbsp, look at the following sdk documentation: http://www.valve-erc.com/srcsdk/Levels/prop_types.html (section: Automatically Emitting prop_details on a Material)

Step 5 - Compile your map, run it, and take a look at your fresh grass! Here is a screenshot of the grass that the compiler automatically placed in my test map: http://img43.exs.cx/my.php?loc=img43&image=d3mdmwastelandbeta00.jpg

I hope this tutorial helps a few people out! Let me know if you have questions or if anything is unclear.
 
MrMan said:
I have a tutorial saved on this, it's all to do with the detail.vbsp file. I forget who's tutorial this is, i probably got it off interlopers, so credit goes to whoever made it. Hope it helps you out...as for controlling where they appear, the detail.vbsp file allows you to basically assign 'grass' to a texture, so as long as u don't assign it to the path texture you mention, grass won't appear on it. You will however have to make sure the displacement with the grass-enabled-texture on it doesn't pass under the path, or the grass will stick up through the path. All gets a bit fiddly, you can use alpha painting on the displacement to make the bit going under the path a different texture i suppose, i think that works. Sorry, i'm waffling, here's the tutorial...
The path would just be the alpha painting anyway, so it shouldn't stick up there.

I'll try this out later, looks like a small bit of work right now. Thanks. :smoking:
 
Back
Top