Search Unity

Voxity - the voxel solution for Unity

Discussion in 'Assets and Asset Store' started by FrischGebraut, May 4, 2014.

  1. FrischGebraut

    FrischGebraut

    Joined:
    Jul 24, 2013
    Posts:
    28
    Voxity - the voxel solution for Unity

    Hello everyone!

    I have just released my voxel engines at the unity assetstore. It actually stated as a small private project and now after about two months of development it turned out pretty well. I decided to put it at the assetstore because I always wanted to do something with the Oculus Rift but never had the money to get one.
    To be hones Voxity is nothing you would use inside a big, commercial AAA title but for someone like me who really likes messing around and creating something cool, Voxity is definitely worth a try (or a buy ;) ).

    Presentation

    Voxity is a package that allows you to create basic voxel based games (imagine Minecraft). Voxity comes with the following features:

    - Building of voxel maps/levels
    - Textured blocks
    - Easy integration of custom blocks
    - Model editor with colored blocks
    - Full saving and loading of maps/models
    - Pathfinding!
    - Easy-to-use scripting methods
    - Perlin noise generation example!
    - “Getting Started” manual

    Voxity makes it easy to create levels and map and use them inside your game. You can also write your own scripts to modify the world.
    Using the pathfinding system you can make your characters walk through your levels.
    The model editor allows you to create colored voxel models that can be saved and displayed in your game using simple prefabs (Btw. The Unity logo to the right has been created using the model editor).
    Voxity has documented C# code and can easily be extended to fit your needs. It also comes with a “Getting Started” manual which gives you advice on things like how to add a block or how to use the scripting methods.

    Screenshots

    Here you can see a little example scene showing off some simple terrain generation using the built-in Mathf.PerlinNoise. The script for this has been made in like 20 minutes:
    $perlinNoise.PNG

    The pathfinding. On this screenshot I highlighted the closed list(red), open list(green) and the path(yellow):
    $pathfinding.PNG

    Some models made with the model editor:
    $characterModel.PNG $swordModel.PNG

    Get it

    You can get Voxity at the Unity assetstore.

    My goal is to reach the 100 sales. If I can reach this goal I will probably release an update which will include some advanced terrain generation features!
    If you have any questions, suggestions, comments, ideas, opinions or something else you want me to know, feel free to write it down on this thread and I would be happy to answers it.

    Finally I'd like to apologize for my bad English ;)

    Have a good day guys!
     
  2. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    Just bought it. I send you a private PM.
     
  3. FrischGebraut

    FrischGebraut

    Joined:
    Jul 24, 2013
    Posts:
    28
    - UPDATE -

    Price is now 12.5% off!
     
  4. FrischGebraut

    FrischGebraut

    Joined:
    Jul 24, 2013
    Posts:
    28
    It took a while for the price to update on the assetstore but it should be ok now!

    Price is now 12.5% off!
     
  5. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Nice work! Demo would be good too
     
  6. FrischGebraut

    FrischGebraut

    Joined:
    Jul 24, 2013
    Posts:
    28
    Thanks!
    If I find a good host I will provide a web player demo. Looking forward to it soon!
     
  7. ZeoWorks

    ZeoWorks

    Joined:
    Dec 13, 2012
    Posts:
    76
    Any luck with the webplayer demo friend? :) If all else fails you could use dropbox! :)
     
  8. FrischGebraut

    FrischGebraut

    Joined:
    Jul 24, 2013
    Posts:
    28
    I found a host and the demo is almost finished. I will try getting it done today.
     
  9. FrischGebraut

    FrischGebraut

    Joined:
    Jul 24, 2013
    Posts:
    28
  10. TheXWolf

    TheXWolf

    Joined:
    Dec 13, 2013
    Posts:
    85
    When creating randomized terrain it takes a very long time to generate anything over 3-5k blocks.
    Now we're supposed to always use a co-routine I'd imagine, but even when I use the SetBlockWithNewChunk it still takes a good 2 mins at least. What is the recommended method with this system to generate a whole world? I know it has to do with chunk management, but how do we go about that?

    After reviewing the noise sample I found that you create the chunk then build the blocks in it, is that correct? Also is the noise totally random; is there a way to be a bit more specific on the blocks that are placed? Thanks in advance, really enjoying the system already.
     
  11. FrischGebraut

    FrischGebraut

    Joined:
    Jul 24, 2013
    Posts:
    28
    First of all I would defenitly not recommend to use the perlin noise example for generating very big world. The way you would normaly do it is by by having some sort of view distance. You would then create new chunks as the player is moving along. Each using coroutines and a simpe list you can make sure that it will only generate one chunk at a time. Like this you shouldn't even get any big leg when th player moves into a new area of the map.

    The world generation part is totally up to you. The perlin noise example was really just a very short and simple demonstration. If you want to get some more interesting terrain you should probably use 3d noise (google for simplex noise for example) and you would add some logic to it (like: always put grass ontop of the top terrain layer). You also want to use some sort of brush system which allows you to create structures like trees, rocks, etc.

    Right now Voxity does not have any advanced terrain generation features but it is totally possible to add them by yourself.

    I now a very good YouTube tutorial that shows how to create a very basic voxel engine and how to add rabdom terrain (You might want to skip to first few parts):



    Hope I helped!
     
  12. TheXWolf

    TheXWolf

    Joined:
    Dec 13, 2013
    Posts:
    85
    Ahh ok ya that totally helps a lot! I was thinking I missed something in the voxity system I could be using or tweaking. I've always worked with built worlds so this is a new area for me. Thanks a bunch I'm sure I'll continue using your system regardless. :)
     
  13. FrischGebraut

    FrischGebraut

    Joined:
    Jul 24, 2013
    Posts:
    28
    I've just implemented ambient occlusion into the engine. As soon as I find time, I'll update the package.

    withoutAO.PNG
    withAO.PNG
     
    Last edited: Jun 22, 2014
    TheXWolf likes this.
  14. TheXWolf

    TheXWolf

    Joined:
    Dec 13, 2013
    Posts:
    85
    Haven't played with voxels and 3d recently, but it's great to see you haven't just left it to rot and you're updating it.:cool:
     
  15. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    Hey OP, are you still around? Got a couple questions.
     
  16. FrischGebraut

    FrischGebraut

    Joined:
    Jul 24, 2013
    Posts:
    28
    Feel free to ask them ;-)
     
  17. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
  18. FrischGebraut

    FrischGebraut

    Joined:
    Jul 24, 2013
    Posts:
    28
    I don't konw if I fully understood your question. For me it sounds like you would like to use my pathfinding system that comes with Voxity for navegating around a unity terrain which is not possible since a terrain is not subdivided into a grid of voxels.
    Please correct me if I missunderstood something.
     
  19. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
    indeed that is what I want to do. All the blocks the characters place are... blocks, thus it makes me wonder weather I could simply apply a tag or layer to them and have your system pathfind. As for the unity terrain, In my current system I raycast blocks down and save them as an xyz position. I wondered if in your pathfinding I could do something like this.
     
  20. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
    Sooo?
     
  21. FrischGebraut

    FrischGebraut

    Joined:
    Jul 24, 2013
    Posts:
    28
    Well as I said, my system can not handle basic Unity terrain. I am using the A* pathfinding algorithm. This algorithm always requires a start point, an end point and a bunch of "nodes" that contain information about the distance to the end point and the cost. In my engine a walkable node is basicly an air block with one air block above and one solid block underneath. I have a class called PathNode and a static method that can use the voxel data stored as a 3d array to determine path nodes. So I guess my system would be useless for what you are trying to do. Instead I would recommend you to take a look at pathfinding and come up with your own system. For example you could try to generate a nav-mesh. However I think this is not the right thread to talk about this in detail :)
     
  22. MikeErty

    MikeErty

    Joined:
    Feb 24, 2013
    Posts:
    19
    I have a few questions.
    Our game relies on being able to fire things at the blocks and destroy them and we have made that work to some degree.
    Our solution is not very elegant however and doesn't work reliably.

    Essentially what we need to know is: is there a way to detect which voxel has been hit by a rigidbody projectile?

    Obiviously your engine was designed to "destroy" blocks with a mouse click, which is reliable since you always get the exact contact point where the ray hits the surface of the voxel. What we need is to get the contact point on a collision with a rigidbody.

    When our projectiles hit the voxels properly (ie cleanly hit the side of the voxel) then the code works, the block destroys and we are happy. But if the projectile only partially hits the voxel (the voxels are triggers so the projectiles pass through) and the centre point of the projectile fails to pass through one of the voxel sides then we don't get a contact point and nothing happens :(

    Have you any ideas on how better to implement this idea?

    Thanks a lot :)
     
  23. FrischGebraut

    FrischGebraut

    Joined:
    Jul 24, 2013
    Posts:
    28
    Well the great things about voxels is that they are on a regular grid. This means you can take any position in 3d space and align it to that grid (Voxity even gives you a simple method for this: World.GetBlockPos). Then you can just check if there is a solid voxel at this position.

    Now for your problem. Whenever you detect a collision you could check which blocks the bounds of your projectile are overlapping. You could then just destroy these blocks. However this requires some more advanced math. Instead it would be much easier to use the collision information you get from OnCollisionEnter(Collision other). The collision class contains a lot of usefull information about the collision. One of them is Collision.contacts. It contains the exact point the collision occured. So all you have to do is convert it to voxel space and destroy the block.

    Hope I helped

    Wizz
     
  24. MikeErty

    MikeErty

    Joined:
    Feb 24, 2013
    Posts:
    19
    Thank you for the reply :)
    Well I came in on monday and my boss had found a way to fix it. I'm not sure if I explained our specific issue correctly but he managed to fix all our woes by simply disabling the rigidbody of the projectile... seems so simple. Too simple. Maybe it'll bite us later on. Anyway...

    I have now just come upon another issue which you may be able to help me with.
    I just created a PC build of our game to do some tests. However it kept giving me lots of errors about the model editor (which it only cared about when it came to publish, the rest of the time it never mentioned it). The only thing I could think to do to quickly fix this was delete the whole model editor folder as we aren't using it anyway.
    It finally let me build the game, but upon running the game the chunks fail to initialize.

    One grass block appears below one brick block but nothing else. If I press play in the Unity editor everything builds just fine. Any clues?? Could the build be relying on the model editor files?

    Thanks.
     
    Last edited: Nov 20, 2014
  25. FrischGebraut

    FrischGebraut

    Joined:
    Jul 24, 2013
    Posts:
    28
    Well the problem with the model editor again :rolleyes:
    It's very simple to fix: Just go into ModelEditorGui script (I think it was this one) and delete the line at the top that says using UnityEditor. Also you have to delete or comment out the line where it says AssetDatabase.SaveAsset... the reason for this is that you can't build the player if a MonoBehaviour is using some UnityEditor functionality.
    For your other problem I don't have a solution right now. Fix the model editor problem and see if it works then, if not I can take a closer look at it.
    Also it would be better if you could start a private conversation next time you'll need help rather than filling up this thread :)
     
  26. HelloImKevo

    HelloImKevo

    Joined:
    Dec 21, 2013
    Posts:
    2
    Hello there,

    Over the last few months I've been working on a school project that relied on the Voxity framework. Throughout the process I bothered WizzDe with questions and he offered plenty of advice to help me and my team make progress. Figured I'd share a couple of screenshots of the near-final product (It's an adventure-style exploration game with a very basic implementation of the inventory management system from Brackeys).

    Overall, excellent learning tool with plenty of room for customization, suitable for quickly prototyping voxel style games.

    voxity-map-editor.png

    voxity-tree-building.png
     

    Attached Files:

  27. FrischGebraut

    FrischGebraut

    Joined:
    Jul 24, 2013
    Posts:
    28
    Wow, this is very impressive! I am blown away by what you were able to create using Voxity! I wonder how much space this level takes on your HD :)
    Keep up the great work! I'd love to play this game at some point!
     
  28. heinickesg

    heinickesg

    Joined:
    Jan 25, 2013
    Posts:
    48
    Hello! This package looks great, question I had about it. Can you generate a terrain and save it as a prefab? Im making a game but instead of using realistic terrain I want blocky terrain similar to minecraft, However I do not want it loading at runtime I need to be able to edit it in the editor so I can add my own buildings scripts ext, would this asset help make terrains I can generate and save?
     
  29. FrischGebraut

    FrischGebraut

    Joined:
    Jul 24, 2013
    Posts:
    28
    Voxity does not come with advanced terrain generation features so you would have to write your own terrain generator. You could then generate the terrain you want and save it so that you can load it back again and edit it. It is just a matter of providing Voxity with some voxel data to render so it is defenitly possible to do.
     
  30. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Is it compatible with Unity 5.1.3 ?
    Does it generate/update colliders when blocks are placed ?
    How does save work ? Does it generate some kind of file or what ?
    I want to use it in multiplayer , i am a good programmer is it possible (do we have access to the source code)?