I am interested in using the vrml plugin so I can create models from
scientific vis programs such as OpenDX. I am using Linux Fedora Core 6.
By now I have read all the messages to this list about the vrml plugin from
June and July.
I downloaded openvrml-0.14.3 from sf.net/projects/openvrml as they have all
the back versions archived there. When I tried to build it according to Jan
Ciger's instruction:
./configure --prefix=/opt/openvrml-0.14.3 --disable-gl-renderer
- --disable-lookat --disable-script-node-javascript
I had a compile problem and ended up adding: --disable-text-node as follows:
./configure --prefix=/local/apps/openvrml-0.14.3/build --disable-gl-renderer \
--disable-lookat --disable-script-node-javascript --disable-text-node
I don't know whether or not that is causing the problem I am having, but I
have only a mesh in my .wrl file. I do not have text.
Then I rebuilt OpenSceneGraph-2.0 in my build directory by specifying:
cmake .. -DCMAKE_BUILD_TYPE=Release \
-DOPENVRML_INCLUDE_DIR=/local/apps/openvrml-0.14.3/build/include \
-DOPENVRML_LIBRARY=/local/apps/openvrml-0.14.3/build/lib/libopenvrml.so
However, when I load my wrl file with my own program I dont get any error
messages but I dont see any model either and my program reports:
-------Scene Bounding Sphere-------
Radius: -1
Center: 0 0 0
---------Scene Bounding Box-------------
X goes from 3.40282e+38 to -3.40282e+38
Y goes from 3.40282e+38 to -3.40282e+38
Z ( height ) goes from 3.40282e+38 to -3.40282e+38
Which tells me that no model was loaded
With OSG_NOTIFY_LEVEL set to DEBUG and osgviewer, I get:
itr='/local/apps/OpenSceneGraph-2.0/build/lib/'
FindFileInPath() : trying /local/apps/OpenSceneGraph-2.0/build/lib/osgdb_vrml.s
o ...
itr='/local/apps/OpenSceneGraph-2.0/build/lib/osgPlugins-2.0.0/'
FindFileInPath() : trying /local/apps/OpenSceneGraph-2.0/build/lib/osgPlugins-2
.0.0/osgdb_vrml.so ...
FindFileInPath() : USING /local/apps/OpenSceneGraph-2.0/build/lib/osgPlugins-2.
0.0/osgdb_vrml.so
Opened DynamicLibrary osgdb_vrml.so
Stats before:
Object Type #Unique #Instanced
StateSet 0 0
Group 0 0
Transform 1 1
LOD 0 0
Switch 0 0
Geode 0 0
Drawable 0 0
Geometry 0 0
Vertices 0 0
Primitives 0 0
and again I dont see anything except the background color.
Not knowing whether it was my wrl file, I downloaded the sample.wrl that was
suggested as a test. I still don't see anything in the graphics window but
the output reports:
Stats after:
Object Type #Unique #Instanced
StateSet 6 6
Group 0 0
Transform 7 7
LOD 0 0
Switch 0 0
Geode 6 6
Drawable 6 6
Geometry 6 6
Vertices 6972 6972
Primitives 6972 6972
DriveManipulator::_height set to ==1.5
getCoordinateFrame(2.894 -2.12399 0)
no coordinate system found, using default orientation
Setting terrain manipulator _minimumDistance to 0.143972
Viewer::realize() - No valid contexts found, setting up view across all
screens.
GraphicsContext::getWindowingSystemInterface() 0x9f76e78 0x5dc048
So at least it got some vertices.
Can you see what is wrong here?
The wrl file as output from OpenDX, even though it just contains a mesh, looks
different from your sample. I am appending some of it to this message.
Thanks
Joan Slottow
UCLA Academic Technology Services
---------------------------------
#VRML V2.0 utf8
NavigationInfo {
type ["EXAMINE","WALK","FLY"]
}
Group {
children [
Shape {
geometry IndexedFaceSet {
solid FALSE
ccw FALSE
coord Coordinate{
point [
78.000000 -180.000000 1.000000
66.000000 -180.000000 1.000000
...
-78.000000 156.000000 1.000000
-90.000000 156.000000 1.000000
]
}
coordIndex [
0 1 16 15 -1
1 2 17 16 -1
...
207 208 223 222 -1
208 209 224 223 -1
]
color Color {
color [
1.000000 0.342466 0.000000,
1.000000 0.246576 0.000000,
...
1.000000 0.520548 0.000000,
0.985540 0.903349 0.000000,
]
}
colorPerVertex TRUE
normal Normal {
vector [
0.000000 0.000000 1.000000
0.000000 0.000000 1.000000
..
0.000000 0.000000 1.000000
0.000000 0.000000 1.000000
]
}
}
appearance Appearance {
material Material {
}
}
}
Shape {
geometry IndexedFaceSet {
solid FALSE
ccw FALSE
coord Coordinate{
point [
-90.000000 -180.000000 1.000000
-78.000000 -180.000000 1.000000
...
}
}
appearance Appearance {
material Material {
}
}
}
...
Viewpoint {
position -6 -12 2660.7
}
]
}
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/