T.A.P. Terrain angle painter

After being encouraged to make this into a plugin, here it is: T.A.P. (Terrain angle painter). T.A.P. does what it stands for, it changes the terrain material based on its angle. It works for detailing large maps where manually doing so will take a while, freeing up a lot of time when making terrain. T.A.P. is fully customizable, with nearly every aspect being modifiable by you to change.
link to T.A.P.:

Read the change log as this plugin is in active development

Here are some examples of what T.A.P. can do:



And here is a before and after with T.A.P.:
Before


After

Change Log:

  • [1.2] - Perlin noise update
    • Replaced randomizer with a perlin noise randomizer
    • Fixed a bug with advanced settings not saving
  • [1.1]
    • Massive performance gains, increased batch size from 400 to 10000 with minimal performance hit
    • Option to cancel terrain painting mid way through painting
    • Ui updates
  • [1.02] - Use Ignores fix
    • Enabling “Use Ignores” no longer brakes everything
  • [1.01] - Settings save and improvements
    • Settings now save automatically and can be copy/pasted from there folder in game.serverstorage. TerrainAnglePainter_Storage
    • Plugin errors no longer cause the the plugin to brake, it now outputs the errors in console
      • If you do not know how to fix it, please put it in this thread or message me so I can help solve it
    • New default config file
      • Please rename existing files to something else so the new file can be added
      • Existing files will brake
    • Spelling has been improved (fixed as many as i caught)
    • Random angle is now ± instead of += for randomization
  • [1.0] - Released

Documentation

  • To open settings click display settings in plugins tab
  • To paint terrain, click on paint terrain button in the T.A.P window

Settings

Global settings

  • Use ignores
    • Anything in the config file “IgnoresList” will be ignored
  • Start Vec3
    • The starting vector3 position to sample, this should be the lowest values in the vector3 area
  • End Vec3
    • The ending vector3 position to use, this should be the highest values in the vector3 area
  • Paint CubeSize
    • How big the cube is (in studs) when terrain is painted
  • Random Angle
    • Adds a slight randomization ± the angle to give variation to everything

Advanced settings (this can cause studio to crash if set too large)

  • Seed
    • The seed used for generation
  • Noise Sample
    • The number used to scale perlin noise resolution
    • The larger the number, the larger the region is
    • Not recommended to set below 64
  • Sample res
    • The spacing between sample points in studs
  • Gen increment
    • When painting the terrain, how many points to replace
  • Region3 size
    • The size of the Region3 area

Config file

  • Is located in game.serverstorage.TerrainAnglePainter_Storage
  • If one is not detected on studio join, then it is created
  • IgnoresList
    • Any thing in here will be ignored if “Use ignores” is true, basically a blacklist
  • Behavior
    • Place in highest min angle to lowest min angle
    • see the example in the file for documentation
    • MatSwap is a table that is a whitelist for materials

If you run into any bugs, let me know.
(this is my first plugin so i am expecting some bugs)

25 Likes

Doesn’t seem to work for me, and a bit on the pricy side for something that’s a work in progress…

1 Like

Can you tell me what doesn’t work, Ill try to address it tomorrow/today

There doesn’t seem to be a good way to set the angle at which it should become rock, so it kind of just does lil sporadic rock dots.

I’ve found the settings module but I’m not sure what a good setting is to get results like you showed in the previews. Any recommendations?

To make it not look like sporadic rock dots, the angle shuld be set to the approximate angle you expect it at that point. There are other settings as well that can affect this in particular, the “Paint CubeSize” and “sample res”. For me personaly, I use “Paint CubeSize” 8 and "Sample res " 4. Theses settings should make it work.
To answer you second question, here is the TerrainAnglePainter_Config I used to make it

local module = {
	["IgnoresList"] = {
		Enum.Material.Sand, Enum.Material.Sandstone, Enum.Material.Ground
	},

	["Behavior"] = {
		{
			["MinAng"] = 45, 
			["MaxAng"] = nil, 
			["MinHight"] = nil,
			["MaxHight"] = nil, 
			["MatData"] = Enum.Material.Rock, 
			["MatSwap"] = nil, 
			["Enabled"] = true
		},
		{
			["MinAng"] = 38,
			["MaxAng"] = nil,
			["MinHight"] = nil,
			["MaxHight"] = nil,
			["MatData"] = Enum.Material.Ground, 
			["MatSwap"] = nil,
			["Enabled"] = true
		}
	}
}

return module

and here is my widget window settings (the start and end vec3 dont matter)
image
Also I started with just a grass material on everything, as some materials such as rock, brick, and concrete are not smooth, so it will mess with measuring the angles. But rock can be used to give some variants to areas if the config file is right.

1 Like

Doesn’t work. Have tried different methods of coordinates, cube sizes, random angles, and everything. The terrain doesn’t change in any shape or form, which is concerning since this is a paid plugin.

Sorry about the problem, it was to do with the ignores. I just pushed a update and is should hopefully work now.