No announcement yet.

Linux Game Development and a Qt Developers Rage

  • Filter
  • Time
  • Show
Clear All
new posts

  • #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.