-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Joan,

> 2) My file has a Material node that looks like:
> 
> appearance Appearance { material Material { } }

Which is invalid, because it specifies no material/color.

> 
> 3) I wrote out a version of it with much less geometry. I was able to
> load it in both osgviewer and in my program when I got rid of:
> 
> Group { children [ here is the whole vrml file ] }
>
> which was around the whole thing.

I guess that this was not translated properly to the OSG hierarchy. I
will have a look at it.  As I said before, the VRML plugin was intended
as a quick solution to load 3DS Max exported models and not as a general
VRML importer - there are thus some assumptions in the code which may
not be valid in general.

> 4) However, my vrml files has:
> 
> color Color { color [ 0.000000 0.304099 0.989031, 0.000000 0.315067
> 1.000000, 0.000000 0.315067 1.000000, 0.000000 0.315067 1.000000, 
> 0.000000 0.315067 1.000000, 0.000000 0.315067 1.000000, 0.000000
> 0.315067 1.000000, 0.000000 0.315067 1.000000, ] } colorPerVertex
> TRUE
> 
> And after it loads it the color is gone.  I wrote out the scene graph
> in .osg format immediately after loading the file and then looked at
> it.  I should see something like:
> 
> ColorBinding PER_VERTEX ColorArray Vec4Array 26238 { 0.532572
> 0.573407 0.544219 0.506753 ...
> 
> in the .osg file but in the one that got saved after loading my test
> wrl file I dont get any colors.  Getting per vertex colors into the
> scene graph is critical when doing scientific visualization as it is
> very common to color each vertex by the data value at that particular
> point in the data cube.

Color per vertex is not implemented in the plugin. It could be trivially
added, though. I can have a look at this next week when I am back from
vacation. It would help if you could provide me with a test file for the
development.

> 
> 5) With osgviewer I can load my test wrl file and see the image of
> the geometry but with my own program, while I can load the wrl file,
> my program crashes whenever I start up or navigate to a position in
> which the geometry can actually be seen.  It crashes in the call to:
> 
> mSceneView ->draw();
> 
> where:
> 
> osg::ref_ptr< osgUtil::SceneView >     mSceneView;
> 
> This happens both when I load the wrl file and when I load the .osg
> file that I saved from it.

No idea about this - because the problem happens even if you load an
.osg file (whether exported from VRML or not is immaterial), I think
that the bug is elsewhere than in the VRML plugin. Moreover, since it
works with the osgviewer itself (which calls exactly the same code), I
would suspect that your custom code is doing something dodgy. Try to get
a full backtrace to see where exactly it crashes inside OSG.

Regards,

Jan

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org

iD8DBQFGpy6+n11XseNj94gRAm42AJ4mnJSXWHkZuVIJLaCTw/QUM852ZACfQpEK
P+gbBixcKXhQJWEIj9yD9kY=
=zRfZ
-----END PGP SIGNATURE-----
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to