YOUR ACCOUNT

Messages 1 - 45 of 79
First | Prev. | 1 2 | Next | Last 
Login or Register to post new topics or replies
Lucato
FF addicted

Posts: 505
Filters: 39
Hey FF team, congratulations for the new step. Really interesting this new feature. I'll check it out.

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)

For a while, folks would use this thread for posting their scriptings in case they want to share it with the community. ;0)

Cheers.
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
+1 a searchable script repository would be awesome smile:D
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Awesome.

Here's my first "Scrippet" (script snippet): Proportional gradient.



Proportional Gradient Scrippet.ffxml
  Details E-Mail
Lucato
FF addicted

Posts: 505
Filters: 39
Great! Thanks ThreeDee for sharing it!
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Hi Lucato, you're welcome!

Here's another one with pixel-based control.

Pixel-Based Grid



Pixel-based Grid Scrippet.ffxml
  Details E-Mail
Carl
c r v a

Posts: 7289
Filters: 82
Good idea Lucato, I too am script handicapped, thanks ThreeDee smile8)
  Details E-Mail
Crapadilla
lvl 52 Filter Weaver and Official "Filter Forge Seer"

Posts: 4365
Filters: 65
It will be interesting to see whether we can generate some patterns from the wishlist 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. smile:D

Anyone up for a Logarithmic Spiral? smile8)
--- Crapadilla says: "Damn you, stupid redundant feature requests!" ;)
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
ThreeDee, nice grid!

(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.)
  Details E-Mail
Lucato
FF addicted

Posts: 505
Filters: 39
Yup, nice one 3D! Thanks again.
  Details E-Mail
ronjonnie
Designer / Artist

Posts: 809
Filters: 320
Good morning everyone, smile:)

Hi ThreeDee,

I agree with Lucato, a nice one. smile;)
Thank you.

I wondered if you ever finished your filter?
I need your help please.
http://www.filterforge.com/forum/read...ssage84442

Thanks,
Have a GREAT day. smile:)

Ron
zazzle.com/Ronspassionfordesign*
So much to learn, so little time.
  Details E-Mail
Crapadilla
lvl 52 Filter Weaver and Official "Filter Forge Seer"

Posts: 4365
Filters: 65
I've been playing with ThreeDee's "Proportional Gradient" script, and it appears that the resulting gradient is still affected by Size even if the flag is turned off. Is there a way to make Map Script components independent of Size?

Speaking of flags, what is their use?
--- Crapadilla says: "Damn you, stupid redundant feature requests!" ;)
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Quote
Crapadilla wrote:
Is there a way to make Map Script components independent of Size?


Yes, but I don't have a code snippet handy -- perhaps Egret can post one. It involves the SIZE variable.
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
Dilla, I think its something along these lines if you want x and y independent of size:

function prepare()
SCALE = SIZE / math.min(OUTPUT_WIDTH, OUTPUT_HEIGHT)
end;

function get_sample(x, y)
local x_no_size = x * SCALE
local y_no_size = y * SCALE
end;
  Details E-Mail
dmorrill
Posts: 15
Quote
Vladimir Golovin wrote:
(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.)


Just as an exercise in getting more familiar with Lua, I took the liberty of simplifying the code a bit:

Quote

function prepare()
    griddistx = get_intslider_input( GRID_DIST_X )
    griddisty = get_intslider_input( GRID_DIST_Y )
    gridthick = get_intslider_input( GRID_LINE_THICKNESS )
    tf = { [true] = 0, [false] = 1 }
end;

function get_sample(x, y)
    local zx = math.mod( math.abs( x ) * OUTPUT_WIDTH, griddistx )
    local zy = math.mod( math.abs( y ) * OUTPUT_HEIGHT, griddisty )
    local w = tf[ (zx < gridthick) or (zy < gridthick) ]
    return w, w, w, 1
end;

David Morrill
  Details E-Mail
dmorrill
Posts: 15
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...



Grid Script Component.ffxml
David Morrill
  Details E-Mail
Lucato
FF addicted

Posts: 505
Filters: 39
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?
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
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.

Here's a classic and a tribute to my highschool math formula that was saved on a TI-83

function prepare()
value1 = get_slider_input(NUMBER)
end;

function get_sample(x, y)
w = (x+(value1)*3*math.sin(y*x))*0.2
u = (w+(value1)*3*math.sin(y*x))*0.2
return w, u, w, a
end;



  Details E-Mail
dmorrill
Posts: 15
Quote
Lucato wrote:
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?


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 smile:)
David Morrill
  Details E-Mail
dmorrill
Posts: 15
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.

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, ...).



Random Dicer.ffxml
David Morrill
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Bubbles Scrippet

With random number generator and tables you can do object-type noises, like bubbles.

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.



  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Scrippet itself



Bubbles Scrippet.ffxml
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Random Noise Scrippet

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.

In other words, here's how to make plain random noise.



Random Number Generator Scrippet.ffxml
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Quote
ThreeDee wrote:
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.


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.)

