Login - Create Account

Help articles on Scripting (work in progress)

Login or Register to post new topics or replies
Vladimir Golovin
Administrator
Posts: 3314
Filters: 55
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.)

Here's the list of articles that are currently uploaded:
- Getting Started with Scripting
- Referencing Inputs from Scripts
- Sample-Based Architecture
  Details E-Mail
Kraellin
Kraellin

Posts: 12711
Filters: 98
Quote
Create a Map Script component (located in the Scripting category on the Component Bar).


ok, what if we have no scripting category on the component bar? "Help Components" doesnt show any such thing either. is this something upcoming or am i missing something here? and yes, this version 2, latest update.

edit: and in looking further, what happened to the options? i no longer have an "Options" in the menu system.

edit: never mind, found the options. lol. dont get old smile;) but i still cant find anything about scripting within the editor.

edit yet again: ok, seems i dont have the latest version. lol. stage 4 is out today. ok, forget i posted anything here smile:) smile:D
If wishes were horses... there'd be a whole lot of horse crap to clean up!

Craig
  Details E-Mail
Mike Blackney

Posts: 372
Filters: 56
Forget? Impossible!! smile:D


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.

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.
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3314
Filters: 55
Quote
Mike Blackney wrote:
I thought they would be pixels (for some reason)


Thank you for reminding me to upload the article on "Filter Forge's Sample-Based Architecture" smile:)

Quote
Mike Blackney wrote:
Sorry if asking questions like this are doubling up on wiki work.


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.
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3314
Filters: 55
Quote
Mike Blackney wrote:
Is there any method I can call to get the input image dimensions in script?


Yes. They are not documented yet, but here's the list of FF variables available in Lua scripts:

SIZE - value of the Size slider, available only to scripts that "make use of the global Size setting".

VARIATION - value of the Variation slider, available only to scripts that "make use of the global Variation setting".

OUTPUT_WIDTH, OUTPUT_HEIGHT - image width and height, pixels

SEAMLESS_REGION_WIDTH, SEAMLESS_REGION_HEIGHT - seamless region width and height, available only when the global Seamless Tiling checkbox is turned on.

SEAMLESS - state of the global Seamless Tiling checkbox, true of false.

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 smile:)
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3314
Filters: 55
I've updated the original post with a link to a new article on sample-based architecture.
  Details E-Mail
Mike Blackney

Posts: 372
Filters: 56
Thanks Vlad, that's brilliant! smile:D
  Details E-Mail
BenBeckwith
Posts: 136
Filters: 8
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. smile:)

  Details E-Mail
BenBeckwith
Posts: 136
Filters: 8
Sorry, I totally forgot something. For added clarity...

  Details E-Mail
Totte
√úbernerd

Posts: 1415
Filters: 104
Brilliant Ben!
- I never expected the Spanish inquisition
  Details E-Mail
Crapadilla
lvl 52 Filter Weaver and Official "Filter Forge Seer"

Posts: 4360
Filters: 65
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. smile;)

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.
--- Crapadilla says: "Damn you, stupid redundant feature requests!" ;)
  Details E-Mail

Join Our Community!

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

29,336 Registered Users
+22 new in 7 days!

137,530 Posts
+5 new last day!

13,400 Topics
+8 new in 7 days!

Online Users Last 5 minutes:

8 unregistered users.

Recent Wiki Edits:

Follow filterforge on Twitter