Hi Paul,

> I was seeing _numLevels not being calculate correctly unless this change
was made.

Cheers, I'll take a look at this.

>With all this said, where is the best place to go for documentation on the
wave model
>being used for osgOcean? For example, what is the purpose of "attempting"
to
>change these noise coordinates each frame?

The noise textures aren't moving at all?! I'll have to check that in the
debugger because they seem to be moving in example application..

Well, the wave model is from this paper:
http://graphics.ucsd.edu/courses/rendering/2005/jdewall/tessendorf.pdf

However, the noise coordinates aren't in that. The noise textures create the
illusion of smaller waves on the ocean surface. I found that by tiling them
by different amounts and then moving them by different velocities on the
ocean surface it looks like the detail waves are changing in situ adding
additional movement to the surface. If these aren't moving it becomes quite
obvious that there is a static bump map on the ocean surface and looks a bit
rubbish.

Let me know if you find anything else or require further info. I'll take a
look at these at the weekend.

Cheers,

Kim.



2010/1/8 Paul Palumbo <[email protected]>

> Around line 64 of FFTOceanSurface, this line:
>
> Code:
> _numLevels ( (unsigned int) ( log( (float)_tileSize) / log(2.f) )+1),
>
>
> should really be:
>
> Code:
> _numLevels ( (unsigned int) ),rint( log( (float)_tileSize) / log(2.f) )+1,
>
>
> I was seeing _numLevels not being calculate correctly unless this change
> was made.
>
> Also, around line 1079, computeNoiseCoords is declared as:
>
> Code:
>
> osg::Vec3f FFTOceanSurface::computeNoiseCoords(float noiseSize, const
> osg::Vec2f& movement, float speed, float time )
>
>
>
> where time is declared as a float but this is how it is used (around line
> 452-453):
>
> Code:
> computeNoiseCoords( 8.f, osg::Vec2f(-4.f, 2.f), 1.f, time )
>
>
> where time is declared as:
>
> Code:
> static double time = 0.0;
>
>
>
> The "time" value seems to be a very big floating point number which has
> been derived from osg::Timer. This is causing "time" to be cast from a
> double to float thereby dropping precision and therefore causing the noise
> parameters to not be changed.
>
> With all this said, where is the best place to go for documentation on the
> wave model being used for osgOcean? For example, what is the purpose of
> "attempting" to change these noise coordinates each frame?
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=22299#22299
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to