Author Topic: Help with animated heightmap  (Read 2846 times)

0 Members and 1 Guest are viewing this topic.

Offline Voltage

  • Professor
  • Pentium
  • *****
  • Posts: 857
  • Karma: 53
    • View Profile
Help with animated heightmap
« on: October 26, 2009 »
I'm trying to work out algorithm to create 16 frames of a heightmap... in this case the heightmap represents the surface of some water.  My proggy will loop through and render each of these frames one after the other, and then loop back and start at the first frame again.

I also need these frames to be tileable / seamless.

I've had a few attempts at it but everytime I get an interesting animated water like effect... the frames don't stay tileable.

Any ideas on an algo to solve this problem?

Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1294
  • Karma: 466
    • View Profile
    • my stuff
Re: Help with animated heightmap
« Reply #1 on: October 26, 2009 »
The easiest way to make a simulation tileable is to simply copy each "particle" beyond each border.
So when a particle leaves your tileable grid at the top it also comes back in at the bottom (and vice versa), same for left and right.

But if you like to share some more details about your algorithm, there might be more appropriate solutions...
« Last Edit: October 26, 2009 by hellfire »
Challenge Trophies Won:

Offline Voltage

  • Professor
  • Pentium
  • *****
  • Posts: 857
  • Karma: 53
    • View Profile
Re: Help with animated heightmap
« Reply #2 on: October 28, 2009 »
Thanks for the tips Hellfire.

This is for a demo I writing that will be shown in very soon.  I have run out time to get too fancy with this.

Maybe I'll revisit this.
Challenge Trophies Won: