Tagged: Ogre3D Toggle Comment Threads | Keyboard Shortcuts

  • frankiezafe 22:39 on 2017-02-10 Permalink | Reply
    Tags: , , , Ogre3D, ,   

    I’ve learned something really important today: an OpenGL context can be accessed by one and ONLY one thread! See Under what circumstances would glGenBuffers/glGenBuffersARB fail?.

    And this is the first time I feel annoyed by the singleton approach of Ogre3D. In my asset converter util, I use Ogre object, the MeshManager mainly, to convert xml files to .mesh files. Due to the limitation of OpenGL and the singleton pattern, I can’t declare a new OpenGL context in my conversion thread by using the Ogre managers…

    I struggled for several hours with that before find the post on stackoverflow.

    This implies a freeze during mesh conversion, wich prevent me to animate a progress bar and keeping the conversion strickly in background.

    I’ll work on the loading and display of the processed meshes next week.

  • frankiezafe 18:46 on 2017-02-08 Permalink | Reply
    Tags: , Ogre3D, ,   

    I’m currently working on a more user friendly mesh, skeleton & materials converter.

    For the little story, when you export a model from blender, the blender addon outputs xml files. These files have to be parsed by the OgreXMLConverter to produce the final files. *.mesh & *.skeleton files are binaries.

    It’s a tedious process, especially when you want to organise your files in the folder structure of the application.

    The polymorph xml converter wlll make this a bit more handy (when ready):

    • hotfolder: define the folder where the blender exports lands after export;
    • output models: define the folder where the .mesh files will be exported after conversion;
    • output skeleton: define the folder where the .skeleton files will be exported after conversion;
    • output material: define the folder where the .material files will be moved;
    • output textures: define the folder where images will be moved;

    These paths will be saved in a preference file next to the application, to avoid having to reset them each time you open the application.

    A demo will come once it will starts to work. For the moment, only the GTK filechooser is plugged in.

  • frankiezafe 19:56 on 2017-01-29 Permalink | Reply
    Tags: Camera, , matrix, Ogre3D,   

    New example showing how to go from world space to camera space.

    A bit of explanation.

    The black sphere is attached to the pink camera. Therefore, it is located in the camera space, meaning that its position, rotation and scale depends on the camera ones. By default, the sphere is static in the point of view of pink camera.

    The pink camera is rotating around the world center.

    An empty, represented as a XYZ axis, follows the mouse position.
    If the space bar is hit, position & orientation of the empty is converted into camera coordinates.

    Vector3 p = custom_cam.worldToCam( empty.getTrans( ) );
    Quaternion q = custom_cam.worldToCam( empty.getOrientation( ) );

    The values are then applied on the sphere:

    ball_cam.move( p );
    ball_cam.orientation( q );

    By doing so, the ball is placed at the exact same location and orientation as the empty, relatively to the pink camera.

    note: the 256×256 square at the top left of the images is made with overlay manager, not yet simplified in polymorph namespace.

    The example is available in samples/0.1/example.cam_space

  • frankiezafe 22:03 on 2017-01-22 Permalink | Reply
    Tags: , , , Ogre3D, RTT   

    Currently working on PCamera class (a class to manage … camera!). The new samples/0.1/example.cam shows how to create one and render it onto a texture.

    In these images, the pink texture on the cube is the rendering of the camera rotating in the center of the scene, the tall pink cone. It is very ogry to send the camera to the texture:

    RenderTexture * rt = texture->getBuffer( )->getRenderTarget( );
    custom_wp = compositorMgr->addWorkspace( sceneMgr, rt, custom_cam.getOgreCam( ), cwName, true );
    custom_mat->getTechnique( 0 )->getPass( 0 )->createTextureUnitState( )->setTexture( texture );

    There should be a way to make this a bit more handy, I’ll look into it sooner.

  • frankiezafe 19:24 on 2017-01-11 Permalink | Reply
    Tags: , , glitch, , Ogre3D, , ,   





















    Cool day today: the creation of the example.glitch was quite fun.
    The example demonstrate a bit more extensively the usage of the ogre’s compositor (see here) and the interaction with shaders.

    If you test the example, ckeck CustomApp::createCompositor: you’ll find comments about how to interact with the shader’suniform.

    The superb model in this scene is gearthing4 by shivinteger, distributed by #additivism.

    • xuv 00:57 on 2017-01-12 Permalink | Reply

      Wow. Looks awesome. Indeed, add some sound and it’s a finished piece. 🙂

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







    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 23:42 on 2017-01-03 Permalink | Reply
    Tags: , , , Ogre3D,   


    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 23:31 on 2016-11-27 Permalink | Reply
    Tags: , Ogre3D,   


    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:05 on 2016-11-19 Permalink | Reply
    Tags: , , , Ogre3D   

    Polymorph package is on its way!

    Until today, polymorph was a collection of Ogre addons, independent from each other. The approach has changed a lot during the development of Tuning score. All extra libraries are now linked into one big package:

    • Bullet – physical engine;
    • libPD – sound engine;
    • OSC – Open Sound Control messages, based on udp;
    • tinyXML – for project loading;
    • SDL – for gamepad and joysticks.

    The package uses a project file format, in XML + provides high-level objects and a base class containing all mandatory methods to manage a game:

    • scene & resources loading;
    • window management and events;
    • keyboard and mouse events.

    A large documentation has to be written, but programming architecture is now fixed.

  • frankiezafe 19:12 on 2016-10-10 Permalink | Reply
    Tags: , Ogre3D,   

    Precise object grabbing, require a bit of math, but it worst the headache!







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