Search Result

  • RE: 3D Characters cause lag

    For Visionaire it's okay as I think, because the 9200 is at a quarter of the HD4000, that can even display the shader effects I made shortly ago at real time. So if you are using only 2d stuff, there won't be any problem.

    by SimonS, 11 years ago

    3
    0
    SimonS 11 years ago
  • RE: Beginning with LUA

    hehe.I found lua script to be a little illogical at first also.First lesson: Lua is not an acronym, or abbreviation. It is simply lua, which means [b]moon[/b] in Portuguese.Once you understand the basics & the syntax of the Visionaire Studio data structure tables then you will find it's a lot simpler than you think. It's certainly no Visual Basic for simplicity, but easy enough to pick up, even if you've dabbled in basic html web code.I liked the phailed.me blog, it has some nice & easy to follow explanations & examples, & it even gives you a list of things to try doing with what you have learned thus far - if you have been going through each section from the first one.If you want complicated then you should look at the openGL code. The documentation for that is very limited & what little there is makes no sense. I get general idea of what some things are for/do, but it's unlikely I'll ever be able to write my own custom shader scripts unless I learn C.If you want a fun & interactive way of learning lua - well sort of - then I suggest installing the löve2d game engine framework, sublime text 3 (paid or evaluation - evaluation is indefinite) & adding the build script listed on their wiki & then have a go at some of their basic tutorials. When you hit ctrl+b or select build in the menu, then it will build whatever you have written into a workable.exe file. It's quite fun.Check it out here: http://love2d.org - there's no IDE like VS for the engine, you have to work in a text editor.Finally: I have begun working on a basic guide to Lua script myself, with simple explanations, code snippets & screenshot of what I wrote in sublime text & what was printed to the console log when I hit build.http://wiki.visionaire-tracker.net/wiki/Basic_lua -- this is old page at the minute & needs replacing with introduction text & an index of what I will be covering, plus links.http://wiki.visionaire-tracker.net/wiki/Basic_lua:_Operators -- this is only page I've written so far & is currently missing the mathematical operators.

    by afrlme, 11 years ago

    34
    0
    afrlme 11 years ago
  • 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, 11 years ago

    24
    0
    afrlme 11 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, 11 years ago

    24
    0
    afrlme 11 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, 11 years ago

    24
    0
    afrlme 11 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, 11 years ago

    24
    0
    afrlme 11 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, 11 years ago

    24
    0
    afrlme 11 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, 11 years ago

    24
    0
    afrlme 11 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, 11 years ago

    24
    0
    afrlme 11 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, 11 years ago

    24
    0
    afrlme 11 years ago