Tagged: dev Toggle Comment Threads | Keyboard Shortcuts

  • frankiezafe 20:13 on 2017-01-10 Permalink | Reply
    Tags: dev, ,   







    New example about compositor and shader (example.compositor).

    The example concerns the definition of a custom compositor. In Ogre3d, a compositor is a serie of post-processing nodes attached to the camera. It is the place where the image displayed at each frame is created.

    In the example, there’s a shader attach to the background of the window that renders a blurred circle. The shader params can be modifed RT via the mouse.

    • Moving the mouse change the red and green channels of the center color.
    • Dragging with left button modify the radius of the circle.
    • Dragging with right button modify the center of the circle.
      • Compositor is a really strong feature of Ogre, even if it’s a quite difficult one!

  • frankiezafe 22:19 on 2017-01-06 Permalink | Reply
    Tags: , dev, ,   




    First version of an installation script for linux is ready. It updates system libs, gather repositories, compiles and installs a big bunch of libraries and finally launch a basic example.

    Test machine specs:

    • xubuntu 16.04 64bits (running in a VM)
    • 4 core CPU
    • 2048MB of RAM
    • a weak internet connection

    Complete duration: 25m.

    Find the script and a manual procedure here: https://bitbucket.org/polymorphteam/pe.2.0/wiki/sdk-setup-linux-debian

    See the video log here: https://vimeo.com/198400034

  • frankiezafe 12:54 on 2017-01-04 Permalink | Reply
    Tags: dev, , ,   


    Updates the engine wiki done:

    • guide for project setup with cmake
    • guide for project import in netbeans

    I realise that the installation procedure is not complete yet, and it must be done before fosdem. It’s becoming urgent!

  • frankiezafe 23:42 on 2017-01-03 Permalink | Reply
    Tags: , dev, , ,   


    Today, a lot of bug fixes on the basic classes of the polymorph packages.

    New: it is now possible to declare the resources folders in the XML! The common resources.cfg of Ogre can be replaced by a configuration.xml, placed in the same folder as the exec.

    The resources.cfg was looking like this:



    In the XML, it’s converted to this, with control over recursivity and read access.

            <group name=”Essential”>
                <resource path=”../media/packs/PolymorphTrays.zip” type=”Zip”/>
            <group name=”General”>
                <resource path=”../media/models” type=”FileSystem” recursive=”1″ readonly=”0″/>
                <resource path=”../media/materials” type=”FileSystem” recursive=”1″ readonly=”0″/>
                <resource path=”../media/materials/textures” type=”FileSystem” recursive=”1″ readonly=”0″/>

    The sreenshot comes from an evolution of the XML example, see Dynamic scenes loading

  • frankiezafe 22:27 on 2016-12-17 Permalink | Reply
    Tags: , dev, management,   

    I reopened today the #peel project, left aside 3/4 month ago. I was a bit worried about opening the IDE because a lot of things have changed.

    Indeed, during the development of Tuning Score, I didn’t do the same mistake as the oneS i did with peel.

    When I’ve started peel, my ideas about the polymorph package, and therefore the architecture of the whole project, were really vague. Due to the lack of global view, I have developped a lot of things in peel, such as a custom camera rig, a custom project format in xml and the classes to manage it, etc, etc.

    The approach was quite different for Tuning Score. From the start, the code specific to the game has been separated form the “core”. The core has given the polymorph package. It is full of virtual methods, and, excepts crucial stuff, the rest of the important methods and params are public or protected. For programmers, this means it can be easily overloaded.

    While I was starting the refactoring on peel, the benefits became crystal clear: I needed to replace the previous xml parser class by the one of polymorph. But for peel, i need a custom structure of data. By creating a custom class “PeelObjectManager” that extends “polymorph::PObjectManager” and “polymorph::PXmlParser”, the code to parse the custom xml tags has been done in 30 minutes 🙂

    I think it will take 30 to 40 hours to have peel on track again.

    Some screenshots will pop-up very soon, and several new features in the package:

    • sound spacialisation in pd
    • camera rig configuration via xml
    • objects parenting via xml
    • graph engine, usable for state engine, etc., with 2d overlay
    • there might be other things…
  • frankiezafe 23:31 on 2016-11-27 Permalink | Reply
    Tags: dev, ,   


    Today, visually, it is ULTRA minimal.

    The two dots are 2 sound objects. The left one is muted and is related to pobject_3_object messages in the pd patch. The right one is on and is related to pobject_6_object messages in the pd patch.

    In human language, this means that the 3d objects are directly connected to the sound engine. For instance, when the right dot moves, it sends a message named “moved” to the sound. In this case, the message triggers a short sound.

    For developpers:

    • main class for sound objects: PSound
    • interface between Ogre thread and Puredata thread: PdSource

    Soon with more!

  • frankiezafe 17:52 on 2016-11-25 Permalink | Reply
    Tags: dev,   


    First version of doxygen documentation.

    It’s quite cool to see the mental structure i’m building since several weeks come to life in the diagrams.

    There a huge work to be done to comment and clarify the code!

    The documentation is available online: http://polymorph.cool/doxygen/

  • frankiezafe 16:40 on 2016-11-24 Permalink | Reply
    Tags: achitecture, dev,   


    New object for lights in polymorph package.

    The image above shows that plights can be manipulated with the same methods as pnodes. This seems obvious, but it required a serious refactoring of the existing code: from now on, all “visible objects”, including sound sources, inherits from a common object, called … PObject (unexepected, isn’t it).

    The advantage of doing so is that links can be created between any kind of objects, and all are linkable to bullet.

    Conceptually, it was also mandatory to use “smart” objects in the package, and therefore being able to say that some classes are polymorphic 🙂

  • frankiezafe 19:22 on 2016-10-19 Permalink | Reply
    Tags: , dev, ,   

    Long time no seen!

    After fixing tiny and absolutly not sexy issues in bullet code, programming went to an even less fancy topic: efficient temporary storage of udp packets.

    Indeed, OSC messages (basically udp messages) arrives asynchronously. The display thread is running at ~60fps, but messages can pop in at any time. To avoid a display thread interruption each time a message is received, they have to be stored until the main thread request them.

    The first approach was to push them in a std::vector. If the main thread never requested them, this vector might eventually become VERY long. To solve that, setting a maximum size seemed to be a good option. Each time a new message is received, if the vector is longer than maximum, the first element, witch is also the oldest, is deleted.

    There’s 2 important performance issues in this approach (fixed by the new one :)):

    • removing the first item ( =>resizing the vector) and push back an item at each reception ( =>resizing the vector once again) is not efficient at all;
    • read and write access to the same object, implying that you can not write while reading and reverse.

    Sooner in my life, someone told me about ring buffer. The name was nice and the idea behind was appealing!

    Here is what has been implemented in the class that receives and parses the OSC messages (readable text below the image, click to enlarge).


    polymorph::POscReceiver – ring buffer logic

    POscReceiver uses ring buffer to store received messages temporarily.
    If its capacity is 10, it uses an array of 10 PMessageData.
    When the maximum number of messages is reached, the oldest message is overwritten.
    The position of the oldest one is shifted by one each time a new message is stored in an “overflowed” array.


    polymorph::POscReceiver – read and write buffer

    POscReceiver uses 2 ring buffers.
    Reception and parsing are managed in a separated thread.
    Buffers are swapped when the main process request a read access.

  • frankiezafe 18:31 on 2016-10-07 Permalink | Reply
    Tags: dev, , doxygen   

    First generation of documentation with doxygen and … OMG! it’s a huge mess!

    Defining an architecture and clean namespaces is really required, and must to be done as soon as possible.

    Doc is here: polymorph.cool/doxygen


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