Binary Large Object (BLOB)

Steven
2011-08-03
2013-06-12
  • Steven
    Steven
    2011-08-03

    Instead of writing the x3d model directly into the HTML container, I would like to send and receive the x3d model as a binary large object (BLOB). As stated by the W3C Draft this should be possible with new browsers: http://dev.w3.org/2006/webapi/FileAPI/#reading-a-file
    Does X3DOM (now or in future) provide functions for dynamically inserting x3d code (e.g. from a database) as BLOBs into the DOM? I use very large 3D models and serializing them in a binary compressed mode is very desirable for me…

     


  • 2011-08-03

    This is a very desirable feature.  Unfortunately there is no support for binary compressed data right now.

    I started to explore various  ways of loading compressed XML X3D data (i.e. using the inline node) but work on that has been cancelled. I would be very happy if someone would continue this effort (please get in touch if someone is interested).

    There is a experimental feature in development which uses PNG images to store geometry data. Please watch the blog for announcements on that front.

    Andreas

     
  • Johannes Behr
    Johannes Behr
    2011-08-05

    We are working on a X3D/Binary hybrid which will support _very_ large data-sets. First results are online: http://x3dom.org/x3dom/example/x3dom_imageGeometry.html. Full feature set will be announced next week at siggraph

    best regards
    johannes

     
  • Goodwin Lawlor
    Goodwin Lawlor
    2011-08-10

    Hi,

    Are there any docs on how to encode the geometry data as PNG images?

    Thanks,

    Goodwin

     
  • Johannes Behr
    Johannes Behr
    2011-08-12

    Not yet. It's still evolving. But we will provide some more information soon.

    best regards
    johannes

     
  • Hi,

    Is there any new information about Image Geometry node and how to use?

    It would be great using it in my project!

    Thanks,

    JuanGa

     
  • pgab
    pgab
    2012-05-28

    Hi juangabreil,

    basically you transfer a PNG image. Each pixel of the picture represents a vertex. The red channel therefore represents the x, the green channel the y and the blue channel the z coordinate respectively. For a surface then 3 vertices make up one triangle. Thus it is very inefficient because you have to transport several vertices more than once. Furthermore you will lack precision as you just have values between 0 and 255 to encode your geometry.

    You should consider the binary aspect of transporting geometries. You can find some examples here http://examples.x3dom.org/buddha/ (for the PNG and Binary usage). The binary approach is imho to be preferred over the image geometry.

    Hint: The project has moved to https://github.com/x3dom/x3dom/

     
  • Ok, I will use binary geometry nodes. These binary files contain a raw list of vertices? Do they have more information? Where can I find more documentation??

    Thank you very much,
    Juanga

     
  • pgab
    pgab
    2012-05-29

    Hi Juanga,

    it depends on the type of geometry you will use. For a TIN you put in one file the raw vertices as floating point values. You just put x1,y1,z1,x2,y2,z2 and so on. You will also need an index file telling which vertices form a triangle (this very much like you do it with an IndexedFaceSet). And in a third file you will have to give the normals per vertex: nx1, ny1, nz1, nx2, ny2, nz2 and so on.

    Sadly there is not very much information yet although X3DOM references here the X3D Standard but I was not able to find any information there. I got almost everything from looking at the examples and X3DOM Javascript itself. Hopefully there is going to be more information in future.

    Regards,
    Paul

     
  • Yvonne Jung
    Yvonne Jung
    2012-06-01

    There will be a paper on this at Web3D 2012.
    But for now: just write (as binary file, "wb") the vertex attribs as float array, as mentioned, and the indices as unsigned short.

     
  • Hi,

    I have done several tests (converting several IndexedFaceSets into BinaryGeometry) and I can't make textures work properly. Are textures supported in binary geometry nodes? Is there any example about this?

    Thank you very much!
    Juanga

    PD: I'm eager to read this paper.

     
  • Yvonne Jung
    Yvonne Jung
    2012-06-04

    Hi,

    textures should work, here is the node interface - perhaps a typo?

    BinaryGeometry : X3DGeometryNode {
      ...
      MFInt32  [in,out] vertexCount []
      MFString [in,out] primType    ["triangles"]
      SFString [in,out] index       ""
      SFString [in,out] coord       ""
      SFString [in,out] normal      ""
      SFString [in,out] texCoord    ""
      SFString [in,out] color       ""
    }
    
     
  • Yvonne Jung
    Yvonne Jung
    2012-06-04

    According to the warning in the IFS example, there might have been something gone wrong in the conversion to a singleIndex mesh. Which tool do you have used for that?

     
  • I used Geomagic to obtain an obj file and then I exported it to x3d using meshlab.