• Umbra Voxel Engine
    447 replies, posted
  • [B]Introduction[/B] The Umbra Voxel Engine is a voxel engine my friend ([URL="http://www.facepunch.com/members/386470-sondre99v"]sondre99v[/URL]) and I are developing. We started developing the engine March 1st, 2011, and we are currently in alpha-phase. The engine may look a lot like other voxel engines such as Minecraft and Infiniminer at the moment, but this is mostly because we are currently “borrowing” textures from Minecraft. What will separate this engine from other voxel engine is its ability to generate a virtually infinite landscape in every direction. This includes, not only the X- and Z-axes (like many voxel engines to date), but also the Y-axis. This enables the player to build as high and dig as low as he or she could ever manage. What we hope to achieve before the beta-phase is a fully-fledged game engine which stands out in the current ocean of voxel engines. The engine will have small loading times where the landscape will be generated on-the-fly without the player experiencing lag of any kind. As mentioned, the player will have the ability to build and travel virtually endlessly in any direction. By using a complicated landscape generator, the engine will render beautiful landscape ranging from vastly deep oceans to mountains higher than the eye can see. A little further out, we hope to add scripting through Lua. We also aim to make an adventure game with a lot of adventure-like features, often reflecting needs we have in real life. These are needs like eating and drinking to stay alive. The development blog can be found [URL="http://umbratech.tumblr.com/"]here[/URL]. [b]Releases[/b] You can download the latest public release here: [URL="http://dl.dropbox.com/u/10414085/Umbra%20Voxel%20Engine.rar"]Download latest version.[/URL] [B]Details[/B] The engine is written in C#. Rendering and managing content is done with OpenGL, through OpenTK. Though, we have just migrated from the XNA library, so quite a few of our engine's features are not functioning properly at this time. [B]Chunk handling[/B] The world is divided into chunks, each consisting of 32x32x32 blocks. In simple terms, the engine only holds a fixed number of chunks in memory (about 3500 on high-end settings) while the rest is stored on the disk. When the player moves far enough, the chunks furthest away get stored on the disk, and unloaded. The empty “spots” in front of the player is filled in, either with new chunks from the landscape generator, or stored chunks from the disk. There are some memory-improvements under developing, and were currently looking into a method of only holding vertex buffers, and not the entire data-array for the chunks more than 64 meters away from the player. [B]Landscape generator[/B] The landscape generator has been rewritten multiple times. One major problem has been ensuring the terrain matches from one chunk to the next. The past version used huge structures to store random numbers from which to generate terrain, but this has been slow, memory-inefficient and extremely cluttered. The current solution is much more elegant. It uses a hash-function that takes a position and a seed, and produces the same “random” number for each position/seed-combination. Using this method, the landscape generator implements a few height map-functions such as bilinear and bicubic interpolation and perlin-noise, and merges them to make a finished height map. We have just barely started scratching the surface on vegetation, so I won’t detail that just yet. [B]Rendering[/B] Rendering is done on chunk level. We have created a custom vertex format, tailored to store just what we need. Each vertex is currently 8 bytes, but we are probably going to add some more compression and get it down to 4 bytes. The faces are only generated where they are needed. That means faces between two opaque blocks aren’t generated. This has also been an area subject to much discussion and change. The current, and hopefully final, solution is using octrees. Each chunk is divided into an octree based on the visibility of the blocks, opaque (stone, dirt…), translucent (glass, water, leaves…) and invisible (air). After this, each octree-leaf checks its perimeter. Each meeting-case is handled differently (i.e. opaque/opaque shouldn’t draw any faces; opaque/invisible should draw one face). [B]Physics[/B] [I]This section will be expanded.[/I] [B]Media[/B] The following are videos posted on our official [URL="http://www.youtube.com/user/UmbraTechnologies"]YouTube channel[/URL], ranging from newest to oldest. [B]July 31st, 2011:[/B] [media]http://www.youtube.com/watch?v=YWWLdrUXR3A[/media] [B]July 15th, 2011:[/B] [media]http://www.youtube.com/watch?v=1AacLVEVhvI[/media] [B]May 5th, 2011:[/B] [media]http://www.youtube.com/watch?v=BQCyQAjYix4[/media] [B]March 4th, 2011:[/B] [media]http://www.youtube.com/watch?v=B8GP2qMcnRg[/media] And here are a bunch of screenshots. You can always check out the newest screenshots from my [URL="https://plus.google.com/photos/104172371324186104241/albums/5628829202711920801"]public[/URL] Google+ album. The picture shows a shore leading to some hills: [IMG]https://lh3.googleusercontent.com/-CV4J9t5iCic/Th2eWVMRlUI/AAAAAAAAALk/66HbJTUaBUs/s1040/shore_mountain.png[/IMG] A shore: [IMG]https://lh3.googleusercontent.com/-wpuaBkQ4oe0/Th2eWVhZyNI/AAAAAAAAALo/ni6oVInaKHU/s1040/ocean.png[/IMG] Another shore: [IMG]https://lh3.googleusercontent.com/-bTuS11WcpgM/Th2eXJ9QaRI/AAAAAAAAALs/A2YGFHiOKNc/s1040/shore2.png[/IMG] A large ocean: [IMG]https://lh6.googleusercontent.com/-6MX4x3zgrsg/Th2eYLUbSiI/AAAAAAAAALw/u46naACbv-A/s1040/large_ocean.png[/IMG] A forest near the sea: [IMG]https://lh5.googleusercontent.com/-Yb6BtfRfUeo/Th93BcCDbGI/AAAAAAAAAMc/YKdQ-HhoLuA/s1040/forest.png[/IMG] A forest seen from a first person view: [IMG]https://lh4.googleusercontent.com/-txigsK6i9pE/Th93CO3E9cI/AAAAAAAAAMg/IRw1NBKMpWY/s1040/forest_inside.png[/IMG] A shore with some lagoon-like traits: [IMG]https://lh4.googleusercontent.com/-H9VXcTcHiqY/Th93C7Ni19I/AAAAAAAAAMk/oq_2Nrosvvc/s1040/laguna.png[/IMG] Another forest by the shore: [IMG]https://lh6.googleusercontent.com/-VW1V21nLGaY/Th95opp2jVI/AAAAAAAAAM0/XW6Eg6x2eL0/s1040/forest_islands.png[/IMG] A large forest: [IMG]https://lh3.googleusercontent.com/-g_RZJRZwn4M/TiBnf_FlYWI/AAAAAAAAANA/Bo-KAK3lWBA/s1040/huge_forest.png[/IMG] A cute island: [IMG]https://lh6.googleusercontent.com/-tQZJHiP1Rz0/TiDWHgERRQI/AAAAAAAAAOI/8siU3w4efkY/s1040/funny.png[/IMG] A picture illustrating what I meant by "vastly deep oceans": [IMG]https://lh4.googleusercontent.com/-WPZjnVMqktQ/TiMJOZcMLHI/AAAAAAAAAOQ/rWlNX5cLkCs/s1040/deep_ocean.png[/IMG] A huge forest area: [IMG]https://lh5.googleusercontent.com/-eG9Wd4FouPw/TiSgeAipPAI/AAAAAAAAAO8/9yd20HqJqSs/s1040/large_world.png[/IMG] A tower on a hilltop seen from the side: [IMG]https://lh3.googleusercontent.com/-VzLnrPfYM1s/TiTCXzrTyuI/AAAAAAAAAPQ/AJ0Wci0b2B8/s1040/tower_1.png[/IMG] The same tower seen from the bottom: [IMG]https://lh4.googleusercontent.com/-DD7HCAZCejc/TiTCYcqu-VI/AAAAAAAAAPU/R62ZISgB6RU/s1040/tower_2.png[/IMG] An old screenshot, one of the first buildings ever created in the Umbra Voxel Engine: [IMG]https://lh6.googleusercontent.com/-UgozxGQ_zLA/TiTCYZu3GtI/AAAAAAAAAPY/AcM58X0DTTM/s1040/house_outside.png[/IMG] Lastly, an animated gif showing our landscape generator: [IMG]https://lh4.googleusercontent.com/-aj8dFIshF6Y/TiROvAy3SgI/AAAAAAAAAOs/K-uZ4xhqMiI/s400/landscape_demo.gif[/IMG]
  • There really needs to be a programming king rating in this section. Great work!
  • I'm no expert but is this technically a voxel engine? Seems like a regular 3D engine with a voxel map format.
  • voxels = 3d pixels, in order to render voxels you must be able to render in 3d. Building the rendering engine around the use of voxels (as opposed to, say, meshes) would mean it's a voxel engine.
  • This is an old post I made in the 'Minecraft Ideas' thread. Your engine made my dream come true. [QUOTE=FunnyBunny;31045298]I wish the oceans were bigger. And deeper. Like, I really want oceans to span huge areas, not just things you can traverse in 30 seconds while swimming. Right now oceans are just a minor inconvenience. I wish they were big enough so when you saw one, you'd stop and go "Fuck, I'm gonna need a boat." To top that off boats should be able to be picked back up and not so fragile that they blow up when they bump a piece of land. Also, the ocean should be more complex. Not just a pool of water with squids somewhere. It should have different types of fish that you can catch, with certain fish that heal a lot but can only be caught out in the middle of the ocean in a boat. (Maybe he can determine this based on how deep the water you are trying to fish in.) To complement that, the ocean needs to be deeper. Right now it's like 15 blocks max, which is a joke. It needs to have some [I]serious[/I] depth to it that the bottom becomes practically impossible to reach on one breath of air. That way, underwater bases would actually have some merit and secrecy to them, instead of something you can see sticking up from out of the water. To mend the air problem, I think you should be able to craft squid sacs into a pouch that can hold extra oxygen on you. (They could be made by putting an ink sac with a slime ball, as if the sticky slime reinforces the pouch to make it airtight. This would also add some value to the air pouch, and make you require a bit of effort in order to explore the depths) These pouches won't be stackable, unlike the ink sacks. Therefore the more of them you have on your inventory the more you can hold your breath, but you have to sacrifice precious inventory space if you want to go exploring the depths of the ocean. There can even be plants that grow at the bottom of the ocean, to add to the atmosphere, like seaweed of varying lengths, and perhaps some rare flowers that could be implemented in some future crafting task. I also had some idea about dangerous sea creatures like sharks that would wander the really open parts of the ocean. Being close to land or crossing small streams, you wouldn't see them a lot, but if you want to cross an ocean they'd be another great incentive to get a boat. They would roam more around the top of the water so they wouldn't interfere with deep sea divers, but perhaps some would venture down there just to keep divers on their feet. This would take some brainstorming because sharks could seriously interfere with deep sea diving, so figuring out their behavior would be important so that they don't totally piss off deep sea divers to the point that they spend all their air on killing sharks instead of exploring. I think this is a pretty realistic idea because it creates things that are really straight-forward, easy to pick up, and the items it adds are already implemented in game. For example, the air pouch is made of slime and ink sacs, the boat is already in game so it just needs to be tweaked a bit for how strong it is. Seaweed could just be a re-skinned papyrus that grows a bit taller (5-6 blocks in the deep parts of the ocean), and the deep sea plants could just be re-skinned regular flowers/tall grass.Sharks are practically like squid only more rare and with slightly different behavior (ie. Agressive, roam near top of water instead of near bottom). It's all really simple and easy to grasp, unlike some of the mod ideas I've seen out there that have had some really complicated sounding ideas like conducting research and the like. It will take a bit of reworking of the terrain system, but notch already said they'd rework it for the adventure update. It could also open up some cool possibilities for hard to find chunks, depending on how big the ocean will be. For example, if the ocean gets seriously big, there could be a small sandy island in the middle of it, perhaps with a chest buried in the sand that could have some goodies, like a gold bar or two, kind of like dungeon chests. Or you could find an exceptionally deep trench , that goes significantly deeper than the regular ocean would go (think of it as an upside down mountain, instead of going really high up, it goes really far down). My main point is that this stuff doesn't require new radical ideas, it's things that have already been implemented that just need to be tweaked a bit.[/QUOTE] Specifically the deep oceans: [img]https://lh4.googleusercontent.com/-WPZjnVMqktQ/TiMJOZcMLHI/AAAAAAAAAOQ/rWlNX5cLkCs/s1040/deep_ocean.png[/img] and the islands with treasure on them: [img]https://lh6.googleusercontent.com/-tQZJHiP1Rz0/TiDWHgERRQI/AAAAAAAAAOI/8siU3w4efkY/s1040/funny.png[/img]
  • [QUOTE=Matte;31196445]A little further out, we hope to add scripting through Lua.[/QUOTE] You should use JavaScript
  • When you said it looked like Minecraft, you weren't kidding. As impressive as it is, it looks like Minecraft.
  • [QUOTE=Samiam22;31205438]When you said it looked like Minecraft, you weren't kidding. As impressive as it is, it looks like Minecraft.[/QUOTE] He appears to be using minecraft textures as placeholders. Any cube voxel based world that uses minecrafts textures is going to look like minecraft.
  • [QUOTE=Samiam22;31205438]When you said it looked like Minecraft, you weren't kidding. As impressive as it is, it looks like Minecraft.[/QUOTE] Anything using cubes for the world can be claimed to look like Minecraft (even though Minecraft wasn't the first to do it), and he is only using the Minecraft textures temporarily so he can focus on programming and not making a new set of tiles. He is going to replace them later. [editline]19th July 2011[/editline] Ninja, with my message in reverse.
  • Thanks for all the positive comments! What is kind of cool with this project is that I feel that we are probably some of the first people to make an infinite world in all axes. And there is no documentation whatsoever on these things, so we have to brainstorm a lot and always end up finding our own solutions. I don't have count of how many times we have, some weeks after implementing a feature, had a brainwave and a new idea to implement that same feature even smoother and more elegant. [QUOTE=FunnyBunny;31203707]This is an old post I made in the 'Minecraft Ideas' thread. Your engine made my dream come true. Specifically the deep oceans: [thumb]https://lh4.googleusercontent.com/-WPZjnVMqktQ/TiMJOZcMLHI/AAAAAAAAAOQ/rWlNX5cLkCs/s1040/deep_ocean.png[/thumb] and the islands with treasure on them: [thumb]https://lh6.googleusercontent.com/-tQZJHiP1Rz0/TiDWHgERRQI/AAAAAAAAAOI/8siU3w4efkY/s1040/funny.png[/thumb][/QUOTE] This is almost exactly what I had in mind too when starting the project. I'm glad to see that there are people who have the same thoughts as me. By the way, the ocean in the picture is 125 blocks deep if I recall correctly. :v: [QUOTE=Mattk50;31204271]imo you should make the player height 3 voxels instead of two.[/QUOTE] We have actually thought of making the player 2x2x4 blocks in size instead of 1x1x2, effectively halving the size of the blocks to, not only have smoother landscape, but also to make the engine more unique. If we're doing this, then we could enable the player to use more crude tools, for instance, a large shovel could be used to remove several blocks at a time, while a small shovel could be used to remove blocks more precisely. We have already experimented with this, and if we end up doing it, it will certainly present a lot to get used to for previous Minecraft players. [QUOTE=TGiFallen;31199456]Do you plan on using LuaJIT if you add Lua to Umbra?[/QUOTE] We have not decided on which implementation of Lua we're going to use yet. In any case, we're open for suggestions. Is LuaJIT specifically good? [QUOTE=Map in a box;31204460]Mind if I make a voxel engine and name it Umbrella Voxel Engine?[/QUOTE] By all means, go ahead!
  • OP, are you taking any suggestions for stuff that could be implemented? This could be so much better than what Minecraft turned into (a slowly-updating game that has barely anyones ideas put into thought)? If you by any chance wouldn't mind suggestions, please take some of these into account; -Ramps (low & half-square) -More sandboxy world -Lots more stuff to mine -AI! This will probably be hard, but it's worth a shot
  • [QUOTE=Black-Ice;31207001]OP, are you taking any suggestions for stuff that could be implemented? This could be so much better than what Minecraft turned into (a slowly-updating game that has barely anyones ideas put into thought)? If you by any chance wouldn't mind suggestions, please take some of these into account; -Ramps (low & half-square) -More sandboxy world -Lots more stuff to mine -AI! This will probably be hard, but it's worth a shot[/QUOTE] I'm always happy to receive suggestions, it shows that people have an interest in my work, and that is what drives the development of this engine forward! I currently do, and I will always consider any suggestions I receive. About your suggestions: Ramps do kind of defeat the purpose of a voxel engine, and will require a rewrite of the physics engine, so I wouldn't count on it being implemented in the near future. A more sandboxy world, as in a better building environment? Since we are focusing on having an infinite world in all axes, there is great potential in having several game modes, especially a building game mode where you can build infinitely large structures. We have already added noclip and other building tools, so once we get Lua up and running, we should, with ease, be able to script several gamemodes. Lots of more stuff to mine is already on our todo-list! We currently have over 250 different block types to use. (If there is need for more blocks, we actually have the ability to implement 65 536 different block types!) AI is something we will look into. An adventure game is boring without creatures to interact with. 'Tis on our todo-list. [QUOTE=Theater;31207590]This looks brilliant, followed on G+. Lol, er du fra kongsberg?[/QUOTE] Thanks, og ja, jeg er fra Kongsberg :v: Du også?
  • Would it be possible to round off the edges? It would make your engine really stand out, though I don't know how it would look like in practice. On an unrelated note: What is it with Scandinavia and it raising some awesome game devs?
  • [QUOTE=PunchedInFac;31207799]Would it be possible to round off the edges? It would make your engine really stand out, though I don't know how it would look like in practice.[/QUOTE] I have already considered that. I agree that it would be really awesome, but I don't know if it is even feasible on the current scale of the engine, as it adds a lot of extra vertices to render. Maybe it will come in a future version or even an entire new project.
  • If you make the player 2x2x4 blocks, you'd then be able to make them step up single blocks without it seeming overly dumb. Then you don't need specific ramp blocks or half blocks or anything, since effectively you've already got 'half' blocks in the Minecraft sense. Also lets people build nicer slopes and such of their own. And lets you make arrow slits. 3x3x5 blocks would be an awesome size I think. And ramps would still be nice. One of the downfalls of Minecraft for me is indeed how low-detail the environment is. Halving the block size relative to the player would be a big plus for me, and I'd definitely guess a lot of people, needy little grots that we are. Also when Tangara/turb/whoever the hell he is said you should use Javascript, he may not have been sarcastic (referring to v8, the Google/Google Chrome Javascript engine, seeing as it's [url=http://code.google.com/p/v8/]open source[/url]). People often see Javascript as something that's just used by browsers and associate it with the whole HTML DOM thing, but that [i]is[/i] an extension to Javascript. Just sayin'. Don't get me wrong, I like Lua, but I like Javascript more since I use it more often and I think it'd be nice to see it being used for more non-browsery things, like Node.js. It'll all come down to how you integrate it with your engine in the end though.
  • [QUOTE=Weiss;31208096]If you make the player 2x2x4 blocks, you'd then be able to make them step up single blocks without it seeming overly dumb. Then you don't need specific ramp blocks or half blocks or anything, since effectively you've already got 'half' blocks in the Minecraft sense. Also lets people build nicer slopes and such of their own. And lets you make arrow slits. 3x3x5 blocks would be an awesome size I think. And ramps would still be nice. One of the downfalls of Minecraft for me is indeed how low-detail the environment is. Halving the block size relative to the player would be a big plus for me, and I'd definitely guess a lot of people, needy little grots that we are.[/QUOTE] This is exactly what we have in mind as well. Not only will the landscape be smoother, and it's be easier to traverse, but it will also enable the players to build much more detailed constructions. And, as you said, it eliminates the need for ramps. [QUOTE=Weiss;31208096] Also when Tangara/turb/whoever the hell he is said you should use Javascript, he may not have been sarcastic (referring to v8, the Google/Google Chrome Javascript engine, seeing as it's [url=http://code.google.com/p/v8/]open source[/url]). People often see Javascript as something that's just used by browsers and associate it with the whole HTML DOM thing, but that [i]is[/i] an extension to Javascript. Just sayin'. Don't get me wrong, I like Lua, but I like Javascript more since I use it more often and I think it'd be nice to see it being used for more non-browsery things, like Node.js. It'll all come down to how you integrate it with your engine in the end though.[/QUOTE] Yeah, I get that, though I still think Lua is more suited for this, mostly because a lot of other games use it, and it's a really nice language. Scripters who come from Crysis, Garrysmod, WoW, etc. will have a much better time with something they're used to. But it's also partly because I'm used to Lua. :v:
  • This looks awesome and I like the sound of smaller blocks. Keep it up!
  • [QUOTE=Matte;31208282]This is exactly what we have in mind as well. Not only will the landscape be smoother, and it's be easier to traverse, but it will also enable the players to build much more detailed constructions. And, as you said, it eliminates the need for ramps. Yeah, I get that, though I still think Lua is more suited for this, mostly because a lot of other games use it, and it's a really nice language. Scripters who come from Crysis, Garrysmod, WoW, etc. will have a much better time with something they're used to. But it's also partly because I'm used to Lua. :v:[/QUOTE] Why not go totally off the scales and make each block 12,5% of minecraft block ? I'd like to see that one day. [editline]19th July 2011[/editline] It's not like it would get any harder to dig/create. Just give the player an ability to select the sizes of blocks.
  • [QUOTE=Satane;31211446]Why not go totally off the scales and make each block 12,5% of minecraft block ? I'd like to see that one day. [editline]19th July 2011[/editline] It's not like it would get any harder to dig/create. Just give the player an ability to select the sizes of blocks.[/QUOTE] It is possible that this will make the world seem too small. I'm not talking about the blocks themselves, but there is an upper limit to the world size in terms of how many vertices can be rendered.
  • [QUOTE=Matte;31211627]It is possible that this will make the world seem too small. I'm not talking about the blocks themselves, but there is an upper limit to the world size in terms of how many vertices can be rendered.[/QUOTE] [QUOTE=Matte;31206884]Thanks for all the positive comments! What is kind of cool with this project is that I feel that we are probably some of the first people to make [b]an infinite world[/b] in all axes. And there is no documentation whatsoever on these things, so we have to brainstorm a lot and always end up finding our own solutions. I don't have count of how many times we have, some weeks after implementing a feature, had a brainwave and a new idea to implement that same feature even smoother and more elegant. [/QUOTE] ?
  • [QUOTE=Satane;31211945]?[/QUOTE] Pretty sure he meant infinite as in you can dig and dig and dig