Water

Everything about development and the OpenMW source code.
Locked
User avatar
lgromanowski
Site Admin
Posts: 1193
Joined: 05 Aug 2011, 22:21
Location: Wroclaw, Poland
Contact:

Water

Post by lgromanowski » 13 Aug 2011, 21:17

azathoth wrote: Hey guys,

Great community you have here,

I'm Azathoth, and this weekend i got a nostalgic feeling about playing morrowind, so i installed it again, and after a few hours i quit, and searched the net for a community project around morrowind and here we are.

Its great what you've all done so far, but there is a lot more to do, so i decided to implement some stuff

First off animated water take 1

Above water reflections/refractions and movement
http://staging.duckygo.com/water1.png

Underwater simple caustics with soft animated surface refraction
http://staging.duckygo.com/water2.png

I have a few more kinks to work out and i'll push it to my forked github repository
Zini wrote: Lovely. Feel free to push an unfinished version to github. We encourage pushing often and early. Also, seeing your code would allow me to evaluate how to best integrate it into the scripting system and the world model (there are a few points to consider).
Zini wrote: Thanks.

First a few general comments:

1. We generally prefer to have new features in topic-branches instead of master (there is a branching policy page on the wiki). No big deal. We can keep it like this for now, but please keep it in mind for future reference.

2. We agreed to use 4 spaces for intending. It seems you have a few tabs instead in some places.

Now on to the water code. Since you mentioned this is a WIP I guess you know about some of these problems.

3. The files you placed in the extern directory probably should go into files instead. Maybe make extern/resources/ into files/water/ ?

4. I get a segmentation fault at shutdown.

5. When entering a cell, the water is not shown first. It only appears once you move.

6. Your water class needs functions to disable/enable water rendering.

7. Your water class also needs a function to set the water height.

8. When going outside, the water surface is not large enough. You can clearly see where it ends.

9. The performance is sub-optimal. Interiors render with decent speed on my system (but I have a high-end box). On exteriors the water makes the framerate drop by a factor of 3. Any chance we can improve that?

Anyway, a good start.
azathoth wrote: Thanks,

Sorry i havent gotten around to reading the wiki entries, i'll set the branch and everything else up to standards.

Regarding performance, yes i just realized exterior perfomance is bad, i will fix it when i finish, and make everything run smoothly.

It will take a few more hours of work time, so one of these days.
pvdk wrote: Looks awesome and welcome here :)
Star-Demon wrote: Welcome!
sir_herrbatka wrote: Great to see you :-)
Greendogo wrote: Water! Awesome! Keep it coming!

I don't know if this is the right place to put this, but keep in mind MGE vastly improves the quality of the water visuals, so how one might improve on the look and interaction of the water with other elements should eventually be thought about (even if that isn't actually done until after version 1.0). But I'm glad we have water at all, and it looks pretty nice in your first pictures!
gus wrote: Welcome!

Which shader do you use?
so how one might improve on the look and interaction of the water with other elements should eventually be thought about
That's really complicated i think.
Greendogo wrote:
gus wrote:That's really complicated i think.
Sure is :D
azathoth wrote:
gus wrote:Welcome!

Which shader do you use?
I modified a fresnel reflection/refraction shader that came with the ogre samples for the surface and for the underwater
so how one might improve on the look and interaction of the water with other elements should eventually be thought about

That's really complicated i think.
We could have interaction based on a limited set of objects , i.e. npc's and the player, but after we get a first version finished.

Haven't had free time this week, but i will get some tomorrow to finish the water rendering.

I'll keep you posted

BTW was there a reason why cg shader handling was disabled under linux ?
Zini wrote:
We could have interaction based on a limited set of objects , i.e. npc's and the player, but after we get a first version finished.
I would consider that a post 1.0 feature.
BTW was there a reason why cg shader handling was disabled under linux ?
Probably not.
Greendogo wrote:
Zini wrote:
We could have interaction based on a limited set of objects , i.e. npc's and the player, but after we get a first version finished.
I would consider that a post 1.0 feature.
How about water interaction with non-moving objects like the terrain mesh? That would be much easier than moving objects like the player or NPCs.
azathoth wrote:
Greendogo wrote:How about water interaction with non-moving objects like the terrain mesh? That would be much easier than moving objects like the player or NPCs.
Do you mean water crashing and splashing against rocks in the water, waves on the shore like interaction ?
Greendogo wrote: Kind of. What I really mean is being able to apply a shader/animation on the water at points where it intersects with the terrain. Not the actual shader/animation, but giving people down the road the ability to do so without changing the engine. Artists usually suck with code. This is just a suggestion though, so it actually belongs in the suggestions thread instead of here in the development thread.
Zini wrote: Hey, azathoth! Any progress with the water? We haven't heard from you for quite some time.
best regards,
Lukasz

Locked