<?xml version="1.0" encoding="utf-8"?>
				<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"
				 xmlns:annotate="http://purl.org/rss/1.0/modules/annotate/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
			    <channel> 
			    <generator>Filter Forge Site</generator> 
			    <title>www.filterforge.com - Scripting</title> 
			    <description></description> 
			    <link>http://www.filterforge.com/forum/list.php?FID=18</link> 
			    <language>en</language> 
			    <webMaster>support@filterforge.com</webMaster> 
			    <copyright>(C) 2006</copyright> 
			    <pubDate>Thu, 14 May 2026 12:56:41 -0400</pubDate> 
			    <lastBuildDate>Thu, 14 May 2026 12:56:41 -0400</lastBuildDate> 
			    <item><title>Error Diffusion Dithering</title> 
		             <dc:creator>AussieDecalf</dc:creator> 
		             <category></category> 
		             <pubDate>Thu, 14 Aug 2025 22:05:53 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=17227</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=17227</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;AussieDecalf&lt;/b&gt;, &lt;em&gt;Fri, 08 Aug 2025 17:36:12 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hey I'd love to see if anyone can figure out this with me. I'm looking to make a filter that will convert an image to a pixel dithered output. Something like this:&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/commons/c/c1/Michelangelo%27s_David_-_Floyd-Steinberg.png&quot; id=&quot;popup_146413483&quot; border=&quot;0&quot; width=&quot;300&quot; height=&quot;300&quot; data-bx-viewer=&quot;image&quot; data-bx-src=&quot;https://upload.wikimedia.org/wikipedia/commons/c/c1/Michelangelo%27s_David_-_Floyd-Steinberg.png&quot; /&gt;&lt;br /&gt;&lt;br /&gt;Or like this with multiple colors:&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/commons/6/6d/Dithering_example_dithered_web_palette.png&quot; id=&quot;popup_868233278&quot; border=&quot;0&quot; width=&quot;300&quot; height=&quot;300&quot; data-bx-viewer=&quot;image&quot; data-bx-src=&quot;https://upload.wikimedia.org/wikipedia/commons/6/6d/Dithering_example_dithered_web_palette.png&quot; /&gt;&lt;br /&gt;&lt;br /&gt;I am specifically looking to make error diffusion or false error diffusion like Floyd-Steinberg, and not ordered diffusion. Ordered diffusion basically inputs a small grayscale bitmap as the diffusion pattern, or a diffusion matrix in code that does the same thing. &lt;br /&gt;&lt;br /&gt;I'm already trying to get AI to program this for me, with some minor success. It turns out the fact that Filter Forge uses a sample based architecture means it fundamentally misses the required functionality to render an error diffusion.&lt;br /&gt;&lt;br /&gt;But, I'm sure there's some novel ideas out there. I don't know how to code any of this myself, and I am only about as useful with LUA as it comes to catching easy bugs or fixing simple structural issues. I did have the idea of having the script build a pseudo grid that will act as pixels, and then have the formulas interact with that grid, but it might be a pipe dream.&lt;br /&gt;&lt;br /&gt;I'd love to see what you all can come up with. There's a web app out there that does this BTW!&lt;br /&gt;&lt;a href=&quot;https://doodad.dev/dither-me-this/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Dither Me This&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Rachel Duim&lt;/b&gt;, &lt;em&gt;Thu, 14 Aug 2025 22:05:53 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;My take on this: pixel by pixel manipulation is not a strong suit in FF. You can do a lot with LUA (fractals for instance), but the limitations on LUA make it slow. FF only uses one core when running LUA (not thread safe). And being procedural, the LUA function you create gets called for each block rendered. I also find it is not the easiest to debug and crashes occasionally when in the filter editor. My 2 cents, 3 with tariffs.&lt;/p&gt;
</description>
</item>
<item><title>Can be made LUA scripting with AI using CHATGTP or any other AI?</title> 
		             <dc:creator>SpaceRay</dc:creator> 
		             <category></category> 
		             <pubDate>Thu, 17 Oct 2024 14:32:34 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=17162</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=17162</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Thu, 17 Oct 2024 14:32:34 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;If you are already a expert script coding creator, maybe ChatGPT can save you time to make it faster, but if you are like me that have zero LUA knowledge it can help maybe too&lt;br /&gt;&lt;br /&gt;I have been seeing some tutorials on internet about ChatGPT and it seems that it can create scripts in any programming language that you may need &lt;br /&gt;&lt;br /&gt;Then I have seen this &lt;a href=&quot;https://www.reddit.com/r/tabletopsimulator/comments/1dtclqn/chat_gpt_actually_makes_decent_tts_lua_code/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;confirmation that it can do it&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So I thought that maybe it could be useful and interesting for making scripts in LUA to be used in filter forge &lt;br /&gt;&lt;br /&gt;&lt;b&gt;THE ANSWER IS YES, YOU CAN DO LUA SCRIPTS FOR FILTER FORGER EASILY&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I have already tested it and if you write the correct prompt and you ask that it makes the required input editors they will be created&lt;br /&gt;&lt;br /&gt;If there is an error in the script when tested in the map script of FF, you just simply tell the error to ChatGPT and it will be fixed &lt;br /&gt;&lt;br /&gt;Although I have to say that when I said YES, I am still testing it, and I am still getting some errors and although it fixes it is still not working as I have zero Lua knowledge to fix it myself &lt;br /&gt;&lt;br /&gt;But if you are an expert you can surely benefit from this as you already how to make it right &lt;br /&gt;&lt;br /&gt;ABOUT MY EXPERIENCE WITH LUA &lt;br /&gt;&lt;br /&gt;I have been trying to learn LUA but I am sorry that can't do it and so have no any experience &lt;br /&gt;&lt;br /&gt;I really admire much and congratulate all of you that can be able to make such creative and useful scripts &lt;br /&gt;&lt;br /&gt;Thanks very much for any possible help&lt;/p&gt;
</description>
</item>
<item><title>Title: Script Projects - Debugging Assistance Thread</title> 
		             <dc:creator>David Roberson</dc:creator> 
		             <category></category> 
		             <pubDate>Sun, 08 Sep 2024 17:47:20 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16794</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16794</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Sun, 05 Mar 2023 21:13:12 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Greetings fellow script authors!&lt;br /&gt;&lt;br /&gt;As we all know, writing a script can be a daunting task. Whether you're an experienced programmer or a novice, there are always hurdles to overcome. Sometimes you may get stuck on a particular section of code, or maybe you're having trouble getting your script to work the way you want it to. Fear not, for this forum thread is dedicated to providing assistance with completing your work-in-progress scripts.&lt;br /&gt;&lt;br /&gt;Here's how it works:&lt;br /&gt;&lt;br /&gt;Post your script project in the comments section. Be sure to provide as much detail as possible, including what the script is supposed to do, what language it's written in (if, for example, you are trying to convert some python into lua), and what specific issues you're having trouble with.&lt;br /&gt;&lt;br /&gt;Other members of the community will read your post and offer their assistance. They may provide suggestions on how to fix the issue, offer code snippets that can help, or even offer to collaborate with you on the project.&lt;br /&gt;&lt;br /&gt;If you're feeling generous, take a look at other people's projects and offer your own expertise. You never know when you might be able to help someone else out.&lt;br /&gt;&lt;br /&gt;A few ground rules:&lt;br /&gt;&lt;br /&gt;Be respectful of others. This is a space for constructive criticism and collaboration, not negativity.&lt;br /&gt;&lt;br /&gt;Do not post any malicious code or attempt to exploit vulnerabilities in others' code.&lt;br /&gt;&lt;br /&gt;Keep the discussion focused on script debugging and development.&lt;br /&gt;&lt;br /&gt;Now, I know the FF Forum are pretty lightly trafficked these days, but I'd like to encourage a bit more interest in and activity on them. I am in the process of expanding my Lua scripting knowledge, recently with the help of ChatGPT. I've found it a good source of information that is difficult to find just searching online. It's a bit of work to get what you're looking for there, as well, so I plan to collect what insights I can and compile them in a more accessible form to share here. So, I'll be posting whatever I can as I go. I hope to lure in a few more with an interest in or more experience with scripting.&lt;br /&gt;&lt;br /&gt;With that said, I invite you all to start posting your script projects and let's get to work!&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Sun, 05 Mar 2023 21:29:31 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I'll get the ball rolling with this: I converted Simplex noise written in java to lua and found myself caught on a potential out of bounds error being reported as an attempt to index a `nil` value. I've commented out most of the code and focused in on one point, where I could no longer adequately test the problem. I've put a couple day into this, so it's time to put it out there for someone else to look at it. It could be obvious to a more experienced author what I'm missing. If you give it a look, you have my gratitude!&lt;br /&gt;&lt;br /&gt;[CODE]&lt;br /&gt;-- &lt;br /&gt;-- simplex noise proto.lua&lt;br /&gt;-- v.0.0.1 revision and testing&lt;br /&gt;-- generates simplex noise in 2d, 3d and 4d&lt;br /&gt;-- source: &lt;a href=&quot;https://weber.itn.liu.se/~stegu/simplexnoise/SimplexNoise.java&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;https://weber.itn.liu.se/~stegu/simple...Noise.java&lt;/a&gt;&lt;br /&gt;-- used in filter forge map script component&lt;br /&gt;&lt;br /&gt;--[[&lt;br /&gt;	Simplex noise is a type of gradient noise that is used for generating natural-looking textures, terrain, &lt;br /&gt;	and other procedural content.&lt;br /&gt;	A speed-improved simplex noise algorithm for 2D, 3D and 4D in Lua.&lt;br /&gt;&lt;br /&gt;	Based on example code by Stefan Gustavson (stegu@itn.liu.se).&lt;br /&gt;	Optimisations by Peter Eastman (peastman@drizzle.stanford.edu).&lt;br /&gt;	Lua conversion by David Bryan Roberson (&lt;a href=&quot;https://github.com/eyeofparadox)&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;https://github.com/eyeofparadox)&lt;/a&gt; in 2023&lt;br /&gt;	Better rank ordering method for 4D by Stefan Gustavson in 2012.&lt;br /&gt;&lt;br /&gt;	This could be speeded up even further, but it's useful as it is.&lt;br /&gt;&lt;br /&gt;	Version 2012-03-09-2023&lt;br /&gt;&lt;br /&gt;	This code was placed in the public domain by its original author,&lt;br /&gt;	Stefan Gustavson. You may use it as you see fit, but attribution is appreciated.&lt;br /&gt;--]]&lt;br /&gt;&lt;br /&gt;function prepare()&lt;br /&gt;	-- inputs and precalculation.&lt;br /&gt;	noiseScale = 50&lt;br /&gt;	noiseOctaves = 4&lt;br /&gt;	noiseLacunarity = 2.0&lt;br /&gt;	noisePersistence = 0.5&lt;br /&gt;&lt;br /&gt;	grad3 = {&lt;br /&gt;		{1,1,0},{-1,1,0},{1,-1,0},{-1,-1,0},&lt;br /&gt;		{1,0,1},{-1,0,1},{1,0,-1},{-1,0,-1},&lt;br /&gt;		{0,1,1},{0,-1,1},{0,1,-1},{0,-1,-1}&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;	grad4 = {&lt;br /&gt;		{0, 1, 1, 1},	{0, 1, 1, -1},	{0, 1, -1, 1},	{0, 1, -1, -1},&lt;br /&gt;		{0, -1, 1, 1}, {0, -1, 1, -1}, {0, -1, -1, 1}, {0, -1, -1, -1},&lt;br /&gt;		{1, 0, 1, 1},	{1, 0, 1, -1},	{1, 0, -1, 1},	{1, 0, -1, -1},&lt;br /&gt;		{-1, 0, 1, 1}, {-1, 0, 1, -1}, {-1, 0, -1, 1}, {-1, 0, -1, -1},&lt;br /&gt;		{1, 1, 0, 1},	{1, 1, 0, -1},	{1, -1, 0, 1},	{1, -1, 0, -1},&lt;br /&gt;		{-1, 1, 0, 1}, {-1, 1, 0, -1}, {-1, -1, 0, 1}, {-1, -1, 0, -1},&lt;br /&gt;		{1, 1, 1, 0},	{1, 1, -1, 0},	{1, -1, 1, 0},	{1, -1, -1, 0},&lt;br /&gt;		{-1, 1, 1, 0}, {-1, 1, -1, 0}, {-1, -1, 1, 0}, {-1, -1, -1, 0}&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;	p = {&lt;br /&gt;		151,160,137,91,90,15,&lt;br /&gt;		131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,&lt;br /&gt;		190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,&lt;br /&gt;		88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,&lt;br /&gt;		77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,&lt;br /&gt;		102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,&lt;br /&gt;		135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,&lt;br /&gt;		5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,&lt;br /&gt;		223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,&lt;br /&gt;		129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,&lt;br /&gt;		251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,&lt;br /&gt;		49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,&lt;br /&gt;		138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;	n = #p&lt;br /&gt;&lt;br /&gt;	perm = {}&lt;br /&gt;	-- initialize permutation table with random values&lt;br /&gt;	for i=1,256 do&lt;br /&gt;		perm[i] = math.random(0,255)&lt;br /&gt;	end&lt;br /&gt;&lt;br /&gt;	-- extend the permutation table to avoid overflow&lt;br /&gt;	for i=257,512 do&lt;br /&gt;		perm[i] = perm[i - 256]&lt;br /&gt;	end&lt;br /&gt;&lt;br /&gt;	permMod12 = {}&lt;br /&gt;	-- initialize permMod12 table with 0 values&lt;br /&gt;	for i = 1, 512 do&lt;br /&gt;		permMod12[i] = 0&lt;br /&gt;	end&lt;br /&gt;	&lt;br /&gt;	for i=1,512 do&lt;br /&gt;		permMod12[i] = perm[i] % 12&lt;br /&gt;	end&lt;br /&gt;&lt;br /&gt;	-- update grad3 and grad4 with the new permutation table&lt;br /&gt;	-- for i=1,256 do&lt;br /&gt;		-- grad3[i+1] = {grad3[perm[i+1] % 12 + 1][1], grad3[perm[i+1] % 12 + 1][2], grad3[perm[i+1] % 12 + 1][3]}&lt;br /&gt;		-- grad4[i+1] = {grad4[perm[i+1] % 32 + 1][1], grad4[perm[i+1] % 32 + 1][2], grad4[perm[i+1] % 32 + 1][3], grad4[perm[i+1] % 32 + 1][4]}&lt;br /&gt;	-- end&lt;br /&gt;&lt;br /&gt;	F2 = 0.5*(math.sqrt(3.0)-1.0)&lt;br /&gt;	G2 = (3.0-math.sqrt(3.0))/6.0&lt;br /&gt;	F3 = 1.0/3.0&lt;br /&gt;	G3 = 1.0/6.0&lt;br /&gt;	F4 = (math.sqrt(5.0)-1.0)/4.0&lt;br /&gt;	G4 = (5.0-math.sqrt(5.0))/20.0&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;					if x &amp;lt; 0 or x &amp;gt; 1 or y &amp;lt; 0 or y &amp;gt; 1 then&lt;br /&gt;						return 0.5, 0.5, 0.5, 1&lt;br /&gt;					end&lt;br /&gt;	local xin, yin = x/noiseScale, y/noiseScale&lt;br /&gt;	local noise2D = get_2d_noise(xin, yin, noiseOctaves, noiseLacunarity, noisePersistence)&lt;br /&gt;	-- local noise3D = 0 -- get_3d_noise(xin, yin, 0, noiseOctaves, noiseLacunarity, noisePersistence)&lt;br /&gt;	-- local noise4D = 0 -- get_4d_noise(xin, yin, 0, 0, noiseOctaves, noiseLacunarity, noisePersistence)&lt;br /&gt;&lt;br /&gt;	local r = noise2D&lt;br /&gt;	-- local g = noise3D&lt;br /&gt;	-- local b = noise4D&lt;br /&gt;	local a = 1&lt;br /&gt;&lt;br /&gt;	-- return r, g, b, a&lt;br /&gt;	return r, 0, 0, a&lt;br /&gt;	-- return 0, g, 0, a&lt;br /&gt;	-- return 0, 0, b, a&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;function test_variables(r, g, b, a)&lt;br /&gt;  local variables = {r, g, b, a}&lt;br /&gt;  local nil_values = false&lt;br /&gt;  &lt;br /&gt;  for i=1, 4 do&lt;br /&gt;    if variables[i] == nil then&lt;br /&gt;      variables[i] = 0&lt;br /&gt;      nil_values = true&lt;br /&gt;    elseif variables[i] ~= nil then&lt;br /&gt;      variables[i] = variables[i]&lt;br /&gt;    else&lt;br /&gt;      variables[i] = 1&lt;br /&gt;      nil_values = true&lt;br /&gt;    end&lt;br /&gt;  end&lt;br /&gt;  &lt;br /&gt;  if nil_values then&lt;br /&gt;    return unpack(variables)&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;--[[&lt;br /&gt;function grad3(...)&lt;br /&gt;	local args = {...}&lt;br /&gt;	for i, x in ipairs(args) do&lt;br /&gt;		args[i] = x % n&lt;br /&gt;	end&lt;br /&gt;	local a = args[1] + args[2] + args[3]&lt;br /&gt;	local gi = permMod12[a % n]&lt;br /&gt;	-- for i in `grad3`&lt;br /&gt;	if grad3[i] == nil then&lt;br /&gt;	  return 1, 0, 1, 1&lt;br /&gt;	end&lt;br /&gt;	return dot({grad3[gi][1], grad3[gi][2], grad3[gi][3]}, args[1] - grad3[a % 12 + 1][1], args[2] - grad3[a % 12 + 1][2], args[3] - grad3[a % 12 + 1][3])&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;function grad4(...)&lt;br /&gt;	local args = {...}&lt;br /&gt;	for i, x in ipairs(args) do&lt;br /&gt;		args[i] = x % n&lt;br /&gt;	end&lt;br /&gt;	local a = args[1] + args[2] + args[3] + args[4]&lt;br /&gt;	local gi = permMod12[a % n]&lt;br /&gt;	-- for i in `grad4`&lt;br /&gt;	if grad4[i] == nil then&lt;br /&gt;	  return 1, 0, 1, 1&lt;br /&gt;	end&lt;br /&gt;	return dot({grad4[gi][1], grad4[gi][2], grad4[gi][3], grad4[gi][4]}, args[1] - grad4[a % 32 + 1][1], args[2] - grad4[a % 32 + 1][2], args[3] - grad4[a % 32 + 1][3], args[4] - grad4[a % 32 + 1][4])&lt;br /&gt;end&lt;br /&gt;]]--&lt;br /&gt;&lt;br /&gt;function fastfloor(x)&lt;br /&gt;	local xi = math.floor(x)&lt;br /&gt;	return (x &amp;lt; xi) and (xi-1) or xi&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;function dot(grd, x, y)&lt;br /&gt;	return (grd.x*x) + (grd.y*y) -- debug &quot;Script error (line 141) : attempt to index a nil value (local 'grd')&quot; &amp;gt;&amp;gt;&amp;gt; called from: lines 215,222,229&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;-- function dot(grd, x, y, z)&lt;br /&gt;	-- return (grd.x*x) + (grd.y*y) + (grd.z*z)&lt;br /&gt;-- end&lt;br /&gt;&lt;br /&gt;-- function dot(grd, x, y, z, w)&lt;br /&gt;	-- return (grd.x*x) + (grd.y*y) + (grd.z*z) + (grd.w*w)&lt;br /&gt;-- end&lt;br /&gt;&lt;br /&gt;function get_2d_noise(xin, yin) &lt;br /&gt;	local n0, n1, n2&lt;br /&gt;	&lt;br /&gt;	local s = (xin+yin)*F2&lt;br /&gt;	local i = fastfloor(xin+s)&lt;br /&gt;	local j = fastfloor(yin+s)&lt;br /&gt;	local t = (i+j)*G2&lt;br /&gt;	local x0 = i-t&lt;br /&gt;	local y0 = j-t&lt;br /&gt;	local x0 = xin-x0&lt;br /&gt;	local y0 = yin-y0&lt;br /&gt;	&lt;br /&gt;	local i1, j1&lt;br /&gt;	if x0&amp;gt;y0 then &lt;br /&gt;		i1 = 1&lt;br /&gt;		j1 = 0&lt;br /&gt;	else&lt;br /&gt;		i1 = 0 &lt;br /&gt;		j1 = 1&lt;br /&gt;	end&lt;br /&gt;	&lt;br /&gt;	local x1 = x0 - i1 + G2&lt;br /&gt;	local y1 = y0 - j1 + G2&lt;br /&gt;	local x2 = x0 - 1.0 + 2.0 * G2&lt;br /&gt;	local y2 = y0 - 1.0 + 2.0 * G2&lt;br /&gt;	&lt;br /&gt;	local ii = (i + 1) &amp; 255&lt;br /&gt;	local jj = (j + 1) &amp; 255&lt;br /&gt;	test_variables(ii,jj)&lt;br /&gt;&lt;br /&gt;	local gi0 = permMod12[ii+perm[jj]]&lt;br /&gt;	local gi1 = permMod12[ii+i1+perm[jj+j1]]&lt;br /&gt;	local gi2 = permMod12[ii+1+perm[jj+1]]&lt;br /&gt;	test_variables(gi0,gi1,gi2)&lt;br /&gt;	&lt;br /&gt;	local t0 = 0.5 - x0*x0-y0*y0&lt;br /&gt;	if t0&amp;lt;0 then&lt;br /&gt;		n0 = 0.0&lt;br /&gt;	else&lt;br /&gt;		t0 = t0 * t0&lt;br /&gt;		n0 = t0 * t0 * dot(grad3[gi0], x0, y0) -- &amp;lt;&amp;lt;&amp;lt; grad3[gi0],grad3[gi1],grad3[gi2] may be `nil`: points at lines 206-208 again&lt;br /&gt;	end&lt;br /&gt;	local t1 = 0.5 - x1*x1-y1*y1&lt;br /&gt;	if t1&amp;lt;0 then&lt;br /&gt;		n1 = 0.0&lt;br /&gt;	else&lt;br /&gt;		t1 = t1 * t1&lt;br /&gt;		n1 = t1 * t1 * dot(grad3[gi1], x1, y1)&lt;br /&gt;	end&lt;br /&gt;	local t2 = 0.5 - x2*x2-y2*y2&lt;br /&gt;	if t2&amp;lt;0 then&lt;br /&gt;		n2 = 0.0&lt;br /&gt;	else&lt;br /&gt;		t2 = t2 * t2&lt;br /&gt;		n2 = t2 * t2 * dot(grad3[gi2], x2, y2)&lt;br /&gt;	end&lt;br /&gt;	&lt;br /&gt;	return  (n0 + n1 + n2)&lt;br /&gt;	-- return 70.0 * (n0 + n1 + n2)&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;	--[[&lt;br /&gt;function get_3d_noise(xin, yin, zin)&lt;br /&gt;	local n0, n1, n2, n3&lt;br /&gt;	local s = (xin+yin+zin)*F3&lt;br /&gt;	local i = math.floor(xin+s)&lt;br /&gt;	local j = math.floor(yin+s)&lt;br /&gt;	local k = math.floor(zin+s)&lt;br /&gt;	local t = (i+j+k)*G3&lt;br /&gt;	local x0 = i-t&lt;br /&gt;	local y0 = j-t&lt;br /&gt;	local z0 = k-t&lt;br /&gt;	local x0 = xin-x0&lt;br /&gt;	local y0 = yin-y0&lt;br /&gt;	local z0 = zin-z0&lt;br /&gt;	local i1, j1, k1&lt;br /&gt;	local i2, j2, k2&lt;br /&gt;	if x0&amp;gt;=y0 then&lt;br /&gt;		if y0&amp;gt;=z0 then&lt;br /&gt;			i1=1; j1=0; k1=0; i2=1; j2=1; k2=0&lt;br /&gt;		elseif x0&amp;gt;=z0 then&lt;br /&gt;			i1=1; j1=0; k1=0; i2=1; j2=0; k2=1&lt;br /&gt;		else&lt;br /&gt;			i1=0; j1=0; k1=1; i2=1; j2=0; k2=1&lt;br /&gt;		end&lt;br /&gt;	else -- x0&amp;lt;y0&lt;br /&gt;		if y0&amp;lt;z0 then&lt;br /&gt;			i1=0; j1=0; k1=1; i2=0; j2=1; k2=1&lt;br /&gt;		elseif x0&amp;lt;z0 then&lt;br /&gt;			i1=0; j1=1; k1=0; i2=0; j2=1; k2=1 &lt;br /&gt;		else&lt;br /&gt;			i1=0; j1=1; k1=0; i2=1; j2=1; k2=0&lt;br /&gt;		end&lt;br /&gt;	end&lt;br /&gt;	local x1 = x0 - i1 + G3&lt;br /&gt;	local y1 = y0 - j1 + G3&lt;br /&gt;	local z1 = z0 - k1 + G3&lt;br /&gt;	local x2 = x0 - i2 + 2.0*G3&lt;br /&gt;	local y2 = y0 - j2 + 2.0*G3&lt;br /&gt;	local z2 = z0 - k2 + 2.0*G3&lt;br /&gt;	local x3 = x0 - 1.0 + 3.0*G3&lt;br /&gt;	local y3 = y0 - 1.0 + 3.0*G3&lt;br /&gt;	local z3 = z0 - 1.0 + 3.0*G3&lt;br /&gt;	local ii = (i + 1) &amp; 255&lt;br /&gt;	local jj = (j + 1) &amp; 255&lt;br /&gt;	local kk = (k + 1) &amp; 255&lt;br /&gt;	-- in `get_3d_noise`&lt;br /&gt;	if not ii or jj or kk then&lt;br /&gt;		return 0, 1, 0, 1&lt;br /&gt;	end&lt;br /&gt;	-- local gi0 = permMod12[ii+perm[jj+perm[kk+1] ]&lt;br /&gt;	local gi1 = permMod12[ii+i1+perm[jj+j1+perm[kk+k1+1] ]&lt;br /&gt;	local gi2 = permMod12[ii+i2+perm[jj+j2+perm[kk+k2+1] ]&lt;br /&gt;	local gi3 = permMod12[ii+1+perm[jj+1+perm[kk+1+1] ]&lt;br /&gt;	local t0 = 0.6 - x0*x0 - y0*y0 - z0*z0&lt;br /&gt;	if t0&amp;lt;0 then n0 = 0.0 else&lt;br /&gt;		t0 = t0 * t0&lt;br /&gt;		n0 = t0 * t0 * dot(grad3[gi0], x0, y0, z0)&lt;br /&gt;	end&lt;br /&gt;	local t1 = 0.6 - x1*x1 - y1*y1 - z1*z1&lt;br /&gt;	if t1&amp;lt;0 then n1 = 0.0 else&lt;br /&gt;		t1 = t1 * t1&lt;br /&gt;		n1 = t1 * t1 * dot(grad3[gi1], x1, y1, z1)&lt;br /&gt;	end&lt;br /&gt;	local t2 = 0.6 - x2*x2 - y2*y2 - z2*z2&lt;br /&gt;	if t2&amp;lt;0 then n2 = 0.0 else&lt;br /&gt;		t2 = t2 * t2&lt;br /&gt;		n2 = t2 * t2 * dot(grad3[gi2], x2, y2, z2)&lt;br /&gt;	end&lt;br /&gt;	local t3 = 0.6 - x3*x3 - y3*y3 - z3*z3&lt;br /&gt;	if t3&amp;lt;0 then n3 = 0.0 else&lt;br /&gt;		t3 = t3 * t3&lt;br /&gt;		n3 = t3 * t3 * dot(grad3[gi3], x3, y3, z3)&lt;br /&gt;	end&lt;br /&gt;	return 32.0*(n0 + n1 + n2 + n3)&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;function get_4d_noise(x, y, z, w)&lt;br /&gt;	local n0, n1, n2, n3, n4&lt;br /&gt;	local s = (x + y + z + w) * F4&lt;br /&gt;	local i = math.floor(x + s)&lt;br /&gt;	local j = math.floor(y + s)&lt;br /&gt;	local k = math.floor(z + s)&lt;br /&gt;	local l = math.floor(w + s)&lt;br /&gt;	local t = (i + j + k + l) * G4&lt;br /&gt;	local x0 = i - t -- unskew the cell origin back to (x,y,z,w) space&lt;br /&gt;	local y0 = j - t&lt;br /&gt;	local z0 = k - t&lt;br /&gt;	local w0 = l - t&lt;br /&gt;	local x0 = x - x0&lt;br /&gt;	local y0 = y - y0&lt;br /&gt;	local z0 = z - z0&lt;br /&gt;	local w0 = w - w0&lt;br /&gt;	local rankx = 0&lt;br /&gt;	local ranky = 0&lt;br /&gt;	local rankz = 0&lt;br /&gt;	local rankw = 0&lt;br /&gt;	if x0 &amp;gt; y0 then&lt;br /&gt;		rankx = rankx + 1&lt;br /&gt;	else&lt;br /&gt;		ranky = ranky + 1&lt;br /&gt;	end&lt;br /&gt;	if x0 &amp;gt; z0 then&lt;br /&gt;		rankx = rankx + 1&lt;br /&gt;	else&lt;br /&gt;		rankz = rankz + 1&lt;br /&gt;	end&lt;br /&gt;	if x0 &amp;gt; w0 then&lt;br /&gt;		rankx = rankx + 1&lt;br /&gt;	else&lt;br /&gt;		rankw = rankw + 1&lt;br /&gt;	end&lt;br /&gt;	if y0 &amp;gt; z0 then&lt;br /&gt;		ranky = ranky + 1&lt;br /&gt;	else&lt;br /&gt;		rankz = rankz + 1&lt;br /&gt;	end&lt;br /&gt;	if y0 &amp;gt; w0 then&lt;br /&gt;		ranky = ranky + 1&lt;br /&gt;	else&lt;br /&gt;		rankw = rankw + 1&lt;br /&gt;	end&lt;br /&gt;	if z0 &amp;gt; w0 then&lt;br /&gt;		rankz = rankz + 1&lt;br /&gt;	else&lt;br /&gt;		rankw = rankw + 1&lt;br /&gt;	end&lt;br /&gt;	local i1, j1, k1, l1&lt;br /&gt;	local i2, j2, k2, l2&lt;br /&gt;	local i3, j3, k3, l3&lt;br /&gt;	i1 = (rankx &amp;gt;= 3) and 1 or 0&lt;br /&gt;	j1 = (ranky &amp;gt;= 3) and 1 or 0&lt;br /&gt;	k1 = (rankz &amp;gt;= 3) and 1 or 0&lt;br /&gt;	l1 = (rankw &amp;gt;= 3) and 1 or 0&lt;br /&gt;	i2 = (rankx &amp;gt;= 2) and 1 or 0&lt;br /&gt;	j2 = (ranky &amp;gt;= 2) and 1 or 0&lt;br /&gt;	k2 = (rankz &amp;gt;= 2) and 1 or 0&lt;br /&gt;	l2 = (rankw &amp;gt;= 2) and 1 or 0&lt;br /&gt;	i3 = (rankx &amp;gt;= 1) and 1 or 0&lt;br /&gt;	j3 = (ranky &amp;gt;= 1) and 1 or 0&lt;br /&gt;	k3 = (rankz &amp;gt;= 1) and 1 or 0&lt;br /&gt;	l3 = (rankw &amp;gt;= 1) and 1 or 0&lt;br /&gt;	local x1 = x0 - i1 + G4&lt;br /&gt;	local y1 = y0 - j1 + G4&lt;br /&gt;	local z1 = z0 - k1 + G4&lt;br /&gt;	local w1 = w0 - l1 + G4&lt;br /&gt;	local x2 = x0 - i2 + 2.0*G4&lt;br /&gt;	local y2 = y0 - j2 + 2.0*G4&lt;br /&gt;	local z2 = z0 - k2 + 2.0*G4&lt;br /&gt;	local w2 = w0 - l2 + 2.0*G4&lt;br /&gt;	local x3 = x0 - i3 + 3.0*G4&lt;br /&gt;	local y3 = y0 - j3 + 3.0*G4&lt;br /&gt;	local z3 = z0 - k3 + 3.0*G4&lt;br /&gt;	local w3 = w0 - l3 + 3.0*G4&lt;br /&gt;	local x4 = x0 - 1.0 + 4.0*G4&lt;br /&gt;	local y4 = y0 - 1.0 + 4.0*G4&lt;br /&gt;	local z4 = z0 - 1.0 + 4.0*G4&lt;br /&gt;	local w4 = w0 - 1.0 + 4.0*G4&lt;br /&gt;	local ii = (i + 1) &amp; 255&lt;br /&gt;	local jj = (j + 1) &amp; 255&lt;br /&gt;	local kk = (k + 1) &amp; 255&lt;br /&gt;	local ll = (l + 1) &amp; 255&lt;br /&gt;	-- in `get_4d_noise`&lt;br /&gt;	if not ii or jj or kk or ll then&lt;br /&gt;		return 0, 0, 1, 1&lt;br /&gt;	end&lt;br /&gt;	local gi0 = perm[ii+perm[jj+perm[kk+perm[ll] ] ] ] &amp; 31&lt;br /&gt;	local gi1 = perm[ii+i1+perm[jj+j1+perm[kk+k1+perm[ll+l1] ] ] ] &amp; 31&lt;br /&gt;	local gi2 = perm[ii+i2+perm[jj+j2+perm[kk+k2+perm[ll+l2] ] ] ] &amp; 31&lt;br /&gt;	local gi3 = perm[ii+i3+perm[jj+j3+perm[kk+k3+perm[ll+l3] ] ] ] &amp; 31&lt;br /&gt;	local gi4 = perm[ii+1+perm[jj+1+perm[kk+1+perm[ll+1] ] ] ] &amp; 31&lt;br /&gt;	local t0 = 0.6 - x0*x0 - y0*y0 - z0*z0 - w0*w0&lt;br /&gt;	if t0 &amp;lt; 0 then&lt;br /&gt;		n0 = 0.0&lt;br /&gt;	else&lt;br /&gt;		t0 = t0 * t0&lt;br /&gt;		n0 = t0 * t0 * dot(grad4[gi0], x0, y0, z0, w0);&lt;br /&gt;		-- n0 = t0 * t0 * (x0 * grad4[gi0].x + y0 * grad4[gi0].y + z0 * grad4[gi0].z + w0 * grad4[gi0].w)&lt;br /&gt;	end&lt;br /&gt;	local t1 = 0.6 - x1*x1 - y1*y1 - z1*z1 - w1*w1&lt;br /&gt;	if t1 &amp;lt; 0 then&lt;br /&gt;		n1 = 0.0&lt;br /&gt;	else&lt;br /&gt;		t1 = t1 * t1&lt;br /&gt;		n1 = t1 * t1 * dot(grad4[gi1], x1, y1, z1, w1);&lt;br /&gt;		-- n1 = t1 * t1 * (x1 * grad4[gi1].x + y1 * grad4[gi1].y + z1 * grad4[gi1].z + w1 * grad4[gi1].w)&lt;br /&gt;	end&lt;br /&gt;	local t2 = 0.6 - x2*x2 - y2*y2 - z2*z2 - w2*w2&lt;br /&gt;	if t2 &amp;lt; 0 then&lt;br /&gt;		n2 = 0.0&lt;br /&gt;	else&lt;br /&gt;		t2 = t2 * t2&lt;br /&gt;		n2 = t2 * t2 * dot(grad4[gi2], x2, y2, z2, w2);&lt;br /&gt;		-- n2 = t2 * t2 * (x2 * grad4[gi2].x + y2 * grad4[gi2].y + z2 * grad4[gi2].z + w2 * grad4[gi2].w)&lt;br /&gt;	end&lt;br /&gt;	local t3 = 0.6 - x3*x3 - y3*y3 - z3*z3 - w3*w3&lt;br /&gt;	if t3 &amp;lt; 0 then&lt;br /&gt;		n3 = 0.0&lt;br /&gt;	else&lt;br /&gt;		t3 = t3 * t3&lt;br /&gt;		n3 = t3 * t3 * dot(grad4[gi3], x3, y3, z3, w3);&lt;br /&gt;		-- n3 = t3 * t3 * (x3 * grad4[gi3].x + y3 * grad4[gi3].y + z3 * grad4[gi3].z + w3 * grad4[gi3].w)&lt;br /&gt;	end&lt;br /&gt;	local t4 = 0.6 - x4*x4 - y4*y4 - z4*z4 - w4*w4&lt;br /&gt;	if t4 &amp;lt; 0 then&lt;br /&gt;		n4 = 0.0&lt;br /&gt;	else&lt;br /&gt;		t4 = t4 * t4&lt;br /&gt;		n4 = t4 * t4 * dot(grad4[gi4], x4, y4, z4, w4);&lt;br /&gt;		-- n4 = t4 * t4 * (x4 * grad4[gi4].x + y4 * grad4[gi4].y + z4 * grad4[gi4].z + w4 * grad4[gi4].w)&lt;br /&gt;	end&lt;br /&gt;	return 27.0 * (n0 + n1 + n2 + n3 + n4)&lt;br /&gt;end&lt;br /&gt;	]]--&lt;br /&gt;&lt;br /&gt;local grad = {&lt;br /&gt;	x = 0, y = 0, z = 0, w = 0&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function grad:new(x, y, z)&lt;br /&gt;	local obj = {&lt;br /&gt;		x = x, y = y, z = z&lt;br /&gt;	}&lt;br /&gt;	setmetatable(obj, self)&lt;br /&gt;	self.__index = self&lt;br /&gt;	return obj&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;function grad:new(x, y, z, w)&lt;br /&gt;	local obj = {&lt;br /&gt;		x = x, y = y, z = z, w = w&lt;br /&gt;	}&lt;br /&gt;	setmetatable(obj, self)&lt;br /&gt;	self.__index = self&lt;br /&gt;	return obj&lt;br /&gt;end&lt;br /&gt;[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Wed, 08 Mar 2023 17:20:17 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I had a thought, but it escaped me, Oh, well...&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Wed, 08 Mar 2023 18:16:15 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hmm. I have a long post written up with formatting tags, but it doesn't show up when I post it here. I tried to post it again, but nothing shows. Let's see if breaking it up a bit helps...&lt;br /&gt;&lt;br /&gt;Nope. No luck.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Wed, 08 Mar 2023 18:50:10 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Since I've been having problems with proper indexing and &lt;b&gt;`nil`&lt;/b&gt; values in my 2-4D Simplex and Perlin noise scripts, I took a day off to do a breakdown of the &lt;b&gt;`perlin`&lt;/b&gt; noise function I'm using in my spherical Perlin noise, describing what each part does:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;`perlin`&lt;/b&gt;: This section of the &lt;b&gt;`perlin:noise`&lt;/b&gt; function initializes the empty &lt;b&gt;`perlin`&lt;/b&gt; table and its empty &lt;b&gt;`p`&lt;/b&gt; field using the syntax &lt;b&gt;`perlin = {}`&lt;/b&gt;, &lt;b&gt;`perlin.p = {}`&lt;/b&gt;., the latter of which is used to store 512 pseudorandom gradient values. In &lt;b&gt;`perlin.p = {}`&lt;/b&gt;, &lt;b&gt;`p`&lt;/b&gt; is a field (also called a key or a member) of the &lt;b&gt;`perlin`&lt;/b&gt; table, which is being assigned a new empty table &lt;b&gt;`{}`&lt;/b&gt; as its value. So &lt;b&gt;`p`&lt;/b&gt; is a field that consists of a table. If you have a table &lt;b&gt;`perlin`&lt;/b&gt; containing three tables &lt;b&gt;`p1`&lt;/b&gt;, &lt;b&gt;`p2`&lt;/b&gt;, &lt;b&gt;`p3`&lt;/b&gt;, the fields should be accessed as &lt;b&gt;`perlin.p1`&lt;/b&gt;, &lt;b&gt;`perlin.p2`&lt;/b&gt;, &lt;b&gt;`perlin.p3`&lt;/b&gt;.&lt;br /&gt;[CODE]&lt;br /&gt;	perlin = {}&lt;br /&gt;	perlin.p = {}&lt;br /&gt;																															.[/CODE]&lt;br /&gt;Next, an arbitrary seed value is obtained using the &lt;b&gt;`get_intslider_input()`&lt;/b&gt; function of the Filter Forge Scripting API. This value is used to seed the random number generator using &lt;b&gt;`math.randomseed()`&lt;/b&gt;.&lt;br /&gt;[CODE]&lt;br /&gt;	math.randomseed(get_intslider_input(SEED))&lt;br /&gt;																															.[/CODE]&lt;br /&gt;A &lt;b&gt;`for`&lt;/b&gt; loop is then used to fill the &lt;b&gt;`perlin.p`&lt;/b&gt; table with 256 randomly generated values between 0 and 255. These values are generated using the &lt;b&gt;`math.random()`&lt;/b&gt; function.&lt;br /&gt;[CODE]&lt;br /&gt;	for i = 0, 255 do&lt;br /&gt;		perlin.p[i] = math.random(255)&lt;br /&gt;		perlin.p[256 + i] = perlin.p[i]&lt;br /&gt;	end&lt;br /&gt;																															.[/CODE]&lt;br /&gt;&lt;b&gt;`function perlin:noise(x, y, z)`&lt;/b&gt;: The main function that returns the noise value for a given point (x,y,z). This section of the &lt;b&gt;`perlin:noise`&lt;/b&gt; function takes in 3 input values: &lt;b&gt;`x`&lt;/b&gt;, &lt;b&gt;`y`&lt;/b&gt;, and &lt;b&gt;`z`&lt;/b&gt;. It calculates the noise value at the given coordinate in 3D space. Here are the breakdowns of the operations:&lt;br /&gt;&lt;br /&gt;The &lt;b&gt;`y`&lt;/b&gt; and &lt;b&gt;`z`&lt;/b&gt; values are set to 0 if they are not provided as input.&lt;br /&gt;[CODE]&lt;br /&gt;	y = y or 0; z = z or 0 -- if y or z are not provided, set them to 0.&lt;br /&gt;																															.[/CODE]&lt;br /&gt;The function calculates the &quot;unit cube&quot; that the point will be located in by using the &lt;b&gt;`math.floor`&lt;/b&gt; function to round down the input coordinates to integers and then performing a bitwise AND operation with 255 (which is equivalent to taking the modulo 256). This is done for each coordinate (x, y, and z) to obtain the indices of the cube vertices surrounding the input point.&lt;br /&gt;[CODE]&lt;br /&gt;	local xi = bit32.band(math.floor(x), 255); &lt;br /&gt;	local yi = bit32.band(math.floor(y), 255); &lt;br /&gt;	local zi = bit32.band(math.floor(z), 255)&lt;br /&gt;																															.[/CODE]&lt;br /&gt;After calculating the unit cube that the point will be located in, the function calculates the relative positions of the input point within the unit cube by subtracting the floored values fr om the input values. This gives &lt;b&gt;`x`&lt;/b&gt;, &lt;b&gt;`y`&lt;/b&gt;, and &lt;b&gt;`z`&lt;/b&gt; values in the range [0, 1] that represent the position of the input point within the unit cube.&lt;br /&gt;[CODE]&lt;br /&gt;	local xf = x - math.floor(x); &lt;br /&gt;	local yf = y - math.floor(y); &lt;br /&gt;	local zf = z - math.floor(z)&lt;br /&gt;																															.[/CODE]&lt;br /&gt;The fractional part of the coordinates of the point within the unit cube are calculated by subtracting the floored (integer part) coordinates fr om the original coordinates.&lt;br /&gt;[CODE]&lt;br /&gt;	x = x - math.floor(x); &lt;br /&gt;	y = y - math.floor(y); &lt;br /&gt;	z = z - math.floor(z)&lt;br /&gt;																															.[/CODE]&lt;br /&gt;The &lt;b&gt;`fade`&lt;/b&gt; function is applied to each of &lt;b&gt;`x`&lt;/b&gt;, &lt;b&gt;`y`&lt;/b&gt;, and &lt;b&gt;`z`&lt;/b&gt; to smooth the result. The &lt;b&gt;`fade`&lt;/b&gt; function is a 6th-degree polynomial that interpolates smoothly between 0 and 1.&lt;br /&gt;[CODE]&lt;br /&gt;	local u = self.fade(x); local v = self.fade(y); local w = self.fade(z)&lt;br /&gt;																															.[/CODE]&lt;br /&gt;The function then declares several variables that will be used later: &lt;b&gt;`u`&lt;/b&gt;, &lt;b&gt;`v`&lt;/b&gt;, and &lt;b&gt;`w`&lt;/b&gt; are the smoothed &lt;b&gt;`x`&lt;/b&gt;, &lt;b&gt;`y`&lt;/b&gt;, and &lt;b&gt;`z`&lt;/b&gt; values, respectively. &lt;b&gt;`p`&lt;/b&gt; is a lookup table that stores the permutation of 256 integers used in the calculation of the &lt;b&gt;`noise`&lt;/b&gt; function. The remaining variables (`&lt;b&gt;A`&lt;/b&gt;, &lt;b&gt;`AA`&lt;/b&gt;, &lt;b&gt;`AB`&lt;/b&gt;, etc.) will hold the pseudorandom gradient vectors corresponding to the 8 unit cube vertices surrounding the input point.&lt;br /&gt;&lt;br /&gt;Note that the function has not yet calculated the gradient vectors or the noise value itself. These will be calculated in the following steps of the function.&lt;br /&gt;&lt;br /&gt;We can now calculate the dot product of each corner vector and the distance vector from the point to that corner. We can also use the fade curve to blend the contributions of each corner vector together. &lt;br /&gt;&lt;br /&gt;In this section of the &lt;b&gt;`perlin:noise`&lt;/b&gt; function, the eight corner points of the unit cube surrounding the input point are identified using a hash function. The operations involved are:&lt;br /&gt;&lt;br /&gt;Retrieve the permutation table from the &lt;b&gt;`self`&lt;/b&gt; table.&lt;br /&gt;[CODE]&lt;br /&gt;	local p = self.p: &lt;br /&gt;																															.[/CODE]&lt;br /&gt;Declare 14 local variables to store the values of the corner points.&lt;br /&gt;[CODE]&lt;br /&gt;	local A, AA, AB, AAA, ABA, AAB, ABB, B, BA, BB, BAA, BBA, BAB, BBB: &lt;br /&gt;&lt;br /&gt;	A = p[xi] + yi &lt;br /&gt;		-- retrieve the value of the permutation table at the position [xi], &lt;br /&gt;		-- and add yi to it. &lt;br /&gt;		-- Store the result in A.&lt;br /&gt;	AA = p[A] + zi &lt;br /&gt;		-- retrieve the value of the permutation table at the position [A], &lt;br /&gt;		-- and add zi to it. &lt;br /&gt;		-- Store the result in AA.&lt;br /&gt;	AB = p[A + 1] + zi &lt;br /&gt;		-- retrieve the value of the permutation table at the position [A+1], &lt;br /&gt;		-- and add zi to it. &lt;br /&gt;		-- Store the result in AB.&lt;br /&gt;	AAA = p[AA] &lt;br /&gt;		-- retrieve the value of the permutation table at the position [AA]. &lt;br /&gt;		-- Store the result in AAA.&lt;br /&gt;	ABA = p[AB] &lt;br /&gt;		-- retrieve the value of the permutation table at the position [AB]. &lt;br /&gt;		-- Store the result in ABA.&lt;br /&gt;	AAB = p[AA + 1] &lt;br /&gt;		-- retrieve the value of the permutation table at the position [AA+1]. &lt;br /&gt;		-- Store the result in AAB.&lt;br /&gt;	ABB = p[AB + 1] &lt;br /&gt;		-- retrieve the value of the permutation table at the position [AB+1]. &lt;br /&gt;		-- Store the result in ABB.&lt;br /&gt;&lt;br /&gt;	B = p[xi + 1] + yi &lt;br /&gt;		-- retrieve the value of the permutation table at the position [xi+1], &lt;br /&gt;		-- and add yi to it. &lt;br /&gt;		-- Store the result in B.&lt;br /&gt;	BA = p&lt;b&gt; + zi &lt;br /&gt;		-- retrieve the value of the permutation table at the position [B], &lt;br /&gt;		-- and add zi to it. &lt;br /&gt;		-- Store the result in BA.&lt;br /&gt;	BB = p[B + 1] + zi &lt;br /&gt;		-- retrieve the value of the permutation table at the position [B+1], &lt;br /&gt;		-- and add zi to it. &lt;br /&gt;		-- Store the result in BB.&lt;br /&gt;	BAA = p[BA] &lt;br /&gt;		-- retrieve the value of the permutation table at the position [BA]. &lt;br /&gt;		-- Store the result in BAA.&lt;br /&gt;	BBA = p[BB] &lt;br /&gt;		-- retrieve the value of the permutation table at the position [BB]. &lt;br /&gt;		-- Store the result in BBA.&lt;br /&gt;	BAB = p[BA + 1] &lt;br /&gt;		-- retrieve the value of the permutation table at the position [BA+1]. &lt;br /&gt;		-- Store the result in BAB.&lt;br /&gt;	BBB = p[BB + 1] &lt;br /&gt;		-- retrieve the value of the permutation table at the position [BB+1]. &lt;br /&gt;		-- Store the result in BBB.&lt;br /&gt;																															.[/CODE]&lt;br /&gt;Overall, these operations perform a series of table lookups to retrieve the values of the corner points of the unit cube surrounding the input point. These corner points are used in the subsequent interpolation steps to calculate the final [B]`perlin:noise`&lt;/b&gt; value.&lt;br /&gt;&lt;br /&gt;This section of the &lt;b&gt;`perlin:noise`&lt;/b&gt; function performs the final step of calculating the noise value for the input coordinates by taking the weighted average between all 8 unit cube coordinates surrounding the input coordinate.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;`self.lerp`&lt;/b&gt;: The function is used for linear interpolation. It takes two values &lt;b&gt;`a`&lt;/b&gt; and &lt;b&gt;`b`&lt;/b&gt;, and a weight &lt;b&gt;`w`&lt;/b&gt; and returns the linearly interpolated value between &lt;b&gt;`a`&lt;/b&gt; and &lt;b&gt;`b`&lt;/b&gt; based on the weight &lt;b&gt;`w`&lt;/b&gt;. The nested &lt;b&gt;`self.lerp`&lt;/b&gt; functions are used to calculate the weighted average between all 8 unit cube coordinates. The inputs to these functions are the 8 unit cube coordinates and the input coordinate. These 8 unit cube coordinates are labeled with different variable names that correspond to their position in the unit cube, such as &lt;b&gt;`AAA`&lt;/b&gt;, &lt;b&gt;`AAB`&lt;/b&gt;, &lt;b&gt;`ABA`&lt;/b&gt;, etc. Inside each &lt;b&gt;`self.lerp`&lt;/b&gt; function, there are two more nested &lt;b&gt;`self.lerp`&lt;/b&gt; functions, which are used to interpolate the gradient vectors at each of the 4 corners of the unit cube. The gradient vectors are calculated using the &lt;b&gt;`self:grad`&lt;/b&gt; function, which takes a hash value and the input coordinates, and returns a gradient vector.&lt;br /&gt;[CODE]&lt;br /&gt;	return &lt;br /&gt;		self.lerp(w, &lt;br /&gt;			self.lerp(v, &lt;br /&gt;				self.lerp(u, &lt;br /&gt;					self:grad(AAA, x, y, z), &lt;br /&gt;					self:grad(BAA, x - 1, y, z)&lt;br /&gt;				), &lt;br /&gt;				self.lerp(u, &lt;br /&gt;					self:grad(ABA, x, y - 1, z), &lt;br /&gt;					self:grad(BBA, x - 1, y - 1, z)&lt;br /&gt;				)&lt;br /&gt;			), &lt;br /&gt;			self.lerp(v, &lt;br /&gt;				self.lerp(u, &lt;br /&gt;					self:grad(AAB, x, y, z - 1), &lt;br /&gt;					self:grad(BAB, x - 1, y, z - 1)&lt;br /&gt;				), &lt;br /&gt;				self.lerp(u, &lt;br /&gt;					self:grad(ABB, x, y - 1, z - 1), &lt;br /&gt;					self:grad(BBB, x - 1, y - 1, z - 1)&lt;br /&gt;				)&lt;br /&gt;			)&lt;br /&gt;		)&lt;br /&gt;																															.[/CODE]&lt;br /&gt;Overall, the final output of this section is a weighted average of the gradient vectors at the 8 corners of the unit cube, which is the &lt;b&gt;`perlin:noise`&lt;/b&gt; value for the input coordinates.&lt;br /&gt;&lt;br /&gt;This section of the &lt;b&gt;`perlin:noise`&lt;/b&gt; function defines a lookup table for the &lt;b&gt;`dot_product`&lt;/b&gt; function and a gradient function that finds the dot product between a pseudorandom gradient vector and the vector from an input coordinate to a unit cube vertex.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;`perlin.dot_product`&lt;/b&gt;: This table contains 16 entries, each corresponding to one of the 16 possible bit patterns that can be formed by three bits. Each entry is a function that takes three arguments &lt;b&gt;`x`&lt;/b&gt;, &lt;b&gt;`y`&lt;/b&gt;, and &lt;b&gt;`z`&lt;/b&gt;, which represent the coordinates of a point, and returns the dot product between the pseudorandom gradient vector and the vector from the input point to a unit cube vertex in a particular direction. The directions are determined by the bit pattern associated with the function in the table.&lt;br /&gt;[CODE]&lt;br /&gt;	perlin.dot_product = {&lt;br /&gt;		[0x0] = function(x, y, z) return x + y end, &lt;br /&gt;		[0x1] = function(x, y, z) return -x + y end, &lt;br /&gt;		[0x2] = function(x, y, z) return x - y end, &lt;br /&gt;		[0x3] = function(x, y, z) return -x - y end, &lt;br /&gt;		[0x4] = function(x, y, z) return x + z end, &lt;br /&gt;		[0x5] = function(x, y, z) return -x + z end, &lt;br /&gt;		[0x6] = function(x, y, z) return x - z end, &lt;br /&gt;		[0x7] = function(x, y, z) return -x - z end, &lt;br /&gt;		[0x8] = function(x, y, z) return y + z end, &lt;br /&gt;		[0x9] = function(x, y, z) return -y + z end, &lt;br /&gt;		[0xA] = function(x, y, z) return y - z end, &lt;br /&gt;		[0xB] = function(x, y, z) return -y - z end, &lt;br /&gt;		[0xC] = function(x, y, z) return y + x end, &lt;br /&gt;		[0xD] = function(x, y, z) return -y + z end, &lt;br /&gt;		[0xE] = function(x, y, z) return y - x end, &lt;br /&gt;		[0xF] = function(x, y, z) return -y - z end&lt;br /&gt;	}&lt;br /&gt;																															.[/CODE]&lt;br /&gt;&lt;b&gt;`perlin:grad(hash, x, y, z)`&lt;/b&gt;: This method takes four arguments: &lt;b&gt;`hash`&lt;/b&gt;, an integer value between 0 and 255; and &lt;b&gt;`x`&lt;/b&gt;, &lt;b&gt;`y`&lt;/b&gt;, and &lt;b&gt;`z`&lt;/b&gt;, which represent the coordinates of a point. The method computes the dot product between the pseudorandom gradient vector associated with the given &lt;b&gt;`hash`&lt;/b&gt; value and the vector from the input point to a unit cube vertex. The &lt;b&gt;`hash`&lt;/b&gt; value determines which gradient vector to use, and the direction of the vector is determined by the dot product function corresponding to the last three bits of the hash value. The method returns the computed dot product.&lt;br /&gt;[CODE]&lt;br /&gt;	function perlin:grad(hash, x, y, z)&lt;br /&gt;		return self.dot_product[bit32.band(hash, 0xF)](x, y, z)&lt;br /&gt;	end&lt;br /&gt;																															.[/CODE]&lt;br /&gt;&lt;b&gt;`perlin.fade(t)`&lt;/b&gt;: The &lt;b&gt;`fade`&lt;/b&gt; function is used to smooth the final output of the &lt;b&gt;`perlin:noise`&lt;/b&gt; function. It takes a single parameter &lt;b&gt;`t`&lt;/b&gt;, which represents the input value to be smoothed. The function uses a quintic (degree-5) polynomial to gradually transition from 0 to 1 as &lt;b&gt;`t`&lt;/b&gt; increases from 0 to 1. This helps to reduce the appearance of sharp edges and discontinuities in the output of the &lt;b&gt;`perlin:noise`&lt;/b&gt; function.&lt;br /&gt;[CODE]&lt;br /&gt;	function perlin.fade(t)&lt;br /&gt;		return t * t * t * (t * (t * 6 - 15) + 10)&lt;br /&gt;	end&lt;br /&gt;																															.[/CODE]&lt;br /&gt;&lt;b&gt;`perlin.lerp(t, a, b)`&lt;/b&gt;: The &lt;b&gt;`lerp`&lt;/b&gt; function is a linear interpolation function that is used to combine the weighted average of the dot products of gradient vectors and the input coordinate. It takes three parameters: &lt;b&gt;`t`&lt;/b&gt;, &lt;b&gt;`a`&lt;/b&gt;, and &lt;b&gt;`b`&lt;/b&gt;. The function returns the linear interpolation of &lt;b&gt;`a`&lt;/b&gt; and &lt;b&gt;`b`&lt;/b&gt; at the ratio of &lt;b&gt;`t`&lt;/b&gt;, wh ere &lt;b&gt;`t`&lt;/b&gt; ranges from 0 to 1. The resulting value is a weighted average of &lt;b&gt;`a`&lt;/b&gt; and &lt;b&gt;`b`&lt;/b&gt; wh ere &lt;b&gt;`t`&lt;/b&gt; determines the weighting of the two values.&lt;br /&gt;[CODE]&lt;br /&gt;	function perlin.lerp(t, a, b)&lt;br /&gt;		return a + t * (b - a)&lt;br /&gt;	end&lt;br /&gt;																															.[/CODE]&lt;br /&gt;&lt;b&gt;`noise`&lt;/b&gt;, &lt;b&gt;`dot_product`&lt;/b&gt;, &lt;b&gt;`grad`&lt;/b&gt;, &lt;b&gt;`fade`&lt;/b&gt; and &lt;b&gt;`lerp`&lt;/b&gt; are all functions defined within the &lt;b&gt;`perlin`&lt;/b&gt; table using the colon syntax (`[/B]perlin:function()`[/B]). This makes them methods of the &lt;b&gt;`perlin`&lt;/b&gt; table, so they can be called using the &lt;b&gt;`&lt;/b&gt;:`[/B] syntax (`[/B]perlin:method()`[/B]).&lt;br /&gt;&lt;br /&gt;Doing an analysis like this is a big step in understanding the algorithms I need to use for scripting. I put a little extra effort into organizing and formatting my notes to share here. I thought people might find this sort of thing helpful, and it sort of fits in with the theme of this thread. If there's a positive response, I'll try to do more of these in cases wh ere I've gotten a script to working as intended.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;emme&lt;/b&gt;, &lt;em&gt;Sun, 02 Apr 2023 19:15:12 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;As you mentioned, ChatGPT can be quite helpful with these things, not only for writing scripts and functions, but for explaining them as well. Also, check out shadertoy.com if you haven't already. The shaders are written in GLSL, but there are a lot of great examples to learn from. Good luck with scripting  :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 17 Apr 2023 02:33:40 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Yes, it's been really helpful (if occasionally frustrating) for improving my understanding of Lua. I've also found my way to shadertoy.com many times looking for ways to do certain things. I also recommend it, and ChatGPT can help convert the GLSL to Lua if you come across anything good there. Thanks, emme!&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Sun, 08 Sep 2024 17:35:40 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;It's been a long time since I thought of posting here. The lack  of discussion, while forgivable, has caused my to throw my scripting questions at ChatGPT or Copilot this past year. Today I had a chat I thought I'd share here. It might help others digging into the same topics, or even prompt some forum input.&lt;br /&gt;&lt;br /&gt;Right. So, here you go:&lt;br /&gt;&lt;br /&gt;Understanding Noise Generation Seeds (and then Diving Deeper)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I am working on noise generation scripts using Lua in Filter Forge. While I was at it, I found myself wondering what a seed exactly is. In terms of the noise generated, what does the seed do (break down the function in terms of it effects)?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Copilot: &lt;/b&gt;Certainly! Let's dive into the fascinating world of seeds in noise generation.&lt;br /&gt;&lt;br /&gt;**What is a Seed?**&lt;br /&gt;A seed, in the context of noise generation algorithms like Stable Diffusion (and even in other areas like procedural terrain generation), is simply a numerical value. It acts as the starting point for generating noise patterns. Here's the plain and simple breakdown:&lt;br /&gt;&lt;br /&gt;1. **Seed Is Not the Noise Image Itself**: The seed itself is not the noise pattern you see in the final image. Instead, it's like the initial spark that sets the whole process in motion.&lt;br /&gt;&lt;br /&gt;2. **Not All Parameters**: Contrary to misconceptions, the seed doesn't encapsulate all the parameters used for image generation. It's just the starting point, not the entire recipe.&lt;br /&gt;&lt;br /&gt;3. **Not Tied to Specific Prompts or Characteristics**: The seed remains detached fr om specific text prompts, poses, clothing, backgrounds, or artistic styles. It's more about the underlying randomness.&lt;br /&gt;&lt;br /&gt;**How Does It Work?**&lt;br /&gt;When you provide a seed, the noise generator algorithm takes that number and uses it to create an initial noise pattern. But here's the interesting part: the noise isn't truly random. It's pseudo-random. In other words, given the same seed, the algorithm will reliably produce the same noise pattern every time. This repeatability opens up some cool possibilities:&lt;br /&gt;&lt;br /&gt;- **Consistent Reproduction**: If you input the same seed, along with the same prompt and all the other parameters you used initially, you can reliably reproduce a generated image across multiple sessions. It's like having a secret recipe for noise!&lt;br /&gt;&lt;br /&gt;- **Sharing and Tweaking**: Users can work off someone else's generated image by starting fr om the same seed, prompt, and parameters. Plus, minor tweaks—like adjusting the prompt or parameters—allow you to explore variations without drastically altering the overall composition.&lt;br /&gt;&lt;br /&gt;- **Seed Characteristics**: Some seeds have been identified as having a higher probability of producing images with specific color palettes or compositions. Knowing these &quot;lucky&quot; seeds can give you a better chance of getting the output you desire.&lt;br /&gt;&lt;br /&gt;So, in summary, seeds are like the cosmic dice roll that determines the initial noise, and fr om there, the algorithm weaves its magic to create the final image.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Sun, 08 Sep 2024 17:47:20 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Heh. Guess that was too long to post. Rather than a series of clips, I'll just share the text for anyone interested. ^_^;&lt;br /&gt;&lt;br /&gt;For the full transcript: &lt;br /&gt;&lt;a href=&quot;https://drive.google.com/file/d/1-_rqN6hkGjP0yzkBlTOvPXFI2MoSWnDo/view?usp=sharing&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Understanding Noise Generation Seeds (and then Diving Deeper)&lt;/a&gt;&lt;/p&gt;
</description>
</item>
<item><title>Help articles on Scripting (work in progress)</title> 
		             <dc:creator>Vladimir Golovin</dc:creator> 
		             <category></category> 
		             <pubDate>Tue, 14 Mar 2023 02:08:53 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=7462</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=7462</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;Vladimir Golovin&lt;/b&gt;, &lt;em&gt;Mon, 07 Jun 2010 09:31:25 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;We're uploading unfinished Help articles on scripting to the Filter Forge wiki. The articles are incomplete, some text, examples and pictures may be outdated -- but anyway, it's something to start with. We'll update the articles when the new content is written (and when we have time to do that.)&lt;br /&gt;&lt;br /&gt;Here's the list of articles that are currently uploaded:&lt;br /&gt;- &lt;a href=&quot;http://www.filterforge.com/wiki/index.php?title=Getting_Started_with_Scripting&amp;rcid=1734&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Getting Started with Scripting&lt;/a&gt;&lt;br /&gt;- &lt;a href=&quot;http://www.filterforge.com/wiki/index.php?title=Referencing_Inputs&amp;rcid=1735&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Referencing Inputs from Scripts&lt;/a&gt;&lt;br /&gt;- &lt;a href=&quot;http://www.filterforge.com/wiki/index.php?title=Sample-based_Architecture&amp;rcid=1740&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Sample-Based Architecture&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Kraellin&lt;/b&gt;, &lt;em&gt;Mon, 07 Jun 2010 23:13:15 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Create a Map Script component (located in the Scripting category on the Component Bar).&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;ok, what if we have no scripting category on the component bar? &quot;Help Components&quot; doesnt show any such thing either. is this something upcoming or am i missing something here? and yes, this version 2, latest update.&lt;br /&gt;&lt;br /&gt;edit: and in looking further, what happened to the options? i no longer have an &quot;Options&quot; in the menu system.&lt;br /&gt;&lt;br /&gt;edit: never mind, found the options. lol. dont get old ;) but i still cant find anything about scripting within the editor.&lt;br /&gt;&lt;br /&gt;edit yet again: ok, seems i dont have the latest version. lol. stage 4 is out today. ok, forget i posted anything here :) :D&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Mike Blackney&lt;/b&gt;, &lt;em&gt;Tue, 08 Jun 2010 01:11:31 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Forget?  Impossible!! :D&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;One thing that took me a while to realise is that the x and y values are still floats when you're sampling in script.  I thought they would be pixels (for some reason) then checked the wiki and suddenly it made sense that x+1 was returning the same thing.&lt;br /&gt;&lt;br /&gt;Is there any method I can call to get the input image dimensions in script?  Are there methods like this exposed, or are there plans to?  Sorry if asking questions like this are doubling up on wiki work.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Vladimir Golovin&lt;/b&gt;, &lt;em&gt;Tue, 08 Jun 2010 05:40:21 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Mike Blackney wrote:&lt;/b&gt;&lt;br /&gt;I thought they would be pixels (for some reason)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Thank you for reminding me to upload the article on &quot;Filter Forge's Sample-Based Architecture&quot; :)&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Mike Blackney wrote:&lt;/b&gt;&lt;br /&gt;Sorry if asking questions like this are doubling up on wiki work. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Don't worry. The help file is the #1 priority right now, and within the help file scripting is the most important chunk of work -- though I can't promise that we'll update the Wiki versions often, we're not using them for internal editing.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Vladimir Golovin&lt;/b&gt;, &lt;em&gt;Tue, 08 Jun 2010 05:48:16 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Mike Blackney wrote:&lt;/b&gt;&lt;br /&gt;Is there any method I can call to get the input image dimensions in script?&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Yes. They are not documented yet, but here's the list of FF variables available in Lua scripts:&lt;br /&gt;&lt;br /&gt;SIZE - value of the Size slider, available only to scripts that &quot;make use of the global Size setting&quot;.&lt;br /&gt;&lt;br /&gt;VARIATION  - value of the Variation slider, available only to scripts that &quot;make use of the global Variation setting&quot;.&lt;br /&gt;&lt;br /&gt;OUTPUT_WIDTH, OUTPUT_HEIGHT - image width and height, pixels&lt;br /&gt;&lt;br /&gt;SEAMLESS_REGION_WIDTH, SEAMLESS_REGION_HEIGHT - seamless region width and height, available only when the global Seamless Tiling checkbox is turned on.&lt;br /&gt;&lt;br /&gt;SEAMLESS - state of the global Seamless Tiling checkbox, true of false.&lt;br /&gt;&lt;br /&gt;Debugging tip: you can use the Color Inspector to display the value of a variable. Just return it in one of the RGB channels -- remember, FF is fully HDR :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Vladimir Golovin&lt;/b&gt;, &lt;em&gt;Tue, 08 Jun 2010 07:49:58 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I've updated the original post with a link to a new article on sample-based architecture.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Mike Blackney&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 06:42:24 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thanks Vlad, that's brilliant! :D&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;BenBeckwith&lt;/b&gt;, &lt;em&gt;Thu, 10 Jun 2010 21:45:53 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Something that might help aspiring scripters (such as me) is if you provided images of how you would create the example scripts out of existing components (if possible). For example, the radial gradient script could be accompanied with the attached image. I understood the explanation, but it took me a few read throughs to match it all up and understand it. Then I confirmed it by rebuilding it with nodes. :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;BenBeckwith&lt;/b&gt;, &lt;em&gt;Thu, 10 Jun 2010 21:54:43 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Sorry, I totally forgot something. For added clarity...&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Totte&lt;/b&gt;, &lt;em&gt;Fri, 11 Jun 2010 00:20:23 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Brilliant Ben!&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Crapadilla&lt;/b&gt;, &lt;em&gt;Fri, 18 Nov 2011 08:47:18 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Are the wiki articles on Scripting obsolete? I'm asking because it appears that the finished versions of those articles can be found in the Help section of the website, nicely formatted and all shiny. ;) &lt;br /&gt;&lt;br /&gt;If they are indeed obsolete, shouldn't we replace the wiki articles with links to the Help section? That might make things less confusing as to where to look for the 'definitive' scripting help.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Tue, 07 Mar 2023 23:35:51 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Though it's more than a decade later, I srt of had the same question:&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Crapadilla wrote:&lt;/b&gt;&lt;br /&gt;Are the wiki articles on Scripting obsolete?&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;I've been doing a lot of scripting as I strive to teach myself how to make better scripts. I've finally hit the point where I need more debugging info than the console errors. So, I started looking for the Filter Forge x64.log (for v.9) and found my way to a few forum posts and the wiki, but the instructions to look in &quot;%APPDATA%\Local\Temp\...&quot; didn't turn up the log. I had a fiter editor session going, so I expected it to be there. &lt;br /&gt;&lt;br /&gt;Assuming the leads I followed are just out of date, I'm wondering where I should look for the log. I'd appreciate the help!&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;GMM&lt;/b&gt;, &lt;em&gt;Thu, 09 Mar 2023 05:00:14 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;David Roberson wrote:&lt;/b&gt;&lt;br /&gt;but the instructions to look in &quot;%APPDATA%\Local\Temp\...&quot; didn't turn up the log.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;The wiki is correct: if you have a 'print' function in your script, it will log the output to c:\Users\your_username\AppData\Local\Temp\Filter Forge x64.log&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Fri, 10 Mar 2023 01:28:59 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Great! So... What is the location of &quot;&lt;b&gt;Filter Forge x64.log&lt;/b&gt;&quot; for &lt;b&gt;Filter Forge 9&lt;/b&gt; on Windows 10?&lt;br /&gt;&lt;br /&gt;I've done a bit of poking around trying to track down the location of the &quot;&lt;b&gt;Filter Forge x64.log&lt;/b&gt;&quot; for &lt;b&gt;Filter Forge 9&lt;/b&gt; on Windows 10. I've checked in:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;C:\Users\&amp;lt;username&amp;gt;\AppData\Local\Temp\Filter Forge 9\ &lt;/b&gt;and &lt;b&gt;C:\Users\&amp;lt;username&amp;gt;\AppData\Roaming\Filter Forge 9\&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Since I'm asking, I obviously didn't find it at either of those places. Weird. The &lt;b&gt;Temp&lt;/b&gt; location was mentioned in a post about using the log file, and I remember something about the log file only existing while &lt;b&gt;Filter Forge&lt;/b&gt; is running (and the &lt;b&gt;Filter Editor&lt;/b&gt; is open). After a bit more searching, I followed someone's advice to look for (or create) a &lt;b&gt;Logs&lt;/b&gt; folder in the &lt;b&gt;Roaming&lt;/b&gt; location, and restarted &lt;b&gt;Filter Forge&lt;/b&gt;. Then, in the &lt;b&gt;Filter Editor&lt;/b&gt;, I loaded a filter with a Map Script with known errors and selected it. I confirmed that errors were written to the console and then checked the &lt;b&gt;Logs&lt;/b&gt; folder I created; it did not turn up in it or the respective &lt;b&gt;Filter Forge 9&lt;/b&gt; folders I &lt;i&gt;could &lt;/i&gt;find.&lt;br /&gt;&lt;br /&gt;I also looked for settings in &lt;b&gt;Filter Forge Options &amp;gt; Logging&lt;/b&gt; to make sure I didn't need to enable log files to ensure one is created when Map Scripts are running. &lt;b&gt;Logging&lt;/b&gt; does not show up in the &lt;b&gt;Options&lt;/b&gt;, and it wasn't included in any of the available tabs, like &lt;b&gt;Scripting&lt;/b&gt;. Also, only the internal &lt;b&gt;Message Log&lt;/b&gt; is mentioned in the &lt;b&gt;Filter Forge Help&lt;/b&gt; tool. If it isn't the case that the log file is only created when an error occurs while running a Map Script, it seemed the only option remaining was to contact &lt;b&gt;Filter Forge Support&lt;/b&gt; to see if they can provide any additional information on how to enable the creation of log files.&lt;br /&gt;&lt;br /&gt;If the log file has been eliminated, that really makes debugging script difficult. One line error messages in the &lt;b&gt;Message Log&lt;/b&gt; of the &lt;b&gt;Filter Editor&lt;/b&gt; isn't enough to debug whole arrays with indexing problems. Please tell me I've just been looking in the wrong places!&lt;br /&gt;&lt;br /&gt;Hope you can give me good news, &lt;br /&gt;&lt;br /&gt;David Roberson&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;GMM&lt;/b&gt;, &lt;em&gt;Fri, 10 Mar 2023 06:42:39 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;David Roberson wrote:&lt;/b&gt;&lt;br /&gt;So... What is the location of &quot;Filter Forge x64.log&quot; for Filter Forge 9 on Windows 10?&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;The log file is still at c:\Users\your_username\AppData\Local\Temp\Filter Forge x64.log&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;David Roberson wrote:&lt;/b&gt;&lt;br /&gt;I've checked in:&lt;br /&gt;&lt;br /&gt;C:\Users\&amp;lt;username&amp;gt;\AppData\Local\Temp\Filter Forge 9\ and C:\Users\&amp;lt;username&amp;gt;\AppData\Roaming\Filter Forge 9\&lt;br /&gt;&lt;br /&gt;Since I'm asking, I obviously didn't find it at either of those places.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;You can't look in random locations and complain it is not at those places. The log can only be found at c:\Users\your_username\AppData\Local\Temp\Filter Forge x64.log&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;David Roberson wrote:&lt;/b&gt;&lt;br /&gt;the log file is only created when an error occurs while running a Map Script&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;The log file is created when Filter Forge crashes, or when a script (Map or Curve) generates an error.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Tue, 14 Mar 2023 02:08:53 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;GMM wrote:&lt;/b&gt;&lt;br /&gt;The log file is still at c:\Users\your_username\AppData\Local\Temp\Filter Forge x64.log&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Great! As you could tell, I improvised when I did not find a log. Since I have different versions of Filter Forge, I thought it might make a difference on where the log might be.&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;GMM wrote:&lt;/b&gt;&lt;br /&gt;The log file is created when Filter Forge crashes, or when a script (Map or Curve) generates an error.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Thanks for that clarification.&lt;/p&gt;
</description>
</item>
<item><title>Internal XY Lookup (or UV Remapping)?</title> 
		             <dc:creator>David Roberson</dc:creator> 
		             <category></category> 
		             <pubDate>Wed, 01 Mar 2023 12:01:53 -0500</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16789</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16789</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Sun, 26 Feb 2023 18:30:54 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I'm stuck on a script that is supposed to do two different coordinate transforms, each of which I've been able to turn into gradients that will remap in a get_sample_map(). The problem arises when it comes to applying one after the other, meaning I still need some kind of internal lookup function that will remap v or r, g, b, a values. This is something I've tried to figure out on my own at times over the past few years without success. If someone can help or provide an example script I'd really appreciate it.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Edit&lt;/b&gt;: In general, I am interested in learning how to do most of the basic transforms (like respective transform components) within a lua script (i.e. Offset, Scale, Flip... I've already been helped with Rotation by emme). On thinking about this, the obvious thing is that get_sample_map() essentially does a lookup if you provide x, y coordinates you calculate before it: &lt;br /&gt;[CODE]function prepare()&lt;br /&gt;   ox,oy = get_slider_input(ORIGIN_X),get_slider_input(ORIGIN_Y)&lt;br /&gt;   d = math.rad(get_angle_input(ROTATION))&lt;br /&gt;   s,c = math.sin(d), math.cos(d)&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;   local nx = c * (x-ox) - s * (y-oy) + ox&lt;br /&gt;   local ny = s * (x-ox) + c * (y-oy) + oy&lt;br /&gt;   local r,g,b,a = get_sample_map(nx, ny, SOURCE)&lt;br /&gt;   return r,g,b,a&lt;br /&gt;end;&lt;br /&gt;[/CODE]&lt;br /&gt;So, I'm &lt;i&gt;really &lt;/i&gt;interested in understanding what is happening in the get_sample functions.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 27 Feb 2023 00:03:19 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Going off my last thought, I came up with this:&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;	-- custom get_sample function&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	local r, g, b, a = get_sample_gradient(x, y)&lt;br /&gt;	return r, g, b, a&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample_gradient(x, y)&lt;br /&gt;	local nr, ng, nb, na = x, y, (x + y) / 2, 1&lt;br /&gt;	return nr, ng, nb, na&lt;br /&gt;end;[/CODE]&lt;br /&gt;&lt;br /&gt;If I'm right about this, I can expand on this to create the internal lookup I'm after.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 27 Feb 2023 00:22:48 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;The next experiment succeeded pretty quickly! Since I worked it out on my own, I'm just updating for anyone who has an interest. It really goes to show how hard it can be understand scripting without good reference material or guidance. I was really stumped by my lack of experience with scripting in general and understanding of get_sample functions specifically: &lt;br /&gt;&lt;br /&gt;[CODE]local sqrt, min, max, rad, pi = math.sqrt, math.min, math.max, math.rad, math.pi&lt;br /&gt;local sin, cos, tan, asin, acos, atan2 = math.sin, math.cos, math.tan, math.asin, math.acos, math.atan2&lt;br /&gt;&lt;br /&gt;function prepare()&lt;br /&gt;	-- inputs and precalculation.&lt;br /&gt;	aspect = OUTPUT_HEIGHT / OUTPUT_WIDTH * 2&lt;br /&gt;	ang_x = rad(get_angle_input(ANGLE_X) + 180) &lt;br /&gt;	ang_y = rad(get_angle_input(ANGLE_Y))&lt;br /&gt;	ang_z = rad(get_angle_input(ANGLE_Z) - 180)&lt;br /&gt;&lt;br /&gt;	cos_ax, sin_ax  = cos(ang_x), sin(ang_x)&lt;br /&gt;	cos_ay, sin_ay = cos(ang_y), sin(ang_y)&lt;br /&gt;	cos_az, sin_az = cos(ang_z), sin(ang_z)&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	local nx, ny = map_spherical_rotations(x, y)&lt;br /&gt;   -- local r, g, b, a = get_sample_gradient(nx, ny)&lt;br /&gt;	local r, g, b, a = get_sample_map(nx, ny, SOURCE) -- for testing remap seams&lt;br /&gt;   return r, g, b, a&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample_gradient(x, y)&lt;br /&gt;   local nr, ng, nb, na = x, y, (x + y) / 2, 1&lt;br /&gt;   return nr, ng, nb, na&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function map_spherical_rotations(x, y)&lt;br /&gt;	-- coordinate rotations&lt;br /&gt;	local x = x * aspect * pi&lt;br /&gt;	local y = y * pi&lt;br /&gt;	local nx = cos(x) * sin(y)&lt;br /&gt;	local ny = sin(x) * sin(y)&lt;br /&gt;	local nz = cos(y)&lt;br /&gt;	-- local r, g, b, a = nx, ny, 0, 1&lt;br /&gt;	local ax1, ax2 = (nx * cos_ax) + (ny * sin_ax), (nx * sin_ax) - (ny * cos_ax)&lt;br /&gt;	local ay1, ay2 = (ax1 * cos_ay) - (cos(y) * sin_ay), (ax1 * sin_ay) + (cos(y) * cos_ay)&lt;br /&gt;	local az1, az2 = (ax2 * cos_az) + (ay2 * sin_az), (ax2 * sin_az) - (ay2 * cos_az)&lt;br /&gt;	nx = atan2(az1, ay1) * 0.159155 + 0.5&lt;br /&gt;	ny = acos(az2) * 0.159155 * 2&lt;br /&gt;	if OUTPUT_WIDTH / OUTPUT_HEIGHT == 2 then&lt;br /&gt;		nx = nx * 2 - 1&lt;br /&gt;	end&lt;br /&gt;	return nx, ny&lt;br /&gt;end;[/CODE]&lt;br /&gt;I really hope this helps a few people out.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 27 Feb 2023 05:00:48 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I guess I spoke too soon. Once I tried to apply my &quot;solution&quot; it became clear that my premise was flawed. This version shows where I went wrong:&lt;br /&gt;&lt;br /&gt;[CODE]local sqrt, min, max, rad, pi = math.sqrt, math.min, math.max, math.rad, math.pi&lt;br /&gt;local sin, cos, tan, asin, acos, atan2 = math.sin, math.cos, math.tan, math.asin, math.acos, math.atan2&lt;br /&gt;&lt;br /&gt;function prepare()&lt;br /&gt;	-- inputs and precalculation.&lt;br /&gt;	aspect = OUTPUT_HEIGHT / OUTPUT_WIDTH * 2&lt;br /&gt;	ang_x = rad(get_angle_input(ANGLE_X) + 180) &lt;br /&gt;	ang_y = rad(get_angle_input(ANGLE_Y))&lt;br /&gt;	ang_z = rad(get_angle_input(ANGLE_Z) - 180)&lt;br /&gt;&lt;br /&gt;	cos_ax, sin_ax  = cos(ang_x), sin(ang_x)&lt;br /&gt;	cos_ay, sin_ay = cos(ang_y), sin(ang_y)&lt;br /&gt;	cos_az, sin_az = cos(ang_z), sin(ang_z)&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	local nx, ny = map_spherical_rotations(x, y)&lt;br /&gt;	-- reroute coordinates thru channels&lt;br /&gt;	local r, g, b, a = x, y, (x + y) / 2, 1&lt;br /&gt;	-- pass cords and channels to function&lt;br /&gt;	r, g, b, a = get_sample_gradient(nx, ny, r, g, b, a)&lt;br /&gt;	-- local r, g, b, a = get_sample_map(nx, ny, SOURCE) -- for testing remap seams&lt;br /&gt;   return r, g, b, a&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample_gradient(x, y, r, g, b, a)&lt;br /&gt;	-- channels pass thru without remapping&lt;br /&gt;	local nr, ng, nb, na = r, g, b, a&lt;br /&gt;	return nr, ng, nb, na&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function map_spherical_rotations(x, y)&lt;br /&gt;	-- coordinate rotations&lt;br /&gt;	local x = x * aspect * pi&lt;br /&gt;	local y = y * pi&lt;br /&gt;	local nx = cos(x) * sin(y)&lt;br /&gt;	local ny = sin(x) * sin(y)&lt;br /&gt;	local nz = cos(y)&lt;br /&gt;	-- local r, g, b, a = nx, ny, 0, 1&lt;br /&gt;	local ax1, ax2 = (nx * cos_ax) + (ny * sin_ax), (nx * sin_ax) - (ny * cos_ax)&lt;br /&gt;	local ay1, ay2 = (ax1 * cos_ay) - (cos(y) * sin_ay), (ax1 * sin_ay) + (cos(y) * cos_ay)&lt;br /&gt;	local az1, az2 = (ax2 * cos_az) + (ay2 * sin_az), (ax2 * sin_az) - (ay2 * cos_az)&lt;br /&gt;	nx = atan2(az1, ay1) * 0.159155 + 0.5&lt;br /&gt;	ny = acos(az2) * 0.159155 * 2&lt;br /&gt;	if OUTPUT_WIDTH / OUTPUT_HEIGHT == 2 then&lt;br /&gt;		nx = nx * 2 - 1&lt;br /&gt;	end&lt;br /&gt;	return nx, ny&lt;br /&gt;end;[/CODE]&lt;br /&gt;&lt;br /&gt;So, the original problem remains. I can generate the right gradients, but don't know how to use them without get_sample functions.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Wed, 01 Mar 2023 12:01:53 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Just a thought I had last night, the essence of a get_sample function is just to sample a value at specific coordinates. If there are any transformations, they have to come between the sampled value  and the returned value. The values can be generated or sampled via the usual get_sample functions. With some trigonometry involved, it's hard to imagine what is happening, for example, when my script generates spherically mapped noise. My mind knots up when a series of transformations needs to be done. Any light someone can shed on this is welcome, but of course I'll keep working on it too. I'll update each time I come up with any techniques or solutions.&lt;/p&gt;
</description>
</item>
<item><title>Array In Function</title> 
		             <dc:creator>James</dc:creator> 
		             <category></category> 
		             <pubDate>Sat, 14 Jan 2023 07:57:07 -0500</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16365</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16365</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;James&lt;/b&gt;, &lt;em&gt;Sun, 27 Jun 2021 03:47:02 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;So far I haven't tried using arrays in a script and I wanted to use one in a function, however the following code returns a error, any reason why?&lt;br /&gt;&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function mat4({r1,r2,r3,r4})&lt;br /&gt;	 local matrix = {}&lt;br /&gt;    matrix[1], matrix[2], matrix[3], matrix[4] = r1, r2, r3, r4&lt;br /&gt;    return matrix[1], matrix[2], matrix[3], matrix[4]&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	return mat4({1.0,0.5,0.25,1})&lt;br /&gt;end;[/CODE]&lt;br /&gt;&lt;br /&gt;I'm using FF3, perhaps this is due to the version I am using or maybe a limitation in map scripts? or hopefully just an error in my code.&lt;br /&gt;&lt;br /&gt;When using an array in the prepare function it seems to work though.&lt;br /&gt;&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;	matrix = {1.0,0.5,0.25,1.0}&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	return matrix[1],matrix[2],matrix[3],matrix[4]&lt;br /&gt;end;[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;_Agentslimepunk&lt;/b&gt;, &lt;em&gt;Sat, 14 Jan 2023 07:57:07 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;[CODE]function prepare()&lt;br /&gt;&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	-- Image generation code goes here.&lt;br /&gt;&lt;br /&gt;	mat4(1.0, 0.5, 0.25, 1)&lt;br /&gt;	local r = matrix[2]&lt;br /&gt;	local g = matrix[3]&lt;br /&gt;	local b = matrix[2] + y&lt;br /&gt;	local a = 1&lt;br /&gt;	return r, g, b, a&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function mat4(r1, r2, r3, r4)&lt;br /&gt;	matrix = {r1, r2, r3, r4}&lt;br /&gt;	return matrix&lt;br /&gt;&lt;br /&gt;end;[/CODE]&lt;br /&gt;&lt;br /&gt;Is this basically what you were after?&lt;/p&gt;
</description>
</item>
<item><title>Seeking Help: Scripting a Rotation or Angle Map Script</title> 
		             <dc:creator>David Roberson</dc:creator> 
		             <category></category> 
		             <pubDate>Sun, 20 Nov 2022 02:51:45 -0500</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16228</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16228</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 11 Jan 2021 21:20:51 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I'll begin this post by saying I've spent half the day studying this problem, and trying to wrap my brain around the trigonometry and matrix calculations of affine transforms, and needed to take a break. Anyone who's visited the forums recently knows I've been working on spherical noise generators, and I started the day updating them. Before updating the Library, I paused to ask if there was anything I was leaving out. For the Perlin noise version, I did not have an Angle control, and I knew that there was an Angle input I could add to the component. The problem was, how do I make use of one, if I add it?&lt;br /&gt;&lt;br /&gt;So, lots of research and reading commenced. I did poke around to see if I had a filter with a map script in it that used some form of rotation, but there really isn't an efficient way to do that kind of search. So, that left asking the forum if anyone knew of or could provide a script for reference. Of course, there's no telling how long it might take to get a positive response, but you know what happens if you never even ask. It will take me a while to work through this on my own, so I decided to put the request out there in the meantime. &lt;br /&gt;&lt;br /&gt;As always, any help is appreciated.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 11 Jan 2021 22:04:57 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;On further consideration, I realize this might be a moot point, as far as my real objective is concerned. I'd gotten used to the quirks of taking 2D noise and compositing a spheremap, where playing with the Angle could produce interesting and useful variations. But, what I'm working with now is 3D noise. So, in that context, I'd really be trying to come up with rotation on x, y and z axes. That's probably too much to ask anyone to provide, however useful it'd be to me. If someone is up to the challenge, I'd love to see the example they'd come up with, but I'm not going to hold my breath.&lt;br /&gt;&lt;br /&gt;I'd still like to know how to do 2D rotation, but it's more of an academic interest now that I've looked into it a bit.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 11 Jan 2021 22:11:03 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;While I'm still logged in, I might as well share the script for a little oddity I came up with. I found a tiny function to rotate a vector and dropped it into a map script to see what it'd do. I found the output perplexing!&lt;br /&gt;&lt;br /&gt;The code is simple, just create a map script with an Angle input, and paste this in:&lt;br /&gt;&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;	angle = get_angle_input(ANGLE)&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;--	local r, g, b, a = get_sample_map(x, y, SOURCE)&lt;br /&gt;--	local x, y = rotate(x,y,angle)&lt;br /&gt;	local nx, ny = rotate(x,y,angle)&lt;br /&gt;	local r = nx&lt;br /&gt;	local g = ny&lt;br /&gt;	local b = (nx + ny) / 2&lt;br /&gt;	local a = 1&lt;br /&gt;	return r, g, b, a&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function rotate(x, y, a)&lt;br /&gt;  local c = math.cos(a)&lt;br /&gt;  local s = math.sin(a)&lt;br /&gt;  return c*x - s*y, s*x + c*y&lt;br /&gt;end[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Sun, 06 Jun 2021 19:27:13 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;This is not the first time I've tried to use an angle control in a map script, only to get a mysterious &quot;unexpected nil value&quot; errors or the like. I thought this time was simple enough, an angle offset script. The error comes when I return v on the following:&lt;br /&gt;&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;	-- prepare&lt;br /&gt;	dis = 5 -- get_slider_input(DISTANCE)&lt;br /&gt;	dir = math.rad(get_angle_input(DIRECTION))&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	nx = math.cos(dir)&lt;br /&gt;	ny = math.cos(dir)&lt;br /&gt;	-- get source &lt;br /&gt;	v = get_sample_grayscale(x,y,SOURCE)&lt;br /&gt;	x = x + nx * dis&lt;br /&gt;	y = y + ny * dis&lt;br /&gt;	return v&lt;br /&gt;end;[/CODE]&lt;br /&gt;&lt;br /&gt;Anyone care to help?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Sun, 06 Jun 2021 20:23:56 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;And its Any Angle Offset v2.0 By uberzev to the rescue! I knew it was out there, but couldn't find it on my computer. Working on the map script helped me think of the right search string to locate it in the Library. Even so, I'm going to want to know what I'm doing wrong with my map script, so help would still be appreciated!&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;emme&lt;/b&gt;, &lt;em&gt;Mon, 07 Jun 2021 09:48:28 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;The errors are because FF expects all the RGB values returned - you're only returning a single value. Using return v,v,v should fix the errors.&lt;br /&gt;&lt;br /&gt;You also want to calculate the new coordinates &lt;b&gt;before&lt;/b&gt; you sample the source image. Move the get_sample_grayscale below the new x/y coordinates.&lt;br /&gt;&lt;br /&gt;I think there's a typo: nx = math.cos(dir) should use math.sin() instead.&lt;br /&gt;&lt;br /&gt;Anyways, I don't think the script will rotate the image. Only offset it in a circular path.&lt;br /&gt;&lt;br /&gt;Here is a script that rotates an image around a point:&lt;br /&gt;[CODE]&lt;br /&gt;function prepare()&lt;br /&gt;	ox,oy = get_slider_input(ORIGIN_X),get_slider_input(ORIGIN_Y)&lt;br /&gt;   d = math.rad(get_angle_input(ROTATION))&lt;br /&gt;	s,c = math.sin(d), math.cos(d)&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	local nx = c * (x-ox) - s * (y-oy) + ox&lt;br /&gt;	local ny = s * (x-ox) + c * (y-oy) + oy&lt;br /&gt;	local r,g,b,a = get_sample_map(nx, ny, SOURCE)&lt;br /&gt;   return r,g,b,a&lt;br /&gt;end;&lt;br /&gt;[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 07 Jun 2021 15:18:16 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;As always, emme, thank you for your sage advice! I will try your corrections out and tell you how it goes. I was originally interested in rotating an image, or coordinate samples inside perlin noise, but for this last experiment I was going for the circular offset. That's something I was able to do with uberzev's snippet, but it's nice to see how to script it. I really appreciate the rotation script. That will be a lot of help with figuring things out with my other ambitions.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 07 Jun 2021 15:30:52 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Okay, returning v,v,v did fix the error. I made the other corrections you suggested, but the resulting script behaves oddly, jumping around seemingly at random as I increase the angle. Here are the changes I made:&lt;br /&gt;&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;   -- prepare&lt;br /&gt;   dis = 0.5 -- get_slider_input(DISTANCE)&lt;br /&gt;   dir = math.rad(get_angle_input(DIRECTION))&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;   nx = math.sin(dir)&lt;br /&gt;   ny = math.cos(dir)&lt;br /&gt;   -- get source&lt;br /&gt;   x = x + nx * dis&lt;br /&gt;   y = y + ny * dis&lt;br /&gt;   v = get_sample_grayscale(x,y,SOURCE)&lt;br /&gt;   return v,v,v&lt;br /&gt;end;[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 07 Jun 2021 19:50:00 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;On later thought, I wonder if part of the problem is that my circle offset script does not address X and Y Origins. I got up from a nap to pose that question, and I'll see if I can figure out how to test the theory myself next time I'm free to work on it. Thanks.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;James&lt;/b&gt;, &lt;em&gt;Thu, 08 Jul 2021 13:55:24 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Did anyone ever figure out how to rotate an input around a central point like the rotate node?&lt;br /&gt;&lt;br /&gt;I have seen the following GLSL code:&lt;br /&gt;&lt;br /&gt;[CODE]float s = sin(angle);&lt;br /&gt;float c = cos(angle);&lt;br /&gt;&lt;br /&gt;return mat2(&lt;br /&gt;	c, -s,&lt;br /&gt;	s, c&lt;br /&gt;);[/CODE]&lt;br /&gt;&lt;br /&gt;It is similar to the function David posted in the 3rd post which didn't seem to do anything for me. I am not sure how to recreate the mat2 matrix part of the GLSL however so I haven't got anything I have tried working yet. &lt;br /&gt;&lt;br /&gt;I tried the code above but that seems to move the image around a radius rather than actually rotating it.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;emme&lt;/b&gt;, &lt;em&gt;Sat, 10 Jul 2021 10:33:33 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;James wrote:&lt;/b&gt;&lt;br /&gt;Did anyone ever figure out how to rotate an input around a central point like the rotate node?&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Check few posts above  ;) &lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;emme wrote:&lt;/b&gt;&lt;br /&gt;Here is a script that rotates an image around a point:&lt;br /&gt;[CODE]&lt;br /&gt;function prepare()&lt;br /&gt;   ox,oy = get_slider_input(ORIGIN_X),get_slider_input(ORIGIN_Y)&lt;br /&gt;   d = math.rad(get_angle_input(ROTATION))&lt;br /&gt;   s,c = math.sin(d), math.cos(d)&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;   local nx = c * (x-ox) - s * (y-oy) + ox&lt;br /&gt;   local ny = s * (x-ox) + c * (y-oy) + oy&lt;br /&gt;   local r,g,b,a = get_sample_map(nx, ny, SOURCE)&lt;br /&gt;   return r,g,b,a&lt;br /&gt;end;&lt;br /&gt;[/CODE]&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;James&lt;/b&gt;, &lt;em&gt;Sun, 11 Jul 2021 15:09:21 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;That works great thanks :)&lt;br /&gt;&lt;br /&gt;I noticed when increasing the angle it travels in the opposite direction to the default rotate node, so I just put the angle in a lerp function making it decrease in value as then it matches the behaviour of the default rotate node.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 18 Jul 2022 04:15:09 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;@James&lt;br /&gt;&lt;br /&gt;I revisited this thread to pick up emme's rotate script when I noticed your response, and I got curious about the lerp function you added. Could you explain how you used it? Given the same problem, I would have tried another method to invert the angle input. I'd be happy with just the code for the script, too. Thanks!&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Sun, 06 Nov 2022 07:18:49 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I have spent the past few days working on adding better rotation controls to map scripts derived fr om &lt;a href=&quot;https://www.filterforge.com/filters/12486.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Planet Maker 3D by andyz&lt;/a&gt;. Along the way I visited &lt;a href=&quot;https://www.khanacademy.org/computing/computer-programming/programming-games-visualizations/programming-3d-shapes/a/rotating-3d-shapes&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Rotating 3D shapes&lt;/a&gt; wh ere I was able to fill in the blanks in my understanding of 3D rotations. I applied that to the script used in my current project, but I'm also interested in using the functions from that page to emulate the Angle control of Perlin Noise in a 3D Perlin Noise map script.&lt;br /&gt;&lt;br /&gt;I made an attempt to convert the JS to Lua, but I think I need a more experienced set of eyes to tell if I'm on the right track. At the moment, I only have a vague idea how I'd use the functions in question. &lt;br /&gt;&lt;br /&gt;Take a look:&lt;br /&gt;[CODE]&lt;br /&gt;-- rotation functions js to lua&lt;br /&gt;function prepare()&lt;br /&gt;	-- input&lt;br /&gt;	local theta = math.rad(get_angle_input(THETA))&lt;br /&gt;	-- precalc, global vars for rotation functions&lt;br /&gt;	sin_theta = sin(theta);&lt;br /&gt;	cos_theta = cos(theta);&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	-- incomplete, pass array as var?&lt;br /&gt;	x, y, z = rotate_z3d(x,y,sin_theta,cos_theta), rotate_x3d(x,y,sin_theta,cos_theta), rotate_y3d(x,y,sin_theta,cos_theta)&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function rotate_z3d(x,y,sin_theta,cos_theta)&lt;br /&gt;   for node_index = 0, NODE_COUNT  do&lt;br /&gt;	local NODE = {}&lt;br /&gt;	local NODE_COUNT&lt;br /&gt;	local node_index&lt;br /&gt;		if (node_index &amp;lt; nodes_length) then&lt;br /&gt;			NODE_COUNT = node_index - 1&lt;br /&gt;			break&lt;br /&gt;		NODE[node_index] = {x,y}&lt;br /&gt;		y = y * cos_theta - z * sin_theta&lt;br /&gt;		z = z * cos_theta + y * sin_theta&lt;br /&gt;   end&lt;br /&gt;   &lt;br /&gt;   &lt;br /&gt;end;&lt;br /&gt;function rotate_x3d(x,y,sin_theta,cos_theta)&lt;br /&gt;	local NODE = {}&lt;br /&gt;	local NODE_COUNT&lt;br /&gt;	local node_index&lt;br /&gt;  for node_index = 0, NODE_COUNT  do&lt;br /&gt;		if (node_index &amp;lt; nodes_length) then&lt;br /&gt;			NODE_COUNT = node_index - 1&lt;br /&gt;			break&lt;br /&gt;		NODE[node_index] = {x,y}&lt;br /&gt;		y = y * cos_theta - z * sin_theta&lt;br /&gt;		z = z * cos_theta + y * sin_theta&lt;br /&gt;   end&lt;br /&gt;   &lt;br /&gt;   &lt;br /&gt;end;&lt;br /&gt;= function rotate_y3d(x,y,sin_theta,cos_theta)&lt;br /&gt;	local NODE = {}&lt;br /&gt;	local NODE_COUNT&lt;br /&gt;	local node_index&lt;br /&gt;  for node_index = 0, NODE_COUNT  do&lt;br /&gt;		if (node_index &amp;lt; nodes_length) then&lt;br /&gt;			NODE_COUNT = node_index - 1&lt;br /&gt;			break&lt;br /&gt;		NODE[node_index] = {x,y}&lt;br /&gt;		y = y * cos_theta - z * sin_theta&lt;br /&gt;		z = z * cos_theta + y * sin_theta&lt;br /&gt;   end&lt;br /&gt;end;[/CODE]&lt;br /&gt;&lt;br /&gt;Here is the JS:&lt;br /&gt;&lt;br /&gt;[CODE]// rotation functions from js&lt;br /&gt;&lt;br /&gt;	var rotateZ3D = function(theta) {&lt;br /&gt;	   var sinTheta = sin(theta);&lt;br /&gt;	   var cosTheta = cos(theta);&lt;br /&gt;	   for (var n = 0; n &amp;lt; nodes.length; n++) {&lt;br /&gt;		  var node = nodes[n];&lt;br /&gt;		  var x = node[0];&lt;br /&gt;		  var y = node[1];&lt;br /&gt;		  node[0] = x * cosTheta - y * sinTheta;&lt;br /&gt;		  node[1] = y * cosTheta + x * sinTheta;&lt;br /&gt;	   }&lt;br /&gt;	};&lt;br /&gt;	var rotateX3D = function(theta) {&lt;br /&gt;	   var sinTheta = sin(theta);&lt;br /&gt;	   var cosTheta = cos(theta);&lt;br /&gt;	   for (var n = 0; n &amp;lt; nodes.length; n++) {&lt;br /&gt;		  var node = nodes[n];&lt;br /&gt;		  var y = node[1];&lt;br /&gt;		  var z = node[2];&lt;br /&gt;		  node[1] = y * cosTheta - z * sinTheta;&lt;br /&gt;		  node[2] = z * cosTheta + y * sinTheta;&lt;br /&gt;	   }&lt;br /&gt;	};&lt;br /&gt;	var rotateY3D = function(theta) {&lt;br /&gt;	   var sinTheta = sin(theta);&lt;br /&gt;	   var cosTheta = cos(theta);&lt;br /&gt;	   for (var n = 0; n &amp;lt; nodes.length; n++) {&lt;br /&gt;		  var node = nodes[n];&lt;br /&gt;		  var x = node[0];&lt;br /&gt;		  var z = node[2];&lt;br /&gt;		  node[0] = x * cosTheta + z * sinTheta;&lt;br /&gt;		  node[2] = z * cosTheta - x * sinTheta;&lt;br /&gt;	   }&lt;br /&gt;	};&lt;br /&gt;[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 20 Nov 2022 02:51:45 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Sorry that I can not help you as I have no knowledge of scripting, but I really admire all of you that are able to do it and be able to go beyond what can be done with the FF components and make such creative things that are not possible in other ways&lt;/p&gt;
</description>
</item>
<item><title>Scripting a Spherical Noise Map Generator</title> 
		             <dc:creator>David Roberson</dc:creator> 
		             <category></category> 
		             <pubDate>Sat, 29 Oct 2022 10:46:05 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16213</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16213</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Tue, 29 Dec 2020 19:43:23 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;A few weeks ago, I stumbled across an example Spherical Noise Map Generator using C++/libnoise. That got me to wondering if FF would be capable of doing it, too. I posted a Feature Request and emme helpfully supplied an example Map Script, pointing out that it could be further enhanced to multi-octave noise, and other cool things. &lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://www.filterforge.com/upload/forum/upload/e43/spherical_noise_v001.ffxml&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;spherical_noise_v001.ffxml&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I remembered one of the Script API I saved was for multi-octave perlin noise and went back to study it, for help making emme's example work along the same lines. Unfortunately, I'm pretty much a beginner with Lua, and it's been years since I've done any real coding, so I could not see a direct path to follow. It seems that the &quot;multi-octave&quot; portion of the script is already using a z-coordinate, so that struck me as a conflict even before I realized emme's 3-coordinate example sets up the variables in a very different way. As in, I barely understand the logic of what it's doing, so I can't follow the transition from my 2-coordinate multi-octave example to 3-coordinates.&lt;br /&gt;&lt;br /&gt;Maybe somebody can help me with that. The API I'm referencing is: &lt;a href=&quot;https://www.filterforge.com/images/version3/script-api/Script%20API%20-%20Multi-Octave%20Perlin.ffxml&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Script API - Multi-Octave Perlin.ffxml&lt;/a&gt;. This is going to be a learning project for me, and other features will come to mind, or variations along the same lines (I've mentioned exploring a way to do a Whorley noise spherical map generator, for example). I'm just not sure how much I have to study before I can figure this out on my own. &lt;br /&gt;&lt;br /&gt;Whatever happens, I'll try to keep track of my progress here, for the benefit of anyone interested in the same challenge.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;emme&lt;/b&gt;, &lt;em&gt;Tue, 29 Dec 2020 21:11:06 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I added some features to the script: octaves, roughness/detail, distortion and noise-profile. This multi-octave implementation probably isn't exactly the &quot;correct&quot; way to do it - I just did it the quick and dirty way  :) &lt;br /&gt;&lt;br /&gt;I think there is also a 2D Worley noise example script in the Noise-API help section. Not sure how easy it'll be to convert into 3D, but my guess would be, not super difficult. I'll check it out at some point.&lt;br /&gt;&lt;br /&gt;In the original thread, you mentioned texture baking in Blender - I'll answer it here. After creating a UV-sphere, create a new material in the shading editor and add some texturing. Next, add a new empty image texture (alt+n -&amp;gt; texture -&amp;gt; image texture) and click the New -button. In the render properties tab, select Cycles for your render engine and you should see a Bake tab below. Select the bake type ect. and click Bake. You can now use the baked texture on your object or export it to disk.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Wed, 30 Dec 2020 03:37:24 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thank you, emme! I'll check out your added features now. I discovered pretty quickly that learning Lua is going to be a little harder than I first thought. The documentation I've found so far is a bit dry and quite a bit shy of tutorials I can pick up on quickly. I still think it's worth learning, and I hope the forums here will help with that. I already have a few ideas of what features I'd like the component to have, starting with the usual: probably map inputs for color, roughness, contrast, and possibly distortion, with scale (already there), angle, details (now added) and variation. I think I'd also like to be able to pan through the 3 coordinates interactively to explore and position the noise. I did pick up the whorley noise API, today. I'll be interested to see what you come up with--you'll probably figure it out way ahead of me :D .&lt;br /&gt;&lt;br /&gt;As for Blender, the answer helps. I imagine I'd have already learned how to do it if I'd experimented with texture baking beyond learning that it could be done. The first time is always a bit daunting.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Fri, 01 Jan 2021 16:19:25 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Emme, I'm no judge of best implementation, so I wouldn't criticize your roughness/detail and multi-octave method. It seems to work well enough for basic use. I can say that the difference between your method and the API example is greater than my analysis skills can parse. The multi-octave perlin example does a lot with the input values in the prepare() function to generate octave derived values used in the get_sample() function. The noise itself is ultimately used as the alpha matrix in a blend_normal() function that returns the composite foreground and background maps integration. &lt;br /&gt;&lt;br /&gt;The map blending is not a high priority for me, when it comes to expanding on your script, since I'd have to supply spherically mapped inputs to get a usable result. Even though the same is true when it comes to mapped Roughness and Contrast, there are ways to mitigate their influence if I employ a circle curve gradient that masks out the top and bottom portions of the supplied maps. The effects I can get that way are useful in a lot of cases. Not that I'm getting any closer to implementing Roughness or Contrast in your script. I don't even have an example for how to do contrast adjustments, mathematically.&lt;br /&gt;&lt;br /&gt;My scripting adventures may come to a quick end. It's looking like something I can't pick up on my own. I just can't find the kind of instruction or examples I can follow, and my math skills are probably not good enough to solve graphics problems without explicit examples. I'm only able to look at the script and understand what it's doing. I can't adapt it to something else. Sigh.&lt;br /&gt;&lt;br /&gt;In any case, thanks again for your help, and your excellent examples.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Fri, 01 Jan 2021 18:30:59 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I wrote a nice little post detailing my first update to emme's script, and it got discarded during preview as I was logged off the forum. Bother. Just to recap, what I remember, I found it easy to add offsets to the x, y and z coordinates via grayscale input. I tested it out with perlin noise inputs in seamless and non-seamless modes and the results were both seamless, so adding the values to the initial coordinate declarations worked fine. Obviously, the offsets can produce additional distortion, so extreme results are possible. I'm posting the script code for quick review, with the ffxml attached below.&lt;br /&gt;&lt;br /&gt;I still need some tutoring or an example to follow up on adding Contrast or Roughness (independent of Details) to this. I just don't know the math for the first, and my example of the second is implemented very differently from emme's approach. I sort of understand what it's doing, but not well enough to adapt it.&lt;br /&gt;&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;	oct_max = get_intslider_input(NOISE_OCTAVES)&lt;br /&gt;	detail = 4 - get_slider_input(DETAIL) * 2 + 0.01&lt;br /&gt;	scale = get_slider_input(NOISE_SCALE) * 10 + 1&lt;br /&gt;	distort = get_slider_input(NOISE_DISTORT) *2&lt;br /&gt;	aspect = OUTPUT_HEIGHT / OUTPUT_WIDTH * 2&lt;br /&gt;	set_perlin_noise_seed(get_intslider_input(NOISE_SEED))&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	local v = 0&lt;br /&gt;	local vosx = get_sample_grayscale(x, y, OFFSET_X)&lt;br /&gt;	local vosy = get_sample_grayscale(x, y, OFFSET_Y)&lt;br /&gt;	local vosz = get_sample_grayscale(x, y, OFFSET_Z)&lt;br /&gt;	local s = 500&lt;br /&gt;	local amp = 1&lt;br /&gt;	local x = x * aspect * math.pi&lt;br /&gt;	local y = y * math.pi&lt;br /&gt;	local nx = math.cos(x) * math.sin(y) * scale + vosx&lt;br /&gt;	local ny = math.sin(x) * math.sin(y) * scale + vosy&lt;br /&gt;	local nz = math.cos(y) * scale + vosz&lt;br /&gt;	for oct = 1, oct_max do&lt;br /&gt;		local d1 = get_perlin_noise(nx+1,ny,nz,s) * distort&lt;br /&gt;		local d2 = get_perlin_noise(nx+2,ny,nz,s) * distort&lt;br /&gt;		local d3 = get_perlin_noise(nx+3,ny,nz,s) * distort&lt;br /&gt;		if oct == 1 then v = get_perlin_noise(nx+d1,ny+d2,nz+d3,s) else&lt;br /&gt;			v = (v + get_perlin_noise(nx+d1/oct,ny+d2/oct,nz+d3/oct,s) * amp ) / (1 + amp)&lt;br /&gt;		end&lt;br /&gt;		nz = nz * 2&lt;br /&gt;		s = s / 2&lt;br /&gt;		amp = amp / detail&lt;br /&gt;	end&lt;br /&gt;	v = get_sample_curve(x,y,v,NOISE_PROFILE)&lt;br /&gt;	return v,v,v,1&lt;br /&gt;end;[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;emme&lt;/b&gt;, &lt;em&gt;Fri, 01 Jan 2021 23:33:22 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Added mappable detail (or roughness) and distortion. The noise profile should work for mappable contrast, but I just tried mapping it, and it breaks the seamlessness for some reason. Could be that the curve gets sampled incorrectly with non-square images, I'll have to look into that. Anyways, contrast is easy to adjust after the script, so I just added a mapped tone curve for that. Let me know if works ok.&lt;br /&gt;&lt;br /&gt;Like you mentioned, all the input maps need to be in the same spherical format in order to maintain seamlessness. Mapping with seamless 2D perlin won't be seamless on a sphere - even if it looks seamless in 2D.&lt;br /&gt;&lt;br /&gt;Pretty cool to play with the xyz offsets you added btw. Really helps with visualizing the projection :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Fri, 01 Jan 2021 23:35:35 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;A quick little progress update, here's some thoughts on Brightness/Contrast adjustment adapted fr om an online source. I revised the examples from the two articles I found into rough Lua code, without changing any of the values given. I only updated the variable names to fit in with other scripting I've dealt with. I've noted which values before the code blocks. I assume I'll need to convert the values for a 0-1 range before proceeding?&lt;br /&gt;&lt;br /&gt;Image Adjustment links to the Articles (copyright © 2008, 2010, 2015 Francis G. Loch) included.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://www.dfstudios.co.uk/articles/programming/image-programming-algorithms/image-processing-algorithms-part-4-brightness-adjustment/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Brightness Adjustment&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Adjusting the brightness of an image is one of the easiest image processing operations that can be done. All that is involved is adding the desired change in brightness to each of the red, green and blue color components.&lt;br /&gt;&lt;br /&gt;In pseudo-code it would go something like this (unstated, but assuming value range of 0-255)(also assuming brightness is a slider value, so technically declared in prepare() and omitted here):&lt;br /&gt;&lt;br /&gt;[CODE]function get_sample(x,y)&lt;br /&gt;  local r, g, b, a = get_sample_map(x, y, COLOR)&lt;br /&gt;  local nr = truncate(r + brightness)&lt;br /&gt;  local ng = truncate(g + brightness)&lt;br /&gt;  local nb = truncate(b + brightness)&lt;br /&gt;  return nr, nb, ng, a&lt;br /&gt;end;[/CODE]&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://www.dfstudios.co.uk/articles/programming/image-programming-algorithms/image-processing-algorithms-part-5-contrast-adjustment/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Contrast Adjustment&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The first step is to calculate a contrast correction factor which is given by the following formula (assuming the value in question is RGB in the 0-255 value range):&lt;br /&gt;&lt;br /&gt;[CODE]   f = 259 * (c + 255) / 255 * (259 - c)[/CODE]&lt;br /&gt;&lt;br /&gt;In order for the algorithm to function correctly the value for the contrast correction factor (F [or f, in the line above]) needs to be stored as a floating point number and not as an integer. The value C [c] in the formula denotes the desired level of contrast.&lt;br /&gt;&lt;br /&gt;The next step is to perform the actual contrast adjustment itself. The following formula shows the adjustment in contrast being made to the red component of a color:&lt;br /&gt;&lt;br /&gt;[CODE]   r = f * (r - 128) + 128[/CODE]&lt;br /&gt;&lt;br /&gt;Translating the above formulas into pseudo-code would give something like this (assuming the value of contrast will be in the range of -255 to +255, wh ere negative values will decrease the amount of contrast and, conversely, positive values will increase the amount of contrast):&lt;br /&gt;&lt;br /&gt;[CODE]  factor = (259 * (contrast + 255)) / (255 * (259 - contrast))&lt;br /&gt;&lt;br /&gt;  function get_sample(x,y)&lt;br /&gt;    local r, g, b, a = get_sample_map(x, y, COLOR)&lt;br /&gt;    local nr = truncate(factor * (r  - 128) + 128)&lt;br /&gt;    local ng = truncate(factor * (g - 128) + 128)&lt;br /&gt;    local nb = truncate(factor * (b - 128) + 128)&lt;br /&gt;    return nr, ng, nb, a&lt;br /&gt;  end;[/CODE]&lt;br /&gt;&lt;br /&gt;The function truncate() just ensures that the new values of red, green and blue are within the valid range of 0 to 255.&lt;br /&gt;&lt;br /&gt;The function truncate() in pseudo-code (assuming value range of 0-255):&lt;br /&gt;&lt;br /&gt;[CODE]  function truncate(value)&lt;br /&gt;     If value &amp;lt; 0 Then value = 0&lt;br /&gt;     If value &amp;gt; 255 Then value = 255&lt;br /&gt;     Return value&lt;br /&gt;  end;[/CODE]&lt;br /&gt;&lt;br /&gt;As always, your thoughts are welcome. This is just a nudge in the direction of a -- hoped for -- mapped contrast control. That, and a mapped roughness control are my two main objectives for now.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;emme&lt;/b&gt;, &lt;em&gt;Fri, 01 Jan 2021 23:46:01 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;You might be overthinking it :)&lt;br /&gt;&lt;br /&gt;You can already do mapped contrast with existing components. Since the operation is not directional or size dependent , it won't break seamlessness - as long as you use a spherically seamless input maps. Check my last post.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Sat, 02 Jan 2021 02:48:06 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I'm sure I am, emme. I've been known to do that. Got the stubbornness gene from both parents, I guess! I missed your update with the mapped details/roughness and distortion while I was working, so my update this time contains my own solution for mapped roughness. I played a little with the details formula to get in a little extra roughness at the high end. I'll post the code for those who just want a glance at the script, before the attached ffxml with my current experiments in it. &lt;br /&gt;&lt;br /&gt;One last thought, how do you enter a tab inside the script editor? Or do you compose the script outside it and just paste in the final version when you're done? &lt;br /&gt;&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;	oct_max = get_intslider_input(NOISE_OCTAVES)&lt;br /&gt;--	detail = 4 - get_slider_input(NOISE_DETAIL) * 2 + 0.01 -- mapped alternate&lt;br /&gt;--	scale = get_slider_input(NOISE_SCALE) * 10 + 1 -- mapped alternate&lt;br /&gt;	distort = get_slider_input(NOISE_DISTORT) * 2&lt;br /&gt;	aspect = OUTPUT_HEIGHT / OUTPUT_WIDTH * 2&lt;br /&gt;	set_perlin_noise_seed(get_intslider_input(NOISE_SEED))&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	local v = 0&lt;br /&gt;	local scale = get_sample_grayscale(x, y, SCALE) -- * 10 + 1 -- unsuitable range&lt;br /&gt;	local vosx = get_sample_grayscale(x, y, OFFSET_X)&lt;br /&gt;	local vosy = get_sample_grayscale(x, y, OFFSET_Y)&lt;br /&gt;	local vosz = get_sample_grayscale(x, y, OFFSET_Z)&lt;br /&gt;	local detail = 3.75 - get_sample_grayscale(x, y, DETAIL) * 2 + 0.01&lt;br /&gt;	local s = 500&lt;br /&gt;	local amp = 1&lt;br /&gt;	local x = x * aspect * math.pi&lt;br /&gt;	local y = y * math.pi&lt;br /&gt;	local nx = math.cos(x) * math.sin(y) * scale + vosx&lt;br /&gt;	local ny = math.sin(x) * math.sin(y) * scale + vosy&lt;br /&gt;	local nz = math.cos(y) * scale + vosz&lt;br /&gt;	for oct = 1, oct_max do&lt;br /&gt;		local d1 = get_perlin_noise(nx+1,ny,nz,s) * distort&lt;br /&gt;		local d2 = get_perlin_noise(nx+2,ny,nz,s) * distort&lt;br /&gt;		local d3 = get_perlin_noise(nx+3,ny,nz,s) * distort&lt;br /&gt;		if oct == 1 then v = get_perlin_noise(nx+d1,ny+d2,nz+d3,s) else&lt;br /&gt;			v = (v + get_perlin_noise(nx+d1/oct,ny+d2/oct,nz+d3/oct,s) * amp ) / (1 + amp)&lt;br /&gt;		end&lt;br /&gt;		nz = nz * 2&lt;br /&gt;		s = s / 2&lt;br /&gt;		amp = amp / detail&lt;br /&gt;	end&lt;br /&gt;	v = get_sample_curve(x,y,v,NOISE_PROFILE)&lt;br /&gt;	return v,v,v,1&lt;br /&gt;end;[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Sun, 03 Jan 2021 17:18:41 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Apart from adding mapped distortion to my working script, I have not made any new progress, so this may be the final version I'll end up using unless I come up with something new I need the script to do. I've wondered about working with multiple noise instances to be blended into the main result, in keeping with the recommendation to make one Map Script to do what you need rather than have multiple Map Scripts in one filter. Even so, I have to prototype the composite with regular components to figure out exactly what I'm trying to accomplish before working out the script to do it internally.&lt;br /&gt;&lt;br /&gt;Like before, here's the current script code, with the attached ffxml below:&lt;br /&gt;&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;	oct_max = get_intslider_input(NOISE_OCTAVES)&lt;br /&gt;--	detail = 4 - get_slider_input(NOISE_DETAIL) * 2 + 0.01 -- mapped alternate&lt;br /&gt;--	scale = get_slider_input(NOISE_SCALE) * 10 + 1 -- mapped alternate&lt;br /&gt;--	distort = get_slider_input(NOISE_DISTORT) * 2 -- mapped alternate&lt;br /&gt;	aspect = OUTPUT_HEIGHT / OUTPUT_WIDTH * 2&lt;br /&gt;	set_perlin_noise_seed(get_intslider_input(NOISE_SEED))&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	local v = 0&lt;br /&gt;	local scale = get_sample_grayscale(x, y, SCALE) -- * 10 + 1 -- unsuitable range&lt;br /&gt;	local vosx = get_sample_grayscale(x, y, OFFSET_X)&lt;br /&gt;	local vosy = get_sample_grayscale(x, y, OFFSET_Y)&lt;br /&gt;	local vosz = get_sample_grayscale(x, y, OFFSET_Z)&lt;br /&gt;	local detail = 3.75 - get_sample_grayscale(x, y, DETAIL) * 2 + 0.01&lt;br /&gt;	local distortion = get_sample_grayscale(x, y, DISTORTION) * 2&lt;br /&gt;	local s = 500&lt;br /&gt;	local amp = 1&lt;br /&gt;	local x = x * aspect * math.pi&lt;br /&gt;	local y = y * math.pi&lt;br /&gt;	local nx = math.cos(x) * math.sin(y) * scale + vosx&lt;br /&gt;	local ny = math.sin(x) * math.sin(y) * scale + vosy&lt;br /&gt;	local nz = math.cos(y) * scale + vosz&lt;br /&gt;	for oct = 1, oct_max do&lt;br /&gt;		local d1 = get_perlin_noise(nx+1,ny,nz,s) * distortion&lt;br /&gt;		local d2 = get_perlin_noise(nx+2,ny,nz,s) * distortion&lt;br /&gt;		local d3 = get_perlin_noise(nx+3,ny,nz,s) * distortion&lt;br /&gt;		if oct == 1 then v = get_perlin_noise(nx+d1,ny+d2,nz+d3,s) else&lt;br /&gt;			v = (v + get_perlin_noise(nx+d1/oct,ny+d2/oct,nz+d3/oct,s) * amp ) / (1 + amp)&lt;br /&gt;		end&lt;br /&gt;		nz = nz * 2&lt;br /&gt;		s = s / 2&lt;br /&gt;		amp = amp / detail&lt;br /&gt;	end&lt;br /&gt;	v = get_sample_curve(x,y,v,NOISE_PROFILE)&lt;br /&gt;	return v,v,v,1&lt;br /&gt;end;[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 04 Jan 2021 16:37:35 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hey, emme. I've confirmed that mapped curves do break spherical seamlessness, unless their sources are spherically mapped. Even then, some curve utilities, like Repeat, still break it.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 04 Jan 2021 16:47:07 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I had a system crash and lost my working ffxml, so I retrieved the one I posted here last. That's when I discovered it was also out of date. So, just a quick repost with the final tweaks, for anyone interested in the prototypes so far. Versions are noted inside, (most of my changes were to emme's v.002, so hers is the only v.003 script in it) so I dropped the version of the ffxml itself. The final change was making Distortion grayscale accept HDR values, since distortions in the +/-1 range are useful, and mapped values beyond it can be useful in some cases. I thought of adding strength sliders -- one for Distortion and a Percentage for the offsets -- to adjust the influence of mapped input, but decided that could be handled by adjustment components beforehand. It's easy enough to add if anyone feels they'd be useful, internally, in spite of being redundant when mapped inputs are not used.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 04 Jan 2021 17:13:37 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Oops! Pointed out the wrong bad guy. Repeat did not break seamlessness after all. It was an Offset mapping of Amplitude that got weird. It didn't really break seamlessness as populate the background with fractional offsets of the source noise. It technically doesn't break the seam at top and bottom, it just creates an unwanted tiling within the perimeter.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Tue, 05 Jan 2021 20:16:38 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I've been losing my work file in spite of regular saves, so I'm posting the new version while I'm still in the Filter Editor. I've checked that it did save this time, so I might be right that Projects are messing up the file somehow, but this time I made sure I was closed out of any open Projects. &lt;br /&gt;&lt;br /&gt;The change was simply adding Foreground/Background map inputs, with my noise assigned to Opacity, with an HDR option for the inputs. Like emme said, an easy thing to add once I decided it was still worth having. I'd almost forgotten it was one of my original goals! &lt;br /&gt;&lt;br /&gt;Here's the script code, with the attached ffxml, below:&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;	oct_max = get_intslider_input(NOISE_OCTAVES)&lt;br /&gt;--	detail = 4 - get_slider_input(NOISE_DETAIL) * 2 + 0.01 -- mapped alternate&lt;br /&gt;--	scale = get_slider_input(NOISE_SCALE) * 10 + 1 -- mapped alternate&lt;br /&gt;--	distort = get_slider_input(NOISE_DISTORT) * 2 -- mapped alternate&lt;br /&gt;	aspect = OUTPUT_HEIGHT / OUTPUT_WIDTH * 2&lt;br /&gt;	set_perlin_noise_seed(get_intslider_input(NOISE_SEED))&lt;br /&gt;	if (get_checkbox_input(HDR)) then&lt;br /&gt;		hdr = true&lt;br /&gt;	else&lt;br /&gt;		hdr = false&lt;br /&gt;	end&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	local r, g, b, a = get_sample_map(x, y, BACKGROUND)&lt;br /&gt;	local r2, g2, b2, a2 = get_sample_map(x, y, FOREGROUND)&lt;br /&gt;	local v = 0&lt;br /&gt;	local scale = get_sample_grayscale(x, y, SCALE) -- * 10 + 1 -- unsuitable range&lt;br /&gt;	local vosx = get_sample_grayscale(x, y, OFFSET_X)&lt;br /&gt;	local vosy = get_sample_grayscale(x, y, OFFSET_Y)&lt;br /&gt;	local vosz = get_sample_grayscale(x, y, OFFSET_Z)&lt;br /&gt;   local detail = 3.75 - get_sample_grayscale(x, y, DETAIL) * 2 + 0.01&lt;br /&gt;	local distortion = get_sample_grayscale(x, y, DISTORTION) * 2&lt;br /&gt;	local s = 500&lt;br /&gt;	local amp = 1&lt;br /&gt;	local x = x * aspect * math.pi&lt;br /&gt;	local y = y * math.pi&lt;br /&gt;	local nx = math.cos(x) * math.sin(y) * scale + vosx&lt;br /&gt;	local ny = math.sin(x) * math.sin(y) * scale + vosy&lt;br /&gt;	local nz = math.cos(y) * scale + vosz&lt;br /&gt;	for oct = 1, oct_max do&lt;br /&gt;		local d1 = get_perlin_noise(nx+1,ny,nz,s) * distortion&lt;br /&gt;		local d2 = get_perlin_noise(nx+2,ny,nz,s) * distortion&lt;br /&gt;		local d3 = get_perlin_noise(nx+3,ny,nz,s) * distortion&lt;br /&gt;		if oct == 1 then v = get_perlin_noise(nx+d1,ny+d2,nz+d3,s) else&lt;br /&gt;			v = (v + get_perlin_noise(nx+d1/oct,ny+d2/oct,nz+d3/oct,s) * amp ) / (1 + amp)&lt;br /&gt;		end&lt;br /&gt;		nz = nz * 2&lt;br /&gt;		s = s / 2&lt;br /&gt;		amp = amp / detail&lt;br /&gt;	end&lt;br /&gt;	v = get_sample_curve(x,y,v,NOISE_PROFILE)&lt;br /&gt;	local opacity = v&lt;br /&gt;	r, g, b, a = blend_normal(r, g, b, a, r2, g2, b2, a2, opacity, hdr)&lt;br /&gt;	return r, g, b, a&lt;br /&gt;end;[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Tue, 05 Jan 2021 22:17:29 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Since I lost what I was working on, once I finished reconstructing what I could still remember (last post), I thought I'd begin looking into other types of spherical noise. I quickly composed my own version of Spherical Uniform Noise and got it working in color and grayscale modes. Sadly, the results don't differ any from the API - Uniform Noise. You just get a uniform size noise, without polar distortion like I expected. Still, it was just a warm-up before trying to tackle something more challenging, like Cell Noise. I'm not yet sure if I can adapt the example to this, but at the moment it's the only kind I have an example for. &lt;br /&gt;&lt;br /&gt;I'd be thrilled if anyone can provide (or post links to) scripts or coding samples for scripting/programming other types of Worley noise. I can't bug emme for everything (though some times I can't help myself :D)!&lt;br /&gt;&lt;br /&gt;Just the code snip, this time:&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;	set_noise_seed(get_intslider_input(SEED))&lt;br /&gt;	aspect = OUTPUT_HEIGHT / OUTPUT_WIDTH * 2&lt;br /&gt;	color = get_checkbox_input(COLOR)&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	local x = x * aspect * math.pi&lt;br /&gt;	local y = y * math.pi&lt;br /&gt;	local nx = math.cos(x) * math.sin(y) -- * scale&lt;br /&gt;	local ny = math.sin(x) * math.sin(y) -- * scale&lt;br /&gt;	local nz = math.cos(y) -- * scale&lt;br /&gt;	local v = get_noise(nx,ny,nz)&lt;br /&gt;	local r = get_noise(nx,ny,nz+1)&lt;br /&gt;	local g = get_noise(nx,ny,nz+2)&lt;br /&gt;	local b = get_noise(nx,ny,nz+3)&lt;br /&gt;	if color then&lt;br /&gt;		return r,g,b,1 &lt;br /&gt;	else&lt;br /&gt;		return v,v,v,1 &lt;br /&gt;	end&lt;br /&gt;end;[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Wed, 06 Jan 2021 03:20:39 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Well, a little bit of progress is often followed by a lot of confusion. I quickly got lost trying to work out how to do Worley cells in 3D. I don't really know how to explain my confusion other than by commenting on the API script, and seeing if someone can point me back in the right direction. I also experimented, quasi-logically to see if I could at least make the 2D cells seamless, but there doesn't seem to be set_noise_seamless() or set_noise_seamless_region() functions to call.&lt;br /&gt;&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;	MIN_SCALE = 0.01&lt;br /&gt;	scale = math.max(MIN_SCALE, get_slider_input(SCALE) / 2)&lt;br /&gt;	set_noise_seed(get_intslider_input(NOISE_SEED))&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	-- following block generates spherical coordinates...&lt;br /&gt;		-- local x = x * aspect * math.pi&lt;br /&gt;		-- local y = y * math.pi&lt;br /&gt;		-- local nx = math.cos(x) * math.sin(y) * scale&lt;br /&gt;		-- local ny = math.sin(x) * math.sin(y) * scale&lt;br /&gt;		-- local nz = math.cos(y) * scale&lt;br /&gt;	-- this part gets replaced with worley noise algorhythm&lt;br /&gt;		-- local v = get_perlin_noise(nx,ny,nz,500)&lt;br /&gt;	local sx, sy = x / scale , y / scale -- add sz = z / scale?&lt;br /&gt;	local cell_x, cell_y = math.floor(sx), math.floor(sy) -- add cell_z = math.floor(sz)?&lt;br /&gt;&lt;br /&gt;	local offset_x, offset_y &lt;br /&gt;	-- add offset_z -- no idea how this integrates with: for offset_z=-1,1 do ... add nest?&lt;br /&gt;	-- in nest, add dz = cell_z + offset_z + get_noise(?) or replace z value in dx/dy get_noise with cell_z + offset_z?&lt;br /&gt;	local min_dist = 100&lt;br /&gt;	for offset_x=-1,1 do&lt;br /&gt;		for offset_y=-1,1 do&lt;br /&gt;			local dx = cell_x + offset_x + get_noise(cell_x + offset_x, cell_y + offset_y, 0)&lt;br /&gt;			local dy = cell_y + offset_y + get_noise(cell_x + offset_x, cell_y + offset_y, 1)&lt;br /&gt;			local dist = math.sqrt((sx - dx)^2 + (sy - dy)^2) -- add in (sz - dz)^2 somehow? get cube root somehow?&lt;br /&gt;			min_dist = math.min(dist, min_dist) -- not even a clue here&lt;br /&gt;		end&lt;br /&gt;	end&lt;br /&gt;&lt;br /&gt;	local a = 1&lt;br /&gt;	min_dist = 1.0 - min_dist&lt;br /&gt;	return min_dist, min_dist, min_dist, a&lt;br /&gt;	-- obviously, this is  changed from v to min_dist for each channel&lt;br /&gt;		-- return v,v,v,1&lt;br /&gt;end;[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Wed, 06 Jan 2021 14:25:03 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I've been scouring the web for help on Worley noise, but the examples are in different scripting or coding languages and are nowhere near as succinct and clear as the API script I got from the Noise API page on the FF site. I'll keep looking over what I find, but I'm getting more new questions than answers. For example, how to implement different distance formulas for Euclidean, Manhattan, Chebyshev (sp?), etc. &lt;br /&gt;&lt;br /&gt;These are the key to the various types of Worley noise you can get. A great overview of this is in the following video: &lt;a href=&quot;https://www.youtube.com/watch?v=4066MndcyCk&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Coding in the Cabana 4: Worley Noise&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The video mentions several online resources you'd come across searching the web, which I've seen (I can retrieve the links if prompted, but again, they're not terribly hard to find). The real trick is really understanding what these pages contain. It's really quite the rabbit hole. To those who have become knowledgeable about this stuff, how did you learn it? I don't think you can google your way to expertise. If there are more explicit tutorials and examples out there, they're not turning up in my searches. I will keep sharing anything I learn, as I go, however.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Wed, 06 Jan 2021 16:06:19 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Well, my &quot;analysis&quot; of Worley noise all falls apart the instant I finally notice I can't reference the global value z... unlike the x,y args in the get_sample(), it simply doesn't exist. So obvious it slipped past me entirely that the z coordinate I'm thinking of is only introduced in the noise function. &lt;br /&gt;&lt;br /&gt;So, yeah, just ignore that whole post.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Wed, 06 Jan 2021 17:01:33 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;A little progress... I was partly on the right track with my analysis, after all. Once I provided a z coordinate, I was able to generate 3d Worley noise. It's still cartesian, rather than spherical, but the feature points used to calculate the distances are now arranged in x,y,z coordinate space. &lt;br /&gt;&lt;br /&gt;Here's the code:&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;	MIN_SCALE = 0.01&lt;br /&gt;	scale = math.max(MIN_SCALE, get_slider_input(SCALE) / 2)&lt;br /&gt;	set_noise_seed(get_intslider_input(NOISE_SEED))&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	local z_coord = get_sample_grayscale(x, y, Z_COORDINATE)&lt;br /&gt;	local sx, sy = x / scale , y / scale&lt;br /&gt;	local sz = z_coord / scale&lt;br /&gt;	local cell_x, cell_y = math.floor(sx), math.floor(sy)&lt;br /&gt;	local cell_z = math.floor(sz)&lt;br /&gt;&lt;br /&gt;	local offset_x, offset_y, offset_z&lt;br /&gt;	local min_dist = 100&lt;br /&gt;	for offset_x=-1,1 do&lt;br /&gt;		for offset_y=-1,1 do&lt;br /&gt;			for offset_z=-1,1 do&lt;br /&gt;				local dx = cell_x + offset_x + get_noise(cell_x + offset_x, cell_y + offset_y, cell_z + offset_z)&lt;br /&gt;				local dy = cell_y + offset_y + get_noise(cell_x + offset_x, cell_y + offset_y, cell_z + offset_z)&lt;br /&gt;				local dz = cell_z + offset_z + get_noise(cell_x + offset_x, cell_y + offset_y, cell_z + offset_z)&lt;br /&gt;				local dist = math.sqrt((sx - dx)^2 + (sy - dy)^2 + (sz - dz)^2)&lt;br /&gt;				min_dist = math.min(dist, min_dist)&lt;br /&gt;			end&lt;br /&gt;		end&lt;br /&gt;	end&lt;br /&gt;&lt;br /&gt;	local a = 1&lt;br /&gt;	min_dist = 1.0 - min_dist&lt;br /&gt;	return min_dist, min_dist, min_dist, a&lt;br /&gt;end;[/CODE]&lt;br /&gt;&lt;br /&gt;Here's the output I got:&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Wed, 06 Jan 2021 18:02:10 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;More progress! Once I had a bit more of a handle on 3d Worley noise (above), I was able to work out how to integrate emme's spherical approach. I'm not sure if &quot;local nz = math.cos(y) * z&quot; is really, technically, the right way to do this, but it works, with x,y remapped the default way. I was pretty surprised when it worked. I guess I'm starting to understand the math better, though I'm sure the research I've done has helped get it through my head. &lt;br /&gt;&lt;br /&gt;Scaling needed a little adjusting, and the multiplier I went with doesn't zoom in quite as far as it could. I just liked seeing a few cells at the maximum Scale. I'll share the ffxml in my next post. I still need to figure out how to address the nth point as a variable, to get other permutations, i.e. 2nd closest, 3rd closest, etc. point. I also need to figure out how to apply the other distance formulas for Manhattan, Chebyshev, etc. That's where the other Worley type noises we're familiar come from, with formula variations. So, still work to do!&lt;br /&gt;&lt;br /&gt;Here's the code:&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;	MIN_SCALE = 0.01&lt;br /&gt;	scale = math.max(MIN_SCALE, get_slider_input(SCALE) / 2) * 5&lt;br /&gt;	set_noise_seed(get_intslider_input(NOISE_SEED))&lt;br /&gt;	aspect = OUTPUT_HEIGHT / OUTPUT_WIDTH * 2&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	local x = x * aspect * math.pi&lt;br /&gt;	local y = y * math.pi&lt;br /&gt;	local z = get_sample_grayscale(x, y, Z_COORDINATE)&lt;br /&gt;	local nx = math.cos(x) * math.sin(y) &lt;br /&gt;	local ny = math.sin(x) * math.sin(y) &lt;br /&gt;	local nz = math.cos(y) * z&lt;br /&gt;	local sx, sy, sz = nx / scale , ny / scale, nz / scale&lt;br /&gt;	local cell_x, cell_y, cell_z = math.floor(sx), math.floor(sy), math.floor(sz)&lt;br /&gt;&lt;br /&gt;	local offset_x, offset_y, offset_z&lt;br /&gt;	local min_dist = 100&lt;br /&gt;	for offset_x=-1,1 do&lt;br /&gt;		for offset_y=-1,1 do&lt;br /&gt;			for offset_z=-1,1 do&lt;br /&gt;				local dx = cell_x + offset_x + get_noise(cell_x + offset_x, cell_y + offset_y, cell_z + offset_z)&lt;br /&gt;				local dy = cell_y + offset_y + get_noise(cell_x + offset_x, cell_y + offset_y, cell_z + offset_z)&lt;br /&gt;				local dz = cell_z + offset_z + get_noise(cell_x + offset_x, cell_y + offset_y, cell_z + offset_z)&lt;br /&gt;				local dist = math.sqrt((sx - dx)^2 + (sy - dy)^2 + (sz - dz)^2)&lt;br /&gt;				min_dist = math.min(dist, min_dist)&lt;br /&gt;			end&lt;br /&gt;		end&lt;br /&gt;	end&lt;br /&gt;&lt;br /&gt;	local a = 1&lt;br /&gt;	min_dist = 1.0 - min_dist&lt;br /&gt;	return min_dist, min_dist, min_dist, a&lt;br /&gt;end;[/CODE] &lt;br /&gt;&lt;br /&gt;And here's the example output:&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Wed, 06 Jan 2021 19:00:38 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Okay, I went ahead and added map inputs for Foreground/Background, and a Profile curve. The next step would be to implement Offset X/Y/Z, Detail and Distortion like my Spherical Perlin, but I'm not sure how they'd fit into the structure of my Spherical Cell Noise. I may have to see if emme has some advice, there, before proceeding. I'll skip the code this time and just share the output example. You can get the Map Script from the ffxml I'll be posting right after this.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Wed, 06 Jan 2021 19:01:35 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;One note of warning, the Z Coordinate is an HDR grayscale input, but it really should be a Value input; plugging in a grayscale image will give you a sort of tiled distortion, so just use it like a Value slider.&lt;br /&gt;&lt;br /&gt;Here's my current work file:&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Thu, 07 Jan 2021 14:59:32 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;In the hope of adding Detail and Distortion, I've tried a few things, including making a get_worley_noise() function, but my inexperience with Lua, or rustiness with coding and scripting in general, have been tripping me up. With the function, I'm having trouble with referring x,y,z parameters to the function and returning them as x,y,z values to the get_sample() that calls it. As for Detail and Distortion, I'm not sure where to apply the modifiers so they'll have the desired effect. I'm mostly breaking the distance mapping, in the way's I've tried so far. I'm pretty talented at breaking code, as opposed to fixing it. So, if there are any willing volunteers, I'll leave those objectives out there for anyone interested in lending a hand. I wish I was good enough at this to do it on my own, but I'm relying mostly on my intuition and scripting doesn't lend itself to intuitive approaches very often.&lt;br /&gt;&lt;br /&gt;Oh, since a bit part of the goal here is learning, along the way, I'd be interested in any help with Lua. If you just post a sample function like what I'm after, I'm game to try and apply the lesson to my goal, myself. No, the forum is not seeing a lot of traffic, so it might take a while for anyone to bite. I'll keep trying until help arrives or I eventually figure it out. It got me halfway where I wanted with Spherical Worley Noise. Help is always appreciated, though.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Thu, 07 Jan 2021 16:39:09 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I guess I spoke too soon. My get_worley_noise() function works after all. I just had some issue with the editing I was doing at the original time that was throwing up nil errors. Before scrapping the idea, I made one last attempt with a fresh cut-and-paste into the script editor, and it worked. I must have typoed a variable somewhere, before. I can never spot them. So, here's the script using the function (I'll see if there are other things I can do as far as Details and Distortion,  now that I have this working):&lt;br /&gt;&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;	MIN_SCALE = 0.01&lt;br /&gt;	scale = math.max(MIN_SCALE, get_slider_input(SCALE) / 2)&lt;br /&gt;	set_noise_seed(get_intslider_input(NOISE_SEED))&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	local a = 1&lt;br /&gt;	z = get_sample_grayscale(x, y, Z_COORDINATE)&lt;br /&gt;	&lt;br /&gt;	v = get_worley_noise(x,y,z)&lt;br /&gt;&lt;br /&gt;	return v,v,v,a&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_worley_noise(x,y,z)&lt;br /&gt;	local sx, sy, sz = x / scale , y / scale, z / scale&lt;br /&gt;	local cell_x, cell_y, cell_z = math.floor(sx), math.floor(sy), math.floor(sz)&lt;br /&gt;&lt;br /&gt;	local offset_x, offset_y, offset_z&lt;br /&gt;	local min_dist = 100&lt;br /&gt;	for offset_x=-1,1 do&lt;br /&gt;		for offset_y=-1,1 do&lt;br /&gt;			for offset_z=-1,1 do&lt;br /&gt;				local dx = cell_x + offset_x + get_noise(cell_x + offset_x, cell_y + offset_y, cell_z + offset_z)&lt;br /&gt;				local dy = cell_y + offset_y + get_noise(cell_x + offset_x, cell_y + offset_y, cell_z + offset_z)&lt;br /&gt;				local dz = cell_z + offset_z + get_noise(cell_x + offset_x, cell_y + offset_y, cell_z + offset_z)&lt;br /&gt;				local dist = math.sqrt((sx - dx)^2 + (sy - dy)^2 + (sz - dz)^2)&lt;br /&gt;				min_dist = math.min(dist, min_dist)&lt;br /&gt;			end&lt;br /&gt;		end&lt;br /&gt;	end&lt;br /&gt;	min_dist = 1.0 - min_dist&lt;br /&gt;	return min_dist&lt;br /&gt;end;[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Thu, 07 Jan 2021 17:29:23 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Yay! Persistence pays off!&lt;br /&gt;&lt;br /&gt;Once I had my Worley noise isolated, the previous approach to Detail and Distortion worked again. I now have my Spherical Cell Noise module caught up to my Spherical Perlin Noise. I'm going to tinker with it a bit more, before posting the ffxml, but here's the final script and a preview of the output:&lt;br /&gt;&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;	oct_max = get_intslider_input(OCTAVES)&lt;br /&gt;	MIN_SCALE = 0.01&lt;br /&gt;	scale = math.max(MIN_SCALE, get_slider_input(SCALE) / 2) * 5&lt;br /&gt;	set_noise_seed(get_intslider_input(NOISE_SEED))&lt;br /&gt;	aspect = OUTPUT_HEIGHT / OUTPUT_WIDTH * 2&lt;br /&gt;	if (get_checkbox_input(HDR)) then&lt;br /&gt;		hdr = true&lt;br /&gt;	else&lt;br /&gt;		hdr = false&lt;br /&gt;	end&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	local r, g, b, a = get_sample_map(x, y, BACKGROUND)&lt;br /&gt;	local r2, g2, b2, a2 = get_sample_map(x, y, FOREGROUND)&lt;br /&gt;	local vosx = get_sample_grayscale(x, y, OFFSET_X)&lt;br /&gt;	local vosy = get_sample_grayscale(x, y, OFFSET_Y)&lt;br /&gt;	local vosz = get_sample_grayscale(x, y, OFFSET_Z)&lt;br /&gt;	local amp = 1&lt;br /&gt;	local s = scale&lt;br /&gt;	local detail = 3.75 - get_sample_grayscale(x, y, DETAIL) * 2 + 0.01&lt;br /&gt;	local distortion = get_sample_grayscale(x, y, DISTORTION) * 2&lt;br /&gt;	local x = x * aspect * math.pi&lt;br /&gt;	local y = y * math.pi&lt;br /&gt;	local z = get_sample_grayscale(x, y, Z_COORDINATE)&lt;br /&gt;	local nx = math.cos(x) * math.sin(y) + vosx&lt;br /&gt;	local ny = math.sin(x) * math.sin(y) + vosy &lt;br /&gt;	local nz = math.cos(y) * z + vosz&lt;br /&gt;	for oct = 1, oct_max do&lt;br /&gt;		local d1 = get_worley_noise(nx+1,ny,nz,s) * distortion&lt;br /&gt;		local d2 = get_worley_noise(nx+2,ny,nz,s) * distortion&lt;br /&gt;		local d3 = get_worley_noise(nx+3,ny,nz,s) * distortion&lt;br /&gt;		if oct == 1 then v = get_worley_noise(nx+d1,ny+d2,nz+d3,s) else&lt;br /&gt;			v = (v + get_worley_noise(nx+d1/oct,ny+d2/oct,nz+d3/oct,s) * amp ) / (1 + amp)&lt;br /&gt;		end&lt;br /&gt;		nz = nz * 2&lt;br /&gt;		s = s / 2&lt;br /&gt;		amp = amp / detail&lt;br /&gt;	end&lt;br /&gt;	v = get_sample_curve(x,y,v,PROFILE)&lt;br /&gt;	local opacity = v &lt;br /&gt;	r, g, b, a = blend_normal(r, g, b, a, r2, g2, b2, a2, opacity, hdr)&lt;br /&gt;	return r, g, b, a&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_worley_noise(x,y,z,s)&lt;br /&gt;	local sx, sy, sz = x / s , y / s, z / s&lt;br /&gt;	local cell_x, cell_y, cell_z = math.floor(sx), math.floor(sy), math.floor(sz)&lt;br /&gt;&lt;br /&gt;	local offset_x, offset_y, offset_z&lt;br /&gt;	local min_dist = 100&lt;br /&gt;	for offset_x=-1,1 do&lt;br /&gt;		for offset_y=-1,1 do&lt;br /&gt;			for offset_z=-1,1 do&lt;br /&gt;				local dx = cell_x + offset_x + get_noise(cell_x + offset_x, cell_y + offset_y, cell_z + offset_z)&lt;br /&gt;				local dy = cell_y + offset_y + get_noise(cell_x + offset_x, cell_y + offset_y, cell_z + offset_z)&lt;br /&gt;				local dz = cell_z + offset_z + get_noise(cell_x + offset_x, cell_y + offset_y, cell_z + offset_z)&lt;br /&gt;				local dist = math.sqrt((sx - dx)^2 + (sy - dy)^2 + (sz - dz)^2)&lt;br /&gt;				min_dist = math.min(dist, min_dist)&lt;br /&gt;			end&lt;br /&gt;		end&lt;br /&gt;	end&lt;br /&gt;	min_dist = 1.0 - min_dist&lt;br /&gt;	return min_dist&lt;br /&gt;end;[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Thu, 07 Jan 2021 21:39:07 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Well, I did a little tinkering with my spherically mapped noises and submitted the final results to the Library. You should see them popping up in a few days, at most. The only thing I didn't really do, do to my lack of experience, was optimize the distance algorithms for the Worley noise. To do that, I have to use a sorted table and do a little more searching on the subject of Worley noises. In both cases, I hope to learn what I need to, since I still want to make other types of spherically mapped noise. I figured the work I've already done might help someone else if I made them available in the Library.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Fri, 08 Jan 2021 14:45:55 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I'm kind of at a crossroads, with this project. I've gone about as far as I can working with the API Noise and valuable help fr om emme. Now I'm confronted with the challenges I discovered in the process of researching noise generation online. So, before starting anything today, I'm taking a moment to organize some of my thoughts. I'll begin with the loose threads I've already mentioned.&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;I still need to figure out how to address the nth point as a variable, to get other permutations, i.e. 2nd closest, 3rd closest, etc. point. I also need to figure out how to apply the other distance formulas for Manhattan, Chebyshev, etc. That's where the other Worley type noises we're familiar come from, with formula variations. So, still work to do!&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;And:&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;The only thing I didn't really do, do to my lack of experience, was optimize the distance algorithms for the Worley noise. To do that, I have to use a sorted table and do a little more searching on the subject of Worley noises. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;The problem I'm having has to do with a feature of Worley noise I've seen in every example, except for the API Worley noise I actually used. In most implementations of Worley noise, there is a set of steps devoted to creating, distributing and querying the feature points, which are distance mapped in Euclidean, Manhattan, Chebyshev, etc. method. The API Worley Noise does not seem to openly address that step. I can't see where it determines which point is closest to a given point. I'd have to know that to impement a QuadTree -- the optimization I mentioned last. I'm pretty sure a QuadTree could be implemented in Lua; the structure is similar to Tech Noise Scrippet shared in the forums by ThreeDee (I can't find the thread at the moment, but I'll attach a sample image.&lt;b&gt;Edit:&lt;/b&gt; You can find it &lt;a href=&quot;https://www.filterforge.com/upload/forum/upload/7fc/Tech%20Noise%20Scrippet.ffxml&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;) There are other variations of Cell noise created by mapping to the nth closest point (1st, 2nd, 3rd, etc.). Those are also dependent on identifying and sorting seed points, by relative distance. &lt;br /&gt;&lt;br /&gt;It's unfortunate that I'm such a novice at graphics scripting; I'm asking for help a lot, which has to bother people at times. I do make progress on my own, provided I have something to lean on, wh ere my own expertise is nil. I do look for answers outside the forum, but there are some very smart people here who do help out on occasion, So, I'll keep asking. But in a lot of ways, I'm flooding the forum (on my own thread, so why not?) mostly to keep track of what I'm doing, and how I'm doing it. If it helps others, fantastic. If it's annoying, well, I'm sorry for that. It gets me through, day to day, though, so it's worth it to me.&lt;br /&gt;&lt;br /&gt;If you're still reading, and feel helpful (and of course have the knowledge to share and time to share it) I'd like to see other noise examples roughly on par with the API Worley Noise. I do wish FF had provided scripted examples for each of the Worley-based noises in FF. Collecting and preserving those here is one of the objectives of this thread. I think that's everything on my mind this morning. Today is going to be spent surfing for noise algorithms I can, hopefully, adapt for this project. &lt;br /&gt;&lt;br /&gt;TTFN&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Sat, 09 Jan 2021 14:41:27 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;So I finally stumbled across this thread -- Home &amp;gt; Forums &amp;gt; Beta 10.0 &amp;gt;  &lt;a href=&quot;https://www.filterforge.com/forum/read.php?FID=17&amp;TID=7344&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Math: F1, F2, F3 + noise&lt;/a&gt; -- which clarified the whole F1, F2, F3 and Euclidian Distance, Manhattan Distance, or Chebyshev Distance terminology for the internal Worley noises. So now all I need is a script example for implementing each of these features in my spherical noise generator.&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;No. F1 is the closest feature point, F2 is the second closest point, F3 is the third closest point etc. (closest means &quot;closest to the current sample coordinates). For every sample, the Worley noise calculates all feature points near the sample point, then sorts them by the distance to the sample point -- where the distance is not necessarily Euclidean.&lt;br /&gt;&lt;br /&gt;Various Worley-based components use different distance functions. IIRC, Blocks uses Chebyshev, Pyramids uses Manhattan, Stones uses Superquadratic, Techno uses Manhattan or Chebyshev, Cells and Chaffs are Euclidean or Superquadratic.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;I could not post a response in the Beta 10.0 thread, and it's already 11 years old, according to the last post, so it's a bit of a stretch, but I'm hoping to catch Vladimir Golovin's attention with this request for additional noise APIs to help with my project. I don't know if it really counts as a Feature Request, so I've held off on starting that kind of thread. I'll keep studying and trying to figure this out on my own, but I'm thinking I'll have to start over from scratch. The implementation of Worley noise I find elsewhere is done very differently, exposing the points to nth order sorting. I'm still looking for examples of other distance functions. I find references to them, but no examples of the formulas themselves in use.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Sat, 09 Jan 2021 18:51:14 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Another victory for persistence! I had been looking for examples of Worley using different distance calculations when I should have just googled the four types I've come across: Euclidean, Manhattan, Chebyshev and Minkowski. That little shift in focus got me the results I was hoping for, and each of the formulas (with a partial exception for Minkowski) boiled down to one line of code.&lt;br /&gt;&lt;br /&gt;I tested each one out and got decent results, though I'm clearly still missing whatever produces chaffs or stones. I did not find anything yet on superquadratic distance calculations. I did run into an odd problem when I tried to make the different distance methods controllable by an intslider. The &quot;if&quot; conditions generated a script error, saying &quot;attempt to compare number with nil&quot;. I did a little testing assigning the intslider to set different rgba values and it worked outside the &quot;for&quot; loop, but not when it was inside it where the distance mapping needs to occur. Here's a simplified version of the script that's giving me trouble. Maybe someone else can figure out, or knows, what the problem is. Of course, I can just make a different map script for each type of distance mapping. It just seems like I should be able to switch modes in the same script.&lt;br /&gt;&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;	-- v.002&lt;br /&gt;	MIN_SCALE = 0.01&lt;br /&gt;	scale = math.max(MIN_SCALE, get_slider_input(SCALE) / 2) * 5&lt;br /&gt;	set_noise_seed(get_intslider_input(NOISE_SEED))&lt;br /&gt;	aspect = OUTPUT_HEIGHT / OUTPUT_WIDTH * 2&lt;br /&gt;	dtype = get_intslider_input(DISTANCE_TYPE)&lt;br /&gt;	p = get_intslider_input(P)&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	local x = x * aspect * math.pi&lt;br /&gt;	local y = y * math.pi&lt;br /&gt;	local z = get_sample_grayscale(x, y, Z_COORDINATE)&lt;br /&gt;	local nx = math.cos(x) * math.sin(y) &lt;br /&gt;	local ny = math.sin(x) * math.sin(y) &lt;br /&gt;	local nz = math.cos(y) * z&lt;br /&gt;	local sx, sy, sz = nx / scale , ny / scale, nz / scale&lt;br /&gt;	local cell_x, cell_y, cell_z = math.floor(sx), math.floor(sy), math.floor(sz)&lt;br /&gt;&lt;br /&gt;	local offset_x, offset_y, offset_z&lt;br /&gt;	local min_dist = 100&lt;br /&gt;	for offset_x=-1,1 do&lt;br /&gt;		for offset_y=-1,1 do&lt;br /&gt;			for offset_z=-1,1 do&lt;br /&gt;				local dx = cell_x + offset_x + get_noise(cell_x + offset_x, cell_y + offset_y, cell_z + offset_z)&lt;br /&gt;				local dy = cell_y + offset_y + get_noise(cell_x + offset_x, cell_y + offset_y, cell_z + offset_z)&lt;br /&gt;				local dz = cell_z + offset_z + get_noise(cell_x + offset_x, cell_y + offset_y, cell_z + offset_z)&lt;br /&gt;				if dtype == 1 then&lt;br /&gt;					r,g,b,a = 1,0,0,1&lt;br /&gt;				elseif dtype == 2 then&lt;br /&gt;					r,g,b,a = 0,1,0,1&lt;br /&gt;				elseif dtype == 3 then&lt;br /&gt;					r,g,b,a = 0,0,1,1&lt;br /&gt;				else&lt;br /&gt;					r,g,b,a = 1,1,1,1&lt;br /&gt;				end	&lt;br /&gt;				local dist = math.sqrt((sx - dx)^2 + (sy - dy)^2 + (sz - dz)^2)&lt;br /&gt;				min_dist = math.min(dist, min_dist)&lt;br /&gt;			end&lt;br /&gt;		end&lt;br /&gt;	end&lt;br /&gt;&lt;br /&gt;	-- local a = 1&lt;br /&gt;	min_dist = 1.0 - min_dist&lt;br /&gt;	-- return min_dist, min_dist, min_dist, a&lt;br /&gt;	return r,g,b,a&lt;br /&gt;end;[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 11 Jan 2021 03:01:55 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I spent the afternoon debugging my script and eventually tracked down the source of the error I was getting. By this point, I'd moved my distance calculations to their own function, so it may not technically be necessary. But, it works, so I'm leaving it in there as a sub-function of my Worley noise. In the process of debugging, I broke down what each part of the script was doing with comments. I'm leaving those in for the moment too, since I was left with a couple questions I still need answered, or rather parts that I hope someone else can explain. &lt;br /&gt;&lt;br /&gt;When I got frustrated, I took a break and got the Contrast snippet I posted earlier working, so I can add that in next. I'll be reexamining the API Perlin Noise method of doing Roughness next, too. &lt;br /&gt;&lt;br /&gt;For now, though, I'll post the new Spherical Worley Noise script, which gives the option of using Euclidean, Manhattan, Chebyshev or Minkowski distance mapping. My work file is getting a bit cluttered, and I'll eventually upd ate my submissions to the Library with the final versions I come up with. If someone really wants to see an ffxml for this version (and save themselves the trouble of configuring inputs for the script I'm posting) then I'll drop a copy of the Map Script into a new file and post it.&lt;br /&gt;&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;	-- v.006.5&lt;br /&gt;	-- added distance mapping - Euclidean, Manhattan, Chebyshev, Minkowski&lt;br /&gt;	-- prepare global noise constants&lt;br /&gt;	oct_max = get_intslider_input(OCTAVES)&lt;br /&gt;	set_noise_seed(get_intslider_input(NOISE_SEED))&lt;br /&gt;	-- adjust for spherical mapping - constant&lt;br /&gt;	aspect = OUTPUT_HEIGHT / OUTPUT_WIDTH * 2&lt;br /&gt;	dtype = get_intslider_input(DISTANCE_TYPE)&lt;br /&gt;	p = get_intslider_input(P)&lt;br /&gt;	--- set hdr state&lt;br /&gt;	if (get_checkbox_input(HDR)) then&lt;br /&gt;		hdr = true&lt;br /&gt;	else&lt;br /&gt;		hdr = false&lt;br /&gt;	end&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	-- get map inputs&lt;br /&gt;	local r, g, b, a = get_sample_map(x, y, BACKGROUND)&lt;br /&gt;	local r2, g2, b2, a2 = get_sample_map(x, y, FOREGROUND)&lt;br /&gt;	-- get offset map inputs or values&lt;br /&gt;	local vosx = get_sample_grayscale(x, y, OFFSET_X)&lt;br /&gt;	local vosy = get_sample_grayscale(x, y, OFFSET_Y)&lt;br /&gt;	local vosz = get_sample_grayscale(x, y, OFFSET_Z)&lt;br /&gt;	-- initialize noise amplitude&lt;br /&gt;	local amp = 1&lt;br /&gt;	-- get scale map or value and prevent s = 0&lt;br /&gt;	local s = get_sample_grayscale(x, y, SCALE)/2 * 5&lt;br /&gt;	if s == 0 then&lt;br /&gt;		s = 0.001&lt;br /&gt;	end&lt;br /&gt;	-- get detail and distortion map inputs or values&lt;br /&gt;	local detail = 3.75 - get_sample_grayscale(x, y, DETAIL) * 2 + 0.01&lt;br /&gt;	local distortion = get_sample_grayscale(x, y, DISTORTION) * 2&lt;br /&gt;	-- remap to sphere, get value for z &lt;br /&gt;	-- map input not viable, but value input necessary&lt;br /&gt;	local x = x * aspect * math.pi&lt;br /&gt;	local y = y * math.pi&lt;br /&gt;	local z = get_sample_grayscale(x, y, Z_COORDINATE)&lt;br /&gt;	local nx = math.cos(x) * math.sin(y) + vosx&lt;br /&gt;	local ny = math.sin(x) * math.sin(y) + vosy &lt;br /&gt;	local nz = math.cos(y) * z + vosz&lt;br /&gt;	&lt;br /&gt;	-- get and distort each octave of spheremapped noise &lt;br /&gt;	for oct = 1, oct_max do&lt;br /&gt;		local d1 = get_worley_noise(nx+1,ny,nz,s) * distortion&lt;br /&gt;		local d2 = get_worley_noise(nx+2,ny,nz,s) * distortion&lt;br /&gt;		local d3 = get_worley_noise(nx+3,ny,nz,s) * distortion&lt;br /&gt;		-- modify 1st octave fully&lt;br /&gt;		-- then modify each octave's frequency and amplitude proportionately&lt;br /&gt;		if oct == 1 then v = get_worley_noise(nx+d1,ny+d2,nz+d3,s) else&lt;br /&gt;			v = (v + get_worley_noise(nx+d1/oct,ny+d2/oct,nz+d3/oct,s) * amp ) / (1 + amp)&lt;br /&gt;		end&lt;br /&gt;		nz = nz * 2&lt;br /&gt;		-- decrease scale for next octave&lt;br /&gt;		s = s / 2&lt;br /&gt;		-- decrease amplitude for next octave&lt;br /&gt;		amp = amp / detail&lt;br /&gt;	end&lt;br /&gt;	--- get profile curve - internal tonemapping&lt;br /&gt;	v = get_sample_curve(x,y,v,PROFILE)&lt;br /&gt;	-- set opacity to noise values&lt;br /&gt;	local opacity = v &lt;br /&gt;	-- blend foreground with background&lt;br /&gt;	r, g, b, a = blend_normal(r, g, b, a, r2, g2, b2, a2, opacity, hdr)&lt;br /&gt;	return r, g, b, a&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_worley_noise(x,y,z,s)&lt;br /&gt;	-- adjust x,y,z for scale&lt;br /&gt;	local sx, sy, sz = x / s , y / s, z / s&lt;br /&gt;	-- partition x,y,z into &quot;integer&quot; cells&lt;br /&gt;	local cell_x, cell_y, cell_z = math.floor(sx), math.floor(sy), math.floor(sz)&lt;br /&gt;	-- create offset variables for x,y,z&lt;br /&gt;	local offset_x, offset_y, offset_z&lt;br /&gt;	-- se t benchmark minimum distance&lt;br /&gt;	local min_dist = 10000&lt;br /&gt;	-- nested loop through x,y,z coordinate space via incremental offsets each  &lt;br /&gt;	for offset_x=-1,1 do&lt;br /&gt;		for offset_y=-1,1 do&lt;br /&gt;			for offset_z=-1,1 do&lt;br /&gt;				-- what is really happening here?&lt;br /&gt;				local dx = cell_x + offset_x + get_noise(cell_x + offset_x, cell_y + offset_y, cell_z + offset_z)&lt;br /&gt;				local dy = cell_y + offset_y + get_noise(cell_x + offset_x, cell_y + offset_y, cell_z + offset_z)&lt;br /&gt;				local dz = cell_z + offset_z + get_noise(cell_x + offset_x, cell_y + offset_y, cell_z + offset_z)&lt;br /&gt;				-- option: create array of distances to seed points here?&lt;br /&gt;				-- option: get distance of random point from current point?&lt;br /&gt;				-- option: assign distances to array of distances for nth point distances?&lt;br /&gt;				local dist = distcalc(sx,sy,sz,dx,dy,dz) &lt;br /&gt;				-- compare distance to benchmark minimum distance for lesser value&lt;br /&gt;				min_dist = math.min(dist, min_dist)&lt;br /&gt;			end&lt;br /&gt;		end&lt;br /&gt;	end&lt;br /&gt;	-- what does this adjustment accomplish?&lt;br /&gt;	min_dist = 1.0 - min_dist&lt;br /&gt;	-- return value of current point&lt;br /&gt;	return min_dist&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function distcalc(sx,sy,sz,dx,dy,dz)&lt;br /&gt;	local dist = 0 -- returns nil value without this variable declaration&lt;br /&gt;	if dtype == 1 then&lt;br /&gt;		-- Euclidean &lt;br /&gt;		dist = math.sqrt((sx - dx)^2 + (sy - dy)^2 + (sz - dz)^2)	&lt;br /&gt;	elseif dtype == 2 then&lt;br /&gt;		-- Chebyshev&lt;br /&gt;		dist = math.max(math.abs(sx - dx), math.abs(sy - dy), math.abs(sz - dz))	&lt;br /&gt;	elseif dtype == 3 then&lt;br /&gt;		-- Manhattan&lt;br /&gt;		dist = (math.abs(sx - dx) + math.abs(sy - dy) + math.abs(sz - dz)) / 1.5	&lt;br /&gt;	else&lt;br /&gt;		-- Minkowski &lt;br /&gt;		local pe = 1/p&lt;br /&gt;		dist = (math.abs(sx - dx)^p + math.abs(sy - dy)^p + math.abs(sz - dz)^p)^pe&lt;br /&gt;	end	&lt;br /&gt;	return dist &lt;br /&gt;end;[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 11 Jan 2021 15:33:46 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Okay, I hit a stopping point early today. I was seeing what I could accomplish working with the API Multi-Octave Perlin and discovered that the way it handles Roughness is not compatible with spherical mapping. Remapping was not that hard, but there is a stretching artifact along the &quot;equator&quot; that, at best, could only be minimized -- not eliminated. There also seems to be an issue with scale settings for completely zoomed in. What worked in Cartesian space, without modifications to the input scale, does not work even with modifications to scale in the sphere map. &lt;br /&gt;&lt;br /&gt;I was able to map Roughness and Contrast (which was easy enough to add), so there's at least a v.001 that works. The ffxml has a v.002 started, current to where I left off. I'll post the code and file for anyone who wants to take a crack at this. I'm sure there are many people on the forums who would fare much better than I.&lt;br /&gt;&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;--	v.002&lt;br /&gt;--	constants&lt;br /&gt;	AMPLITUDE_CORRECTION_FACTOR = 1.731628995&lt;br /&gt;	ROUGHNESS_THRESHOLD = 0.00001&lt;br /&gt;	REMAINDER_THRESHOLD = 0.00001&lt;br /&gt;	aspect = OUTPUT_HEIGHT / OUTPUT_WIDTH * 2&lt;br /&gt;	set_perlin_noise_seamless(SEAMLESS)&lt;br /&gt;	set_perlin_noise_seamless_region(SEAMLESS_REGION_WIDTH, SEAMLESS_REGION_HEIGHT)&lt;br /&gt;&lt;br /&gt;--	input values&lt;br /&gt;	details = get_slider_input(DETAILS) * 10 + 1&lt;br /&gt;	OCTAVES_COUNT = math.floor(details)&lt;br /&gt;	NOISE_SIZE = get_slider_input(SCALE)&lt;br /&gt;	set_perlin_noise_seed(get_intslider_input(NOISE_VARIATION))&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	local r, g, b, a = get_sample_map(x, y, BACKGROUND)&lt;br /&gt;	local noise_r, noise_g, noise_b, noise_a = get_sample_map(x, y, NOISE)&lt;br /&gt;&lt;br /&gt;	local remainder = details - OCTAVES_COUNT&lt;br /&gt;	if (remainder &amp;gt; REMAINDER_THRESHOLD) then&lt;br /&gt;		OCTAVES_COUNT = OCTAVES_COUNT + 1&lt;br /&gt;	end&lt;br /&gt;	&lt;br /&gt;	local roughness = ROUGHNESS_THRESHOLD + &lt;br /&gt;		get_sample_grayscale(x, y, ROUGHNESS) * (1.0 - ROUGHNESS_THRESHOLD)&lt;br /&gt;	local contrast = (get_sample_grayscale(x, y, CONTRAST) * 2) - 1&lt;br /&gt;	local factor = (259 * (contrast + 1)) / (1 * (259 - contrast))&lt;br /&gt;	&lt;br /&gt;	OCTAVES = {}&lt;br /&gt;	local cell_size = (0.01 + NOISE_SIZE * 0.99) * 150&lt;br /&gt;	local scale = roughness&lt;br /&gt;	local octave_index&lt;br /&gt;	for octave_index = 1, OCTAVES_COUNT do&lt;br /&gt;		if (scale &amp;lt; ROUGHNESS_THRESHOLD) then&lt;br /&gt;			OCTAVES_COUNT = octave_index - 1&lt;br /&gt;			break&lt;br /&gt;		end&lt;br /&gt;		OCTAVES[octave_index] = {cell_size, scale}&lt;br /&gt;		cell_size = cell_size * 0.5&lt;br /&gt;		scale = scale * roughness&lt;br /&gt;	end&lt;br /&gt;	&lt;br /&gt;	if (remainder &amp;gt;= 0.001) then&lt;br /&gt;		OCTAVES[OCTAVES_COUNT][2] = OCTAVES[OCTAVES_COUNT][2] * remainder&lt;br /&gt;	end&lt;br /&gt;&lt;br /&gt;	NORM_FACTOR = 0&lt;br /&gt;	for octave_index = 1, OCTAVES_COUNT do&lt;br /&gt;		NORM_FACTOR = NORM_FACTOR + OCTAVES[octave_index][2] ^ 2&lt;br /&gt;	end&lt;br /&gt;	NORM_FACTOR = 1 / math.sqrt(NORM_FACTOR)&lt;br /&gt;&lt;br /&gt;	-- ins ert spheremapping calculations&lt;br /&gt;	local x = x * aspect * math.pi&lt;br /&gt;	local y = y * math.pi&lt;br /&gt;	local nx = math.cos(x) * math.sin(y) -- * scale + vosx&lt;br /&gt;	local ny = math.sin(x) * math.sin(y) -- * scale + vosy&lt;br /&gt;	-- local nz = math.cos(y) * math.pi -- * scale + vosz&lt;br /&gt;	local alpha = 0&lt;br /&gt;	&lt;br /&gt;	for octave_index = 1, OCTAVES_COUNT do&lt;br /&gt;		-- this minimizes stretching the most, still has artifacts&lt;br /&gt;		local nz = octave_index * math.cos(y) * math.pi&lt;br /&gt;		local size = OCTAVES[octave_index][1]&lt;br /&gt;		local opacity = OCTAVES[octave_index][2]&lt;br /&gt;		-- local d1 = get_perlin_noise(nx+1,ny,nz,size) -- * distortion&lt;br /&gt;		-- local d2 = get_perlin_noise(nx+2,ny,nz,size) -- * distortion&lt;br /&gt;		-- local d3 = get_perlin_noise(nx+3,ny,nz,size) -- * distortion&lt;br /&gt;		-- local noise_z = octave_index&lt;br /&gt;		-- -- ins ert spheremapped x,y,z coordinates&lt;br /&gt;		--  -- produces stretching along equator&lt;br /&gt;		alpha = alpha + opacity * (2 * get_perlin_noise(nx,ny,nz,size) - 1)&lt;br /&gt;		-- alpha = alpha + opacity * (2 * get_perlin_noise(nx+d1,ny+d2,nz+d3,size) - 1)&lt;br /&gt;	end&lt;br /&gt;	&lt;br /&gt;	alpha = (alpha * NORM_FACTOR + AMPLITUDE_CORRECTION_FACTOR) * &lt;br /&gt;		(0.5 / AMPLITUDE_CORRECTION_FACTOR)&lt;br /&gt;	local alpha = truncate(factor * (alpha - 0.5) + 0.5)&lt;br /&gt;	&lt;br /&gt;	return blend_normal(r, g, b, a, noise_r, noise_g, noise_b, noise_a, alpha)&lt;br /&gt;	-- return size,size,size,1&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function truncate(value)&lt;br /&gt;	if value &amp;lt;= 0 then value = 0 end&lt;br /&gt;	if value &amp;gt;= 1 then val ue = 1 end&lt;br /&gt;	return val ue&lt;br /&gt;end;[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 11 Jan 2021 22:51:03 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Having run into a couple problems I could not solve, at present, I went ahead and spent part of the day updating my spherical noise scripts and posting the updates. Since it could take a while for those updates to go through, I'm wrapping up by posting copies here for anyone who doesn't want to wait.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 11 Jan 2021 22:57:57 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Here is the other. It's slower, by a minute, but now offers four different variations (Euclidean, Manhattan, Chebyshev and Minkowski), as noted a couple posts ago. Manhattan gives a result most similar to Pyramids. Chebyshev falls somewhere between blocks and Techno -- and Minkowski offers a range between Euclidean (Cell noise) and Chebyhsev. Once you apply any of the possible distortions and levels of detail, they tend to become even more similar. Oh well.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Thu, 14 Jan 2021 03:54:24 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Having reached the limit of what I could do with my current level of scripting ability, I've sort of drifted off into the land of Processing.org having found a massive resource in the videos of Daniel Shiffman. Having once studied things like Java and Javascript Processing should be much easier for me to pick up and use than Lua. My experience with C/C++ is more out of date, and it's difficult to find tutorials for Lua graphics scripting. I'm hoping to be able to take some of what I learn in Processing and apply them in Lua, at which point I'll come back to projects like the one I started here.&lt;br /&gt;&lt;br /&gt;The Worley noise I created only has F1 distance mapping. I was not able to grasp how the script identified the closest feature point in its distance calculations. I will keep tabs on this thread, in case someone offers assistance with F2, F3 and F4 distance mapping. I don't know if they can apply equally to the four types of Worley noise I was able to get through different distance algorithms. That's something I'll need clarified too. I hope I'll be able to figure it all out eventually, but maybe I'll get help from the forum along the way. If either of those things happen, I'll take update my Spherical Worley Noise. If you've read through the thread this far, thank you and hopefully you found some of it useful. &lt;br /&gt;&lt;br /&gt;TTFN&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Wed, 26 Oct 2022 12:34:52 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;So, it's been a year and change since I thought about this, but I came back to it today and find the problem still stumps me: &lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;David Roberson wrote: &lt;/b&gt;&lt;br /&gt;I was seeing what I could accomplish working with the API Multi-Octave Perlin and discovered that the way it handles Roughness is not compatible with spherical mapping. Remapping was not that hard, but there is a stretching artifact along the &quot;equator&quot;... &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;I compared this to a few other noise scripts I've done or used as examples, to try and understand why this seems to happen only with Perlin noise called using get_perlin_noise().  Or rather, the version in Egret's API Perlin Noise script. The octave blending emme provided an example did not have this problem. I would be inclined to keep using that, but the Roughness just isn't as nice as Egret's. I do hope an FF team member can chime in here, since Egret's implementation was based on the FF version. &lt;br /&gt;  &lt;br /&gt;I'll post a pic of what I'm talking about, since I'm just throwing this out there again to see if someone can shed some light on why this is happening or how to fix it.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Thu, 27 Oct 2022 05:40:25 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Last night I did a bit of online research and found a different implementation of improved Perlin noise adapted for lua. So, today I worked on an update to my Perlin Spherical Noise map script. I have been able to generate a sphere and a spherical map using it. I discovered that the noise did not tile correctly as a flat plane, however, so I'm posting the code to see if anyone can suggest a way to make it properly seamless and not just repeating or completely hashed. The options to see the default presentation and my attempt to apply SEAMLESS_WIDTH and SEAMLESS_HEIGHT are commented off. &lt;br /&gt;&lt;br /&gt;[CODE]-- 3d perlin sphere  or map -- improved perlin noise&lt;br /&gt;function prepare()&lt;br /&gt; -- constants&lt;br /&gt;	-- AMPLITUDE_CORRECTION_FACTOR = 1.731628995&lt;br /&gt;		-- only used in depricated statement&lt;br /&gt;	ROUGHNESS_THRESHOLD = 0.00001&lt;br /&gt;	REMAINDER_THRESHOLD = 0.00001&lt;br /&gt;	aspect = OUTPUT_HEIGHT / OUTPUT_WIDTH * 2&lt;br /&gt;&lt;br /&gt; -- input values&lt;br /&gt;	details = get_slider_input(DETAILS) * 10 + 0.0001&lt;br /&gt;	grain = (get_slider_input(GRAIN) * 5) + 0.0001&lt;br /&gt;	OCTAVES_COUNT = math.floor(details)&lt;br /&gt;	NOISE_SIZE = math.log( get_slider_input(SCALE) + 0.0000000001) &lt;br /&gt;	-- NOISE_SIZE = (1 - get_slider_input(SCALE)) * (5 * grain) + 0.0001&lt;br /&gt;	&lt;br /&gt;-- sphere block&lt;br /&gt;	radius = get_slider_input(RADIUS)&lt;br /&gt;&lt;br /&gt;	angle = math.rad(get_angle_input(ROTATION))&lt;br /&gt;	cosa1 = math.cos(angle)&lt;br /&gt;	sina1 = math.sin(angle)&lt;br /&gt;&lt;br /&gt;	tilt = math.rad(get_angle_input(TILT))&lt;br /&gt;	cosa2 = math.cos(tilt)&lt;br /&gt;	sina2 = math.sin(tilt)&lt;br /&gt;-- end&lt;br /&gt;&lt;br /&gt;-- noise block&lt;br /&gt;	 --[[&lt;br /&gt;		&lt;a href=&quot;https://gist.githubusercontent.com/kymckay/25758d37f8e3872e1636d90ad41fe2ed/raw/1c647169a6729713f8987506b2e5c75a23b14969/perlin.lua&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;https://gist.githubusercontent.com/kym...perlin.lua&lt;/a&gt;&lt;br /&gt;		Implemented as described here:&lt;br /&gt;		&lt;a href=&quot;http://flafla2.github.io/2014/08/09/perlinnoise.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://flafla2.github.io/2014/08/09/perlinnoise.html&lt;/a&gt;&lt;br /&gt;	]]-- &lt;br /&gt;&lt;br /&gt;	perlin = {}&lt;br /&gt;	perlin.p = {}&lt;br /&gt;&lt;br /&gt;	--[[&lt;br /&gt;		-- hash lookup table as defined by Ken Perlin&lt;br /&gt;		-- this is a randomly arranged array of all numbers fr om 0 - 255 inclusive&lt;br /&gt;		local permutation = {151, 160, 137, 91, 90, 15, &lt;br /&gt;		 131, 13, 201, 95, 96, 53, 194, 233, 7, 225, 140, 36, 103, 30, 69, 142, 8, 99, 37, 240, 21, 10, 23, &lt;br /&gt;		 190, 6, 148, 247, 120, 234, 75, 0, 26, 197, 62, 94, 252, 219, 203, 117, 35, 11, 32, 57, 177, 33, &lt;br /&gt;		 88, 237, 149, 56, 87, 174, 20, 125, 136, 171, 168, 68, 175, 74, 165, 71, 134, 139, 48, 27, 166, &lt;br /&gt;		 77, 146, 158, 231, 83, 111, 229, 122, 60, 211, 133, 230, 220, 105, 92, 41, 55, 46, 245, 40, 244, &lt;br /&gt;		 102, 143, 54, 65, 25, 63, 161, 1, 216, 80, 73, 209, 76, 132, 187, 208, 89, 18, 169, 200, 196, &lt;br /&gt;		 135, 130, 116, 188, 159, 86, 164, 100, 109, 198, 173, 186, 3, 64, 52, 217, 226, 250, 124, 123, &lt;br /&gt;		 5, 202, 38, 147, 118, 126, 255, 82, 85, 212, 207, 206, 59, 227, 47, 16, 58, 17, 182, 189, 28, 42, &lt;br /&gt;		 223, 183, 170, 213, 119, 248, 152, 2, 44, 154, 163, 70, 221, 153, 101, 155, 167, 43, 172, 9, &lt;br /&gt;		 129, 22, 39, 253, 19, 98, 108, 110, 79, 113, 224, 232, 178, 185, 112, 104, 218, 246, 97, 228, &lt;br /&gt;		 251, 34, 242, 193, 238, 210, 144, 12, 191, 179, 162, 241, 81, 51, 145, 235, 249, 14, 239, 107, &lt;br /&gt;		 49, 192, 214, 31, 181, 199, 106, 157, 184, 84, 204, 176, 115, 121, 50, 45, 127, 4, 150, 254, &lt;br /&gt;		 138, 236, 205, 93, 222, 114, 67, 29, 24, 72, 243, 141, 128, 195, 78, 66, 215, 61, 156, 180&lt;br /&gt;		}&lt;br /&gt;&lt;br /&gt;		-- p is used to hash unit cube coordinates to [0, 255]&lt;br /&gt;		for i = 0, 255 do&lt;br /&gt;			convert to 0 based index table&lt;br /&gt;			perlin.p[i] = permutation[i + 1]&lt;br /&gt;			repeat the array to avoid buffer overflow in hash function&lt;br /&gt;			perlin.p[i + 256] = permutation[i + 1]&lt;br /&gt;		end&lt;br /&gt;	]]--&lt;br /&gt;&lt;br /&gt;	math.randomseed(get_intslider_input(SEED))&lt;br /&gt;	for i = 0, 255 do&lt;br /&gt;		perlin.p[i] = math.random(255)&lt;br /&gt;		perlin.p[256 + i] = perlin.p[i]&lt;br /&gt;	end&lt;br /&gt;&lt;br /&gt;	-- return range: [ - 1, 1]&lt;br /&gt;	function perlin:noise(x, y, z)&lt;br /&gt;		y = y or 0&lt;br /&gt;		z = z or 0&lt;br /&gt;&lt;br /&gt;	--[[&lt;br /&gt;		-- seamless tiling method needs revision - not part of original adaptation, attempt here produced overwhelming artifacts&lt;br /&gt;		-- check for seamlessness&lt;br /&gt;		if SEAMLESS then&lt;br /&gt;			x = x % SEAMLESS_REGION_WIDTH&lt;br /&gt;			y = y % SEAMLESS_REGION_HEIGHT&lt;br /&gt;			z = z % (SEAMLESS_REGION_WIDTH + SEAMLESS_REGION_HEIGHT) * 0.5&lt;br /&gt;		end&lt;br /&gt;	]]--&lt;br /&gt;&lt;br /&gt;		-- calculate the &quot;unit cube&quot; that the point asked will be located in&lt;br /&gt;		local xi = bit32.band(math.floor(x), 255)&lt;br /&gt;		local yi = bit32.band(math.floor(y), 255)&lt;br /&gt;		local zi = bit32.band(math.floor(z), 255)&lt;br /&gt;&lt;br /&gt;		-- next we calculate the location (from 0 to 1) in that cube&lt;br /&gt;		x = x - math.floor(x)&lt;br /&gt;		y = y - math.floor(y)&lt;br /&gt;		z = z - math.floor(z)&lt;br /&gt;&lt;br /&gt;		-- we also fade the location to smooth the result&lt;br /&gt;		local u = self.fade(x)&lt;br /&gt;		local v = self.fade(y)&lt;br /&gt;		local w = self.fade(z)&lt;br /&gt;&lt;br /&gt;		-- hash all 8 unit cube coordinates surrounding input coordinate&lt;br /&gt;		local p = self.p&lt;br /&gt;		local A, AA, AB, AAA, ABA, AAB, ABB, B, BA, BB, BAA, BBA, BAB, BBB&lt;br /&gt;		A = p[xi ] + yi&lt;br /&gt;		AA = p[A ] + zi&lt;br /&gt;		AB = p[A + 1 ] + zi&lt;br /&gt;		AAA = p[ AA ]&lt;br /&gt;		ABA = p[ AB ]&lt;br /&gt;		AAB = p[ AA + 1 ]&lt;br /&gt;		ABB = p[ AB + 1 ]&lt;br /&gt;&lt;br /&gt;		B = p[xi + 1] + yi&lt;br /&gt;		BA = p[B ] + zi&lt;br /&gt;		BB = p[B + 1 ] + zi&lt;br /&gt;		BAA = p[ BA ]&lt;br /&gt;		BBA = p[ BB ]&lt;br /&gt;		BAB = p[ BA + 1 ]&lt;br /&gt;		BBB = p[ BB + 1 ]&lt;br /&gt;&lt;br /&gt;		-- take the weighted average between all 8 unit cube coordinates&lt;br /&gt;		return self.lerp(w, &lt;br /&gt;			self.lerp(v, &lt;br /&gt;				self.lerp(u, &lt;br /&gt;					self:grad(AAA, x, y, z), &lt;br /&gt;					self:grad(BAA, x - 1, y, z)&lt;br /&gt;				), &lt;br /&gt;				self.lerp(u, &lt;br /&gt;					self:grad(ABA, x, y - 1, z), &lt;br /&gt;					self:grad(BBA, x - 1, y - 1, z)&lt;br /&gt;				)&lt;br /&gt;			), &lt;br /&gt;			self.lerp(v, &lt;br /&gt;				self.lerp(u, &lt;br /&gt;					self:grad(AAB, x, y, z - 1), self:grad(BAB, x - 1, y, z - 1)&lt;br /&gt;				), &lt;br /&gt;				self.lerp(u, &lt;br /&gt;					self:grad(ABB, x, y - 1, z - 1), self:grad(BBB, x - 1, y - 1, z - 1)&lt;br /&gt;				)&lt;br /&gt;			)&lt;br /&gt;		)&lt;br /&gt;	end&lt;br /&gt;&lt;br /&gt;	--[[ &lt;br /&gt;		gradient function finds dot product between pseudorandom gradient vector&lt;br /&gt;		and the vector from input coordinate to a unit cube vertex.&lt;br /&gt;	]]-- &lt;br /&gt;	perlin.dot_product = {&lt;br /&gt;		[0x0] = function(x, y, z) return x + y end, &lt;br /&gt;		[0x1] = function(x, y, z) return -x + y end, &lt;br /&gt;		[0x2] = function(x, y, z) return x - y end, &lt;br /&gt;		[0x3] = function(x, y, z) return -x - y end, &lt;br /&gt;		[0x4] = function(x, y, z) return x + z end, &lt;br /&gt;		[0x5] = function(x, y, z) return -x + z end, &lt;br /&gt;		[0x6] = function(x, y, z) return x - z end, &lt;br /&gt;		[0x7] = function(x, y, z) return -x - z end, &lt;br /&gt;		[0x8] = function(x, y, z) return y + z end, &lt;br /&gt;		[0x9] = function(x, y, z) return -y + z end, &lt;br /&gt;		[0xA] = function(x, y, z) return y - z end, &lt;br /&gt;		[0xB] = function(x, y, z) return -y - z end, &lt;br /&gt;		[0xC] = function(x, y, z) return y + x end, &lt;br /&gt;		[0xD] = function(x, y, z) return -y + z end, &lt;br /&gt;		[0xE] = function(x, y, z) return y - x end, &lt;br /&gt;		[0xF] = function(x, y, z) return -y - z end&lt;br /&gt;	}&lt;br /&gt;	function perlin:grad(hash, x, y, z)&lt;br /&gt;		return self.dot_product[bit32.band(hash, 0xF)](x, y, z)&lt;br /&gt;	end&lt;br /&gt;&lt;br /&gt;	-- fade function is used to smooth final output&lt;br /&gt;	function perlin.fade(t)&lt;br /&gt;		return t * t * t * (t * (t * 6 - 15) + 10)&lt;br /&gt;	end&lt;br /&gt;&lt;br /&gt;	function perlin.lerp(t, a, b)&lt;br /&gt;		return a + t * (b - a)&lt;br /&gt;	end&lt;br /&gt;&lt;br /&gt;	-- perlin octaves initialization&lt;br /&gt;	remainder = details - OCTAVES_COUNT&lt;br /&gt;	if (remainder &amp;gt; REMAINDER_THRESHOLD) then&lt;br /&gt;		OCTAVES_COUNT = OCTAVES_COUNT + 1&lt;br /&gt;	end&lt;br /&gt;	&lt;br /&gt;	--[[&lt;br /&gt;		local roughness = ROUGHNESS_THRESHOLD + &lt;br /&gt;			get_slider_input(ROUGHNESS) * (1.0 - ROUGHNESS_THRESHOLD)&lt;br /&gt;		&lt;br /&gt;		OCTAVES = {}&lt;br /&gt;		local cell_size = (0.01 + NOISE_SIZE * 0.99) * grain -- 5&lt;br /&gt;		local scale = roughness&lt;br /&gt;		local octave_index&lt;br /&gt;		for octave_index = 1, OCTAVES_COUNT do&lt;br /&gt;			if (scale &amp;lt; ROUGHNESS_THRESHOLD) then&lt;br /&gt;				OCTAVES_COUNT = octave_index - 1&lt;br /&gt;				break&lt;br /&gt;			end&lt;br /&gt;			OCTAVES[octave_index] = {cell_size, scale}&lt;br /&gt;			cell_size = cell_size * 2.0&lt;br /&gt;			scale = scale * roughness&lt;br /&gt;		end&lt;br /&gt;		&lt;br /&gt;		if (remainder &amp;gt;= 0.001) then&lt;br /&gt;			OCTAVES[OCTAVES_COUNT][2] = OCTAVES[OCTAVES_COUNT][2] * remainder&lt;br /&gt;		end&lt;br /&gt;&lt;br /&gt;		NORM_FACTOR = 0&lt;br /&gt;		for octave_index = 1, OCTAVES_COUNT do&lt;br /&gt;			NORM_FACTOR = NORM_FACTOR + OCTAVES[octave_index][2] ^ 2&lt;br /&gt;		end&lt;br /&gt;		NORM_FACTOR = 1 / math.sqrt(NORM_FACTOR)&lt;br /&gt;	]]--&lt;br /&gt;-- end&lt;br /&gt;	if  get_checkbox_input(MODE) then&lt;br /&gt;		mode = 1&lt;br /&gt;	else&lt;br /&gt;		mode = 2&lt;br /&gt;	end&lt;br /&gt;	--[[ &lt;br /&gt;	-- seamless tiling method needs revision - not part of original adaptation; change to &quot;else mode = 0&quot; to see default tiling &lt;br /&gt;	set_perlin_noise_seamless(SEAMLESS)&lt;br /&gt;	set_perlin_noise_seamless_region(SEAMLESS_REGION_WIDTH, SEAMLESS_REGION_HEIGHT)&lt;br /&gt;	]]-- &lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	local roughness = ROUGHNESS_THRESHOLD + &lt;br /&gt;		get_sample_grayscale(x, y, ROUGHNESS) * (1.0 - ROUGHNESS_THRESHOLD)&lt;br /&gt;	local contrast = (get_sample_grayscale(x, y, CONTRAST) * 2) - 1&lt;br /&gt;	local factor = (259 * (contrast + 1)) / (1 * (259 - contrast))&lt;br /&gt;	local n = 0&lt;br /&gt;		--[[&lt;br /&gt;			full implementation of mappped roughness and contrast requires coordinate remapping to the sphere.&lt;br /&gt;			this is already in use elsewhere, so it will be implemented after spherical map generation is complete. &lt;br /&gt;			block may move to conditional block per usage.&lt;br /&gt;		]]--&lt;br /&gt;&lt;br /&gt;	-- image generation&lt;br /&gt;	-- sphere block&lt;br /&gt;	if mode == 1 then&lt;br /&gt;		px = (x * 2.0) - 1.0&lt;br /&gt;		py = (y * 2.0) - 1.0&lt;br /&gt;		px = px / radius&lt;br /&gt;		py = py / radius&lt;br /&gt;		local len = math.sqrt((px * px) + (py * py))&lt;br /&gt;		if len &amp;gt; 1.0 then return 0, 0, 0, 0 end&lt;br /&gt;&lt;br /&gt;		z = - math.sqrt(1.0 - ((px * px) + (py * py)))&lt;br /&gt;&lt;br /&gt;		local tz = (cosa2 * z) - (sina2 * py)&lt;br /&gt;		local ty = (sina2 * z) + (cosa2 * py)&lt;br /&gt;		z = tz&lt;br /&gt;		py = ty&lt;br /&gt;&lt;br /&gt;		local tx = (cosa1 * px) - (sina1 * z)&lt;br /&gt;		local tz = (sina1 * px) + (cosa1 * z)&lt;br /&gt;		px = tx&lt;br /&gt;		z = tz&lt;br /&gt;	end&lt;br /&gt;	-- end&lt;br /&gt;&lt;br /&gt;	-- spherical map block&lt;br /&gt;	if mode == 2 then&lt;br /&gt;		local x = x * aspect * math.pi&lt;br /&gt;		local y = y * math.pi&lt;br /&gt;		nx = math.cos(x) * math.sin(y)&lt;br /&gt;		ny = math.sin(x) * math.sin(y)&lt;br /&gt;		nz = math.cos(y)&lt;br /&gt;	end&lt;br /&gt;	-- end&lt;br /&gt;&lt;br /&gt;	-- noise generation&lt;br /&gt;	OCTAVES = {}&lt;br /&gt;	local cell_size = (0.01 + NOISE_SIZE * 0.99) * grain -- 5&lt;br /&gt;	local scale = roughness&lt;br /&gt;	local octave_index&lt;br /&gt;	for octave_index = 1, OCTAVES_COUNT do&lt;br /&gt;		if (scale &amp;lt; ROUGHNESS_THRESHOLD) then&lt;br /&gt;			OCTAVES_COUNT = octave_index - 1&lt;br /&gt;			break&lt;br /&gt;		end&lt;br /&gt;		OCTAVES[octave_index] = {cell_size, scale}&lt;br /&gt;		cell_size = cell_size * 2.0&lt;br /&gt;		scale = scale * roughness&lt;br /&gt;	end&lt;br /&gt;	&lt;br /&gt;	if (remainder &amp;gt;= 0.001) then&lt;br /&gt;		OCTAVES[OCTAVES_COUNT][2] = OCTAVES[OCTAVES_COUNT][2] * remainder&lt;br /&gt;	end&lt;br /&gt;&lt;br /&gt;	NORM_FACTOR = 0&lt;br /&gt;	for octave_index = 1, OCTAVES_COUNT do&lt;br /&gt;		NORM_FACTOR = NORM_FACTOR + OCTAVES[octave_index][2] ^ 2&lt;br /&gt;	end&lt;br /&gt;	NORM_FACTOR = 1 / math.sqrt(NORM_FACTOR)&lt;br /&gt;	local octave_index &lt;br /&gt;	for octave_index = 1, OCTAVES_COUNT do&lt;br /&gt;		local size = OCTAVES[octave_index][1]&lt;br /&gt;		local opacity = OCTAVES[octave_index][2]&lt;br /&gt;		if mode == 1 then&lt;br /&gt;			n = n + opacity * perlin:noise(px * size, py * size, z * size) -- (2 * -- - 1)&lt;br /&gt;		elseif mode == 2 then&lt;br /&gt;			n = n + opacity * perlin:noise(nx * size, ny * size, nz * size) -- (2 * -- - 1)&lt;br /&gt;		else	&lt;br /&gt;			local z = octave_index&lt;br /&gt;			n = n + opacity * perlin:noise(x * size, y * size, z * size) -- (2 * -- - 1)&lt;br /&gt;		end&lt;br /&gt;	end&lt;br /&gt;	n = (n + 1.0) * 0.5&lt;br /&gt;--[[&lt;br /&gt;	n = (n * NORM_FACTOR + AMPLITUDE_CORRECTION_FACTOR) * &lt;br /&gt;		(0.5 / AMPLITUDE_CORRECTION_FACTOR)&lt;br /&gt;				-- causes blowout - getting reasonable results without it&lt;br /&gt;]]--&lt;br /&gt;	n = truncate(factor * (n - 0.5) + 0.5)&lt;br /&gt;	n = get_sample_curve(x, y, n, PROFILE)&lt;br /&gt;	return n, n, n, 1&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function truncate(value)&lt;br /&gt;	if value &amp;lt;= 0 then value = 0 end&lt;br /&gt;	if value &amp;gt;= 1 then value = 1 end&lt;br /&gt;	return value&lt;br /&gt;end;[/CODE]&lt;br /&gt;&lt;br /&gt;My attempt to impose seamlessness seems to conflict with the method used to implement octaves. It still produces noise, but in repeating blocks diminishing in octaves as well. That suggests two probable issues to resolve; first is seamless blending of the base noise, and second, getting properly scaled seamless tiling for each octave, to the lim it of octave_index. At the moment, I have no ideas on how to do that.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Thu, 27 Oct 2022 06:16:32 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Looking at the spherical Perlin I produced, I had one idea regarding the mapping required for a seamless plane; basically, I need to get mapping coordinates for a torus, which curves in 3d space to create a perfect 2d planar mapping. I'll see if I can find the right function for this, but I'm making a note of it here in case someone else wants to try this idea out.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Sat, 29 Oct 2022 10:46:05 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Since the standard Perlin Noise works for most of the things I'd need to be seamless-squared, I set that part of my scripting aside to focus on what could be done with the equirectangular sphere maps and the spherical projection I came up with so far. The goal of a good, fully procedural planet generator is still a bit of work away. I do have a nice preview of what can be done with these new map scripts. Using a downloaded Earth map, I made some very nice clouds and atmosphere using two map scripts, a few Perlin Noises (mostly to make stars and offset a Profile Gradient), a couple of curves and Scale components (to adjust the Earth map to a square workspace), and a few Math components.&lt;/p&gt;
</description>
</item>
<item><title>Assigning number identifier to white parts of black/white image</title> 
		             <dc:creator>Cato99</dc:creator> 
		             <category></category> 
		             <pubDate>Fri, 26 Aug 2022 23:45:20 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16682</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16682</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;Cato99&lt;/b&gt;, &lt;em&gt;Fri, 26 Aug 2022 23:45:20 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I would like to assign a number identifier to the white parts of a black and white image or pattern, and store the number in a script (not to be printed on the image/screen). See example images in the attached, the top row are the images I would have in Filter Forge, either through an 'image' or 'color control' component. The bottom row shows the numbers that would be assigned.&lt;br /&gt;&lt;br /&gt;Going from left to right, top to bottom, the number assigned would be consecutive for each white area. Can we identify the bounds of each white area in one go in FF? Or do I need to step through, slowly scanning - eg. The first pixel/area that is white would be assigned the Number 1, then I guess comparison of the next pixel/area (left/right/top/bottom) would need to check if there was black, and if not, assign that Number 1 as well; otherwise if there is black, skip to the next white pixel/area and assign that as Number 2, and so on.&lt;br /&gt;&lt;br /&gt;With the resulting numbers in the script, I would then create values that I can use to make each white area a different color/pattern fill/input depending on the number.&lt;br /&gt;&lt;br /&gt;Can Lua scripting be performed in FF for this outcome? If so, does anyone have a starting example script that I could base my script on, as I am a beginner?&lt;/p&gt;
</description>
</item>
<item><title>Creating a clamped range</title> 
		             <dc:creator>Bobby_t</dc:creator> 
		             <category></category> 
		             <pubDate>Fri, 12 Aug 2022 06:55:45 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16673</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16673</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;Bobby_t&lt;/b&gt;, &lt;em&gt;Thu, 11 Aug 2022 12:55:42 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hi there,&lt;br /&gt;&lt;br /&gt;I'm looking to create a script (couldn't find a component?) to be able to clamp a range of values.&lt;br /&gt;&lt;br /&gt;In below diagram, I've tried to illusrate as best I can, I'm looking to input values on Y and have that map to a value range on X.&lt;br /&gt;&lt;br /&gt;For example at Y value of 10 the range in X is locked to 0,5 (mid grey) at top of triangle.&lt;br /&gt;&lt;br /&gt;At a range of Y 5, mid grey the x range would be between approx. 0.25 and 0.75&lt;br /&gt;&lt;br /&gt;At 0 on Y, the X can be anywhere from white to black, 0 to 1&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Bobby_t&lt;/b&gt;, &lt;em&gt;Fri, 12 Aug 2022 06:55:45 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I may of over complicated above issue, worked out a much easy way to do it.  :?: &lt;br /&gt;&lt;br /&gt;I was wanting to limit the amount a shape could move, the bigger the shape would get (y value) the less it could move, offset (x)&lt;/p&gt;
</description>
</item>
<item><title>Scripting a Rotatable Gradient Sphere</title> 
		             <dc:creator>David Roberson</dc:creator> 
		             <category></category> 
		             <pubDate>Mon, 08 Aug 2022 00:15:23 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16347</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16347</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 31 May 2021 17:27:09 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I recently looked at and updated the Rotatable Sphere Snippet by ThreeDee. Unfortunately, I could think of no way to correct the distortions that are part of it, and started wondering how I'd make an undistorted version I could use in a filter designed to showcase a planet. The obvious thing to do is to try and create a Map Script that will produce a gradient sphere like the example (below) that could be used to map a surface using the Lookup component. Sadly, I have no idea how to do it. &lt;br /&gt;&lt;br /&gt;If you think you can help I'd be very grateful, just a link to a good example would be appreciated. I am looking at the Raytracing Snippet by Egret as a starting point, so even help with mapping a gradient onto one of his spheres would be great.&lt;br /&gt;&lt;br /&gt;Thanks for your attention.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 31 May 2021 20:20:44 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I was able to get pretty far working with a Refraction based mapping to a rotatable sphere. Unfortunately, it's only fooling the eye; there's still unwanted distortion and not-quite full range of motion. A proper sphere mapping will take a bit of pseudo 3d scripting. Lua can do it, but most of the methods I've come across require external libraries. For what amounts to a sphere primitive, I don't think I would need to go that far. &lt;br /&gt;&lt;br /&gt;Anyway, here's the ffxml for my rotatable sphere snippet:&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Tue, 01 Jun 2021 17:01:44 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I've been tinkering with the Raytracing Snippet by Egret, trying to map a gradient onto one of his spheres. I got as far as isolating a sphere in a bigger space with an associated uv surface, but it only seems to respond to the alpha channel. The RGB channels do not respond to the raytrace, so I get either a clear, refractive surface or a black one (reflections still work, too). I'll post what I've got here, in case someone can point out where I'm going wrong. l think this is on hold until then...&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 20 Jun 2022 00:38:05 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I succeeded in accomplishing half of the gradients needed to create a Rotatable Sphere Script -- a gradient from the north to south pole (is that the y-axis?). To complete my script I need some help with the math to produce the x-axis, basically an angle gradient from the far east to the far west. There's an example of this above. I have tried finding an example of cartesian to polar mapping for lua, but have had no luck. I'm hoping that is the solution I'm looking for.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[CODE]-- 3d sphere &lt;br /&gt;	-- produces rgb gradient mapped to a 3d sphere, but not correctly. &lt;br /&gt;	-- how would one map x:red and y:green gradients instead?&lt;br /&gt;	-- this is basically missing an angle gradient in the y-axis...&lt;br /&gt;function prepare()&lt;br /&gt;	-- tilt &amp; rotation precalc&lt;br /&gt;		-- it would be nice to know how this works!&lt;br /&gt;	toRad = 180/math.pi&lt;br /&gt;&lt;br /&gt;	radius = get_slider_input(RADIUS)&lt;br /&gt;&lt;br /&gt;	angle = get_angle_input(ROTATION)/toRad&lt;br /&gt;	cosa = math.cos(angle)&lt;br /&gt;	sina = math.sin(angle)&lt;br /&gt;&lt;br /&gt;	tilt = get_angle_input(TILT)/toRad&lt;br /&gt;	cosa2 = math.cos(tilt)&lt;br /&gt;	sina2 = math.sin(tilt)&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	local r, g, b, a = get_sample_map(x, y, SOURCE)&lt;br /&gt;	-- color gradient example&lt;br /&gt;	-- 	local r = x&lt;br /&gt;	-- 	local g = y&lt;br /&gt;	-- 	local b = (x + y) / 2&lt;br /&gt;	-- 	local a = 1&lt;br /&gt;	-- image generation&lt;br /&gt;	local px = (x*2.0) - 1.0&lt;br /&gt;	local py = (y*2.0) - 1.0&lt;br /&gt;	px = px/radius&lt;br /&gt;	py = py/radius&lt;br /&gt;	local len = math.sqrt((px*px)+(py*py))&lt;br /&gt;	if len &amp;gt; 1.0 then return 0,0,0,0 end&lt;br /&gt;&lt;br /&gt;	local z = -math.sqrt(1.0 - ((px*px)+(py*py)))&lt;br /&gt;&lt;br /&gt;	local tz = (cosa2 * z) - (sina2 * py)&lt;br /&gt;	local ty = (sina2 * z) + (cosa2 * py)&lt;br /&gt;	z = tz&lt;br /&gt;	py = ty&lt;br /&gt;&lt;br /&gt;	local tx = (cosa * px) - (sina * z)&lt;br /&gt;	local tz = (sina * px) + (cosa * z)&lt;br /&gt;	px = tx&lt;br /&gt;	z = tz&lt;br /&gt;&lt;br /&gt;	return px/2+.5,px/2+.5,px/2+.5,a -- r, g, b, a&lt;br /&gt;end;[/CODE]&lt;br /&gt;&lt;br /&gt;Here are a couple examples from other scripting languages...&lt;br /&gt;&lt;br /&gt;[CODE]	--  cartesian to polar (reference)&lt;br /&gt;	--	example 1&lt;br /&gt;	-- 	r = math.sqrt((cart.x * cart.x + cart.y * cart.y + cart.z * cart.z)); &lt;br /&gt;	-- 	long = math.acos(cart.x / math.sqrt(cart.x * cart.x + cart.y * cart.y)) * (cart.y &amp;lt; 0 ? -1 : 1); &lt;br /&gt;	-- 	lat = math.acos(cart.z / radius) * (cart.z &amp;lt; 0 ? -1 : 1); &lt;br /&gt;	--	example 2&lt;br /&gt;	--	r = sqrt(x * x + y * y + z * z)&lt;br /&gt;	-- 	long = acos(x / sqrt(x * x + y * y)) * (y &amp;lt; 0 ? -1 : 1)&lt;br /&gt;	-- 	lat = acos(z / r)&lt;br /&gt;[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 20 Jun 2022 23:18:47 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Since I've just been banging my head against a wall on this, here's an upd ate on my progress. This may clarify what kind of help I'm looking for, in case what I've already posted is unclear.&lt;br /&gt;&lt;br /&gt;0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I am working on a Spherical Map Script that generates a linear gradient along the y-axis and an angular gradient around the y-axis in the green and red channels, respectively. I have been unable to find any documentation suited to this online, but have experimented using examples in Javascript and C#. The linear gradient has worked out fine, but the angular gradient (one describing a 360 degree arc around the y-axis) continues to elude me.&lt;br /&gt;&lt;br /&gt;My working script is as follows.&lt;br /&gt;&lt;br /&gt;[CODE]-- 3d sphere &lt;br /&gt;	-- produces rgb gradient mapped to a 3d sphere, but not correctly. &lt;br /&gt;	-- this is basically missing an angle gradient around the y-axis...&lt;br /&gt;function prepare()&lt;br /&gt;	-- tilt &amp; rotation precalc&lt;br /&gt;	toRad = 180/math.pi&lt;br /&gt;	-- toCir = 360/math.pi -- may or may not work for circumference...&lt;br /&gt;&lt;br /&gt;	radius = get_slider_input(RADIUS)&lt;br /&gt;&lt;br /&gt;	angle = get_angle_input(ROTATION)/toRad&lt;br /&gt;	cosa = math.cos(angle)&lt;br /&gt;	sina = math.sin(angle)&lt;br /&gt;&lt;br /&gt;	tilt = get_angle_input(TILT)/toRad&lt;br /&gt;	cosa2 = math.cos(tilt)&lt;br /&gt;	sina2 = math.sin(tilt)&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	local r, g, b, a = get_sample_map(x, y, SOURCE)&lt;br /&gt;	-- color gradient example&lt;br /&gt;		-- local r = x&lt;br /&gt;		-- local g = y&lt;br /&gt;		-- local b = (x + y) / 2&lt;br /&gt;		-- local a = 1&lt;br /&gt;	-- spherical mapping formulae (polar to cartesian, apparently)&lt;br /&gt;		-- local x = x * math.pi -- * aspect &lt;br /&gt;		-- local y = y * math.pi&lt;br /&gt;		-- conversion from r, lat, long to x, y, z&lt;br /&gt;		-- local nx = math.cos(x) * math.sin(y) &lt;br /&gt;		-- local ny = math.sin(x) * math.sin(y) &lt;br /&gt;		-- local nz = math.cos(y) &lt;br /&gt;	-- cartesian to polar (reference)&lt;br /&gt;		-- radius : distance from focus to surface&lt;br /&gt;		-- latitude : -90 to 90 degrees (math.pi/2), along y-axis (phi)&lt;br /&gt;		-- longitude : -180 to 180 degrees (math.pi) around y-axis (theta)&lt;br /&gt;	--	example 1&lt;br /&gt;		-- r = math.sqrt(((x * x) + (y * y) + (z * z))) &lt;br /&gt;		-- long = math.acos(x / math.sqrt((x * x) + (y * y))) * (y &amp;lt; 0 ? -1 : 1) &lt;br /&gt;		-- lat = math.acos(z / radius) * (z &amp;lt; 0 ? -1 : 1) &lt;br /&gt;	--	example 2&lt;br /&gt;		-- r = math.sqrt((x * x) + (y * y) + (z * z)) &lt;br /&gt;		-- long = math.acos(x / math.sqrt((x * x) + (y * y))) * (y &amp;lt; 0 ? -1 : 1) &lt;br /&gt;		-- lat = math.acos(z / r) &lt;br /&gt;   &lt;br /&gt;	-- image generation&lt;br /&gt;	-- shift origin to center and se t radius limits&lt;br /&gt;	local px = (x*2.0) - 1.0&lt;br /&gt;	local py = (y*2.0) - 1.0&lt;br /&gt;	px = px/radius&lt;br /&gt;	py = py/radius&lt;br /&gt;	local len = math.sqrt((px*px)+(py*py))&lt;br /&gt;	if len &amp;gt; 1.0 then return 0,0,0,0 end&lt;br /&gt;&lt;br /&gt;	local z = -math.sqrt(1.0 - ((px*px)+(py*py)))&lt;br /&gt;&lt;br /&gt;	-- cartesian to polar&lt;br /&gt;		-- r = math.sqrt((x * x) + (y * y) + (z * z))&lt;br /&gt;		-- lat = math.acos(z / r)&lt;br /&gt;		-- long = math.acos(x / math.sqrt((x * x) + (y * y))) * (y &amp;lt; 0) ? -1 : 1) &lt;br /&gt;			-- equation cannot accept boolean comparison&lt;br /&gt;			-- boolean syntax may not be valid in lua&lt;br /&gt;		-- test long = math.acos(x / math.sqrt((x * x) + (y * y))) &lt;br /&gt;&lt;br /&gt;	-- apply rotation and tilt&lt;br /&gt;	local ty = (sina2 * z) + (cosa2 * py) -- gradient along y-axis is correct&lt;br /&gt;	py = ty&lt;br /&gt;	local tz = (cosa2 * z) - (sina2 * py) -- not used before overridden&lt;br /&gt;	z = tz -- not used before overridden&lt;br /&gt;&lt;br /&gt;	local tz = (sina * px) + (cosa * z)&lt;br /&gt;	px = tx&lt;br /&gt;	local tx = (cosa * px) - (sina * z) -- gradient needs to go around y-axis&lt;br /&gt;	z = tz&lt;br /&gt;&lt;br /&gt;	-- return r, g, b, a&lt;br /&gt;	-- return px,py,z,a &lt;br /&gt;	return px/2+.5,py/2+.5,long,a &lt;br /&gt;	-- return px/2+.5,px/2+.5,px/2+.5,a &lt;br /&gt;	-- return long,long,long,a &lt;br /&gt;end;[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Wed, 22 Jun 2022 05:29:25 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;After several days of poking around I have only found one working example in which the x and y gradients can only be generated along their respective axes. I just can't puzzle out a method of generating a gradient around an axis using polar-to-cartesian and cartesian-to-polar coordinate conversions. Does that seem right? I may just be failing to do the cartesian-to-polar correctly, most likely due to the boolean operation inside the examples I found for other coding languages. I still have to say that the apparent logic of those equations makes it seem like longitude variable contains a circumferential gradient. You just can't pull it out using polar-to-cartesian equations. If I could, then a sampling of source images would be possible in a map script. Maybe that requires some form of computational uv mapping?&lt;br /&gt;&lt;br /&gt;Any kind of feedback would be welcome here...&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Wed, 22 Jun 2022 06:46:51 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Well, I finally got a grip on how this map script works and the solution was so much simpler that what I'd been trying to do. Here's my solution:&lt;br /&gt;&lt;br /&gt;[CODE]-- 3d vector sphere&lt;br /&gt;	-- produces rgb vector gradient mapped to a 3d sphere &lt;br /&gt;function prepare()&lt;br /&gt;	-- tilt &amp; rotation precalc&lt;br /&gt;	toRad = 180/math.pi&lt;br /&gt;&lt;br /&gt;	radius = get_slider_input(RADIUS)&lt;br /&gt;&lt;br /&gt;	angle = get_angle_input(ROTATION)/toRad&lt;br /&gt;	cosa = math.cos(angle)&lt;br /&gt;	sina = math.sin(angle)&lt;br /&gt;&lt;br /&gt;	tilt = get_angle_input(TILT)/toRad&lt;br /&gt;	cosa2 = math.cos(tilt)&lt;br /&gt;	sina2 = math.sin(tilt)&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	-- image generation&lt;br /&gt;&lt;br /&gt;	-- sphere generation and manipulation&lt;br /&gt;	-- origin to center&lt;br /&gt;	local px = (x*2.0) - 1.0&lt;br /&gt;	local py = (y*2.0) - 1.0&lt;br /&gt;	-- set sphere radius (max -- screen height)&lt;br /&gt;	px = px/radius&lt;br /&gt;	py = py/radius&lt;br /&gt;	local len = math.sqrt((px*px)+(py*py))&lt;br /&gt;	-- check radius and clip&lt;br /&gt;	if len &amp;gt; 1.0 then return 0,0,0,0 end&lt;br /&gt;&lt;br /&gt;	local z = -math.sqrt(1.0 - ((px*px)+(py*py)))&lt;br /&gt;&lt;br /&gt;	local tz = (cosa2 * z) - (sina2 * py)&lt;br /&gt;	local ty = (sina2 * z) + (cosa2 * py)&lt;br /&gt;	z = tz&lt;br /&gt;	py = ty&lt;br /&gt;&lt;br /&gt;	local tx = (cosa * px) - (sina * z)&lt;br /&gt;	local tz = (sina * px) + (cosa * z)&lt;br /&gt;	px = tx&lt;br /&gt;	z = tz&lt;br /&gt;	if z &amp;lt;= 0 then px = (0 - (1 - px)) end&lt;br /&gt;&lt;br /&gt;	return px/2+.5,py/2+.5,0,1&lt;br /&gt;	-- return px,py,0,1&lt;br /&gt;end;[/CODE]&lt;br /&gt;&lt;br /&gt;Edit: I may have spoken to soon.... On first glance the circumferential gradient looked right, but as soon as I tried to test it in a Lookup I discovered a problem. I'm inverting the values wrong, dealing with the -1 to 1 range. It's probably a simple fix but my brain is too tired to sort it out right now.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Wed, 22 Jun 2022 09:01:06 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Well, the long and the short of it is that the process I've been working with is in the wrong coordinate system. The gradient sphere I have is based on the polar-to-cartesian coordinate system. That gives me x, y, z gradients in the three axes. What I want is gradients for theta and phi, or longitude and latitude. I'm actually getting values for theta and phi from my control sliders, which rotate the generated sphere. I'll try to see if I can sample those values, and if they (somehow) produce the correct gradients, but a little help would be appreciated, since I don't have any examples to work with like that.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Sat, 25 Jun 2022 06:18:06 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I found a potential solution that would employ rotational offsets on three versions of the x-axis gradient fed as r, g, b components of an rgb2hsl function to produce a spherical angle gradient. Unfortunately, an odd problem popped up with the rotational offsets. They are not constant during rotation, which creates a messed up gradient. Am I doing them wrong here?&lt;br /&gt;&lt;br /&gt;[CODE]-- 3d sphere &lt;br /&gt;	-- produces rgb gradient mapped to a 3d sphere. &lt;br /&gt;	-- an angle gradient can be derived using an extract hue component for x lookup&lt;br /&gt;	-- a get alpha component provides for y lookup&lt;br /&gt;function prepare()&lt;br /&gt;	-- tilt &amp; rotation precalc&lt;br /&gt;	toRad = 180/math.pi&lt;br /&gt;&lt;br /&gt;	radius = get_slider_input(RADIUS)&lt;br /&gt;&lt;br /&gt;	angle = get_angle_input(ROTATION)&lt;br /&gt;	angle = angle/toRad &lt;br /&gt;	angle1 = (angle + 120)/toRad &lt;br /&gt;	angle2 = (angle + 240)/toRad&lt;br /&gt;		-- offsets are correct at 0 but are not constant during rotation&lt;br /&gt;&lt;br /&gt;	cosa0 = math.cos(angle)&lt;br /&gt;	sina0 = math.sin(angle)&lt;br /&gt;&lt;br /&gt;	cosa1 = math.cos(angle1)&lt;br /&gt;	sina1 = math.sin(angle1)&lt;br /&gt;&lt;br /&gt;	cosa2 = math.cos(angle2)&lt;br /&gt;	sina2 = math.sin(angle2)&lt;br /&gt;&lt;br /&gt;	tilt = get_angle_input(TILT)/toRad&lt;br /&gt;	cosa3 = math.cos(tilt)&lt;br /&gt;	sina3 = math.sin(tilt)&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	--	input image; requires uvw mapping...&lt;br /&gt;	local r, g, b, a = get_sample_map(x, y, SOURCE)&lt;br /&gt;	a = 1&lt;br /&gt;&lt;br /&gt;	-- image generation&lt;br /&gt;	local px = (x*2.0) - 1.0&lt;br /&gt;	local py = (y*2.0) - 1.0&lt;br /&gt;	px = px/radius&lt;br /&gt;	px1 = px/radius&lt;br /&gt;	px2 = px/radius&lt;br /&gt;	py = py/radius&lt;br /&gt;	local len = math.sqrt((px*px)+(py*py))&lt;br /&gt;	if len &amp;gt; 1.0 then return 0,0,0,0 end&lt;br /&gt;&lt;br /&gt;	local z = -math.sqrt(1.0 - ((px*px)+(py*py)))&lt;br /&gt;	local z1 = z&lt;br /&gt;	local z2 = z&lt;br /&gt;&lt;br /&gt;	local tz = (cosa3 * z) - (sina3 * py)&lt;br /&gt;	local ty = (sina3 * z) + (cosa3 * py)&lt;br /&gt;	py = ty&lt;br /&gt;	z = tz&lt;br /&gt;&lt;br /&gt;	local tx = (cosa0 * px) - (sina0 * z)&lt;br /&gt;	local tz = (sina0 * px) + (cosa0 * z)&lt;br /&gt;	px = tx&lt;br /&gt;	z = tz&lt;br /&gt;	&lt;br /&gt;	local tx1 = (cosa1 * px1) - (sina1 * z)&lt;br /&gt;	local tz1 = (sina1 * px1) + (cosa1 * z)&lt;br /&gt;	px1 = tx1&lt;br /&gt;	z1 = tz1&lt;br /&gt;&lt;br /&gt;	local tx2 = (cosa2 * px2) - (sina2 * z)&lt;br /&gt;	local tz2 = (sina2 * px2) + (cosa2 * z)&lt;br /&gt;	px2 = tx2&lt;br /&gt;	z2 = tz2&lt;br /&gt;&lt;br /&gt;	-- to do&lt;br /&gt;		-- internal hue extraction (hsb): &lt;br /&gt;		-- internal lookup on source image&lt;br /&gt;		-- add screen relative z-axis rotation (spin)&lt;br /&gt;&lt;br /&gt;	return px/2+.5,px1/2+.5,px2/2+.5,py/2+.5 &lt;br /&gt;	-- return px/2+.5,px/2+.5,px/2+.5,0 &lt;br /&gt;	-- return px1/2+.5,px1/2+.5,px1/2+.5,0 &lt;br /&gt;	-- return px2/2+.5,px2/2+.5,px2/2+.5,0 &lt;br /&gt;	-- return r, g, b, a&lt;br /&gt;end;[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 08 Aug 2022 00:15:23 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I managed to solve the problem of scripting a rotatable sphere with the proper remapping gradients sometime last month, but am still tweaking and experimenting with the next logical steps. I never bothered to update this thread with my progress, and now there are too many different script versions; I can't decide which one to share. However, there's a good chance a few of them will find their way into filters. I have a number of planetary filters in the works, so you can expect to see some there. I'll probably submit one as a 3d rotatable sphere snippet (or even effect filter, since I can now map the input to a sphere, assuming it's prepared for spherical mapping). If I do, I'll come back and post the code that goes with it, for anyone who might just want to look at the script but doesn't need a working copy.&lt;br /&gt;&lt;br /&gt;TTFN&lt;/p&gt;
</description>
</item>
<item><title>Dilla's Scripting Blunders</title> 
		             <dc:creator>Crapadilla</dc:creator> 
		             <category></category> 
		             <pubDate>Thu, 28 Jul 2022 16:03:24 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=9133</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=9133</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;Crapadilla&lt;/b&gt;, &lt;em&gt;Sun, 20 Nov 2011 13:31:39 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Alrighty, I've been dipping a toe into the unknown waters of scripting lately. For some foolish reason I decided to begin work on a &lt;a href=&quot;http://en.wikipedia.org/wiki/Logarithmic_spiral&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Logarithmic Spiral&lt;/a&gt; generator component. Spirals are so incredibly awesome, so I thought why not? &lt;br /&gt;&lt;br /&gt; :|  ;)  :D &lt;br /&gt;&lt;br /&gt;So far the basics look promising, but I'm only getting one revolution (or segment) of the spiral plotted, i.e. it does not spiral towards infinity or zero. I'm guessing there must be some mathematical reason for it, but currently I don't see it. :blush: &lt;br /&gt;&lt;br /&gt;In case anyone less mathematically challenged than the current me feels like taking a look, here is the filter:&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Indigo Ray&lt;/b&gt;, &lt;em&gt;Sun, 20 Nov 2011 18:27:07 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;From wikipedia:&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Many programming languages also provide the two-argument atan2 function, which computes the arctangent of y / x given y and x, but with a range of (âˆ’Ï€, Ï€].&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;You'll have to do a loop if you want a larger range, I think.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Crapadilla&lt;/b&gt;, &lt;em&gt;Mon, 21 Nov 2011 04:25:12 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Indeed. Thank you! :)&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;If desired an angle in the range [0, 2Ï€) may be obtained by adding 2Ï€ to the value if it is negative.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Mon, 21 Nov 2011 05:08:54 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;radialCoordinate =  math.log(math.sqrt ( x^2 + y^2 ) * 30) &lt;br /&gt;	angularCoordinate = 0.5 + math.atan2 (x,y) / (2 * math.pi)&lt;br /&gt;	spiralGrd = angularCoordinate + radialCoordinate&lt;br /&gt;	spiralGrd = spiralGrd - math.floor(spiralGrd)&lt;br /&gt;&lt;br /&gt;route spiralGrd to the output and take a look :-)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Crapadilla&lt;/b&gt;, &lt;em&gt;Mon, 21 Nov 2011 06:29:38 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Nice gradient! And more efficient, apparently. :) &lt;br /&gt;&lt;br /&gt;But how does one implement proper aa_zones for this? And how does one offset the damned thing to the image center via script?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Mon, 21 Nov 2011 06:58:01 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Well, I supplied the the code as a starting point. As such it does not make sense to have aa-zones for a gradient (there are no zones...). If you use the gradient to create that threshold like output, it makes sense to use the conditional (&quot;if..then..else&quot;) to determine the aa_zone.&lt;br /&gt;&lt;br /&gt;you can try using this as aa_zone though: math.floor(spiralGrd * 3), where 3 is the multiplication constant from the radialCoordinate calculation / 10. This should reduce moire aliasing in the center region, while skipping aa calc in the soft large gradients &lt;br /&gt;&lt;br /&gt;For the centering you need to think &quot;reverse&quot;, i.e. subtract 0.5 from x and y initially so you have 0,0 in the visual center region.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Crapadilla&lt;/b&gt;, &lt;em&gt;Mon, 21 Nov 2011 09:06:36 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Sphinx, thanks for your help. I'll get back to experimenting now...&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;James&lt;/b&gt;, &lt;em&gt;Mon, 21 Nov 2011 09:06:42 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Is that a spiral formula Sphinx? If i try to center the XY positions by subtracting a 0.5 value i get more of a radial remapped result from the input.&lt;br /&gt;&lt;br /&gt;function prepare()&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;&lt;br /&gt;radialCoordinate = math.log(math.sqrt ((x-0.5)^2 + (y-0.5)^2 ) * 30)&lt;br /&gt;angularCoordinate = 0.5 + math.atan2 (x,y) / (2 * math.pi)&lt;br /&gt;spiralGrd = angularCoordinate + radialCoordinate&lt;br /&gt;spiralGrd = spiralGrd - math.floor(spiralGrd) &lt;br /&gt;&lt;br /&gt;r,g,b,a = get_sample_map(spiralGrd, spiralGrd, SOURCE)&lt;br /&gt;return r, g, b, a&lt;br /&gt;end;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Mon, 21 Nov 2011 09:25:12 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;James, don't use it for further lookup - just return the value, i.e.: return spiralGrd, spiralGrd, spiralGrd, 1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Dilla - try out radialCoordinate = math.log(math.sqrt ( x^2 + y^2 ))  * 30 too, i.e. move the mul. constant outside. It is easier to control the &quot;windings&quot; this way.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;James&lt;/b&gt;, &lt;em&gt;Mon, 21 Nov 2011 09:32:01 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thanks, it seems no different doing that though. Testing with just  a basic gradient to make things more visible i can see rings rather than a spiral -&lt;br /&gt;&lt;br /&gt;function prepare()&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;&lt;br /&gt;radialCoordinate = math.log(math.sqrt ((x-0.5)^2 + (y-0.5)^2 ) * 30)&lt;br /&gt;angularCoordinate = 0.5 + math.atan2 (x,y) / (2 * math.pi)&lt;br /&gt;spiralGrd = angularCoordinate + radialCoordinate&lt;br /&gt;spiralGrd = spiralGrd - math.floor(spiralGrd)&lt;br /&gt;&lt;br /&gt;return spiralGrd, spiralGrd, spiralGrd, 1 &lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;Or is that how it's suppose to be?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Crapadilla&lt;/b&gt;, &lt;em&gt;Mon, 21 Nov 2011 10:13:21 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;James, you have to use the same offset on the angular coordinate as well, i.e.:&lt;br /&gt;&lt;br /&gt;angularCoordinate = 0.5 + math.atan2 (x-0.5,y-0.5) / (2 * math.pi)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Mon, 21 Nov 2011 10:23:33 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Oh I get it now James :-D well I meant:&lt;br /&gt;&lt;br /&gt;add this as the first thing in the script, then you don't have to think more about it. &lt;br /&gt;&lt;br /&gt;x,y  = x - 0.5, y - 0.5&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;James&lt;/b&gt;, &lt;em&gt;Mon, 21 Nov 2011 10:37:31 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thanks, that makes it work great :D&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Crapadilla&lt;/b&gt;, &lt;em&gt;Mon, 21 Nov 2011 11:28:51 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;This is so much fun! I couldn't resist turning this into a full-featured &lt;i&gt;Spiral Gradient&lt;/i&gt; component. Submission to the library pending...&lt;br /&gt;&lt;br /&gt;Take a look... constructive criticism on code optimization (and the AA_zones hack) is very welcome, cause - you know - it'll learn me.  ;)  :D&lt;br /&gt;&lt;br /&gt;Also, I'm thinking about adding a 'Fixed Size' option.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Mon, 21 Nov 2011 13:07:13 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Cool! Looks quite good - also codewise :) &lt;br /&gt;&lt;br /&gt;About the aa hack: I think it would be better to do something like math.floor(spiralGrd * 3), since you can't for sure know that the given profile curve works well with your two constants (0.95 and 0.05).&lt;br /&gt;&lt;br /&gt;I'd strip away the current aa stuff and simply return the above result.&lt;br /&gt;&lt;br /&gt;Oh and another thing - you might want to check if blend_normal is faster than your current solution (honestly I don't know, since you're not doing alpha blending, but lerping instead which is much simpler)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Mon, 21 Nov 2011 13:14:26 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Oh, I just realized that there is an even better aa_zone to return.&lt;br /&gt;&lt;br /&gt;Find the line: &lt;br /&gt;&lt;br /&gt;spiralGrd = spiralGrd - math.floor(spiralGrd)&lt;br /&gt;&lt;br /&gt;and replace that with &lt;br /&gt;&lt;br /&gt;aa_zone = math.floor(spiralGrd)&lt;br /&gt;spiralGrd = spiralGrd - aa_zone&lt;br /&gt;&lt;br /&gt;and ensure that aa_zone is not modified afterwards by old script etc..&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Crapadilla&lt;/b&gt;, &lt;em&gt;Mon, 21 Nov 2011 13:25:17 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Sphinx. wrote:&lt;/b&gt;&lt;br /&gt;aa_zone = math.floor(spiralGrd) &lt;br /&gt;spiralGrd = spiralGrd - aa_zone &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Oh yeah! That works like a charm! :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;James&lt;/b&gt;, &lt;em&gt;Mon, 21 Nov 2011 14:26:16 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;One useful thing might be to maybe add the new Bezier curve control so the user could shape the profile with a custom curve. &lt;br /&gt;&lt;br /&gt;Code wise everything seems quite good also. :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Crapadilla&lt;/b&gt;, &lt;em&gt;Mon, 21 Nov 2011 14:48:04 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;James wrote:&lt;/b&gt;&lt;br /&gt;Bezier curve control&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Yup, sounds good. I'll schedule that into a future update.&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Message log wrote:&lt;/b&gt;&lt;br /&gt;Script error (line 35): Invalid floating-point value passed to get_sample_curve&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;With &lt;i&gt;Size, pixels&lt;/i&gt; at 1 the script throws an error. Hmmm!?.... :|&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;inujima&lt;/b&gt;, &lt;em&gt;Mon, 21 Nov 2011 16:34:36 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;With Size, pixels at 1 the script throws an error. Hmmm!?.... &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Function math.log(x) returns nil value at x&amp;lt;=0. &lt;br /&gt;By such a reason, the value of spiralGrd has been nil value at center coordinate.  :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;James&lt;/b&gt;, &lt;em&gt;Tue, 22 Nov 2011 07:03:39 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Just wondering how can you fix this error mentioned, maybe with some sort of value limiting? or would it need to be fixed by the FF developers?&lt;br /&gt;&lt;br /&gt;Not that i often use a size of 1 pixel but it would be useful to have a fix/workaround if anyone knows one. :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;inujima&lt;/b&gt;, &lt;em&gt;Tue, 22 Nov 2011 07:47:24 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;It is necessary to rewrite so that zero must not  be parameter of math.log(). &lt;br /&gt;&lt;br /&gt;For example&lt;br /&gt;[CODE]&lt;br /&gt;	-- calculate spiral gradient map&lt;br /&gt;	radialCoordinate = math.log (math.sqrt ( spiralX*spiralX + spiralY*spiralY )) * windings&lt;br /&gt;[/CODE]&lt;br /&gt;&lt;br /&gt;rewrite like this &lt;br /&gt;&lt;br /&gt;[CODE]&lt;br /&gt;	-- calculate spiral gradient map&lt;br /&gt;	local radial = math.sqrt ( spiralX*spiralX + spiralY*spiralY )&lt;br /&gt;	radial = math.max(radial, 0.00001)&lt;br /&gt;	radialCoordinate = math.log (radial) * windings&lt;br /&gt;[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Crapadilla&lt;/b&gt;, &lt;em&gt;Wed, 23 Nov 2011 08:40:56 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;b&gt;Dilla's Scripting Blunders&lt;/b&gt; -- Episode 2&lt;br /&gt;The scripting n00b madness continues... ;)  :D &lt;br /&gt;&lt;br /&gt;Ok, I've got three points and their circumcircle drawn, but how do I draw the triangle between these points?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Crapadilla&lt;/b&gt;, &lt;em&gt;Wed, 23 Nov 2011 11:38:28 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Oh my, there sure are some interesting polygon hit-test algorithms out there -- exciting stuff to dig into...  :eek:  ;) &lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://paulbourke.net/geometry/insidepoly/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://paulbourke.net/geometry/insidepoly/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Looks like my next scripting assignment is porting one of these to Lua. Personally, I'd choose the first one...  8)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Ghislaine&lt;/b&gt;, &lt;em&gt;Tue, 29 May 2012 19:07:57 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hi Dilla&lt;br /&gt;&lt;br /&gt;I just upload a filter tonight based on your Logarythmic spiral. This base has just a script map + an offset component. And it is great. Let me tell you that we could make wonders with it. I'm asking you if you would add some input in your script. I would appreciate much to work again with this logarythmic spiral with more possibilities. Thanks in advance.&lt;br /&gt;&lt;br /&gt;I'm creating a second filter with yours. I have discovered a lot of spirograph forms just by playing with logarythmic spiral. I imagine that the possibilities would be multiplied at the infinity with few inputs added to your script.  :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Crapadilla&lt;/b&gt;, &lt;em&gt;Mon, 04 Jun 2012 13:04:40 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Ghislaine,&lt;br /&gt;&lt;br /&gt;unfortunately I'm currently swamped in a project -- which means no time for filter authoring fun. However, feel free to post your suggestions here, and I might look into it once things have calmed down at work.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Fri, 22 Jul 2022 09:56:13 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Ghislaine wrote:&lt;/b&gt;&lt;br /&gt;I'm creating a second filter with yours. I have discovered a lot of spirograph forms just by playing with logarythmic spiral. I imagine that the possibilities would be multiplied at the infinity with few inputs added to your script. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;I could not figure out what filter you meant in this comment. Though it's been a while, do you remember which one it was?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Ghislaine&lt;/b&gt;, &lt;em&gt;Tue, 26 Jul 2022 16:19:34 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hi dear !&lt;br /&gt;&lt;br /&gt;I do not remember either. &lt;br /&gt;&lt;br /&gt;Glad to get news from you. Have a nice day my friend.  :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Thu, 28 Jul 2022 16:03:24 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Yeah, sometimes these things just slip our minds. Ah, well. No harm, no foul. Thanks for responding, and have a good day as well!  :D&lt;/p&gt;
</description>
</item>
<item><title>Spirals, Round Two</title> 
		             <dc:creator>Sphinx.</dc:creator> 
		             <category></category> 
		             <pubDate>Tue, 26 Jul 2022 21:09:15 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=9179</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=9179</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Tue, 29 Nov 2011 03:42:26 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Alright - I worked out a new basis for the spiral generation related to these two topics:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://filterforge.com/forum/read.php?FID=11&amp;TID=9142&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://filterforge.com/forum/read.php?FID=11&amp;TID=9142&lt;/a&gt;&lt;br /&gt;and&lt;br /&gt;&lt;a href=&quot;http://filterforge.com/forum/read.php?FID=18&amp;TID=9133&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://filterforge.com/forum/read.php?FID=18&amp;TID=9133&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This new codebase supports two additional output modes: perpendicular gradient and division gradient. However it is not 100% complete yet and I need input from someone else. &lt;br /&gt;&lt;br /&gt;There are two problems: &lt;br /&gt;&lt;br /&gt;Output mode 1 is not correct - there is a very annoying split. Ideally this mode will index each &quot;arm&quot; with respect the given Division setting.&lt;br /&gt;&lt;br /&gt;Output mode 2 is not always in 0..1 range, and the gradient is not perfectly perpendicular to mode 3.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;All comments are welcome :-)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Tue, 29 Nov 2011 03:43:37 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;mode 1&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Tue, 29 Nov 2011 03:43:55 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;mode 2&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Tue, 29 Nov 2011 03:44:07 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;mode 3&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Crapadilla&lt;/b&gt;, &lt;em&gt;Tue, 29 Nov 2011 08:20:22 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;img src=&quot;http://edn.sphinx-pa.de/images/smilies/Popcorn.gif&quot; id=&quot;popup_2063173393&quot; border=&quot;0&quot; width=&quot;300&quot; height=&quot;300&quot; data-bx-viewer=&quot;image&quot; data-bx-src=&quot;http://edn.sphinx-pa.de/images/smilies/Popcorn.gif&quot; /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Wed, 30 Nov 2011 01:46:20 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;You guys have no idea how happy I am. I just saw this and choked on a olive I just chewed on. :D&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Wed, 30 Nov 2011 12:51:38 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I guess I have to fix this myself if you're just going to sit there and eat popcorn and olives :-D&lt;br /&gt;&lt;br /&gt;Well, erhm, I think I nailed it .. any comments/suggestions?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Wed, 30 Nov 2011 12:54:04 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&quot;Pics or it didn't happen!!&quot;... ok then (Divide = 3, i.e. DIV = 3)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Crapadilla&lt;/b&gt;, &lt;em&gt;Thu, 01 Dec 2011 13:08:10 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Awesome, and versatile! I love that you can do archimedean spirals with this. :D&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;xirja&lt;/b&gt;, &lt;em&gt;Wed, 07 Dec 2011 14:59:20 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Truly!&lt;br /&gt;&lt;br /&gt;I came up with a method that uses three bias curves, self modulated in series...&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.xirja.com/squidink.jpg&quot; id=&quot;popup_1145007965&quot; border=&quot;0&quot; width=&quot;300&quot; height=&quot;300&quot; data-bx-viewer=&quot;image&quot; data-bx-src=&quot;http://www.xirja.com/squidink.jpg&quot; /&gt;&lt;br /&gt;&lt;br /&gt; ...but this script is much more elegant and leads to many interesting possibilities...&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.xirja.com/frost.jpg&quot; id=&quot;popup_1295150618&quot; border=&quot;0&quot; width=&quot;300&quot; height=&quot;300&quot; data-bx-viewer=&quot;image&quot; data-bx-src=&quot;http://www.xirja.com/frost.jpg&quot; /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Thu, 08 Dec 2011 01:10:39 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Cool stuff xirja!&lt;br /&gt;&lt;br /&gt;I am working on improving &quot;mode 2&quot; (green ch. output) - the ramp should ideally be perpendicular to the spiral arm it represents. If you hook up a threshold you can easily see that the &quot;angle&quot; is not persistent...&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Tue, 26 Jul 2022 21:09:15 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Sphinx. wrote:&lt;/b&gt;&lt;br /&gt;I am working on improving &quot;mode 2&quot; (green ch. output) - the ramp should ideally be perpendicular to the spiral arm it represents. If you hook up a threshold you can easily see that the &quot;angle&quot; is not persistent...&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Did you ever accomplish that improvement?&lt;/p&gt;
</description>
</item>
<item><title>Bias Curve Formula?</title> 
		             <dc:creator>fisholith</dc:creator> 
		             <category></category> 
		             <pubDate>Fri, 22 Jul 2022 08:26:28 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=7537</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=7537</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;fisholith&lt;/b&gt;, &lt;em&gt;Fri, 25 Jun 2010 21:43:05 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Does anyone know off hand what the bias formula is? &lt;br /&gt;&lt;br /&gt;I was building a curve script that handles a combination of curves I use pretty often, but I need to be able to build in a bias curve, and it occurs to me that I'm not sure what the function for it is. I know that the gain formula is a pair of bias curves, and I'll need to build a gain eventually too, but that obviously doesn't help in the short term.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;GMM&lt;/b&gt;, &lt;em&gt;Sat, 26 Jun 2010 05:00:34 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;The formulas were borrowed from  &lt;br /&gt;Christophe Schlick's &quot;Fast alternative to Perlin's bias and gain functions&quot;, Graphics Gems IV, ed. Paul Heckbert, Academic Press, 1994.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Vladimir Golovin&lt;/b&gt;, &lt;em&gt;Sun, 27 Jun 2010 10:10:40 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hint, hint: the above reply is a quote from Filter Forge help file ;)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Fri, 22 Jul 2022 08:26:28 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I tracked down bias and gain functions based on that publication, though they're in javascript. I don't think they'll be a problem to convert to lua, though. I feel like I've done this before for a map script, but I'm trying it out with curve scripts this time. I wish there were more curve scripts featuring common and custom curve profiles.&lt;/p&gt;
</description>
</item>
<item><title>Turning a script into a custom component</title> 
		             <dc:creator>andyz</dc:creator> 
		             <category></category> 
		             <pubDate>Wed, 06 Jul 2022 09:44:19 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16662</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16662</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;andyz&lt;/b&gt;, &lt;em&gt;Wed, 06 Jul 2022 09:44:19 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hi it seems like scripts are very limited in re-usability. You can not even re-use the same script more than once in a filter without making a copy if I am correct.&lt;br /&gt;It seems obvious that being able to add a lua script to the components section under a custom section would be ideal and very useful - but I think this is only on the wishlist so far&lt;/p&gt;
</description>
</item>
<item><title>A script to uv map a sphere</title> 
		             <dc:creator>David Roberson</dc:creator> 
		             <category></category> 
		             <pubDate>Fri, 24 Jun 2022 00:50:00 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16658</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16658</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Wed, 22 Jun 2022 05:57:32 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I originally pursued a script that would render latitude and longitude gradients on a sphere, and succeed only in finding examples of latitude-equivalent gradients (though they did map to the sphere). Along the way, I started thinking that it would be simpler to map sample maps to a sphere inside the map script, rather than create gradients for use in Lookups. &lt;br /&gt;&lt;br /&gt;The question is whether that is even possible. I have seen a map script that has internally generated pseudo-perlin noise uv(w) mapped in the noise generating function. You can find it in &lt;a href=&quot;https://www.filterforge.com/filters/12486.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Planet Maker 3D&lt;/a&gt; by andyz.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Fri, 24 Jun 2022 00:50:00 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;While working on a spherical angular gradient, I realized what I want for &quot;uv mapping&quot; is essentially a &lt;b&gt;lookup&lt;/b&gt;. I'm about 1 step away from solving the spherical angular gradient problem, having gotten as far as creating an rgb spherical gradient, which I can turn into an angular gradient once I find out how to &lt;b&gt;sample hsb channels&lt;/b&gt; in the script (basically converting rgb to hsb internally). Finding documentation online is nearly impossible for Lua graphics scripting, so it would be very helpful to get help with those two things.&lt;/p&gt;
</description>
</item>
<item><title>Script to be able to load hundreds of images from a folder into FF?</title> 
		             <dc:creator>SpaceRay</dc:creator> 
		             <category></category> 
		             <pubDate>Sat, 02 Apr 2022 04:27:47 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16425</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16425</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 26 Sep 2021 01:23:59 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I have since long time ago had wished that FF could be able to load or import MULTIPLE images from a folder instead of ONLY ONE each time but it was not possible&lt;br /&gt;&lt;br /&gt;Could there be any possible way with an Script to load hundreds of images into bomber plus taken from a selected folder? I mean all the images from that folder and not selectively&lt;br /&gt;&lt;br /&gt;If not possible with a script could be maybe possible with an external tool that makes a bridge to do it?&lt;br /&gt;&lt;br /&gt;What I want is to make this shown here&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 26 Sep 2021 01:27:58 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Or bigger collage&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 26 Sep 2021 01:37:18 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Also using FF it could be possible to randomly distribute the images with different slight rotations as shown here&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 26 Sep 2021 01:52:31 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I thought that bomber plus would Not only import or load them, it would also apply some simple photo effects to each image and so you would make a unique collage that is not possible with any other software. I do not know if Studio Artist 5.5 could be able to do this&lt;br /&gt;&lt;b&gt;&lt;br /&gt;I remember that this was already asked some years ago and it was told that it was not possible to do because of the possible limitations of FF arquitecture and LUA scripting&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;But maybe could not made inside of FF, but Could there maybe done with an external tool that makes a bridge to be able to do it? &lt;br /&gt;&lt;br /&gt;maybe someone that is new to FF that knows scripting could do it now&lt;br /&gt;&lt;br /&gt;Thanks very much for any possible help&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;FFCreator&lt;/b&gt;, &lt;em&gt;Sun, 26 Sep 2021 07:56:30 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Some considerations without scripting.&lt;br /&gt;&lt;br /&gt;You can add as many ColorMapControls in a filter as you want.&lt;br /&gt;A ColorMapControl can contain an image that you choose (use the &quot;Allow images&quot; checkbox).&lt;br /&gt;So designing a filter with multiple different images is not the problem (?) &lt;br /&gt;&lt;br /&gt;But I assume you want to load all the (hundreds) images (in a folder) at once(?)&lt;br /&gt;Each filter has a associated text file (right click on a filter name and choose &quot;Locate File&quot; to see its location).&lt;br /&gt;An external tool that handles the filter (text) file can replace all the image filenames of the ColorMapControls (or do some more advanced stuff). &lt;br /&gt;&lt;br /&gt;But I think to use 100 images in a filter you need to design a filter with 100 ColorMapControls before you can substitute the filenames.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 26 Sep 2021 13:12:00 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thanks very much FFCreator&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;FFCreator wrote:&lt;/b&gt;&lt;br /&gt;You can add as many ColorMapControls in a filter as you want.&lt;br /&gt;A ColorMapControl can contain an image that you choose (use the &quot;Allow images&quot; checkbox).&lt;br /&gt;So designing a filter with multiple different images is not the problem (?) &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Sorry that I did not explain it correctly and show what is really the problem. You are totally right that you can have a filter with a hundred images with a 10 map switch of color map control input (or even a thousands images with 10 groups of these 10 map switchs)  and this is not the problem. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;The problem is LOAD MANUALLY one by one EACH image into each one of the 100 color controls, that would take a very long time.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Here is Skybase that showed that it is possible to have 10 map switch input and he also is right that this is not a good way to do it as you would cry when you have to select each one of the color controls to load each one&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 26 Sep 2021 13:18:02 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;a href=&quot;https://filterforge.com/forum/read.php?FID=14&amp;TID=6267&amp;MID=137124&amp;sphrase_id=5019701#message137124&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;LAB#3015 Skybase page 22&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Well somebody had to do it right?&lt;br /&gt;Here's everybody's nightmare come true: 100 input bomber.&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;The image above comes from this thread&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;FFCreator wrote:&lt;/b&gt;&lt;br /&gt;But I assume you want to load all the (hundreds) images (in a folder) at once(?) &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;YES, exactly, this is what I want, you nailed it. Sorry I did not tell exactly it above.&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;FFCreator wrote:&lt;/b&gt;&lt;br /&gt;But I think to use 100 images in a filter you need to design a filter with 100 ColorMapControls before you can substitute the filenames. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Of course, I agree that as I have showed above you must make first the filter with 100 Color controls and I can upload it here (I have to search for it first)&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;FFCreator wrote:&lt;/b&gt;&lt;br /&gt;An external tool that handles the filter (text) file can replace all the image filenames of the ColorMapControls (or do some more advanced stuff). &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;So do you mean that IF I take all the time needed to fill manually one by one each of the 100 color controls it could be possible then later to load another 100 different images with an external tool that would replace the filenames? &lt;br /&gt;&lt;br /&gt;Sorry that I do not know about scripting or coding, How would the external tool know what the new images filenames are? &lt;br /&gt;&lt;br /&gt;do you mean this?&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://www.ipadtouches.com/filter-forge-substitute-ffsubstitute/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;ffsubstitute&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thanks very much for your help&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 26 Sep 2021 14:18:41 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;So, now I could try it, I have downloaded it and have seen that it already includes the filter with 100 color controls and a PDF with instructions, so I will read the instructions included and see If I can use it.&lt;br /&gt;&lt;br /&gt;Thanks  very much and is great that it is already available and ready to use.&lt;br /&gt;&lt;br /&gt;I have searched in the forum and I found this from you&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;FFCreator wrote:&lt;/b&gt;&lt;br /&gt;I made a little tool &quot;FFSubstitute&quot;.&lt;br /&gt;&lt;br /&gt;It is a GUI based tool to substitute multiple filenames of images in a Filter Forge (5) filter (actually in a copy of it).&lt;br /&gt;Images of Color Controls with names that match the pattern Image##xyz will be replaced (substituted) by the sel ected filenames in FFSubstitute. So it is possible to substitute 999 image names at once (Image##001 .. Image##999)!&lt;br /&gt;&lt;br /&gt;FFSubstitute can be used in every filter that has Color Controls with the property â€œAllow imagesâ€ set. Color Controls with names that donâ€™t match the pattern Image##xyz will not be changed.&lt;br /&gt;&lt;br /&gt;You can download it for free from my website.&lt;br /&gt;In the download package you 'll find an adapted version of the &quot;100 input Bomber&quot; filter (original autor Skybase) for demo purposes and instructions to use.&lt;br /&gt;I have tested the tool with Filter Forge 5 and the adapted &quot;100 input Bomber filter&quot;.&lt;br /&gt;&lt;br /&gt;Let me now if it is useful for you.&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;And I was in this thread and I was writing and answer but I totally forgot about it and really did not test it&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;regidark&lt;/b&gt;, &lt;em&gt;Fri, 01 Apr 2022 06:25:40 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hello everyone! I would like to know if this tool &quot;FFsubstitute&quot; is available somewhere to download because it wouldn´t load the website.&lt;br /&gt;Thanks a lot in advance&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sat, 02 Apr 2022 04:27:47 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;regidark wrote:&lt;/b&gt;&lt;br /&gt;I would like to know if this tool &quot;FFsubstitute&quot; is available somewhere to download because it wouldn´t load the website.&lt;br /&gt;Thanks a lot in advance&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Well I have it but is 1200 kb and the forum only  allows 1000 kb so I would need to send it by email. So send me an message and I can send it.&lt;/p&gt;
</description>
</item>
<item><title>Pattern Filling</title> 
		             <dc:creator>ThreeDee</dc:creator> 
		             <category></category> 
		             <pubDate>Wed, 30 Mar 2022 05:34:38 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=10465</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=10465</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Thu, 13 Sep 2012 14:03:15 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Starting with the non-overlapping circles and moving toward pattern filling, now in Scripting mode.&lt;br /&gt;&lt;br /&gt;Here is the first brute-force non-overlapping circles Script.&lt;br /&gt;&lt;br /&gt;Not very sophisticated. I just take random locations and put a circle of random size there and make sure the radius isn't larger than the distance to the closest existing sphere. Lots of extra needless circles this way without really filling up the space.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Morgantao&lt;/b&gt;, &lt;em&gt;Thu, 13 Sep 2012 16:50:45 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Very nice to see your progress  :) &lt;br /&gt;&lt;br /&gt;Still have a bit of empty areas...  &lt;br /&gt;How about &lt;b&gt;move + shrink &lt;/b&gt;strategy?   I mean, you drop a circle at a random location, check for overlap (so far the same as what you did till now). Now instead of just shrinking the circle, how about nudging it's center a bit too?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;uberzev&lt;/b&gt;, &lt;em&gt;Thu, 13 Sep 2012 18:09:18 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;According to my measurements (External &amp;gt; Average) you've achieved 78.1% circle coverage.&lt;br /&gt;&lt;br /&gt; Decent first effort.  :D&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Thu, 13 Sep 2012 23:14:40 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;you've achieved 78.1% circle coverage&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;If you calculate it like that, filling a square with just one big circle will fill 78.5% of the image...  :D &lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;How about move + shrink strategy?&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;I have a few different steps planned.&lt;br /&gt;&lt;br /&gt;The first obvious improvement would be to ingore any coordinates for new circles that are inside other circles (and thus have a radius of 0). And to ensure a minimum size for the circles in the initial circle-creation stage, so we don't get tons of those tiny dots. &lt;br /&gt;&lt;br /&gt;But, more to the point, I have a different strategy planned, which works at least on paper, that is a fast way to do circle filling with no gaps in between. It's a bit more involved programming-wise. It is to fill the area so that any new circle created (apart from the first two) is always touching at least two existing circles.&lt;br /&gt;&lt;br /&gt;A fancier version would take into account the original image, it's lightness value or local contrast (detail amount) in determining the radius. This way it gets closer ot the original challenge.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Thu, 13 Sep 2012 23:29:05 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;The proper term is &quot;circle packing&quot;. I just Googled &quot;circle packing&quot; and landed right on &lt;a href=&quot;http://www.flickriver.com/photos/quasimondo/sets/72157600012142566/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Quasimondo's Flickr images.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;(Whatever happened to Quasimondo anyways? Haven't heard of him since 2008.)&lt;br /&gt;&lt;br /&gt;The proper circle packing algorithms seem quite complex.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;uberzev&lt;/b&gt;, &lt;em&gt;Thu, 13 Sep 2012 23:30:23 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Quasimondo was the guy (or one of the guys) who developed Aviary Peacock. I believe he stopped hanging here when he starting developing it.&lt;br /&gt;&lt;br /&gt; You should email him and tell him we want him back.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Fri, 14 Sep 2012 00:13:11 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Just giving the circles some space around them makes it look better.&lt;br /&gt;&lt;br /&gt;I finally read up on anti-aliasing zones and implemented it, so I don't have to set the antialiasing to &quot;all pixels&quot;.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Fri, 14 Sep 2012 00:14:55 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Oooo these are interesting to see in FilterForge.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Fri, 14 Sep 2012 03:18:05 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Some improvements. A new circle is added to the table &lt;i&gt;only&lt;/i&gt; if it is a valid circle (no overlap, above minimum size), so 600 circles fill the image in better than 2000 totally random circles did. &lt;br /&gt;&lt;br /&gt;The index number is now used for shading as well (combined with an 5-color gradient and an elevation gradient).&lt;br /&gt;&lt;br /&gt;I have one problem: For the life of me I can't seem to be able to handle getting out of the while-loop when the pattern is &quot;full&quot;. So it just throws an error when I increase the &quot;Number of circles&quot; slider above the point where the pattern is full. (by &quot;full&quot; I mean when 100 consecutive attempts to place a new circle fail.)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;uberzev&lt;/b&gt;, &lt;em&gt;Fri, 14 Sep 2012 03:25:47 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Nice work there!  This should be made into an official component.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Fri, 14 Sep 2012 03:51:53 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;WOW!!!! W O W !!! You are a genius ThreeDee, you have done a really great, nice and good work!! I like much what you have done until now.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;AWESOME!&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Fri, 14 Sep 2012 05:44:21 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Now this is starting to become fun. Image as color source.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Crapadilla&lt;/b&gt;, &lt;em&gt;Fri, 14 Sep 2012 05:50:49 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Nice!&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Fri, 14 Sep 2012 06:03:25 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;This will be the next FilterForge number one hit filter.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Fri, 14 Sep 2012 06:03:29 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;With my luck, this feature will be included in the next beta version of V4...  :|&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Fri, 14 Sep 2012 06:07:17 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I would like to use the original image to modify the radius of the circles as well. For some reason math.random() is disabled for get_sample function :?: so looks like I need to create a pseudo random number function for this.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Fri, 14 Sep 2012 06:36:49 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;By the way, here's a question. When sampling the color, are you deriving the mean or median? :o&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Fri, 14 Sep 2012 07:14:40 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Skybase wrote:&lt;/b&gt; When sampling the color, are you deriving the mean or median?&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Just the center point of the circle.&lt;br /&gt;&lt;br /&gt;Okay, so I got the pseudo-random number function working, so now I can use the original image for size information. Darker areas make the initial circle sizes smaller.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sharandra&lt;/b&gt;, &lt;em&gt;Fri, 14 Sep 2012 07:26:28 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Very cool, Threedee! Great that you took this challenge up! :D &lt;br /&gt;I guess once you got it all working properly it could be any shape, not just circles?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Fri, 14 Sep 2012 08:19:57 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Circles are easier than random shapes as you can calculate the distance from their perimeter very easily. But yes, the ultimate goal is to be able to do this with any shape. Or even a number of different shapes.&lt;br /&gt;&lt;br /&gt;I like how the Lionfish comes out.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Fri, 14 Sep 2012 08:20:38 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Maximum circle size variation gives a fractal-like look.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Fri, 14 Sep 2012 08:32:06 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Small size range.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Fri, 14 Sep 2012 09:08:05 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Ok, pretty good. But now let's go back to basics.&lt;br /&gt;&lt;br /&gt;The packing density achieved with the current method is fairly good.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Fri, 14 Sep 2012 09:09:09 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;However, when you compare it to a properly packed texture, you can see it can be vastly improved.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://payload.cargocollective.com/1/1/47625/1626575/cp16.jpg&quot; id=&quot;popup_68185147&quot; border=&quot;0&quot; width=&quot;300&quot; height=&quot;300&quot; data-bx-viewer=&quot;image&quot; data-bx-src=&quot;http://payload.cargocollective.com/1/1/47625/1626575/cp16.jpg&quot; /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Fri, 14 Sep 2012 09:48:55 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Now, the math necessary to achieve that is way too complex for my taste, so here's my simplified approach/theory which should give a relatively good result:&lt;br /&gt;&lt;br /&gt;Take two connected circles in the center and start drawing circles  which touch the previous circle and the lowest available index circle filling in the space in clockwise direction.&lt;br /&gt;&lt;br /&gt;Should be simple to implement and should give a good result.&lt;br /&gt;&lt;br /&gt;The only foreseeable problem is what to do if the shape grows itself into an internal dead-end. So there needs to be an excape route when the next circle cannot be added in this wise.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Fri, 14 Sep 2012 09:56:17 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;:o Interesting approach. I always imagined you needed some form of buffer for doing this.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Fri, 14 Sep 2012 10:16:29 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Nice, well done and interesting this two examples you have made&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://filterforge.com/upload/forum/upload/0e8/Circle-packing-05.jpg&quot; id=&quot;popup_1415383192&quot; border=&quot;0&quot; width=&quot;300&quot; height=&quot;300&quot; data-bx-viewer=&quot;image&quot; data-bx-src=&quot;http://filterforge.com/upload/forum/upload/0e8/Circle-packing-05.jpg&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://filterforge.com/upload/forum/upload/f23/Circle-packing-06C.jpg&quot; id=&quot;popup_322482907&quot; border=&quot;0&quot; width=&quot;300&quot; height=&quot;300&quot; data-bx-viewer=&quot;image&quot; data-bx-src=&quot;http://filterforge.com/upload/forum/upload/f23/Circle-packing-06C.jpg&quot; /&gt;&lt;br /&gt;&lt;br /&gt;Of course that this canÂ´t be compared to the very tight and very compressed and VERY packed circles like this other example&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://payload.cargocollective.com/1/1/47625/1626575/cp16.jpg&quot; id=&quot;popup_963542001&quot; border=&quot;0&quot; width=&quot;300&quot; height=&quot;300&quot; data-bx-viewer=&quot;image&quot; data-bx-src=&quot;http://payload.cargocollective.com/1/1/47625/1626575/cp16.jpg&quot; /&gt;&lt;br /&gt;&lt;br /&gt;BUT I think that although this is better, your example are not in bad at all, and are just different way, and I agree that surely to be able to make this very compact and tight packing would involve much more complex math and a different algorithm.&lt;br /&gt;&lt;br /&gt;Please, continue your great work and keep getting it better and better  :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Quasimondo&lt;/b&gt;, &lt;em&gt;Tue, 18 Sep 2012 07:20:05 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;(Whatever happened to Quasimondo anyways? Haven't heard of him since 2008.) &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Hi guys,&lt;br /&gt;&lt;br /&gt;it's been a few years but I just downloaded the latest version of Filter Forge only to discover that there is scripting possible now. Wow that's neat! I guess that might drag me right back in here. Looks like I have to learn Lua now.&lt;br /&gt;&lt;br /&gt;Also saw the &quot;Bomber&quot; component (which did not exist back in the days when I was still quite active here) which I cannot help to remind me a quite a but of my &quot;Autopainter&quot; hub in Peacock ;-). But of course I can't deny that I might have taken the one or the other inspiration here when I made Peacock.&lt;br /&gt;&lt;br /&gt;Seeing this thread makes me want to try out how my circle packing method works perfomance-wise with Lua: &lt;a href=&quot;http://www.curioos.com/quasimondo/Pie-Packing/Starry-Night-Pie-Packed/000001070/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Starry Night Pie Packed&lt;/a&gt;&lt;br /&gt;Cheers&lt;br /&gt;Mario&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Tue, 18 Sep 2012 07:32:41 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Awesome, Quasimondo has returned!  :ff: Welcome back!&lt;br /&gt;&lt;br /&gt;I love your implementations of circle packing, especially the flavor of fitting them into the largest available space.&lt;br /&gt;&lt;br /&gt;Lua will be a piece of cake for you.&lt;br /&gt;&lt;br /&gt;TD&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Crapadilla&lt;/b&gt;, &lt;em&gt;Tue, 18 Sep 2012 07:35:48 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Quasi is alive! :beer:  :D&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Mon, 26 Nov 2012 11:05:32 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Please, any information update of this amazing and awesome filter project?&lt;br /&gt;&lt;br /&gt;Is ThreeDee missing again? The last message is from 26 October, one month ago, and in this thread was in september 18 and now we are in November 26.&lt;br /&gt;&lt;br /&gt;What ThreeDee have done here looks really nice and well done and does not necessarily need to be like the Quasimondo examples, I like it already just as the examples available above from ThreeDee&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ddaydreams&lt;/b&gt;, &lt;em&gt;Thu, 27 Dec 2012 23:11:44 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;It looked promising I hope something good will come from the effort. In the mean time I use peculator on my iphone. This level of math is way beyond me or I would give it shot in FF.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Fri, 28 Dec 2012 02:44:51 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;ddaydreams&lt;br /&gt;&lt;br /&gt;It looked promising I hope something good will come fr om the effort.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;I wish and hope that too, although I think that he has already got it right as it is now, as the image of the FF Lionfish is already well done as shown here.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://filterforge.com/upload/forum/upload/f23/Circle-packing-06C.jpg&quot; id=&quot;popup_213728113&quot; border=&quot;0&quot; width=&quot;300&quot; height=&quot;300&quot; data-bx-viewer=&quot;image&quot; data-bx-src=&quot;http://filterforge.com/upload/forum/upload/f23/Circle-packing-06C.jpg&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;ddaydreams&lt;br /&gt;In the mean time I use peculator on my iphone&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;YES!! The &lt;a href=&quot;http://www.google.co.uk/search?num=10&amp;hl=en&amp;site=imghp&amp;tbm=isch&amp;source=hp&amp;biw=1920&amp;bih=917&amp;q=percolator+app&amp;oq=percolator+app&amp;gs_l=img.3..0j0i24l9.1045.8173.0.8684.32.14.4.14.3.0.191.1435.11j3.14.0...0.0...1ac.1.MINg675cvKE&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Percolator App for Iphone or Ipad&lt;/a&gt; is really excellent and amazing what it can do.&lt;br /&gt;&lt;br /&gt;Although the problem with it is that is limited to a resolution of 2048 x 2048, and here in filter forge would not have a lim it, BUT you can use the &quot;Live Trace&quot; or &quot;Image trace&quot; of Adobe Illustrator or from Corel Draw and convert it to vector (it seems that it works very well) and then you can have the percolated image in ANY resolution you want.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;PERCOLATOR USED THE WAY OF THREEDEE AND NOT FROM QUASIMONDO&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;ThreeDee wanted to get to the level of very tight circle packing that Quasimondo have shown in his beautiful and wonderful examples, BUT it seems that this is more complex than it seems, and so others app available, like Percolator is using the more separate and less space filling as shown already by ThreeDee in the examples above and it looks very nice too anyway. &lt;br /&gt;&lt;br /&gt;I have not yet found any information related to the very tight and compressed circle packing that Quasimondo have shown and is using, and do not know how he has done it, perhaps is a own special programmed software made by himself   or using something like the &lt;a href=&quot;http://www.processing.org&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Processing language&lt;/a&gt; to make his own algorithm.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ddaydreams&lt;/b&gt;, &lt;em&gt;Mon, 31 Dec 2012 18:59:39 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;YES!! The Percolator App for Iphone or Ipad is really excellent and amazing what it can do. Although the problem with it is that is limited to a resolution of 2048 x 2048, and here in filter forge would not have a lim it, BUT you can use the &quot;Live Trace&quot; or &quot;Image trace&quot; of Adobe Illustrator or from Corel Draw and convert it to vector (it seems that it works very well) and then you can have the percolated image in ANY resolution you want. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Yes convert peculator image to vector is probably a good option. I'll have to try that sometime&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Mon, 31 Dec 2012 20:12:47 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;so... well aside from our established group, anybody doing actual research on how this effect is achieved properly? :p&lt;br /&gt;&lt;br /&gt;Might be interesting to see it implemented with this: &lt;a href=&quot;http://en.wikipedia.org/wiki/Halton_sequence&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://en.wikipedia.org/wiki/Halton_sequence&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ddaydreams&lt;/b&gt;, &lt;em&gt;Mon, 31 Dec 2012 20:34:02 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Apollonian sphere packing&lt;br /&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Apollonian_sphere_packing&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://en.wikipedia.org/wiki/Apollonian_sphere_packing&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Mon, 31 Dec 2012 22:41:59 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;That's probably the most direct manner, though given the fact that it's a pretty set thing, you don't have many choices for alternative design attempts. &lt;br /&gt;&lt;br /&gt;ThreeDee's approach is actually kinda neat. If done right, you probably don't need trig because each circle is being drawn in a spiral form. So given the first x radius, draw the next circle next to it, and spiral outwards = probably a nice clean method.&lt;br /&gt;&lt;br /&gt;//unrelated to filterforge....&lt;br /&gt;&lt;br /&gt;On a totally unrelated FilterForge note... here's something I did a while ago. Colors derived from image. :) Self homework = make it fully original without deriving bits and pieces of code from everywhere.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ddaydreams&lt;/b&gt;, &lt;em&gt;Mon, 31 Dec 2012 22:51:16 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Skybase, what app did you do that in?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Mon, 31 Dec 2012 23:11:05 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Processing. ;)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Mon, 31 Dec 2012 23:13:59 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;//more commentary unrelated to filterforge&lt;br /&gt;A less elegant but hyper easy approach using StudioArtist 4. Program lets you do a lot of crazy things. Which is nice.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Betis&lt;/b&gt;, &lt;em&gt;Sun, 24 Feb 2013 15:21:47 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hey guys, I came across this cool 3DS Max plugin that does this in 3D!&lt;br /&gt;&lt;a href=&quot;https://sites.google.com/site/autofill21/gallery&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;https://sites.google.com/site/autofill21/gallery&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It's written in python, but it's open-source! Maybe similar methods could be applied to FF lua.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Sun, 24 Feb 2013 21:25:51 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;autoPack is pretty cool. As more of a side-information related to autoPack, the plugin lets you load up protein molecules with studied structures and animation in various model modes. You use these to fill space up with cellPack. They were doing a contest a while ago promoting the cellPack thing. CellPack crashes a lot so I've only gotten it to work once unfortunately.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Mon, 25 Feb 2013 20:46:43 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;If you may be interested in circle packing in 3D (sphere packing) I have found some time ago this very good and interesting tutorial for Cinema 4D --&amp;gt; &lt;a href=&quot;http://greyscalegorilla.com/blog/2011/05/how-to-make-and-modern-art-gallery-installation-animation-with-cinema-4d/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Some kind of Sphere Packing in 3D&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It shows how to make the sphere be packed in the tighest and closer one to each other in a dynamic way.&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;ddaydreams &lt;br /&gt;&lt;br /&gt;Skybase, what app did you do that in? &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Skybase is using the &lt;a href=&quot;http://www.processing.org&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Processing scripting language&lt;/a&gt; and if you want to have more information you can see this &lt;a href=&quot;http://www.filterforge.com/forum/read.php?FID=15&amp;TID=9673&amp;MID=115989&amp;sphrase_id=1461027#message115989&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;other thread with further links&lt;/a&gt; to know what it is about.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ddaydreams&lt;/b&gt;, &lt;em&gt;Mon, 25 Feb 2013 20:55:26 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thanks SpaceRay&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Mon, 25 Feb 2013 23:09:48 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;SpaceRay, provided that tutorial, all you need to do is just add a repelling factor to each instance of a sphere. You can then turn up the ambient color and get flat-shaded circles for output. Cinema also allows you to sample colors based on image input. Pretty sure I remember I did that so the shader setup might be confusing but the actual process shouldn't be difficult.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ddaydreams&lt;/b&gt;, &lt;em&gt;Sun, 27 Apr 2014 22:00:11 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Did this filter that Threedee made in 2012 in FF make it into the FF library or did the ffxml file get shared somewhere in the FF forums or elsewhere online?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Mon, 28 Apr 2014 02:23:51 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;lol ahhh good memories.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Crapadilla&lt;/b&gt;, &lt;em&gt;Mon, 28 Apr 2014 06:45:05 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Did this filter make it into the FF library?&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.filterforge.com/filters/author7372-page1.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Nope, I don't think it did.&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Ramlyn&lt;/b&gt;, &lt;em&gt;Mon, 28 Apr 2014 12:02:51 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;It would be nice to have it. :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Borkus McJorkus&lt;/b&gt;, &lt;em&gt;Fri, 08 Aug 2014 12:54:18 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Has this filter been completed?  And if so, where can I find it?  For maybe a decade now, I've been looking for a filter that fills the selection with bubbles; this is as close as I've ever found.&lt;/p&gt;
</description>
</item>
<item><title>Initialization problem</title> 
		             <dc:creator>Sphinx.</dc:creator> 
		             <category></category> 
		             <pubDate>Mon, 28 Mar 2022 08:52:41 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=8754</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=8754</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Sun, 21 Aug 2011 07:41:22 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I'm working on a filter with a rather heavy initialization section. In theory the initialization script part should execute one time (I'm testing with only CPU core), however I counted more than 60 executions :-S&lt;br /&gt;&lt;br /&gt;Here is a dedicated test script that shows the problem (also attached, note it is unsafe due to the os.time() call):&lt;br /&gt;[CODE]&lt;br /&gt;function prepare()&lt;br /&gt;	do_initialize = true&lt;br /&gt;	stamp = os.time()&lt;br /&gt;	print(&quot;prepare (&quot;..stamp..&quot;) ---------------------&quot;);&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	if do_initialize then&lt;br /&gt;		do_initialize = false&lt;br /&gt;		print(&quot;initialize (&quot;..stamp..&quot;); x = &quot; .. x ..&quot;, y = &quot;..y);&lt;br /&gt;	end&lt;br /&gt;	return 0,0,0,0&lt;br /&gt;end;&lt;br /&gt;[/CODE]&lt;br /&gt;&lt;br /&gt;Here is the output (Filter Forge x86.log):&lt;br /&gt;&lt;br /&gt;[CODE]&lt;br /&gt;prepare (1313930290) ---------------------&lt;br /&gt;initialize (1313930290); x = 0,00083333333333333, y = 0,00083333333333333&lt;br /&gt;initialize (1313930290); x = 0,12583333333333, y = 0,00083333333333333&lt;br /&gt;initialize (1313930290); x = 0,25083333333333, y = 0,00083333333333333&lt;br /&gt;initialize (1313930290); x = 0,37583333333333, y = 0,00083333333333333&lt;br /&gt;initialize (1313930290); x = 0,50083333333333, y = 0,00083333333333333&lt;br /&gt;initialize (1313930290); x = 0,62583333333333, y = 0,00083333333333333&lt;br /&gt;initialize (1313930290); x = 0,75083333333333, y = 0,00083333333333333&lt;br /&gt;initialize (1313930290); x = 0,87583333333333, y = 0,00083333333333333&lt;br /&gt;initialize (1313930290); x = 0,00083333333333333, y = 0,12583333333333&lt;br /&gt;initialize (1313930290); x = 0,12583333333333, y = 0,12583333333333&lt;br /&gt;initialize (1313930290); x = 0,25083333333333, y = 0,12583333333333&lt;br /&gt;initialize (1313930290); x = 0,37583333333333, y = 0,12583333333333&lt;br /&gt;initialize (1313930290); x = 0,50083333333333, y = 0,12583333333333&lt;br /&gt;initialize (1313930290); x = 0,62583333333333, y = 0,12583333333333&lt;br /&gt;initialize (1313930290); x = 0,75083333333333, y = 0,12583333333333&lt;br /&gt;initialize (1313930290); x = 0,87583333333333, y = 0,12583333333333&lt;br /&gt;initialize (1313930290); x = 0,00083333333333333, y = 0,25083333333333&lt;br /&gt;initialize (1313930290); x = 0,12583333333333, y = 0,25083333333333&lt;br /&gt;initialize (1313930290); x = 0,25083333333333, y = 0,25083333333333&lt;br /&gt;initialize (1313930290); x = 0,37583333333333, y = 0,25083333333333&lt;br /&gt;initialize (1313930290); x = 0,50083333333333, y = 0,25083333333333&lt;br /&gt;initialize (1313930290); x = 0,62583333333333, y = 0,25083333333333&lt;br /&gt;initialize (1313930290); x = 0,75083333333333, y = 0,25083333333333&lt;br /&gt;initialize (1313930290); x = 0,87583333333333, y = 0,25083333333333&lt;br /&gt;initialize (1313930290); x = 0,00083333333333333, y = 0,37583333333333&lt;br /&gt;initialize (1313930290); x = 0,12583333333333, y = 0,37583333333333&lt;br /&gt;initialize (1313930290); x = 0,25083333333333, y = 0,37583333333333&lt;br /&gt;initialize (1313930290); x = 0,37583333333333, y = 0,37583333333333&lt;br /&gt;initialize (1313930290); x = 0,50083333333333, y = 0,37583333333333&lt;br /&gt;initialize (1313930290); x = 0,62583333333333, y = 0,37583333333333&lt;br /&gt;initialize (1313930290); x = 0,75083333333333, y = 0,37583333333333&lt;br /&gt;initialize (1313930290); x = 0,87583333333333, y = 0,37583333333333&lt;br /&gt;initialize (1313930290); x = 0,00083333333333333, y = 0,50083333333333&lt;br /&gt;initialize (1313930290); x = 0,12583333333333, y = 0,50083333333333&lt;br /&gt;initialize (1313930290); x = 0,25083333333333, y = 0,50083333333333&lt;br /&gt;initialize (1313930290); x = 0,37583333333333, y = 0,50083333333333&lt;br /&gt;initialize (1313930290); x = 0,50083333333333, y = 0,50083333333333&lt;br /&gt;initialize (1313930290); x = 0,62583333333333, y = 0,50083333333333&lt;br /&gt;initialize (1313930290); x = 0,75083333333333, y = 0,50083333333333&lt;br /&gt;initialize (1313930290); x = 0,87583333333333, y = 0,50083333333333&lt;br /&gt;initialize (1313930290); x = 0,00083333333333333, y = 0,62583333333333&lt;br /&gt;initialize (1313930290); x = 0,12583333333333, y = 0,62583333333333&lt;br /&gt;initialize (1313930290); x = 0,25083333333333, y = 0,62583333333333&lt;br /&gt;initialize (1313930290); x = 0,37583333333333, y = 0,62583333333333&lt;br /&gt;initialize (1313930290); x = 0,50083333333333, y = 0,62583333333333&lt;br /&gt;initialize (1313930290); x = 0,62583333333333, y = 0,62583333333333&lt;br /&gt;initialize (1313930290); x = 0,75083333333333, y = 0,62583333333333&lt;br /&gt;initialize (1313930290); x = 0,87583333333333, y = 0,62583333333333&lt;br /&gt;initialize (1313930290); x = 0,00083333333333333, y = 0,75083333333333&lt;br /&gt;initialize (1313930290); x = 0,12583333333333, y = 0,75083333333333&lt;br /&gt;initialize (1313930290); x = 0,25083333333333, y = 0,75083333333333&lt;br /&gt;initialize (1313930290); x = 0,37583333333333, y = 0,75083333333333&lt;br /&gt;initialize (1313930290); x = 0,50083333333333, y = 0,75083333333333&lt;br /&gt;initialize (1313930290); x = 0,62583333333333, y = 0,75083333333333&lt;br /&gt;initialize (1313930290); x = 0,75083333333333, y = 0,75083333333333&lt;br /&gt;initialize (1313930290); x = 0,87583333333333, y = 0,75083333333333&lt;br /&gt;initialize (1313930290); x = 0,00083333333333333, y = 0,87583333333333&lt;br /&gt;initialize (1313930290); x = 0,12583333333333, y = 0,87583333333333&lt;br /&gt;initialize (1313930290); x = 0,25083333333333, y = 0,87583333333333&lt;br /&gt;initialize (1313930290); x = 0,37583333333333, y = 0,87583333333333&lt;br /&gt;initialize (1313930290); x = 0,50083333333333, y = 0,87583333333333&lt;br /&gt;initialize (1313930290); x = 0,62583333333333, y = 0,87583333333333&lt;br /&gt;initialize (1313930290); x = 0,75083333333333, y = 0,87583333333333&lt;br /&gt;initialize (1313930290); x = 0,87583333333333, y = 0,87583333333333&lt;br /&gt;[/CODE]&lt;br /&gt;&lt;br /&gt;Variable &quot;do_initialize&quot; should remain false, but for some reason it doesn't. &quot;Prepare&quot; is only executed once, so what the h*** is going on here? Is this related to the rendering &quot;tiles&quot;?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Sun, 21 Aug 2011 08:11:49 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;This is very annoying :-S I can't prepare the script in function Prepare because get_sample calls are not allowed (I need to analyze multiple image inputs to get average color of the inputs). &lt;br /&gt;&lt;br /&gt;So I'm left with the option to analyze the images in the main get_sample function (with a similar initialization setup as described above). But the extreme overhead caused by the multiple executions (as described above) makes it practically unusable.. :evil: &lt;br /&gt;&lt;br /&gt;We really need a middle way here: some sort of initialization function that allows get_sample calls and can produce data that is shared in all threads/tiles.. &lt;br /&gt;&lt;br /&gt;FF programmers.. any comments?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Igor Lorents&lt;/b&gt;, &lt;em&gt;Mon, 22 Aug 2011 05:27:17 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Sphinx, thank you for reporting the issue.&lt;br /&gt;&lt;br /&gt;The problem seems to be in our architecture. Changes you've made in the Global table which contains definition for all global variables after the first initialization (which is made by calling the prepare() routine) do not propagate properly.&lt;br /&gt;That's why your initialization code in get_sample() function executes each time when the new rendering block is started.&lt;br /&gt;The problem should still persist even if you use single-threaded rendering, and your test sample illustrates it very well.&lt;br /&gt;&lt;br /&gt;So, this issue seems to be a pretty large piece of work, and unfortunately I won't have time for it until the release of version 3.0.&lt;br /&gt;&lt;br /&gt;Sorry for the inconvenience.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Mon, 22 Aug 2011 07:16:46 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I see - after Prepare has been called you assume the global table is not changed and simply copy the table... &lt;br /&gt;&lt;br /&gt;Could you possibly add some sort of &quot;super global&quot; table that works across tiles, or allow get_sample calls in prepare?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Igor Lorents&lt;/b&gt;, &lt;em&gt;Mon, 22 Aug 2011 07:42:08 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Could you possibly add some sort of &quot;super global&quot; table that works across tiles, or allow get_sample calls in prepare?&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Unfortunately no, because the behavior of the suggested &quot;super global&quot; table is absolutely equal to the intended behavior of the global table. We'll just have to implement it properly :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Mon, 22 Aug 2011 09:06:19 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Sigh... well, that &quot;bug&quot; along with the darn unpersist error blocks several of my projects. Patience..&lt;br /&gt;&lt;br /&gt;Thanks for the explanation anyways.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Thu, 17 Nov 2011 05:43:34 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Alright, FF3 released - time to bring this up again :-)&lt;br /&gt;&lt;br /&gt;The problem still persists: &lt;br /&gt;&lt;br /&gt;Global variables are not truly global, but only &quot;global&quot; inside a given rendering block. This will ruin smart logic such as initialization regions. &lt;br /&gt;&lt;br /&gt;A typical scenario: collect a set of samples and use their properties to determine global filtering (e.g. auto levels). This initial sample collection is only necessary to do once.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Fri, 21 Nov 2014 02:14:11 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;So, any news on this issue? Script filters with heavy prepare/initialization sections are unreasonably slow...&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Fri, 21 Nov 2014 03:20:31 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Here is ThreeDee's cool circle packer filter. It uses an initialization section to prepare some stuff based on sampler inputs. Its essentially the same as using the prepare method only you blocked the possibility to use sampler sources for preparation, so he has to use an init variable and do it in get_sample.. nothing weird about that design. &lt;br /&gt;&lt;br /&gt;I stripped the actual rendering script so all this filter is doing in theory is that one initialization, however in reality this seems to be called for each of your internal temporary rendering tiles :eek:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[CODE]&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;&lt;br /&gt;	-- only on first run:&lt;br /&gt;	if init == 0 then &lt;br /&gt;          get_circles() --get_circles set init = 1&lt;br /&gt;	end -- if init == 0&lt;br /&gt;	local r,g,b = 1,1,1&lt;br /&gt;	return r,g,b,1,aa_zone&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Ramlyn&lt;/b&gt;, &lt;em&gt;Fri, 21 Nov 2014 09:26:01 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Humm... so it repeats the same process also when it is not needed.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Fri, 21 Nov 2014 09:28:22 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Yes, for each of those rendering blocks you see being completed during rendering.. and if you have multiple pass rendering enabled (that is default) it is number of blocks x number of passes..&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 23 Nov 2014 15:34:17 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hey, I had a thought:&lt;br /&gt;&lt;br /&gt;How about using an unsafe script to store the precalculation to a (comma-delimited?) text file when a checkbox is activated. You can set it up so that only the first thread does this calculation and saving of the file by making sure the coordinates are less than 1/16th of the shorter dimension of the image (and init ==0). Other threads do nothing while the checkbox in on.&lt;br /&gt;&lt;br /&gt;Then when the checkbox is clicked off the filter reads the precalculation file instead of doing the calculation. Hopefully this can be done during the Prepare() function so it doesn't have to be done for each thread.&lt;br /&gt;&lt;br /&gt;This is similar solution to what Ken (with some help from the undersigned) did with the embedded external image:&lt;br /&gt;&lt;a href=&quot;https://www.filterforge.com/forum/read.php?FID=11&amp;TID=11438&amp;MID=120745#message120745&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;https://www.filterforge.com/forum/read...sage120745&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Won't be able to submit to library as it is an unsafe script. Otherwise I don't see why it wouldn't work.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Mon, 24 Nov 2014 02:26:58 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Yes, that will probably do as a temporary workaround for private filters (since we can't submit unsecure filters). &lt;br /&gt;&lt;br /&gt;However the main point of this 3 year, 3 months and 3 days old thread is still very valid: script filters with heavy global initialization are quite inefficiently executed.&lt;br /&gt;&lt;br /&gt;I wish they had a &quot;fastmode&quot; render mode that skipped all the render block stuff all together. One render block to rule them all (and that one blocks resolution = the output image resolution). No magic, no preview, no multipass.. just raw to the bone processing.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Tue, 25 Nov 2014 05:52:44 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Yum Yum.. &lt;a href=&quot;http://lua-users.org/wiki/SaveTableToFile&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lua-users.org/wiki/SaveTableToFile&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Wed, 26 Nov 2014 10:06:31 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Sphinx wrote:&lt;/b&gt; I wish they had a &quot;fastmode&quot; render mode that skipped all the render block stuff all together. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Couldn't agree with you more. Lack of such an option makes script optimization a bitch.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Sun, 12 Jul 2015 13:44:12 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Vlad, GMM anyone... are you going to address this multithreading performance issue in V5?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;GMM&lt;/b&gt;, &lt;em&gt;Mon, 13 Jul 2015 05:40:30 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I hope this is going to be fixed at the time we implement LuaJIT which is supposed to be faster and better overall. I'm not sure LuaJIT will make its way into FF5 but it's in the works.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;trung&lt;/b&gt;, &lt;em&gt;Tue, 08 Sep 2015 22:13:11 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;longish iterative process, and not really necessary if you can use other commands&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Sat, 21 Nov 2015 02:43:54 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Filter Forge x86 5.006.38069.21538. &lt;br /&gt;&lt;br /&gt;Problem still present - an init call that theoretically should called *once* is called for each rendering tile etc. :cry:  &lt;br /&gt;&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;&lt;br /&gt;	do_initialize = true&lt;br /&gt;	stamp = os.time()&lt;br /&gt;	print(&quot;prepare (&quot;..stamp..&quot;) ---------------------&quot;);&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	if do_initialize then&lt;br /&gt;		do_initialize = false&lt;br /&gt;		print(&quot;initialize (&quot;..stamp..&quot;); x = &quot; .. x ..&quot;, y = &quot;..y);&lt;br /&gt;	end&lt;br /&gt;&lt;br /&gt;	return 0,0,0,0&lt;br /&gt;end;[/CODE]&lt;br /&gt;&lt;br /&gt;Above script produces the following log output. Ideally we should see one line only.&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Filter Forge x86.log Wrote:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Filter Forge x86 5.006.38069.21538 Release, November 19, 2015 09:43 [21-11-2015 08:35:38 Rom, normaltid]&lt;br /&gt;prepare (1448091338) ---------------------&lt;br /&gt;initialize (1448091338); x = 0,00083333333333333, y = 0,00083333333333333&lt;br /&gt;initialize (1448091338); x = 0,12583333333333, y = 0,00083333333333333&lt;br /&gt;initialize (1448091338); x = 0,25083333333333, y = 0,00083333333333333&lt;br /&gt;initialize (1448091338); x = 0,37583333333333, y = 0,00083333333333333&lt;br /&gt;initialize (1448091338); x = 0,50083333333333, y = 0,00083333333333333&lt;br /&gt;initialize (1448091338); x = 0,62583333333333, y = 0,00083333333333333&lt;br /&gt;initialize (1448091338); x = 0,75083333333333, y = 0,00083333333333333&lt;br /&gt;initialize (1448091338); x = 0,87583333333333, y = 0,00083333333333333&lt;br /&gt;initialize (1448091338); x = 0,00083333333333333, y = 0,12583333333333&lt;br /&gt;initialize (1448091338); x = 0,12583333333333, y = 0,12583333333333&lt;br /&gt;initialize (1448091338); x = 0,25083333333333, y = 0,12583333333333&lt;br /&gt;initialize (1448091338); x = 0,37583333333333, y = 0,12583333333333&lt;br /&gt;initialize (1448091338); x = 0,50083333333333, y = 0,12583333333333&lt;br /&gt;initialize (1448091338); x = 0,62583333333333, y = 0,12583333333333&lt;br /&gt;initialize (1448091338); x = 0,75083333333333, y = 0,12583333333333&lt;br /&gt;initialize (1448091338); x = 0,87583333333333, y = 0,12583333333333&lt;br /&gt;initialize (1448091338); x = 0,00083333333333333, y = 0,25083333333333&lt;br /&gt;initialize (1448091338); x = 0,12583333333333, y = 0,25083333333333&lt;br /&gt;initialize (1448091338); x = 0,25083333333333, y = 0,25083333333333&lt;br /&gt;initialize (1448091338); x = 0,37583333333333, y = 0,25083333333333&lt;br /&gt;initialize (1448091338); x = 0,50083333333333, y = 0,25083333333333&lt;br /&gt;initialize (1448091338); x = 0,62583333333333, y = 0,25083333333333&lt;br /&gt;initialize (1448091338); x = 0,75083333333333, y = 0,25083333333333&lt;br /&gt;initialize (1448091338); x = 0,87583333333333, y = 0,25083333333333&lt;br /&gt;initialize (1448091338); x = 0,00083333333333333, y = 0,37583333333333&lt;br /&gt;initialize (1448091338); x = 0,12583333333333, y = 0,37583333333333&lt;br /&gt;initialize (1448091338); x = 0,25083333333333, y = 0,37583333333333&lt;br /&gt;initialize (1448091338); x = 0,37583333333333, y = 0,37583333333333&lt;br /&gt;initialize (1448091338); x = 0,50083333333333, y = 0,37583333333333&lt;br /&gt;initialize (1448091338); x = 0,62583333333333, y = 0,37583333333333&lt;br /&gt;initialize (1448091338); x = 0,75083333333333, y = 0,37583333333333&lt;br /&gt;initialize (1448091338); x = 0,87583333333333, y = 0,37583333333333&lt;br /&gt;initialize (1448091338); x = 0,00083333333333333, y = 0,50083333333333&lt;br /&gt;initialize (1448091338); x = 0,12583333333333, y = 0,50083333333333&lt;br /&gt;initialize (1448091338); x = 0,25083333333333, y = 0,50083333333333&lt;br /&gt;initialize (1448091338); x = 0,37583333333333, y = 0,50083333333333&lt;br /&gt;initialize (1448091338); x = 0,50083333333333, y = 0,50083333333333&lt;br /&gt;initialize (1448091338); x = 0,62583333333333, y = 0,50083333333333&lt;br /&gt;initialize (1448091338); x = 0,75083333333333, y = 0,50083333333333&lt;br /&gt;initialize (1448091338); x = 0,87583333333333, y = 0,50083333333333&lt;br /&gt;initialize (1448091338); x = 0,00083333333333333, y = 0,62583333333333&lt;br /&gt;initialize (1448091338); x = 0,12583333333333, y = 0,62583333333333&lt;br /&gt;initialize (1448091338); x = 0,25083333333333, y = 0,62583333333333&lt;br /&gt;initialize (1448091338); x = 0,37583333333333, y = 0,62583333333333&lt;br /&gt;initialize (1448091338); x = 0,50083333333333, y = 0,62583333333333&lt;br /&gt;initialize (1448091338); x = 0,62583333333333, y = 0,62583333333333&lt;br /&gt;initialize (1448091338); x = 0,75083333333333, y = 0,62583333333333&lt;br /&gt;initialize (1448091338); x = 0,87583333333333, y = 0,62583333333333&lt;br /&gt;initialize (1448091338); x = 0,00083333333333333, y = 0,75083333333333&lt;br /&gt;initialize (1448091338); x = 0,12583333333333, y = 0,75083333333333&lt;br /&gt;initialize (1448091338); x = 0,25083333333333, y = 0,75083333333333&lt;br /&gt;initialize (1448091338); x = 0,37583333333333, y = 0,75083333333333&lt;br /&gt;initialize (1448091338); x = 0,50083333333333, y = 0,75083333333333&lt;br /&gt;initialize (1448091338); x = 0,62583333333333, y = 0,75083333333333&lt;br /&gt;initialize (1448091338); x = 0,75083333333333, y = 0,75083333333333&lt;br /&gt;initialize (1448091338); x = 0,87583333333333, y = 0,75083333333333&lt;br /&gt;initialize (1448091338); x = 0,00083333333333333, y = 0,87583333333333&lt;br /&gt;initialize (1448091338); x = 0,12583333333333, y = 0,87583333333333&lt;br /&gt;initialize (1448091338); x = 0,25083333333333, y = 0,87583333333333&lt;br /&gt;initialize (1448091338); x = 0,37583333333333, y = 0,87583333333333&lt;br /&gt;initialize (1448091338); x = 0,50083333333333, y = 0,87583333333333&lt;br /&gt;initialize (1448091338); x = 0,62583333333333, y = 0,87583333333333&lt;br /&gt;initialize (1448091338); x = 0,75083333333333, y = 0,87583333333333&lt;br /&gt;initialize (1448091338); x = 0,87583333333333, y = 0,87583333333333&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Indigo Ray&lt;/b&gt;, &lt;em&gt;Wed, 24 May 2017 22:36:38 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;FF 7.001: Still a problem. Really hampers the scripting feature in FF.&lt;br /&gt;&lt;br /&gt;I adapted Sphinx's code to output an image instead of text ( :!: unsafe script):&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Indigo Ray&lt;/b&gt;, &lt;em&gt;Wed, 24 May 2017 22:39:28 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;If &lt;i&gt;function prepare()&lt;/i&gt; was called once, this image would be completely black.&lt;br /&gt;Instead, there are 64 boxes, meaning it was called 64 times! For a little 600x600 image!&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Thu, 12 Oct 2017 02:42:31 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Any news on this issue? &lt;br /&gt;&lt;br /&gt;This is a major performance issue in advanced scripts...&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;GMM&lt;/b&gt;, &lt;em&gt;Thu, 12 Oct 2017 07:02:18 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I'm afraid no news for FF7 in this matter.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Thu, 12 Oct 2017 07:47:22 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;That is bad news :-( &lt;br /&gt;&lt;br /&gt;Here is a simple graphic summary of the issue - and I'm not sure the estimated 64 tiles is really correct  as previous tests showed even more init calls&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Fri, 02 Aug 2019 06:46:09 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;GMM/Vlad - is this issue going to be addressed in V9 at some point?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;GMM&lt;/b&gt;, &lt;em&gt;Fri, 02 Aug 2019 06:52:29 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I'm afraid not in V9 :(&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Fri, 02 Aug 2019 07:56:22 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Sigh! I guess its more profitable adding new bells and whistles than polishing/fixing the existing ones (Psst... loop sample cache!). Oh well, true global initialization would also be needed for green to gray conversion I guess. Fingers crossed. Thanks for the answer :-)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Rico&lt;/b&gt;, &lt;em&gt;Mon, 28 Mar 2022 03:54:01 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Wow, this thread is nearly 11 years old!&lt;br /&gt;&lt;br /&gt;I am trying to work on circle-packing, like many others before me. I have made some good headway building on ThreeDee's excellent work, but the primary problem is the inability to cache properly, which is tied to this initialisation issue. I want to build my tables once and once only.&lt;br /&gt;&lt;br /&gt;Dear moderators can you tell us if this will ever be fixed please? Thank you.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;GMM&lt;/b&gt;, &lt;em&gt;Mon, 28 Mar 2022 08:52:41 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Rico wrote:&lt;/b&gt;&lt;br /&gt;Dear moderators can you tell us if this will ever be fixed please?&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Ever? Probably yes.&lt;br /&gt;Soon? I'm afraid not.&lt;/p&gt;
</description>
</item>
<item><title>What's current status of Mac batch rendering options?</title> 
		             <dc:creator>Lorenzosart</dc:creator> 
		             <category></category> 
		             <pubDate>Fri, 25 Feb 2022 18:55:40 -0500</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16549</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16549</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;Lorenzosart&lt;/b&gt;, &lt;em&gt;Fri, 25 Feb 2022 14:05:31 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I'm a non-coding artist who needs a script to apply all presets of one filter to a single image file.  None of the solutions I've found via these forums seem to work on my Mac mini running Monterey 12.2.1.&lt;br /&gt;&lt;br /&gt;If none exist, I'll pay someone to create one... assuming I can afford it. :-)&lt;br /&gt;&lt;br /&gt;Any ideas/pointers/volunteers?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Fri, 25 Feb 2022 14:22:16 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Well, for Mac there is only one option available that may work&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://www.filterforge.com/wiki/index.php/Main_Page&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Filter Forge External tools part&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://www.filterforge.com/forum/read.php?FID=5&amp;TID=7051&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;FFBatchmaster by Totte&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Sorry that I do not know if it may be working right on Monterey &lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Lorenzosart wrote:&lt;/b&gt;&lt;br /&gt;If none exist, I'll pay someone to create one... assuming I can afford it.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;It depends of how much you want to spend, I do not know, maybe , there is a possible alternative, you can install &lt;a href=&quot;https://www.parallels.com/pd/general/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Parallels Windows software emulator that works on Monterey&lt;/a&gt; and you could use the other many External tools available for windows. Even there is now a 3 days sale &lt;a href=&quot;https://www.parallels.com/promo-mac-app-bundle/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Parallels mac bundle for same price&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can use the FF trial version if you only need for this time &lt;br /&gt;&lt;br /&gt;The main problem is that for longer use you will need another FF license for windows unless you have the FF 11 Studio that includes two licenses&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Lorenzosart&lt;/b&gt;, &lt;em&gt;Fri, 25 Feb 2022 18:55:40 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;SpaceRay wrote:&lt;/b&gt;&lt;br /&gt;It depends of how much you want to spend, I do not know, maybe , there is a possible alternative, you can install Parallels Windows software emulator that works on Monterey and you could use the other many External tools available for windows. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Thanks for the information. Even though running Parallels to gain access to the Windows tools is appealing, I doubt that I'd have much success.  I'm old enough (74) to know that my brain does not work linearly and I have been so spoiled by the Mac--which I've used since 1984--that even navigating Windows may be a challenge for me.&lt;br /&gt;&lt;br /&gt;I'll try it, but would much prefer something that is native to the Mac environment.&lt;br /&gt;&lt;br /&gt;Scripting is like magic for people like me, so I don't even know how to offer an appropriate pay incentive.  $500?  More?  I can pay via any of the normal channels like PayPal, or I can pay in ETH if given a wallet address.  This is: &lt;a href=&quot;https://linktr.ee/NotoriousGangOfOne&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;My LinkTree&lt;/a&gt;&lt;/p&gt;
</description>
</item>
<item><title>Script to load random image into a filter?</title> 
		             <dc:creator>Ilmeni</dc:creator> 
		             <category></category> 
		             <pubDate>Mon, 31 Jan 2022 18:17:07 -0500</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16526</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16526</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;Ilmeni&lt;/b&gt;, &lt;em&gt;Sat, 29 Jan 2022 15:29:57 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hi all! Is it possible to load a random image from a folder into a filter, either via script or via color control?&lt;br /&gt;Or maybe to open a random image with the image component in a filter?&lt;br /&gt;thank you for your help! :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Mon, 31 Jan 2022 03:05:34 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;That is not possible. Not by script either, unless you write your own image importer.. that is a lot of work.&lt;br /&gt;&lt;br /&gt;What you can do is to randomly pick an image from a number of predefined image inputs.&lt;br /&gt;&lt;br /&gt;Or if you can use the commandline renderer it should be an easy thing achieve with a little powershell or similar. But that of course rules out the GUI and any interaction.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Ilmeni&lt;/b&gt;, &lt;em&gt;Mon, 31 Jan 2022 18:17:07 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thank you!  :)&lt;/p&gt;
</description>
</item>
<item><title>Setting a single pixel?</title> 
		             <dc:creator>James</dc:creator> 
		             <category></category> 
		             <pubDate>Sun, 27 Jun 2021 01:35:29 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16364</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16364</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;James&lt;/b&gt;, &lt;em&gt;Fri, 25 Jun 2021 23:35:52 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I have made various scripts in Lua that do distortions, curve ops and color effects etc but so far I have been confused how to set a single pixel.&lt;br /&gt;&lt;br /&gt;What I want is to simply set the r,g,b,a value at an x,y position. Does anyone have a script snippet for this? Thanks&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Theob&lt;/b&gt;, &lt;em&gt;Sat, 26 Jun 2021 10:19:04 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Have you had a look &lt;a href=&quot;https://filterforge.com/filters/search.html?q=script&amp;h=r&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. Hope it may help  :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;James&lt;/b&gt;, &lt;em&gt;Sat, 26 Jun 2021 14:01:11 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;The closest thing I can find in the library is the pixel art generators in the Bearestroika filter. These use an array however, I don't want to have to set a whole array of colours each time but simply set one pixel of an image inputs colour. There should be a simpler way but so far my experiments have failed but I'm guessing there will be a fairly simple solution.&lt;br /&gt;&lt;br /&gt;So say for example I want to set 0,0 of images width and height to 255,0,0,1.0 which should make the very first pixel red.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;emme&lt;/b&gt;, &lt;em&gt;Sat, 26 Jun 2021 14:30:26 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;As you probably know, FF works with sample coordinates, not with pixel coordinates - so there isn't really a simple way to set pixel values like you would on a bitmap based system.&lt;br /&gt;&lt;br /&gt;You can use the global variables OUTPUT_WIDTH and OUTPUT_HEIGHT to get the image dimensions in pixels and use those calculate the pixel coordinates.&lt;br /&gt;&lt;br /&gt;For example:&lt;br /&gt;&lt;br /&gt;[CODE]&lt;br /&gt;function prepare()&lt;br /&gt;	px,py = get_slider_input(PX),get_slider_input(PY)&lt;br /&gt;	w,h = OUTPUT_WIDTH, OUTPUT_HEIGHT&lt;br /&gt;	px,py = math.floor(px*w), math.floor(py*h)&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	local v = 0&lt;br /&gt;	if math.floor(x*w) == px and math.floor(y*h) == py then v = 1 end;&lt;br /&gt;	return v,v,v&lt;br /&gt;end;&lt;br /&gt;[/CODE]&lt;br /&gt;&lt;br /&gt;Note that this only works with square images. Some extra code is needed to compensate for different aspect ratios.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Rachel Duim&lt;/b&gt;, &lt;em&gt;Sat, 26 Jun 2021 14:39:50 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Another thing to know, FF is pixel aware. Although this only draws lines and not points, you can use this example to set single pixels if you wish: &lt;a href=&quot;https://filterforge.com/filters/13720.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Pixel Image with Grid&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;James&lt;/b&gt;, &lt;em&gt;Sat, 26 Jun 2021 15:03:47 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thanks emme, that basically does what I want but due to the sample coordinates system you mention your script steps a bit too much each pixel value increased and also when the input value is max it seems to make the pixel vanish. &lt;br /&gt;&lt;br /&gt;Another thing I noticed is if you don't use a slider input and just set px,py = 1,1 instead then the pixel vanishes. Also how would you increase the pixel size from 1x1 to say 10x10?&lt;br /&gt;&lt;br /&gt;My goal was to port some lua scripts that draw various things using a set pixel function but it seems that due to the sample coordinates system there would be problems.&lt;br /&gt;&lt;br /&gt;Also thanks for the reply Rachel Duim, currently I only have FF version 3 so I can't check the map script that filter uses. The script emme posted is basically what i want but there is the few issues I mention.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;emme&lt;/b&gt;, &lt;em&gt;Sat, 26 Jun 2021 15:51:03 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Yes, the way the SliderControl UI works doesn't allow for much precision. ValueControl outputs fractional values, but I don't think it's available in FF3. You can also manually ins ert fractional values to the SliderControl for more precision, or set an IntSlider range to match the image dimensions. These are not great solutions, but that's the best you can do. The pixel coordinates can of course be precisely set via code.&lt;br /&gt;&lt;br /&gt;For a quick and dirty fix for the rounding problem, just subtract 0.5 from w and h in the if statement.&lt;br /&gt;&lt;br /&gt;[CODE]if math.ceil(x*w-0.5) == px and math.ceil(y*h-0.5) == py then v = 1 end;[/CODE]&lt;br /&gt;&lt;br /&gt;Yeah, I mean you could make a list / array of all the se t pixel instructions and just loop through them, but that would not be very efficient in FF  :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;James&lt;/b&gt;, &lt;em&gt;Sat, 26 Jun 2021 16:12:05 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thanks emme, that code makes the pixel disappear if set to 0,0 however but I fixed it using an if statement:&lt;br /&gt;&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;   px,py = get_slider_input(PX),get_slider_input(PY)&lt;br /&gt;   w,h = OUTPUT_WIDTH, OUTPUT_HEIGHT&lt;br /&gt;   px,py = math.floor(px*w), math.floor(py*h)&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;   local r = 0&lt;br /&gt;   local g = 0&lt;br /&gt;   local b = 0&lt;br /&gt;   local a = 1&lt;br /&gt;&lt;br /&gt;	if px == 0 and py == 0 then&lt;br /&gt;		if math.floor(x*w) == px and math.floor(y*h) == py then&lt;br /&gt;			r = 255&lt;br /&gt;			g = 0&lt;br /&gt;			b = 0&lt;br /&gt;			a = 1&lt;br /&gt;		end;&lt;br /&gt;	else&lt;br /&gt;		if math.ceil(x*w-0.5) == px and math.ceil(y*h-0.5) == py then&lt;br /&gt;			r = 255&lt;br /&gt;			g = 0&lt;br /&gt;			b = 0&lt;br /&gt;			a = 1&lt;br /&gt;		end;&lt;br /&gt;	end;&lt;br /&gt;	&lt;br /&gt;   return r,g,b,a&lt;br /&gt;end;[/CODE]&lt;br /&gt;&lt;br /&gt;I made a script where I convert the setPixel part into a function but for me it doesn't work in FF3, possibly due to the fractional values thing. Could someone confirm if the following script works in later versions?&lt;br /&gt;&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;   w,h = OUTPUT_WIDTH, OUTPUT_HEIGHT&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function setPixel(x1,y1,w,h,px,py,r,g,b,a)&lt;br /&gt;   px2,py2 = math.floor(px*w), math.floor(py*h)&lt;br /&gt;   if math.floor(x1*w) == px2 and math.floor(y1*h) == py2 then&lt;br /&gt;	end;&lt;br /&gt;   return r,g,b,a&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;   local r = 0&lt;br /&gt;   local g = 0&lt;br /&gt;   local b = 0&lt;br /&gt;   local a = 1&lt;br /&gt;&lt;br /&gt;	setPixel(x,y,w,h,1,1,255,0,0,1)&lt;br /&gt;&lt;br /&gt;   return r,g,b,a&lt;br /&gt;end;[/CODE]&lt;br /&gt;&lt;br /&gt;If it doesn't work in later versions perhaps my code is broken somehow but it looks as if it should work.&lt;br /&gt;&lt;br /&gt;Edit - Maybe the developers could a a new node &quot;Pixel Script&quot; in FF11 which can correctly set pixels and maybe also do html5 canvas style things like drawing lines and rectangles etc with simple code. That would allow for all sorts of interesting scripts to be made.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;emme&lt;/b&gt;, &lt;em&gt;Sat, 26 Jun 2021 16:44:53 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Slight modification, should work now more or less  :) &lt;br /&gt;&lt;br /&gt;[CODE]&lt;br /&gt;function prepare()&lt;br /&gt;   w,h = OUTPUT_WIDTH, OUTPUT_HEIGHT&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function setPixel(x1,y1,w,h,px,py,r,g,b,a)&lt;br /&gt;   px2,py2 = math.floor(px*w), math.floor(py*h)&lt;br /&gt;   if math.floor(x1*w-0.5) == px2 and math.floor(y1*h-0.5) == py2 then	&lt;br /&gt;		return r,g,b,a&lt;br /&gt;	else&lt;br /&gt;		return 0,0,0,1&lt;br /&gt;	end;&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	local r,b,g,a = setPixel(x,y,w,h,0.5,0.5,255,0,0,1)&lt;br /&gt;	return r,g,b,a&lt;br /&gt;end;&lt;br /&gt;[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;James&lt;/b&gt;, &lt;em&gt;Sat, 26 Jun 2021 16:52:23 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thanks that show me an output.  :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Rachel Duim&lt;/b&gt;, &lt;em&gt;Sun, 27 Jun 2021 01:35:29 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;If anyone is interested, here is setting a single pixel in FF7 without lua.&lt;/p&gt;
</description>
</item>
<item><title>Wanted: Curve Script Examples</title> 
		             <dc:creator>David Roberson</dc:creator> 
		             <category></category> 
		             <pubDate>Sun, 20 Jun 2021 09:34:45 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16325</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16325</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 10 May 2021 12:50:00 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I've been searching the forums for examples of Curve Scripts I could use to learn how to do custom curves or curve ops, and so far have come up empty. So, I'm just putting the request out there, if anyone has Curve Scripts they'd be willing to post and share. My initial goal is to create a curve ops type of script that can provide Start, End, Minimum and Maximum sliders for Bezier and composite curves. Eventually, I'll have a day free to just experiment, but I'd like to have those four controls to start with. I can usually find formulas for different curve profiles online, but those examples are welcome too.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;James&lt;/b&gt;, &lt;em&gt;Sun, 20 Jun 2021 09:34:45 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I just submitted a texture called Techno Panels which uses a custom Curve Operator script which basically takes the input and applies tangent (tan) maths to it. It shows how to use minimum and maximum sliders on a curve.&lt;br /&gt;&lt;br /&gt;If your interested the code is:&lt;br /&gt;&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;	mn = get_slider_input(MINIMUM)&lt;br /&gt;	mx = get_slider_input(MAXIMUM)&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y, t)&lt;br /&gt;&lt;br /&gt;	a = get_sample_curve(x, y, t, SOURCE)&lt;br /&gt;&lt;br /&gt;	v = math.min(math.max(math.tan(a), mn),1) * mx&lt;br /&gt;&lt;br /&gt;	return v&lt;br /&gt;end;[/CODE]&lt;/p&gt;
</description>
</item>
<item><title>A Not-Quite Arbitrary Distance Mapping</title> 
		             <dc:creator>David Roberson</dc:creator> 
		             <category></category> 
		             <pubDate>Wed, 20 Jan 2021 20:06:22 -0500</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16231</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16231</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 18 Jan 2021 22:27:23 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I'm not entirely sure what I've done with this script. I was trying for a script that would do distance mapping of an arbitrary shape, using the function I created for my Spherical Worley Noise. The problem is, it doesn't respond to a binary mask at all. What I got instead was a kind of split distance mapping of the bevel of an arbitrary shape. Whimsically, I turned that into a little heart scrippet, but I'm really curious about how I got the result I did. Here's the code:&lt;br /&gt;&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;	dtype = get_intslider_input(DISTANCE_TYPE)&lt;br /&gt;	p = get_intslider_input(P)&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	local v = get_sample_grayscale(x, y, SOURCE)&lt;br /&gt;	local min_dist = 10000&lt;br /&gt;	for x = 0, 1 do&lt;br /&gt;		for y = 0, 1 do&lt;br /&gt;			local dist =  distcalc(x, y, v, v)&lt;br /&gt;			min_dist = math.min(dist, min_dist) -- &lt;br /&gt;		end -- &lt;br /&gt;	end -- &lt;br /&gt;	-- min_dist = 1.0 - min_dist&lt;br /&gt;	v = min_dist&lt;br /&gt;&lt;br /&gt;	return v, v, v, a&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function distcalc(sx,sy,dx,dy)&lt;br /&gt;	local dist = 0&lt;br /&gt;	if dtype == 1 then&lt;br /&gt;		-- Euclidean &lt;br /&gt;		dist = math.sqrt((sx - dx)^2 + (sy - dy)^2)	&lt;br /&gt;	elseif dtype == 2 then&lt;br /&gt;		-- Chebyshev&lt;br /&gt;		dist = math.max(math.abs(sx - dx), math.abs(sy - dy))	&lt;br /&gt;	elseif dtype == 3 then&lt;br /&gt;		-- Manhattan&lt;br /&gt;		dist = (math.abs(sx - dx) + math.abs(sy - dy)) / 1.5	&lt;br /&gt;	else&lt;br /&gt;		-- Minkowski &lt;br /&gt;		local pe = 1/p&lt;br /&gt;		dist = (math.abs(sx - dx)^p + math.abs(sy - dy)^p)^pe&lt;br /&gt;	end	&lt;br /&gt;	return dist&lt;br /&gt;end;[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 18 Jan 2021 22:59:54 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I suppose the question I should be asking is, how do you reference the x and y components of a sampled image. In the example above, I stuck v in for x and y on a whim and was surprised to get any kind of result. I had tried doing vx, vy = get_sample_grayscale(x, y, Source) but got an error saying dy was a nil value when I provided vy in my function call with vx. I can't recall another script I've seen that features a reference to the x and y from a sample image.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Indigo Ray&lt;/b&gt;, &lt;em&gt;Tue, 19 Jan 2021 19:40:29 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;David, I also have trouble with scripting in FF, but don't you need to specify a step size for your loops?&lt;br /&gt;&lt;br /&gt;The function &lt;i&gt;get sample&lt;/i&gt; iterates over x and y (pixels)&lt;br /&gt;When you call &lt;i&gt;get_sample_grayscale(x, y, SOURCE)&lt;/i&gt;&lt;br /&gt;it gives you the brightness at each sample point - there's only one output&lt;br /&gt;You can input something other than &quot;x&quot; and &quot;y&quot; to do a transformation&lt;br /&gt;&lt;br /&gt;Distance Transform is iterative a.k.a. slow. See &lt;a href=&quot;https://filterforge.com/forum/read.php?FID=10&amp;TID=14082&amp;MID=140338&amp;sphrase_id=4822182#message140338&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;our efforts here&lt;/a&gt;. But these were not scripting methods.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Wed, 20 Jan 2021 18:05:42 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Indigo, I modeled my script after the API Worley Noise script, so my loops follow its example. I didn't really think about step size, and wonder if you have an example where it is used properly I could see?&lt;br /&gt;&lt;br /&gt;Good point about how get_sample iterates over an image. Unfortunately, most examples of distance mapping I've seen (in various scripting languages) iterate over x and y per pixel (which I do) and have access to the x and y coordinates you sample the distance from. I'm not sure I'm getting that part entirely right. I'm still learning about transformations in Lua, so I don't quite know what you mean in your fourth point. Can you elaborate?&lt;br /&gt;&lt;br /&gt;Thanks for the link! I'll check it out!&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Wed, 20 Jan 2021 19:11:00 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Just to clarify my objectives in this script, I am trying to map distance from the current x,y in my nested loop and the closest pixel of value 1. I'm getting distance from both 0 and 1 with distance mapping in between, centered around the 0.5 value. I'm clearly not identifying those white pixels (or sample points) in an effective way. So, yes, I am getting distance mapping, but in a useless context of an existing bevel.&lt;br /&gt;&lt;br /&gt;Please tell me someone gets what I'm obviously missing here?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Wed, 20 Jan 2021 20:06:22 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Okay, looking at it again, the problem I am running into is tied to the get_sample_grayscale() part, which gives me the value (brightness) of the current sample, but my distance calculations are designed to compare the position of the current sample and the nearest &quot;brightest&quot; point. Without a way of getting the coordinates for that I'm not providing the equation what it needs. Worley noise was working inside a cell grid in some way I'm not understanding very well, but which was defined in x and y coordinates. &lt;br /&gt;&lt;br /&gt;I still can't figure out how I get the results I'm getting from a bevel, but I'm guessing it's the result of feeding a value between 0 and 1 as if that was a coordinate. I really wish there were more documentation for Lua graphics scripting. I may eventually sort this out, but it's not going to be easy.&lt;/p&gt;
</description>
</item>
<item><title>Script syntax error on last line/column of script</title> 
		             <dc:creator>David Roberson</dc:creator> 
		             <category></category> 
		             <pubDate>Mon, 11 Jan 2021 15:21:40 -0500</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16227</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16227</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Sun, 10 Jan 2021 21:08:03 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;This has popped up on several scripts I've worked on recently in FF10. Sometimes the code runs, and sometimes it doesn't. In this following example, it doesn't and I'm not sure if there's a real error there I'm not seeing or if this is a bug I should report. If I exclude the truncate() parts, it works, but then I could end up going beyond the 0-1 range with the output. I could live with that and use an inactive Invert to clamp output in the next step, but this function ought to be able to take care of it.&lt;br /&gt;&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;	contrast = get_slider_input(CONTRAST)&lt;br /&gt;	factor = (259 * (contrast + 1)) / (1 * (259 - contrast))&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x,y)&lt;br /&gt;	local r, g, b, a = get_sample_map(x, y, COLOR)&lt;br /&gt;	local nr = truncate(factor * (r - 0.5) + 0.5)&lt;br /&gt;	local ng = truncate(factor * (g - 0.5) + 0.5)&lt;br /&gt;	local nb = truncate(factor * (b - 0.5) + 0.5)&lt;br /&gt;	return nr, ng, nb, a&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function truncate(value)&lt;br /&gt;	if value &amp;lt; 0 then value = 0&lt;br /&gt;	if value &amp;gt; 1 then value = 1&lt;br /&gt;	return value&lt;br /&gt;end; [/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Chris Goldthorpe&lt;/b&gt;, &lt;em&gt;Sun, 10 Jan 2021 21:34:56 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I think that you need to terminate the if statements with &quot;end&quot;&lt;br /&gt;&lt;br /&gt;if value &amp;lt; 0 then value = 0 &lt;br /&gt;end&lt;br /&gt;if value &amp;gt; 1 then value = 1 &lt;br /&gt;end&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Rachel Duim&lt;/b&gt;, &lt;em&gt;Sun, 10 Jan 2021 23:41:49 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Yep, here is more info:&lt;br /&gt;&lt;a href=&quot;https://www.lua.org/pil/4.3.1.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;4.3.1 – if then else&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 11 Jan 2021 02:41:01 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Yep. I didn't catch it until I referred back to the manual. Rusty coding habits and inexperience tripped me up! It might have been easier if the log had linked to the problem line, but it was redirecting me to the very end of the script. That's why I seem to get the same error in other scripts. I suppose that qualifies as a &quot;bug&quot; but I suspect FF already knows about it. &lt;br /&gt;&lt;br /&gt;Thanks for the feedback, Chris and Rachel!&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Chris Goldthorpe&lt;/b&gt;, &lt;em&gt;Mon, 11 Jan 2021 11:58:50 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;David Roberson, the error can't be detected until the last line because that's the earliest that the compiler can be sure that the syntax is invalid. If you see something like&lt;br /&gt;&lt;br /&gt;if value &amp;lt; 0 then value = 0&lt;br /&gt;if value &amp;gt; 1 then value = 1 &lt;br /&gt;&lt;br /&gt;the second if statement falls within the first then clause and the compiler will be waiting for two &quot;end&quot; statements to follow. It would be nice if the error messages were more informative, i.e. missing end statement.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Mon, 11 Jan 2021 15:21:40 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Good explanation for why the log links to the end of the script in such cases. It would be nice, though, if the syntax check responded first, since that usually does highlight the correct line. (Though, really, these are the things I should be learning to catch myself, so no complaints after thinking it through.)&lt;br /&gt;&lt;br /&gt;Thanks again!&lt;/p&gt;
</description>
</item>
<item><title>Is QuadTree Optimization Practical for use in Map Scripts?</title> 
		             <dc:creator>David Roberson</dc:creator> 
		             <category></category> 
		             <pubDate>Fri, 08 Jan 2021 15:16:29 -0500</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16224</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16224</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Fri, 08 Jan 2021 15:16:29 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I came across this topic while researching Worley Noise, and thought it'd be great if it helped speed up my Spherical Worley Noise. Of course, the first question to ask, before pulling on this thread and going through all the work trying to implement the idea in Lua, is: Is it practical?&lt;br /&gt;&lt;br /&gt;I'm still not sure how the API Worley Noise identifies the closest seed point to any given point, so as yet I don't even have a place to insert a QuadTree. Even so, the idea is there and I can't help but wonder if Lua would spend too much time constructing and utilizing a QuadTree to save a meaningful amount of processing the way I assume it does now, by querying every pixel in the frame. Since the Spherical Worley Noise is at least 10x slower than the Spherical Perlin Noise I made, some kind of optimization is sorely needed!&lt;/p&gt;
</description>
</item>
<item><title>Multiple Curve Inputs</title> 
		             <dc:creator>David Roberson</dc:creator> 
		             <category></category> 
		             <pubDate>Fri, 01 Jan 2021 22:03:28 -0500</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16218</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16218</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;David Roberson&lt;/b&gt;, &lt;em&gt;Fri, 01 Jan 2021 22:03:28 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;This was sort of a &quot;what the hell&quot; moment, but I discovered you can add multiple curve inputs to a Map Script. I'm not sure what I'd use it for, except to have one for noise profile and a second one for a contrast profile (though I could continue using the Minimum/Maximum parameters on the profile). It just struck me that I might want a different contrast profile fr om the noise profile. Of course, I still have not figured out what I'm doing, as far as adjusting contrast goes...&lt;br /&gt;&lt;br /&gt;It did get me wondering how other people might exploit this, and how they'd manage the script to use it. In my current script, I modify the sample with the noise profile as the last step before I return the sample. I assume I'd have to have two last steps wh ere I modify the sample with the value of the noise profile, then modify it again with the contrast profile before returning the final sample. &lt;br /&gt;&lt;br /&gt;I'm curious to see what happens, when I test it...&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Edit: &lt;/b&gt;Okay, splicing in the extra curve works. Probably redundant and superfluous, but it does work. Of course, all of this was me just playing with a workaround for a mapped contrast adjustment.&lt;/p&gt;
</description>
</item>
<item><title>Lúa language instructions briefly explained with examples</title> 
		             <dc:creator>SpaceRay</dc:creator> 
		             <category></category> 
		             <pubDate>Fri, 06 Nov 2020 16:31:07 -0500</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16152</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=16152</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Fri, 06 Nov 2020 16:31:07 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I have just found this searching for another thing and maybe it could be useful perhaps for someone that understand how to use the LÚA scripting, although this is mostly for beginners&lt;br /&gt;&lt;br /&gt;I do not understand it, but I leave it here in case it may be helpful &lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://chadvandy.github.io/tw_modding_resources/campaign/lua.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Chad Vandy Lua Language Github&lt;/a&gt;&lt;/p&gt;
</description>
</item>
<item><title>Batch Rendering Wrapper</title> 
		             <dc:creator>MachinesInMotion</dc:creator> 
		             <category></category> 
		             <pubDate>Sun, 04 Oct 2020 06:02:58 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=11288</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=11288</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;MachinesInMotion&lt;/b&gt;, &lt;em&gt;Tue, 21 May 2013 20:13:29 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hey Guys!&lt;br /&gt;I threw together a little wrapper program that that runs FF over files directly from the command line (no XML file needed). It's been working for me, and hugely simplifies the process of running FF over a large number of files.&lt;br /&gt;&lt;br /&gt;Usage: ffbat filename filter preset&lt;br /&gt;Examples: &lt;br /&gt;ffbat File.png Eyecraft 0&lt;br /&gt;Outputs a copy of File.png with the Eyecraft filter applied(File.png -&amp;gt; File_Filter.png, etc)&lt;br /&gt;&lt;br /&gt;ffbat * GlowingText 0&lt;br /&gt;Outputs a copy of every file in the directory with the GlowingText filter applied(File1.png -&amp;gt; File1_Filter.png, etc)&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://s3.amazonaws.com/ConradNMisc/ffbat.zip&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Download Here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Instructions: Extract the zip somewhere and add that location to your path. It should work on its own from there. &lt;br /&gt;&lt;br /&gt;Alternatively, download the source and install &lt;a href=&quot;http://www.pythonware.com/products/pil/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;PIL&lt;/a&gt;, then add to your path and run it with ffbat.py file filter preset&lt;br /&gt;&lt;br /&gt;Notes: &lt;br /&gt;1) This scans common installation directories to get to the actual executable. If you installed Filter Forge somewhere else (like on a drive that isn't C), you'll have to add your Filter Forge bin directory to your path as well.&lt;br /&gt;2) You need to have the filter in the &quot;My Filters&quot; pane for this to work, so if you are using a library filter, make a copy in My Filters (open the filter editor on it) before running this script.&lt;br /&gt;&lt;br /&gt;Python source (Requires PIL to compile):&lt;br /&gt;[CODE]&lt;br /&gt;import glob, os, sys, shutil, subprocess&lt;br /&gt;from PIL import Image&lt;br /&gt;from _winreg import *&lt;br /&gt;&lt;br /&gt;print &quot;Usage: ffbat source filtername preset\n&quot;&lt;br /&gt;&lt;br /&gt;try:&lt;br /&gt;    presetValue = int(sys.argv[3])&lt;br /&gt;except:&lt;br /&gt;    print &quot;Error: invalid preset&quot;&lt;br /&gt;&lt;br /&gt;#Set up the xml files&lt;br /&gt;xml = open(&quot;temp.xml&quot;, 'w')&lt;br /&gt;xml.write(&quot;&quot;&quot;&amp;lt;?xml version=&quot;1.0&quot;?&amp;gt;&lt;br /&gt;&amp;lt;Tasks&amp;gt;&lt;br /&gt;	&amp;lt;GlobalSettings&amp;gt;&lt;br /&gt;		&amp;lt;RenderingOptions&amp;gt;&lt;br /&gt;			&amp;lt;UseMultithreading value=&quot;true&quot;/&amp;gt;&lt;br /&gt;			&amp;lt;Dither value=&quot;true&quot;/&amp;gt;&lt;br /&gt;			&amp;lt;Progressive value=&quot;true&quot;/&amp;gt;&lt;br /&gt;			&amp;lt;OptimizeBlurs value=&quot;true&quot;/&amp;gt;&lt;br /&gt;			&amp;lt;AntiAliasBitmapComponentSources value=&quot;false&quot;/&amp;gt;&lt;br /&gt;			&amp;lt;Jitter value=&quot;0&quot;/&amp;gt;&lt;br /&gt;			&amp;lt;TemporaryFilesLocation value=&quot;&quot;/&amp;gt;&lt;br /&gt;			&amp;lt;RAMUsageLim it value=&quot;60&quot;/&amp;gt;&lt;br /&gt;			&amp;lt;NormalMapFlipY value=&quot;false&quot;/&amp;gt;&lt;br /&gt;		&amp;lt;/RenderingOptions&amp;gt;&lt;br /&gt;		&lt;b&gt;&lt;br /&gt;			&amp;lt;DefaultFormat value=&quot;JPG&quot;/&amp;gt;&lt;br /&gt;			&amp;lt;BMP&amp;gt;&lt;br /&gt;				&amp;lt;BitDepth value=&quot;32&quot;/&amp;gt;&lt;br /&gt;				&amp;lt;FlipRowOrder value=&quot;false&quot;/&amp;gt;&lt;br /&gt;			&lt;/b&gt;&lt;br /&gt;			&amp;lt;JPG&amp;gt;&lt;br /&gt;				&amp;lt;Quality value=&quot;98&quot;/&amp;gt;&lt;br /&gt;				&amp;lt;FullPrecision value=&quot;true&quot;/&amp;gt;&lt;br /&gt;			&amp;lt;/JPG&amp;gt;&lt;br /&gt;			&amp;lt;TIF&amp;gt;&lt;br /&gt;				&lt;b&gt;&lt;br /&gt;				&amp;lt;FloatFormat value=&quot;false&quot;/&amp;gt;&lt;br /&gt;				&amp;lt;IncludeTransparency value=&quot;true&quot;/&amp;gt;&lt;br /&gt;				&amp;lt;ImageCompression value=&quot;LZW&quot;/&amp;gt;&lt;br /&gt;			&amp;lt;/TIF&amp;gt;&lt;br /&gt;			&amp;lt;TGA&amp;gt;&lt;br /&gt;				&amp;lt;BitDepth value=&quot;32&quot;/&amp;gt;&lt;br /&gt;				&amp;lt;IncludeTransparency value=&quot;true&quot;/&amp;gt;&lt;br /&gt;				&amp;lt;FlipRowOrder value=&quot;false&quot;/&amp;gt;&lt;br /&gt;			&amp;lt;/TGA&amp;gt;&lt;br /&gt;			&amp;lt;PNG&amp;gt;&lt;br /&gt;				&amp;lt;BitDepth value=&quot;16&quot;/&amp;gt;&lt;br /&gt;				&amp;lt;IncludeTransparency value=&quot;true&quot;/&amp;gt;&lt;br /&gt;				&amp;lt;ImageCompression value=&quot;BEST&quot;/&amp;gt;&lt;br /&gt;			&amp;lt;/PNG&amp;gt;&lt;br /&gt;			&amp;lt;EXR&amp;gt;&lt;br /&gt;				&amp;lt;BitDepth value=&quot;32&quot;/&amp;gt;&lt;br /&gt;				&amp;lt;IncludeTransparency value=&quot;true&quot;/&amp;gt;&lt;br /&gt;				&amp;lt;ImageCompression value=&quot;PIZ&quot;/&amp;gt;&lt;br /&gt;				&amp;lt;FlipRowOrder value=&quot;false&quot;/&amp;gt;&lt;br /&gt;			&amp;lt;/EXR&amp;gt;&lt;br /&gt;			&amp;lt;PFM/&amp;gt;&lt;br /&gt;		&lt;/b&gt;&lt;br /&gt;	&amp;lt;/GlobalSettings&amp;gt;&quot;&quot;&quot;)&lt;br /&gt;for name in glob.glob(sys.argv[1]):&lt;br /&gt;    img = Image.open(name)&lt;br /&gt;    width, height = img.size&lt;br /&gt;    xml.write(&quot;&quot;&quot;&lt;br /&gt;    &amp;lt;Task&amp;gt;&lt;br /&gt;        &amp;lt;Image value=&quot;{0}&quot; width=&quot;{1}&quot; height=&quot;{2}&quot;/&amp;gt;&lt;br /&gt;        &amp;lt;Selection value=&quot;&quot;/&amp;gt;&lt;br /&gt;        &amp;lt;Result path=&quot;{3}&quot; format=&quot;{4}&quot;/&amp;gt;&lt;br /&gt;        &amp;lt;Filter value=&quot;{5}&quot;/&amp;gt;&lt;br /&gt;        &amp;lt;Preset value=&quot;{6}&quot;/&amp;gt;&lt;br /&gt;    &amp;lt;/Task&amp;gt;&quot;&quot;&quot;.format(name, width, height, name[0:-4] + &quot;_filter.png&quot;, &quot;PNG&quot;, sys.argv[2]+&quot;.ffxml&quot;, sys.argv[3]))&lt;br /&gt;xml.write(&quot;\n    &amp;lt;/Tasks&amp;gt;&quot;)&lt;br /&gt;xml.close();&lt;br /&gt;copied = False&lt;br /&gt;#Set up the ffxml&lt;br /&gt;try:&lt;br /&gt;    shutil.copyfile(os.getenv(&quot;AppData&quot;) + &quot;/Filter Forge 3/My Filters/&quot; + sys.argv[2] + &quot;.ffxml&quot;, os.getcwd() + &quot;/&quot;+sys.argv[2] + &quot;.ffxml&quot;)&lt;br /&gt;    copied = True&lt;br /&gt;except:&lt;br /&gt;    pass&lt;br /&gt;try:&lt;br /&gt;    shutil.copyfile(os.getenv(&quot;AppData&quot;) + &quot;/Filter Forge 2/My Filters/&quot; + sys.argv[2] + &quot;.ffxml&quot;, os.getcwd() + &quot;/&quot;+sys.argv[2] + &quot;.ffxml&quot;)&lt;br /&gt;    copied = True&lt;br /&gt;except:&lt;br /&gt;    pass&lt;br /&gt;try:&lt;br /&gt;    shutil.copyfile(os.getenv(&quot;AppData&quot;) + &quot;/Filter Forge/My Filters/&quot; + sys.argv[2] + &quot;.ffxml&quot;, os.getcwd() + &quot;/&quot;+sys.argv[2] + &quot;.ffxml&quot;)&lt;br /&gt;    copied = True&lt;br /&gt;except:&lt;br /&gt;    pass&lt;br /&gt;&lt;br /&gt;#Run filter forge at all reasonable locations.&lt;br /&gt;filtered = False&lt;br /&gt;for string in &quot;&quot;&quot;FFXCmdRenderer-x86-SSE2.exe&lt;br /&gt;&quot;C:\Program Files (x86)\Filter Forge 3\Bin\FFXCmdRenderer-x86-SSE2.exe&quot;&lt;br /&gt;&quot;C:\Program Files\Filter Forge 3\Bin\FFXCmdRenderer-x86-SSE2.exe&quot;&lt;br /&gt;&quot;C:\Program Files (x86)\Filter Forge 2\Bin\FFXCmdRenderer-x86-SSE2.exe&quot;&lt;br /&gt;&quot;C:\Program Files\Filter Forge 2\Bin\FFXCmdRenderer-x86-SSE2.exe&quot;&lt;br /&gt;&quot;C:\Program Files (x86)\Filter Forge\Bin\FFXCmdRenderer-x86-SSE2.exe&quot;&lt;br /&gt;&quot;C:\Program Files\Filter Forge\Bin\FFXCmdRenderer-x86-SSE2.exe&quot;&lt;br /&gt;&quot;&quot;&quot;.split(&quot;\n&quot;):&lt;br /&gt;    try:&lt;br /&gt;        subprocess.call(string + &quot; temp.xml&quot;)&lt;br /&gt;        break&lt;br /&gt;    except:&lt;br /&gt;        pass&lt;br /&gt;&lt;br /&gt;os.remove(&quot;temp.xml&quot;)&lt;br /&gt;if copied:&lt;br /&gt;    os.remove(sys.argv[2]+&quot;.ffxml&quot;)[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Wed, 22 May 2013 06:54:02 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Great! Sounds also perfect for putting video or animation frames through a filter.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Thu, 23 May 2013 15:01:46 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hi MachinesInMotion,&lt;br /&gt;&lt;br /&gt;I attempted to use this batch tool but it doesn't run and I cannot figure out why.&lt;br /&gt;&lt;br /&gt;I have extracted the zip in the folder C:/admin/ffbat and have a bunch of jpeg images in the folder C:/admin/ffbat/images. I am trying to run a filter with the name AnimatedLensFlares, first preset. The filter is in My Filters.&lt;br /&gt;&lt;br /&gt;As per the instructions I would gather the command should be: &lt;br /&gt;&lt;br /&gt;ffbat\ffbat images\* AnimatedLensFlares 0&lt;br /&gt;&lt;br /&gt;With that I get the result:&lt;br /&gt;&lt;br /&gt;[CODE]Usage: ffbat source filtername preset&lt;br /&gt;&lt;br /&gt;Filter Forge command line renderer, version 3.014.&lt;br /&gt;&amp;#169; 2006-2012 Filter Forge Inc. All rights reserved.&lt;br /&gt;Professional Edition&lt;br /&gt;License Name: ThreeDee.[/CODE]&lt;br /&gt;&lt;br /&gt;There are no error messages but nothing gets processed either.&lt;br /&gt;&lt;br /&gt;Any ideas?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Thu, 23 May 2013 15:19:37 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Does this require that the images are .PNG files to work?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Thu, 23 May 2013 15:36:32 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Ok, I managed to get one specific file to render with the following command:&lt;br /&gt;&lt;br /&gt;ffbat\ffbat ffbat\images\flare_MVI_8235_00000.png AnimatedLensFlares 0&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Thu, 23 May 2013 15:43:17 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;And finally a number of files with this:&lt;br /&gt;&lt;br /&gt;ffbat\ffbat ffbat\images\*.png AnimatedLensFlares 0&lt;br /&gt;&lt;br /&gt;(It did not work without &quot;.png&quot;)&lt;br /&gt;&lt;br /&gt;I also suspect that this will only work if there are no spaces in file and folder names, correct?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Thu, 23 May 2013 16:04:52 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Works fine with jpegs as well if I put &quot;*.jpg&quot;, so it must be related to folder options (whether you show or hide known file extensions).&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Fri, 24 May 2013 14:11:42 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thanks for sharing it with the forum, and it looks good, but regretably I am bad using command line applications, and try to avoid it, and would like much better any GUI based one and that could work well and be updated to be used with FF 3.0 or FF 4.0 as &lt;a href=&quot;http://www.filterforge.com/forum/read.php?FID=9&amp;TID=10578&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;the others available seen in this other thread here&lt;/a&gt; does not work right, at least the windows versions&lt;br /&gt;&lt;br /&gt;Also your good Batch rendering wrapper is only for batch rendering one image or a folder with just one filter and one preset. &lt;br /&gt;&lt;br /&gt;I have suggested before the following&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;WHAT WOULD BE GOOD TO BE ABLE TO DO AS BATCH PROCESSING IN FILTER FORGE &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;For example I have one single image and want to: &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;* be able to select a group of filters ( for example 20 filters) and apply all of them to this same image, also it would be needed to be able to choose which one of the filters preset will be applied, so the result will 20 images. &lt;br /&gt;&lt;br /&gt;* be able to select a group of filters (for example 5) and a group of presets of these filters (for example 20 filters and choose 3 presets of each filter) and apply them all to this same image, so the result will be 100 images. &lt;br /&gt;&lt;br /&gt;* be able to select a group of filters and a different amount of presets fr om each filter, perhaps 2 presets fr om filter 1, 4 presets fr om filter 2, 1 preset fr om filter 3, etc. and apply all of them to the same single image so you will have lots of different versions of the same image with different filters and presets. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;For example I have 40 images in a folder and want to: &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;* be able to apply the same filter and same preset to all the 40 images. Result 40 images&lt;br /&gt;&lt;br /&gt;* be able to apply a group of filters, with one preset each one, to all the 40 images. Result 40 images &lt;br /&gt;&lt;br /&gt;* be able to select a group of filters (for example 5) and a group of 3 presets to each, and so you will get as result 600 images. &lt;br /&gt;&lt;br /&gt;* Be able to select (as above already described) a group of filters and a group of presets and apply all of them to all the 40 images.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;earthbound&lt;/b&gt;, &lt;em&gt;Mon, 16 Nov 2015 17:20:48 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;* be able to select a group of filters ( for example 20 filters) and apply all of them to this same image, also it would be needed to be able to choose which one of the filters preset will be applied, so the result will 20 images. . . .&lt;br /&gt;* be able to apply the same filter and same preset to all the 40 images. Result 40 images &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;SpaceRay: Begging your pardon since the last post in this thread approaches three years ago, but while I don't know whether any existing tools accomplish those objectives, I know a tool I wrote and released does (the last I searched for something that can do those things, I didn't find it, so I coded my own).&lt;br /&gt;&lt;br /&gt;I've searched the forums and found everything I could about external/batch tools (the last time I searched, well before coding my own solution, I only found two--there are many), and updated the main page of the wiki with them:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://www.filterforge.com/wiki/index.php/Main_Page#PC&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.filterforge.com/wiki/index.php/Main_Page#PC&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you know anything I missed, please let me know, or better yet, update the wiki yourself :)&lt;br /&gt;&lt;br /&gt;The tool I wrote that accomplishes those things, I announced here: &lt;a href=&quot;https://www.filterforge.com/forum/read.php?FID=5&amp;TID=13617&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;https://www.filterforge.com/forum/read...&amp;TID=13617&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;With some more work, my tool can do all of those things you want (which I didn't quote all of them).&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;earthbound&lt;/b&gt;, &lt;em&gt;Mon, 16 Nov 2015 22:38:12 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Oh, sheesh--after pouring through the forums and finding so many tools, I listed them all at the wiki *except for the one here, where I announce my wiki edits)*. :blush: Sorry about that! Updating wiki to include this here one :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 04 Oct 2020 06:02:58 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;earthbound wrote:&lt;/b&gt;&lt;br /&gt;I listed them all at the wiki *except for the one here, where I announce my wiki edits)*.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;thanks for including all the available tools &lt;a href=&quot;https://www.filterforge.com/wiki/index.php/Main_Page#PC&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;in the FF wiki as seen here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The link from the first post is broken and not available&lt;br /&gt;&lt;br /&gt;But in the FF Wiki I have seen that there is this link that I think is a new updated for this tool &lt;a href=&quot;https://github.com/earthbound19/filterForgeBatchWrapper&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Download it from Github here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In the link page is not clear about version of FF is compatible.&lt;br /&gt;Does it work with FF 9?&lt;br /&gt;&lt;br /&gt;Thanks for any possible help&lt;/p&gt;
</description>
</item>
<item><title>Tottes MegaSwitch</title> 
		             <dc:creator>Totte</dc:creator> 
		             <category></category> 
		             <pubDate>Sun, 30 Aug 2020 12:50:46 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=7563</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=7563</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;Totte&lt;/b&gt;, &lt;em&gt;Fri, 02 Jul 2010 01:22:32 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;OK, here is my MegaSwitch component, in a sample filter to show it off.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;StevieJ&lt;/b&gt;, &lt;em&gt;Fri, 02 Jul 2010 11:12:07 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I can't look at it yet due to the current V2 problem.....but got me thinking that a script could be made so that each switch could be drop-menu labelled in the controls.....when I get more advanced with scripting of course.....   ;)  :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Crapadilla&lt;/b&gt;, &lt;em&gt;Sat, 03 Jul 2010 14:57:32 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;What's up with the attachment file names?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Totte&lt;/b&gt;, &lt;em&gt;Sat, 03 Jul 2010 16:45:53 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Crapadilla mysteriously wrote:&lt;/b&gt; &lt;i&gt;What's up with the attachment file names?&lt;/i&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;My best guess, &lt;b&gt;a fubar up bug that is broken&lt;/b&gt;.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Carl&lt;/b&gt;, &lt;em&gt;Sat, 03 Jul 2010 18:47:14 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;it only open as xml file for me [ same problem with all these attachments on the site since they changed server ], this happen once before a couple of years ago but for the life of me I can't recall how to get round it, pitty as I would use this :(&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Vladimir Golovin&lt;/b&gt;, &lt;em&gt;Sun, 04 Jul 2010 02:21:53 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Crapadilla wrote:&lt;/b&gt;&lt;br /&gt;What's up with the attachment file names?&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;We'll fix this soon.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Smacky&lt;/b&gt;, &lt;em&gt;Sun, 04 Jul 2010 16:37:09 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hi all. This is my first post, but i thought I could be of help.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Carl wrote&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&quot;it only open as xml file for me [ same problem with all these attachments on the site since they changed server ], this happen once before a couple of years ago but for the life of me I can't recall how to get round it, pitty as I would use this &quot;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;My workaround for this issue is to right click on the file link, choose &quot;save target as&quot; and give the file a new name with ffxml as the extension. Once you've downloaded the file, move it into your &quot;My Filters&quot; folder, then restart FF. Seems to work well with most.&lt;br /&gt;&lt;br /&gt;Totte, I like the idea, but I can't get your megaswitch filter to work. Produces the same output no matter what the setting is. I've looked at the script, but my programming days are long behind me. Perhaps it is some incompatibility between Mac OS and Windows (which is what I am using).&lt;br /&gt;&lt;br /&gt;Cheers,&lt;br /&gt;Smacky&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Totte&lt;/b&gt;, &lt;em&gt;Sun, 04 Jul 2010 18:15:38 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Did you slide the variation slider? Strange, cause it should pick on out the the maximum inputs set (1-16), where 1 is rather silly as it will be only one to choose from.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Smacky&lt;/b&gt;, &lt;em&gt;Sun, 04 Jul 2010 19:31:55 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;No, I was definitely using the itemcount slider. Since you mentioned the variation slider I tried an experiment where I changed the value of the V slider to something else, and got some pretty curious results. With variation set to 1, the filter always outputs the #1 input, no matter what itemcount is set at. If I change variation to something else, the output is more or less random, although most of them are still input #1. Very strange, and I would guess some kind of bug in V2.&lt;br /&gt;&lt;br /&gt;Smacky&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Smacky&lt;/b&gt;, &lt;em&gt;Sun, 04 Jul 2010 19:45:31 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Totte.&lt;br /&gt;&lt;br /&gt;I had another look at the script and found the problem, I think.In the prepare function there is a line that goes:&lt;br /&gt;&quot;index = math.mod(VARIATION, itemcount)&quot;&lt;br /&gt;I'm not sure what this line is meant to do, but if I change it to:&lt;br /&gt;&quot;index = itemcount&quot;&lt;br /&gt;the filter seems to work as advertised.&lt;br /&gt;Cheers.&lt;br /&gt;Smacky&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Totte&lt;/b&gt;, &lt;em&gt;Mon, 05 Jul 2010 00:42:14 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Smacky: the filter works as intended.&lt;br /&gt;&lt;br /&gt;Itemcount sets how many of the 16 inputs that are currently in use.&lt;br /&gt;using Variation-slider, the output will be psuedo-randomly picked from one of those 16 inputs using the &quot;index = math.mod(VARIATION, itemcount)&quot; line.&lt;br /&gt;&lt;br /&gt;The problem really is &quot;no way to explain that&quot; except in - - comments in Lua.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Carl&lt;/b&gt;, &lt;em&gt;Mon, 05 Jul 2010 01:24:06 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thanks Smacky [ and hi ] I'll give that a try :)&lt;br /&gt;&lt;br /&gt;Edit; work perfectly thanks again Smacky&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Totte&lt;/b&gt;, &lt;em&gt;Mon, 05 Jul 2010 01:39:04 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I guess the problem is that you want a controllable switch, not a random switch, which this is. The changes you made Smacky transformed it to a controllable switch, from a random switch (which is what I created). Maybe have a second input saying (controllable/randomized), which will be the best of both worlds...&lt;br /&gt;&lt;br /&gt;Posted a new version on &lt;a href=&quot;http://4eyes.code66.se/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;4eyes&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Mon, 05 Jul 2010 01:46:25 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hi Totte,&lt;br /&gt;&lt;br /&gt;I just realized that the input constants, e.g. INPUT_1 contains simple index values.&lt;br /&gt;To get the value of an input constant, write error(INPUT_1) or whatever the name of the input is. In your case there is a perfect relation with the actual index variable in your script, making the big conditional obsolete:&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	return get_sample_map(x, y, index)&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;should work just fine.&lt;br /&gt;&lt;br /&gt;This could have been different, but you obviously first added all the inputs (in correct order) and then itemCount input. That is why their value matches your index.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Smacky&lt;/b&gt;, &lt;em&gt;Mon, 05 Jul 2010 11:43:01 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Oops. My apologies. I did think you were demonstrating how to make an oversized switch component, when you were obviously going for something more interesting. My bad. I'll shut up now.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Totte&lt;/b&gt;, &lt;em&gt;Mon, 05 Jul 2010 13:37:45 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;@Sphinx . They were added, they reordered, as otherwise they came 1, 10,11,12,13,14,15,2,3 etc....&lt;br /&gt;I will check your approach, but I think it will fail as I have reordered them, but a nice idea.&lt;br /&gt;&lt;br /&gt;@Smacky: lol - now you got Both.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Mon, 05 Jul 2010 14:23:24 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Ok, perhaps it can add a little randomness then, hehe&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sat, 28 Jan 2012 19:44:59 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hello, Please could you explain how this works for a beginner that does not know nothing about scripts ?&lt;br /&gt;&lt;br /&gt;I have downloaded it, replaced the big number name for the Megaswitch name and clicking over it is installed in FF 3.0&lt;br /&gt;&lt;br /&gt;The problem for me comes when I try to use it, as the slider DOES NOT work and nothing happens when changing from one to another.&lt;br /&gt;&lt;br /&gt;Surely I am making something wrong. &lt;br /&gt;&lt;br /&gt;Do you need to modify the script to use it ?&lt;br /&gt;&lt;br /&gt;How do you select from the 16 sources, just using the selector slider and choosing one of the numbers ?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Morgantao&lt;/b&gt;, &lt;em&gt;Sun, 29 Jan 2012 06:25:58 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Spaceray, download the updated version below (from totte's website) and uncheck IsRandomizable.  Be sure that Variations is NOT set to 1.  That way you can have all 16 outputs with the selector slider.&lt;br /&gt;&lt;br /&gt;Other than tat don't ask me how this thing works, as it's WAY over my head.&lt;br /&gt;I would love to see an example of this megaswitch in action in a proper filter, just to try and understand how to implement it, but I guess that's up to the masters of the FF universe to decide if they have the time to do that  :D&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 29 Jan 2012 09:14:48 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Morgantao wrote:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Spaceray, download the updated version below&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Thanks very much for the new updated version, I have downloaded it. In wich TotteÂ´s website is this available ? In the one of his profile or other different ?&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Morgantao wrote:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;uncheck IsRandomizable. Be sure that Variations is NOT set to 1. That way you can have all 16 outputs with the selector slider. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;WOW!! Thanks very much for this suggestion and instruction on how to use it, I knew I was doing something wrong and did not work and was because I used variations=1 , after changing the variation to a higher number it works perfectly well selecting the source between the 16 available.&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Morgantao wrote:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Other than that don't ask me how this thing works, as it's WAY over my head.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Well, I do NOT need to ask anything more, and really do NOT need to know how it works inside the script to be able to use it. &lt;br /&gt;&lt;br /&gt;You do not need to understand and know how electricity works to use it, do you?, you just plug the electrical appliance you want to use in wall socket and use it, donÂ´t care how and why it works :D &lt;br /&gt;&lt;br /&gt;And if for you this is WAY over your head, imagine to me !!! ItÂ´s WAY WAY WAY BEYOND over my head 1000 meters  :D&lt;br /&gt;&lt;br /&gt;For me making and understanding script would be like be able to touch Lava with my naked hands :D&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Morgantao&lt;/b&gt;, &lt;em&gt;Sun, 29 Jan 2012 17:35:43 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;In that case for me it's like putting out a campfire with my tongue  :D&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sat, 11 Aug 2012 15:23:18 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Morgantao wrote:&lt;br /&gt;Spaceray, download the updated version below (from totte's website) and uncheck IsRandomizable.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Be sure that Variations is NOT set to 1&lt;/b&gt;. That way you can have all 16 outputs with the selector slider.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;br /&gt;&lt;br /&gt;Please, is there some good way that Variation is NOT set to 1 when downloading the filter.&lt;br /&gt;&lt;br /&gt;The only way I have found is to make the presets have a different variation number but do not know if this is a good way or there can be another one.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Thanks again to Totte for this MegaSwitch &lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Morgantao&lt;/b&gt;, &lt;em&gt;Mon, 13 Aug 2012 14:18:24 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;SR, you can always edit the ffxml file and change the variation of the default preset&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Totte&lt;/b&gt;, &lt;em&gt;Sat, 18 Aug 2012 02:10:32 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Just saw this discussion, hope you having fun with it.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sat, 18 Aug 2012 03:12:27 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;The only way I have found is to make the presets have a different variation number but do not know if this is a good way or there can be another one. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;I have seen that this works right and as always that is loaded a filter it loads the first (or the last default filter) filter preset it will always move the variation to the one on the preset and be higher than one, so there is no more problem.&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Morgantao &lt;br /&gt;SR, you can always edit the ffxml file and change the variation of the default preset&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;This would be IF you could not do it inside FF, but you can do it and update any preset (that is not a factory preset) with the right values of variations, so there is no problem.&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Totte:&lt;br /&gt;Just saw this discussion, hope you having fun with it.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Yes, thanks to you there is the possible thing to have a 16 switch instead of the normal 12 one&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Thanks again to Totte for this MegaSwitch&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Totte&lt;/b&gt;, &lt;em&gt;Sat, 18 Aug 2012 03:21:32 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;You can make that 100 if you just spend more time editing the script&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sat, 18 Aug 2012 03:21:51 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I have made a great, interesting and useful discovery in this filter&lt;br /&gt;&lt;br /&gt;&lt;b&gt;YOU CAN HAVE AS MANY SWITCHS AS YOU WANT WITH THIS SCRIPT AND &lt;u&gt;NOT ONLY 16&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I was wondering if it would be possible to make a 20 switchs megaswitch instead of the 16 available now, and I was going to make this request when I have seen that he Map script component has an&lt;b&gt; Input Editor&lt;/b&gt; on the settings tab and there you can configure any amount of switchs AND also customize other possible connections required if needed for this component.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;So now this filter has risen much itÂ´s value and is even better than what I thought. &lt;br /&gt;&lt;br /&gt;Thanks again to Totte for this MegaSwitch&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Totte&lt;/b&gt;, &lt;em&gt;Sat, 18 Aug 2012 03:22:53 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;As I said, just add more code.... more inputs... and your done&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Sat, 18 Aug 2012 03:25:16 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Yes one of these days there will be a component with 1000 inputs.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sat, 18 Aug 2012 03:34:08 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thanks Totte, we wrote the post both at exactly the same time  :D but yours when first than mine. &lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Totte wrote:&lt;br /&gt;As I said, just add more code.... more inputs... and your done&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;What is very good on this is that you do not need to modify the inner code of the script and do not have to modify the script itself, it is very easily done with the &quot;Input editor&quot; available to add any more inputs you want and configure them as you want without any problem, which is great.&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Skybase wrote:&lt;br /&gt;Yes one of these days there will be a component with 1000 inputs.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt; :D &lt;br /&gt;Well considering that FF does NOT make a selection of the components that are behind the switch and ALL of them are included in the results components (wich is a very bad thing) it would be impossible to make this AND keep it working right and being fast and usable  :D&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Mon, 15 Jun 2015 00:40:36 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;This is really a missing gem from the forum, and it deserves to be known more, as this is very useful, interesting and good way to go over the limitation of filter forge and that you can not have more than 12 elements in the switch, with this great megawitch from Totte, totally recommended if you ever need to have more than 12 elements for a switch&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Tue, 16 Apr 2019 21:51:00 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I bump this again as the FF 8 switch is still having the limit and this switch is much better with up to 16 elements by default but it seems that it can be upgraded with more elements&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Totte wrote:&lt;/b&gt;&lt;br /&gt;You can make that 100 if you just spend more time editing the script&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;BUT the problem is that when you do it, then you get an error message from the IntSlider as seen here&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;The Incoming value range (1...20) exceeds the maximum range of this input (2...17) To fix this, lower the amount &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;So is there then a problem that IntSlider does NOT allow more a higher amount of 17 ??? Or I am missing something ?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;HERE BELOW I ATTACH THE MODIFIED VERSION &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;As you can see if you go over 16 values it does nothing, although the script is modified. IF you can explain it would be much appreciated.&lt;br /&gt;&lt;br /&gt;Thanks for any help&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Here is what I have done to modify the filter&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I have been wondering how to do this and until know I have not known how to do it, and now I found how to do it&lt;br /&gt;&lt;br /&gt;Just add &lt;br /&gt;&lt;br /&gt;elseif ( index ==17) then inp=INPUT_17&lt;br /&gt;elseif ( index ==18) then inp=INPUT_18&lt;br /&gt;elseif ( index ==19) then inp=INPUT_19&lt;br /&gt;....&lt;br /&gt;&lt;br /&gt;and then go to the Input Editor and click on new input and add as many additional inputs as you have added to the script&lt;br /&gt;&lt;br /&gt;you need to add a name and then use the INPUT_17 (being 17 the corresponding number of each new input created)&lt;br /&gt;&lt;br /&gt;you can put the name as you want and do not have to be Input and the number&lt;br /&gt;&lt;br /&gt;then go to ItemCount and Selector components and increase the number of inputs to the total amount&lt;br /&gt;&lt;br /&gt;&lt;b&gt;THE BELOW FILTER IS FOR FF 8.0 DOES NOT WORK ABOVE 16 inputs &lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Rachel Duim&lt;/b&gt;, &lt;em&gt;Tue, 16 Apr 2019 23:38:51 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;SpaceRay, this works in FF7 and FF8. I have taken out the randomize and item count, something is not right about randomization (which should work in the prepare section but is not working). This has 20 inputs to the switch. The problem you were having was probably in the input editor for the integers numbers. A side note, I could not edit this on the Mac, editing the script constantly crashed in FF7 and FF8 when trying to change the range of integer numbers in the input editor.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Wed, 17 Apr 2019 00:16:27 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;rachelduim wrote:&lt;/b&gt;&lt;br /&gt;This has 20 inputs to the switch. The problem you were having was probably in the input editor for the integers numbers.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Great, Thanks very much for fixing it for 20 inputs and it works right as you have done it &lt;br /&gt;&lt;br /&gt;BUT if I try to add any additional input I get the SAME error as before but now the limit is 21 instead of 17 &lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;The Incoming value range (1...21) exceeds the maximum range of this input (2...21) To fix this, lower the amount &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Rachel Duim&lt;/b&gt;, &lt;em&gt;Wed, 17 Apr 2019 00:42:46 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Ok, your issue is probably this, click the Map Script. Go to the Input Editor. Scroll down to Numeric Inputs and highlight Selector. Then change the Maximum Value to whatever you need, then click OK. I'm hoping this is the part you missed.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;totte&lt;/b&gt;, &lt;em&gt;Wed, 17 Apr 2019 01:16:44 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Cool this old little baby still is popular;-)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Rachel Duim&lt;/b&gt;, &lt;em&gt;Wed, 17 Apr 2019 21:53:50 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;A greatly simplified version, the ELSEIF's are not needed. Works in FF7 &amp; FF8.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 30 Aug 2020 12:50:46 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;rachelduim wrote:&lt;/b&gt;&lt;br /&gt; A greatly simplified version, the ELSEIF's are not needed.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Thanks very much for making this much simplified version&lt;br /&gt;&lt;br /&gt;it works correctly also on FF 9&lt;br /&gt;&lt;br /&gt;will see how it works&lt;/p&gt;
</description>
</item>
<item><title>Be able to make a Blend Modes control WITH names with LUA scripting?</title> 
		             <dc:creator>SpaceRay</dc:creator> 
		             <category></category> 
		             <pubDate>Mon, 04 May 2020 08:35:10 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=15916</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=15916</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Fri, 17 Apr 2020 04:39:56 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Sorry if this may be a silly and mistaken idea, as I do not know about scripting or how FF handles the showing of names on the Settings panel&lt;br /&gt;&lt;br /&gt;It has been already 10 years, and there is still no way to show the names of the blend modes in the settings control, and it can only be shown correctly each selected blend mode name inside the remapper inside the filter.&lt;br /&gt;&lt;br /&gt;So as there has not been anyone that have built any possible solution for this using FF components (In a simple and easy way), I wonder if it could be possible to show the names that appear in the remapper in the settings controls of the filter using LUA scripting&lt;br /&gt;&lt;br /&gt;Thanks for any possible help and sorry again if this is a bad and wrong idea&lt;br /&gt;&lt;br /&gt;I made for FF 4.0 this filter snippet for is not easy to setup and it clutters the settings controls&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://www.filterforge.com/forum/read.php?FID=11&amp;TID=11679&amp;MID=154139#message154139&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Blend Modes WITH names&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Fri, 17 Apr 2020 22:18:56 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;This isn't doable.&lt;br /&gt;&lt;br /&gt;There's no dynamic way to control text in the settings tab.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Beat&lt;/b&gt;, &lt;em&gt;Sun, 03 May 2020 19:28:12 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Skybase wrote :This isn't doable.&lt;br /&gt;&lt;br /&gt;There's no dynamic way to control text in the settings tab. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Is this inherently impossible, or just not possible with the current FF application?&lt;br /&gt;I mean, would the architecture of FF, with an adaption by the makers, be able to comply to the request of SpaceRay?&lt;br /&gt;I would very much welcome it.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Mon, 04 May 2020 01:55:06 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Is this inherently impossible, or just not possible with the current FF application?&lt;br /&gt;I mean, would the architecture of FF, with an adaption by the makers, be able to comply to the request of SpaceRay? &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Ah just the current program won't let that happen.&lt;br /&gt;&lt;br /&gt;I generally think this is better implemented through drop down menus instead. &lt;br /&gt;&lt;br /&gt;Dynamically changing names of technically what's understood to be static elements i.e. text in a control box, seems like calling for trouble. I can easily abuse this to confuse the crap out of you all lol. Unless you really can tell that the element is supposed to change based on variables then it'd make better sense.&lt;br /&gt;&lt;br /&gt;But why do that when we rather have practical things like drop down menus?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Mon, 04 May 2020 03:34:12 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Skybase wrote:&lt;/b&gt;&lt;br /&gt;But why do that when we rather have practical things like drop down menus?&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;I totally agree with you and it really true that the best way would be surely to have drop down menu on the settings and would be the best way to do it but... &lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Skybase wrote:&lt;/b&gt;&lt;br /&gt;I generally think this is better implemented through drop down menus instead.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;...I started this thread because Vladimir has already put that it was very difficult or not possible to make drop down menu in FF as it seems is very difficult and hard with the current way it is programmed &lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Vladimir Golovin wrote in  2006 already 14 years ago!!:&lt;/b&gt;&lt;br /&gt;Dropdown (a.k.a List Control) was put on indefinite hold because it was going to take too long to implement (it requires a serious redesign of Filter Forge's infrastructure for control components).&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://filterforge.com/forum/read.php?FID=9&amp;TID=632&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Dropdown list&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;SO as said,  I agree with you and agree also that it would be the best way but it has not been possible in 14 YEARS, so I do not think they will do it this way and this is why I suggested this possible alternative&lt;br /&gt;&lt;br /&gt;IF WITH LUA IS NOT POSSIBLE &lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;SpaceRay wrote:&lt;/b&gt;&lt;br /&gt;If the dropdown is the problem, is not really needed and surely there could be other possible alternative way, for example just use a text slot as it happens already in the remapper inside the filter where it is shown the name of the selected blend mode, so it would appear the name in the settings control instead of a number&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Beat&lt;/b&gt;, &lt;em&gt;Mon, 04 May 2020 08:35:10 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Definitely, native dropdown menus would be BEST.&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Vladimir Golovin wrote in 2006 already 14 years ago!!:&lt;br /&gt;Dropdown (a.k.a List Control) was put on indefinite hold because it was going to take too long to implement (it requires a serious redesign of Filter Forge's infrastructure for control components).&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;SpaceRay wrote:&lt;br /&gt;If the dropdown is the problem, is not really needed and surely there could be other possible alternative way, for example just use a text slot as it happens already in the remapper inside the filter where it is shown the name of the selected blend mode, so it would appear the name in the settings control instead of a number&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;I am sure that Vladimir is right, but as SpaceRay points out, it seems to be possible inside the editor, with the remapping. I am curious what makes it so hard to do the same in the Settings?&lt;br /&gt;&lt;br /&gt;Maybe a bit off topic, but it would be nice if all the 19 Blend Modes used by PS, would be available in the Blend Component. I really miss Exclusion and Subtract. I know I can make them with RGBMath (at least Subtract), but I feel that they should all be together in the Blend Component.&lt;/p&gt;
</description>
</item>
<item><title>Is Possible to use LUA script found on internet inside FF Map script?</title> 
		             <dc:creator>SpaceRay</dc:creator> 
		             <category></category> 
		             <pubDate>Sun, 12 Apr 2020 18:09:28 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=15907</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=15907</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 12 Apr 2020 02:33:19 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;b&gt;First I want to say that I am very sorry if I am saying something wrong, or silly things, or I am mixing things and I am mistaken about this&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I have though that if I do not know how to use LUA, there are surely some other that do know well how to use it and that they share their scripts to be used by others and could maybe be used with FF in some way&lt;br /&gt;&lt;br /&gt;1 -  what I do not know is what kind of LUA scripts would be compatible with FF and work inside for a filter, as I have no idea how the FF LUA works in comparison with the other LUA scripts.&lt;br /&gt;&lt;br /&gt;2 - As FF only is able to use just one Scrip on each map script, so could you combine different map scripts to work together?&lt;br /&gt;&lt;br /&gt;3 - How do you know how to configure the inputs (in the FF input editor) that the script would need or that are needed from a LUA script?&lt;br /&gt;&lt;br /&gt;4-How similar or different is FF LUA to the. other LUA script available on internet?&lt;br /&gt;&lt;br /&gt;5- Is not possible to use on FF if the LUA scripts is used as a command-line program?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Maybe I should leave it and not do this at all if I do not have any LUA scripting knowledge&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;For example&lt;br /&gt;&lt;br /&gt;&lt;b&gt;FLOOD FILL LUA SCRIPT&lt;/b&gt;&lt;br /&gt;&lt;br /&gt; I have found this Flood Fill LUA script&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://github.com/Yonaba/FloodFill/blob/master/main.lua&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;https://github.com/Yonaba/FloodFill/bl...r/main.lua&lt;/a&gt;&lt;br /&gt;&lt;br /&gt; but I have seen that it uses more than one script because if I copy the Main file to FF it tells me that that there are some missing things and is because these missing things are other additional scripts that are separate. I wonder if it would be possible to put all the parts in just one script or combine multiple Map scripts to make it work?&lt;br /&gt;&lt;br /&gt;when looking at thw whole project you can find the other missing parts&lt;br /&gt;&lt;br /&gt;This is the master main file of the FloodFill&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://github.com/Yonaba/FloodFill&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;https://github.com/Yonaba/FloodFill&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I have copied to a FF filter the main file but as said it has missing things&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Sun, 12 Apr 2020 09:26:43 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;This kind algorithm requires a bitmap. It is not possible to create bitmap based scripts in Filter Forge. &lt;br /&gt;&lt;br /&gt;When looking at other lua scripts, you always have to think about the procedural sampling approach in FF - will it fit into that? If you see something that process maps or tables (discrete processing), it is likely not to work in FF.&lt;br /&gt;&lt;br /&gt;That said - you CAN use other libraries etc, but unless you copy it all into the same script block, you have to refer the external lua files on your hard drive, and that will only work in unsafe mode, and it is not easy debugging these setups. It is also likely to become very slow due to the way FF initialize in every rendering block.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 12 Apr 2020 18:09:28 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thanks very much for your answer and help and is valuable&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Sphinx. wrote:&lt;/b&gt;&lt;br /&gt;This kind algorithm requires a bitmap. It is not possible to create bitmap based scripts in Filter Forge&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Yes, is right, I already knew that this flood fill would need a bitmap grid as source image that would be filled but then I continue reading and discover something I did not know &lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Sphinx. wrote:&lt;/b&gt;&lt;br /&gt; It is not possible to create bitmap based scripts in Filter Forge&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;OH! I did not know that you can not use any bitmap based thing in the script, and is very good to know it, so then it limits much what can be done with a FF LUA script as many of the scripts available uses a bitmap in the script as they are graphical scripts&lt;br /&gt;&lt;br /&gt;Now I understand why the FF hyperbolic script does not have any color control or image source inside the script&lt;br /&gt;&lt;br /&gt;From your answer I also understand and know even more why the scripting is not used more and is more difficult to use it &lt;br /&gt;&lt;br /&gt;Thanks again for explaining it&lt;/p&gt;
</description>
</item>
<item><title>Why is not used much more the LUA scripting to make filters?</title> 
		             <dc:creator>SpaceRay</dc:creator> 
		             <category></category> 
		             <pubDate>Fri, 03 Apr 2020 03:36:17 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=15893</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=15893</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Mon, 30 Mar 2020 03:33:09 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I have seen that there are really just a few filters that use scripting and as seen on the scripting part of the forum, there has been very few post about this topic in seven years.&lt;br /&gt;&lt;br /&gt;what do you think about why is not used more with FF?&lt;br /&gt;&lt;br /&gt;Is it really so hard and difficult to be able to use the LUA to get things that are not possible with FF components? &lt;br /&gt;&lt;br /&gt;Sorry much that I do not have knowledge about coding and scripting&lt;br /&gt;&lt;br /&gt;It is supposed to be a great powerful and useful tool to do things, but in all these years is not really used much, even the FF company employees or Vladimir has not made any filters with scripting as far as I know.&lt;br /&gt;&lt;br /&gt;in 2010 started this thread&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://www.filterforge.com/forum/read.php?FID=18&amp;TID=7530&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Script-component-based filter ideas&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;but the all these things has not been done in FF as far as I know&lt;br /&gt;&lt;br /&gt;How many of the FF users know really how to use the LUA scripting?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Mon, 30 Mar 2020 07:04:38 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I can think of many reasons.&lt;br /&gt;&lt;br /&gt;1. No need to script: The discussion you refer to is back from the V1 days. No math components, no bomber, no loop, no shapes, no transforms (except a weird version of Offset)... scripting would make so many things easier. But now FF is quite versatile and many new native and advanced components has added since scripting.&lt;br /&gt;&lt;br /&gt;2. Too advanced for the major user segment.&lt;br /&gt;&lt;br /&gt;3. Performance issues (first scripting was slow and buggy, then it became fast and buggy, now it is slow and stable). Personally this has been very frustrating to me and put an effective stop to my scripting projects. It doesn't pay to fix and I can understand that. &lt;br /&gt;&lt;br /&gt;4. No sharing/submissions: I think there are many scripts &quot;out there&quot;, but they just don't make it to the forums/library for some reason (incentives, relevance, unfinished state etc). Also &quot;unsafe&quot; scripts can't be submitted&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;AndrewA1988&lt;/b&gt;, &lt;em&gt;Mon, 30 Mar 2020 23:07:11 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;1. Not enough builtin functions.&lt;br /&gt;&lt;br /&gt;2. Because of #1, it's more difficult to find examples that are 1) easily transferable to FF and 2) don't require you to re-invent the wheel. This makes the learning curve probably higher than it has to be.&lt;br /&gt;&lt;br /&gt;3. FF probably doesn't have the user base for it right now. Someone who knows how to script is probably using a different program (Substance Designer, etc.).&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Ramlyn&lt;/b&gt;, &lt;em&gt;Tue, 31 Mar 2020 02:01:04 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I use scripting a lot in my filters. I guess about 1/5 of my filters have some original component. But, as you can easily see, they are very simple components. For example, what I do the most is having a customized switch, to increase the number of choices.&lt;br /&gt;&lt;br /&gt;As Sphinx and AndrewA1988 said, many people have no idea about how to use Lua. Me too. Even in my free time I'm trying to learn, I'm still far from making innovative components.&lt;br /&gt;&lt;br /&gt;There are already components doing many of the things that are possible to do. Then it is difficult to think about some script doing something completely new.&lt;br /&gt;&lt;br /&gt;Anyway.........  it would be nice to make someway a library of scripting. And trying to make new components. &lt;br /&gt;There are sometimes ideas that have never been developed by Filter Forge. Most of the cases for obvious reasons: they would be simply a variation of an already existing component. But they would be useful to develop some particular filter. A typical example is the non overlapping particle for the bomber. I guess, for doing it, it would make necessary to completely re-program the bomber, creating someway a &quot;Bomber ++&quot;. We already have two bombers and making a third may not have much sense. But in some filter it would be nice to have it.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Fri, 03 Apr 2020 03:36:17 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thanks really very much for all the comments, they are good and useful to understand more about this topic &lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Sphinx. wrote:&lt;/b&gt;&lt;br /&gt;2. Too advanced for the major user segment. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;AndrewA1988 wrote:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;3. FF probably doesn't have the user base for it right now. Someone who knows how to script is probably using a different program (Substance Designer, etc.).&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Ramlyn wrote:&lt;/b&gt;&lt;br /&gt;As Sphinx and AndrewA1988 said, many people have no idea about how to use Lua. Me too. Even in my free time I'm trying to learn, I'm still far from making innovative components. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;This is what I think more as usually many people that are in design and art, does not like to learn scripting because they are visual persons that are much more tending to use visual scripting with nodes instead with code lines, like for example myself. &lt;br /&gt;&lt;br /&gt;And for people that are using scripting I think they use other kind of software that has more possibilities like for example Processing.org or Phyton, or others.&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Ramlyn wrote:&lt;/b&gt;&lt;br /&gt;Anyway......... it would be nice to make someway a library of scripting. And trying to make new components. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;YES, This is what I have been thinking, that as it is available the scripting, it could be used for making new components that could do things that are not possible (or difficult or complex) to do with FF components, and do new things, as FF has a great potential, but of course is needed much knowledge and time to learn it and know what is possible and how to do it.&lt;/p&gt;
</description>
</item>
<item><title>Projective Transform (Four point transform)</title> 
		             <dc:creator>Sphinx.</dc:creator> 
		             <category></category> 
		             <pubDate>Wed, 19 Feb 2020 04:40:24 -0500</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=7581</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=7581</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Mon, 05 Jul 2010 07:10:53 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I translated some parts of a graphics library I'm co-developer on, so now we have a true four point projective transformation, and it supports both ways (i.e. you can transform &quot;back&quot; by using opposite setting for Inverse parameter).&lt;br /&gt;&lt;br /&gt;I added some additional parameters, Percentage, Clip X and Clip Y. Percentage works similar to Percentage in the other transformations.&lt;br /&gt;&lt;br /&gt;I will publish it eventually, but I post it here first to get some feedback on the design. Also I'm unsure about license compatibility when submitting to the online library.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Mon, 05 Jul 2010 07:15:05 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Here is a moderate example with clipped x and y:&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Mon, 05 Jul 2010 07:15:44 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;And here is a more extreme unclipped example:&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Mon, 05 Jul 2010 08:27:58 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Sphinx,&lt;br /&gt;&lt;br /&gt;This is awesome to say the least! It will open a whole world of possibilities in mapping images onto 3D surfaces.&lt;br /&gt;&lt;br /&gt;As to the interface, it is workable as it is. The 'inverse' checkbox should work the other way though, IMO. Right now it is checked when you do the original transform, and unchecked for inverse transform.&lt;br /&gt;&lt;br /&gt;For a possible improvement, it would be helpful to be able to show just a tranformed grid overlayed on the input image. This would be particularly useful for alignment when removing perspective with inverse transformation. &lt;br /&gt;&lt;br /&gt;TD&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Mon, 05 Jul 2010 08:36:18 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Oh, and could the clip function have some sort of invert choice as well? With some settings, the transformed image splits and goes through the opposeite edges of the image. (Or is this the way it is supposed to go?)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Mon, 05 Jul 2010 09:20:10 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;The 'inverse' checkbox should work the other way though, IMO. Right now it is checked when you do the original transform, and unchecked for inverse transform.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;I guess that makes sense from how you see it visually. Theoretically or codewise it is the other way around though (i.e. it uses the inverse matrix when Inverse is checked). Maybe there is a better term for that input.&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;could the clip function have some sort of invert choice as well? With some settings, the transformed image splits and goes through the opposeite edges of the image. (Or is this the way it is supposed to go?)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Well, the thing is that for correct output the transform only support convex quadrilateral polygons. I was not sure how to handle this and decided to leave it as is - any ideas on what to with concave settings?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Mon, 05 Jul 2010 09:49:49 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hmm, I could constrain the points so that you can't make a concave polygon.. the sliders would then stop having any effect if you make a concave polygon..&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Mon, 05 Jul 2010 11:06:40 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Sphinx. wrote:&lt;/b&gt;&lt;br /&gt;I guess that makes sense from how you see it visually. Theoretically or codewise it is the other way around though (i.e. it uses the inverse matrix when Inverse is checked). Maybe there is a better term for that input. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;You could call it 'Inverse Transform' and switch the checkbox polarity.&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Sphinx. wrote:&lt;/b&gt;&lt;br /&gt;Well, the thing is that for correct output the transform only support convex quadrilateral polygons. I was not sure how to handle this and decided to leave it as is - any ideas on what to with concave settings?&lt;br /&gt;Hmm, I could constrain the points so that you can't make a concave polygon.. the sliders would then stop having any effect if you make a concave polygon.. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;I see. Then contraining the points might be a good idea. It is not all that important, more of a cosmetic handling. Now that we've gone there: should there be some way of indicating when the points are clipped? Such as a red exclamation point at the corner (which you can turn off)? That's just a thought. In the big picture, it's irrelevant for the basic function of the filter, which is a fantastic piece of work.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Wed, 05 Sep 2012 23:29:22 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;ThreeDee &lt;br /&gt;&lt;br /&gt;This is awesome to say the least! It will open a whole world of possibilities in mapping images onto 3D surfaces. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;I am sorry to ask, but do not know how this would help mapping images onto 3D surfaces unless you mean doing this inside FF in some way, although FF does not have 3D surfaces. &lt;br /&gt;Sorry if I am telling perhaps silly things here.&lt;br /&gt;&lt;br /&gt;As Sphinx has put already, this is related to this other thread &lt;a href=&quot;http://filterforge.com/forum/read.php?FID=10&amp;TID=10373&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Quadrilateral Challenge by uberzev&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Thu, 06 Sep 2012 05:23:07 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;SpaceRay wrote:&lt;/b&gt; I am sorry to ask, but do not know how this would help mapping images onto 3D surfaces unless you mean doing this inside FF in some way, although FF does not have 3D surfaces. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Yes, I mean internally in FF. For instance, if you were to make a script that calculated the corner points of the three visible faces of a 3D rotating cube, you could use this script to render the input image on each face.&lt;br /&gt;&lt;br /&gt;You could pretty much make any rectanglarly faceted filled 3D shape with the input image on each face with it.&lt;br /&gt;&lt;br /&gt;Which reminds me that it would really be a good idea to write a script that calculates the transformation of any point in 3D space. &lt;br /&gt;&lt;br /&gt;In fact, 3D transformation may already be included in one of the more advanced scripts from Sphinx. Or in &lt;a href=&quot;http://www.filterforge.com/filters/8772.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Raytracing&lt;/a&gt; by Egret. Haven't dug into them that deep.&lt;br /&gt;&lt;br /&gt;(By 3D transformation I mean rotation around X, Y and Z-axis.)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;CFandM&lt;/b&gt;, &lt;em&gt;Thu, 06 Sep 2012 07:51:28 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Great Work Sphinx.. :pimp:  :beer:&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;AndrewA1988&lt;/b&gt;, &lt;em&gt;Wed, 12 Feb 2020 02:51:13 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Does anyone still have this snippet? Attachment goes to a &quot;not found&quot; page.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Sun, 16 Feb 2020 08:24:49 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I'm not sure why the older forum attachments are not working anymore (GMM? Vlad?).&lt;br /&gt;&lt;br /&gt;Here it is&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;AndrewA1988&lt;/b&gt;, &lt;em&gt;Tue, 18 Feb 2020 21:38:17 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thanks Sphinx!&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;GMM&lt;/b&gt;, &lt;em&gt;Wed, 19 Feb 2020 04:40:24 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Sphinx. wrote:&lt;/b&gt;&lt;br /&gt;not sure why the older forum attachments are not working anymore&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;We restored this particular attachment. If you any other older attachment doesn't show up, let me know.&lt;/p&gt;
</description>
</item>
<item><title>Noisy Fractal Rendering</title> 
		             <dc:creator>Sphinx.</dc:creator> 
		             <category></category> 
		             <pubDate>Sun, 31 Mar 2019 11:52:36 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=7491</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=7491</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Thu, 10 Jun 2010 03:24:49 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I'm currently working on some fractal scripts which produce extreme range output (much like strange attractor fractals) which is clamped to either 0 or 1, and the real &quot;magic&quot; takes place in the super-sampling process: here the actual visible gray tones are produced.&lt;br /&gt;&lt;br /&gt;My problem is that I can't do tone mapping because the mapped colors are either from the 0 or 1 area in the color gradient (because the super-sampling that produces intermediate grays is taking place post everything).&lt;br /&gt;&lt;br /&gt;So how would you get around this problem? By writing a custom super-sampling step?&lt;br /&gt;The only semi build in way I can figure out is to use a blur at very low radius and then enable anti-aliasing for bitmap based components, but AFAIK this is not a setting stored in the filter.&lt;br /&gt;&lt;br /&gt;Perhaps we need a new result mode: Gradient Mapped Result, much like how the elevation gradient works, but the mapping is done post super-sampling.&lt;br /&gt;&lt;br /&gt;Here is an output example, first half shows super-sampled output, second half shows direct output:&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Crapadilla&lt;/b&gt;, &lt;em&gt;Thu, 10 Jun 2010 04:02:35 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Wow!  :eek:  :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;earthbound&lt;/b&gt;, &lt;em&gt;Sat, 30 Mar 2019 23:36:55 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Is this script published anywhere? That output is pretty dang cool.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinxmorpher&lt;/b&gt;, &lt;em&gt;Sun, 31 Mar 2019 11:52:36 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I looked for it - I think I found it, but the filter doesn't render anymore (script error) :-/ I'll post it here if I can manage to fix it.&lt;/p&gt;
</description>
</item>
<item><title>Scripting question and maybe assistance :)</title> 
		             <dc:creator>Grimbly</dc:creator> 
		             <category></category> 
		             <pubDate>Thu, 29 Nov 2018 21:21:47 -0500</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=15397</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=15397</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;Grimbly&lt;/b&gt;, &lt;em&gt;Thu, 29 Nov 2018 21:21:47 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I would like to make a Map Script component that outputs a color range based on the amount of content in an image. I'm going to be batch processing a few thousand images. Each image has varying amounts of content and transparency. I'm not sure how to script such a thing or whether I should be trying to total the amount of blank space vs the amount of content in the image. &lt;br /&gt;&lt;br /&gt;Any advice, sample scripts, or existing similar scripts would be very helpful.&lt;/p&gt;
</description>
</item>
<item><title>Simple additon</title> 
		             <dc:creator>DigitalMirrors</dc:creator> 
		             <category></category> 
		             <pubDate>Mon, 15 Oct 2018 18:55:10 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=15364</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=15364</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;DigitalMirrors&lt;/b&gt;, &lt;em&gt;Mon, 15 Oct 2018 13:49:37 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Could someone help me with how to handle simple addition. I found a post on using RGB math and could not get it to work as I wanted.&lt;br /&gt;&lt;br /&gt;I'd like to be able to add numbers and use them on repetitions. So say you take two gradients. Say I have the first one set to 6 repetitions and I wanted the second gradient to have 1 more repetitions making it 7.&lt;br /&gt;&lt;br /&gt;This seems like it should be simple but I'm not getting it can anyone help?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;emme&lt;/b&gt;, &lt;em&gt;Mon, 15 Oct 2018 16:56:49 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Two ways you can do this. You can check &quot;use remapping&quot; in the control settings and add an offset of 1 in the remapper.&lt;br /&gt;&lt;br /&gt;Alternatively you can use an RGB math node to add the offset, but you need to also remap the value going into the math node correctly. For example, if you have an IntSlider outputting values 1-5, you need to remap to 0-4 in HDR values.&lt;br /&gt;&lt;br /&gt;You can check out the remapping in this filter.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;DigitalMirrors&lt;/b&gt;, &lt;em&gt;Mon, 15 Oct 2018 17:11:00 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thank you! I appreciate the help. I'd like to understand the different ways to do this.&lt;br /&gt;&lt;br /&gt;On the RGB math example how would I increase the increment from 1 to 2 in source B?&lt;br /&gt;&lt;br /&gt;Also, is there a way to do this with the math script? I've read those as well but cannot figure it out.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;emme&lt;/b&gt;, &lt;em&gt;Mon, 15 Oct 2018 18:01:54 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;You can check HDR in the Source B color picker and set any value for the increment. I suggest reading the HDR Colors page in the manual to learn more. You can also control the increment with another IntSlider. (added in the example)&lt;br /&gt;&lt;br /&gt;Sure, using a script would work too. I've added one in the example that outputs the base value in the red channel and value + increment in the green channel.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;DigitalMirrors&lt;/b&gt;, &lt;em&gt;Mon, 15 Oct 2018 18:04:30 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Wow,  8) thank you again emme. I will go through this today.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Rachel Duim&lt;/b&gt;, &lt;em&gt;Mon, 15 Oct 2018 18:17:39 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Here is another way to do it using Free Gradient with division instead of the Profile Gradient with addition. A little more complicated but more flexible.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;emme&lt;/b&gt;, &lt;em&gt;Mon, 15 Oct 2018 18:53:22 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Yes, my examples were more about addition and less about gradients :) &lt;br /&gt;&lt;br /&gt;I agree, generally better to use free gradient instead.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;DigitalMirrors&lt;/b&gt;, &lt;em&gt;Mon, 15 Oct 2018 18:55:10 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I really appreciate the input from both of you. It's been very helpful. I'm having fun playing with your examples.&lt;br /&gt;&lt;br /&gt;Thanks!&lt;/p&gt;
</description>
</item>
<item><title>Scripting help</title> 
		             <dc:creator>Ramlyn</dc:creator> 
		             <category></category> 
		             <pubDate>Wed, 04 Jul 2018 01:17:01 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=15288</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=15288</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;Ramlyn&lt;/b&gt;, &lt;em&gt;Sat, 30 Jun 2018 22:41:26 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I have a filter that one of our members made and that contains a Map Script. Unfortunately, after the last updates, because of the new FF settings, this Map Script doesn't work anymore. Does anybody know how to correct the error? I tried to contact the author, but he doesn't answer or come in the forum anymore.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Indigo Ray&lt;/b&gt;, &lt;em&gt;Sun, 01 Jul 2018 11:54:34 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;a href=&quot;https://www.filterforge.com/forum/read.php?FID=11&amp;TID=12328&amp;MID=149036#message149036&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;See Here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The solution was simple: Changing the name of some of the variables. Let me know if you find any other filters with the same problem.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;GMM&lt;/b&gt;, &lt;em&gt;Mon, 02 Jul 2018 06:50:27 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Also see &lt;a href=&quot;https://filterforge.com/forum/read.php?FID=11&amp;TID=9362&amp;MID=148368&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; and &lt;a href=&quot;https://www.filterforge.com/forum/read.php?FID=11&amp;TID=8306&amp;MID=148215&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;FF7 no longer allows you to override system variables like MODE. We can't submit an update in the author's behalf, and inujima hasn't responded to our emails. It can be easily fixed by renaming the variables.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Ramlyn&lt;/b&gt;, &lt;em&gt;Wed, 04 Jul 2018 00:57:56 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Indigo Ray and GMM, thank you very much!  :D  :D  :D &lt;br /&gt;&lt;br /&gt;Before I tried to modify it, but I probably did something wrong.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Ramlyn&lt;/b&gt;, &lt;em&gt;Wed, 04 Jul 2018 01:17:01 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Indigo Ray. I updated some of my filters containing this map script too, adding credits to you.  ;)&lt;/p&gt;
</description>
</item>
<item><title>The Pursuit for Paths</title> 
		             <dc:creator>ThreeDee</dc:creator> 
		             <category></category> 
		             <pubDate>Tue, 01 May 2018 02:33:31 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=9724</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=9724</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sat, 07 Apr 2012 13:50:54 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Fo the longest time, I've been wondering how to realize something resembling freehand paths in FF. Today I made my first real breakthrough in this. This simple little picture has a story to tell.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sat, 07 Apr 2012 13:59:23 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;The story is that it is &quot;drawn&quot; from two (random) noise gradient inputs which give the X and Y coordinates OVER TIME for a single point. &lt;br /&gt;&lt;br /&gt;With the help little script that I put together, the location of this point over time is drawn all the same time onto the canvas.&lt;br /&gt;&lt;br /&gt;I will describe this in more detail in the near future.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sat, 07 Apr 2012 14:42:16 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;WOW!! This could be very interesting and and could be something very good for FF to have freehand paths!! &lt;br /&gt;&lt;br /&gt;Nice example you have put and amazing that this comes from two noise gradients inputs with a script and... the other things you have used&lt;br /&gt;&lt;br /&gt;I will wait for your more detailed description&lt;br /&gt;&lt;br /&gt;Put a note, do not disturb, GENIUS working  :D&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Morgantao&lt;/b&gt;, &lt;em&gt;Sat, 07 Apr 2012 17:26:22 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I love how it's a closed path, and not just a random squigly line going nowhere.&lt;br /&gt;Genius at work indeed!  8)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 04:13:23 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;So here's how it works, in more detail:&lt;br /&gt;&lt;br /&gt;There are three inputs to the script, grayscale maps for X and Y and an integer slider for number of points.&lt;br /&gt;&lt;br /&gt;The grayscale maps are simply two noise gradients.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 04:16:54 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;The script tells how many samples to take from left to right on these gradients.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 04:18:36 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;And converts the gray values at these points to X and Y positions.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 04:19:53 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;With ten points that looks like random points, but as you increase the number of points, you start getting a line. Here is the same with 128 points.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 04:20:36 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;And finally, we connect the dots:&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 04:23:06 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;When you change the variation, you get a different x and y points and a different resulting line.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 04:24:29 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;When you scale up the noise, you get simpler shapes.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 04:27:36 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;And smaller scale noise gives you more scribbles for your money.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 04:30:21 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;WOW!! Wonderful results!! Like very much how you have been able to make the scribbles from LOTS of points multiplied to form lines.  Great work.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 04:32:06 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Different types of noise inputs give different results. Block noise gives you more angular lines.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 04:49:26 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;A contrasty cells noise tends towards the edges...&lt;br /&gt;&lt;br /&gt;Due to the complexity of the line, I had to use 1000 points here, so it is pretty slow. Nevertheless, quite a charming little scribble.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 04:52:57 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;But wait, now the fun really starts: Two sine curves fed in as inputs gives you...&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 04:59:23 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Did you guess what two sine curves blended together would make?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 05:07:21 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Or three?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 05:11:37 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Just add elevation gradient:&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 05:17:55 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Never gonna look at a sine curve the same way again.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 05:49:17 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thought you would never ask. Yes, you can use it for surface filters as well, although render times rapidly get into the CPU- and patience-testing ranges.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;xirja&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 08:12:32 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;2d parametric curves in FF,  an excellent breakthrough!  Does it use a bomber and how are the points connected?  Is it possible to get variable line thickness as a function (x^2+y^2)^(1/2) like this:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=Md1q2oShx8A&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.youtube.com/watch?v=Md1q2oShx8A&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 09:05:26 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Does it use a bomber and how are the points connected? &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;No, it is a script that draws the points and the lines in between. Currently the lines are straight lines.&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Is it possible to get variable line thickness as a function (x^2+y^2)^(1/2) like this: &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Yes, this can be easily included in the script.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 09:10:40 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Here's the line drawing scrippet. &lt;br /&gt;&lt;br /&gt;The nice thing is that the script calculates the distance from the line and end points, so you can vary the line thickness by just thresholding the output.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 09:52:32 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Is it possible to get variable line thickness as a function (x^2+y^2)^(1/2)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Actually, no need to put it in the script, you can just threshhold it with a circular gradient:&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 11:27:34 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Heh, the next step was easier than I expected...&lt;br /&gt;&lt;br /&gt;Not real fast in rendering, but it's the real thing.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 11:47:18 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Okay, so what to do with all this?&lt;br /&gt;&lt;br /&gt;Inputting actual X and Y values is quite tedious, for to make the above Bezier curve, you have to use 8 inputs, x and y values for all four points defining the curve. So that makes 8 sliders&lt;br /&gt;&lt;br /&gt;It seems the more sensible approach is to use the built-in noises as sources for x and y information.&lt;br /&gt;&lt;br /&gt;Or to program the values mathematically for such things as a fractal tree. Or for wireframed 3D objects. Or road maps between cities. Or tessalation patterns.&lt;br /&gt;&lt;br /&gt;Now off to figuring out how to filled those closed shapes...&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 12:00:26 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Oh yeah, one more thing. The script output actually looks like the picture below. It gives the distance from the nearest line. Then it can be put through a threshold or other things to give the desired line weight etc.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 13:38:47 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;It wasn't too hard getting the fills. But now it is slow as molasses with both the line and the fill, so needs some optimization.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;lipebianc&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 13:51:23 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;This is &lt;b&gt;awesome&lt;/b&gt;, ThreeDee!!!!&lt;br /&gt;You're raising the bar in the filter construction territory! :ff: &lt;br /&gt;Thank you for your efforts, congratulations and respect for your achievement!&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;xirja&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 15:01:49 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Totally!  Splines AND filling, oh yeah!  Looking forward to this one!  Also its nice to have opacity on the filling so that you can get gradations on the overlaps, such as:&lt;br /&gt;&lt;img src=&quot;http://www.xirja.com/M/Curves/2d3poly.jpg&quot; id=&quot;popup_895710036&quot; border=&quot;0&quot; width=&quot;300&quot; height=&quot;300&quot; data-bx-viewer=&quot;image&quot; data-bx-src=&quot;http://www.xirja.com/M/Curves/2d3poly.jpg&quot; /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 15:37:51 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;lipebianc wrote:&lt;br /&gt;This is awesome, ThreeDee!!!! &lt;br /&gt;You're raising the bar in the filter construction territory! &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;I totally agree with lipebianc and I say the same as you.&lt;br /&gt;&lt;br /&gt;Congratulations for your work.&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;xirja wrote:&lt;br /&gt;Totally! Splines AND filling, oh yeah!&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;WOW! very well done and very beautiful geometric shape, good work.&lt;br /&gt;&lt;br /&gt;ALSO like very much all the beautiful and awesome works you have in your &lt;a href=&quot;http://www.xirja.com/wp/m1-curves/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;website here&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 21:21:29 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Sweeet! Love the script, very simple but so awesomely done!&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Kraellin&lt;/b&gt;, &lt;em&gt;Sun, 08 Apr 2012 21:58:45 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;3D, did you mean the line drawing scrippet to draw more than straight lines, cause that's all it seems to do?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Mon, 09 Apr 2012 04:39:17 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;3D, did you mean the line drawing scrippet to draw more than straight lines, cause that's all it seems to do?&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Yes, that scrippet demonstrates drawing just one line. I'm still trying to come up with a more sensible path-drawing filter that I could submit to the filter library. Maybe I'll make something out of the sine curve input version. That will include the multiple-line drawing script.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Mon, 09 Apr 2012 08:18:17 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I put the Sine-O-Graph filter in the queue, so you'll be able to dissect it. It is actually a fairly simple script.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;xirja&lt;/b&gt;, &lt;em&gt;Mon, 09 Apr 2012 08:56:10 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Actually, no need to put it in the script, you can just threshhold it with a circular gradient&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Oh right  :D , the power of threshhold!&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Or to program the values mathematically for such things as a fractal tree. Or for wireframed 3D objects. Or road maps between cities. Or tessalation patterns.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Many exciting possibilities there for sure.&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;But now it is slow as molasses with both the line and the fill, so needs some optimization.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;And then I go and suggest opacity, bumping my graphic.  I'm really not a smart ass most days, really  :| &lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;ALSO like very much all the beautiful and awesome works you have in your website here&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Thanks SpaceRay, those were done in Mathematica (totally script and pixel based), so to be able to do something similar in Filter Forge is the tops.  I've already found FF to be far superior in doing density plots using the scripting component; in a pixel based environment it is painfully slow.&lt;br /&gt;&lt;br /&gt;...scalpel...check   8)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Mon, 09 Apr 2012 11:43:00 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;A slight modification, giving two separate inputs for x and y (line beginning points and line end points) gives us for instance this:&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Mon, 09 Apr 2012 12:31:09 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Improved version of the same.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Mon, 09 Apr 2012 13:18:10 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;With color added.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Ghislaine&lt;/b&gt;, &lt;em&gt;Mon, 09 Apr 2012 15:07:55 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Great ! I love wireframed 3D objects. The last example is awesome. For more comprehension, because all this seems to me a bit complicated, can you post the settings for the last one when your Sine-O-Graph filter will be in the library, please ? :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Tue, 10 Apr 2012 12:06:05 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hi Ghislaine,&lt;br /&gt;&lt;br /&gt;The last example is a different version of the script, so you can't do it with the Sine-O-Graph. Not sure if this one is going to end up in the library.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Ghislaine&lt;/b&gt;, &lt;em&gt;Tue, 10 Apr 2012 14:17:21 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;3D wrote&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Not sure if this one is going to end up in the library. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Please, it would be kind if you share this one with us. Hoping I will see this other wonder in the library. Thanks for sharing the version 1. :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Tue, 10 Apr 2012 14:19:15 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Revisiting the good old fractal tree, this time with actual lines and overlap...&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Tue, 10 Apr 2012 14:45:48 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Of course you'd do that lol. Sounds like the next step is to go even above and beyond. L-Systems? hehe&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Tue, 10 Apr 2012 15:37:52 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Seems to be going in that direction. Meanwhile, here's the next step on the tree. now I seriously have to optimize the path drawing function, for it takes longer this way than without scripting!&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;xirja&lt;/b&gt;, &lt;em&gt;Tue, 10 Apr 2012 16:45:40 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Oh dear, molasses.  I was hoping you were on some old machine.  As soon as 'BitMap Buffer' and 'Table Memory Limit' are feasible, then matrix math can be used and then no more 'while' function to step through right?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Wed, 11 Apr 2012 05:56:33 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Well, yes. But first, I have a different issue to deal with, which is that the script does the full math to calculate the distance of &lt;i&gt;every&lt;/i&gt; line segment at each point. If I first check whether the current point is within the bounding box of the path segment (including line weight) and skip those that aren't, I should be able to speed up the process considerably.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;CFandM&lt;/b&gt;, &lt;em&gt;Wed, 11 Apr 2012 08:39:45 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Some Great work ThreeDee.. :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Thu, 19 Apr 2012 02:21:16 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;ThreeDee... FYI:&lt;br /&gt;&lt;a href=&quot;http://blog.gludion.com/2009/08/distance-to-quadratic-bezier-curve.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://blog.gludion.com/2009/08/dista...curve.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Btw. I have a 570% faster version of your sine-o-graph running now :-) I will publish when ready&lt;/p&gt;
</description>
</item>
<item><title>Pixel dimensions of image</title> 
		             <dc:creator>Spiney</dc:creator> 
		             <category></category> 
		             <pubDate>Sun, 28 Jan 2018 12:28:38 -0500</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=15150</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=15150</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;Spiney&lt;/b&gt;, &lt;em&gt;Sat, 20 Jan 2018 14:04:39 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hi there, I'm new :)&lt;br /&gt;&lt;br /&gt;Is there a variable I can plug to get the image x and y dimension in pixels?&lt;br /&gt;Reason I ask is I want to calculate x and y derivatives on a per pixel basis without having to specify them as inputs.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;emme&lt;/b&gt;, &lt;em&gt;Sat, 20 Jan 2018 14:45:50 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hi,&lt;br /&gt;&lt;br /&gt;In the result -component, check advanced mode and you'll be able to add image width/height components from there.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Rachel Duim&lt;/b&gt;, &lt;em&gt;Sat, 20 Jan 2018 15:04:50 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;####&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Spiney&lt;/b&gt;, &lt;em&gt;Sun, 28 Jan 2018 12:28:38 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thanks!&lt;br /&gt;I ended up using OUTPUT_WIDTH and OUTPUT_HEIGHT as described in some other thread.&lt;/p&gt;
</description>
</item>
<item><title>is Random Variation on each run even possible in FF?</title> 
		             <dc:creator>artyqwerty</dc:creator> 
		             <category></category> 
		             <pubDate>Sun, 26 Nov 2017 07:17:23 -0500</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=15096</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=15096</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;artyqwerty&lt;/b&gt;, &lt;em&gt;Sun, 26 Nov 2017 07:17:23 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I must be missing something... Such simple functionality as default generation of new variation of Fractal Clouds or Noise filters is missing in FF. A user is forced to go into settings and manually change Variation value.&lt;br /&gt;&lt;br /&gt;Is it possible to mimic default Photoshop filter behavior (by scripting or otherwise) and force FF to produce random variation on each run (CTRL+F).&lt;br /&gt;&lt;br /&gt;I (and I think many other FF users) will greatly appreciate any code snippets or tips on how to achieve it. Frankly without this feature FF becomes nearly useless for me due to reliance of Photoshop actions in my workflow. &lt;br /&gt;&lt;br /&gt;TIA&lt;/p&gt;
</description>
</item>
<item><title>Curve Switch</title> 
		             <dc:creator>Ramlyn</dc:creator> 
		             <category></category> 
		             <pubDate>Sat, 14 Oct 2017 14:12:40 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=15051</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=15051</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;Ramlyn&lt;/b&gt;, &lt;em&gt;Sat, 14 Oct 2017 12:36:53 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I was trying to make a Curve Switch.&lt;br /&gt;It may sound a very simple thing, but I have no experience in scripting and my switch is not working well.&lt;br /&gt;&lt;br /&gt;So....&lt;br /&gt;If I start from a switch for map inputs, as the one below :&lt;br /&gt;&lt;br /&gt;function prepare()&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	local r, g, b, a&lt;br /&gt;	local value = math.floor(get_sample_grayscale(x, y, SELECTOR)*5+.001)&lt;br /&gt;	if value == 0 then r, g, b, a = get_sample_map(x, y, INPUT01) end&lt;br /&gt;	if value == 1 then r, g, b, a = get_sample_map(x, y, INPUT02) end&lt;br /&gt;	if value == 2 then r, g, b, a = get_sample_map(x, y, INPUT03) end&lt;br /&gt;	if value == 3 then r, g, b, a = get_sample_map(x, y, INPUT04) end&lt;br /&gt;	if value &amp;gt;= 4 then r, g, b, a = get_sample_map(x, y, INPUT05) end&lt;br /&gt;	return r, g, b, a&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;How would this change in case of curve inputs?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Indigo Ray&lt;/b&gt;, &lt;em&gt;Sat, 14 Oct 2017 13:42:48 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I'm not sure what you already know, so...&lt;br /&gt;&lt;br /&gt;There is a &lt;i&gt;curve switch&lt;/i&gt; component, but maybe you need this as part of a script.&lt;br /&gt;Use the &lt;i&gt;curve script&lt;/i&gt; component, not the &lt;i&gt;map script&lt;/i&gt; component.&lt;br /&gt;When you create the inputs with the input editor, it tells you how to call each input.&lt;br /&gt;&lt;br /&gt;If the script runs but doesn't look right, maybe you have a logic error somewhere. Example: is the script calculating 'value' as you intended?&lt;br /&gt;&lt;br /&gt;Tip: Instead of writing 'if...then...end' a bunch of times, you can use 'elseif' and 'else' (see &lt;a href=&quot;http://www.lua.org/pil/4.3.1.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;the Lua manual&lt;/a&gt;)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Ramlyn&lt;/b&gt;, &lt;em&gt;Sat, 14 Oct 2017 14:12:40 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thanks Indigo Ray. I already know almost nothing. I'm simply trying to understand how it works.&lt;br /&gt;&lt;br /&gt;What I would like to do is a Curve Switch with more than the 12 inputs of the standard one.&lt;br /&gt;&lt;br /&gt;Possibly, I would prefer not to go much far away from the structure of the previous simple switch, otherwise I may not be able to easily change it later.&lt;br /&gt;&lt;br /&gt;Then......&lt;br /&gt;As first, a curve doesn't use r,g,b,a. I should change it with c.&lt;br /&gt;Could it be something like :&lt;br /&gt;if value == 0 then c = get_sample_curve(x, y, INPUT01) end  &lt;br /&gt;?&lt;br /&gt;&lt;br /&gt;The grayscale input can be ok for the selector of the switch?&lt;br /&gt;Should I also add t, or x and y are enough?&lt;br /&gt;As return values, I saw that in other scripts are used c, c, c, 1.&lt;br /&gt;But I'm not sure.&lt;/p&gt;
</description>
</item>
<item><title>Attempt to unpersist an external Lua function</title> 
		             <dc:creator>Sphinx.</dc:creator> 
		             <category></category> 
		             <pubDate>Mon, 19 Sep 2016 09:55:16 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=8195</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=8195</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Tue, 22 Feb 2011 10:16:32 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I was going to continue work on a large script filter (mandelbulb renderer) in the newest filter forge release - now I get a new error I've never seen before:&lt;br /&gt;&lt;br /&gt;Lua Critical Exception: Attempt to unpersist an external Lua function&lt;br /&gt;&lt;br /&gt;My script used to work - was something changed recently related to loading external script files?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Wed, 23 Feb 2011 04:48:15 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I tried to look up the error on Google, but it seems to be Filter Forge specific - what does it mean?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Thu, 24 Feb 2011 03:22:21 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Anyone? I can't seem to make any of my script filters with external references work due to this error  :cry:&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Thu, 24 Feb 2011 03:57:51 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Ok - the error is not related to the initial include call:&lt;br /&gt;&lt;br /&gt;in Map Script script I tried:&lt;br /&gt;[CODE]dofile(&quot;C:\\Users\\Sphinx\\test.lua&quot;);[/CODE]&lt;br /&gt;&lt;br /&gt;where &quot;test.lua&quot; contains:&lt;br /&gt;[CODE]&lt;br /&gt;function prepare()&lt;br /&gt;	-- This function is called once,&lt;br /&gt;	-- before the rendering begins.&lt;br /&gt;	-- Use it for querying non-mapped&lt;br /&gt;	-- inputs and precalculation.&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	-- Image generation code goes here.&lt;br /&gt;	local r = x&lt;br /&gt;	local g = y&lt;br /&gt;	local b = (x + y) / 2&lt;br /&gt;	local a = 1&lt;br /&gt;	return r, g, b, a&lt;br /&gt;end;&lt;br /&gt;[/CODE]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This works just fine. I guess the error is related to actual script code in my external files. However the scripts used to work, so I need to know what that (new?) error message is about..&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;GMM&lt;/b&gt;, &lt;em&gt;Thu, 24 Feb 2011 04:36:23 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;So, the above script works? Please attach the one that doesn't work.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Thu, 24 Feb 2011 05:17:26 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I can't do that as the whole &quot;application&quot; use several lua libraries .. to much to set up for a simple test case.&lt;br /&gt;&lt;br /&gt;I just want to know what triggers that error message in general (and what it means.. &quot;unpersist&quot; is not very clear to me). Then I can debug the actual problem myself...&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;GMM&lt;/b&gt;, &lt;em&gt;Fri, 25 Feb 2011 09:26:27 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Sphinx. wrote:&lt;/b&gt;&lt;br /&gt;in the newest filter forge release&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Could you let me know the exact FF build which started to show issues? (there have been different builds of 2.009 on the website).&lt;br /&gt;&lt;br /&gt;Now, a story about unpersisting. As you know rendering in Filter Forge is performed in separate passes. When you call prepare(), the Lua subsytem needs to save its results for future passes â€” for instance, if an unsafe script queries system time it should be consistent for all passes. We employ a third-party lib for that. In Lua jargon saving the result of a function is called persisting, and restoring the saved result is called unpersisting.&lt;br /&gt;&lt;br /&gt;I understand all of the above is of little help to debug your problem, but if you could set up a test base our developers promise to look into it :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Sat, 26 Feb 2011 06:01:50 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Alright I located the problem - it is related to a change in global variable visibility..&lt;br /&gt;&lt;br /&gt;The testcase is rather simple:&lt;br /&gt;&lt;br /&gt;1. Create a new lua file, test.lua, with the following content:&lt;br /&gt;[CODE]&lt;br /&gt;function prepare()&lt;br /&gt;	t = 1&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	--t = 0.5&lt;br /&gt;	return t,t,0,1&lt;br /&gt;end;&lt;br /&gt;[/CODE]&lt;br /&gt;&lt;br /&gt;2. Create a new filter and drop a new Map Script, enter:&lt;br /&gt;[CODE]dofile(&quot;C:\\test.lua&quot;)[/CODE]&lt;br /&gt;Or the path to where you put the test.lua file (remember &quot;\\&quot; as directory delimiter format, e.g. &quot;C:\\Users\\GMM\\test.lua&quot;&lt;br /&gt;&lt;br /&gt;FF will now complain because global variable t is not registered properly (this used to work earlier).&lt;br /&gt;&lt;br /&gt;Comment out t assignment in prepare and enable t assignment in get_sample - now it works.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The unpersist error is just a more complex version of this problem. I can send you a testcase for the unpersist error (I can't attach here due to file attachment restrictions), where should I send to?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;GMM&lt;/b&gt;, &lt;em&gt;Mon, 28 Feb 2011 04:59:23 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thanks for the info, we'll look into it.&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Sphinx. wrote:&lt;/b&gt;&lt;br /&gt;where should I send to&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Please send to info@filterforge&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Mon, 28 Feb 2011 10:19:49 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;You should have a complete example in your inbox now  :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Mon, 07 Mar 2011 03:13:01 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I'm still unpersisting my *** off here ;) Any news on the issue?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;GMM&lt;/b&gt;, &lt;em&gt;Wed, 09 Mar 2011 07:07:13 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;The developers are still unpersisting your test case :) We'll try to fix this by the release of the 3.0 beta.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Tue, 03 May 2011 07:38:49 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Just tested in FF3B1 .. bug is still there :-(&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;GMM&lt;/b&gt;, &lt;em&gt;Mon, 19 Sep 2016 09:55:16 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Should be fixed in 5.011 â€“ please check.&lt;/p&gt;
</description>
</item>
<item><title>Move to Center</title> 
		             <dc:creator>xirja</dc:creator> 
		             <category></category> 
		             <pubDate>Sun, 24 Jul 2016 07:55:36 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=11342</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=11342</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;xirja&lt;/b&gt;, &lt;em&gt;Mon, 10 Jun 2013 17:48:53 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Not sure if this problem can only be solved by a script, but I need an arbitrary point to be moved to the origin.  Without knowing the initial distance from the center, how to move the point TO the center?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;xirja&lt;/b&gt;, &lt;em&gt;Mon, 10 Jun 2013 17:50:32 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Best attempt attached below&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;xirja&lt;/b&gt;, &lt;em&gt;Mon, 10 Jun 2013 17:53:57 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I should have said polygon/ellipse/etc instead of point, but isn't a point really just an area or volume anyway in the real world, 0 dimensional, ha!   ;)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Tue, 11 Jun 2013 02:47:21 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I would do it like this if radius was known. Twice as complicated if radius is not known, for you have to establish distance from both edges and average the result. (FF4)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Tue, 11 Jun 2013 02:59:36 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Unknown radius like this. Not very fast a method, but works.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Tue, 11 Jun 2013 03:01:43 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Better methods very likely exist.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;xirja&lt;/b&gt;, &lt;em&gt;Tue, 11 Jun 2013 07:31:05 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Oh the glory of the motion blur!  Genius.  Thank you.   :) I'll see if I can stumble upon any better way.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Wed, 12 Jun 2013 07:41:47 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;You may wanna try scripting part of it, namely finding the distance fr om the edges after the initial horizontal (or vertical) motion blur and threshold. Might improve the speed, as you would need to do it for just one horizontal row and column of pixels, wh ereas the motion blur is pretty calculation-intensive.&lt;br /&gt;&lt;br /&gt;BTW, the same method can be used to remove all white area around the image for an automatic &quot;scale-to-fit&quot;, and other things of that nature.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;xirja&lt;/b&gt;, &lt;em&gt;Sun, 24 Jul 2016 07:55:36 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;:)  Just used this technique for an isometric perspective walk through, and found that 7 is more accurate than 10 for the repeat on the gradient prior to blur.  Must be that it is the closest prime number on the low side of 10.&lt;/p&gt;
</description>
</item>
<item><title>LuaGL - OpenGL for LUA 5.2 - Could this be possibly used inside FF</title> 
		             <dc:creator>SpaceRay</dc:creator> 
		             <category></category> 
		             <pubDate>Fri, 15 Jul 2016 05:48:53 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=11654</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=11654</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sat, 09 Nov 2013 10:21:35 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I have found this website showing that there is available a  library that provides access to all of the OpenGL (up to version 1.3) and works with LUA 5.1 or 5.2&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://http://luagl.sourceforge.net/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;LuaGL - OpenGL for LUA&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is a free software and has the same license than LUA&lt;br /&gt;&lt;br /&gt;I wonder if this could be used in some possible way inside Filter Forge to make it faster and be able to use OpenGL with FF&lt;br /&gt;&lt;br /&gt;And it seems that theres is much more information available on Google for this topic &lt;a href=&quot;http://https://www.google.es/#q=luagl+opengl&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;as can be seen here&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Sat, 09 Nov 2013 21:43:13 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;FF doesn't work like that.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Mon, 11 Nov 2013 05:12:03 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thanks, I already thought that it would not be possible to use it directly through LUA scripting, but was not sure.&lt;br /&gt;&lt;br /&gt;Would be possible that FF developers could use this LuaGL modifying the internal code of FF software?&lt;br /&gt;&lt;br /&gt;I mean that FF could use OpenGL through this LuaGL instead of directly modifying the code to use OpenGL&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Mon, 11 Nov 2013 08:50:07 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;lol you should probably check out what OpenGL is geared for vs how this program works.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;JesusSheep&lt;/b&gt;, &lt;em&gt;Wed, 13 Jul 2016 09:59:43 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;In that case for Wondows DirectX otherwise Maybe OpenCL.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Thu, 14 Jul 2016 01:08:27 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Look, in the end people are using terms like OpenCL/GL/DirectX/CUDA interchangeably like as if you slap this on something and it suddenly becomes faster. It doesn't work that way. People seem to misunderstand the the purpose of those frameworks and why we use them for a program.&lt;br /&gt;&lt;br /&gt;Again, I'm not denying the idea. I just think that saying &quot;openCL&quot; is like as empty of a thought as saying &quot;64bit&quot; on a thread about bacon and eggs. It doesn't mean you're right or wrong, it just doesn't persuade / direct anything.&lt;br /&gt;&lt;br /&gt;In general, I think this is all a natural progression of technology. I think its fantastic we're seeing all this stuff but I also thing people don't understand the spectrum of what's going on behind the hood. I basically think it's a blind statement overall. You really have to think: there's a reason why FF runs on CPU at this point in time. Why there is this wall between the CPU and GPU. And why everything works the way it does. &lt;br /&gt;&lt;br /&gt;[Multiple edits: added all the extra stuff later]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Thu, 14 Jul 2016 06:22:24 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;When I did put this thread, was NOT trying to tell that FF could be able to use OpenGL for all filters through LUA, as this would be silly and not possible.&lt;br /&gt;&lt;br /&gt;Sorry for the possible confusion&lt;br /&gt;&lt;br /&gt;What I wanted to tell, and failed to explain, was that perhaps some few filters that use already LUA could be able to use this one of the first post.&lt;br /&gt;&lt;br /&gt;BUT then after, thinking more about it, I agree with Skybase, that the LUA included in FF does not work in the same way, as is not possible&lt;br /&gt;&lt;br /&gt;&lt;b&gt;sorry for putting this before really thinking twice about it and if it was really possible&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;JesusSheep&lt;/b&gt;, &lt;em&gt;Thu, 14 Jul 2016 09:17:34 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;In Generialist terms Opencl ,DirectX12,OpenGL are forms of GPU Accelateration .Though The later two are more platform specific and used for different puposes then the first. Line drawing and rotating both benifit from those. As for photos Photoshop already has that as an option (OpenCL).&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Fri, 15 Jul 2016 05:48:53 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;In general FF's code only runs on CPU. So any form of acceleration I bet would take a pretty epic rewrite of the whole program. The thing I'm just trying to tell you is that its no better mentioning any of these frameworks anyway. And the conversation has stalled unless we get a breakthrough in GPU programming. &lt;br /&gt;&lt;br /&gt;And like because I've been online on these forums for so long I noticed how people just kinda dump those GPU frameworks without really looking at the context of the program. I think its a form of misunderstanding. But I don't blame people for that. And maybe time has passed enough that we get some bright awesome future. But until then I just don't see the reason to just make threads/posts just to mention an already discussed framework.&lt;br /&gt;&lt;br /&gt;I'm really not saying that any of this is wrong. I just don't see any further development with the threads and posts that changes the situation. &lt;br /&gt;&lt;br /&gt;SpaceRay, sorry! I was trying to address JesusSheep. Lol no worries.&lt;/p&gt;
</description>
</item>
<item><title>Table memory limit?</title> 
		             <dc:creator>Sphinx.</dc:creator> 
		             <category></category> 
		             <pubDate>Mon, 30 May 2016 13:33:58 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=7472</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=7472</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Tue, 08 Jun 2010 07:52:30 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I'm getting some strange results with large tables. Do you have some limit to how large tables can be or memory usage in general for a script?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Vladimir Golovin&lt;/b&gt;, &lt;em&gt;Tue, 08 Jun 2010 07:54:49 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Uh, no idea. We'll look into this.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Edit:&lt;/b&gt; Could you post the sample script here?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Tue, 08 Jun 2010 07:59:59 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Yep - it may very well be errors in the script though  ;) &lt;br /&gt;&lt;br /&gt;script:&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;function setPixRGBA(buf,cx,cy,r,g,b,a)&lt;br /&gt;	cx = math.floor(cx)&lt;br /&gt;	cy = math.floor(cy)&lt;br /&gt;	--zero indexed!&lt;br /&gt;	if (cx &amp;gt;= 0) and (cx &amp;lt; OUTPUT_WIDTH) and&lt;br /&gt;		(cy &amp;gt;= 0) and (cy &amp;lt; OUTPUT_HEIGHT)then&lt;br /&gt;		i = (cx + cy * OUTPUT_WIDTH) * 4 + 1&lt;br /&gt;		buf[i] = r&lt;br /&gt;		buf[i + 1] = g&lt;br /&gt;		buf[i + 2] = b&lt;br /&gt;		buf[i + 3] = a&lt;br /&gt;	end&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function getPixRGBA(buf,cx,cy)&lt;br /&gt;	cx = math.floor(cx)&lt;br /&gt;	cy = math.floor(cy)&lt;br /&gt;	--zero indexed!&lt;br /&gt;	if (cx &amp;gt;= 0) and (cx &amp;lt; OUTPUT_WIDTH) and&lt;br /&gt;		(cy &amp;gt;= 0) and (cy &amp;lt; OUTPUT_HEIGHT)then&lt;br /&gt;		local i = (cx + cy * OUTPUT_WIDTH) * 4 + 1&lt;br /&gt;		local r = buf[i]&lt;br /&gt;		local g = buf[i + 1]&lt;br /&gt;		local b = buf[i + 2]&lt;br /&gt;		local a = buf[i + 3]&lt;br /&gt;		return r,g,b,a	&lt;br /&gt;	end&lt;br /&gt;	return {0,0,0,0}&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function createBitmap(buf, src)&lt;br /&gt;	local sx = 1 / OUTPUT_WIDTH&lt;br /&gt;	local sy = 1 / OUTPUT_HEIGHT&lt;br /&gt;&lt;br /&gt;	for j=0,OUTPUT_HEIGHT-1 do&lt;br /&gt;		for i=0,OUTPUT_WIDTH-1 do&lt;br /&gt;			local r,g,b,a = get_sample_map(i*sx, j*sy, src)&lt;br /&gt;			setPixRGBA(buf, i, j, r,g,b,a)&lt;br /&gt;		end&lt;br /&gt;	end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;function prepare()	&lt;br /&gt;	bitmap = {}&lt;br /&gt;	initialize = true&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	if (initialize == true) then&lt;br /&gt;		createBitmap(bitmap, SOURCE)&lt;br /&gt;		initialize = false&lt;br /&gt;	end&lt;br /&gt;	&lt;br /&gt;	-- do not work:&lt;br /&gt;	--local r,g,b,a = getPixRGBA(bitmap, x * OUTPUT_WIDTH, y * OUTPUT_HEIGHT)&lt;br /&gt;&lt;br /&gt;	-- works, but with error:&lt;br /&gt;	local r,g,b,a = getPixRGBA(bitmap, 300, 300)&lt;br /&gt;&lt;br /&gt;	return r,g,b,a&lt;br /&gt;end;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Tue, 08 Jun 2010 08:17:31 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hmm, I think its something else that fails, even a very small bitmap buffer causes the same problem.. still learning this lua stuff&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Dmitry Sapelnikov&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 01:32:28 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Heh, I've fixed this =)&lt;br /&gt;Script code after bug fixing:&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;function setPixRGBA(buf, cx, cy, r, g, b, a)&lt;br /&gt;	local cx = math.floor(cx)&lt;br /&gt;	local cy = math.floor(cy)&lt;br /&gt;	--zero indexed!&lt;br /&gt;	if (cx &amp;gt;= 0) and (cx &amp;lt; OUTPUT_WIDTH) and&lt;br /&gt;		(cy &amp;gt;= 0) and (cy &amp;lt; OUTPUT_HEIGHT)then&lt;br /&gt;		local i = (cx + cy * OUTPUT_WIDTH) * 4 + 1&lt;br /&gt;		buf[i] = r&lt;br /&gt;		buf[i + 1] = g&lt;br /&gt;		buf[i + 2] = b&lt;br /&gt;		buf[i + 3] = a&lt;br /&gt;	end&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function getPixRGBA(buf,cx,cy)&lt;br /&gt;	local cx = math.floor(cx)&lt;br /&gt;	local cy = math.floor(cy)&lt;br /&gt;	--zero indexed!&lt;br /&gt;	if (cx &amp;gt;= 0) and (cx &amp;lt; OUTPUT_WIDTH) and&lt;br /&gt;		(cy &amp;gt;= 0) and (cy &amp;lt; OUTPUT_HEIGHT)then&lt;br /&gt;		local i = (cx + cy * OUTPUT_WIDTH) * 4 + 1&lt;br /&gt;		local r = buf[i]&lt;br /&gt;		local g = buf[i + 1]&lt;br /&gt;		local b = buf[i + 2]&lt;br /&gt;		local a = buf[i + 3]&lt;br /&gt;		return r, g, b, a&lt;br /&gt;	end&lt;br /&gt;--	Fixed(Egret): return {0, 0, 0, 0} is incorrect here&lt;br /&gt;	&lt;b&gt;return 0, 0, 0, 0&lt;/b&gt;&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function createBitmap(buf, src)&lt;br /&gt;--	Fixed(Egret): it's a proper conversion from the filter coords to&lt;br /&gt;--      the image coords &lt;br /&gt;	&lt;b&gt;local scale = 1 / SIZE&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;	for j=0, OUTPUT_HEIGHT-1 do&lt;br /&gt;		for i=0, OUTPUT_WIDTH-1 do&lt;br /&gt;			local r,g,b,a = get_sample_map(&lt;b&gt;i*scale, j*scale,&lt;/b&gt; src)&lt;br /&gt;			setPixRGBA(buf, i, j, r, g, b, a)&lt;br /&gt;		end&lt;br /&gt;	end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;function prepare()&lt;br /&gt;	bitmap = {}&lt;br /&gt;	initialize = true&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	if (initialize == true) then&lt;br /&gt;		createBitmap(bitmap, SOURCE)&lt;br /&gt;		initialize = false&lt;br /&gt;	end&lt;br /&gt;&lt;br /&gt;--	Fixed(Egret): it's a proper conversion from the filter coords to&lt;br /&gt;--      the image coords &lt;br /&gt;   local r,g,b,a = getPixRGBA(bitmap, &lt;b&gt;x * SIZE, y * SIZE&lt;/b&gt;)&lt;br /&gt;	return r,g,b,a&lt;br /&gt;end;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Dmitry Sapelnikov&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 02:11:07 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;The problem which caused nils was tiny.&lt;br /&gt;&lt;br /&gt;But an approach used in the script makes it good &quot;don't do it!&quot; example (Sphinx, I'm sorry  :( Of course it's not your fault, just lack of info about scripting)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;For all FF script programmers:&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Never create tables or another kind of caches without really serious purpose&lt;/b&gt;. Caches in scripts consumes memory really hard because caches are independently created for each rendering thread. (For exapmle, if you've got double-core processor and &quot;use all CPU(s)&quot; option is enabled in FF options, script component creates at least 3 copies of one cache: 2 for filter preview rendering threads, and 1 for component thumbnail rendering.&lt;br /&gt;BTW, I've got independent infrastructure for components which need caching. And we haven't implemented it in script components yet.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Dmitry Sapelnikov&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 02:15:48 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Another point of discussion is coordinate systems used in FF.&lt;br /&gt;We are going to post an wiki article about it this week.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Vladimir Golovin&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 02:37:10 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Egret, good point -- we should mention per-thread Lua state duplication in the help articles.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 03:31:08 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Ah, of course! Remains of my first implementation where I tried to store channels in a small table for each rgba pixel/sample, but that didn't work out (maan I wish I could drag off the script tab and maximize it ;) hint hint)&lt;br /&gt;&lt;br /&gt;About the memory consumption - yes I did notice things got slow with the &quot;large&quot; table. I am really just testing/learning things by trying out familiar concepts from earlier projects. &lt;br /&gt;&lt;br /&gt;Are you saying that the complete script is copied for each thread or what is going on? It would be quite useful if you somehow could declare a shared variable cross threads and script components, perhaps in some sort of read only state to avoid changing data problems. Or the other way around: declare that a script is not suitable for multithreaded processing. &lt;br /&gt;&lt;br /&gt;I think that you will see several attempts to implement bitmap filters, perhaps something can be done in this regard (some sort of bitmap filter script component which is wrapped by your general bitmap filter framework, with cache tiles etc).&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Igor Lorents&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 03:45:23 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Also, I'd like to mention an important thing about component sampling.&lt;br /&gt;&lt;br /&gt;Filter Forge core can take samples not only in [0..Size-1] bounds. We have to take some samples outside this area to make the proper supersampling of border pixels.&lt;br /&gt;That's why, your execution path went through the line I marked with bold below.&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;function getPixRGBA(buf,cx,cy) &lt;br /&gt;local cx = math.floor(cx) &lt;br /&gt;local cy = math.floor(cy) &lt;br /&gt;--zero indexed! &lt;br /&gt;if (cx &amp;gt;= 0) and (cx &amp;lt; OUTPUT_WIDTH) and &lt;br /&gt;(cy &amp;gt;= 0) and (cy &amp;lt; OUTPUT_HEIGHT)then &lt;br /&gt;-- skipped....&lt;br /&gt;return r, g, b, a &lt;br /&gt;end &lt;br /&gt;&lt;b&gt;return 0, 0, 0, 0 &lt;/b&gt;&lt;br /&gt;end; &lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;You can easily check that by adding the following line before the second return statement:&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;error (string.format(&quot;%d, %d&quot;, cx, cy))&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;After that, you'll see something like this in the log window:&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Script error (line 28): -1, -1.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Generally, I agree with Vladimir and Egret. Thanks for your post, Sphinx. Your code sample uncovers a lot of things which must be thoroughly explained in our help articles.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Vladimir Golovin&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 04:00:05 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Sphinx. wrote:&lt;/b&gt;&lt;br /&gt;(some sort of bitmap filter script component which is wrapped by your general bitmap filter framework, with cache tiles etc&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;This is planned, but it won't make it into the official release of 2.0.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;xirja&lt;/b&gt;, &lt;em&gt;Mon, 14 Nov 2011 04:44:08 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;:cry:  Perhaps with the official release of version 4.0?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Crapadilla&lt;/b&gt;, &lt;em&gt;Sun, 01 Mar 2015 04:23:25 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;:cry: Perhaps with the official release of version 5.0, then?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Rachel Duim&lt;/b&gt;, &lt;em&gt;Sun, 18 Oct 2015 15:09:17 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Add my vote. I get very slow rendering if I use the FXAA map script component in a filter with a bomber. It has no arrays, but a lot of variables (over 50, necessary given the complexity of the script). Please come up with some way to deal with these memory issues.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;xirja&lt;/b&gt;, &lt;em&gt;Mon, 30 May 2016 13:33:58 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Does version 6 help this by eliminating the 32 bit 3 GB limit?&lt;/p&gt;
</description>
</item>
<item><title>A &quot;Stones&quot;-like noise with triangular forms?</title> 
		             <dc:creator>Tim2501</dc:creator> 
		             <category></category> 
		             <pubDate>Mon, 16 May 2016 00:58:06 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=10076</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=10076</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;Tim2501&lt;/b&gt;, &lt;em&gt;Sun, 17 Jun 2012 17:18:21 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I'm currently working on a broken-glass filter and had some good results with the &quot;Stones&quot;-noise. I'm using a low treshold on it to determine the breaking-lines and an if-module on a solid-filled version od &quot;Stones&quot; to determine the areas of single shards.&lt;br /&gt;&lt;br /&gt;My problem is that, while glass usually breaks into shards with 3 or 4 edges, &quot;Stones&quot; often delivers shapes with 5 or 6 edges, which makes the whole thing look pretty unrealistic.&lt;br /&gt;&lt;br /&gt;Is it possible to make or modify a script so it delivers a triagular-stones-noise?&lt;br /&gt;&lt;br /&gt;Unfortunately I cant script at all, so any help will be greatly appreciated.&lt;br /&gt;&lt;br /&gt;Thanks in advance!  ;)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;uberzev&lt;/b&gt;, &lt;em&gt;Mon, 18 Jun 2012 04:07:54 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;A few triangle ideas here...&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Tim2501&lt;/b&gt;, &lt;em&gt;Mon, 18 Jun 2012 07:37:53 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;This idea occurred to me too.&lt;br /&gt;Unfortunately, the triangles must not overlap each other, because I need the grooves betwen them to determine my breaking-lines.&lt;br /&gt;Also, overlapping triangles often produce concave forms within each other, which would look pretty unrealistic as shards :/&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Morgantao&lt;/b&gt;, &lt;em&gt;Mon, 18 Jun 2012 14:49:31 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Uberzev, maybe your smooth stone mosaic can be adapted to make triangles or square instead of ovals, or eggs?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;uberzev&lt;/b&gt;, &lt;em&gt;Mon, 18 Jun 2012 22:32:59 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Uberzev, maybe your smooth stone mosaic can be adapted to make triangles or square instead of ovals, or eggs? &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;The underlining math of my filter is the same as Worley Cell noise, and I don't believe that formula offers triangles.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;uberzev&lt;/b&gt;, &lt;em&gt;Mon, 18 Jun 2012 23:01:02 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;This do anything for you?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;uberzev&lt;/b&gt;, &lt;em&gt;Wed, 04 Jul 2012 03:57:49 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;The solid-fill version of chaffs makes some decent triangles...&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 29 Jul 2012 00:28:34 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thanks very much for the Offset Edges filter that I like much&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 29 Jul 2012 00:30:45 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I have modified it to be able to fill the beautiful triangular shapes created by this with images but what I really have done is only fill the lines and background  :(&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 29 Jul 2012 00:33:53 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;And this other one that is the opposite, with higher width of the edges&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 29 Jul 2012 00:34:55 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;And here is the simple modification&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Sun, 29 Jul 2012 00:35:35 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I'm going to poke you to try something more fancy than masking :p&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 29 Jul 2012 00:39:39 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;What would be really good is to be able to make the image FOLLOW and fill the shapes made by this filter with this setting shown here&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.filterforge.com/upload/forum/upload/aab/Offset%20edges%20by%20uberzev.jpg&quot; id=&quot;popup_1241021824&quot; border=&quot;0&quot; width=&quot;300&quot; height=&quot;300&quot; data-bx-viewer=&quot;image&quot; data-bx-src=&quot;http://www.filterforge.com/upload/forum/upload/aab/Offset%20edges%20by%20uberzev.jpg&quot; /&gt;&lt;br /&gt;&lt;br /&gt;So the image would be shattered and cut to fill the inside of the white shapes of this pattern shown here and have some kind of shading so it would look more something like a 3D style&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Sun, 29 Jul 2012 01:07:14 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Like this?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 29 Jul 2012 05:05:11 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Of course that what I made above was very simple and nothing fancy, was just a quick test.&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Like this?&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;OH, yes, this is what I was talking about. Be able to modify the source colors into the shapes. Well done!! Like it much&lt;br /&gt;&lt;br /&gt;Also would be good if possible to make the real photo image broken into pieces to fill the irregular shapes and not only the source colors&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Sun, 29 Jul 2012 05:18:47 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Yup of course you can do that.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Sun, 29 Jul 2012 05:23:07 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;lol want to give it a shot yourself and then should I just reveal how it was done? :p&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 29 Jul 2012 09:32:11 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;On this one I think it has been very easy to make and to solve  :) looking at how this was done.&lt;br /&gt;&lt;br /&gt;Sorry I did not see it before.&lt;br /&gt;&lt;br /&gt;Here is the FF Lionfish&lt;br /&gt;&lt;br /&gt;Although when trying to convert it to images instead of solid colors I still have a problem, but will see why this happens&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 29 Jul 2012 09:47:45 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;and here is another example&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 29 Jul 2012 09:49:46 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;BUT now is needed to give some kind of darkening and lighting shadows so it is not very flat&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 29 Jul 2012 10:13:08 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Using the Blast Shadows by Threedee I have got this other version but all of them have uniform shadows and although it looks nice and good is not exactly the effect I would like&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 29 Jul 2012 10:17:47 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;And the bottom FF Lionfish is better with the Blast Shaodws than the above one, at least from my point of view&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://filterforge.com/upload/forum/upload/540/Shattered%20mosaic.jpg&quot; id=&quot;popup_2073758758&quot; border=&quot;0&quot; width=&quot;300&quot; height=&quot;300&quot; data-bx-viewer=&quot;image&quot; data-bx-src=&quot;http://filterforge.com/upload/forum/upload/540/Shattered%20mosaic.jpg&quot; /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 29 Jul 2012 15:55:58 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Sorry to ask a possible basic question, but why the Chaffs work very well when using solid fill, but when you uncheck it to have the full image source it does not work in the same way?&lt;br /&gt;&lt;br /&gt;I mean that the source image is not distorted to the shapes, like it happens when using solid fill, and i have tried also different settings and none of them work in the same way if solid fill is unchecked.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Mon, 30 Jul 2012 23:32:08 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Here's what your help docs say about &quot;solid fill&quot;&lt;br /&gt;&quot;If turned on, each noise &quot;cell&quot; is filled with a uniform random tint within the color range defined by the Noise and Background parameters.&quot;&lt;br /&gt;&lt;br /&gt;What you're really seeing when you disable &quot;solid fill&quot; is the noise pattern being applied on the background with the same color values at the same pixel areas. So your noise + background colors are the same, therefore there seems to be no difference but it's drawing the noise just as it would, you just can't see it.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Tue, 31 Jul 2012 03:28:03 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thanks Skybase for your answer, I also went to see the help docs to see if I was doing something wrong or there something I did not know, but seems that as you say well, it works only when the solid fills is activated, because if not not you canÂ´t see the effect&lt;br /&gt;&lt;br /&gt;I asked this because I have seen that on other component (do not remember which one) I have seen that when unchecking the solid fill checkbox the effect keeps being the same but with the full real source image instead of one solid color, so I thought that in this one would work in the same way, but I was wrong.&lt;br /&gt;&lt;br /&gt;And as you have shown in the above example there are other ways to make this WITH the source image and not a solid color, although I still do not know how.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Fri, 15 Feb 2013 02:15:52 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;SpaceRay&lt;br /&gt;&lt;br /&gt;What would be really good is to be able to make the image FOLLOW and fill the shapes made by this filter with this setting shown here  &lt;br /&gt;&lt;br /&gt;So the image would be shattered and cut to fill the inside of the white shapes of this pattern shown here and have some kind of shading so it would look more something like a 3D style &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Skybase &lt;br /&gt;&lt;br /&gt;Like this?&lt;img src=&quot;http://www.filterforge.com/upload/forum/upload/4d9/likethis.jpg&quot; id=&quot;popup_787849364&quot; border=&quot;0&quot; width=&quot;300&quot; height=&quot;300&quot; data-bx-viewer=&quot;image&quot; data-bx-src=&quot;http://www.filterforge.com/upload/forum/upload/4d9/likethis.jpg&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;SpaceRay&lt;br /&gt;&lt;br /&gt;&lt;b&gt;OH, YES&lt;/b&gt;, this is what I was talking about. Be able to modify the source colors into the shapes. Well done!! Like it much &lt;br /&gt;&lt;br /&gt;Also would be good if possible to make the real photo image broken into pieces to fill the irregular shapes and not only the source colors &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Skybase&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.filterforge.com/upload/forum/upload/dc0/ofcourse.jpg&quot; id=&quot;popup_1233705687&quot; border=&quot;0&quot; width=&quot;300&quot; height=&quot;300&quot; data-bx-viewer=&quot;image&quot; data-bx-src=&quot;http://www.filterforge.com/upload/forum/upload/dc0/ofcourse.jpg&quot; /&gt; &lt;br /&gt;&lt;br /&gt;lol want to give it a shot yourself and then should I just reveal how it was done?&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Well, I have tried to make this SECOND example shown above here with the real photo images instead of plain colors, have not had any sucess as I do not know how to make it because if I uncheck the &quot;solid fill&quot; setting in the Chaffs component, all is lost  :( &lt;br /&gt;&lt;br /&gt;Please, Skybase could you be so kind to tell HOW you have done it?&lt;br /&gt;&lt;br /&gt;Thanks very much&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Fri, 15 Feb 2013 12:55:43 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Screenshot explains much of the way I worked on it. It's honestly kinda lazy.&lt;br /&gt;&lt;br /&gt;Notes: The rotate component uses the original chaffs component that was in Uberzev's filter. The colored chaffs component can also be used to derive rotation values, however you should desaturate it, but this is up to you. Two chaffs components should have the same variation value, otherwise they'll have different results.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Fri, 15 Feb 2013 17:46:35 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;WOW!! Thanks very much for explaining it and for making this screenshot and taking the time to explain it with texts and arrows, very good and well done.&lt;br /&gt;&lt;br /&gt;I will try it and see what I can do.&lt;br /&gt;&lt;br /&gt;Thanks again&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Wed, 16 Oct 2013 04:23:19 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I forgot to tell that I have tried this that you have shown above with the instructions and works very well  :) &lt;br /&gt;&lt;br /&gt;Thanks very much Skybase for all the help given already and for caring and taking the time to make this screenshot with the detailed instructions that have been very useful and helpful.&lt;br /&gt;&lt;br /&gt;Now the next step is to be able to combine different images filling the shapes and not using only one source image, and the example on how to do it is shown with the &lt;a href=&quot;https://www.filterforge.com/filters/11627.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Mondrian filter by Skybase&lt;/a&gt; but without the instructions given already above I would not have been able to understand and use it&lt;br /&gt;&lt;br /&gt;Thanks also to uberzev for making the Offset Eddges filter above and sharing it here in the forum and also to ThreeDee for making the great &lt;a href=&quot;https://www.filterforge.com/forum/read.php?FID=10&amp;TID=10205&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Shadows snippet&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here are some examples I have done, although the filter stills needs some work for it to work right and some more controls, also there is a bad problem using the &quot;Size, pixels&quot; setting as it gives very unwanted results, so I have replaced it with Scale, and although it works it does not give the same result.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Fri, 18 Oct 2013 07:22:00 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;also I will see how it works using other noise components instead of he chaffs used here an what results could be get&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;LexArt&lt;/b&gt;, &lt;em&gt;Mon, 28 Mar 2016 23:58:16 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I have just discovered this and it seems to be very interesting and nice effect, thanks uberzev, Skybase and SpaceRay for all this thread&lt;br /&gt;&lt;br /&gt;I will try to understand it and see what can be done with this.&lt;br /&gt;&lt;br /&gt;Please, SpaceRay could you share the filter of your last example shown? it looks very good and nice&lt;br /&gt;&lt;br /&gt;thanks&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sat, 02 Apr 2016 03:50:13 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;LexArt wrote:&lt;/b&gt;&lt;br /&gt;Please, SpaceRay could you share the filter of your last example shown? it looks very good and nice &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Glad you like and find it nice, regretably, these are old filters, and I have them on a backup hard drive, so I may be able to find it when I search in the these hard drives and see if I still have it&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Ramlyn&lt;/b&gt;, &lt;em&gt;Sat, 30 Apr 2016 00:42:02 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;An experiment similar to Stones/Cells :&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Ramlyn&lt;/b&gt;, &lt;em&gt;Sat, 30 Apr 2016 00:50:37 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;The same filter with circular shapes instead of triangles :&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;LexArt&lt;/b&gt;, &lt;em&gt;Sat, 14 May 2016 04:23:56 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Skybase wrote:&lt;/b&gt;&lt;br /&gt;Screenshot explains much of the way I worked on i&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;i had put in the FF forum search &quot;fill  a shape&quot; and found agin this thread that I did not remember and it seems that this may explain in some way what I have asked in this other thread about &lt;a href=&quot;http://https://www.filterforge.com/forum/read.php?FID=11&amp;TID=11711&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Hexagon  Parade by Skybase&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.filterforge.com/upload/forum/upload/24d/Screenshot_2_16_13_2_40_AM-3.jpg&quot; id=&quot;popup_921596507&quot; border=&quot;0&quot; width=&quot;300&quot; height=&quot;300&quot; data-bx-viewer=&quot;image&quot; data-bx-src=&quot;https://www.filterforge.com/upload/forum/upload/24d/Screenshot_2_16_13_2_40_AM-3.jpg&quot; /&gt;e&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Please, Skybase, can you tell if this is the same as the technique used for Hexagon Parade? &lt;br /&gt;&lt;br /&gt;Does the source image to be feed into the rotate component must be in grayscale shades or grayscale gradient to work?&lt;br /&gt;&lt;br /&gt;Thanks&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Sat, 14 May 2016 07:01:22 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hexagon parade does something completely differently so this method wouldn't be the same.&lt;br /&gt;&lt;br /&gt;The rotate component requires a grayscale input (anything really) for rotation values and an input source image that gets rotated.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 15 May 2016 00:42:56 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;LexArt wrote:&lt;/b&gt;&lt;br /&gt;Please, Skybase, can you tell if this is the same as the technique used for Hexagon Parade? &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Yes, as said by Skybase, although it may look similar, is not at all the same as he has told also on another part of the forum&lt;br /&gt;&lt;br /&gt;I can not help on understanding how this works, as I also do not understand it, but you can try and experiment and test things and see what happen and see if you can get something similar or that you may like&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Mon, 16 May 2016 00:58:06 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;LexArt wrote:&lt;/b&gt;&lt;br /&gt;Does the source image to be feed into the rotate component must be in grayscale shades or grayscale gradient to work? &lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;LexArt did you notice and seen that what Skybase is refering and telling, comes from the uberzev offset edges filter? i mean the black and white chaffs&lt;br /&gt;&lt;br /&gt;This comes from my idea derived frrom this filter by uberzev&lt;/p&gt;
</description>
</item>
<item><title>Compilation of Random Space Filling Tiling articles for FF Filters</title> 
		             <dc:creator>SpaceRay</dc:creator> 
		             <category></category> 
		             <pubDate>Sat, 14 May 2016 04:34:08 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=10223</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=10223</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Sun, 29 Jul 2012 04:39:04 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I have made this other thread &lt;a href=&quot;http://www.filterforge.com/forum/read.php?FID=10&amp;TID=10199&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;How would you make this variable dots pattern in FF?&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://paulbourke.net/texture_colour/randomtile/extra1s.jpg&quot; id=&quot;popup_851647437&quot; border=&quot;0&quot; width=&quot;300&quot; height=&quot;300&quot; data-bx-viewer=&quot;image&quot; data-bx-src=&quot;http://paulbourke.net/texture_colour/randomtile/extra1s.jpg&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://paulbourke.net/texture_colour/randomtile/donuts.jpg&quot; id=&quot;popup_473886775&quot; border=&quot;0&quot; width=&quot;300&quot; height=&quot;300&quot; data-bx-viewer=&quot;image&quot; data-bx-src=&quot;http://paulbourke.net/texture_colour/randomtile/donuts.jpg&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;uberzev wrote:&lt;br /&gt;&lt;br /&gt;Would need to be a custom script... &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;So I have been looking for this and I do not have the experience, knowledge or skills to make any kind of scripts to be able to do this so I decided to put here a compilation of the information I have found if it could help and be interesting and useful to someone&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Compilation of Random Space Filling Tiling articles for FF Filters&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The main and very useful and great link given by uberzev&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://paulbourke.net/texture_colour/randomtile/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Random space filling tiling of the plane&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;all the above examples shown comes from this website&lt;br /&gt;____________________________________________________&lt;br /&gt;&lt;br /&gt;Paul Bourke's &quot;tiling of the plane&quot; work was inspired by John Shier, a computer artist who integrates random numbers in his creations.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;http://john-art.com/&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://john-art.com/images/random_fractal_flower_tiling.png&quot; id=&quot;popup_933643874&quot; border=&quot;0&quot; width=&quot;300&quot; height=&quot;300&quot; data-bx-viewer=&quot;image&quot; data-bx-src=&quot;http://john-art.com/images/random_fractal_flower_tiling.png&quot; /&gt;&lt;br /&gt;&lt;br /&gt;On page 5 of his Gallery you can find lots of examples showing Random Space Filling&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://john-art.com/gallery5.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Gallery 5 examples&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;________________________________________________________&lt;br /&gt;&lt;br /&gt;AND is also very interesting this 10 Page article made in PDF from Paul Bourke and Jhon Shier explaining all this topic of Random Space Filling&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href=&quot;http://paulbourke.net/texture_colour/randomtile/paper.pdf&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Filling Space with Random Fractal Non-Overlapping Simple Shapes&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.filterforge.com/upload/forum/upload/b2a/Space%20filling%20circles.jpg&quot; id=&quot;popup_1181128584&quot; border=&quot;0&quot; width=&quot;300&quot; height=&quot;300&quot; data-bx-viewer=&quot;image&quot; data-bx-src=&quot;http://www.filterforge.com/upload/forum/upload/b2a/Space%20filling%20circles.jpg&quot; /&gt;&lt;br /&gt;&lt;br /&gt;Fr om the Processing Software website&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://processing.org/discourse/beta/num_1233225599.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt; Space Filling Algorithm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This has two interesting links to &lt;a href=&quot;http://www.complexification.net/gallery/machines/boxFitting/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;BOX FITTING APPLET&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A region of space is filled through exhaustive placement of slowly expanding boxes&lt;br /&gt;&lt;br /&gt;&lt;b&gt;What is very interesting is that this is an working applet wh ere you can make your own BOX FITTING designs!&lt;/b&gt; Do not miss the opportunity to try it yourself&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.complexification.net/gallery/machines/boxFitting/boxFittingA0000.jpg&quot; id=&quot;popup_391222596&quot; border=&quot;0&quot; width=&quot;300&quot; height=&quot;300&quot; data-bx-viewer=&quot;image&quot; data-bx-src=&quot;http://www.complexification.net/gallery/machines/boxFitting/boxFittingA0000.jpg&quot; /&gt;&lt;br /&gt;&lt;br /&gt;and with gradient colors&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.complexification.net/gallery/machines/boxFitting/boxFittingPRN.jpg&quot; id=&quot;popup_213511031&quot; border=&quot;0&quot; width=&quot;300&quot; height=&quot;300&quot; data-bx-viewer=&quot;image&quot; data-bx-src=&quot;http://www.complexification.net/gallery/machines/boxFitting/boxFittingPRN.jpg&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;PACKING ALGORITHM &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Another name for Space Filling can be Packing Algorithm&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://visiblearchive.blogspot.com.es/2009/01/packing-them-in.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Packing Algorithm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.filterforge.com/upload/forum/ffd/Space%20filling%20squares.jpg&quot; id=&quot;popup_1369957018&quot; border=&quot;0&quot; width=&quot;300&quot; height=&quot;300&quot; data-bx-viewer=&quot;image&quot; data-bx-src=&quot;http://www.filterforge.com/upload/forum/ffd/Space%20filling%20squares.jpg&quot; /&gt;&lt;br /&gt;&lt;br /&gt;If I find more I will put it here&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Mon, 26 Nov 2012 10:50:27 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Please, Anyone could have any other information, link, software or way to do this WITHOUT having to program it, without scripting, or code it myself?&lt;br /&gt;&lt;br /&gt;Or if someone else have done it already and is available to just use it in some way.&lt;br /&gt;&lt;br /&gt;AND more important for me, that IS AVAILABLE for Windows 7, as I have seen one that is only for MacOS&lt;br /&gt;&lt;br /&gt;I could use Photoshop or Illustrator in Windows 7 (if there could be possibly any plugin or addon)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Mon, 26 Nov 2012 11:35:29 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Studio Artist 4. &lt;br /&gt;&lt;br /&gt;It's a VERY VERY specific piece of feature you're looking for so it's mildly hard to find them especially at the level of power you're looking for. Just as a hint on looking for things like this, it could be achieved via various means as well. I tried using a physics engine to make circles spread and self-organize. It's pretty cool. Did that in Maya. :)&lt;br /&gt;&lt;br /&gt;I sense you're desperate after seeing you've bumped 3 or 4 threads on the same matter. That's probably not the best of forum behaviors in general. Don't let your feelings run you doing that. One post should be enough for a question, otherwise it starts becoming ridiculous, like you're begging for attention. Not good. :p And hey, I do business with art and I can really say the same rules apply. ;)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;SpaceRay&lt;/b&gt;, &lt;em&gt;Tue, 11 Dec 2012 04:21:46 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thanks for your comment and suggestion of Studio Artist 4, I have tried and it seems that it could be possible to make but still I am not sure how to do it right as I am very beginner in this sofware and is a complex one to make special effects.&lt;br /&gt;&lt;br /&gt;I am not desperate for this  :D , but would like to be able to have a way to make this. Sorry to have bumped 3 or 4 threads about this, but they had different things, I will try to not make it if I can. Sorry for showing and seems and feeling that I am begging for this. &lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Just as a hint on looking for things like this, it could be achieved via various means as well. I tried using a physics engine to make circles spread and self-organize. It's pretty cool.Did that in Maya.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;What various means? &lt;br /&gt;&lt;br /&gt;What Physics engine?&lt;br /&gt;&lt;br /&gt;and how to make the circles spread and self-organize?&lt;br /&gt;&lt;br /&gt;Is this only in Maya? only as 3D ? and what about a 2D version that is not in a very expensive software?&lt;br /&gt;&lt;br /&gt;Thanks very much for your help and your comments that are appreciated and right&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;LexArt&lt;/b&gt;, &lt;em&gt;Sat, 14 May 2016 04:34:08 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;searching for &quot;fill shape&quot; on the forum I have discovered this thread and it looks very beautiful and great, like them much, but I think that FF is not able to make this&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Skybase wrote:&lt;/b&gt;&lt;br /&gt;Studio Artist 4. &lt;br /&gt;&lt;br /&gt;It's a VERY VERY specific piece of feature you're looking for so it's mildly hard to find them especially at the level of power you're looking for. Just as a hint on looking for things like this, it could be achieved via various means as well. I tried using a physics engine to make circles spread and self-organize. It's pretty cool. Did that in Maya.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Hi, I have never sen this software, I have just searched it on google and found it, but it costs 399$, although there is now a offer for 299$, but do not know if  it is worth it, and have seen it was released in 2012 and has not been updated since then, so it may feel that they do not keep updating it&lt;br /&gt;&lt;br /&gt;please, have you tried yourself with studio artist to make this kind of things shown here?&lt;br /&gt;&lt;br /&gt;Thanks&lt;/p&gt;
</description>
</item>
<item><title>Scripiting Library.</title> 
		             <dc:creator>Lucato</dc:creator> 
		             <category></category> 
		             <pubDate>Sat, 26 Mar 2016 00:57:27 -0400</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=7474</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=7474</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;Lucato&lt;/b&gt;, &lt;em&gt;Tue, 08 Jun 2010 12:15:23 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hey FF team, congratulations for the new step. Really interesting this new feature. I'll check it out.&lt;br /&gt;&lt;br /&gt;Do you guys intend to make a library for scripts as for filters? I mean, where members can share theirs scripts? It would be cool for those like me that aren't so good with programming languages. ;0)&lt;br /&gt;&lt;br /&gt;For a while, folks would use this thread for posting their scriptings in case they want to share it with the community. ;0)&lt;br /&gt;&lt;br /&gt;Cheers.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Tue, 08 Jun 2010 12:16:51 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;+1 a searchable script repository would be awesome :D&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 02:38:47 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Awesome.&lt;br /&gt;&lt;br /&gt;Here's my first &quot;Scrippet&quot; (script snippet): &lt;b&gt;Proportional gradient.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Lucato&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 03:17:15 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Great! Thanks ThreeDee for sharing it!&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 03:32:29 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hi Lucato, you're welcome!&lt;br /&gt;&lt;br /&gt;Here's another one with pixel-based control.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Pixel-Based Grid&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Carl&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 04:27:02 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Good idea Lucato, I too am script handicapped, thanks ThreeDee  8)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Crapadilla&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 05:13:38 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;It will be interesting to see whether we can generate some patterns from the &lt;a href=&quot;http://www.filterforge.com/forum/read.php?PAGEN_1=1&amp;FID=9&amp;TID=1184&amp;phrase_id=1770177#nav_start&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;wishlist&lt;/a&gt; now via the new script components. Of course, I'm blissfully (and hopelessly) unencumbered when it comes to scripting, so others will have to give it a shot. :D&lt;br /&gt;&lt;br /&gt;Anyone up for a &lt;a href=&quot;http://mathworld.wolfram.com/LogarithmicSpiral.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Logarithmic Spiral&lt;/a&gt;?  8)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Vladimir Golovin&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 05:24:56 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;ThreeDee, nice grid!&lt;br /&gt;&lt;br /&gt;(The code could use a little beautification -- e.g. you may drop 'local' for r, g, b and a. Our programmers like to stick it to every variable, while I'm in favor of using it only where it's actually needed because it makes the code less readable.)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Lucato&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 05:27:49 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Yup, nice one 3D! Thanks again.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ronjonnie&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 05:49:07 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Good morning everyone, :) &lt;br /&gt;&lt;br /&gt;Hi ThreeDee,&lt;br /&gt;&lt;br /&gt;I agree with Lucato, a nice one.  ;) &lt;br /&gt;Thank you. &lt;br /&gt;&lt;br /&gt;I wondered if you ever finished your filter? &lt;br /&gt;I need your help please. &lt;br /&gt;&lt;a href=&quot;http://www.filterforge.com/forum/read.php?FID=5&amp;TID=7411&amp;MID=84442#message84442&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.filterforge.com/forum/read...ssage84442&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;&lt;b&gt;Have a GREAT day. &lt;/b&gt; :) &lt;br /&gt;&lt;br /&gt;Ron&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Crapadilla&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 07:59:07 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I've been playing with ThreeDee's &quot;Proportional Gradient&quot; script, and it appears that the resulting gradient is still affected by &lt;i&gt;Size&lt;/i&gt; even if the flag is turned off. Is there a way to make &lt;i&gt;Map Script&lt;/i&gt; components independent of &lt;i&gt;Size&lt;/i&gt;?&lt;br /&gt;&lt;br /&gt;Speaking of flags, what is their use?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Vladimir Golovin&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 08:43:36 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Crapadilla wrote:&lt;/b&gt;&lt;br /&gt;Is there a way to make Map Script components independent of Size? &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Yes, but I don't have a code snippet handy -- perhaps Egret can post one. It involves the SIZE variable.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Sphinx.&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 08:55:39 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Dilla, I think its something along these lines if you want x and y independent of size:&lt;br /&gt;&lt;br /&gt;function prepare()&lt;br /&gt;	SCALE = SIZE / math.min(OUTPUT_WIDTH, OUTPUT_HEIGHT)&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	local x_no_size = x * SCALE&lt;br /&gt;	local y_no_size = y * SCALE&lt;br /&gt;end;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;dmorrill&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 09:09:15 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Vladimir Golovin wrote:&lt;/b&gt;&lt;br /&gt; (The code could use a little beautification -- e.g. you may drop 'local' for r, g, b and a. Our programmers like to stick it to every variable, while I'm in favor of using it only where it's actually needed because it makes the code less readable.) &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Just as an exercise in getting more familiar with Lua, I took the liberty of simplifying the code a bit:&lt;br /&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;function prepare()&lt;br /&gt;&amp;nbsp&amp;nbsp&amp;nbsp&amp;nbsp;griddistx = get_intslider_input( GRID_DIST_X )&lt;br /&gt;&amp;nbsp&amp;nbsp&amp;nbsp&amp;nbsp;griddisty = get_intslider_input( GRID_DIST_Y )&lt;br /&gt;&amp;nbsp&amp;nbsp&amp;nbsp&amp;nbsp;gridthick = get_intslider_input( GRID_LINE_THICKNESS )&lt;br /&gt;&amp;nbsp&amp;nbsp&amp;nbsp&amp;nbsp;tf = { [true] = 0, [false] = 1 }&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;&amp;nbsp&amp;nbsp&amp;nbsp&amp;nbsp;local zx = math.mod( math.abs( x ) * OUTPUT_WIDTH,  griddistx )&lt;br /&gt;&amp;nbsp&amp;nbsp&amp;nbsp&amp;nbsp;local zy = math.mod( math.abs( y ) * OUTPUT_HEIGHT, griddisty )&lt;br /&gt;&amp;nbsp&amp;nbsp&amp;nbsp&amp;nbsp;local w  = tf[ (zx &amp;lt; gridthick) or (zy &amp;lt; gridthick) ]&lt;br /&gt;&amp;nbsp&amp;nbsp&amp;nbsp&amp;nbsp;return w, w, w, 1&lt;br /&gt;end;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;dmorrill&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 09:34:03 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Following up on my previous post, here's a variation on ThreeDee's scrippet that allows you to set the grid line color and fill to arbitrary color or map values...&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Lucato&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 09:45:14 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Regarding the Grid Script, shouldn't it show on the right and bottom side a thin line too as those shown at the top and left side once it is squared image?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 10:04:31 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hmm... well, I just began playing around with LUA. But aside from the advanced stuff it's really nice how you can throw in any formula and end up with pretty cool stuff.&lt;br /&gt;&lt;br /&gt;Here's a classic and a tribute to my highschool math formula that was saved on a TI-83&lt;br /&gt;&lt;br /&gt;function prepare()&lt;br /&gt;	value1 = get_slider_input(NUMBER)&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	w = (x+(value1)*3*math.sin(y*x))*0.2&lt;br /&gt;	u = (w+(value1)*3*math.sin(y*x))*0.2&lt;br /&gt;	return w, u, w, a&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;dmorrill&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 10:35:01 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Lucato wrote:&lt;/b&gt;&lt;br /&gt;Regarding the Grid Script, shouldn't it show on the right and bottom side a thin line too as those shown at the top and left side once it is squared image?&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Probably, but that will require a bit more code than the current one. But on the other hand, it tiles much better the way it is now  :) &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;dmorrill&lt;/b&gt;, &lt;em&gt;Wed, 09 Jun 2010 10:44:33 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Here's the first script component I wrote yesterday (I'm still fairly new to FF, so it took me a while to figure out where the component was being stored). This one takes two input maps and outputs a new map organized as a variable size grid whose cell contents are randomly chosen from matching regions of the input maps (sort of like the game of Concentration). The color of the (optional) grid lines can also be specified using another input map/color.&lt;br /&gt;&lt;br /&gt;For some reason, the script input editor won't allow me to set the lower bound of the line thickness input to 0, so the grid line thickness is 1 less than what you actually specify (i.e. if you set 1, no grid lines are drawn, setting 2 sets a grid line width of 1, ...).&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sat, 12 Jun 2010 03:20:05 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;b&gt;Bubbles Scrippet&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;With random number generator and tables you can do object-type noises, like bubbles.&lt;br /&gt;&lt;br /&gt;The drawback is that you have to sample each pixel as many times as you have objects, so 100 objects takes 10 times as long as 10 objects.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sat, 12 Jun 2010 03:21:25 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Scrippet itself&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sat, 12 Jun 2010 04:14:26 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;b&gt;Random Noise Scrippet&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Lua doesn't allow random numbers in the get_sample(x,y) function, so I wrote this Scrippet to get around that with a pseudorandom number generator function.&lt;br /&gt;&lt;br /&gt;In other words, here's how to make plain random noise.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Vladimir Golovin&lt;/b&gt;, &lt;em&gt;Sat, 12 Jun 2010 04:34:03 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;ThreeDee wrote:&lt;/b&gt;&lt;br /&gt;Lua doesn't allow random numbers in the get_sample(x,y) function, so I wrote this Scrippet to get around that with a pseudorandom number generator function. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;ThreeDeee, this is a very interesting and important topic -- we're thinking about providing an API for randomness that is not prone to patterning artifacts of random number generators seeded by sample coordinates, and, at the same time, don't have the problems associated with Perlin-based noise (e.g. reduced dynamic range.)&lt;br /&gt;&lt;br /&gt;(I haven't checked the snippet yet -- too busy writing the help.)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Vladimir Golovin&lt;/b&gt;, &lt;em&gt;Sat, 12 Jun 2010 04:36:40 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;ThreeDee wrote:&lt;/b&gt;&lt;br /&gt;Random Number Generator Scrippet.ffxml&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Oh, looks good so far. I'll have the guys examine and test it, perhaps we'll go with a similar approach.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sat, 12 Jun 2010 04:38:21 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;b&gt;Drop Ripples&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Variation on Bubbles.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sat, 12 Jun 2010 04:39:06 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Ripples Scrippet&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sat, 12 Jun 2010 04:50:54 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Vladimir Golovin wrote:&lt;/b&gt;&lt;br /&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt; ThreeDee wrote: &lt;/b&gt; Random Number Generator Scrippet.ffxml&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Oh, looks good so far. I'll have the guys examine and test it, perhaps we'll go with a similar approach. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Hi Vladimir,&lt;br /&gt;&lt;br /&gt;Glad you find it useful. Yes, it would be nice to have that functionality, and a way to connect it to the global Variation slider if at all possible.&lt;br /&gt;&lt;br /&gt;TD&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Vladimir Golovin&lt;/b&gt;, &lt;em&gt;Sat, 12 Jun 2010 04:54:44 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;ThreeDee wrote:&lt;/b&gt;&lt;br /&gt;and a way to connect it to the global Variation slider if at all possible.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;You can the VARIATION variable, which is visible to scripts that have the &quot;Makes use of the global Variation setting&quot; flag turned on in their Script Settings.&lt;br /&gt;&lt;br /&gt;As for our planned randomness API, we may decide to pre-seed it with VARIATION automatically (while allowing to add a &quot;local&quot; seed.)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sat, 12 Jun 2010 05:45:30 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Vladimir Golovin wrote:&lt;/b&gt;&lt;br /&gt;You can the VARIATION variable, which is visible to scripts that have the &quot;Makes use of the global Variation setting&quot; flag turned on in their Script Settings.&lt;br /&gt;&lt;br /&gt;As for our planned randomness API, we may decide to pre-seed it with VARIATION automatically (while allowing to add a &quot;local&quot; seed.) &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Variation slider: Oh, excellent, got to check that out. Haven't gotten that far in investigating the possibilities.&lt;br /&gt;&lt;br /&gt;Randomness API plan sounds good.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sat, 12 Jun 2010 05:48:09 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;b&gt;Random Lines&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Similar to Bubbles, this Scrippet uses a table to store a number of lines (x-coordinate, y-coordinate, angle and value) and then calculates the distance of the current point to it, using the value that is highest at a given point.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sat, 12 Jun 2010 05:48:34 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Scrippet&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sat, 12 Jun 2010 05:57:34 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Lucato wrote:&lt;/b&gt;&lt;br /&gt;Regarding the Grid Script, shouldn't it show on the right and bottom side a thin line too as those shown at the top and left side once it is squared image?&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Hi Lucato,&lt;br /&gt;&lt;br /&gt;Actually, no. The point of the script is to demonstrate using PIXEL values instead of relative values. &lt;br /&gt;&lt;br /&gt;The built-in components use values relative to the size of the image, while the Grid Scrippet uses fixed pixel values that don't change with the image size. Thus you can be sure your gridlines are always (for example) 10 pixels apart, whether the image is 600px or 126px or 6748px square.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sat, 12 Jun 2010 06:01:51 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;An interesting sort of thing happens when you reduce the Size, Pixels with the Lines Scrippet. The lines cross mainly in the original image area, since their coordinates fall there, but do continue in the whole image area. &lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ronjonnie&lt;/b&gt;, &lt;em&gt;Sat, 12 Jun 2010 10:25:03 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Good morning Everyone, :) &lt;br /&gt;&lt;br /&gt;Hey ThreeDee,&lt;br /&gt;&lt;br /&gt;Thanks for the Scrippets, they are very cool &amp; most helpful, to help us all learn.&lt;br /&gt;Speaking of learning, reminds me of a project I am having trouble with, I was in great hopes that you would please help me with it? ;) &lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.filterforge.com/forum/read.php?FID=5&amp;TID=7411&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.filterforge.com/forum/read...5&amp;TID=7411&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Have a GREAT day.&lt;/b&gt; :) &lt;br /&gt;&lt;br /&gt;Ron&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sat, 12 Jun 2010 10:54:09 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;ronjonnie wrote:&lt;/b&gt;&lt;br /&gt;Speaking of learning, reminds me of a project I am having trouble with, I was in great hopes that you would please help me with it? Wink &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Hi Ronjonnie,&lt;br /&gt;&lt;br /&gt;That Water Splash filter was an unfortunate victim of my operating system upgrade -- it no longer exists.&lt;br /&gt;&lt;br /&gt;But maybe I'll get inspired to rebuild it with 2.0 one of these days.&lt;br /&gt;&lt;br /&gt;TD&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sat, 12 Jun 2010 11:14:24 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Vladimir Golovin wrote:&lt;/b&gt;&lt;br /&gt;You can the VARIATION variable, which is visible to scripts that have the &quot;Makes use of the global Variation setting&quot; flag turned on in their Script Settings. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Ok, thanks, I got that now. You can control the variations by calling math.randomseed(VARIATION) during prepare.&lt;br /&gt;&lt;br /&gt;Without this, the random numbers were different EVERY time, even when using a stored preset, which is fine if you wanted it to be that way, but if the variation happed to the exact one you wanted to keep...&lt;br /&gt;&lt;br /&gt;TD&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ronjonnie&lt;/b&gt;, &lt;em&gt;Sat, 12 Jun 2010 11:42:31 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hey ThreeDee,&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Thank you for the reply.&lt;/b&gt; I thought you were mad at me for something &amp; I could not figure out what that would be.  :?: &lt;br /&gt; &lt;br /&gt;&lt;b&gt;I am SO SORRY to hear the bad news about the loss of the Water Splash filter! :cry:  &lt;/b&gt;That has to be one of the most &lt;b&gt;SUPER COOL &amp; Most useful filters &lt;/b&gt;I have seen in a long time! &lt;br /&gt;&lt;b&gt;PLEASE PLEASE find the time to rebuild it, I love it &amp; can make good use of it.&lt;/b&gt; OK. :)  :)  :)  :) &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Have a GREAT weekend!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Ron&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Totte&lt;/b&gt;, &lt;em&gt;Sat, 12 Jun 2010 14:43:11 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;ThreeDee, real cool stuff you got here ;-)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;StevieJ&lt;/b&gt;, &lt;em&gt;Sat, 12 Jun 2010 19:55:02 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thanks for sharing, guys.....they are helping me to learn it.....especially like the Lines Scrippet.....   8)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Carl&lt;/b&gt;, &lt;em&gt;Sun, 13 Jun 2010 07:17:13 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;cool ThreeDee &lt;br /&gt;&lt;br /&gt;......... not having a clue on scripting, is it possible to write a script which allows you to bring a second image into the editor? If it is, is any one interested in writing it, I'm sure alot of people would use it  :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Totte&lt;/b&gt;, &lt;em&gt;Sun, 13 Jun 2010 07:57:18 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Carl, check out the Berestrokia sample from Vlad/Egret. I have an idea of writing a tool to create a bomber particle builder from a png.&lt;br /&gt;&lt;br /&gt;Only problem, I wont make a Windows version, will be Mac OS X only.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ronviers&lt;/b&gt;, &lt;em&gt;Tue, 15 Jun 2010 10:23:41 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Can we embed pastebins?&lt;br /&gt;[paste]&lt;a href=&quot;http://www.pastey.net/137711&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;pastebinTest&lt;/a&gt;[/paste]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Carl&lt;/b&gt;, &lt;em&gt;Wed, 16 Jun 2010 01:59:49 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Totte wrote:&lt;/b&gt;&lt;br /&gt; Berestrokia sample from Vlad/Egret&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;where was that Totte? your gona have to give up that mac and give windows a go  ;)  :)&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Kraellin&lt;/b&gt;, &lt;em&gt;Sun, 20 Jun 2010 15:58:52 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;more, more, more!&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Dmitry Sapelnikov&lt;/b&gt;, &lt;em&gt;Mon, 28 Jun 2010 02:19:31 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;ThreeDee, where have you got the noise formula for your RNG snippet?&lt;br /&gt;Could you give me a link?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Wed, 30 Jun 2010 05:25:56 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Egret wrote:&lt;/b&gt;&lt;br /&gt;ThreeDee, where have you got the noise formula for your RNG snippet? Could you give me a link? &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Hi Egret, sent you the link by mail yesterday as the forum was read-only. &lt;br /&gt;&lt;br /&gt;TD&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Totte&lt;/b&gt;, &lt;em&gt;Wed, 30 Jun 2010 05:43:21 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;table class=&quot;forum-quote&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quote&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Carl said something like:&lt;/b&gt; where was that Totte?&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;a href=&quot;http://www.filterforge.com/download/beta2/lua-scripting.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.filterforge.com/download/b...pting.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Wed, 30 Jun 2010 05:49:38 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;b&gt;Tech Noise&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Fractal square noise of in sizes from 1/2 to 1/2^n.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Wed, 30 Jun 2010 05:53:38 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hmm. That file name changed radically from what I uploaded. Hope it works...&lt;br /&gt;&lt;br /&gt;The basic output is this, iterations and bevel size are adjustable:&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Wed, 30 Jun 2010 05:56:19 -0400&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Image sample, using a blend of two Tech Noise components as a height map in a Surface filter.&lt;/p&gt;
</description>
</item>
<item><title>Idea: Multiple Subtractions from Source Image</title> 
		             <dc:creator>Mehmet Sensoy</dc:creator> 
		             <category></category> 
		             <pubDate>Mon, 08 Feb 2016 19:41:42 -0500</pubDate> 
		             <link>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=13926</link> 
		             <guid>http://www.filterforge.com/forum/read.php?FID=18&amp;TID=13926</guid>
		             <description>&lt;p&gt;&lt;small&gt;&lt;b&gt;Mehmet Sensoy&lt;/b&gt;, &lt;em&gt;Sat, 06 Feb 2016 07:46:28 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;i&gt;Hello all,&lt;/i&gt;&lt;br /&gt;Trying to understand filter forge and using map/curve script components.&lt;br /&gt;Recently I had an idea to &lt;b&gt;subtract one source image from multiple other sources.&lt;/b&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;Is it possible to make ;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Main Input : Source Image&lt;br /&gt;Input : Subtract Image 1&lt;br /&gt;Input : Subtract Image 2...5&lt;br /&gt;&lt;br /&gt;&lt;i&gt;with map script component.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Don't you think it would be useful?&lt;br /&gt;&lt;br /&gt;Thank you,&lt;br /&gt;Best Regards.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Indigo Ray&lt;/b&gt;, &lt;em&gt;Sat, 06 Feb 2016 10:32:33 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Do you mean (series):&lt;br /&gt;Output = Source - Image1 - ... - ImageN&lt;br /&gt;&lt;br /&gt;Yes, this is possible. Just do it channel-wise (R,G,B).&lt;br /&gt;&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;Or do you mean (parallel):&lt;br /&gt;Output1 = Source - Image1&lt;br /&gt;...&lt;br /&gt;OutputN = Source - ImageN&lt;br /&gt;&lt;br /&gt;This &lt;i&gt;may&lt;/i&gt; be possible. Map scripts, like all other components, have &lt;i&gt;only one&lt;/i&gt; output. However, if seamless tiling is OFF, you have an unlimited plane (x,y) to work with.&lt;br /&gt;&lt;br /&gt;Or do you mean something else?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Mehmet Sensoy&lt;/b&gt;, &lt;em&gt;Sat, 06 Feb 2016 11:47:56 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hello,&lt;br /&gt;Thank you for your answer;&lt;br /&gt;&lt;br /&gt;I have created 5 inputs and written this code (without a coding knowledge:))&lt;br /&gt;Of course it's not working at the moment,&lt;br /&gt;Looking for your help.&lt;br /&gt;&lt;br /&gt;[CODE]function prepare()&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function get_sample(x, y)&lt;br /&gt;	&lt;br /&gt;local originalimage = get_sample_map(x, y, SOURCE)	&lt;br /&gt;local image1 = get_sample_map(x, y, IMAGE1)&lt;br /&gt;local image2 = get_sample_map(x, y, IMAGE2)&lt;br /&gt;local image3 = get_sample_map(x, y, IMAGE3)&lt;br /&gt;local image4 = get_sample_map(x, y, IMAGE4)&lt;br /&gt;&lt;br /&gt;local originalimage - local image1&lt;br /&gt;local originalimage - local image2&lt;br /&gt;local originalimage - local image3&lt;br /&gt;local originalimage - local image4&lt;br /&gt;&lt;br /&gt;OUTPUT =  get_sample_map(x, y, originalimage)	&lt;br /&gt;	&lt;br /&gt;	r,g,b,a = get_sample_map(x, y, OUTPUT)&lt;br /&gt;	local r = x&lt;br /&gt;	local g = y&lt;br /&gt;	local b = (x + y) / 2&lt;br /&gt;	local a = 1&lt;br /&gt;	return r, g, b, a&lt;br /&gt;end;[/CODE]&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Sun, 07 Feb 2016 07:15:39 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;*kinda side track*&lt;br /&gt;&lt;br /&gt;Shouldn't this be easier with just the default RGB math? Or am I missing something about the original idea.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Sun, 07 Feb 2016 13:19:17 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;What is the supposed final output of this filter?&lt;br /&gt;&lt;br /&gt;Say, you were using five of the built-in images. Once you've subtracted number two from number one, you have a darker image with features from both. What do you do with the third, fourth and fifth image?&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Mehmet Sensoy&lt;/b&gt;, &lt;em&gt;Sun, 07 Feb 2016 13:40:12 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Actually what I am trying to achieve is to make 5-10 level separation and using bomber component (or other) create luminosity based size or repeat difference. Say brighter areas particle size for 50 px and darker areas for 10 px.&lt;br /&gt;&lt;br /&gt;For example there is a similar filter; &lt;a href=&quot;https://filterforge.com/filters/471.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;https://filterforge.com/filters/471.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;But additionally I would like to add custom particle and other options.&lt;br /&gt;&lt;br /&gt;By the way I'm doing luminosity separation like this ; &lt;a href=&quot;https://filterforge.com/filters/13579.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;https://filterforge.com/filters/13579.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Do you think if it is possible to minimize node amount using map scripts and so...?&lt;br /&gt;&lt;br /&gt;Thank you.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Skybase&lt;/b&gt;, &lt;em&gt;Sun, 07 Feb 2016 21:48:27 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I'm pretty sure this is faster using default FF components than the map script. Likely will depend on a bajillion factors, but this should be doable with default FF stuff. As far as I understand it, it'd be pretty flexible too.&lt;br /&gt;&lt;br /&gt;It'd be cool to do stuff with the map script regardless.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;ThreeDee&lt;/b&gt;, &lt;em&gt;Mon, 08 Feb 2016 03:32:36 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Ok, I see. I'm still not understanding where subtracting a number of images from the main image fits into this. Maybe I'm thinking about a different kind of subtracting from what you are referring to. If you mathematically subtract one image from another, by the time you've subtracted two images from a source image you pretty much have a black image as a result.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Rachel Duim&lt;/b&gt;, &lt;em&gt;Mon, 08 Feb 2016 13:49:38 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Here's my take on subtractive merging. When you subtract three images together, the result is no longer in the required 0-1 range for viewing. So I added some RGB math and a gamma component to bring the image back into range. In this example I am not doing any luminance masking.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Rachel Duim&lt;/b&gt;, &lt;em&gt;Mon, 08 Feb 2016 13:52:12 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Other things to note about this method. The order of subtraction is important and will drastically change the results. Typically at least one of the images will appear as a photo &quot;negative&quot;. Here's the filter. No controls, just an illustration of the problem.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Mehmet Sensoy&lt;/b&gt;, &lt;em&gt;Mon, 08 Feb 2016 14:53:03 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Hello,&lt;br /&gt;I have attached file, it's not like what I want to achieve.&lt;br /&gt;I want to make 10 level luminosity masking. Then attaching them to pattern components (for testing I have used checker component here..) Then multiblending them again. Like adaptive size tiling filter. So my main goal asking that question was because after luminosity masking and checker pattern some patterns overlap eachother.&lt;br /&gt;Only way working is using double-size repeats; for example :&lt;br /&gt;-100 and -80 levels : 64 repeat w/h&lt;br /&gt;-80 and -60 levels : 32 repeat ...&lt;br /&gt;&lt;br /&gt;But here I have faced with a problem that maximum repeat value is 100.&lt;br /&gt;So even I started with 2...it goes 2-4-8-16-32-64-128(!) So impossible. (This technique worked for 5 level separation)&lt;br /&gt;&lt;br /&gt;Please check my filter and help.&lt;br /&gt;By the way may be there would be smarter way to separate levels if so please let me know.&lt;br /&gt;Best Regards.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Rachel Duim&lt;/b&gt;, &lt;em&gt;Mon, 08 Feb 2016 15:22:01 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;I think there is an easier way to mask the levels. Here is a snippet showing another method.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Mehmet Sensoy&lt;/b&gt;, &lt;em&gt;Mon, 08 Feb 2016 16:10:08 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thank you Rick,&lt;br /&gt;I applied your method and attached file. It's getting closer, I tried to do with 5 level separation because of the reason I've mentioned in my previous post. But with 10 levels it might give better results and also I would like to scatter image(s) as particles using that technique. Any ideas? Especially for 10 level separation and repeating issue (or size increments).&lt;br /&gt;&lt;br /&gt;Thanks again.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Betis&lt;/b&gt;, &lt;em&gt;Mon, 08 Feb 2016 16:15:44 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;It's a very strange output but I do believe this is what you're after based on the filter you uploaded Mehmet.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://i.imgur.com/CM3QLoc.png&quot; id=&quot;popup_1519859401&quot; border=&quot;0&quot; width=&quot;300&quot; height=&quot;300&quot; data-bx-viewer=&quot;image&quot; data-bx-src=&quot;http://i.imgur.com/CM3QLoc.png&quot; /&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Mehmet Sensoy&lt;/b&gt;, &lt;em&gt;Mon, 08 Feb 2016 16:37:26 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thank you Betis,&lt;br /&gt;I'm going to check it right now, please check my latest attachment. If there would be a way to increase separation levels it would look more natural. And also as you may notice I again it's going somewhere else (but this one also looking good as well:) ) But in my first question I was wondering how to avoid overlapping tiles or mosaics. That was because I had asked subtraction methods. I guess for example on top layer - it would be darker areas and repeat amount would be 100 but when it's lighter repeat value might decrease. Till that part it's ok but I'm trying find a way to avoid overlaps.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Mehmet Sensoy&lt;/b&gt;, &lt;em&gt;Mon, 08 Feb 2016 16:54:09 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;Thank you Betis,&lt;br /&gt;I'm going to check it right now, please check my latest attachment. If there would be a way to increase separation levels it would look more natural. And also as you may notice I again it's going somewhere else (but this one also looking good as well:) ) But in my first question I was wondering how to avoid overlapping tiles or mosaics. That was because I had asked subtraction methods. I guess for example on top layer - it would be darker areas and repeat amount would be 100 but when it's lighter repeat value might decrease. Till that part it's ok but I'm trying find a way to avoid overlaps.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Rachel Duim&lt;/b&gt;, &lt;em&gt;Mon, 08 Feb 2016 18:56:23 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;This latest filter (5 Level) produces halftoning! When you use the dot shape, it looks exactly like halftoning. So you have halftoning with a selectable shape for the dot.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Rachel Duim&lt;/b&gt;, &lt;em&gt;Mon, 08 Feb 2016 19:38:16 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;This is a completely different take on this. I produced similar results with 1 bomber using the image luminosity to control the size of the particles directly at the bomber+ size input.&lt;/p&gt;&lt;p&gt;&lt;small&gt;&lt;b&gt;Rachel Duim&lt;/b&gt;, &lt;em&gt;Mon, 08 Feb 2016 19:41:42 -0500&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;And here's the modified filter. Feel free to use it or discard it.  8)&lt;/p&gt;
</description>
</item>
</channel></rss> 
