[X3D-Public] [FreeWRL-develop] .x3z and minizip; bundling of resources for X3D binary
michalis.kambi at gmail.com
Mon Oct 14 15:01:56 PDT 2013
doug sanden wrote:
> So instead of a plugin being passed an http:// url, and
> pulling resources one by one, a web browser may offer to DownloadFile
> and SaveAs. Then you would open it as a local file with your web3d tool.
> That works well for scenes with no url resources. If it has urls with
> relative paths, the program that opens the local file will have no idea
> of the original base url, and won't be able to pull/download relative resources.
The data URI scheme, already supported by many VRML/X3D browsers, also
allows to embed any content inside a single X3D file. See
http://en.wikipedia.org/wiki/Data_URI_scheme , example file from
. One advantage is that it works the same in HTML, and in all other
formats that use URLs, and there's no need to extend the specification:
you can just say "everywhere where URL is allowed, data URI is also Ok".
Anyway, the idea of bundling in a zip file is also very promising. For
one thing, you can read X3D file 1st, and only later load the remaining
resources (e.g. you can decompress texture data from disk in parallel to
loading mesh data to GPU, if you want to go crazy with optimizing load
time :). This is not really possible with data URI (as you have to
actually download the whole data URI contents to be able to parse the
rest of the file). Well, assuming that zip file is compressed with
doc.x3d file first, but that should be perfectly possible AFAIK.
Great job, and personally I would enjoy standardizing this idea in X3D.
The idea of bundling resources in a zip file is common in game engines
(especially useful to distribute game mods), and as I'm implementing a
game engine using X3D --- it would be cool if it would be just a
standard X3D feature :)
More information about the X3D-Public