Jump to content

  • Log In with Google      Sign In   
  • Create Account


Voxel Worlds and Water, what is the best method


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
9 replies to this topic

#1 riuthamus   Moderators   -  Reputation: 4878

Like
0Likes
Like

Posted 25 July 2012 - 12:56 AM

So, we have arrived at the stage of development where we need to figure out how to handle the water. At this point we are stuck with a static flat mesh. The issue is once a block is removed from the shoreline... what to do with the water?

OPTIONS:
  • Make it where all shoreline blocks are unable to be moved. Thus making oceans 100% static and solving the water issue all together but creating a hard limit on what players can and cant do when working with water
  • Create a minecraft based system where the water pulls out so many blocks in each direction ( note: i hate this idea... and would rather bite off my leg )
  • Come up with some odd scheme that I am not aware of... so you guys help me to brainstorm!
THINGS TO NOTE:
  • Salt Water ( oceans ) should work very different from fresh water.
  • Volume based water is more or less out of the picture. With a world that is 100% editable, you cant have 1000000000 blocks of water that is volume based.
  • We are using C# and SlimDX, so our limitations are not many ( other than tutorials! )
  • The best option is one that allows for a resource saving answer while proving the best look/feel. We dont need 100% real water, but something of quality would be ideal.

Any ideas are welcome, as even the craziest ideas could help to lead to something better. Thanks for your help in advance.

Edited by riuthamus, 25 July 2012 - 01:03 AM.


Sponsor:

#2 slicer4ever   Crossbones+   -  Reputation: 3518

Like
0Likes
Like

Posted 25 July 2012 - 04:41 AM

So, we have arrived at the stage of development where we need to figure out how to handle the water. At this point we are stuck with a static flat mesh. The issue is once a block is removed from the shoreline... what to do with the water?

OPTIONS:

  • Make it where all shoreline blocks are unable to be moved. Thus making oceans 100% static and solving the water issue all together but creating a hard limit on what players can and cant do when working with water
  • Create a minecraft based system where the water pulls out so many blocks in each direction ( note: i hate this idea... and would rather bite off my leg )
  • Come up with some odd scheme that I am not aware of... so you guys help me to brainstorm!
THINGS TO NOTE:
  • Salt Water ( oceans ) should work very different from fresh water.
  • Volume based water is more or less out of the picture. With a world that is 100% editable, you cant have 1000000000 blocks of water that is volume based.
  • We are using C# and SlimDX, so our limitations are not many ( other than tutorials! )
  • The best option is one that allows for a resource saving answer while proving the best look/feel. We dont need 100% real water, but something of quality would be ideal.
Any ideas are welcome, as even the craziest ideas could help to lead to something better. Thanks for your help in advance.


Why are you so against the minecraft implementation?, what do you particularly hate about it?, it creates a decent result of volumetric water flow, it's not perfect, but it get's the job done pretty well imo.


many water simulations work with voxel like representation anyway, so it tends to make a decent fit for the two.

at the end of the day, your not exactly being clear about what you want, and contradicting yourself. you want a quality water simulation, but don't want the cost that comes with it. making a water simulation that interacts with your dynamic world is extremely complex, and you are making it more complex by refusing to work with the system you've created.

edit: also, this would probably serve better in the technical forums, then in the design forums.

Edited by slicer4ever, 25 July 2012 - 04:45 AM.

Check out https://www.facebook.com/LiquidGames for some great games made by me on the Playstation Mobile market.

#3 Mito   Members   -  Reputation: 838

Like
3Likes
Like

Posted 25 July 2012 - 05:12 AM

Volume based water is more or less out of the picture. With a world that is 100% editable, you cant have 1000000000 blocks of water that is volume based.


Why not? there's a mod for minecraft called finite water that does just this.

if you are looking for the best look and feel, this is the way, maybe cheat a little, depending on the size of the ocean, the player will not mind if you just put a full block of water on the shore.

what is the intent of the game? would it be centered in survival? in building? or will it be like a "make your own adventure"?

