Login / Registrieren
DE EN FR ES IT CZ

Search Result

  • RE: Anyone checked out the new Shader stuff yet?

    execute a script will, execute any code inside of the code block.You need to make sure you have the shader Toolkit script added as a definition script for the shader functions to work.The Toolkit script provides the initial setup & defines the functions & creates a loop that is used to check for when functions have been executed or custom shader scripts (glsl) have been executed in a function or script.Instead of setting up execute a script actions inside of key inputs or actions try using the console instead. Just hit the TAB key to open the console.then in console type: exec& then after exec you type your script & press enter.quick example:[code]exec shaderContrast(1.1, 3000)[/code]

    by afrlme, 12 years ago

    24
    0
    afrlme 12 years ago
  • RE: Anyone checked out the new Shader stuff yet?

    I've made a temporary fix for the shaderFollowCharacter & shaderStopFollow functions.shaderStopFollow function now automatically resets viewport back to default with same amount of delay that you specified in the shaderFollowCharacter function.You can also specify the easing for shaderStopFollow like so:[code]shaderStopFollow(easeQuintOut) -- stop following character, reset viewport with easeQuintOut easing...[/code]You will need to replace previous shader toolkit with the updated script.In regards to the issue: I tried multiple different methods & could not get it to stop snapping back to zoom value set in the shaderFollowCharacter function, when delay was less than shader_follow.delay. Camera worked normally again after the snap back when I tried viewport function afterwards.

    by afrlme, 12 years ago

    24
    0
    afrlme 12 years ago
  • RE: Anyone checked out the new Shader stuff yet?

    Try adding a 1-10ms pause between stopFollow & viewport.Some of Simon's shader toolkit script needs a few rewrites here & there to improve certain things. He intends to work on it at some point. Some of the stuff like shaderColorize & shaderHue don't seem right to me. To me they should transition/fade between current hue/colorize value to target hue/colorize value & not cycle through all the other colors first. The only way to not get it to go through other colors first is to instantly snap from one hue to another by setting a delay of 0.

    by afrlme, 12 years ago

    24
    0
    afrlme 12 years ago
  • RE: Anyone checked out the new Shader stuff yet?

    yeah cheers. I think I got confused with values because I copied the page from one of the other wiki pages & forgot to edit the values properly. - I often do that to save time on having to type everything out again.Corrected now. :)startTween is used to control & access the shader settings... I assume that code is internal in the engine source code.You can actually manipulate data structure objects with startTweenObject function.here's a few examples...[code]-- 1. fade scene brightness (current scene) to 100% over 3s with easeLinearIn easing...startObjectTween(game:getLink(VGameCurrentScene), VSceneBrightness, game:getLink(VGameCurrentScene):getInt(VSceneBrightness), 100, 3000, easeLinearIn)-- 2. same as above but with direct link to scene & fade down to 25%...startObjectTween(getObject("Scenes[scn001_cell]"), VSceneBrightness, getObject("Scenes[scn001_cell]"):getInt(VSceneBrightness), 25, 3000, easeLinearOut)-- 3. smooth camera scrolling from current position to another...startObjectTween(game,VGameScrollPosition,game:getPoint(VGameScrollPosition),{x=100,y=0},3000,easeBackInOut)[/code]here's some example script SimonS wrote - I'm not 100% sure what it does but it applies some kind of overlay over the screen. You need to understand openGL ES 2.0 code to understand/write scripts like this though I think. I had a little look into it but I found it hard to find any simple examples/explanations to point me in the right direction.[code]shader = {_temporary_=0, num = shaderCompile([[#ifdef GL_ESprecision lowp float; precision lowp int; #endifvarying vec2 texcoord; uniform mat4 mvp_mat;attribute vec2 position; attribute vec2 uv; uniform int pass;void main () { gl_Position = mvp_mat * vec4(position.x,position.y,0.0,1.0); texcoord = uv; }]],[[#ifdef GL_ESprecision highp float; precision lowp int; #endifuniform sampler2D composite;uniform int pass;varying vec2 texcoord;void main() {vec2 m = vec2(0.5, 0.5);float d = distance(m, texcoord) * 1.0;vec3 c = texture2D(composite, texcoord).rgb * (1.0 - d * d);gl_FragColor = vec4(c.rgb, 1.0);}]])}shaderSetOptions("active",shader.num)[/code]In regards to startTween(), have you actually looked over the [url=http://wiki.visionaire-tracker.net/wiki/Shader_(CMS)]shader toolkit[/url] script?Here's a few simple functions I added to the script SimonS wrote.[code]-- * allows you to pan the camera left or right * --function shaderPan(offset, delay, easing, axis) if axis then startTween("shader_offsety", shader_offsety, offset, delay, easing) else startTween("shader_offsetx", shader_offsetx, offset, delay,easing) endend-- * allows you to zoom the camera in or out * --function shaderZoom(zoom, delay, easing) startTween("shader_scale", shader_scale, zoom, delay, easing)end-- * allows you to rotate the screen (w/ degree instead of pi) * --function shaderRotate(degree, delay, easing) degree = (degree / 360 * 2 * 3.14) -- convert degree to pi startTween("shader_rotate", shader_rotate, degree, delay, easing)end[/code]...as you can see I am triggering the openGL functions via the startTween function which contains a command & the relevant data for manipulating the screen/camera/object.

    by afrlme, 12 years ago

    24
    0
    afrlme 12 years ago
  • RE: Anyone checked out the new Shader stuff yet?

    Ah yeah you are right. The values in the shader are in float so 1 = default value. 2 = double. 0 = black. I don't recommend allowing the players to go too high though with most of the effect settings as they can generate some weird effects.* edit: I was wrong. shaderLightness default is 0.Quite a few of the functions have 1 as default. * I recommend not going higher than 0.5 but I think even that is too high as it is showing strange color artifacts with that setting too.

    by afrlme, 12 years ago

    24
    0
    afrlme 12 years ago
  • RE: Anyone checked out the new Shader stuff yet?

    [quote]Really cool stuff!!! Thanks Man!!!![/quote]Was SimonS who implemented the openGL shader into VS & wrote the toolkit script! ;)

    by afrlme, 12 years ago

    24
    0
    afrlme 12 years ago
  • RE: Anyone checked out the new Shader stuff yet?

    I updated the shader toolkit script with some new functions.* shaderZoom() -- simple zoom in/out* shaderPan() -- move camera on horizontal or vertical axis independently* shaderRotate() -- rotate camera using degrees instead of PiI wasn't too keen on the shaderViewport() function because it wasn't as dynamic as setting different delay/easing values for each thing.

    by afrlme, 12 years ago

    24
    0
    afrlme 12 years ago
  • Anyone checked out the new Shader stuff yet?

    Been having a bit of fun messing around with SimonS' Shader Toolkit Script & functions past few days. Added a few new functions to it myself as well. Check out the [url=http://wiki.visionaire-tracker.net/wiki/Compiled_Index_of_Lua_Scripts_for_Visionaire_Studio]Script Index[/url] section of the wiki for the [url=http://wiki.visionaire-tracker.net/wiki/Shader_(CMS)]Shader Toolkit Script[/url] & some [url=http://wiki.visionaire-tracker.net/wiki/Compiled_Index_of_Lua_Scripts_for_Visionaire_Studio#Shader_Toolkit_Functions]example[/url] function pages. I've not finished documenting them all yet mind.It is also actually possible to write your own custom shader scripts & functions, if you have any knowledge of C & openGL ES 2.0; which sadly I currently do not. But there's still plenty of interesting stuff you can do with the toolkit functions alone, or in combination with lua script or action parts. I managed to create a dynamic hand held camera movement effect by combining a couple action parts, a tiny bit of lua script & a loop.I believe SimonS intends to sort out some action parts for setting/changing various shader functions - at some point - so even the none lua savvy users can easily use the shader functions to get visually creative with their games.Anyway check it out if you get a chance, as you can do lots of interesting things like: zoom in/out, rotate screen, pan camera, adjust saturation, hue, contrast, colorize etc etc...

    by afrlme, 12 years ago

    24
    0
    afrlme 12 years ago
  • RE: My features wishes

    Yeah I asked for that in the wunderlist account we created for adding feature ideas, discussing them & bugs etc. I don't see you on the list so I'm guessing Simon or David haven't sent you an invitation yet?I too would very much like to see the ability to affect individual objects, characters & scenes. Would allow for some very creative visual styles &/or puzzles.I do think that we need to add some caps (min/max number caps to some of the shader toolkit values) to prevent it from messing up. Some of the values I've tried have caused strange stuff to happen & on occasion the screen will go black & you have to quit game as it won't let you reset back to default values.I'll send you an invitation to the wunderlist task folder in a minute. ;)

    by afrlme, 12 years ago

    51
    0
    afrlme 12 years ago
  • RE: My features wishes

    Cheers ;)Guess the script I just wrote was pretty pointless then, except for people who want to do it via lua, I guess. Also just created a quick workflow function for setting condition value too. Think I will work on some more example pages for the new openGL shader functions later on. Been having a little fun with that. You get some strange side effects if you go a bit mad with the values.

    by afrlme, 12 years ago

    51
    0
    afrlme 12 years ago