Karst Wave and Spherical Effects

KARST WAVE EFFECTS (By KarstSkarn)


Showcase: [Crayta]

Note: As I am a new user I can’t post all the gifs I recorded for this post. I hope I can update the post soon.


Karst Wave Effects is a package that allows you to make circular, cylindrical, spiral or spherical shapes with any mesh or entity. It consists of 3 scripts that are fully customizable from the basic panel and are easy to combine and apply.

It works especially well with wakes or effects using particles but in fact it can be used with any type of entity including collisional meshes.

Note: The quality of the results depends very much on the configuration and context in which the script is used.

  • Are there any dependencies in this package?
    There are none. It can run perfectly well on its own. In fact, the showcase world only depends on the scripts released with the package

  • Is it only server-side or client-side?
    Actually it is both; you can choose with a simple trick whether you want it to run client-side or server-side. For example, purely cosmetic effects would be better to use client-side. If you want some effect to control some voxel meshes it is advisable to use server-side mode to ensure that all users are synchronized with the movement.

  • Do you really need to code to be able to use it correctly?
    Everyone can perfectly use this package without coding at all. There is nothing coded in it and all parameters are editable from the panel without any problem.

Anyway the code is more or less commented and explained. If you need to modify it a little bit to adapt it to your purpose it won’t be difficult.

