[X3D-Public] containerField is should or must ? largeattributes; compression

Dave dave at realmofconcepts.com
Mon Aug 23 21:46:01 PDT 2010


I see. Sorry, I jumped into the middle of the discussion. I thought 
maybe this type of thing would make some more sense
to me if it were about Proto fields, although I'd do them a bit 
differently anyway. I was using 'pigeon code' for illustrative purposes.

But please, don't create a spec around (current) technological 
shortcomings. It's been done (limit of 8 lights for example).
Plain-text xml compresses pretty well anyway. I can see where you're going.

Here are some suggestions. Note that IS-A and HAS-A are followed. That 
is, lists (MF's) are contained in an element. Quotes
left out:

<IndexedTriangleSet>
<Coordinates>
<point n=0 x=0 y=0 z=0 u=0 v=1 r=.5 g=.1 b=.5 a=.5 />  // you can pack 
it all in one line in my dreams, n=index value
<point n=1 x=0 y=1 z=0 u=0 v=0  />   // uses default color
    ....
</Coordinates>
<Indices>
<Index a=0 b=1 c=2 />   // uses the 'n' index from the points in the 
Coordinates list, where a,b,c are the 3 vertex indices of a triangle
<Index a=0 b=2 c=3 />
  .....
</Indices>

or
<Indices>
<Index n=0 /> // where 'n' corresponds to the 'n' index in 'point' in 
the Coordinates list
<Index n=1 />
  .....
</Indices>

Dave A
<

On 8/23/2010 12:29 PM, Joe D Williams wrote:
>> What are you guys thinking???
>
> not sure, can you give an example of some x3d code?
> what you gave for color and vec is not x3d although a style sheet 
> transformation will do it.
>
> The container fieldValue is not meant to carry a bunch of attributes, 
> just to serve when the field of strongly typed attribute values is 
> "too big" for the parser in use.
> The count attribute is added due to collada influence, but the @name 
> is the same as the attribute name it is replacing and the contained 
> data is of the same type, as found in the schema/dtd.
>
> Back to Behr example, the 9 is corrected to a 3 and the count can be 
> ommitted.
>
>>> <IndexedTriangleSet>
>>> <fieldValue count="3" name="index">
>>>              0 1 2
>>> </fieldValue>
>>> <Coordinate>
>>> <fieldValue count="3" name="point">
>>>                0 0 0, 1 0 0, 0 1 0
>>> </fieldValue>
>>> </Coordinate>
>>> <Color>
>>> <fieldValue count="3" name="color">
>>>                0 0 1, 1 0 0, 0 1 0
>>> </fieldValue>
>>> </Color>
>>> </IndexedTriangleSet>
>
> Again, not the recommended coding practice except where needed due to 
> processing problems.
>
> Thanks and Best Regards,
> Joe
>
>
>
>
> ----- Original Message ----- From: "Dave" <dave at realmofconcepts.com>
> To: "Johannes Behr" <johannes.behr at igd.fraunhofer.de>; "'x3d public 
> mailing list'" <x3d-public at web3d.org>
> Sent: Monday, August 23, 2010 10:45 AM
> Subject: Re: [X3D-Public] containerField is should or must ? 
> largeattributes; compression
>
>
> <color type='diffuse' r='b' g='1' b='1' a='0' />
> <vec x='0' y='0' z='0 '/>
>
> What are you guys thinking??? Why are you trying to make it even more
> bellicose than it already is? Are
> you looking at Collada as an example of 'good xml'? It's not. GO look at
> OgreXML.
>
> Even if you wanted to go with this 'fieldValue' thing, why a string of
> numbers in wild text?
>
> At some point, a parser needs to read data into some typed variable
> (unless it's java or javascript, right?)
> And data is ultimately validated at that point. Are you trying to get
> pre-parsers (like DTD validation etc)
> to do this job for you? Waste of time, unnecessary complication.
>
> XML elements are containers. The parsers will tell you how many things
> they contain. No need for counts.
> No need for 'container field' or anything like that. If you feel the
> need for that stuff, you have done
> something wrong in your XML design. Sorry, but I done a lot of it (at a
> basic level), it's just not that
> complex.  Try applying 'IS-A' and 'HAS-A' paradigms, it really helps.
>
> Dave A
>
> On 8/23/2010 8:30 AM, Johannes Behr wrote:
>> On 23 Aug 2010, at 17:06, Joe D Williams wrote:
>>
>>
>>> also, same for color - three points and three colors - in the 
>>> example. One of the greatest conveniences of X3D is dealing in real 
>>> verifyable structured strongly typed fields. I still see 
>>> the<fieldValue>  element as a stopgap and emergency measure (instead 
>>> of just naming the element by the attr data name) but that should 
>>> not mean we drop strong field typing at any authoring step.
>>>
>>> Thanks Again and Best Regards,
>>> Joe
>>>
>>>
>>>
>>>
>>>
>>> ----- Original Message ----- From: "Joe D 
>>> Williams"<joedwil at earthlink.net>
>>> To: "Johannes Behr"<johannes.behr at igd.fraunhofer.de>; "John A. 
>>> Stewart"<alex.stewart at crc.ca>
>>> Cc: "X3D Graphics public mailing list"<x3d-public at web3d.org>
>>> Sent: Monday, August 23, 2010 7:54 AM
>>> Subject: Re: [X3D-Public] containerField is should or must ? 
>>> largeattributes;compression
>>>
>>>
>>> I disagree with count field here
>>>
>>> <fieldValue count="9" name="point">
>>>                0 0 0, 1 0 0, 0 1 0
>>> </fieldValue>
>>>
>>> I think the count should be 3 because point is an MFVec3f.
>>> In order to get the validation in the same way as for attrs, then the
>>> count if given should match the number of fields expected when trhe
>>> data was encoded as an attribute.
>>>
>> You are right. This was a copy&paste bug.
>> This should and must be 3 for correct allocation.
>>
>> regards
>> johannes
>>
>>
>>> Thanks and Best Regards,
>>> Joe
>>>
>>>
>>>
>>> ----- Original Message ----- From: "Johannes 
>>> Behr"<johannes.behr at igd.fraunhofer.de>
>>> To: "John A. Stewart"<alex.stewart at crc.ca>
>>> Cc: "X3D Graphics public mailing list"<x3d-public at web3d.org>
>>> Sent: Monday, August 23, 2010 4:08 AM
>>> Subject: Re: [X3D-Public] containerField is should or must ?
>>> largeattributes; compression
>>>
>>>
>>>
>>> On 9 Aug 2010, at 15:18, John A. Stewart wrote:
>>>
>>>
>>>> On 2010-08-09, at 12:49 AM, Braden McDaniel wrote:
>>>>
>>>>>>
>>>>>> so the idea is appealing.  has anybody yet:
>>>>>> - implemented it in a player, or estimated the work-effort involved?
>>>>>>
>>>>> I think I recall reading that this is implemented in InstantReality.
>>>>>
>>> Yes it is. The InstantReality loader can handle data encoded in
>>> CData-blocks since beta7
>>> The count-field is optional:
>>>
>>> <IndexedTriangleSet>
>>> <fieldValue count="3" name="index">
>>>              0 1 2
>>> </fieldValue>
>>> <Coordinate>
>>> <fieldValue count="9" name="point">
>>>                0 0 0, 1 0 0, 0 1 0
>>> </fieldValue>
>>> </Coordinate>
>>> <Color>
>>> <fieldValue count="9" name="color">
>>>                0 0 1, 1 0 0, 0 1 0
>>> </fieldValue>
>>> </Color>
>>> </IndexedTriangleSet>
>>>
>>> regards
>>> johannes
>>>
>>>
>>>> It was (is), as well as in FreeWRL, if the X3D header indicates 
>>>> version 3.3
>>>>
>>>> -----------------------------------------------------------
>>>> John A. Stewart
>>>> alex.stewart at crc.ca
>>>>
>>>> Network Systems and Technologies -
>>>>        Systemes et technologies des reseaux
>>>> Communications Research Centre Canada  |
>>>>         Centre de recherches sur les communications Canada
>>>>
>>>> 3701 Carling Ave.  |  3701, avenue Carling
>>>> PO Box 11490, Station H  |  CP 11490, succursale H
>>>>         Ottawa ON K2H 8S2   |  Ottawa (Ontario) K2H 8S2
>>>>
>>>> http://www.crc.ca
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> X3D-Public mailing list
>>>> X3D-Public at web3d.org
>>>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>>>
>>> -- 
>>> Dr. Johannes Behr
>>> Leiter Projektbereich VR
>>>
>>> Fraunhofer-Institut für Graphische Datenverarbeitung IGD
>>> Fraunhoferstr. 5  |  64283 Darmstadt  |  Germany
>>> Tel +49 6151 155-510  |  Fax +49 6151 155-196
>>> johannes.behr at igd.fraunhofer.de  |  www.igd.fraunhofer.de
>>>
>>>
>>> _______________________________________________
>>> X3D-Public mailing list
>>> X3D-Public at web3d.org
>>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>>
>>>
>>> _______________________________________________
>>> X3D-Public mailing list
>>> X3D-Public at web3d.org
>>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>>
>> --------
>> Dr.-Ing. Johannes Behr tel: +49-6151-155-510
>> Fraunhoferstr. 5 fax: +49-6151-155-196
>> D-64283 Darmstadt skype: johannesbehr
>> Germany web: www.igd.fhg.de/www/igd-a4/
>>
>>
>> _______________________________________________
>> X3D-Public mailing list
>> X3D-Public at web3d.org
>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>
>
> _______________________________________________
> X3D-Public mailing list
> X3D-Public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org



More information about the X3D-Public mailing list