Projected Module update()


17-10-2008 18:13:46

hi xavi, due to my problem, I would ask you if you can create two function to split the update method of projected grid.

Actually I have to call update(), every frame either the plane is rendered too slow to follow the camera, but this is a bad thing for framerate.

So, if you can split update() in two methods like:

I can call the updateProjectedPlane every frame, so infinite plane can follow the camera and the other function each 0.5 seconds, it will give me a good frame rate boost.

Else I should use simplegrid, but its performance seems to be lesser than projected grid, moreover I really don't know how to merge simplegrid with horizon.


19-10-2008 18:36:31

I've done my own version (I just added it), of update method of project grid module.

It's a lot far to be good, because I don't know very well how hydrax works, I've done some empirical trying and seems to works, however there's a lot of thing I'm sure it could be done better.

to call it just call hydraxmanager->updateEach() instead of original update() method.

you had to pass it timesincelastframe, and time (in seconds) every you want to update module (0.5 seconds for example).

unfortunately this is not good as I expected, because updating vertex every 0.5 seconds cause a very stuttered rendered water. In any case updating it every 0.05 seconds, give a little boost of 8/10 fps on my computer, and stuttering is not visible.

Surely I make any sort of mistake making it, but I hope xavyiy can look at this "poor" code to realize something better, it's a very easy edit of the original update method.

ps: I've done this only for projectgrid module
ps2: it is based on the last version of hydrax package, I download it some minutes ago.

here the link: ... Update.rar