[X3D-Public] Support for submeshes?

Cecile Muller newsletter at wildpeaks.fr
Sun Feb 3 23:13:51 PST 2013


Hi Dave,


Your second idea is indeed correct: DEF the Coordinate node in the first
Shape and USE it
in the other Shape, that way you can have a difference Appearance for each
submesh.


For example:

#X3D V3.0 utf8

Shape {
appearance Appearance {
 material Material {
emissiveColor 0 1 0
}
 }
geometry IndexedFaceSet {
 coord DEF all_coord Coordinate {
point [-1 0 0, 0 0 0, 1 0 0, 0 1 0]
}
 coordIndex [0 1 3 0 -1]
}
}

Shape {
appearance Appearance {
 material Material {
emissiveColor 0 0 1
}
 }
geometry IndexedFaceSet {
 coord USE all_coord
coordIndex [1 2 3 1 -1]
}
}


If it's cumbersome, you could have a Script that creates the Shape nodes
wrapped in a PROTO to have a more friendly interface.


See you,
Cecile

2013/2/1 Dave A <dave at realmofconcepts.com>

> Hey all,
>
> Been a while since I parsed the spec, but is there support for submeshes?
> You know, where one set of vertices is shared by different poly or
> triangle lists, and each of those lists
> corresponds to a different Appearance?
>
> Or would I have to create a Group under which I would put Shapes, with the
> first Shape's geometry containing the coordinate list (and first submesh's
> indices),
> then subsequent Shapes would USE that coordinate list, providing their own
> indices (and Appearances of course)?
>
> Cheers
>
> Dave A.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20130204/2de72d58/attachment.html>


More information about the X3D-Public mailing list