corgano Posted May 6, 2013 Posted May 6, 2013 I've been looking around for implementations of noise generators for autoit, but as of yet have had no luck More particularly, I'm looking for an x octave noise generator, but I haven't found any for autoit. Has anyone seen any x octave or perlin noise generators for autoit? 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e
TheDaverMan Posted May 6, 2013 Posted May 6, 2013 (edited) I have backup this from the forum but it is a frequency generator.#AutoIt3Wrapper_UseX64=n #include "Bass.au3" Global $nFreq = 5000 ; Hz Global Const $pi = ATan(1) * 4 _BASS_Startup() _BASS_Init(0, -1, 44100, 0, "") Global $hSample = _Bass_SampleCreate(88200, 44100, 1, 1, $BASS_SAMPLE_LOOP) Global $tSampleData = DllStructCreate("short[44100]") Global $fTmp = $pi * 2 / (44100 / $nFreq) For $i = 1 To 44100 DllStructSetData($tSampleData, 1, 32767 * Sin($i * $fTmp), $i) Next _Bass_SampleSetData($hSample, DllStructGetPtr($tSampleData)) Global $hChan = _Bass_SampleGetChannel($hSample, 0) _BASS_ChannelSetVolume($hChan, 30) _Bass_ChannelPlay($hChan, 0) Sleep(5000) _Bass_SampleStop($hSample) _BASS_SampleFree($hSample) _BASS_Free()You need to download BASS UDF : Edited May 6, 2013 by TheDaverMan
corgano Posted May 7, 2013 Author Posted May 7, 2013 (edited) I'm not looking for frequency noise, I'm looking for mathematical noise...This wiki article explains it better than I could. http://en.wikipedia.org/wiki/Perlin_noisePerlin noise generates something like this, and is used in things like photoshop to make cloudsSimplex octave noise generators give a somewhat similar output, but (in other languages at least) are faster, and you can configure the contrast and spacing between light and dark areas.http://en.wikipedia.org/wiki/Simplex_noiseAlso note, that some noise generators will produce the same random looking result if you give it the same input conditions. I want to use autoit to experiment with noise functions, because I don't know other languages very well. Does anyone know if either noise generator has been made? Edited May 7, 2013 by corgano 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e
spudw2k Posted May 7, 2013 Posted May 7, 2013 (edited) You've probably come across this link but it does contain Java code for perlin and simplex noise algos. I'm not smart enough to convert it to AutoIt though. http://webstaff.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf edit: forgot the link...stupid. Edited May 7, 2013 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
UEZ Posted May 7, 2013 Posted May 7, 2013 (edited) With pure AutoIt the calculation will be very slow!Anyway, on German web site there was a competition creating the fastest Perlin Noise without using any 3rd party stuff.Br,UEZ Edited May 7, 2013 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
spudw2k Posted May 7, 2013 Posted May 7, 2013 I figured(or at least hoped) you'd chime in UEZ. You're my resident AutoIt graphics expert. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
TheDaverMan Posted May 7, 2013 Posted May 7, 2013 (edited) There is a free dll library, but you must write the calling functions for autoit.http://libnoise.sourceforge.net/index.html Edited May 7, 2013 by TheDaverMan
corgano Posted May 8, 2013 Author Posted May 8, 2013 I figured a pure autoit functions would be slow (unless someone would crazy enough to write it in assembly inside an autoit script, trancexx ). I was hoping a solution like the free library already had someone write a wrapper for it, but I guess none exists. Sadly, I'm only good enough to use the functions, but not enough to write a wrapper for them . I'll see what the german site has 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e
Werty Posted May 8, 2013 Posted May 8, 2013 (edited) ImageMagick's "Plasma" function is a perlin noise generator.This...$img = ObjCreate("ImageMagickObject.MagickImage.1") $perlin = $img.Convert("-size","256x256","plasma:fractal","-blur","0x2","-colorspace","Gray","plasma_greyscale.jpg")..creates this... Read more about it here...www.imagemagick.org/Usage/canvas/index.html#plasma(be sure to read further down about seeding and repeating, you can create tileable pics )Also check out Fred's perlin noise script using imagemagick, for *Nix but maybe you can convert it to autoit.http://www.fmwconcepts.com/imagemagick/perlin/index.php Edited May 8, 2013 by Werty Some guy's script + some other guy's script = my script!
Werty Posted May 13, 2013 Posted May 13, 2013 So, was it useful ? or did you miss my post ? Just asking as I'm interested in it too, for a terrainmaker for IRRlicht and other 3d engines that people got working with autoit. Dunno if you found a better solution. Some guy's script + some other guy's script = my script!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now