The goal of the vrml2eh package and the vrml2eh utility is to allow eh world builders to create VRML 'rooms' using third-party VRML tools and convert the resulting VRML output into a format readable by ehwt, the eh 3d graphics client. As such, it will only translate VRML worlds that follow the fairly restrictive rules for creating legal ehwt worlds:
Floors and ceilings must be strictly horizontal | |
Walls and other vertical elements e.g. stair fronts, column sides must be strictly vertical i.e. perpendicular to horizontal elements | |
Walls and other vertical elements, though they must be strictly vertical in the z-direction, can be arranged at any angle in the x-y plane, and at any angle relative to one other e.g. a hexagon | |
Windows and doorways can't be arranged so that one is above another within a particular wall, even partially e.g. a doorway with a transom above it won't work | |
Multiple-storey buildings aren't currently possible | |
Every surface must be covered with a texture | |
Texture dimensions must be powers of 2 | |
Horizontal and vertical texture dimensions can differ for a particular texture, but neither can be greater than 256 |
The ehwt world structure is essentially the same as the wt world structure on which it is based; see the wt Faq-worlds file bundled with the ehwt source distribution for more technical details.
In addition to the limitations imposed by ehwt world structure, vrml2eh handles only a very small subset of the VRML 2.0 spec, namely IndexedFaceSets. This doesn't really present much of a barrier to creating interesting worlds - given the ehwt world structure limitations described above, it doesn't make much difference whether world structures are defined in terms of shape primitives or IndexedFaceSets. It does mean that your VRML tool should support building or exporting structures in terms of IndexedFaceSets.
One final restriction relates to how vrml2eh handles walls containing windows. When vrml2eh encounters vertical elements(walls) specified by more than 4 vertices, such as walls outlining a doorway or walls containing windows, it will recursively break them up into vertical elements each containing exactly 4 vertices. In the particular case of walls containing windows, vrml2eh assumes that these walls are constructed by connecting one of the outer vertices of the wall diagonally to a vertex of the closest window, which is in turn connected to the next window in the wall, and so on, the vertex path returning to the first window vertex and finally back to the outer vertex. This is what the tool I've been using to create worlds, Paragraph's Internet3D Space Builder, generates, so it's what vrml2eh supports. It seems probable that other tools would generate similar faces for window-containing walls, but it's definitely tool-dependent. Note that this isn't an issue if walls are already broken up into rectangular faces before being passed to vrml2eh. The vrml2eh package uses the 'pw' VRML 2.0 parser library developed at the IICM (Institute for Information Processing and Computer Supported New Media), Graz University of Technology, Austria.