DrDrake / osgocean

Automatically exported from code.google.com/p/osgocean
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Add ability to load models into oceanExample #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be nice to be able to load models into oceanExample to test them
and see them in/on the ocean.

This is simple to implement with osgDB::readNodeFiles(...) like osgviewer
does. And with the .trans, .rot and .scale pseudo-loaders, the user can do
what they want with their models to place them and see them in the scene.

Really simple but would be nice to have.

Original issue reported on code.google.com by jean.sebastien.guay13@gmail.com on 12 Jun 2009 at 1:43

GoogleCodeExporter commented 9 years ago
The oceanExample application is now able to load other models specified on the
command line. They are placed under the OceanScene (like the islands model). 
They
don't seem to look quite right (the cessna turns out green, and I didn't expect 
the
cow to work because it uses reflection mapping) but the loading works.

I'll do more testing tomorrow to finish this up.

Original comment by jean.sebastien.guay13@gmail.com on 15 Jun 2009 at 2:30

GoogleCodeExporter commented 9 years ago
The problem was simply that the islands texture (generally green) was bleeding 
into
untextured models since the OceanScene default scene shader assumes that 
texture unit
0 is used for all models. I applied the classic workaround (a 1x1 white texture 
at
the root of the scene, which will thus get applied to untextured models) and 
it's fine.

Original comment by jean.sebastien.guay13@gmail.com on 15 Jun 2009 at 1:55