Dynamic water - hovers floating

Dynamic water - hovers floating

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
malric
Posts: 521
Joined: 30 Dec 2005, 22:22

Dynamic water - hovers floating

Post by malric »

I have continued through last year my dynamic water branch (started 4 years ago), you can see a video update here: https://www.youtube.com/watch?v=2CMk95pbqsM . Compared to last video water uses less polygons (probably not required in opengl 4.0 as it can be replaced by tessellation) and hovers take into account the water level.

I am wondering what do you (other engine developers) think it would be the best approach to continue the work. More specifically:
  • do you think it is an interesting feature that could be merged at some point?
  • which branch do you recommend I continue to work on (currently on maintenance). Is develop stable enough to port the dynamic water changes? If not, is here the best place to ask (like each half year)? An advantage of develop would be that I could test tessellation. A disadvantage is that games probably won't work and also introducing too many changes at once is bad.
  • I see two possibilities for a potential merge (both would be enabled/disabled on options, ofc):
    • two phases:
      • first phase: make water level configurable and not uniform, but no dynamic update. Something like lakes at various altitudes. Less impact on renderer and performance, engine side way to adjust water level, the code adjustments to take into account water height are tested even on normal maps .
      • second phase: make the dynamic updater and renderer, and fix any other problems due to dynamic water (pathing, etc.)
    • one phase, put everything together at once
Next things I will try is: make unit take into account water flow (so that hovers would have flown through the opening in the dam), add water source and water sink units, make more move types aware of water (currently planes ignore it completely).

Any other comments are welcomed.
ivand
Posts: 310
Joined: 27 Jun 2007, 17:05

Re: Dynamic water - hovers floating

Post by ivand »

Hi!

Looks cool.
I assume dynamic waterlevel is synced and so are all height changes?
malric
Posts: 521
Joined: 30 Dec 2005, 22:22

Re: Dynamic water - hovers floating

Post by malric »

Should be, yes. I think it can be done outside main loop (not updated each frame at least), but will investigate performance later, after I sort out other issues (pathing, building, weapons).
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Dynamic water - hovers floating

Post by Silentwings »

Impressive.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Dynamic water - hovers floating

Post by PicassoCT »

This is fully functional dynamic water?
malric
Posts: 521
Joined: 30 Dec 2005, 22:22

Re: Dynamic water - hovers floating

Post by malric »

@PicassoCT: it is not fully functional at this stage, but the plan is to work towards that. For example for now I tested only a bit hovers on it and planes do not know about it.
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Re: Dynamic water - hovers floating

Post by submarine »

Wow, this is a really cool feature. Any chance to see this in a hopefully not too far away next release of Spring engine?
malric
Posts: 521
Joined: 30 Dec 2005, 22:22

Re: Dynamic water - hovers floating

Post by malric »

Low chance for a "not too far release". The current efforts to update the rendering would also make the dynamic water rendering much more efficient. So I will not work on making better rendering (which is required - what I have for the videos is not that good) until the engine rendering gets updated (slow progress there as far as I understood).

My branch is on git, if anybody is curios on what is required for the dynamic water to work.
Post Reply

Return to “Engine”