Re: LANG: VRML 1.x Binary Format Proposal

James A. Nauer ([email protected])
Wed, 31 May 1995 15:04:40 -0400


[a lurker speaks up...]

Mark Waks wrote:

>Mark presents a proposal for a Binary format; it's sort of halfway
>between requirements and a design, I think. I general, it looks
>pretty sensible, but (inevitably) I have a few kibitzes and
>questions...

>>1) Tokenization of keywords
>>
>>The VRML 1.0 keyword set is full of compound words, like PerspectiveCamera,
>>Translation, or IndexedFaceSet. These are human-readable keywords, but the
>>computer certainly doesn't care about them. We have well under 255 keywords
>>in VRML 1.x, so a single-byte token stream for keywords would save as much
>>as 90% of total file size.
>
>Check; this makes plenty of sense. However, a suggestion: let's make
>sure we leave room for an expanded keyword set. We're well under 255
>keywords now, but I'm not confident that we will remain so forever.
>I'd suggest a one-or-two byte format, with the high-order bit indicating
>whether it's a one or two byte token. Put the 128 most common keywords
>into 1-byte tokens, and we've got nigh-infinite expansion space for more
>later. We get most of the benefit, with *far* less risk later.
>
>(Okay, so I'm overdesigning a bit. I think it's better to address these

I don't think it's a bit over-designed; a 255-keyword limit would be
exceedingly bogus, and your proposal allows us to retain the compactness of
Mark's (the other one :-) original proposal for now (until the keyword set
grows a bunch).
...
>>2) Fixed-point Arithmetic
>> [...]
>>The Macintosh has, in its Toolbox, the concept of fixed-point numbers.
>>These are generally 16 bits in length, and range +/- 128 in their integer
>>portion. This leaves 8 bits for the fractional portion, which can describe
>>objects with a resolution of 1/256th. This is quite suitable for most
>>applications of VRML.
>
>Theory and practice war within me. The purist positively shrieks at the
>concept of using such a coarse grain for numbers. The pragmatist points
>out that this is (assuming 1 unit == 1 meter) about 4-millimeter precision
>and a really big range, and may well be good enough for many objects.

Correction to Mark P's original message: the "Fixed" type that some Mac
Toolbox routines use is a 32-bit number (16 bit integer part, 16 bit
fraction part). This allows a decent sized coordinated grid (+/-32k), and
fractions small enough for quite a bit of precision.
OTOH, the point of the "Fixed" data type on the Mac was not to avoid
32-bit numbers, but to avoid expensive floating-point math computation. In
the case of VRML, it might be easier to just stick with 32 bit floats and
assume that a fairly studly FPU is part of the minimum hardware
requirement.

cheers,
--Jim

James A. Nauer | "I shall not yield one whit of maturity,
L.I.T. R & D Coordinator | not grace, not respectibility, to the
Library Information Technologies | passing of time. I declare that I shall
Case Western Reserve University | forever be, if not a child, certainly
(216) 368-MACS (368-6227) | childish" --Kennet Shardik
http://litwww.cwru.edu/lit/homes/jan3/jimhome.html