Menu
Login
Language
DE EN FR ES IT CZ

Search Result

  • RE: Visionaire 5 released

    Where can i find the installed action parts? I don't see them after installing. Is it also possible to write own plugins?All the way at the bottom or if you type their names on add.To write your own plugins, go to the folder plugins next to your ved that the engine creates if you install a plugin. There is all the code just copy one folder and edit the files.Will the bug with not working shader exclude state 2 fixed at some point? Pretty please. Please explain. I'm not sure what you mean here.

    by SimonS, 8 years ago

    139
    0
    SimonS 8 years ago
  • RE: Visionaire 5 released

    Nice work.Where can i find the installed action parts? I don't see them after installing. Is it also possible to write own plugins?Some bugs still there.Will the bug with not working shader exclude state 2 fixed at some point? Pretty please. 

    by ke4, 8 years ago

    139
    0
    ke4 8 years ago
  • RE: Heat Haze Shader

    looks great. Its still some kind of magic to me how shaders work. Thanks. In Case a short Explanation of that Magic is implicitly being requested here, I would rather compare it to an Effects Pedal that you plug between your E-Guitar and your Amplifier -- it picks up the basic Signal that your Machine has already processed but will modify it before it reaches the Output. Here, the Shader takes Information from every single Pixel (i.e. Fragment, thusly also called "Fragment-Shader") of the rendered Texture either the entire Screen or just an Object in the Scene, and will modify each single Pixel according to certain Values set in the Shader, before the Texture will then continue to be sent to the Display-Output. (Not the most professional Description, but still.)In the two Shaders I have offered here, the given Cloud-Texture modifies each Pixel of the Screen or just Part of it, but not by changing the Color-Values of the Texture, but primarily by modifying the Texture-Coordinates, distorting the Texture-Coordinates depending on the Brightness of certain Spots of the the Cloud-Texture as it is being projected onto the Texture (and in Case of the Reflection-Shader there is also a simple Inversion (and Offsetting) of the Texture-Coordinates taking Place).If the Effect should look a Bit different, you can just change the Distortion-Texture (and also get some interesting Effects by trying certain Shapes and Contrasts) -- such Distortions can also be generated in Realtime with Sinewave-Function and the like, but producing even just a very simple Cloud-Effect in Realtime with very little Detail can take a Lot of Processing-Power, so you are better off just using a Texture (if your Engine allows it, as is the Case with Visionaire5).Also keep in Mind that with more (and more complex) Operations inside of a Shader or even just with the Size of a Texture to be modified (think Screen-Resolution), the Amount of Operations to be done on the Amount of Pixels can, as it gets bigger, possibly have a negative Input on your Game's Performance. However, so far I have had far less Performance-Issues with Screen-Shaders in Visionaire than in any of the 3D-Engines I have coded Shaders in (i.e. BGE and Unity), so I wouldn't worry about Performance when implementing Shaders.

    by caligarimarte, 8 years ago

    10
    0
    caligarimarte 8 years ago
  • RE: Heat Haze Shader

    Yes, I wrote it. I am not sure what the best Method of learning would be (I cannot recommend any specific Tutorials), but I taught myself coding GLSL (and by Extension HLSL) by looking at other Shader-Scripts other People have uploaded to the Internet -- I looked at them, changed a Value here, changed a Command there, and kept watching what the Effects would be (so, my Understanding of Shaders is admittedly somewhat restricted, but sufficient for most Things I need). There are some rather advanced Shader-Examples on this Site: https://www.shadertoy.com/If you want a slightly more complex Shader ready for Visionaire-Implementation to inspect, play around with and maybe learn from, here is a Reflection-Shader I recently shared on Discord: https://www.dropbox.com/s/k0wg4cyyta9rlr3/reflection_shader.zip?dl=0EDIT: Keep in Mind that if you create your own Mask-Image (for this Reflection-Shader), there should be one Pixel in each Corner that is at Least 0.001 white, or else Visionaire misinterprets the Image-Size. Also keep in Mind that if you change the Mask, the "Mirror_PosY"-Value must be changed to fit the new Image.

    by caligarimarte, 8 years ago

    10
    0
    caligarimarte 8 years ago
  • RE: Heat Haze Shader

    Here is a little Archive for you:https://www.dropbox.com/s/vyniph7yis67v2k/heatwave_shader.zip?dl=0It is one of the most basic Shaders, so a nicely easy Script for you to get started. :)The Archive includes the Visionaire5-Version for the Shader-Toolkit (in Case you don't have it in your Project), one Script which you have to set up as Definition-Script after the Shader-Toolkit, the actual Shader-Code which you have to copy-paste into a new Shader named "HeatwaveShader" in the Shader-Tab, and an "effects"-Folder (with a Cloud-Texture of mine) which you simply copy into your Project-Folder. If all that is done, you should get a very similar Effect on your Screen, once you start the Game.

    by caligarimarte, 8 years ago

    10
    0
    caligarimarte 8 years ago
  • Heat Haze Shader

    Hi,can the current shader achieve something as heat haze effect? Maybe something like this but rather as a wave.https://www.youtube.com/watch?v=Qghhbkk1HqYIt is possible to add custom shader effects, right?

    by ke4, 8 years ago

    10
    0
    ke4 8 years ago
  • RE: Lua Masking

    But that is what my Shader is doing. As I said, the Color-Changing is nothing you necessarily need, implying that you can remove that in that Case. In which Case the Code in the Shader would look like this:  vec4 color = vec4(0.0);   if (uvVarying.x < Health) {     color = vec4(1.0);   }   gl_FragColor = (texture2D (texel, uvVarying) * color);(Strangely, the "<" is sometimes depicted as "<;" here on the Forum. That is wrong.)

    by caligarimarte, 8 years ago

    11
    0
    caligarimarte 8 years ago
  • RE: Lua Masking

    Oh, actually, a similar Question has been posed on Discord, and several Answers were given. In the End, I offered a little Shader with which the Healthbar-Image would get shortened and also change its Color from Green to Red, with a nice yellow Color at Midpoint (a Feature you don't necessarily need). I will copy the Message I originally wrote to Adventure4Life into this Message, with some Adjustments --maybe you'll find it useful.(EDIT #1: Only works if you have the current Shader-Toolkit for V5 already in your Project: https://www.dropbox.com/s/jfu9zac31lbyfjo/shadertoolkit5.txt?dl=0 )(EDIT #2: I am sure sharing Part of a private Conversation is legally and morally fine, since I am only sharing my own Message, which is but a mere Instruction and includes nothing personal.)~~~You surely already have a Health-Value somewhere in your Game. I have named the Value in my Testfile "PlayerHealth" and set it to 100 initially, as full Health. The next Step is adding an Interface-Object (technically it is categorized as a "Button", but you don't have to make it clickable, then it just is Interface-Decoration) and name it "PlayerHealthbar". My Test-Bar was a Texture with a Size of 512*24px, but any Size will automaticaly work. Then you only have to add this as a Definition-Script: eff = "PlayerHealth_Shader" shader_effects[eff] = { shader = Shaders[eff].Compiled } shaderAddEffect(eff) shaderRemoveEffect(eff) Buttons["PlayerHealthbar"].ShaderSet = shader_effects[eff].num.num bind(eff, "Health", field("Values.PlayerHealth.Int * 0.01")) (The last Line in the Lua-Script, where it says "Values.PlayerHealth.Int * 0.01", that is where you can insert your Value-Name instead of "PlayerHealth" if you want.)And eventually add a new Shader under the "Shader"-Tab (I am assuming you are using Visionaire 5, you mentioned having started to try it out) named "PlayerHealth_Shader", and paste this Code into it: #ifdef GL_ES precision lowp float; precision lowp int; #endif uniform sampler2D texel; varying vec2 uvVarying; uniform float Health; void main () {   vec4 color = vec4(0.0);   if (uvVarying.x < Health) {     //color = vec4( mix( vec3(1.0,0.0,0.0), vec3(0.0,1.0,0.0), Health), 1.0);     color = vec4( (       vec3(pow(1.0-Health,0.33),0.0,0.0) +       vec3(0.0,pow(Health,0.67),0.0)     ), 1.0);   }   gl_FragColor = (texture2D (texel, uvVarying) * color); }  There is one Line (#12) I have commented out -- that Line basically mixes the Colors with a dark Ocre in the Middle. I don't suggest you use that, because frankly, it is just an ugly Color, but I inserted it anyway (albeit outcommented) for you to freely choose. Instead, Lines #14 and #15 (could be one Line, but I thought I'd split it into several so you can look at it more easily) use a slightly more complex Way of Mixing where I initially used Powers of Values between 0.25 to 0.5 to give the red and green Values more rounded Falloffs and thusly have a brighter Yellow in the Middle; however, I noticed that, other than with a fully visible and fully green Healthbar, the deep red Color of low Health would never be visible because by that Point the Bar is effectively gone -- so instead, I used Powers of one and two Thirds (0.33 and 0.67) to have an intentionally uneven Color-Falloff: Now, the low Healthbar will still have quite a nice Red-Value, but the Mid-Color is more of an Orange. You can change that if you want, but I think that is the best Way to go.

    by caligarimarte, 8 years ago

    11
    0
    caligarimarte 8 years ago
  • RE: Lua Masking

    I suppose you mean the new but super-undocumented and thusly quasi unknowable Masking-Feature in Visionaire 5? I have no Idea, but maybe whatever you want to get can instead be done just as well with a GLSL-Shader -- in which Case: What exactly is it you'd like to achieve?

    by caligarimarte, 8 years ago

    11
    0
    caligarimarte 8 years ago
  • RE: HTML Performance Optimization

    Firefox alone uses around 200-400mb RAM with just the default page open. Chrome uses considerably much less, but I've been using Firefox more or less since it first came out & I'm too stubborn to switch over to Chrome.Anyway, yeah. While 1080p may look great, it's a massive resource hog; especially as far as 2D is concerned. I recommend 720p or lower. Also probably scrap openGL shader stuff or at least the more intense features/functions/effects. & finally convert png to webp & use that as it will reduce all of your images & animation file sizes down by at least 1/3 to 50% which means less required hdd space / loading times overall, which is a massive help. Lossy webp format will reduce file sizes by a lot compared to lossless webp, but I highly recommend using lossless because there's less chance of weird graphical glitches.As for the change resolution option, I believe it reduces the default game resolution. Theoretically I think it's supposed to scale down the images, animations, way borders, interaction polygons & all of that, but I really wouldn't trust it. I've not tried it in 5.x, but it's never worked as intended in previous versions or at least not worked 100% accurately.https://wiki.visionaire-tracker.net/wiki/Game_Optimizationhttps://wiki.visionaire-tracker.net/wiki/Image_Encoding

    by afrlme, 8 years ago

    18
    0
    afrlme 8 years ago