Menu
Login
Language
DE EN FR ES IT CZ

Search Result

  • RE: Animated background - and character "losing" color. Questions from a newcomer to both visionaire and game making at large

    I am not sure Shaders can be bound to Characters (otherwise a Grayscale-Shader would be one of the easiest Exercises imaginable), because in Visionaire 4 this was not possible and there was not much Demand to change that, so I guess that won't work in 5 either, but please correct me if I am wrong, it would be a Blast.Alternatively, you could -- maybe, just maybe -- use an Effect like I have shown here (https://www.visionaire-studio.net/forum/thread/lichtkreis-simulieren/2/#15) but instead make it a Circle or rather a vertical Ellipse closely around the Player within which everything becomes gray, while everything around it remains as colorful as it is. I know that is not what you asked for, but it could be an interesting Alternative, kind of implying that the Protagonist's Tristesse is spreading and infecting what is close around him.Concerning the Eyes on the Building, you do not need an animated Background for that, and neither an animated Object. What you need for that is some LUA, a Script that will make the Pupils (as separate Objects on empty Eyes) rotate in such a Way that they are aligned towards the Vector between their Origin and the Player Position, or similarily have them move with some Sine-Cosine-Magic towards that (which probably isn't too hard either, but would go above my Head, I am not good with Circle-Calculation).

    by caligarimarte, 9 years ago

    5
    0
    caligarimarte 9 years ago
  • RE: Shader-Texture not seamlessly tileable?

    Okay, thank you very much, SimonS! In that Case, I should indeed just switch over to Visionaire 5 (as that transparent Line at the Bottom and the Right you mentioned is most probably exactly what leads to my Problem), but I have a hard Time understanding how to implement Shaders there, i.e. utilizing the new "Shader"-Tab at the Top. The Problem is not writing the Shaders, I guess, but knowing how to activate them ingame, or how to apply them to just a specific Object. I have implemented the updated Shadertoolkit (i.e. shadertoolkit10.lua) into my Project to try in Visionaire 5, but alas to no Avail. Is there any Tutorial, Wiki-Page or Example-File that would help me getting re-started with that new Shader-Tab (in German or English)?None the less, since you have implicitly asked for it, here is my Script (the Object "TestClouds" being a 2048*512 px tilable Cloud-Texture):shader_effects["Wolkenmaske"] = {shader=basic_fsh..[[ uniform float daytime; const vec2 ar = vec2(1.6, 0.9); //ASPECT RATIO float cloudspeed = 0.0075; vec2 cloudsize = vec2(0.33); float cloudsoftness = 2.3-texcoord.x*2; vec2 cloudmoveA = vec2(0.5, 0.0) * time * cloudspeed; vec2 cloudmoveB = vec2(-0.2, 0.0) * time * cloudspeed; vec2 Versatz = vec2(0.75,0.75); void main() {  vec2 uv = cloudsize * texcoord.xy;  vec4 colA = texture2D(iChannel0, fract(vec2(1.00) * uv.xy +cloudmoveA ) );  vec4 colB = texture2D(iChannel0, fract(vec2(1.11) * uv.xy +cloudmoveB +Versatz ) );   //ALTERNATIVELY CLAMP TEXTURE-COORDINATES -- very imperfect workaround... // vec4 colA = texture2D(iChannel0, clamp( fract( vec2(1.00) * uv.xy +cloudmoveA ) ,0.0,0.99928) ); // vec4 colB = texture2D(iChannel0, clamp( fract( vec2(1.11) * uv.xy +cloudmoveB +Versatz ) ,0.0,0.99928) );    float wolkentransparenz = ((1.0+cos(daytime*0.5*3.142)) );  float subtraction = clamp(colA.r-colB.r, 0.0, 1.0) * wolkentransparenz;  vec4 finalColor = vec4( vec3(1.0) , pow( subtraction , cloudsoftness) );  float w = (0.75 - texcoord.x) *4;  float h = ( (daytime-0.21) - texcoord.y) *1;  float Sun = 2* pow( 1.0 - clamp( (sqrt(pow(w,2)+pow(h,2))/(0.5)), 0.0,1.0) , 10);  finalColor.a = abs(finalColor.a - Sun);    gl_FragColor = finalColor; } ]]} ----------------------------- local eff="Wolkenmaske" local obj = "TestClouds" local id = 2 ----------------------------- shaderAddEffect(eff) shaderRemoveEffect(eff) shader_effects[eff].num.strength=1 bind(eff, "time", field("shader_iTime")) bind(eff, "daytime", field("Values.Daytime.Int")); function updateWeltbildsonne()  shader_effects[eff].num.daytime = Values.Daytime.Int * 0.0125; end shaderSetOptions({{shader = shader_effects[eff].num(), comp_dst=5, comp_src=4 }}, id) Objects[obj].ShaderSet = id registerEventHandler("mainLoop", "updateWeltbildsonne") Thanks for the Help.

    by caligarimarte, 9 years ago

    10
    0
    caligarimarte 9 years ago
  • RE: Shader-Texture not seamlessly tileable?

    First of all I need to see the shader you are using, since you said you use procedural clouds. In the version 4 the engine had a transparent line at the bottom and the right, that's no more the case in 5. You can not change the wrapping mode of textures currently. Also note that repeat does not work on all gpus with non-power-of-two textures. 

    by SimonS, 9 years ago

    10
    0
    SimonS 9 years ago
  • RE: Shader-Texture not seamlessly tileable?

    Could the Texture's Wrap-Mode possibly be set via shaderSetOptions?Because it usually includes comp_dst and comp_src, with Values correlating to certain GL-Composition Methods (like 4 = GL_SRC_ALPHA , and 5 = GL_ONE_MINUS_SRC_ALPHA ).So if there was some other Method one could write into shaderSetOptions, like a hypothetical "comp_wrap=1" to activate "GL_REPEAT", then maybe I could get rid of the Seam.But there is so utterly little Examples of or Documentation on Shaders in Visionaire, I have no Idea what I could possibly write in there. So, does anyone have a Clue?(Or maybe there is some Line in the Shader-Toolkit-Script that I have to change?)

    by caligarimarte, 9 years ago

    10
    0
    caligarimarte 9 years ago
  • Shader-Texture not seamlessly tileable?

    Yesterday I wrote a little Shader to produce Clouds through two scrolling Textures, and I made the Texture tileable by using "fract(...)" for the Coordinates, which usually works well in other Engines, but here I get an ugly Line at the Texture Seam:https://youtu.be/Jba5bDB3WnsI tried clamping the Coordinates to cut off that Line, but that didn't look good and didn't work well either. I looked up some GLSL and considered glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT), but if that even can be used, I don't know where and how to implement it (as it won't work at the Beginning of the Shader-Script).Somewhere on the Internet I found a supposed LUA-Line for a different Engine, which goes like this: APreviouslyDefinedSprite:getTexture():setTexParameters(gl.LINEAR, gl.LINEAR, gl.REPEAT, gl.REPEAT) ... but if that somehow works in Visionaire, I wouldn't know how.I am still using Visionaire 4.2 instead of 5 (and running it in 4.2.5 looks the same, but I cannot really trust the Editor/Player there to truly show me 4.2.5 and not 4.2), so I don't yet know whether it would work there -- but Shaders work different in 5 and I would at first have to wrap my Head around how to even just see whether it would possibly work better in 5.So, does anybody ou there have a Clue how to get rid of that ugly Texture Seam?

    by caligarimarte, 9 years ago

    10
    0
    caligarimarte 9 years ago
  • RE: Lichtkreis simulieren?

    Vielleicht hilft das hier, ein ähnlicher Effekt den ich vor ein paar Tagen für mein Spiel gemacht habe: shaderRemoveEffect("CaveLight_01") shader_effects["CaveLight_01"] = {shader=basic_fsh..[[  const vec2 ar = vec2(1.6, 0.9); //ASPECT RATIO  uniform float ErlPosX;  uniform float ErlPosY;  uniform float ErlSize;  void main()  {   vec2 pos = vec2( ErlPosX , (1-ErlPosY) + (ErlSize*0.67) );   float Flicker = sin(1.0+iGlobalTime*21.5397)*0.0051235 + cos(7.0+iGlobalTime*33.31579)*0.0123;   float Size = (2.0 * ErlSize) + Flicker;     float w = (pos.x - texcoord.x) *ar.x;    float h = (pos.y - texcoord.y) *ar.y;    float Circle = pow( 1.0 - clamp( (sqrt(pow(w,2)+pow(h,2))/(Size)), 0.0,1.0) , 3);   float CircleB = pow( 1.0 - clamp( (sqrt(pow(w,2)+pow(h,2))/(Size)), 0.0,1.0) , 5);     vec3 color = vec3(1.0, 0.67, 0.33);   vec3 Schatten = color * (1.0-CircleB);   vec3 Schein = color * Circle;     vec3 render = texture2D(iChannel0, texcoord.xy).rgb;   render.rgb = render.rgb - Schatten.rgb; //SUBTRACT   vec3 result = vec3( vec3(1.0) - ((vec3(1.0) - (Schein.rgb)) * (vec3(1.0) - render.rgb)) ); //SCREEN     gl_FragColor = vec4(result.rgb , 1.0);  } ]]} shaderAddEffect("CaveLight_01"); bind("CaveLight_01", "ErlPosX", field("Erlene.Position.x")); bind("CaveLight_01", "ErlPosY", field("Erlene.Position.y")); bind("CaveLight_01", "ErlSize", field("Erlene.Size")); function updateErlPos()  shader_effects["CaveLight_01"].num.ErlPosX = Erlene.Position.x /1920;  shader_effects["CaveLight_01"].num.ErlPosY = Erlene.Position.y /1080;  shader_effects["CaveLight_01"].num.ErlSize = Erlene.Size *0.01; end registerEventHandler("mainLoop", "updateErlPos") [EDIT: Zeilen 37 und 38 dividieren durch 1920 & 1080 -- das ist offenkundig die Auflösung meines Projektes. Diese beiden Werte müsstest du deinem Projekt anpassen.]Wobei "Erlene" (der Name meiner Spielfigur) zuvor in einem anderen Definitions-Script für gobale Variablen definiert worden ist als: Erlene = getObject("Characters[Erlene]")  Das sollte dann so aussehen: https://youtu.be/6h5q_p5deHE(Der äußere Kreis für Dunkelheit benutzt Blendmode "Subtraktion", der helle Lichtschein selbst benutzt "Screen", aber das kann man natürlich auch umschreiben.)Oh, und anbei:Das neue GUI gefällt mir auch nicht so sehr. Aber wahrscheinlich ist das auch einfach nur eine Gewohnheitssache.Keine Sorge, geht nicht nur dir so, und ehrlich gesagt, die neue Benutzeroberfläche ist für einen regulären Laptop-Nutzer wie mich immer noch objektiv schlechter weil weniger kompakt als das alte Design. ;)

    by caligarimarte, 9 years ago

    18
    0
    caligarimarte 9 years ago
  • RE: Animated background - and character "losing" color. Questions from a newcomer to both visionaire and game making at large

    1. Is it possible to use an animated background for the scenes? (I guess this is a question i easily could answer by trying, but as the animation only exist in thought it would yet be a theoretical test and a hypothetical answer at best.) Or can i animate within, so that objects follow the player? What i have are a cityscape that will substitute for one scene of the adventure - and i want to make the buidling have cartoon eyes that follows the main character as he moves around in the scene. the background image itself is always static. But you can add objects and animations on top of that. So yes this would be possible. 2. The main character will during the story progress from a child to an adult, but not change his apperance significally - therefore i guess that is simply a matter of scaling during the scenes - right? The thing is, i would like to make him fade out of colour during the adventure - so that as a youngster he will be full of colours, but as the story progresses he will become partially greyis and at the end entirely grey in a colorful world, can that be achieved without having to change the character animation (could it be made as the character animation) or am i just hoping for something that is well beyond my skills as a enthusiast? Thats also possible. More easily with extra outfits, but i guess you could do the color changing also with Shader effects bound to your character. Buts thats more advanced stuff if you dont know the GLSL Shader language.

    by sebastian, 9 years ago

    5
    0
    sebastian 9 years ago
  • [Solved] Game Freezes On Notebook

    Hello,I'm using VS 4.2.5 and have been working on my game since a year now. It runs without problems on my Win7 development desktop pc both in the editor and as a build. Also on other test machines, which are a other Win7 desktop pc and a Win10 pc, it runs without errors.Now I tried it the first time on a notebook with a non dedicated video card. It is a Dell Latitude with Win7 and a i5 CPU with 8GB Ram and a Intel HD 4000 graphics. Due to the Visionaire minimum system requirements, it must have at least 512MB shared VRAM. The system settings on the notebook show, that the HD 4000 has 64MB dedicated memory and 1632MB shared memory. The game starts without problems in the editor and as well as build game.But if I click on certain objects in the game, or when certain text should show up, the game freezes. These bugs are reproducible, but I have no idea what causes them, because on all other test machines it runs well. Attached is the messages.log. 18:07:56: Engine Version: 4.2.5 (Build 1185 from Build date: Nov 24 2015)18:07:56: Time needed for preloading game: 40 msec18:07:56: Initializing graphics interface. Surface size: 1280x720, render size: 1280x72018:07:56: Using Framebuffer with texture.18:07:56: log: No errors.18:07:56: log: No errors.18:07:56: log: No errors.18:07:56: log: No errors.18:07:56: log: No errors.18:07:56: log: No errors.18:07:56: log: No errors.18:07:56: log: No errors.18:07:56: log: No errors.18:07:56: log: No errors.18:07:56: log: No errors.18:07:56: log: No errors.18:07:56: log: No errors.18:07:56: log: No errors.18:07:56: log: No errors.18:07:56: log: No errors.18:07:56: log: No errors.18:07:56: log: No errors.18:07:56: log: No errors.18:07:56: log: No errors.18:07:56: log: No errors.18:07:56: red, green, blue, alpha, depth size: , doublebuffer , accelerated 18:07:56: Serialization finished. Needed time: 102 ms18:07:56: SetupParents finished. Needed time: 2 ms18:07:56: SortLinks finished. Needed time: 0 ms18:07:56: Interfaces loaded. Needed time: 4 ms18:07:56: Scripts loaded. Needed time: 9 ms18:07:56: Time needed for loading game: 840 msec18:07:57: log: ERROR: 0:13: 'assign' :  l-value required "color" (can't modify a uniform)18:07:57: log: No errors.18:07:57: log: Attached fragment shader is not compiled.18:08:13: Error: can't open file '' (error 0: der Vorgang wurde erfolgreich beendet.)18:08:13: Error: Could not open file ''18:08:13: Error: Accessing buffer of memory file but buffer does not existHave the bugs something to do with the few dedicated video memory on the notebook, or is it something else?Would be great, if somebody could help me.Thanks,Marc

    by markus-creative, 9 years ago

    3
    0
    markus-creative 9 years ago
  • RE: Search bar: combine keywords?

    Hi everyone,Is it possible to combine 2 keywords in the seach bar of the site? I've been trying this several time, it would be convenient.Example: if I want to search something about shaders, and about light, nothing is returned whatever I try with:light shader"light shader"light+shaderlight +shader(ps: I was trying to find out if there is a shader of light that can follow the current character, in order to create a kind of halo around him)This is still a big bug with the forum, making it impossible to search for anything useful.You can currently only search for a single word on the EN version of the forum.Any help would be great, I've got lots of new questions and can't search for answers. :)cheers

    by andiliddell, 9 years ago

    1
    0
    andiliddell 9 years ago
  • RE: html5 game size in browser

    I noticed care need to be taken loading scenes, stuff seems to be loading a lot slower, so the next scene loading can be quite uglyI fade in and out is probably a good idea and have animation and sound pre loadedOr if you are creating specifically for html5 only keep that in mind & try to optimize as much as possible for it. Lower resolutions. Less animation frames. Less openGL shader effects. Webp format for images & animations, etc.Browser based games should be fairly small in general.

    by afrlme, 9 years ago

    8
    0
    afrlme 9 years ago