depending on the intent, a simple method can or can not be chosen, eg. if the focus of the game is on building, then volume based water with optimization would be the best method to choose. if the focus is survival, then a simpler method, like the one chosen in minecraft, can be ideal. The solution here depends on how much attention the player will pay on the water.

maybe a hybrid approach: you'll have source blocks of water, you decrease the volume depending on how many source blocks of water are there. if there's too many source blocks, you can fall back to the minecraft approach.

eg. player found a lake consisting of 5 blocks of water, then removes one block of the border of the lake. the water fill's the gap and the entire lake looses volume to level the surface.

eg2. player found a ocean and removed a block from the border. a new block of water is created in that border and only this block loses some volume. basing this volume loss on the number of source blocks right next to the flowing one. the more source blocks near, the less volume the flowing water loses. if the flowing water has the volume of a source block, then it becomes a source block and no more loses volume.

i expect this thoughts help at least a little and that my bad english doesn't screw my reply...

#4 riuthamus   Moderators   -  Reputation: 4878

Like
0Likes
Like

Posted 25 July 2012 - 12:50 PM

Why are you so against the minecraft implementation?, what do you particularly hate about it?, it creates a decent result of volumetric water flow, it's not perfect, but it get's the job done pretty well imo.


Technically, the water was done well for what was around and for what he wanted. I never used water in my minecraft buildings ( unless for flat looking fountains or oceans ) for simple fact that they are not eye appealing. Even if you throw some nifty shader on them they have some serious issues. If you were to find a way to make them not be block based and could have a small curve ( even one that was bent at every 15degree ) that would be more appealing. So no, i dont like minecraft water and I will not be adding anything that is like that to the game! Personal choice... i guess

at the end of the day, your not exactly being clear about what you want, and contradicting yourself. you want a quality water simulation, but don't want the cost that comes with it. making a water simulation that interacts with your dynamic world is extremely complex, and you are making it more complex by refusing to work with the system you've created.


While that is a valid point, this is how progress is created. Somebody works with a system in place and attempts to make something better that was flawed to begin with. I dont see why you are up on arms about this. The system works for what it was created to be ( in minecraft ) doesnt mean it will work for all games and that it should be in all voxel based games from there on.

edit: also, this would probably serve better in the technical forums, then in the design forums.


I am not really talking about the technical side of the system yet. Rather I am discussing the design aspect of it. Would water work well this way, would players hate the idea of being restricted with oceans... blah blah, the point is to discuss possibilities with the system, not to define how I am going to do it with the code and other aspects. If the mods feel this topic should be moved please do so, but I do not see how it is related to tech. just yet.

what is the intent of the game? would it be centered in survival? in building? or will it be like a "make your own adventure"?


The concept of the game is based on war and land ownership. With the premise that you can build castles and other such things within that war field. That said, the game is created in a way that anybody could mod the game to do whatever they wanted. A server host could make a zombie survival version of the game, or a survive on the island for 20 nights mod, or whatever they wanted really. We have created the game 100% modular. The game I will be releasing is based off of land ownership and war.

eg2. player found a ocean and removed a block from the border. a new block of water is created in that border and only this block loses some volume. basing this volume loss on the number of source blocks right next to the flowing one. the more source blocks near, the less volume the flowing water loses. if the flowing water has the volume of a source block, then it becomes a source block and no more loses volume.

i expect this thoughts help at least a little and that my bad English doesn't screw my reply...


No no , your post is very helpful. The very reason I posted here was to get some ideas and throw some stuff around. I did not have any issues with your English either; then again my wife is pinay so... i tend to understand broken English! Either way, your post was very good. Ill draw up some ideas i had previously and see what you think of them. My overall goal for water is something that doesn't look like trash. I don't need it to be fully dynamic and I dont need it to be the most amazing thing in the world... but I would rather have two systems of water ( one for land based water that could be played with like volumes ) and one for oceans that would be more static and harder to manipulate. I do not think this is out of the realm of possibility I just need to find the happy medium solution.

#5 Mito   Members   -  Reputation: 838

Like
1Likes
Like

Posted 25 July 2012 - 01:08 PM

