0

I'm using x3d file to load 3d data for my website. The x3d files created from blender is of huge size which increases the loading time. Is there any tool/way to compress the x3d file on the fly and decompress it in user's browser to improve the loading time?

  • Check whether gzip compression (*.x3d.gz) is compressing enough; should be. Then browsers that indicate gzip capability can be delivered .gz. Client resp. server HTML headers Accept-Encoding, Content-Encoding. In Java EE one would use a web filter. The same for other technologies. You need a fallback though. – Joop Eggen Jun 18 '20 at 11:16
  • @JoopEggen .x3d.gz is working good by compressing nearly 70% of original size. Now I didn't catch the whole idea of http headers in html. Could you please explain more or an example of where these headers will come in html? – Venkatraj GM Jun 21 '20 at 08:47
  • The client browser sends in its header an Accept-Encoding line and the server seeing that can delinver gzip compressed content with an header Content-Encoding. So this is an application feature. I do not know your options, what solution is possible. For purely static HTML (the lowest solution) [Javascript could read the client headers](https://stackoverflow.com/questions/220231/accessing-the-web-pages-http-headers-in-javascript), I cannot provide a solution here. And others seem to have the same problem. If you are using/can use PHP or other server side technolgy you would have more channce. – Joop Eggen Jun 22 '20 at 12:35

1 Answers1

0

There's an x3d compression standard for compression:

[https://www.web3d.org/documents/specifications/19776-3/V3.1/Part03/concepts.html#X3DCompressedBinaryEncodingFileSyntax][2]

A quick search shows this tool supports the format:

[https://savage.nps.edu/X3D-Edit/][2]

You could also explore breaking out objects into independent files, which may or may not be possible in your case :

[https://doc.x3dom.org/tutorials/models/inline/index.html][3]

Also, you could look into reducing texture image sizes, and reducing the mesh sizes with tools like Meshlab to do QECD (Quadric Edge Collapse Decimation), or use Blender's tools :

[https://all3dp.com/2/blender-simplify-mesh-simply-explained/][4]

Meshlab QECD :

[https://www.youtube.com/watch?v=PWM6EGVVNQU][5]
jmullee
  • 390
  • 3
  • 6