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

Re: [Public COLLADA] what's the point to the vertices node/structure?



Some tools and use-cases need to know about all of the mesh vertices without regard (i.e. invariant) to tessellation. This means that each unique vertex in the mesh needs to be identifiable, even if there are no primitives at all ... or one that covers the whole mesh (your suggestion).

The <vertices> element is the most concise way to represent and preserve that identity.

Regards,
Mark


On Fri, Jan 21, 2011 at 5:04 PM, Morten Mikkelsen <mikkelsen7@gmail.com> wrote:
I am well aware of the use of multiple index lists. These threads don't answer my question.
Unlike that guy's example I put offsets in the "suggested" layout to indicate my awareness.
My question is why do you need the vertices encapsulation at all. You can achieve the same
thing with my suggested syntax below. It works with multiple index lists and you can still identify
the position from the semantic. You can also identify any other vertex data which shares index list with the positions
from whether or not they share the offset attribute.


---------------------------- Suggested alternative without vertices structure ----------------------------
<polylist material="initialShadingGroup" count="6">
<input semantic="POSITION" source="#pCubeShape1-positions" offset="0"/>
<input semantic="NORMAL" source="#pCubeShape1-normals" offset="0"/>
<input semantic="TEXCOORD" source="#pCubeShape1-map1" offset="1" set="0"/>
<vcount>4 4 4 4 4 4</vcount>









On Fri, Jan 21, 2011 at 11:14 AM, Mark Barnes <mark@biodroid-entertainment.com> wrote:
This topic has been discussed several times on the COLLADA forums. For example:

https://collada.org/public_forum/viewtopic.php?f=3&t=120
https://collada.org/public_forum/viewtopic.php?f=12&t=1131

Regards,
Mark

--
Mark Barnes
Sr Software Architect, Biodroid
http://biodroid-entertainment.com
Khronos COLLADA work group chairman



On Tue, Jan 18, 2011 at 6:33 PM, Morten Mikkelsen <mikkelsen7@gmail.com> wrote:
I was hoping someone could point out to me what the point is to the vertices node in collada?
It seems to me OpenCollada just throws into it vertex positions under POSITION
and also any vertex attributes which share an index list with the positions (often vertex normals).

However, it seems the exact same thing could have been achieved by just making them regular inputs
in the polylist (or whichever prim is used) and then giving them identical offsets which is already a practice used
for all other inputs which did not go into "vertices".

According to the spec the vertices node structure is used to "identify" the mesh-vertices and at least one input
must have the semantic "POSITION". However, since the semantic identifies the positions then why
is the node vertices needed at all (see examples below)? The input could just as well have been supplied to
the polylist and any vertex attributes which "belong to vertices" would be identified by having the same offset.

Is there something here I am missing? I put an example below.

Thanks,

Morten.

----------------------------- As is in Collada ----------------------------

<vertices id="pCubeShape1-vertices" name="pCubeShape1-vertices">
<input semantic="POSITION" source="#pCubeShape1-positions"/>
<input semantic="NORMAL" source="#pCubeShape1-normals"/>
</vertices>
<polylist material="initialShadingGroup" count="6">
<input semantic="VERTEX" source="#pCubeShape1-vertices" offset="0"/>
<input semantic="TEXCOORD" source="#pCubeShape1-map1" offset="1" set="0"/>
<vcount>4 4 4 4 4 4</vcount>



----------------------------- Suggested alternative without vertices structure ----------------------------



<polylist material="initialShadingGroup" count="6">
<input semantic="POSITION" source="#pCubeShape1-positions" offset="0"/>
<input semantic="NORMAL" source="#pCubeShape1-normals" offset="0"/>
<input semantic="TEXCOORD" source="#pCubeShape1-map1" offset="1" set="0"/>
<vcount>4 4 4 4 4 4</vcount>