playMaker

Author Topic: Perlin Noise Float  (Read 3029 times)

Red

  • Hero Member
  • *****
  • Posts: 563
Perlin Noise Float
« on: June 03, 2015, 02:03:06 PM »
An action I whipped up the other day for use in a camera shake algorithm... I needed a random value to animate with and I found the perlin noise function.

*NOTE* At this time, the non-declared axis is a randomly chosen value. If the general consensus is that this should be given the option (such as a "use random" bool and a "choose value" float input) to choose where on the other axis this scans across, I can add that in (I think.)

How to use this action:
  • Choose which axis to scan across. This works in either the X or Y. This option is only in there so as to allow some additional variation on the output in case you use multiples of this action.
  • Set the output variable (Float.) *NOTE: At this time I haven't figured out how to make it only use a variable... If you know, please let me know as well as I think having it open to only producing a value and not depositing it into a variable is pretty counter-productive. If you know the action(s) I should reference, please let me know.*
  • Set the multiplier. This is for if you want to either amplify or diminish the value within the action so you can save yourself having to multiply it manually with another action. Just felt right to add it in.
  • Set the noise speed. This sets how fast the sampling will scan across the chosen axis.
  • Set whether this is every frame or only once. (So, if you wanted a random value only once, you can use this... But realistically, the "random float" is probably better... But hey, it's there in case you wanted to use this either only once or every frame.)

This only produces a positive value and if you leave the multiplier as 1 then it will only produce a value between 0 and 1.

If you have any tips, suggestions or critiques of this, feel free to let me know. Anything I can do to improve this action (and by extension my own knowledge/skills at coding) is more than appreciated.
« Last Edit: June 03, 2015, 02:14:26 PM by Red »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Perlin Noise Float
« Reply #1 on: June 03, 2015, 02:25:05 PM »
Hi,

 I made an action a while ago on perlin noise as well :) But your version has a multiplier, which is a great little plus.

 Bye,

 Jean

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Perlin Noise Float
« Reply #2 on: June 03, 2015, 02:30:54 PM »
Aaah, whoops! Didn't know that when I put this together.

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Perlin Noise Float
« Reply #3 on: June 03, 2015, 07:00:10 PM »
Cool  :) Thank you!
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!