[effect] Mario Cube FX

0 favourites
From the Asset Store
10 royalty free sci-fi tracks for your indie games, plus 80 sci-fi inspired sound FX
  • can you add function to remove light effect? i dont really need it , but the whole effect is really awesome!

  • can you add function to remove light effect? i dont really need it <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad"> , but the whole effect is really awesome!

    Sure ; Brdf Removed now , (Bidirectional Reflectance Distribution Function ).

    the fx based on triangles :

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

  • Gigatron Since C3 is still in beta, no SDK plugins,etc... and seems until June/July no will be released the "final" version and i had an idea to optimize it maybe if works i will give another try to do some mini game.

    First of all i tested the Roll.X and Rolly.Y and gives a wrong perspective, the base of the model change their position and looks some weird streched. There is no way to really move the camera pos? (X,Y,Z) .

    About the idea to optimize the shader

    I edited the values of the rasterize method in .FX and got the cube no draw some faces and the perfomance was improved even if that faces are not visible.

    If i'm right, there is no way, rotating a cube that you can see more than 3 faces true?.

    So, if you can add some math or check the cube to no render the faces that are not visible, depending how optimized is that code in theory we can have aprox 3x perfomance from the actual results?

    What you think?

    Edited: And even more perfomance because depending the perspective of the game you only will see 2 faces of the cube because the two in back and the one in the floor and in the top no will be visible for example in a Wolf3D.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • matriax

    You can add uniform flag like up,down,left,right,back,front after that check those values by 0== off or 1.0== on;

    example from 2.5d plarformer cube;

     
    if(face_left_right==1.0)  mate = texture2D( samplerFront, uv ).xyz * abs(wnor.x);
    	
    	if(face_up_down==1.0)     mate = texture2D( samplerFront, uv ).xyz * abs(wnor.y);//+ 
    		                           //  texture2D( samplerFront, uv ).xyz * abs(wnor.y);
    	
    	if(zz_face==1.0)          mate = texture2D( samplerFront, uv ).xyz * abs(wnor.z);
    									 
    	if(all_face==1.0)         mate = texture2D( samplerFront, uv ).xyz * abs(wnor.x)+ 
    							         texture2D( samplerFront, uv ).xyz * abs(wnor.y)+
    								     texture2D( samplerFront, uv ).xyz * abs(wnor.z);	
        }	
    
    [/code:33n8l88a]
    In the mario cube case you can ignore face with adding colors in place of texture;
    
    [code:33n8l88a]if (mc == asn.x) {
            return mix(texture2D( samplerFront, uv*vec2(0.25,0.33)-vec2(-0.25,-0.335) ).xyz, vec3(0.,0.,0.), ln.x)*brdf;
        }[/code:33n8l88a]
  • matriax

    Sorry but no time here i am working to finish trailblazer;

    If you need help i can collapse each face to on/off but next week ;

    Regards

  • Gigatron I see don't worry, i will try to do my own tests with this and if i can achieve what i want. Thanks !

  • Really Interesting Gigatron

  • Gigatron

    Hi, one more thing XD

    I'm finally doing the topDown game i had in mind and already did some walls like TeleGlitch game,etc...:

    Subscribe to Construct videos now

    Can you add the camera position to the shader that we talked in previous posts? As i said the Roll-XY not worked correctly, still gives a wrong perspective to do this:

    Subscribe to Construct videos now

    (in this example uses rotation, but with Roll-XY still do some weird things)

    This will allow me do walls and other things real 3D to give a perfect feel <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz">

    And no rush, just saying to have in mind !! And again thanks for your time/work! <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

  • matriax

    Can you please send me this .capx ?

    thanks

  • Gigatron, well, corrected the perspective enough to work visually, obviously with a camera parameters this trick will works for any kind of setup not only my one.

    Here a gif with the correction:

    Here a simplified and comented .Capx :

    https://drive.google.com/file/d/0B8vm3F ... sp=sharing

    I'm asking for some kind of camera parameters but will work any thing that can works like that for any kind of setup without using the tricks , instances ,etc.. i did for fix.

  • looks great!

  • Really impressive ...

  • . Gigatron , Thanks guys!

    I added camera movement with lerp to the player and a difference when the aim is more close or far from player. Also the camera does a scale-out when player is running and the aim is far to have a bigger vision of the world-area. Also changed the player for one much better in 12 frames(pixel-perfect animation in 8x8)

    Actual gameplay:

    HD version on youtube:

    Subscribe to Construct videos now

    I really think this shader with all the options like the camera , On/Off light, alpha, Light XYZ position, turn on/off faces of the cube(XA,XB,YA,YB,ZA,ZB), color fog(gradient to X color) and direction(Horizontal,vertical/Up/Down), etc... will allow to do more spectacular and complex scenes in an easy way to work in any kind of game.

    Also i realized i can do animated textures for magma, torch or whatever and the shader will show them on runtime :O .

  • Other .gif showing the last additions and show what can be done with this shader.

    Now with the use of transparent in textures i can do doors and windows. Also added the first enemy with a basic IA/Pathfinding.

    Here the HD Version:

    https://youtu.be/9mXz6saUiV4

    More coming!

  • Hello, I was just trying this plugin, using the exact same texture

    https://en.wikipedia.org/wiki/File:Skybox_example.png

    But the texture is totally misaligned - any Idea what Is wrong?

    Also, can you turn off lighting in any way?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)