Basic help with creating an ocean plane

Hi all.

I am just starting out with Panda3d though have programmed at a hobby level in many different languages.

My question is how would I go about creating an ocean plane? I would like to make waves appear on the surface but I can find an algorithm for that. I just don’t know what the best approach would be.

I have tried to use GeomNodes and GeomVertexData with limited success.

Also, do I need to set up a camera before I will be able to see anything in my 3d world?

Thank you.

about the camera. as you can see in the tutorials there is a camera by default. you might need to rotate and it a little to see your plane.

for the ocean. what sort of ocean should it be? a nice beach with small waves, or more the storm.like ocean?
well you might wanna have a look at this http://www.vterrain.org/Water/
might answer some questions, and might bring up new ones. just post it then :slight_smile:

greetings
thomasegi

It is possible to deform a model in real-time in Panda, for example moving different vertices up and down in order to make a wave. Someone on this forum or in the IRC channel gave me some demo code once that did just that, but unfortunately I can’t find it now.

You will probably find that reading this chapter in the manual is useful though:

panda3d.org/manual/index.php/Advan … structures

Another way would be to use a shader to distort the water surface texture. The geometry (“mesh”) stays the same all the time, but an illusion of waves is given. If done in the right way this method gives pretty nice results and it is used in many games.

The NVidia Nature Demo (https://discourse.panda3d.org/viewtopic.php?t=2385) uses this method.

enn0x

Thanks for your help everybody.