you want some curvature for the water? i think this can be possible even with block based water. although the hit-box for the water would be a cube, you can always change the model per se. maybe you can use some kind of transformation to bend the model at a specific curvature. I know that 3DS Max has a feature to bend and deform a model, what i don't know is if this can be implemented in a efficient way so it can be rendered in real time.

Your game will be based more on the battles and stone buildings, so the ocean water don't even need to be made of blocks, the chunk can end a short distance after the beach and then you can render a static image. unless you pretend to add ships (what i think would be really cool if you can build and launch your own custom ship) this approach can work.

in case you even add the ships, once the ship is in the open sea you can simply forget the volume variation of the water. it wouldn't be visible anyway...

you can combine the approach's, like use volume variation + model bending on the land based water and only model bending on shore water.

#6 slicer4ever   Crossbones+   -  Reputation: 3518

Like
2Likes
Like

Posted 26 July 2012 - 01:36 AM


Why are you so against the minecraft implementation?, what do you particularly hate about it?, it creates a decent result of volumetric water flow, it's not perfect, but it get's the job done pretty well imo.


Technically, the water was done well for what was around and for what he wanted. I never used water in my minecraft buildings ( unless for flat looking fountains or oceans ) for simple fact that they are not eye appealing. Even if you throw some nifty shader on them they have some serious issues. If you were to find a way to make them not be block based and could have a small curve ( even one that was bent at every 15degree ) that would be more appealing. So no, i dont like minecraft water and I will not be adding anything that is like that to the game! Personal choice... i guess

Eye candy is just the extra, minecraft isn't designed to look nice, water's detail can really be anything you want to do at that point. you claim that the shader mod's don't fix it, but have you actually watched a mod with shaders designed for improving water quality:

http://www.youtube.com/watch?v=b-nw5u-VBhI


at the end of the day, your not exactly being clear about what you want, and contradicting yourself. you want a quality water simulation, but don't want the cost that comes with it. making a water simulation that interacts with your dynamic world is extremely complex, and you are making it more complex by refusing to work with the system you've created.


While that is a valid point, this is how progress is created. Somebody works with a system in place and attempts to make something better that was flawed to begin with. I dont see why you are up on arms about this. The system works for what it was created to be ( in minecraft ) doesnt mean it will work for all games and that it should be in all voxel based games from there on.


I'm not up in arms, and you are overlooking what i had said right before this, you claim you want the water to interact with the world, but don't want to use volume based water systems, you are throwing them out, before you look at them. as i had said, many water simulations use voxel's anyway to represent flow metrics, and geometry interaction, for example:
http://www.youtube.com/watch?v=Jl54WZtm0QE&feature=related
represen't water pretty solidly, and could most likely be easily adapted to a voxel world.

I don't know how big your voxels are, but i'd probably subdivide them into 8x8x8 cells for water flow systems like in the video i linked to, to create some nice water flow.


edit: also, this would probably serve better in the technical forums, then in the design forums.


I am not really talking about the technical side of the system yet. Rather I am discussing the design aspect of it. Would water work well this way, would players hate the idea of being restricted with oceans... blah blah, the point is to discuss possibilities with the system, not to define how I am going to do it with the code and other aspects. If the mods feel this topic should be moved please do so, but I do not see how it is related to tech. just yet.


You should have made this more clear in your first post, it had sounded like you wanted both technical and design discussion, if it's design, then i'd have to say if I were playing your game, and I can modify the whole world, except the water portion, then I'd feel a bit cheated, that someone was simply too lazy to implement such a mechanic. when they had clearly done so much work to make the world so interactive, at least that's how i'd feel anyway.


what is the intent of the game? would it be centered in survival? in building? or will it be like a "make your own adventure"?


The concept of the game is based on war and land ownership. With the premise that you can build castles and other such things within that war field. That said, the game is created in a way that anybody could mod the game to do whatever they wanted. A server host could make a zombie survival version of the game, or a survive on the island for 20 nights mod, or whatever they wanted really. We have created the game 100% modular. The game I will be releasing is based off of land ownership and war.

it seems like water would be a great fit, if it's a war type game, moats and such things come to mind.


eg2. player found a ocean and removed a block from the border. a new block of water is created in that border and only this block loses some volume. basing this volume loss on the number of source blocks right next to the flowing one. the more source blocks near, the less volume the flowing water loses. if the flowing water has the volume of a source block, then it becomes a source block and no more loses volume.

i expect this thoughts help at least a little and that my bad English doesn't screw my reply...


No no , your post is very helpful. The very reason I posted here was to get some ideas and throw some stuff around. I did not have any issues with your English either; then again my wife is pinay so... i tend to understand broken English! Either way, your post was very good. Ill draw up some ideas i had previously and see what you think of them. My overall goal for water is something that doesn't look like trash. I don't need it to be fully dynamic and I dont need it to be the most amazing thing in the world... but I would rather have two systems of water ( one for land based water that could be played with like volumes ) and one for oceans that would be more static and harder to manipulate. I do not think this is out of the realm of possibility I just need to find the happy medium solution.


I understand your want to use a simpler solution for ocean's, but I think it means doing twice the work, as mito said, if you want to use a static ocean, that isn't hard, another potential option for them is to just mark those particular blocks as ocean blocks, and they can't be modified. still it's all about if you want to go that particular route or not.

Edited by slicer4ever, 26 July 2012 - 01:49 PM.

Check out https://www.facebook.com/LiquidGames for some great games made by me on the Playstation Mobile market.

#7 jefferytitan   Crossbones+   -  Reputation: 2003

Like
1Likes
Like

Posted 26 July 2012 - 04:52 AM

@slicer4ever: Wow, that Eulerian water simulation blew me away! I'm not sure whether I correctly understood the simulation granularity, it seemed pretty accurate. Regarding the ocean thing, my suggestion would be to simulate any water within x distance of a land block, and treat the border water blocks beyond this as a source/drain of infinite capacity to normalise the water height.

#8 riuthamus   Moderators   -  Reputation: 4878

Like
0Likes
Like

Posted 26 July 2012 - 06:57 PM

slicer4ever, I had not had my concepts of what I wanted drawn out... and the coders I have suggested anything that I was talking about was crazy! So i came to this place to see what others would do if they were in my position and making a system for the game. Since my internet is really bad right now I can upload my picture I made but I can attempt to explain.

There would be volume based water from what we called "shorline" blocks. These are blocks that are very close to the shore say... 15 blocks away from a solid body of land. Then there would be static/fill blocks that would spew water out to fill and normalize the shore block regions. ( very much like what jefferytitan said )

The issue came from what to do if the player wanted to modify the source blocks... say build more to their island or add land to it? What if we made admin tools that let you place segments of blocks, could you modify the water source blocks and if so how would they be recreated once placed over? I thought of some ideas to fix this as well but the coders in place thought it would be too clunky and a very serious resource hog. I cant look at your videos yet but I will download them when I get a bit faster connection and see what they are like. Thanks again! I do appreciate all comments even if they are negative or constructive!

EDIT: Watched your first video, our water already has that effect... 3 times better than that effect actually. That does not fix the minecraft feel of water when you place it and it takes 10 seconds to update and create a block flow of nastyness! I want to correct that. I dont mind the texture of the water since that matches the world. My major issue is with how fast it updates and how horrible it looks because of the limitation of being a slanted top block.

As for the second video... i am 100% positive that would be insane to have.... that would be the dream. Is it possible? Not sure but god damn if I could make that I would. Perhaps a combination like we had already expressed is the real answer.

Edited by riuthamus, 26 July 2012 - 07:24 PM.


#9 jefferytitan   Crossbones+   -  Reputation: 2003

Like
1Likes
Like

Posted 26 July 2012 - 07:18 PM

It could be a pain, but I'd suggest that when someone adds/removes a shoreline land block, or places a block in the ocean, check for water fill blocks and move them further away/closer in as required.

#10 riuthamus   Moderators   -  Reputation: 4878

Like
0Likes
Like

Posted 27 July 2012 - 03:27 AM

I added a post to the tech part of the website describing the system in detail from what we discussed here. Thanks guys.

http://gamedev.net/topic/628644-voxel-based-water/




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS