Many of you probably tried to use built in noise function to generate values, however i found that "as it is" its not that easy to make it tileable in constrained domain (e.g. if you have tile 128x128px).
Dude here described how its very easy to make it tileable with some awesome math and i have created helper class and GUI for it to control and play around.
You can add or remove parametric textures, change their values, change blending modes, add tint and make each texture posterized to certain level count, and thing will rerender and show them separately above, however after you change texture size, you have to press "Apply and render", because make process "live" after size change is going to garbage memory with canvases and nobody wants that. Since code is a mess, you can just press "Save texture" to save result texture into your appdata, or press "Get code" to copy parameters to your clipboard for later. Why you would want to copy it for later?
If you want to add a touch of messy procedural generation to your project, you are going to need these files: Just require "blender" somewhere in your project and create it with Blender:new(seed,width,height). And then you can paste previously copied parameters into a table to feed it to created blender object, and call
Code: Select all
-- Seed parameter is unnecessary since it is already defined in parameter table
blender = Blender(nil,128,128)
blender:setParameters(preset)
blender:createBlankBatch()
blender:renderPreTex()
blender:render()
More usage hints in example below
I've tried to keep things as simple as possible, but if someone is interested, i will try to clear things a bit if code is too much of a mess.
Also if you unpack batchnoise.love, there is a file called "reverse.lua", it's going to be included automatically if present and you can paste there previously created parameters to work. Just restart the thing after you do it.