Note: If you need help or have any questions feel free to contact me on Discord (Owain#3593)

The package includes the following scripts:

  1. karstSpringEffect: This script can make any kind of spiral including cylinders or just circles.

springsimple-min
The default spring effect

  1. karstVortexEffect: This script can make any kind of cones/vortices freely using the same mechanics as the spring effect script.

vortexvanilla
The default vortex effect

  1. karstSphereEffect: This script can make spheres and includes an option to be changed to make only domes (which are really half spheres). The shape and size can be fully edited.

spheremultiple-min
Some trails doing the default sphere effect

  1. karstWaveEffect: This script can make waves on any axis and as always it is fully customizable as well.

waveballorbitscompound
Here you can see some balls with the wave effect applied and then some others that do the spring effect without height increase arround the first ones.


Quick usage guide

It is really simple to use:

  1. First, spawn any effect, mesh or entity to which you want to apply the effect.

  2. Right click on the properties panel and add the script you want.

  3. Configure it to your liking (Default works too).

  4. Enjoy!

springphased90side-min
4 spirals rotating at 90 degrees from each other


Common properties

There are some properties that are common in all scripts and work exactly the same in all of them. They are as follows:

Note: All properties start with “k_”, this is a practice I have been doing for a long time in order to clearly check if a variable is a property or a normal script variable. This first version of the package has the original variable names but if it is a problem for someone I can easily change it and remove that prefix.

k_enabled: This allows you to enable or disable it. You can do it remotely using triggers with the “enableEffect()” and “disableEffect()” function.

k_resetOnEnable: Here you can decide if you want the effect to start from zero when it is enabled or if you want the effect to continue from the last position it was at before it was disabled.

k_clientSide: This toggles between running the script on the client or server side. By default it is executed only on the client side.

k_baseFrames: (Only runs on the client side) Allows you to choose which frames are intended to be used. It is recommended to use the lowest possible setting (30 FPS). This works as follows: If you have selected 60 FPS and a user is using 120 Frames per second joins the server. The effect will skip its execution and only do the necessary frames so that it is not too fast for that user (As 60 frames is half of 120 the execution will run at half speed). Conversely, if a user is using 30 frames join and the base frames chosen are 60 FPS this user will run the effect twice per tick to be in sync with what other users see at different framerates.

k_skipTicks: This can be used to avoid performance problems if the use is very massive or to slow down the effects. It allows to execute the effect every X determined ticks.

k_everyXTicks: Determines how many ticks will be skipped if “k_skipTicks” is activated.

k_move: This is an experimental feature intended to be used on entities with collisions enabled. This switches between changing the position every tick and moving it every tick. It is not really important now, as the difference between the two options is minimal in most cases.

k_relativeToEntity: Allows to toggle between running in its original position or acquiring the position of another entity on each tick (Effectively follows it).

k_entity: If “k_relativeToEntity” is enabled this is where you must drag and drop or select the entity you wish to follow.

Extra Common Options

k_blink: This allows the effect to change the “active” state of the entity given a certain time. This option is mainly intended to be used in traces and any other effect that supports this mechanic.

k_blinkTime: Determines how many ticks will be visible / invisible using the “active” state.

k_invertBlink: Determines whether the initial blink state will be on or off. This is useful if you have two effects and want to make it look like they are switching between one and the other.

k_wobble: This applies a wave distortion on top of the current effect run.

k_wobbleSpeedFactor: This works exactly like k_speedFactor and determines the speed at which the distortion will run.

k_wobbleRadius: Determines the amplitude of the distortion. It works similarly to “k_radius” but is applied on the wobble distortion.

k_xWobble: Applies the wobble distortion to the X-axis.

k_invXWobble: Reverses the direction of the X-axis distortion.

k_yWobble: Applies the wobble distortion to the Y-axis.

k_invYWobble: Reverses the direction of the Y-axis distortion.

k_zWobble: Applies the wobble distortion to the Z axis.

k_invZWobble: Reverses the direction of the Z-axis distortion.


karstSpringEffect


The spring effect is oriented to make spirals or spring shaped cylinders. It can be configured to do other things. The properties that can be configured are as follows:

General Options

k_backwards: Only works if “k_limitByZ” is disabled. Allows to reverse the direction in which the effect is performed.

k_reverseOnEnd: This will cause the effect to return instead of restarting again from the background.

k_antiClockWise: This toggles between clockwise or counterclockwise motion. Default is counterclockwise.

Function Options

k_initialPhase: Determines in degrees the initial position of the effect. Any number between 0 and 360 is valid.

k_radius: Determines the radius of the circle.

k_speedFactor: Changes the speed at which the effect works. It is a bit counter-intuitive because when the number is higher, the effect is slower. If the number is smaller, the effect will be faster.

k_hIncrement: This changes the spring height increment. If it is higher, the effect will be higher. If set to zero the effect will make only circles without ever ending.

k_affectTo: Here you can choose which axis the effect will use. By changing it to X or Y you can make the effect work horizontally.

k_phaseOnReset: If “k_reverseOnEnd” is disabled, this determines how the effect will be rotated each time it ends.

Limit Options

k_limitByZ: If enabled will cause the effect to restart or bounce (depending on the value of k_reverseOnEnd) when it reaches the given value relative to its starting position. For example, an effect that starts at Z = 1000 and “k_limitByZ” is set to 500, will reset / bounce when it reaches Z = 1500.

k_maxHeight: This is the actual limit value that “k_limitByZ” will use.

k_maxTicks: If “k_limitByZ” is disabled the effect will be limited by the number of ticks it executes. When it is higher the more ticks the effect will execute before restarting/bouncing it and therefore it will be higher.


karstVortexEffect


The vortex effect is oriented to make a cone or vortex shape. It can be set to work exactly like “karstSpringEffect”. The point is that it is not mandatory that one end be smaller than the other; the effect will adapt to the initial and final size you enter in the settings.

General Options

k_backwards: Only works if “k_limitByZ” is disabled. Allows to reverse the direction in which the effect is performed.

k_reverseOnEnd: This will make the effect go back instead of restarting again from the background.

k_antiClockWise: This toggles between clockwise or counterclockwise motion. Default is counterclockwise.

Function Options

k_initialPhase: Determines in degrees the initial position of the effect. Any number between 0 and 360 is valid.

k_initialRadius: Determines the initial radius of the vortex. It is not necessary for one to be smaller than the other. They can even be equal.

k_finalRadius: Determines the end radius of the vortex. It is not necessary that one is smaller than the other. They can even be equal.

k_speedFactor: This changes the speed at which the effect works. It is a bit counter-intuitive because when the number is higher the effect is slower. When the number is lower the effect will be faster.

k_hIncrement: This changes the increase of the height of the vortex. If it is larger, the effect will be higher. If set to zero, the effect will only spiral.

k_affectTo: Here you can choose which axis the effect will use. By changing to X or Y you can make the effect work horizontally.

k_phaseOnReset: If “k_reverseOnEnd” is disabled, this determines how the effect will be rotated each time the effect ends.

Limit Options

k_limitByZ: If enabled will cause the effect to restart or bounce (depending on the value of k_reverseOnEnd) when it reaches the given value relative to its starting position. For example, an effect that starts at Z = 1000 and “k_limitByZ” is set to 500, will reset / bounce when it reaches Z = 1500.

k_maxHeight: This is the actual limit value that “k_limitByZ” will use.

k_maxTicks: If “k_limitByZ” is disabled the effect will be limited by the number of ticks it executes. When it is higher the more ticks the effect will execute before restarting/bouncing it and therefore it will be higher.


karstSphereEffect


The sphere effect can effectively make spheres (commonly known as balls) and has a built-in option to make only half of the sphere thus creating a dome. Its shape and size is fully configurable using some of the following parameters

General Options

k_backwards: Only works if “k_limitByZ” is disabled. Allows to reverse the direction in which the effect is performed.

k_reverseOnEnd: This will cause the effect to return instead of restarting again from the bottom.

k_antiClockWise: This toggles between clockwise or counterclockwise motion. Default is counterclockwise.

Function Options

k_domeOffset: This allows correcting the dome position if “k_dome” is enabled.

k_initialPhase: Determines in degrees the initial position of the effect. Any number between 0 and 360 is valid.

k_speedFactor: Changes the speed at which the effect works. It is a bit counter-intuitive because when the number is higher the effect is slower. When the number is smaller the effect will be faster.

k_sphereRadius: Determines the maximum radius of the sphere.

k_sphereFactor: This can change the shape of the sphere making it appear wider or more elongated.

k_hIncrement: Changes the height increment of the sphere. If set higher, the effect will be taller. If set to zero the effect will make only circles without ever ending.

k_affectTo: Here you can choose which axis the effect will use. By changing it to X or Y you can make the effect work horizontally.

Limit Options

k_limit: Enables or disables the sphere height limitation. It is recommended to keep it disabled.

k_limitByZ: If enabled will cause the effect to reset or bounce (depending on the value of k_reverseOnEnd) when it reaches the given value relative to its starting position. For example, an effect that starts at Z = 1000 and “k_limitByZ” is set to 500, will reset / bounce when it reaches Z = 1500.

k_maxHeight:This is the actual limit value that “k_limitByZ” will use.

k_maxTicks: If “k_limitByZ” is disabled the effect will be limited by the number of ticks it executes. When it is higher the more ticks the effect will execute before restarting/bouncing it and therefore it will be higher.


karstWaveEffect


The wave effect is perhaps the simplest but at the same time the most versatile of all. It can make a wave motion on any axis and as always is fully configurable

General Options

k_inverted: Reverses the shape of the waveform. For example, instead of going up and then down, it will go down and then up.

Function Options

k_amplitude: Determines the amplitude of the wave. Works a bit like the “k_radius” parameter in the other scripts.

k_initialPhase: Determines in degrees the initial position of the effect. Any number between 0 and 360 is valid.

k_speedFactor: Changes the speed at which the effect runs. It is a bit counter-intuitive because when the number is higher, the effect is slower. If the number is lower, the effect will be faster.

k_affectTo: Here you can choose which axis the effect will use. By changing to X or Y you can make the effect work horizontally.

k_offset: Allows you to adjust the Z position of the effect. If you use any other axis, it will be applied to that axis instead of Z.

k_enableRotation: Allows you to rotate the entity. It is not recommended to rotate more than one axis at a time.

k_pitchSpeed: Here you can set how much the entity will rotate on each tick.

k_yawSpeed: Here you can set how much the entity will rotate on each tick…

k_rollSpeed: Here you can set how much the entity will rotate on each tick.


3 Likes