No announcement yet.

Frustrated with documentation

  • Filter
  • Time
  • Show
Clear All
new posts

  • Frustrated with documentation

    I want to do something very simple: I want to create a 3d object programatically.

    That is, I want to manually generate the vertices, normals, faces, etc.

    Not a complex object, even being able to do a cube (without using the built inprimitive for a cube) would be a good start,

    There is a 'Tutorial" on a custom geometry, but unfortunately the tutorial is lacking in helpful information, and has some cryptic comments and random code fragments without any direction on where those code fragments go. Some of the example code int he fragments inst even compilable...

    Is there anyone, anywhere that has an example of constructing a simple 3D object that compiles? Does anyone have documentation for the wave engine with actual descriptions/text/information, instead of tautological, tool-generated descriptions like "Model path. This is the ModelPath", without any helpful information? I am wondering if I am just not looking in the right area.

    None of the GIT repository samples in Samples-Master or QuickStarters-master seem to generate a simple custom 3D Mesh...Anyone have an example?

  • #2
    Hi MTC,

    The source code of this sample is available in the GitHub repository:

    If you have problems in the build and compilation of this sample, please, share with us your compilation errors.
    Respect the documentation issues, we are trying to improve our documentation quality, every release we improve a little our documentation.

    In our published Components, there are some references to how to create custom meshes:

    Best regards,
    David Ávila


    • #3
      Hi David

      The CustomGeometry sample was of course the first one I looked at. But it creates an object with exactly 1 polygon, a triangle, which is not helpful.

      The tutorial for "Creating Geometry" says: Objectives

      Be able to create a Geometry Object.
      For example a Cube.

      "In this example we are going to create a cube Class and initialices it."

      If the intent was that a user wanting to create their own 3D Object was to use the CustomGeometry example, and make the leap from a single polygon, to a multifaced 3D object... well, it is frustratingly not enough. The tutorial at least looks promising, because it creates 6 faces, and surface normals, which would be necessary, but unfortunately it just includes throw away comments when actual information is needed, like:
      "Getting the Cube
      And later in Model class we can just create a static method and get as many cubes we want, only using your new primitive with ModelRenderer component.

      publicstatic Model CreateCube(float size)
      Model cube = new Model(string.Empty) { InternalModel = new InternalStaticModel() };
      cube.InternalModel.FromPrimitive(WaveServices.GraphicsDevice, new Cube(size));

      return cube;


      But what does "Later in Model class" mean? Do we derive our own class from Model? Where can we even use this code fragment? Even if I derive my own class, and add this function, the compiler tells me that "InternalModel is read-only" - so it wont compile.

      I also needed to know how to use the constructor for the Mesh object to pass the necessary arrays of vertices, faces, normals, etc for more than a single polygon... but and the "help documentation" for the Mesh constructor through visual studio looks like this:

      // Summary:
      // Initializes a new instance of the WaveEngine.Common.Graphics.Mesh class.
      // Parameters:
      // vertexOffset:
      // The vertex offset.
      // numVertices:
      // The num vertices.
      // startIndex:
      // The start index.
      // primitiveCount:
      // The primitive count.
      // vertexBuffer:
      // The vertex buffer.
      // indexBuffer:
      // The index buffer.
      // primitiveType:
      // The primitive type.

      This is what I meant by tool-generated descriptions. There is absolutely no helpful information there.

      To make matters worse, if you try to go to the "Documentation" link from the main website, and look up the members of the Mesh object, "Mesh Members" you get:


      ...a "404 not found error".

      If you try to click on "Mesh Constructor" you get, instead:

      a page for "TilingMaterial.CurrentTechnique Property"?

      So, to summarize,

      1: There is no documentation available through visual studio
      2. There is no documentation available through the website
      3. There is a tutorial that attempts to explain how to create a 3D object, but it only has cryptic fragments of an unavailable project and
      4. It compounds the problem by then referring back to the "CustomGeometry" sample which doesnt even do what the tutorial claims is the objective , to create a cube as a geometry object (and not a primitive)

      All I want is a sample that A] does what the tutorial does (Create a custom geometry 3D multifaces object without using the primitives), and B] is buildable

      Even basic, rudimentary documentation would help

      Attached Files


      • #4
        I realize I am coming across as demanding...I apologize... I'm a bit autistic.

        I just want to create my own "primitives"... an octahedron for example, without having to reinvent the wheel.

        I have been able to create one, but it's been ridiculously complex. I've had to:

        1] Download the entire "Components-Master" tree from Git,
        2] Hack the WaveEngine.components.csproj . project file to get Visual Studio 2012 to like it (missing Stylecop files?)
        3] Hack the multiple problems with the posted source to get it to build (add several missing unimplemented interface methods, like Model.HasCollisionInfo, SkinnedModel.HasCollisionInfo, TouchGestures.TouchorderChanged, chang it to an unsigned assembly since I don't have a matching assembly signing key, etc)
        4] Build my own versions of the WaveEngine dlls
        5] Edit and add my own primitives to the WaveEngine.Components.DLL
        6] Change all the project references to use my own custom DLLS

        Sure, it works (I added an octahedron primitive to replace the standard cube one) - but surely there has to be an easier way to just create an octahedron.

        Is this what you expect users of the wavengine to do? I dont really want to have to add a primitive in a custom version of the DLLS - it seems excessive. Not everyone is going to be able to build their own version of the waveengine from the code that is posted...


        • #5
          Hi MTC,

          Thanks for your feedback, I can assure we really appreciate it.

          We've internally discussed plenty of times what we could do with our documentation. Nowadays, we're working on a new wiki where we expect you users could help us to build. We are still doing some tests to see how to achieve it, but looks promising. We don't have an ETA, but I'm personally working on it every week. And we're beginning with a Getting Started.

          Regarding the custom geometry, I've made this a few times in some projects, and definitely there's no need to tweak Wave's Components, this' something you can achieve with the stable build version which comes with the installer. Please, have a look to this thread which can solve your questions:

          Again, thanks for your thoughts.




          • #6
            Thanks Marcos

            I see some other people went down exactly the same path that I did, had the exact same ideas I had, and ran into the exact same problems. Now I don't feel so dumb

            I was able to create my own ModelRenderer class, and create objects with my own vertices and normals, and they seem to render okay (correct hidden surface removal, rotation, etc)

            Im still a little baffled by texture coordinates though.

            But I am enjoying the WaveEngine a little more.

            I have another request for some information, but I will start another thread for that.

            Thanks for your work