Recent Updates Toggle Comment Threads | Keyboard Shortcuts

  • frankiezafe 22:30 on 2017-11-16 Permalink | Reply
    Tags: , memory leaks, oracle, profiling, valgrind   

    Testing different profiling tools on the engine.

    Even if the performance analyzer seems very nice, plenty of graphics and tabs, i will keep on with valgrind for the moment, as it does what i need (memory leaks detection), and also because i get what it does much more easily than the tool of oracle!

    Valgrind, a flat file on the system, and a valgrind –help command, simple.

    Oracle performance analyzer, entering the gasworks…

  • frankiezafe 16:01 on 2017-11-02 Permalink | Reply
    Tags: , ergonomy, gravity, ,   

    Manipulation of gravity through a plumb line.

    A plumb line is a cross-cultural representation of the gravity vector ref. In this case, by manipulate it, you modify the world gravity. Even if it is the exact opposite of the common sense, i think the analogy is clear enough to avoid any explanation.

  • frankiezafe 20:50 on 2017-11-01 Permalink | Reply
    Tags: , , look and feel,   

    Complete UI style for 2D elements.

    All standard Ogre’s use interface objects have been styled in the polymorph way!

  • frankiezafe 13:41 on 2017-11-01 Permalink | Reply

    Cello Fortress, Up to four players use controllers to navigate their tank, using one stick to move and the other to shoot. They dodge bullets and attack the turrets. At the same time, the game analyses the notes played by the cellist, as picked up by a microphone. Aggressive notes activate the burst-cannons, dissonant chords turn on the flame-throwers, and an ominous melody charges a bombardment.

  • frankiezafe 00:38 on 2017-10-19 Permalink | Reply
    Tags: , , ,   

    Editing ogre materials:

  • frankiezafe 23:24 on 2017-10-12 Permalink | Reply
    Tags: , , , , , , ,   

    (a bit more than a technical demo this time)
    After finishing the work on shadows, it was time to play with the different materials possibilities.

    To explain a bit what you are seeing:

    • at the top left, the 3 textures containing the shadow maps;
    • transparent walls (wireframes) are not take into account in the shadow map because they are using a specific material called invisible_for_shadows, i think the name is obvious;
    • the foggy volume above the ground is made of a stack of 25 thin boxes, using another cool material: solid_shadows_no_cast, they receive shadows but don’t cast them;
    • and the balls, using the solid_shadows material and having the standard behavior, but in wireframe, implying that fog is hollowed when you look through them.

    A cool feature is the ability to set the alpha of the shadows material per material. For the jelly fog, the material is looking like this:

    material screen_mat : solid_shadows_no_cast
        pass standard
          diffuse 0.6 0.7 0.95 0.2
          emissive 0.2 0.3 0.45 0.4
          depth_write off
          scene_blend alpha_blend
        pass pssm
          fragment_program_ref ShadowsPssm_pix
            param_named shadow_alpha float 0.2

    The speed control over the physic simulation (when everything freeze) is modifying the time multiplier of bullet. The call is looking like this:


    Complete projects is accessible in the engine, under samples/0.1/example.pssm_shadows.

    I need to rest a bit, it has been a harsh road to get this packed. The last part of the job is to ensure the compatibility low opengl versions!

  • frankiezafe 14:11 on 2017-10-11 Permalink | Reply
    Tags: , , ,   

    Ogre3d really deserves some attention to deliver its full potential. A good example is the management of different version of shaders in a single program. In the image here above, the graphical cards are very different: the laptop has a low-end integrated intel chipset, the workstation is working with a GTX 980. The supported opengl version: glsl120 max for the laptop, vp40 for the gtx.

    This information is dumped in terminal when the application starts, search for something like this:

    Supported Shader Profiles: arbfp1 arbvp1 fp20 fp30 fp40 glsl glsl100 glsl110 glsl120 gp4fp gp4gp gp4vp gpu_fp gpu_gp gpu_vp nvgp4 vp30 vp40

    Once identified, we can now prepare a program script to select shaders automatically.

    In the .material:

    material shader_tester
          fragment_program_ref tester_pix

    In the .program:

    fragment_program tester_pix_glsl glsl
      source tester_pix_120.glsl

    fragment_program tester_pix_glsl_330 glsl
      source tester_pix_330.glsl
      syntax fp40

    fragment_program tester_pix unified
      delegate tester_pix_glsl
      delegate tester_pix_glsl_330

    The crucial instruction here is the syntax definition in fragment_program tester_pix_glsl_330. The available flags are listed here: Declaring Vertex/Geometry/Fragment Programs. The fragment_program tester_pix_glsl has no syntax flag, it will be used as the default one.

    Shaders are stupidly simple in this case.


    void main() {
      gl_FragColor = vec4( 0,1,0,1 );


    #version 330
    void main() {
      gl_FragColor = vec4( 1,0,0,1 );

    And that’s it for the automatic selection of shaders in ogre.

  • frankiezafe 20:38 on 2017-10-10 Permalink | Reply
    Tags: , , , ,   

    Visualisation of contact events in the engine. Wireframe objects are the actual physical objects. The small plain spheres are placed at the position of the contact (or the average of all points), and reacts to impulse. Impulse is one of the components of the forces applied on the objects while bullet resolves the world.


    • impulse > 1000: red material;
    • impulse > 1: yellow material;
    • by default: cyan material;
    • scale calculation: (3 + impulse * 0.00001) caps at 15.

    To be precise, the impulse used here is the delta of the previous and current impulse.

    The video shows only one of the 2 contact events you can retrieve from engine:

    • pairs: represents the relation between 2 objects in contact (visualised here);
    • per object: it is also possible to retrieve contacts for a specific object.

    In future version, I plan to enable specific pair listening (“i want to know when this specific object touch this other specific object”).

  • frankiezafe 15:53 on 2017-10-07 Permalink | Reply
    Tags: dilbert, , humor, image   


  • frankiezafe 19:50 on 2017-10-06 Permalink | Reply
    Tags: , pssm, , ,   

    Tech info: 3 splits, 4096, 2048 & 1024 maps, 2 pass materials on all objects, gpu: GTX 980.

    Working on an “easy” to deploy shadow system for the engine. The work now is to make the activation of these as simple as possible.

    For the moment, the activtion has to be done manually through many steps: loading specific resources, activating them, modification of the default PolymorphApplication methods, etc.

    To make it simplier, the resources should be placed in zip, like the (containing the UI style), and loaded via standard methods.

    Just to mention, I discovered the “import” feature in ogre’s materials, just wonderful! To modify the appearence of the balls in the video, one just have to inherit from a complex material called two_pass_shadows declared in the shadow package, in shadows_pssm.material file.

    import * from “shadows_pssm.material”
    material ball_mat : two_pass_shadows
        pass standard
          diffuse 0.1 0.99 0.95 1.0
            texture retro.png
            colour_op alpha_blend

    see Script-Inheritance for details.

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc