[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] WebGLTF: Proposal for a WebGL transmission format



Hi Ken,

You are  absolutely right, and actually there was this comment in the WIKI "spec".
"TODO: introduce compression with binaries."

I'll add now the reference to webgl-loader.

Thanks
Fabrice.

On Nov 2, 2012, at 1:23 PM, Kenneth Russell <kbr@google.com> wrote:


https://github.com/fabrobinet/collada2json/wiki/WebGLTF indicates
there is no compression of the binary portion of the meshes. I would
like to strongly recommend using the webgl-loader project for this
purpose: https://code.google.com/p/webgl-loader/ . It's been
demonstrated in the Google Body project that this technique achieved
excellent compression results and run-time performance, and since then
the compression ratio has been improved even further.

-Ken


On Fri, Nov 2, 2012 at 12:58 PM, Florian Bösch <pyalot@gmail.com> wrote:
I'm doing it like this

length = new Uint32Array(data, 4, 1)[0]
metadata = new Uint8Array(data, 8, length)
result = ''
for i in [0...length]
   result += String.fromCharCode(metadata[i])
result = JSON.parse(result)



On Fri, Nov 2, 2012 at 8:56 PM, Rico P. <mailtorico@gmail.com> wrote:

Interesting... How can I convert a binary blob back into a string?

- Rico

2012/11/2 Florian Bösch <pyalot@gmail.com>:

Note that you can pack both the JSON and the binary blobs into one array
buffer. A format I'm using is built like this: <uint: length of json
string>
<json> <buffers>

Where the json part contains offsets/lengths of the buffers relative to
the
start of the binary part.


On Fri, Nov 2, 2012 at 7:33 PM, Fabrice Robinet <fabricerobinet@me.com>
wrote:

Dear WebGL group,

I'd like to share with you a work in progress to define a JSON format
for
WebGL.
This initiative was initially started from the COLLADA working group.
It aims to be a response to developers expectations to get 3D assets
seamlessly on the web.
This is an entirely new format that stands at the end of the asset
pipeline, it can be generated from COLLADA, but it is not tied to it.

This format reuses as much as possible existing concepts (like using
typed
arrays for binary blobs ) and it is _javascript_ friendly with JSON. It
also
takes advantage of a few concepts inherited from COLLADA that proved to
be
successful.

There are already many JSON formats out there, so why another one ?
One implicit goal of this project is to gather all the great ideas from
the community and focus on the particular purpose of getting a JSON
format
usable for many developers. But obviously, a single format cannot be
convenient for everyone,  for those (many) who want a delivery format
ready
for rendering, this effort is the way to go, for those who want to
edit/remodel 3d assets and keep most informations then COLLADA would be
better suited.

General presentation of the top level project:
https://github.com/fabrobinet/collada2json/

More insights about the format (work in progress):
https://github.com/fabrobinet/collada2json/wiki/WebGLTF

Last but not least, I'll be presenting the format at this meet-up:
https://github.com/fabrobinet/collada2json/
I'll show there some demos that will be online shortly.

All feedback is very welcome,

Thank you,
Fabrice.





-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------