User Tools

Site Tools


ai:patching_basics

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ai:patching_basics [2018/10/13 15:06] icke_siegenai:patching_basics [2018/10/15 13:07] (current) – external edit 127.0.0.1
Line 5: Line 5:
 In the beginning - when it was just the Salvation engine - almost everything needed to be patched: the engine offered a collection of modules, each specialising in a very small task, and the operator/programmer had to combine them in a meaningful way, to acchieve what he had in mind - play a video, map an image to a structure, control some parameters. A good part of the development over the last years is that many of everydays tasks are now packed into a fancy GUI, and are available with just one click. However, if something special needs to be accomplished, or some particular thing is not (yet) available via the GUI, patching might be the way to go. And honestly, after you have made the first steps, it is pure fun (after the desperation has vanished, that is). In the beginning - when it was just the Salvation engine - almost everything needed to be patched: the engine offered a collection of modules, each specialising in a very small task, and the operator/programmer had to combine them in a meaningful way, to acchieve what he had in mind - play a video, map an image to a structure, control some parameters. A good part of the development over the last years is that many of everydays tasks are now packed into a fancy GUI, and are available with just one click. However, if something special needs to be accomplished, or some particular thing is not (yet) available via the GUI, patching might be the way to go. And honestly, after you have made the first steps, it is pure fun (after the desperation has vanished, that is).
  
 +Also, you can change how Ai works by changing the Stage Patch - this includes making Ai completely unresposive, disabling its outputs, etc. Taking some care, i.e. saving the project before tweaking the stage patch, is a good idea.
 ===== Where to start ===== ===== Where to start =====
  
Line 19: Line 20:
 ===== Patches, Ports and Modules ===== ===== Patches, Ports and Modules =====
  
-In the very end, the stage patch you consist of just thousands of modules, all linked to other modules. However none could overlook this or handle it in a suitable way. That's why functional units are bundled together as subpatches which expose only a limited set of ports and parameters. By convention every subpatch, or patch file, is simply called patch, with the Stage Patch representing our topmost project, containing all other patches and modules (it's possible to have patches outside the Stage Patch though). And the process of patching is arranging and connecting modules.+In the very end, the stage patch consists of just thousands of modules, all linked to other modules. However none could overlook this or handle it in a suitable way. That's why functional units are bundled together as subpatches which expose only a limited set of ports and parameters. By convention every subpatch, or patch file, is simply called patch, with the Stage Patch representing our topmost project, containing all other patches and modules (it's possible to have patches outside the Stage Patch though). And the process of patching is arranging and connecting modules.
  
 ==== Modules ==== ==== Modules ====
Line 56: Line 57:
 You're still with me? Let's do it. Here is your first patch: You're still with me? Let's do it. Here is your first patch:
   - open a new patch file as decribed above (preferably select File/New from the top menubar)   - open a new patch file as decribed above (preferably select File/New from the top menubar)
-  - in the blank patch window, right-click somewhere, select 'Insert Module', and from the section 'GL' select the 'Window' module. Click again somewhere in the patch window to place the module there - it will look like this: +  - in the blank patch window, right-click somewhere, select 'Insert Module', and from the section 'GL' select the 'Window' module. Click again somewhere in the patch window to place the module there - it will look like this: \\ {{:ai:window.png |}} \\ If you click the button labelled ''Window'' then a new window will open, showing a black canvas.\\ \\ 
 +  - Next, we want to make the background other than black. Insert a 'Rectangle' module from the 'Generator' section, and wire its yellow output port into the window module's input port: \\ {{:ai:window_2.png|}}  \\ the output window now shows a white rectangle in the middle. You might want to change the only parameter in the 'Rectangle' module from 'Letterbox' to 'Stretch', to make the whole window white. 
 +  - Okay, let's bring in some colour. Insert an 'RGBA' module (section 'Colour'), wire its blue output port to the blue input port labelled 'Color' of the Rectangle module, and play with the colour picker or the parameter pots - now you can adjust the colour of the output: {{:ai:colour.png|}}  
 +  - Now we want to show some text. We want to generate something for the output, hence let's look in the Generator section. We'll find a 'Text' module which looks rather promising. Lets insert it into our patch. It has a yellow output port which we wire to our window module. {{:ai:text_1.png|}} 
 +  - But as soon as we connect the yellow port, the output window turns black - because each input can take only one output (thus the connection to the coloured rectangle went lost), and because the Text module has no text input to display. Let's proceed with this. From the 'Text' section, insert a 'Notepad' module. Wire its white output port into the white 'Text Input' port of the Text module, and finally type something into the text area of the Notepad module. As soon as you hit Enter, the text appears in the output window: \\ {{:ai:text_2.png|}} 
 +  - However, it looks like the text always starts in the center of the window. If we resize the window, the text resizes and repositions accordingly. In order to fix this, we obviously need to reposition the rendered text output. The module 'Translate' from the 'GL' section does this for us - insert it, and rewire the connetcions so that it sits between the Text module and the Window module. \\ {{:ai:translate.png|}} \\ Now you can comfortably adjust the text position with the XYZ knobs in the Translate module. 
 +  - In order to finally combine the generated text with our colourful background we need to somehow combine both video streams. The module 'Render Merge' from the GL section does this for us. Insert it, rewire the video stream so that the background goes into input 1, the translated text into input 2, and the output is sent to the window. The result should finally look like this: \\ {{:ai:text_merged.png|}} 
 + 
 +Congratulations! You created your first own Ai patch. Was it really that complicated? 
  
  
ai/patching_basics.1539443214.txt.gz · Last modified: 2018/10/13 15:06 by icke_siegen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki