x


Is it possible to make liquid water in Unity3D?

Is it possible to make water actual liquid not just a moving texture thing?

more ▼

asked Mar 28, 2011 at 11:21 PM

user-10823 (google) gravatar image

user-10823 (google)
11 9 6 8

(comments are locked)
10|3000 characters needed characters left

4 answers: sort voted first

Yes, and there are many different ways of achieving liquid water but I think the most common approach would be to use point particles which you plug into to a marching cubes algorithm to generate the triangles through the scalar field the particles make up.

Each particle would repel other particles a bit while still attracting them somewhat to get a fluid stickiness. You'd have to heavily optimize it and work on a rather limited set to be able to run this realtime.

To finally give the generated mesh some water feeling you'd probably want to add some sort of water refraction shader.

You'll have to scour google for more information about implementing the various steps.

more ▼

answered Mar 29, 2011 at 01:03 PM

Statement gravatar image

Statement
26k 76 108 240

(comments are locked)
10|3000 characters needed characters left

The particle system have a function particle collider use that to do the liquid

more ▼

answered Feb 03, 2013 at 01:35 AM

Matheusfig gravatar image

Matheusfig
0 3

(comments are locked)
10|3000 characters needed characters left

You can make realistic water in your favorite 3D app and export it as an .fbx with animations baked. Import into Unity and hit play (make sure play automatically is checked)...otherwise, you need a script to access the actual animation.

and it's best to name them like this: water@idle (these can be .fbx files, Maya files, or 3ds Max files...and other 3D apps too) water@splash (these can be .fbx files, Maya files, or 3ds Max files...and other 3D apps too) water@drain (these can be .fbx files, Maya files, or 3ds Max files...and other 3D apps too) etc

Hope this helps.

Shawn

more ▼

answered Mar 28, 2011 at 11:28 PM

shawnkilian gravatar image

shawnkilian
421 84 64 79

i would like the water to like flood a room

Mar 28, 2011 at 11:33 PM user-10823 (google)
(comments are locked)
10|3000 characters needed characters left

Going by the room flood comment... Not going to happen, or easily I should say...

Check out: http://www.youtube.com/watch?v=QECUbMEIxhw

It's not with Unity, but you get the same response.... Water will have to be done with shaders for the look... As for actually moving, as Shawn said, you're going to have to model it actually coming out of the water, in to the room, and "flooding" it... It's not going to be an easy scripting job... On top of that, realistic water is very complex, and being so, it might be more than the 65000 (I believe that's the max) limit of polys... The best way to get around the block is to think of weird ways to bypass it... Maybe someone else'll post a way to do this, but doubt it...

Good luck though none-the-less!

more ▼

answered Mar 28, 2011 at 11:47 PM

Justin Warner gravatar image

Justin Warner
6.7k 44 47 89

alright thank you lots for answering my question it was very helpful now i need some other stuff to Finish my game like a grid or something to place blocks like minecraft i remember of questioning something like that dont know? i wish there were more people like you by answering my questions by a helpful answer and thanks again yea its way to hard to make water flood a room man lol.

Mar 29, 2011 at 12:12 AM user-10823 (google)

post your new requests as a different question please

Mar 29, 2011 at 12:53 AM shawnkilian

don't ask that!!!! he is a spam artist http://answers.unity3d.com/questions/48883/unity-3d-grid-system-script check out Statements documentation of Keith's/unknown (google) disgrace across UA, lol. Memeber for 3 days, asks 12 questions 9 of which are the same question, then after getting pretty much no where with it changes his alias/log in and asks it again. Then again in a comment box, please don't encourage him as ammusing as his tiny little mind, and exploits because of it, may be

Mar 29, 2011 at 01:32 AM AngryOldMan

And the improper english pisses me to bits, and also the bad question titles... Didn't know it was him again =P, BUT he did ask an actual question this time... so it kinda was an improvement... Haha.

Mar 29, 2011 at 01:40 AM Justin Warner

http://answers.unity3d.com/questions/48720/48728 I'll add this in hopes he checks it out... Might help him =).

Mar 29, 2011 at 02:17 AM Justin Warner
(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:

x433
x17

asked: Mar 28, 2011 at 11:21 PM

Seen: 7428 times

Last Updated: Feb 03, 2013 at 01:35 AM