VRML loader

Does anyone know a vrml loader library for win32/VC++ plateform ?
Thanks a lot

Does anyone use VRML files in his 3D projects ??
:frowning:

Take a look at here:

http://www.cybergarage.org

Hope this helps…

I dont know about any VRML file loaders, i find them to not be the best type of model files. If you insist to use them you can make your own loader. Go to wotsit and do a search on VRML, i’m sure you’ll find some good documentation of the file.

That may not be the easiest way, but it is one way.

Good luck
-zix

Hi,
it is quite easy to write a loader for VRML-files, just take a look at the structure.

Here is an easy example

#VRML V2.0 utf8

Produced by 3D Studio MAX VRML97 exporter, Version 4.02, Revision 0.85

Date: Mon Feb 09 23:06:45 2004

DEF Quader01 Transform {
translation 0 0 0
children [
Shape {
appearance Appearance {
material Material {
diffuseColor 0.5882 0.5882 0.5882
ambientIntensity 1.0
specularColor 0 0 0
shininess 0.145
transparency 0
}
}
geometry DEF Quader01-FACES IndexedFaceSet {
ccw TRUE
solid TRUE
coord DEF Quader01-COORD Coordinate { point [
-10 0 10, 10 0 10, -10 0 -10, 10 0 -10, -10 20 10, 10 20 10,
-10 20 -10, 10 20 -10,
] }
normal Normal { vector [
1 0 0, -1 0 0, 0 1 0, 0 0 1, 0 -1 0, 0 0 -1, ] }
normalPerVertex TRUE
coordIndex [
0, 2, 3, -1, 3, 1, 0, -1, 4, 5, 7, -1, 7, 6, 4, -1, 0, 1, 5, -1,
5, 4, 0, -1, 1, 3, 7, -1, 7, 5, 1, -1, 3, 2, 6, -1,
6, 7, 3, -1, 2, 0, 4, -1, 4, 6, 2, -1]
normalIndex [
4, 4, 4, -1, 4, 4, 4, -1, 2, 2, 2, -1, 2, 2, 2, -1, 3,
3, 3, -1, 3, 3, 3, -1, 0, 0, 0, -1, 0, 0, 0, -1, 5,
5, 5, -1, 5, 5, 5, -1, 1, 1, 1, -1, 1, 1, 1, -1, ]
}
}
]
}


Parsed Structure from my VRML2OGL Converter

<DEF Quader01 Transform >
TRANSFORM translation = 0 0 0
[children ]
<Shape >
<appearance Appearance >
<material Material >
MATERIAL diffuseColor = 0.5882 0.5882 0.5882
MATERIAL ambientIntensity = 1.0
MATERIAL specularColor = 0 0 0
MATERIAL shininess = 0.145
MATERIAL transparency = 0
</material Material >
</appearance Appearance >
<geometry DEF Quader01-FACES IndexedFaceSet >
ATT ccw = TRUE
ATT solid = TRUE
<coord DEF Quader01-COORD Coordinate >
[ point ] DATA Koordinaten 6 DATA Koordinaten 8
[/ point ]
</coord DEF Quader01-COORD Coordinate >
<normal Normal >
[ vector ]
DATA Normalen6
[/ vector ]
</normal Normal >
ATT normalPerVertex = TRUE
[coordIndex ]
DATA coordIndex 6
DATA coordIndex 10
DATA coordIndex 12
[/coordIndex ]
[normalIndex ]
DATA normalIndex 5
DATA normalIndex 9
DATA normalIndex 12
[/normalIndex ]
</geometry DEF Quader01-FACES IndexedFaceSet >
</Shape >