You can get Voxel Farm now. For more information click here.

Monday, November 28, 2011

Streaming LOD

If you remember an earlier post, I had built a little program called Sputnik to test mesh streaming over HTTP. Over the weekend I had some time and made it stream multiple levels. Here you can see some results. Please be forgiving, I did not spend any time on the texturing, lighting or anything but streaming.



LOD transitions are smoothed now whenever possible. I do it by gradually blending the changes into the scene. There are a couple of bugs in the normals which make popping more noticeable than what it should.

I capped download speed at 200 KBytes per second. Often the downloading lags behind the camera position. The scene shows with less resolution until the download catches up. I think 200 KBytes per second may not do it once I add large trees and buildings. I will also reduce the amount of mesh simplification, the rock profiles are too straight on this one.

16 comments:

  1. Just decided to say that I've been watching this development for about 6 months, and it has consistently been very interesting to me the whole way. Tell me, where/how did you learn to program? I'm trying to get into doing something like this, but I don't know where exactly to start... Do you know of any books or websites?
    Anyways, I can tell by your style that this isn't going to end up a dead project, I can see this going places and I'm excited to see where it ends up. Keep up the good work!

    ReplyDelete
  2. Awesome! The pop is noticeable, but I could live with that.

    Well done!

    ReplyDelete
  3. Guess I won't be streaming (not on this connection, might have better when I move)! Thanks for testing a lower speed, pity it lags. :(

    ReplyDelete
  4. So, if the camera is at 5 in the following grid:
    7 8 9
    4 5 6
    1 2 3
    Then it makes sense to prioritize loading 5, since that's where the player is, which leads to the loading lagging behind the player (grid 5 becomes grid 2, if the player is moving north).

    I'm wondering how you prioritize loading the grids surrounding the current one. The obvious next priority is getting the grid in front of the player (so if we're going north, get grid 8 first), but what's next? If the player is traveling at a good clip/ straight-ish line, I would think that grids 7 and 9 would actually trump 4 and 6 as priorities, since the player is going to be beside them soon.

    ReplyDelete
  5. pdurdin: Well with 200KB/s the lag only affects the mesh resolution you see. It does not slow you down or affect gameplay. If it was a game it may still be pretty much playable.

    ReplyDelete
  6. @tentus: I have some basic prediction, each next scene to be loaded is always a few meters ahead of the current position. Still prediction helps less than what you may think. The further the new scene is from the current one, the more blocks you need to fetch. It comes with a cost.

    Regarding blocks behind your back, I load them with the same priority. It is not often you turn around, but when you do, you expect the content to be at a consistent resolution. Requesting new blocks when you turn would be already too late.

    ReplyDelete
  7. @Unknown: Thanks for the encouragement. I learned to program when I was a teenager, on my own. We got some new computers at school, but my teachers would not know much about them so the kids had to figure them out. But it does not matter. Almost everyone gets to programming in their own way. What all programmers share is they love doing it, even if they suck at it.

    There are plenty of resources, enough of them to become lost. My advice is you get a vision of you want and just start working on it. As soon as you get stuck with something specific, search for help on that particular issue. Being stubborn beats being smart, and it get you smarter on the way.

    ReplyDelete
  8. Looking pretty good now, even though popping is way too noticeable atm. I could imagine just roaming those lands for a few hours, if there's variety :P
    You should smooth out camera movement for these videos. All that jittering along terrain makes my head hurt... I know you don't want to put too much thought into it now, but interpolating camera movement or letting it clip terrain (completely freedom) would be appreciated :)

    Have you decided any future plans yet? Will this eventually become a game? I have this ambitious project of mine, making a whole game procedurally, including story, NPC characters and even music :D

    ReplyDelete
  9. @aXu: I think I can reduce popping a lot more. Next weekend I will work on a solution I have in mind. About the camera jerkiness, I must apologize. I also get dizzy when testing this. I will fix it for the next video.

    This will certainly become a game. Stay tuned, this project is only beginning.

    ReplyDelete
  10. Just curious, why is there an ad in the video?

    ReplyDelete
  11. @pdurdin: This is a YouTube video and my account is approved by Google for showing videos. This is a low traffic video, it pays only cents a month but I'm saving it for buying jetpacks for my grand-grandchildren anyway.

    ReplyDelete
  12. @pdurin: Approved for showing ads I mean...

    ReplyDelete
  13. Ah cool, I was worried someone else had butted in and claimed copyright as they did with Spoiler Warning. :)

    ReplyDelete
  14. waow!, if you could make this world- and grafics into somwthing like minecraft, just more sofisticated, bigger, and more visual stunning. you would not have to make ANY money the rest of your days, see how much money minecraft is doing... you have the talent and skill i see. i say go! try to make the next generation of a visual stunning sandbox/adventure game!!! thumbs up from me. is there any way i can support you?

    ReplyDelete
  15. @Anonymous: Certainly I could do a minecraft type of game with this, but I'm still far from decided about the first game I will do with this. Please make sure you vote in the poll above.

    ReplyDelete
  16. There's a rabbit statue at the beginning!

    ReplyDelete

There was an error in this gadget