Search Result

  • RE: Bind shader affected Object to cursor?

    thanks, ill do some reading as event handlers are something im not really up on, but just wanted to clarify in case it makes a difference... Shouldn't it be irrelevant that there's an animation involved? The cursor image, both active and inactive, will be a single frame. The shader effect will be applied to a [i]Scene object[/i]'s image, so i just need to make that object stick to the cursor hotspot rather than its active or inactive animations, right?The cursor position is calculated from its 'Hotspot' centre, and the object image (with the shader applied) has its position calculated from the top left (right?) so i just need to make them tally up?I work better visually, so maybe this will help?

    by Ninjapie, 9 years ago

    7
    0
    Ninjapie 9 years ago
  • RE: Bind shader affected Object to cursor?

    When the shader affect can be applied to an animation i would guess it would work when you move the an object animation to cursor position. But i never tested it

    by sebastian, 9 years ago

    7
    0
    sebastian 9 years ago
  • Bind shader affected Object to cursor?

    Afternoon all, hoping someone can help me. Really new to all this and whilst i vaguely understand bits and pieces of lua script im struggling.I've created a scene where the cursor is a magnifying glass, with the 'Glass' part transparent, and when the cursor enters an object area it 'reveals' a clue using the mouse over action parts. Easy as pie, but then i had the idea of making the magnifying glass a sort of hand held electronic scanner, using the Shader tv effect on the transparent screen. However, you cant use the shader on a cursor (as far as im aware) and even if you could it would affect the whole cursor image rather than just the screen part. Next idea was to create a nearly transparent object on the scene, apply the shader effect to that and bind its position to the position of the cursor..so that it looks like the scene object is the 'screen' part of the cursor and you can look though it to the scene underneath.Rooting through the forums i found this thread ([url=http://www.visionaire-studio.net/forum/thread/characters-shadow/]Character's Shadow[/url]) which nearly does the same thing, but it binds character to character (i think). Anyone got any ideas?

    by Ninjapie, 9 years ago

    7
    0
    Ninjapie 9 years ago
  • RE: Make mirror and reflections

    Someone else recently asked for something similar to this on here. SimonS provided an openGL shader script for it, but I don't know exactly how it works as it's written in C / GL language.Here's the link to the thread: http://www.visionaire-studio.net/forum/thread/shader-question-solved-/ I can confirm the script works, but I have no clue how to modify it.Alternative solution to mirror is to create a duplicated character of you active character with mirrored (opposite animations assigned to their directions - so north would be same as your south animation & west would be the same as your east animation but flipped horizontally & so on). How you would then implement it into the mirror itself... I'm not sure, but I would probably layer something over the mirror with part of the background then place the mirrored character behind that.

    by afrlme, 9 years ago

    13
    0
    afrlme 9 years ago
  • RE: "Play Sound" is broken?

    Nothing in the log as well:[code]23:34:32: Engine Version: 4.2.5 (Build 1186 from Build date: Nov 29 2015)23:34:32: Time needed for preloading game: 9 msec23:34:33: Initializing graphics interface. Surface size: 320x180, render size: 320x18023:34:33: Using Framebuffer with texture.23:34:33: red, green, blue, alpha, depth size: , doublebuffer , accelerated 23:34:33: Serialization finished. Needed time: 14 ms23:34:33: SetupParents finished. Needed time: 0 ms23:34:33: SortLinks finished. Needed time: 0 ms23:34:33: Interfaces loaded. Needed time: 1 ms23:34:33: log: WARNING: Output of vertex shader 'texcoord' not read by fragment shader23:34:33: no uniform strength in shader23:34:33: Scripts loaded. Needed time: 14 ms23:34:33: Time needed for loading game: 106 msec23:34:33: Added controller: PS4 Controller23:34:33: Added controller: PS4 Controller23:34:33: no uniform pass in shader[/code]Maybe it is a Mac issue, I don't know.This is the two files I am using:https://dl.dropboxusercontent.com/u/2732399/platform_out.ogghttps://dl.dropboxusercontent.com/u/2732399/platform_out.opus

    by fulviov, 9 years ago

    28
    0
    fulviov 9 years ago
  • RE: SHADER Question (Solved)

    There are some requirements for the shaders. If you don't understand C it might be hard to get through. Try this:[code]shader_effects["reflect"] = {shader=basic_fsh..[[#define texture iChannel0vec3 overlayColor = vec3(.5,1,1);void main(){vec2 uv = texcoord.xy; float sepoffset = 0.005*cos(iGlobalTime*3.0); if (uv.y > 0.3 + sepoffset)// is air - no reflection or effect gl_FragColor = texture2D(texture, vec2(uv.x, uv.y)); else { // Compute the mirror effect. float xoffset = 0.005*cos(iGlobalTime*3.0+200.0*uv.y); float yoffset = ((0.3 - uv.y)/0.3) * 0.05*(1.0+cos(iGlobalTime*3.0+50.0*uv.y)); vec4 color = texture2D(texture, vec2(uv.x+xoffset , (0.6 - uv.y+ yoffset))); // vec4 finalColor = vec4(mix(color.rgb, overlayColor, 0.25), 1.0); gl_FragColor = color; }}]]}shaderAddEffect("reflect")[/code]

    by SimonS, 9 years ago

    8
    0
    SimonS 9 years ago
  • RE: SHADER Question (Solved)

    Thanks Unreal. I am familiar with your demo- love it, BTW!Thanks Lee- yeah, I started using Simon's ripple shaders as a placeholder applied to objects. As there is no pre-made reflect shader, I had been planning to add a transparent animation for the reflection made in Sqirlz Morph, plus a mirrored character, adjusted, following the current character with a loop.But, this became pretty graphically intensive, especially when I tried to add additional characters- I hit a wall and reversed.Mucking around in the shader script, however, led me to a link to Shadertoy and then the water reflection script. As a layman; reflection seems like a simple proposition for the Shader Toolkit, right? In the roughest sense we are just duplicating the image and flipping it on the y axis.Unfortunately, I haven't had any luck implementing it! That may have to do with me not knowing what I'm doing.:DMaybe this is impossible with the current vers of the toolkit?Thanks again, guys.

    by joemid, 9 years ago

    8
    0
    joemid 9 years ago
  • RE: SHADER Question (Solved)

    [quote]Sorry, I'm not answering your question but there is a similar shader FX made by SimonS. I made a downloadable demo project for the visionaire community (or just look at the youtube video), hope this help. See the link :[/quote]Well he can create the ripple effect using the shader toolkit. There are 4 ripple effects available that you could apply to a scene object. Make sure you add the water image into a scene object. The reflection though you might have to do by adding the reflections directly into the water image itself, either as a static image or as an animation, if the scene changes at all.I believe it is possible to create custom shader scripts too, as Simon provided an example of one ages back after he first implemented the shader stuff into the engine. I don't think it's as simple as copy / pasting an existing shader script into it though. You may have to rewrite certain things in the script to get it to work.

    by afrlme, 9 years ago

    8
    0
    afrlme 9 years ago
  • RE: SHADER Question (Solved)

    Sorry, I'm not answering your question but there is a similar shader FX made by SimonS. I made a downloadable demo project for the visionaire community (or just look at the youtube video), hope this help. See the link :

    by unreal, 9 years ago

    8
    0
    unreal 9 years ago
  • SHADER Question (Solved)

    Saw this on Shadertoy. Any help as to how to implement into the Shader Toolkit?[code]uniform sampler2D texture;uniform vec2 resolution;uniform vec3 overlayColor;void main(){vec2 uv = gl_FragCoord.xy / resolution.xy;if (uv.y > 0.3)// is air - no reflection or effect{ gl_FragColor = texture2D(texture, vec2(uv.x, uv.y));}else{ // Compute the mirror effect. vec4 color = texture2D(texture, vec2(uv.x, 0.6 - uv.y)) vec4 finalColor = vec4(mix(color.rgb, overlayColor, 0.25), 1.0); gl_FragColor = finalColor;}}[/code]Thanks!

    by joemid, 9 years ago

    8
    0
    joemid 9 years ago