No announcement yet.

Linux Game Development and a Qt Developers Rage

  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by johnc View Post

    It looks like the default Ubuntu desktop wallpaper.

    What if all Ubuntu wallpapers are created by applying excessive blur on porn?

    Mind = blown.


    • #17
      Ohhh so tempted to post the full HighRes image lol, she is like 70 years old now but good lord was she hot in her day!!!!!!
      I could do a "Animated Vortex Effect" on her tits!!!!!


      • #18
        There is another Library called ITK, I am particularly interested in its simplified form SimpleITK(We don't have to use C++ Templates) it has bindings
        for Python, Lua, ... and some others

        ITK is an open-source, cross-platform system that provides developers with an extensive suite of software tools for image analysis.

        I am particularly interested in What it does in regards to detailed "Shape" and "Pattern" recognition.

        Example: Code Snippit to show ease of use. This looks exactly like Magick++
        //This filters perform a gaussian bluring with sigma in
        // physical space. The output image will be of real type.
        ImageFileReader reader ;
        reader.SetFileName( "/mynakedmodel.png" ) ;
        Image image = reader.Execute ();
        SmoothingRecursiveGaussianImageFilter gaussian ;
        gaussian.SetSigma ( 2.0 );
        Image blurredImage = gaussian.Execute ( image ) ;
        Now the really interesting part.

        Extraction of 2D Curves using statistical pattern recognition

        The purpose of this application is to extract the points that are located near the medial line of tubular structures in a 2D image. The image is processed by differential gaussian filters that tune the analysis to a particular scale associated with the expected diameter of the tubular structures.

        Cellular Model for Image Processing and Shape Recognition

        Cell populations can be used for image analysis by letting them grow on top of an image. The image is assimilated to a chemical substrate in which the cells lay. The behavior of cells can be programmed in order to react to the content of the substrate (the image) and the state of the neighbor cells.

        Hmmmmm very very very useful, wonder if Photoshop can create a "Cellular Model for Image Processing and Shape Recognition" ?


        • #19
          Originally posted by RushPL View Post
          I literally love your approach. Your working around GPL limitations is very practical. If a plugin can easily live on its own then the application utilizing the plugin is hardly derivative work and merely a loader like a shell calling exec. I gather you already have some basic vector image manipulation plugin, how would you say it compares to inkscape performance-wise? I love inkscape but it's such a pain in the ass sometimes. The startup can take up several seconds (loading fonts ..) and manipulating complex paths takes ages. Add some filters to it and you can make a coffee between operations... I would love to build and test your stuff on vector drawing and if usable improve upon it. Oh!! I fell in love in your work for you are developing it on a black theme! Too many applications break using black themes so I am glad this one would have prime support. Where is your Paypal donate button?
          Thanks, I don't have any issues with the GPL, but honestly I find it tends to hurt those that it was intended to protect(Developer wise) more than it helps. As an example of this take Horde3D

          Horde3D is licensed under the EPL(Eclipse Public License) and from my understanding the EPL isn't compatible with the GPL in anyway shape or form.

          And I think Horde3D is pretty fucking cool ...
          • Modern shader-based architecture with SM 2.0 compatible hardware as a minimum requirement
          • Robust resource management with internal garbage collection
          • Interface for loading data from files, streams or any type of archives
          • Hot-reloading of resources for more increased productivity during development
          • Lightweight scene tree structure with hierarchical transformations and bounding volumes
          • Unified scene system where world, models and skeletons are just scene graph branches and no special objects
          • Loading of scene graph branches from XML files with complete orthogonality to API functions
          • Frustum culling based on spatial graph
          • Hardware occlusion culling
          • Level of detail support for model geometry and materials
          • Possibility to attach scene nodes to joints (e.g. for character props)
          • Access to vertex data for collision detection and interoperability with physics engines
          • Ray collision queries and node picking
          • Übershader-based effect/material system with automatic shader permutation generation (using GLSL shaders)
          • XML based customizable rendering pipeline with allocatable render targets and commands for rapid testing of different rendering techniques
          • Postprocessing framework for effects like bloom, DOF or motion blur
          • Support for forward rendering and different deferred shading techniques
          • Support for High Dynamic Range (HDR) textures and lighting
          • Support for almost all modern rendering techniques, including normal-mapped phong lighting and parallax mapping
          • Support for real-time reflections and other techniques that require several cameras for rendering
          • Realtime shadows using Parallel Split Shadow Maps (PSSM)
          • Software skinning and hardware skinning in vertex shader for rendering hundreds of animated characters
          • Fully integrated particle systems that can cast shadows and have effects like motion blur
          • Overlays for rendering GUI elements and font
          • Unified low-level animation system working directly on scene graph
          • Keyframe animation for joints and meshes
          • Skeletal animation with up to 4 weights per vertex for articulated models
          • Layered animation blending and mixing using masks and additive channels
          • Inter-frame interpolation for smooth animations
          • Access to joint data for dynamic animations and ragdoll physics
          • Morph targets for facial animation and lip synchronization
          • Custom optimized model and animation formats for maximum performance
          • Mixture of binary and XML formats for best tradeoff between performance and productivity
          • Support for DDS textures and other common image formats
          • Collada Converter for bringing assets from many common DCC tools to Horde3D
          • Collada Converter implemented as command line tool that can be integrated in automatic build process
          • Calculation of tangent space basis for normal mapping
          • Optimization of geometry for GPU post-transform vertex cache
          • Data-driven rendering pipelines for straight switching between different rendering techniques

          On Top of that ....
          It has a Terrain Extension and Bullet 3D Physics Extension.

          Horde3D is C++ based but it has a C style wrapper on top.

          Thanks to the C style wrapper I was able to write a Lua binding in addition to adding FMOD for 2D/3D Audio and Grapple for Networking
          and all of this only took a day to do.

          But Horde3D and Fmod are GPL incompatible and Grapple is LGPL and Qt is LGPL.

          Plus Blenders Collada support isn't or wasn't very good. There is a Blender Horde3D export plugin now. I have to check it out.

          As far as a Vector Graphics Plugin, yes and no, I have done lots of work in regards but its come down to decisions, Vector Graphics in Qt are faster than Inkscape's Cairo, then you have Skia and
          finaly NV Path Rendering Ext.

          First off there is a kind of Acid Test for Vector Graphics Engines. Qt, Skia and Cairo fail in terms of proper rendering. Cairo being the worst and Qt the best. Only the NV Path Rendering Ext gets a perfect score.

          Now Cairo only does VG its not a complete Graphics Framework.
          Skia and Qt are complete
          NV Path Rendering only does VG it's not really a complete Graphics Framework "unless" your using shaders in combination.

          I did some test in regards to integration, I don’t have all the screentshot's and these were really only about performance. What I did was integrate QPainter, Cairo and Skia into SFML2.
          I was and am only particularly interested in results for Qt and NV Path

          Rendering the SVG Tiger in Qt you get about 130FPS

          Rendering the SVG Tiger using QPainter/Qsvg in SFML2 you get about 240FPS

          Rendering the Tiger using NV Path in OpenGL(Nvidias Demo) you get 400+FPS and an option to speed that up with Cuda.

          Here is QPainter and SFML2

          Here is SFML2 inside Qt

          Here is Skia in SFML2 I was running Drawing Commands here.

          If your interested in the Skia SFML2 code
          #include <SFML/Graphics.hpp>
          #include "SkCanvas.h"
          #include "SkGraphics.h"
          #include "SkImageEncoder.h"
          #include "SkString.h"
          #include "SkTemplates.h"
          #include "SkTypeface.h"
          #include <iostream>
          // g++ main.cpp -Wl,-rpath,./ -L. -lskia -Iinclude/core -Iinclude/config -Iinclude/images -lpthread -lfreetype -lpng -lsfml-window -lsfml-graphics -lsfml-system 
          using namespace std;
          int main(int argc, char **argv) {
            int width = 800;
            int height = 600;
            // Create the main window
            sf::RenderWindow window(sf::VideoMode(width, height), "SFML window");
            sf::Image image; 
              SkAutoGraphics ag;
              //Set Text To Draw
              SkString text("Hydra Skia v0.0.1a");
              SkPaint paint;
              //Set Text ARGB Color
              paint.setARGB(255, 255, 255, 255);
              //Turn AntiAliasing On
              paint.setTypeface(SkTypeface::CreateFromName("sans-serif", SkTypeface::kNormal));
              //Set Text Size
              SkBitmap bitmap;
              bitmap.setConfig(SkBitmap::kARGB_8888_Config, width / 2, height);
              //Create Canvas
              SkCanvas canvas(bitmap);
              canvas.drawARGB(100, 25, 25, 25);
              //Text X, Y Position Varibles
              int x = 80;
              int y = 60;
              canvas.drawText(text.c_str(), text.size(), x, y, paint);
              //Set Style and Stroke Width
              //Draw A Rectangle
              SkRect rect;
              paint.setARGB(255, 0, 0, 0);
              //Left, Top, Right, Bottom
              rect.set(50, 100, 200, 200);
              canvas.drawRoundRect(rect, 20, 20, paint);
              canvas.drawOval(rect, paint);
              //Draw A Line
              canvas.drawLine(10, 300, 300, 300, paint);
              //Draw Circle (X, Y, Size, Paint)
              canvas.drawCircle(100, 400, 50, paint);
              image.Create(bitmap.width(), bitmap.height(), reinterpret_cast<const sf::Uint8*>(bitmap.getPixels()));
            // Load a sprite to display
            sf::Texture texture;
            if (!texture.LoadFromImage(image))
                    return EXIT_FAILURE;
            sf::Sprite sprite(texture);
            //sprite.SetPosition(100, 100);
            //sprite.Resize(400, 400);
            // Load a sprite to display
            sf::Texture tex;
            if (!tex.LoadFromFile("background.jpg"))
                   return EXIT_FAILURE;
            sf::Sprite texs(tex);
            // Start the game loop
            while (window.IsOpened())
                   // Process events
                   sf::Event event;
                   while (window.PollEvent(event))
                       // Close window : exit
                       if (event.Type == sf::Event::Closed)
                   // Clear screen
                   // Update the window
               return EXIT_SUCCESS;

          I would like to combine Qt and the Nv Path Rendering Ext, but that's going to take some time.

          You can learn more about Nv Path Rendering here
          Last edited by zester; 05-16-2013, 10:30 AM.


          • #20
            Just to break the topic of VG up as it was getting cluttered.

            What I would like is ...
            1. Nvidia Path Rendring, as a Qt Plugin with that in QGraphicsScene/QGraphicsView(OpenGL) Note: Will probably just start with Qt's VG capability’s and move to nvpath later.
            2. Box2D for Physics
            3. Qt has Animation Classes for Tweening
            4. 2D/3D Audio with effects (OpenAL, CAudio(OpenAL C++ Wrapper), Fmod, or RtAudio & STK)
            5. Pre-Made Shaders
            6. Particle Effects (Note: Combined with Box2D would be cool)
            7. Bone System (Skeletal Animation) (Might be able to modify Animadead for this) or find something better. But Animadead is easy to use for 3D haven’t tried to restrict it for 2D yet.
            8. A B-tree State Machine "Like Playmaker for Unity3D" (Might not need to do this my self, There are a couple of Internal and External options for Qt)
            9. Scripting (Python, Lua, Javascript)
            10. Libav or FFMPEG for encoding/decoding the animated frames to a video.
            11. Renderer (Ray Tracer maybe? not sure but the thought is interesting)

            Combine this with everything else I have posted and you get all kinds of possibility’s.

            Oh but to answer your question, no VG is not hard, actually very easy to the point of why not spice it up and think about what you could do with it.
            Last edited by zester; 05-16-2013, 10:59 AM.


            • #21
              Originally posted by zester View Post
              11. Renderer (Ray Tracer maybe? not sure but the thought is interesting)
              Performance would likely be lacking. Ray Casting might be doable though.


              • #22
                Originally posted by gamerk2 View Post
                Performance would likely be lacking. Ray Casting might be doable though.
                I am thinking the idea would be to render out the scenes,

                Off the top of my head I am thinking "Materials", "Lighting", "Textures (Diffuse, Emission, Bump, Spec" <- Shaders

                Ill have to look for some examples that reflect what I have in mind that would work for 2d objects.

                And research, what the proper render would be to use.


                • #23
                  Originally posted by gamerk2 View Post
                  Performance would likely be lacking. Ray Casting might be doable though.
                  Ohhh ok I see what your saying (Volume Rendering With Ray Casting) good call.


                  • #24
                    Here is the link to the (Unity3D Playmaker or Blenders Logic Editor) state machine idea for Qt

                    This would allow none programmers to contribute to the project. But also allow for advanced AI, etc

                    Last edited by zester; 05-16-2013, 12:54 PM.


                    • #25
                      Thank you for VERY expressive answer. Once you post the code it would be interesting to tinker with. I hope you will be able to outline some basic goals one step at a time, otherwise doing everything at once might not lead to anything usable. Currently I understand that your project is kind of a little bit of everything. If you link GIMP? Sure, you have it! Inkscape? You betcha. Unreal Engine? Unity 3d? Why not. Lots of pieces to pick up!!


                      • #26
                        Originally posted by RushPL View Post
                        Thank you for VERY expressive answer. Once you post the code it would be interesting to tinker with. I hope you will be able to outline some basic goals one step at a time, otherwise doing everything at once might not lead to anything usable. Currently I understand that your project is kind of a little bit of everything. If you link GIMP? Sure, you have it! Inkscape? You betcha. Unreal Engine? Unity 3d? Why not. Lots of pieces to pick up!!
                        No problem Yup right now I am working on laying down the foundation and adding in PythonQt and Down the road if there is a need Lua and Javascript(QScript) also. Also cleaning up what plugins I have and preparing what example code I have to begin turning that into a plugin also.

                        This whole thing is like an old bucket of legos...
                        1. Pick a piece
                        2. Wash it off
                        3. See where it fits.
                        4. Repeat.

                        But as I said its all there, and I haven't even really gotten into detail, this stuff is just off the top of my head. And 99% of it is Qt or takes Qt into consideration or is already using something I mentioned.

                        Example: GraphicsMagic(Filters, Effects, ......) - Photivo is using it also for some parts. Same with ITKSimple

                        The plugin idea was part GPL but more about building something that could be reused for my other projects and breaking this stuff up into small enough pieces to make them manageable.

                        Feedback, Example code, or even some form of knowledge about a particular subject is very very valuable information.

                        I am just going to keep going soon I will start referencing these programs (Gimp, ...) going down the list of features it offers ....

                        Example: Gimp has Blur here is our Blur snippet
                        Gimp has fuzzy selection here is our Fuzzy Selection snippit
                        Photoshop has .... etc


                        • #27
                          I was taking a look at Qt3D last night its also abandoned "I am starting to see a pattern here" .....

                          Animadead "Abandoned"
                          Horde3D "Abandoned"
                          Misfit Model 3D "Abandoned"
                          Photivo "Abandoned"
                          Qt3D "Abandoned"

                          Anyways I was looking at Qt3D and granted its not suitable for a 3D Graphics engine(Don't need one) "BUT" what it does have is not only straightforward mesh building capabilities but also
                          helper classes for painting to textures!!! Now I already have the Misfit code, "But" trust me its a mess of old uncommented code, even broken up into pieces I have no idea
                          what half of it does. I know exactly what features the program itself provides and how to use everyone of them, but that only helps a little

                          A better option would be to find a cleaner base, I am thinking Qt3D can provide that. And in addition to OpenMesh we would have an ultra clean code base that offers 90% or more of Blenders "Mesh Editing" capabilities note that I underlined that, as I am only talking about editing a mesh here. The point isn't to clone Blender. We want Something like Milkshape 3D but cleaner than what I got now.

                          Note: I will talk about Qt3D in a min I want to pickout the most interesting areas relating to Building and Editing a Model and there is alot!!! to choose from.

                          Lets jump over to Horde3D for a minute;

                          So we can get the raw vertex data from OpenMesh and eather ....
                          A. Using Assimp convert the raw vertex data to collada and have Horde3D convert it into its Binary Game Format .geo (Easy) or
                          B. Rip the Horde3D collada converter apart and figure out how to just encode/decode the .geo format directly from OpenMesh. (Ummm Hard?)

                          Ok lets assume they above is completed.... Lets take a look at Horde3D's Data Format Reference.

                          1. Materials
                          Filename-extension: .material.xml
                          Materials are used to bind data to shaders. They can reference a shader and setup texture samplers with images. They can also define shader uniforms which are four-dimensional float vectors with arbitrary user defined data. Materials are also responsible for setting shader flags which are used to select a shader combination from an übershader.

                          <Material class="Translucent.MyClass">
                              <Shader source="myshader.shader.xml" />
                              <Sampler name="albedoMap" map="mytex.jpg" />
                              <Uniform name="myColor" a="1.0" b="1.0" c="0.5" />
                          2. Pipeline Files
                          Filename-extension: .pipeline.xml
                          Pipeline files are used to configure the rendering pipeline.

                                  <RenderTarget id="GBUFFER" depthBuf="true" numColBufs="3" format="RGBA16F" scale="1.0" />
                                  <Stage id="Attribpass">
                                      <SwitchTarget target="GBUFFER" />
                                      <ClearTarget depthBuf="true" colBuf0="true" />
                                      <DrawGeometry context="ATTRIBPASS" class="~Translucent" />
                                  <Stage id="Lighting">
                                      <SwitchTarget target="" />
                                      <ClearTarget colBuf0="true" />
                                      <BindBuffer texUnit="8" target="GBUFFER" bufIndex="0" />
                                      <BindBuffer texUnit="9" target="GBUFFER" bufIndex="1" />
                                      <BindBuffer texUnit="10" target="GBUFFER" bufIndex="2" />
                                      <DrawQuad material="light.material.xml" context="AMBIENT" />
                                      <DoDeferredLightLoop />
                                  <Stage id="Overlays">
                                      <DrawOverlays context="OVERLAY" />
                          3. Shader Files
                          Filename-extension: .shader
                          Shader files define render states and hardware shader code.

                          sampler albedoMap = sampler_state
                              Filter = Bilinear;
                          float4 brightness = {0.5, 0, 0, 0};
                          context OVERLAY
                              VertexShader = compile GLSL VS_OVERLAY;
                              PixelShader = compile GLSL FS_OVERLAY;
                          // ============================================================================
                          uniform mat4 projMat;
                          attribute vec2 vertPos;
                          attribute vec2 texCoords0;
                          varying vec2 texCoords;
                          void main( void )
                              texCoords = vec2( texCoords0.s, -texCoords0.t ); 
                              gl_Position = projMat * vec4( vertPos.x, vertPos.y, 1, 1 );
                          // ============================================================================
                          uniform vec4 brightness;
                          uniform sampler2D albedoMap;
                          varying vec2 texCoords;
                          void main( void )
                              vec4 albedo = texture2D( albedoMap, texCoords );
                          #ifdef _F07_BrightMult
                              albedo *= brightness.a;
                              gl_FragColor = albedo;

                          4. Code Files
                          Filename-extension: arbitrary, usually .glsl
                          Code files are pure text files that can be used to define shader code. These files can be referenced by shader resources.

                          5. Scene Graph Files
                          Filename-extension: .scene.xml
                          Scene graph files are XML documents that define a subtree of the scene graph.

                          Note: Dont have an example for this one will have to find one. This is for saving and loading scenes. Haven't had to use it yet.

                          6. ParticleEffect Files
                          Filename-extension: .particle.xml
                          ParticleEffect files are used to configure particles of a particle system. Each particle has a randomly selected life time which is assigned when the particle is created. This time is continually decreased and when it is equal to zero the particle has died and can possibly be reborn. The particle has several channels defining its properties over the life time.

                          <ParticleConfig lifeMin="4.0" lifeMax="7.0">
                          <ChannelOverLife channel="moveVel" startMin="3.0" startMax="3.0" endRate="0.0" />
                          <ChannelOverLife channel="colR" startMin="0.4" startMax="0.4" endRate="0.5" />

                          7. Geometry
                          Filename-extensions: .geo
                          The file format for geometry is a binary format and has to be created with a suitable tool like the Collada Converter described above. A geometry resource contains the raw vertex data with optional morph targets organized as streams. Furthermore it contains the triangle data as well as information about the skeleton of a model.

                          8. Animation
                          Filename-extensions: .anim
                          The animation resource consists of sampled animation data for the joints and meshes of a model.

                          Note: For the Binary file formats see to read the spec

                          So what was the point of showing you all of the Horde File related stuff?

                          1. Just to show you what is offered
                          2. To show you that there almost all either xml or human readable, making a property panel or tools really easy to create.
                          Last edited by zester; 05-16-2013, 04:28 PM.


                          • #28
                            Ok so Qt3D ...

                            The First Class/Function is


                            I am not going to post its description, for the sake of clarity and just say it does exactly what it says it does. But in this case I think it generates
                            Texture Coordinates the same way Misfit does and what you would do is as your modeling we would be automatically generating your texture coords.

                            Generating UV coords from my limited experience has been a tough one but in this case.....

                            We have some example code to play with.

                             QGeometryData top;
                             // add data to the primitive
                             top.appendVertex(QVector3D(0.0, 0.0, 0.0));
                             top.appendVertex(QVector3D(6.0, 3.6, 0.0));    // (v1 - v0).length() = 7.0
                             top.appendVertex(QVector3D(10.0, 0.6, 0.0));   // (v2 - v1).length() = 5.0
                             top.appendVertex(QVector3D(13.0, 3.24, 0.0));  // (v3 - v2).length() = 4.0
                             // generate x (Qt::Horizontal) texture coordinates over the primitive
                             top.generateTextureCoordinates();              // spread over 7 + 5 + 4 = 16
                             // make a copy translated down, the copy has y texture coordinates all 0
                             QGeometryData bottom = top.translated(QVector3D(0, 0, -1));
                             // now modify the top so its y texture coordinates are all 1
                             for (int i = 0; i < top.count(); ++i)
                             displayList->addQuadsZipped(top, bottom);


                            Take a guess what this function does? If you said ummmm "Adds a Quad Strip?" yes your correct Hee hee

                            This is important because Misfit does not have the option to model with Quads it only does Tri's, This would be ok if you
                            didn't want to animate your model. But we do so we will.


                            I am not even going to tell you what this function does to me on the inside, but I will tell you my wife is going to be disappointed tonight when she gets no love.

                            Add a series of quads by 'interleaving' top and bottom.
                            This function behaves like quadStrip(), where the odd-numbered vertices in the input primitive are from top and the even-numbered vertices from bottom.
                            It is trivial to do extrusions using this function:


                            Adds to this section a polygonal face made of triangular sub-faces, defined by face. The 0'th vertex is used for the center, while the subsequent vertices form the perimeter of the face, which must at minimum be a triangle.
                            If face has less than four vertices this function exits without doing anything.
                            This function provides functionality similar to the OpenGL mode GL_POLYGON, except it divides the face into sub-faces around a central point. The center and perimeter vertices must lie in the same plane (unlike triangle fan). If they do not normals will be incorrectly calculated.

                            When I showed this to my cat she did a fucking back flip.

                            Anyways there is lots more to post on the topic of Mesh Building and Editing but my ass hurts from sitting here entertaining You and My Cat for umm ..... 8 hours I am going to get something to eat.


                            • #29
                              I want to put this here as a place holder to reference later.. As my brain melted while I was reading the whitepaper.
                              But I have an idea on what I am looking at in regards and its usefull soooo.

                              Discrete Laplacians on General Polygonal Meshes

                              It uses Qt and OpenMesh


                              Programmers tip: Shoot High and Aim Low or is it the otherway around????? Hmmmm

                              Update this does exactly what I thought it does BUT its alot better than Blenders.
                              Last edited by zester; 05-16-2013, 05:42 PM.


                              • #30
                                Ok I think this is where we are going to start....

                                Its a 3D View(OpenGL Qt) with a 3D Model, With a Canvas that you can "Draw" or "Paint" on. or in other words
                                It's like modeling a teapot in Blender and Then texturing that teapot with the Gimp or Inkscape Canvas, while still in Blender.

                                Oh and we get "Stereo View" for free, once this is setup and working you Nvidia Windows Users that Have 3D Glasses will have(To Build it on Windows lol ) to let me know how it looks.
                                Unless it works with the plastic movie type. Cause I have some of those.

                                I am going to go feed my kids and then I will tell you why I think this is the best place to start with the foundation for all other applications.

                                Let me know what you think.
                                Last edited by zester; 05-16-2013, 06:43 PM.