Re: someone check this out

Timothy F. Rohaly ([email protected])
Thu, 11 May 1995 08:45:12 -0400


On May 10, 18:28, Kevin Goldsmith wrote:
> Subject: someone check this out
> Hey, since my SGI machine is not connected to the Internet, I can't
> really test out my wrl files. Also it seems that the webspace browser
> gets pretty screwed up on my stuff (try turning from side to side).
>
> Can someone take a look at my vrml scene and tell me if it works and if
> webspace barfs for them as well?
>
> Also, is there a way to specify that polys are one-sided in VRML? I
> don't see anything in the spec, but as shapeHints go, that's a useful one.
>
> http://www.etext.org/Zines/UnitCircle/vrml/digitalmediaroom.wrl
>
>
> thanx,
>
> Kevin
>-- End of excerpt from Kevin Goldsmith

Hi,
If by barfing you mean the triangular flashing of your "doors",
that is caused by co-planar polygons (z-buffer precision). Best to
make doors as actual polygons built into your walls, or textures pasted
on your walls, than to use coplanar polygons. Likewise for the region
under your "compressor".

I didn't see anything wrong which can be attributed to WebSpace, but
I did notice some problems with your world:

1) Your server doesn't deliver the correct MIME type, so your file comes
across as text rather than x-world/x-vrml.

2) You use capital letters in your WWWInline names, but your inline .wrl
files have only small letters in their names, so the Inlines aren't found
and don't load.

3) You have an instance of PER_FACE binding where you only specify 5 normals
for 10 faces (the walls) and an instance of PER_FACE binding where you
only specify 2 normals for 4 faces (the doors). You should have one normal
per face for both cases. Also, you have an instance of DEFAULT binding
(which is PER_VERTEX_INDEXED, BTW) where you specify 30 normals (the walls)
but you only need 5 (the normalIndex points to the correct one), and
another instance of DEFAULT binding where you specify 12 normals (the
doors)
but you only need 2.

Specifying normals wrong can lead to some really weird effects.
You can always leave off these nodes, they will be generated automatically
for you by the browser (at some performance penalty). On an SGI with
Inventor installed you can use ivnorm to automatically add the correct
normals to your file.

4) The nesting of your Separators is unusual, but not necessarily wrong.
Why do:

Separator {
Coordinate 3 {}
Normal { } < These two nodes don't get used
NormalBinding {} < by the IndexedFaceSet
Separator {
Normal { }
NormalBinding {}
IndexedFaceSet {}
}
}

Why not just:
Separator {
Coordinate 3 {}
Normal { }
NormalBinding {}
IndexedFaceSet {}
}

As far as one-sided polygons go, Inventor (and I guess WebSpace) uses a
default ShapeHints {vertexOrdering UNKNOWN_ORDERING} which turns off
both backface culling and two-sided lighting. So unless you specify otherwise
through a ShapeHint node you will get one-sided lighting.
*This could be made clearer in the spec!*

Hope this helps,
Tim.