(I haven't checked the snippet yet -- too busy writing the help.)
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Quote
ThreeDee wrote:
Random Number Generator Scrippet.ffxml


Oh, looks good so far. I'll have the guys examine and test it, perhaps we'll go with a similar approach.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Drop Ripples

Variation on Bubbles.



  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Ripples Scrippet



Drop Ripples Scrippet.ffxml
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Quote
Vladimir Golovin wrote:
Quote
ThreeDee wrote: Random Number Generator Scrippet.ffxml


Oh, looks good so far. I'll have the guys examine and test it, perhaps we'll go with a similar approach.


Hi Vladimir,

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.

TD
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Quote
ThreeDee wrote:
and a way to connect it to the global Variation slider if at all possible.


You can the VARIATION variable, which is visible to scripts that have the "Makes use of the global Variation setting" flag turned on in their Script Settings.

As for our planned randomness API, we may decide to pre-seed it with VARIATION automatically (while allowing to add a "local" seed.)
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Quote
Vladimir Golovin wrote:
You can the VARIATION variable, which is visible to scripts that have the "Makes use of the global Variation setting" flag turned on in their Script Settings.

As for our planned randomness API, we may decide to pre-seed it with VARIATION automatically (while allowing to add a "local" seed.)


Variation slider: Oh, excellent, got to check that out. Haven't gotten that far in investigating the possibilities.

Randomness API plan sounds good.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Random Lines

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.





  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Quote
Lucato wrote:
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?


Hi Lucato,

Actually, no. The point of the script is to demonstrate using PIXEL values instead of relative values.

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.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
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.



  Details E-Mail
ronjonnie
Designer / Artist

Posts: 809
Filters: 320
Good morning Everyone, smile:)

Hey ThreeDee,

Thanks for the Scrippets, they are very cool & most helpful, to help us all learn.
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? smile;)

http://www.filterforge.com/forum/read...5&TID=7411

Have a GREAT day. smile:)

Ron
zazzle.com/Ronspassionfordesign*
So much to learn, so little time.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Quote
ronjonnie wrote:
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


Hi Ronjonnie,

That Water Splash filter was an unfortunate victim of my operating system upgrade -- it no longer exists.

But maybe I'll get inspired to rebuild it with 2.0 one of these days.

TD

  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Quote
Vladimir Golovin wrote:
You can the VARIATION variable, which is visible to scripts that have the "Makes use of the global Variation setting" flag turned on in their Script Settings.


Ok, thanks, I got that now. You can control the variations by calling math.randomseed(VARIATION) during prepare.

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...

TD


  Details E-Mail
ronjonnie
Designer / Artist

Posts: 809
Filters: 320
Hey ThreeDee,

Thank you for the reply. I thought you were mad at me for something & I could not figure out what that would be. smile:?:

I am SO SORRY to hear the bad news about the loss of the Water Splash filter! smile:cry: That has to be one of the most SUPER COOL & Most useful filters I have seen in a long time!
PLEASE PLEASE find the time to rebuild it, I love it & can make good use of it. OK. smile:) smile:) smile:) smile:)

Have a GREAT weekend!

Ron
zazzle.com/Ronspassionfordesign*
So much to learn, so little time.
  Details E-Mail
Totte
Übernerd

Posts: 1460
Filters: 107
ThreeDee, real cool stuff you got here smile;-)
- I never expected the Spanish inquisition
  Details E-Mail
StevieJ
Designer/Artist

Posts: 11264
Filters: 163
Thanks for sharing, guys.....they are helping me to learn it.....especially like the Lines Scrippet..... smile8)
Steve

"Buzzards gotta eat...same as worms..." - Clint :)
  Details E-Mail
Carl
c r v a

Posts: 7289
Filters: 82
cool ThreeDee

......... 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 smile:)
  Details E-Mail
Totte
Übernerd

Posts: 1460
Filters: 107
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.

Only problem, I wont make a Windows version, will be Mac OS X only.
- I never expected the Spanish inquisition
  Details E-Mail
ronviers
lighter/generalist

Posts: 4456
Filters: 35
Can we embed pastebins?
[paste]pastebinTest[/paste]
@ronviers
  Details E-Mail
Carl
c r v a

Posts: 7289
Filters: 82
Quote
Totte wrote:
Berestrokia sample from Vlad/Egret

where was that Totte? your gona have to give up that mac and give windows a go smile;) smile:)
  Details E-Mail
Kraellin
Kraellin

Posts: 12749
Filters: 99
more, more, more!
If wishes were horses... there'd be a whole lot of horse crap to clean up!

Craig
  Details E-Mail
Dmitry Sapelnikov
Filter Forge, Inc. AKA Egret
Posts: 76
Filters: 5
ThreeDee, where have you got the noise formula for your RNG snippet?
Could you give me a link?
  Details E-Mail

Messages 1 - 45 of 79
First | Prev. | 1 2 | Next | Last 

Join Our Community!

Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!

33,711 Registered Users
+18 new in 30 days!

153,533 Posts
+38 new in 30 days!

15,348 Topics
+73 new in year!

Create an Account

Online Users Last minute:

20 unregistered users.