matriax's Forum Posts

  • Fire Flames by me:

    And Gigatron posted another fire efect here:

  • This is how looks in my preview, but when i run looks like in my screnshots.

    The effect runs well on Firefox, Chrome and NW.js on Opera appears a blue square.

    You said this is taken from my demo, but from where? The live demo? Your Construct2 preview or runnig? What browser,etc...

    I'm using the Beta 209 of Construct2.

    When you runs the effects appears ok? ¿?

    Edit: This is a videos that how looks on firefox: https://instagram.com/p/5IDK4xAL3i/

    (Sorry for the low quality)

  • Ported from shadertoy:

    https://www.shadertoy.com/view/4slXz2

    Screenshot:

    Added more than 25 Parameters you can adjust:

    Note: Remember to use negative values for fun results! <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    Added additional things like the option to enable/disable each flame individualy and a final blend.

    Download Effects and Demo:

    https://dl.dropboxusercontent.com/u/659 ... e/fire.rar

    Live Demo:

    https://dl.dropboxusercontent.com/u/659 ... index.html

  • Ok here is the file to C2 users.. Study change run, run run ... until you understand what you do.. and you win the fight !

    http://gigatron3k.free.fr/html5/C2/FX/burning.rar

    Have fun ..

    Oh great!

    I ported my first shader passing more than 25 variables and adding a few more. I'm working with the example .capx . I guess will be posted soon on the Effects forum <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    Here a video of the example fille showing a variation of flames:

    https://instagram.com/p/5IDK4xAL3i/

    Edit: Posted here: viewtopic.php?f=184&t=149940

  • matriax nope :\ I chose another method (spritesheet animation lol) but i will try another way to make with WebGL...

    I found another fire effect made "by CPU" http://www.computableminds.com/jquery-p ... rator.html but is TOO HEAVY for anything less powerfull than nasa-pc xD

    tatogame I see! Well i leave the other flame code and search for one more easy, and after 2 hours i get this one working:

    https://www.shadertoy.com/view/4slXz2

    I'm passing now all the variables to the .xml and create the example and live demo so i will publish today in the effects if nothing happens <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink"> .

  • tatogame Have you get the effect working? I tried myself changing the noise line and other things but nothing, i only have as result a big and beatyfull black square after an hour editing... at least now no get errors XD :S

    Gigatron Is there any tutorial/doc that how to pass from shadertoy to C2 ?

    Edit: Oh wait, after some changes i start to see something orange inside the square effect <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz">

    Edit2: Nothing, can't get working <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad"> this was my try (.fx, .xml and .capx):

    https://dl.dropboxusercontent.com/u/659 ... e/fire.rar

    If somebody can tell me what is wrong...

  • Normal Map Extended v1.01 (Multiple lights added)

    Download v1.01 (Includes the effect and demo .capx)

    https://dl.dropboxusercontent.com/u/659 ... d_v101.rar

    Live demo:

    https://dl.dropboxusercontent.com/u/659 ... index.html

    Instructions inside the .capx file.

    Every light is individual for each texture, so you can enable/disable from the parameter "Light State" 0=Off / 1=On . For example in case i want the lantern light only appears on walls, not in the floor, no problem, i disable for the textures i not want to show and ready!

    -

    The next to test is the spotlight, to deform the light depending from an origin point. As always i gill give a try, if works i will update if not i will pass to another thing, that i guess will be try to add some specular light.

    -

    No more, Enjoy!

  • Ok, i get 3 lights working, in total about 40 variables to adjust XD

    Here an image of 3 lights wotking at the same time:

    I have to organize to see all correct and the people can understand all well. Also i have to find some way in the .xml and .fx to set active what lights the user want and make it individual for each texture to get maximun personalization, but still i don't know, actually the three lights are always activated :S .

    Yes, everyboy can set to 0 all the properties of the other lights and done, but if you want to test and enable/disable a light can be frustrating. The idea is made something in the .xml/.fx , if not i guess i can add a parameter with nothing to add whathever and from C2 simple say: Is Parameter X set "yes" ? set effect bla bla bla...

  • BAM! Multiple Lights!

    Here the video:

    https://instagram.com/p/5Ac5TUALyb/

    Used one for the player and other for the mouse as lantern.

    Stucked more than an hour in the fucking "for" after get one light working was simple touching some variables until get the second light working.

    Only passed 3 variables for the light2 X/Y/Z for the rest uses the same atributes than the light1. Tomorrow with time and calm i will organize the .fx and .xml to add 3 lights that i think will be enough for now. If i discover how the "for" works and the xml allows maybe i can give the decision to the user how many lights use.

  • I'm liking the possibilities that this could open up.... Especially if you can achieve more than one light source - good luck!!

    To add multiple lights seems is:

    vec3 Sum = vec3(0.0);
    for (... each light ...) {
        ... calculate light using our illumination model ...
        Sum += FinalColor;
    }
    gl_FragColor = vec4(Sum, DiffuseColor.a);
    [/code:3ee92w1k]
    
    I will try to do tonight, but i don't know how the hell pass the variables for every light to C2, i guess for every light i will have to create their own float uniform and ther own variable and pass like LightA, LightB, LightC for each one   , this mean a lot of work XD
  • Much thanks for the example but in my case only worked when i changed "on created" by "On start layout".

    I changed my condition of " F_NormalMaps On created" by "on start layout" and is working now. If i delete the condition "On start layout" not works i don't know why :S , but well is solved, thanks! very useful the Pick-Nearest! .

  • Arg! I thought i get it.

    Have in mind that in the game i have multiples tile1,etc... so at the start there is only one Tile1_Normal, is after when all the Tile1_Normal are created due the "container" of each Tile1.

    I say this because i added "F_NormalMaps on created -Z" at i get the last object pinned, but pinned with all the normaltiles XD, seems i'm getting somewhre, i hope....

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Would this work for you?

    for each family1

    pick nearest family2

    > family2 pin to family1

    Not works or i'm doing some wrong, I made this:

    Is correct? The idea looks very good i really hope this works

    I made various changes about family1/2 and nothing all the combinations fail, not pin.

  • Yes, the tiles are sprites and actually all are using the container behaviour.

    Yes, and all this options works with individual sprites but not on families.

    I mean, i have: Tile1, Tile2, Tile3, Tile4, Tile5 and Tile_Normal1, Tile_Normal2, Tile_Normal3, Tile_Normal4 and Tile_Normal5.

    If on start layout i pin Tile_Normal1 to Tile1 all perfect, allways will go with it on moving or whatever but i will have to add one pin for all the objects i want to move.

    So the idea is add the Tile_Normal1 to the Tile1 container and add Tile_Normal1 to the Normal-Map-Family and use an event or something that pin automatically to all the spritees with a container inside the "NormalMap" family. THen i can add Tile_Normal2 to the Tile2 container and do in the other that always be pinned because that one event/condiction that say they have to be pinned.

    I don't know if i explained well XD . I want to pin all the normal maps over all the tiles adding in their respective container and using only one event/condition instead pin every one 1x1.

  • In my game i'm using normal maps for each tile. Using the container and adding the normal map.gfx no problem always that the tile is static. But when it moves?

    Actually i have something like:

    For each "Tile"

    "Tile" is moving -> Set "Tile_Normal" at "Tile" position.

    So only when the tile is moving will update the position, instead of use every tick to get better perfomance with a lot of tiles with normalMaps.

    The problem is that actually i have to do an individual event for each one of movable tiles. So i though, ok, using families, one for "tiles" and other for "Tile normals" . I changed the previous code event and some variations but nothing, always there is something wrong on some site :S .

    Question: Is there any way to do it with families or another way i'm missing?