> Hans Holten-Lund writes:
> > I was wondering how we are supposed to cesate surface detail
> > polygons in VRML.
>
> You can't, unfortunately.
Then we really should consider including support for them in VRML!
>
> > Such polygons are *ATTATCHED* to a parent polygon, and are
> > drawn on top of the parent polygon, if it is not back-face
> > culled.
>
> Yes, they'es a good idea both for performance reasons and to avoid
> problems with shallow Z-buffers.
Exactly!
>
> > Attatched polygons are available in Lightwave and the old
> > Videoscape3D
>
> And in Superscape, and probably lots of others as well. Not sure how the
> converters handle this case; the best they could probably do is to move
> the detail polys along their normal by some small (user-settable?) amount.
>
> The problem is that if the amount is too big you get the "windows floating
> in front of the wall" effect you described in your message, and if the
> amount is too small you hit the resolution limits of the Z buffer and get
> the nasty "smesdded polygon" effect.
How about this extension field to the IndexedFaceSet node:
IndexedFaceSet {
attatchIndex [ -1, -1, -1, 5, 6, 7, -1, -1 ] # MFLong
# ^ ^ ^ ^ ^
# 0 1 2 3 4
# a triangle is attatched to polygon 3
}
which defines polygons attatched onto the polygons defined in the
coordIndex field, while remaining compatible with the "old"
coordIndex field structure.
We should also be able to attatch more than one polygon, so:
IndexedFaceSet {
attatchIndex [ -1, -1, -1, 5, 6, 7, -2, 12, 13, 14, -1, -1 ] # MFLong
# ^ ^ ^ ^ ^ ^
# 0 1 2 3 !!! 4
# *TWO* triangles are attatched to polygon 3
}
An attatched polygon uses the same normals as its parent, but (usually)
another material/texture, so we'll probably also need:
attatchMaterialIndex
attatchTextureCoordIndex
How about this?? Any comments??
Mvh. Hans Holten-Lund.
EMail: [email protected] WWW: http://www.id.dtu.dk/~hahl
Dept. of Computer Science Technical University of Denmark.