Having fun with smooth terrain

Worked on a little project at lunch today:

Works with other materials as well:

[video width=425 height=344 type=youtube]GdUPUl0JQ3g

4 Likes

Looks pretty cool. It would be cool if we could make really big waves during a hurricane or something :P. That would look pretty sick :stuck_out_tongue:

Very cool!

I’m working on a game that dynamically changes the terrain for gameplay purposes.

Can you give any tips on how to optimize performance?

Wow, this is cool!

[quote] Very cool!

I’m working on a game that dynamically changes the terrain for gameplay purposes.

Can you give any tips on how to optimize performance? [/quote]

The biggest thing for optimization I would say is making sure the regions you are writing to are as small as possible. The code I wrote isn’t particularly efficient as I am rewriting the entire region of terrain you see there every frame. This isn’t a super big region so it runs fairly well, but if I was to implement this in a place with lots of terrain I would likely want to calculate smaller regions that are actually going to change.

[quote] Very cool!

I’m working on a game that dynamically changes the terrain for gameplay purposes.

Can you give any tips on how to optimize performance? [/quote]

The biggest thing for optimization I would say is making sure the regions you are writing to are as small as possible. The code I wrote isn’t particularly efficient as I am rewriting the entire region of terrain you see there every frame. This isn’t a super big region so it runs fairly well, but if I was to implement this in a place with lots of terrain I would likely want to calculate smaller regions that are actually going to change.[/quote]

So, for a piece of flat water, would you recommend only working with the air above the water where ripples would exist?

[quote]
So, for a piece of flat water, would you recommend only working with the air above the water where ripples would exist? [/quote]

In this example I am actually keeping track of 3 layers. By default 1.5 layers are seen as the middle layer has an occupancy of .5. I use the 3rd layer in case two ripples overlap, in which case extra occupancy gets pushed up. The bottom layer I may use if I implement troughs.

Would it be too much to create a huge terrain baseplate, pummel it with meteors, to create a bunch of craters? Make the ripples skip a bunch of frames (speed up how big the craters are) and freeze about a second after impact to keep the crater effect?

Of course? or are you asking for screenshots?

I’ve been looking for almost 1 hour like you did, could you do a tutorial about it (I’m sorry if I‘m disturbing this old topic, but it would be a real pity if you didn’t tell me how you did it, really)? Otherwise, I love it!