Hi Tim,
When boat is placed in ocean at a specific waterline... when viewing from
above, that waterline is also in the boat.
Although my boat is in no immediate danger of sinking... what must I learn in
order to exclude the effect of the surface of the ocean from invading my space?
We do two things to avoid this issue, none of which is perfect.
1. Make sure the bottom of the boat is closed (so there's an enclosed
volume between the boat's hull and the deck), and make sure the wave
height is always low enough that the waves won't peek through the deck.
2. If we need really high waves, I wrote a shader that gets the position
of 4 corner points of the boat's deck, and discards any fragments of the
ocean surface that are inside these 4 corners. This effectively clips
the ocean surface, but because of time constraints, it was not done in
the best way possible. The constraint we chose to live with is that it's
a 2D test only, i.e. it tests in the XY plane, i.e. if the boat is ever
above the ocean the surface will still look clipped, and if the boat's
hull is curved then you might even see the hole in the ocean surface
when looking at the boat from the side.
If I had to design a better solution (i.e. one that would make it into
osgOcean itself, not one made just to satisfy a client who doesn't like
having water on the boat's deck), I would want to eliminate those
constraints. I would probably make a convex shape that would clip the
ocean surface, or something like that.
Hope this at least gives you some ideas,
J-S
--
______________________________________________________
Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com
http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org