|
|||||||
![]() |
|
|
Thread Tools |
|
|||
|
Many people seem to have questions about making liquid effects for their games. Like many have said before me: No, you can't use Blender's liquid feature in the GE. But this doesn't mean that you are limited to a flat blue-colored plane for your character to drown in.
![]() Professional games will have dynamic shaders and reflections to make realistic looking water (as much as it pains me to say so, Bio-Shock is probably the best example of realtime water right now). I made two quick examples, complete with plenty of bugs and other problems, of ways to fake water in your game, requiring very little skill, competence, or attention. http://www.box.net/shared/kp8hucfvow The .blend has 2 scenes. In the first scene, the arrow keys control the boat, and in the second scene, the space bar makes it rain. So, the problems with these... Well, one of the first problems I encountered with these would be with one of Blender's own bugs. Added dynamic objects aparently realy like to be rigid bodies, so if a rain drop hits at a wierd angle, the ripple goes up in the air. This can be fixed with Python, but I left it the way it is in the .blend. Continuing with the rain scene, it's probably not the best idea to have each individual raindrop a dynamic object. Alpha-mapped Halo planes with a rain texture would probably be the best way to go in a real game, but that would mean the ripples wouldn't be placed dynamicly where the drops land (but would overcome the rigid body bug). In the boat scene, the waves in the water are made by an armature. So Blender is still calculating it as a flat plane, and the boat won't move up and down with the waves. I personally don't know how to fix this even with Python, except by making the waves seperate objects that move up and down. Another problem with this comes from lighting. There are no lights in either scenes in the example, but if your game has lights, the wavy water looks checkered. The biggest problem with water is the framerate. If you watch the fps in each scene, you can see that the framerate drops quickly once you get a lot of effects going. Since water is very complex, the more realistic you make it, the more fps you're going to lose. If you want water in your game, you need to decide how important it is (a lake in a wakeboarding game versus a puddle in a shooter). You'll need to cut complexity on either side to balance it out and keep up the fps. Other than that, convincing water is pretty easy to make if you know how to get started. Texture effects and GLSL shaders would be the next step in realism. If there are any other problems that I didn't catch or didn't mention, or if there is a better way to do this (besides textures and shaders), feel free to yell at me. I'm not counting this as a tutorial, by the way, so I put this thread in Support and Discussion. Many thanks (For what? I don't know. I just thought I'd be polite.)
............................................
This post was brought to you by the letter M. |
|||
|
#1
|
|||
|
|
|
||||
this is great work man im really impressed. we could sure use something like this in noobs 2.0. for a river or something.
............................................
The hawk is in the house ![]() noobs 2.0 |
||||
|
#2
|
|
|||
|
One thing I forgot to mention earlier was that I used two scripts on the boat scene. It just makes the empty that adds the ripples snap to the boats position. I just had it parented at first, but since the ripples aren't symetrical, being brighter on one side, it would make a spiral when the boat turned. It's more realistic to keep the bright side facing the same direction, where the sun would be.
Thanks for the comment, by the way. I was going to make the boat have a 3d wake, but that would have to change shape and size depending on the boats speed, which would take more time than I wanted to spend on this. If anyone has a question on something I didn't talk explain well enough, go ahead and post. If I can't answer your question, there are plenty of other people here who can. Thanks again, blackhawk0900, glad someone can use this.
............................................
This post was brought to you by the letter M. |
|||
|
#3
|
|
||||
|
Umm... you forgot to pack all your textures....
About your rain drop problem, that's pretty much easily fixed, unless they broke that function in the GE for the newest release. All you would have to do is make the dynamic rain object a "ghost" and it'll be able to trigger collisions, but it'll just go right through the water without bouncing.
............................................
Blender3dTutor http://blender3dtutor.com Blender Aquarius http://goldentaiji.googlepages.com/blenderaquarius-main |
||||
|
#4
|
|
||||
|
I think you should look into more solutions on the realtime water. Right now, I'm working on a raceboat template in my free time, so I'm gonna look into solutions that people have done.
EDIT: Here, I found this paper on realtime water. It obviously includes allot of algorithms and code ( in C unfortunately), but it presents an interesting solution. It's simple, yet accurate, and allows for smoke and water. However, since I am not experienced in code, I'm not sure how it would be implemented, but it's pretty fun to read. http://www.dgp.toronto.edu/people/st.../pdf/GDC03.pdf EDIT: http://projects.n-o-e.dk/GPU_water_s.../gpu-water.pdf EDIT: http://graphics.cs.lth.se/theses/projects/projgrid/ EDIT: http://www.sgi.com/products/software...oceanbump.html (animated bump maps, that just makes sense to me.) Just read a little and you'll find similarities in all the equations used, (and simpler solutions that use animated bump maps.) EDIT: (this looks very interesting. I might actually use this since I can understand it much better) http://freespace.virgin.net/hugo.eli...cs/x_water.htm Last edited by yournamehere; 22-Jan-08 at 23:41. |
||||
|
#5
|
|
||||
|
Render monkey has a nice example water glsl shader that could be quite easily implemented in blender.
|
||||
|
#6
|
|
||||
|
Ive' figured out a way to make a nice lake with tide-like movement without using any FPS. This won't work for streams though...
I've upped the polycount a bit for this but it works just fine at a lower amount. be sure to subdivide your water a couple of times before fratical subdividing it, and make the water as circular as possible. corners cause problems. http://www.savefile.com/files/1336889
............................................
FANBLENDS-- For Everything Fan made. JOIN TODAY! <- (Please note that these links are not endorsed by or affiliated with BlenderArtists. All content at such sites is beyond their control.) |
||||
|
#7
|
|
|||
|
It looks more like mercury?!
![]() But it's quite nice! Thanks. |
|||
|
#8
|
|
|||
|
maybe the easiest way to make wave on blender. then for the eye candy effect i'm not sure the framerate won't suffer so I let it this way its pretty easy to implement. It's an old file I was using hope you enjoy it.
http://www.savefile.com/files/1337110 |
|||
|
#9
|
|
|||
|
Sorry, I thought I packed the textures.
Like I said before, I'm sure there are plenty of ways to do this better, shaders are probably the best. My graphics card doesn't support GLSL, so I don't use them. Apreciate the comments!
............................................
This post was brought to you by the letter M. |
|||
|
#10
|
|
||||
|
I like black reaper's technique. How would a boat react to that. I tried it with a cube, and the cube sat on it like it was a plane (of course it's just use of shaders), but is there a way to have a boat react to those waves?
|
||||
|
#11
|
|
|||
|
It's more advanced technique and I'm just beginning glsl shader. In fact I'm learning hlsl so I won't be able to do it in the future. but I know ogre has a good water shader. maybe you could inspired yourself for doing it for your game.I cannot doing it for the monemt I too occupied making my own game engine using direct x
|
|||
|
#12
|
|
||||
|
Hey guys,
Iv'e been working on something similar for my game project: http://www.parker-portfolio.com/port...r/water2.blend It looks pretty good, but slows down my load time a lot. ![]() But yeah, great to see other people working on animated water
............................................
Blengband Terra Sirenum Space Explorer Blendserve online game demo |
||||
|
#13
|
|
||||
|
Maybe I'm just being ignorant, but I don't see how you do it...
............................................
I don't flame, I rebuttal. |
||||
|
#14
|
|
||||
|
hummm... he seems to use some pose mode of bones in actions ... but I'm not sure about how to do it straight away ... I didn't knew you could reproduce de effects of bones on a mesh in a repeated way.. !
maybe a better explaining of the trick could be interresting ? I see this could be used fot lots on other "morphing" anims of landscape related fluxes, like rain or even... Borealis auroras .... |
||||
|
#15
|
|
|||
|
the movemet is not smooth even if its really nice. I think glsl shader is the best way to make realistic water effects and it don't use much cpu. I'll look some information about glsl water effect. ( real time ripples )
|
|||
|
#16
|
|
||||
|
Olm-z said:
Quote:
The armatures deform a mesh with named vertex groups, so you can duplicate a mesh object but have it still react to the original armature. (then I removed doubles so it was all one mesh) black reaper said: Quote:
............................................
Blengband Terra Sirenum Space Explorer Blendserve online game demo |
||||
|
#17
|
|
|||
|
Have you guys looked at Lumina? It's a GLSL shader dev environment (cross platform) that even has a blender exporter I believe.
|
|||
|
#18
|
|
|||
|
if you want simple ripple you should just change the value of my script it should work
|
|||
|
#19
|
|
|||
|
Here's a pretty good way to do water, clouds, fog, etc. It just uses a UV scrolling script and it's easy on the framerates. (I don't know who wrote the script). It's kinda dark but who cares. I used 2 planes for the water. Push the spacebar to make the first layer disappear and reappear. I also added moving clouds with the same script, but they aren't shown in the pic.
This isn't a very good example, and it needs to be tweaked. But I've made some fairly realistic looking water using this method before. * http://www.4shared.com/file/37227412...ified=88cef7e8 |
|||
|
#20
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|