PDA

View Full Version : TerrainSculptBrushes and UserBrushes


Samekh
6th Sep 2010, 10:59 AM
Hi,

In the UserToolData folder their are two folders (TerrainSculptBrushes and UserBrushes). I read somewhere that we can amend these files to include the parameters for our own sculpting needs.

Yet reading the TerrainSculpt.ini in TerrainSculptBrushes (which is the one I think might need editing) it's all gobbledegook to me. The example I saw was where a person had created a brush that would flatten a perfectly square area to whatever height the point that the brush was clicked on. I think they named the brush "Flatten to height" or something and it showed up as a sculpting brush in CAW. Marvellous!

Yet I'm a bit more ambitious. How easy would it be, if it's indeed possible, to create (or script) a brush that would create a precise downward slope from whatever point the brush was clicked on?

...I've done my terrain editing (starting with an imported heightmap), painstakingly teased away the 'jagging', painted, done the roads, created the best waves I could manage but I've decided that the beaches (between cliff headlands) could be better and other than working on and re-importing the png (which will mean I have to work on the jagging again) it would be great to just have a brush which would slope the beaches gradually down to the zero luminance bottom of the sea. Then I could quickly build the cliffs up again. Obviously one gradient brush will not be enough (unless all the beaches open in exactly the same direction) so the same brush parameters would have to exist for a few different angles....

It might be too tricky but... does anyone know if there are any resources or tutorials for creating custom terrain sculpt brushes anywhere?

Yeah, there are .tga files in the TSB folder (64 pixel squares)... I take it that it's a lot more complicated than just creating a .tga with a gradient of luminance from 64 to 0? We'd need to also define the brush behaviour in the TerrainSculpt.ini too... That's the difficult bit.

sleepalldaypartyallnight
6th Sep 2010, 11:56 AM
I haven't tried it, so I don't know how helpful this is going to be, but looking at the TerrainSculpt.ini it certainly seems possible - there are instructions at the top. It seems to me that you would just need to create a 64x64 tga, put it in the TerrainSculptBrushes folder and then edit the ini file to include your new brush. I think it would probably just be trial and error until you get a brush that you like. I'm not entirely sure what kind of brush it is that you want, but it sounds like you want one that creates a smooth downward slope? You could look at the values for the smoothing brush and the valley brush and take a guess at the values and then just test it. For the tga I would try a gradient from left to right or vice versa. Looking at the ini for example, the two valley brushes that we see in CAW share a tga but just have different strengths defined in the ini file.

Samekh
6th Sep 2010, 01:44 PM
Thanks... Yes, I had a proper look at the TerrainSculpt.ini and I've been experimenting for a couple of hours. With moderate success (creating a slope only seems to work effectively when the component operation ID is Zero or 'RaiseLower'. It seems like it's worth fiddling about with. I'm not yet sure what 'WiggleAngle' does or how it works. All of the original brush parameters have it set to 0. AlignWithMoveDirection... How does that work? I think I might test that next.

One thing I did discover, which might prove to be useful for other people experimenting with terrain brushes, is that the .tga files that the .ini file references have to be saved as 8bit!!! 16bit and 24bit crash CAW horribly.

sleepalldaypartyallnight
6th Sep 2010, 02:01 PM
I wondered about the wiggle angle thing too - I wondered if maybe the brush turns as you move it or something? Align With Move Direction sounds like the brush might rotate as you drag it around?