Water Rendering

Everything about development and the OpenMW source code.
User avatar
werdanith
Posts: 295
Joined: 26 Aug 2011, 16:18

Re: Water Rendering

Post by werdanith »

Greendogo wrote:
werdanith wrote:The game calculates the distance to the closest water source that does not have terrain covering it. In interior cells that makes things simple, it's just the dx between the player and the water surface.
In vanilla Morrowind I noticed this was the method used, vs. the exterior method because sometimes you could hear the water in part of an interior cell very far form any water source. I count that as a bug or oversight in the vanilla-Morrowind engine. Wouldn't using the same technique in interior cells be faster than it is in exterior cells?
The terrain outside and the meshes that make up the tunnels in a cave are different beasts. It's pretty straightforward to calculate whether the terrain is above water at a certain coordinate. On the other hand, figuring out whether there is a mesh between you and the water surface requires much fancier calculations.
User avatar
Greendogo
Posts: 1467
Joined: 26 Aug 2011, 02:04

Re: Water Rendering

Post by Greendogo »

Understandable.
Yacoby
Posts: 119
Joined: 30 Sep 2011, 09:42

Re: Water Rendering

Post by Yacoby »

Assuming we are going to thread the AI (because not threading it makes no sense) I am sure we could hack this to use the provided AI system later. As the AI should have enough knowledge to compute the distance from the player to water and given that it would be running on another core and doesn't have time constraints it would be mostly free.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Water Rendering

Post by scrawl »

It's not very expensive anyway, actually. We can run through all vertices in the current cell's terrain, check if they are underwater and if so, they can be considered for the closest point.
User avatar
lgromanowski
Site Admin
Posts: 1193
Joined: 05 Aug 2011, 22:21
Location: Wroclaw, Poland
Contact:

Re: Water Rendering

Post by lgromanowski »

With latest master branch I don't have any problems with loading ESM's, but I don't see any water (except blue plane when I move the camera up in some places).

// Edit: By moving camera up I mean looking at the sky.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Water Rendering

Post by Zini »

The new water looks much nicer. I have a problem with it though:
Attachments
screenshot012.png
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Water Rendering

Post by scrawl »

Related to the fogging issues. I'll just disable water fog for now.
User avatar
Necrod
Posts: 251
Joined: 26 Mar 2012, 17:00
Location: Croatia/Pula

Re: Water Rendering

Post by Necrod »

Looks good enough for until after 1.0 :D
User avatar
werdanith
Posts: 295
Joined: 26 Aug 2011, 16:18

Re: Water Rendering

Post by werdanith »

I'm pretty sure this issue is related to the Ogre version being too old, I had it too until I upgraded to the latest Ogre 1.8 from our ppa and it was fixed.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Water Rendering

Post by scrawl »

Yeah, I forgot to mention. You need ogre v1-8 from mercurial repo; the RC1 isn't recent enough. (The needed changes will be in the final 1.8 version)
Post Reply