Striations Script

Emoticone11

The Dark Lord Sauron
Staff member
Hi everyone,

I'm uploading a possibly gamechanging script (see attached file) for doing realistic striation bands on rock cliffs and mountains. The script is based on Perlin noise. You'll need the Macro+Keybind mod to be able to run it. Here's an example of what it can do:

2022-04-23_21.56.38.png

Here's a quick description of what the parameters mean:

mask: any mask specifying the block(s) onto which the striations should be set.

pattern: the block ID(s) for the striations.

slope: controls the slope of the striations. The lower the value, the more horizontal the striations are. The higher the value, the steeper the striations are (negative numbers can be used to make them slope in the opposite direction).

noisemult: controls the amount of noise in the striations. The lower the value, the closer to a flat line you get. The higher the value, the more noisy patterns you get.

Pseed, Pscale, Pfrequency, Poctaves, Ppersistence: these are all of the Perlin parameters, same as described in the Noise Scripts thread. Briefly, Pscale changes the scale of the noise patterns, Pfrequency affects the "blobbiness" of the noise (lower values make it more blobby; higher values make it more random), higher values of Poctaves make the noise "rougher around the edges", and Ppersistence also controls how much noise around the edges gets put through.

offset: controls the y-offset of the bands.

separation: controls how much spacing there is between the bands; higher values means more spacing.

width: controls the width of the bands; higher values means wider bands.


From my own testing, I recommend the following presets as a starting point:
  • slope: 0.1
  • noisemult: 10
  • Pseed: 0
  • Pscale: 1
  • Pfrequency: 0.01
  • Poctaves: 4
  • Ppersistence: 0.8
  • offset: 0
  • separation: 20
  • width: 5

The best way to figure out what these do in practice is to grab a big cube of white wool and run the script yourself, tweaking one parameter at a time.

One thing to note is that the script shares parameters for generating the striations in the X and Z directions, i.e., the settings will be the same regardless of which orientation your cliff is facing. I didn't see any need for having separate parameters for each direction, though if somebody needs this for some reason I can upload a modified script with separate parameters.

Have fun experimenting!
 

Attachments

  • perlinbands.txt
    421 bytes · Views: 27

CashBanks

A Knight at the Opera
Staff member
One thing I've noticed is that even if you keep various perlin numbers the same - if you change the pattern block (e.g different wool colors), the striations lines also seem to change.
2022-04-29_21.27.53.png2022-04-29_21.28.39.png
I'm trying out ways to keep the lines relatively parallel so they don't overlap with each other too much, but the changes brought with each pattern make it a tad unpredictable to finesse. Still working on it though.
 
Last edited:

Emoticone11

The Dark Lord Sauron
Staff member
One thing I've noticed is that even if you keep various perlin numbers the same - if you change the pattern block (e.g different wool colors), the striations lines also seem to change.
View attachment 12509View attachment 12510
I'm trying out ways to keep the lines relatively parallel so they don't overlap with each other too much, but the changes brought with each pattern make it a tad unpredictable to finesse. Still working on it though.
Right; for some reason the //generate command, when used with perlin noise, randomizes the noise patterns even when you keep the seed and other parameters the same. The perlin noise itself should be deterministic, so I'm not really sure where this random effect is coming from or if it's possible to avoid it.

If you're trying to strictly avoid overlap, one solution I can think of would be to first run the script to create linear bands of the desired offsets, widths, and colors (i.e., setting noisemult to 0), and then mask those bands when actually generating the noisy striations. Although the lines should be relatively parallel to begin with, at least with lower levels of noise.