x


Dynamic wave on a plane!

Hi,

How can i make wave on a plane?

Thanks.

more ▼

asked Jun 28 '11 at 06:28 AM

Milad gravatar image

Milad
245 36 42 60

From the very limited piece of information that you gave, I'm led to believe that what you want to do is to dynamically edit the mesh of the plane. If that's right, then edit it via the Mesh class.

Jun 28 '11 at 06:32 AM Dreamblur

Also, this could probably be done a lot easier in a modeling program (e.g Blender etc.), with an imported animation if necessary.

Jun 28 '11 at 07:18 AM FourSheds

I need it for water wave http://simulation.in fact i want to do ship simualtion for my project.

anybody can guide me?

Jun 28 '11 at 08:59 AM Milad
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

I'm not sure I follow what you mean but my gut feeling is that you're underestimating greatly the scope of such a task. Have a good hard think about how many games actually use tech like this and not just surface decals ;)

For normal waves take a look at the water shaders available in Unity Pro for a non dynamic effect.

To get the plane to react to other objects in the scene and create "dynamic waves" is not really a simple problem. You will need to edit the verts in the mesh against a clever wave algorithm most likely using the contact[x].point's from a sphere cast.

This will be expensive as hell, as you will need to use a mesh collider to get the points you need. I'm not even 100% sure if mesh colliders will update automatically if you change the shape of their respective mesh.

The mesh class you will need:

http://unity3d.com/support/documentation/ScriptReference/Mesh.html

The collision class you will need:

http://unity3d.com/support/documentation/ScriptReference/Collision-contacts.html

A better route to take here would be to combine a non-dynamic effect with an animation model to show water displacement and blend that to decals maybe for wake.

more ▼

answered Jun 28 '11 at 09:49 AM

demize2010 gravatar image

demize2010
945 19 22 35

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x20

asked: Jun 28 '11 at 06:28 AM

Seen: 1878 times

Last Updated: Jun 28 '11 at 09:49 AM