Search Unity

World Building Voxel Play - infinite world generator

Discussion in 'Tools In Progress' started by Kronnect, Jan 2, 2018.

  1. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Voxel Play Introduction

    Happy to introduce Voxel Play, a procedural, fast, sandbox environment based on cubes. It leverages highly optimized code, including geometry shaders and texture arrays, to generate great looking, vast and infinite worlds which can be customized and modified in many ways.

    Voxel Play provides an integrated solution for sky, terrain, water, vegetation, physics, world interaction, UI and inventory and more.


    Features

    The goal for Voxel Play is to provide an easy to use but powerful rule-based voxel engine that fills the open spaces of your world while it allows you to edit any number of areas.

    Template based
    Voxel Play works with Scriptable Objects to create world, biomes, voxels and model definitions. Each definition is a set of rules plus textures and sounds - a world is composed of several biomes which model the type and shape of terrain as well as the vegetation (bushes, trees, ...).

    Define any number of worlds, biomes, models and voxels within the Unity Editor and model your world in interactive mode at runtime using the same interface (anything you modify gets saved).

    Activate the Constructor: a special area where you can define custom, reusable models (like trees) to plant them massively according to biome rules.


    Ready to Use

    Voxel Play comes with a complete world demo scene ready to use, including lot of textures, sounds and predefined biomes and voxels.

    Terrain Features
    - Dynamically & procedural, generated automatically at runtime on demand
    - Infinite variations based on seed
    - Terrain valleys and mountains based on perlin textures
    - Integrated distance fog and ambient occlusion
    - Fast ray-cast system
    - Custom voxel & chunk culling for optimized chunk generation & voxel count
    - Destructible environment
    - Biome support (grassland, desert, forest, rainforest, tundra, taiga, snow, beach, shrubland and bare)
    - Voxel hit and destruction sounds per type
    - Voxel damage cracks
    - Voxel damage particles with object pooling
    - Voxel custom Footfalls
    - Standard Unity shadows support
    - Light spread / Voxelized Global Illumination
    - Torch lights
    - Caves



    Water System
    - Voxelized water system with no redundant face overlap
    - Flooding system
    - Rivers





    Vegetation
    - Voxel style, animated grass and trees per biome





    Sky system
    - Day/night cycle, blinking stars and cool dawns
    - Voxelized animated clouds that cast shadows over terrain






    FPS Controller
    - A custom FPS controller adapted to work with the voxel environment.
    - Walk/Run
    - Fly
    - Swimming & diving
    - Footfalls. Different sounds based on terrain.

    Console
    - On-screen console, can be shown pressing "F1"
    - Shows data useful to debug/help the user customize the world
    - Free pixel font included

    UI
    - Crosshair. Color changes to remain visible depending on background. Animates over targets.
    - Thumbnail of currently selected material with name.

    Load/Save
    - Load and save functionality included. Optimized file size.

    Released! Check current version of Voxel Play on the Asset Store!
     
    Last edited: Sep 1, 2023
    mons00n likes this.
  2. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Last edited: Apr 10, 2018
  3. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Reserved
     
  4. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Voxel Play is now available on the Asset Store

    As the description says, this is beta 1 - all included systems (terrain, water, sky, physics, fps controller..) work but other systems are still under development like caves, rivers, spawners and inventory system.
     
  5. WoodenDragon

    WoodenDragon

    Joined:
    Sep 28, 2015
    Posts:
    41
    @Thrawn75

    Looks pretty slick!

    I see you have a customized First Person controller, would this work with a Third person controller?

    Any plans for adding weather?
     
  6. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    The FPS controller included takes care of some special situations and controls, like swimming/diving and flying, custom footfalls and other effects. A third person controller will be added in a future update.

    Yep, weather fx will also be included in the future. The idea is to have a complete sandboxed environment. An optimized system could make the rain appear only below the clouds and not from empty sky. Also it will take care of lighting and be compatible with the underground.

    In Voxel Play there's an option, called voxelized GI, which spreads the light underground. So for example, if you cave a deep tunnel, light will dim as you go deeper. Same approach is used for torches. Also connecting an illuminated tunnel with a dark section of the underground will automatically spread the light - this option requires the use of special materials that takes into account the current "light" contribution inside a given voxel coordinate.
     
  7. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    Excuse me I am interested in purchasing but would you be adding A.I? And is it possible to make the planets more realistic and more smoother looking like in Seed Of Andromeda Is supposed to be able to do? I wish to to a Dungeon Keeper style game with proper planets rather than Dynamic Terrain also I would like to use planets for other games can it be done with your product? And how difficult is it ?
     
    Last edited: Jan 27, 2018
  8. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Thanks for the suggestions and questions. You could join the beta testers group if you have purchased one asset from our portfolio. We aim to release a v1.0 with all features included in the description as in development (caves, rivers, spawners, better world modelling tools, inventory system and also a third person controller).

    Then new modules could be added like weather, some AI, including path/finding, etc. So that can take some time. A new version should be released to the Asset Store every two weeks with incremental updates on our support forum on kronnect.com.
     
  9. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    OK that would be of some interest and might help me in my games I will purchase then if you are going to have moddable A.I
     
  10. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
  11. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    -Block rotations?
    -Connected Block Textures?
    -Iluminating Texture/block colors?
    -Different shaders for particular blocks types?
    -Ambient Occlusion applied on the block based on surrounding blocks?
    -3d geometry support like voxel turf? (hell if you comment on anything regarding voxelturf feature as a roadmap)
    -Possible to have multiple voxel words like on a gameobject level within a scene?
    -Possible to set the chunk sizes to something that is more optimized for other sorts of games? like 64x64x1
    -Networking? Unet, Unet Serverdll, https://forum.unity.com/threads/ben...ren-miniudp-hazel-photon-and-neutrino.512507/
    -Smooth lighting, Biome texture crossovers (dunno what its called)?

    Ingame console, Inventory, those sorts of things I'm less interested in personally and think many would want to do those themself, but the voxel engine I'm really looking for something with atleast future support for things mentioned above built in to some level.

    I think the biome, caves, rivers etc are all nice features, and can showcase the engine, like trees, but personally I'd much rather more focus on those above sort of engine areas and tools.. well I have worldedit tooling done for another opensource voxelengine project that has been somewhat abandoned and is missing a few things this does have going for it, and like to get back the project again this year.

    You run any discord for purchasers? Roadmap? Future direction targets?

    Also the ram consumption on the demo release was like 8gb just exploring, so that was a bit of a concern with it not releasing memory from areas you aren't even around anymore.
     
  12. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    That's great - thanks for the suggestions!

    In Voxel Play a chunk is rendered as one single mesh using a geometry shader. A chunk can have one or more submeshes depending on the materials used. Currently the materials supported are Opaque with Ambient Occlusion, Opaque Without Ambient Occlusion, CutOut, CutOut Cross (for vegetation) and Transparent. A glow material could be added or any other kind of shader effect - there's no limit really in terms of the materials used by a single chunk, although they need to be added.

    The material is defined in the Voxel Definition asset itself:



    Yep, this is already integrated in the voxel shader. You can globally change the intensity of the effect. Alternatively you could use a full-screen SSAO image effect but obviously having the effect integrated in the material shader is way faster.

    What do you mean by 3d geometry support? Is it like having predefined models?
    Although in its infancy, Voxel Play includes a "Constructor" mode where you can edit reusable models, save them as assets in your project and add them to biomes (as trees) or place them using the API function ModelPlace:



    Example?

    Chunks are currently 16x16x16. These are hardcoded values since by design it started as that, but it could be changed.

    Networking will not be supported as a module. Main reason is that you will need to share extra information with your peers in addition to the voxel data and for optimization purposes you will want to control each packet bit and also it's highly dependant on the backend system you choose. So instead of providing a limited networking API that probably nobody will use, Voxel Play includes an array of events you can hook into to read/update voxels.

    Smooth lighting is already supported.
    For biome texture crossovers you mean some kind of blending on frontier voxels?

    Agree - those modules help testing and playing with the overall functionality of the voxel engine. And for quick prototyping they're quite useful.

    World modelling tools are underway - since the idea is to allow modding support, they will be integrated in the engine as a runtime module (not Unity Editor extensions).

    In addition to this thread, there's this forum for discussing the beta works.
    Roadmap includes third person controller support, cave/river and spawner systems and world modelling tools.

    It's expected - this will be addressed in next beta.
     
    NotaNaN and Sir-Spunky like this.
  13. Sir-Spunky

    Sir-Spunky

    Joined:
    Apr 7, 2013
    Posts:
    132
    This looks really good, just tried out the demo! Really cool that you have a dynamic water system in there. And nice job with the trees. Well done!

    I also think you should focus on the voxel engine itself, with improved performance/API:s etc, as I think you'll have a hard time to match dedicated third-party assets for player controllers, AI etc.

    The main issue I noticed when running the demo is that the world occasionally freezes for some 100-500 ms, after walking for a while, probably when generating new chunks. My CPU is an i5-2500K so it's not the latest, but I still feel the hiccup is a bit too big, especially when aiming for laptop gaming. Maybe if the chunk generation could be spread out over more frames? Or if it's the noise generation itself that slows it down you could check out FastNoise which supposedly has better performance.

    Also as Player7 said, the RAM usage seems to keep going up a lot when generating new chunks, which is a big concern. But as you said you're already aware of this.

    Although I don't know how the code looks at the moment, it would be nice with a simple way to replace the method that decides what block should be located at x,y,z so I could control that by myself through code. Basically that the code is kept clean and separated, and the noise generators are separated from the voxel renderer itself, so that I could easily switch it own for my own and use it more as a barebone voxel engine and make my own generators.

    The tree generation and templating system also seems really cool. Not sure how it works, but I'm hoping it is as generic as possible, so you could use the same system that generates trees for other types of prefabs of varying sizes, such as houses, castles etc. I'm a bit worried that "trees" and "bushes" seems somewhat hard-coded in the inspector screenshot above, but I believe the code is probably a lot more flexible.

    Again, well done, looks really promising. Keep up the great work!
     
  14. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    @Sir-Spunky thanks so much for the feedback. Much appreciated.

    This is solved in latest beta which will be released in a few days along with other improvements. The momentary freeze you experiment is due to the engine requesting more memory for a new lot of 2000 chunks (this amount is configurable). Chunks are created and rendered afterwards in separated queues and all processing time per frame is limited by a parameter you can define so the generation and rendering really don't cause any spike but the memory request.
    So you can lower this value and make the requests more often but less noticieable or increase it and match the Chunk Pool size which will avoid any further memory requests once game starts and new chunk requests will simply reuse old pool slots (chunks out of playable area for example).

    Yep, as commented above, the maximum number of chunks can be defined so once the engine has reserved all of them, the slots will just be reused so no more heap increase (as far as new chunks are concerned).

    The API provides a few events, two of them are OnChunkBeforeCreate and OnChunkAfterCreate. The first one allows you to provide your own voxels and that will simply override the procedural content generated by Voxel Play. The second one allows you to modify what the engine has just produced for that chunk but before rendering it or making it available to the world (ie. before any other script can interact or physics).

    Currently trees are just "models" - a model is a serialized chunk you can associate with a biome or just place it using scripting using the function ModelPlace(position, ModelDefinition). The idea is that you can create your own models and share/distribute them. Same approach is aimed for voxelized mobs with support for simple animations (this is still in the concept phase).
     
    Last edited: Feb 10, 2018
    Sir-Spunky likes this.
  15. bloodsyphon

    bloodsyphon

    Joined:
    Feb 10, 2016
    Posts:
    2
    Thank you so much, this is exactly what I have been waiting for. The extensively exposed public variables and API options are great. I wish every asset was laid out this well. It took almost no effort to get this up and running.

    How do I join the beta testers group?

    Could you give me some insight on the best approach to path finding with Voxel Play? It doesn't appear that Unity's NavMeshComponents will work, I'm assuming due to the rendering occurring in a geometry shader. If I am wrong and I can use the NavMeshComponents I'd love to know how. Otherwise, are there any plans to add pathing support? Is there a particular pathing asset that already works? Thanks.
     
    Kronnect likes this.
  16. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Here's the thread for beta 2 discussions: http://kronnect.me/taptapgo/index.php/topic,2782.0.html

    There're a few APIs that you could use to navigate through the environment. Assuming "env" is a VoxelPlayEnvironment.instance reference, you can use:
    - env.GetHeight will return the highest voxel position on any given world location.
    - env.GetVoxel(position) will return the voxel at any given position or Voxel.Empty is nothing.
    - env.GetChunk(position ...) returns the chunk that contains a world position.
    - env.RayCast(...) to cast a ray from an origin following a direction and see if there's LoS between 2 positions.

    And use them to code your own navigation logic.
    A* Path-Finding is a feature that's included in all our grid and map assets so yes, it will be also included in Voxel Play. At the very minimum as a function that returns an aerial or grounded sequence of empty voxels to reach a position.

    Cheers!
     
  17. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    yeah it is very good established value like in minecraft for view distance and performance with calculations per chunk.. though in testing it other frameworks I've found that things would probably hit a new sweet spot of 24x24x24 for both increase viewdistance and be inline with faster pc's of today, the chunk recalculations for chunk changes is still pretty snappy in ms. While 32x32x32 starts to get a bit more slow in mesh updates with block changes per chunk... unless its static and then the increased chunk size helps with extending view distancing while not just adding more total chunks to the scene. Honestly it shouldn't be a hardcoded setting.. as the voxelframe if it intends to be something for developers to make any sort of game they want and not just a subpar minecraft clone then it really should be brought out into the configuration and not buried within source where other parts of the code are also hardcoded around that particular value aswel.. which then takes more time to find and change all those bits aswel.

    Wait so built voxel geometry when running isn't actually a mesh? and no mesh collider is built for it then either?

    Personally if that is the case.. then I would expecting a lot better performance and voxel density settings. Because the other framework I was using does it the above way and I'm happy with the performance, having the mesh geometry and mesh collider opens up other areas of Unity's rigid-body stuff to be used. etc..so this framework needs some other benefit to negate that limitation (if it is like this).. and probably why I'd now place even more importance on this engines own character controller then. Anyway if 1 voxel cube is 1 unit.. then I'd like to see options to have 4 voxel cubes in 1 unity of space etc.. while keeping the same or at least very close view distance.

    Then look at Qubicle and MagicaVoxel (as far a tools I don't like them and they aren't particularly great) but they are popular and providing an importer for the models would be useful. And if framework can have increased voxel density then it would play nicely with those tools for people who want to worldbuild buildings etc and bring them as like voxelmodels schematics etc to be placed in the world..either by worldgen or by manually.

    yes ..not particular bothered as far it being a huge request for me personally.. but it does make differing biome terrain blocks look nicer when there some sort of shader smoothing over the main colors of each block over a number of other blocks so its not such a visually obvious change in block types. Like from snow blocks to grass blocks.. As I mentioned before the whole terrain, biome, algorithmic worldgeneration, weather, inventory etc stuff is all nice additions but not that important to me.

    You really should post more of the full inspector screenshots for all parts of the voxelframe .. I guess documentation would include it normally but this is work in progress.. in any case it really helps to show what sort of features are included and how they might work in more detail for those thinking of using it like me.. but I've bought frameowrks and been dissapointed so I'm sort of holding off this time.. but I've ideas and wait to see where it goes.

    I think block rotation settings could be added into this area. ie if they block can be rotated x axis and/or y etc while in ingame or even for ModelPlace stuff ... instead of having to make extra block definitions just to get the material textures switched around on the block faces. Because you didn't say if block rotations are supported already or if you would be adding voxel block rotations.

    yes this is an interesting part of the framework.. so they are bit like a minecraft(magicavoxel etc) schematic..however I'm betting that by the time they are placed into the world the bounding area of this ModelDefinition is lost... so there is no way for any other script to attached to them and run or be called if a player were to break or place a block in that area.. like removing a treechunk.. that way any block added or removed in that bounding area of the tree model.. could trigger a script assigned for checking block changes in that bounding box area of the voxelworld where that treemodel was placed. Like to to see if the tree would collapse because it has lost its root treechunk for that ModelDefinition.. if you know what mean? I think this particular area is one I'd want to extend alot further for gameplay improvements... but it would be nice if you as the developer already had this idea in mind of how it could be very very useful developers of the framework to utilize. And had it built in... Far more useful than biomes or worldgen rivers etc as far as being used for a variety of games that want to use voxels.

    -Possible to have multiple voxel words like on a gameobject level within a scene?​
    Example? eeeh I'll just leave it, its not going to be something easily supported in this framework anyway.

    I dunno about nobody using it.. its a shame the Unity's unet multiplayer is kinda S***ty where competing frameworks are almost more favorable, otherwise I'd say definitely have at least basic working example built on unet for it, but yeah a bunch of events that can be hooked into for whatever multiplayer backend is fine.. some of us like good documentation or working examples that's all ..it's just easier to get started building or changing things on top of it :)
     
  18. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Right, currently the mesh is generated in the GPU using the geometry shader. This produces a minimum workload in the CPU, mesh data upload is faster (which includes AO/smooth lighting) and the geo shaders are super-fast resulting in great FPS. Yes, Voxel density could be increased significantly because of this.

    Colliders are dynamically enabled by the VoxelPlayCollider component. Add this component to any colliding gameobject and Voxel Play will take care of creating or enabling the appropriate colliders near the object.
     
  19. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    hope you look into making it easier to do that, as it would be a much better selling point ...especially with the kinda of voxel density most of the scenes made in magikavoxel use.

    ok sounds good.. any comments on the other stuff I mentioned?
     
  20. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Block rotations, etc. all are good ideas and probably will fit in .. the focus right now is producing a satisfying voxel terrain engine, then populate it in a future stage.

    In fact the idea is that you could bring multiple-voxel-resolution stuff into Voxel Play; the same way you can place normal gameobjects into the world but instead using a specialized geometry shader to render at different scales.

    At that point, a MagikaVoxel importer sounds good.. and even a mesh to voxel converter with support for skinned meshes:



    Or 3D text to voxel tool:



    Not sure at this moment if those tools will be cheap add-ons or included in the final package.
     
  21. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Hi there,
    First update for beta 3 has been submitted. This update includes reusable chunk and river systems. The demos have been updated as well. Enjoy!

     
    Sir-Spunky likes this.
  22. ecutruin

    ecutruin

    Joined:
    Aug 19, 2014
    Posts:
    39
    I have been looking for a cubic voxel engine to mess around with and this is certainly looking promising. I am curious as to how you handle blocks with custom models. Say I want to make an animated chest as a block just as an example. Alternatively, simple non-animated stairs could be another example.

    I can see a few things that would be desired regarding that. In one situation, you would want to load prefabs as blocks. These would give free rein of models and such, but not sure how performant they would be. An additional option would be to maybe use a separate format that could be used from the shaders to render fast, and could be setup in Unity by loading a MagicaVoxel file (since you could at least break a model into faces at that point).

    All in all, I'll keep an eye on this. It looks rather interesting.
     
    NotaNaN, MarkusGod and Kronnect like this.
  23. Engin_yildiz

    Engin_yildiz

    Joined:
    May 10, 2013
    Posts:
    7
    Hi,
    I bought your asset today. My first thought is very to optimize. Good job. Congratulations:):):). I want to test for mobile. I have a few questions

    - UI System is very complicated. It should be easy to understand. How can I make a hotbar like Minecraft?
    - How can I send Raycast from where I put my finger on the touchscreen, because I want to test it on mobile devices?
    - Did you test for mobile devices before?

    That's all I have to ask for now. I will write a comment about it in the asset store after a little bit more.
     
    Kronnect likes this.
  24. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Thanks for purchasing.

    The focus currently is to make a fast world generator on PC. Next will be mobile - currently Voxel Play has not been tested on mobile and some shaders may not load on your device.

    You can add your own toolbar to the Canvas UI prefab or implement your own Canvas for the toolbar.

    VoxelPlay provides a custom RayCast function you can use:


    Code (CSharp):
    1. using VoxelPlay;
    2. ...
    3. Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
    4. VoxelHitInfo hitInfo;
    5. if (VoxelPlayEnvironment.instance.RayCast(ray, out hitInfo, 1000)) {
    6.        ...
    7. }
    8.  
    Where 1000 is an optional maximum distance and the hitInfo struct contains valuable details about the hit, like position, chunk and voxel indices, normal, ...

    You can also join the beta board discussions here:
    http://kronnect.me/taptapgo/index.php?board=56.0
     
    Last edited: Mar 1, 2018
  25. Engin_yildiz

    Engin_yildiz

    Joined:
    May 10, 2013
    Posts:
    7
    Hi, I just tested on iPhone X it doesn't work because of shader problem. When do you start to implement for mobile?
     
  26. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Support for mobile is under development and will be included in next beta.
     
  27. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Beta 4 has been submitted with support for shader model 3.5 (new option to toggle on/off geometry shaders) so it should run on most modern mobile devices.

    Changes:
    - New inspector option: geometry shaders (on/off)
    - New inspector option: water receives shadows (only geometry shader)
    - New inspector option: dense trees (default = yes, off = less geometry on contiguous tree voxels)
    - Improved vegetation and tree leaves shading (more color variation and ambient occlusion)
    - Added 2 new bushes and denser folliage to grassland and forest
    - Different trees and vegetation probability can be defined per type within a given biome
    - Minor fixes and changes

    EDIT: demos have been updated as well.
     
  28. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Beta 5 submitted! This new update comes with a new architecture for the terrain generator - much more flexible:



    Define a process including multiple steps and choose from 20 different operators to mix.
    Even better, Voxel Play now allows you to even code your own terrain generator starting with a common template framework and plugin the new generator into the asset.



    Enjoy!
     
  29. JasonBricco

    JasonBricco

    Joined:
    Jul 15, 2013
    Posts:
    956
    Hey there,

    Interested in purchasing. I'm wondering how much control I have when using this system. For example, do I get the source code? This is a very nice looking system, but I tend to like to do things that aren't traditional in a Minecraft-like voxel engine. Engines tend not to support these things and I like to be able to do them myself.

    Depending on what I can accomplish with this (the sort of control I have), I'd love to purchase this as it looks quite well done (though movement felt pretty jerky and laggy in the playable demo).
     
  30. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    @JasonBricco thanks for your interest in Voxel Play.

    Yes, full source code is included in the asset.

    Voxel Play provides a rich API which enables you to control the creation of the world, either through a parametrized set of scriptable objects and rules, OR using scripting.

    Using scripting you can:
    - Derive from the DefaultTerrainGenerator C# base class and implement your own heightmap / moisture generators.
    - Hook into the OnChunkBeforeCreate / OnChunkAfterCreate to provide or modify the chunk voxels during the creation time.

    The demo package has been updated as well.

    Cheers
     
    JasonBricco likes this.
  31. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,944
    @Thrawn75

    Hi there,

    For me a Voxel based model can b described in 3D Array where where each array[][][] is actually either an empty space or a cube with info such as color or texture or something else, and whole model is constructed with those cubes.

    So based on above,
    im looking for Voxel plugin which does 3 things.

    1- Convert a 3D Model to Voxel
    2- Provide a 3D Array so we can save it as Text which defines how this model will look like
    3- Take that text array and construct the model in runtime.

    Can i use your plugin for above?

    Thanks
     
  32. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    @AmRafay1 hi! thanks for your interest in Voxel Play.

    In Voxel Play you can create:
    - a VoxelDefinition which defines how a single block or voxel looks and behaves (texture, solid, with ambient occlusion, cutout, etc). In the provided demo you can see lot of sample voxels for terrain, clouds and water. All of them are provided inside the asset so you can reuse them, duplicate, modify or create new ones. For example you can also specify the "hit points" for each voxel type or even the sounds for footprints when the player walks over them.
    - a ModelDefinition which currently is a 16x16x16 block of voxels. VoxelPlay includes a "constructor" tool so you can create your models inside the environment and save them to disk (as a ScriptableObject) and reuse them later at runtime.

    So, answering your questions directly:

    1) Convert a 3D Model to Voxel: if you want to define your own models with an array[][][] with colors or textures, we can add a function to convert that info in a ModelDefinition so you can place the models anywhere.
    2) Provide a 3D Array so we can save it as Text: Voxel Play provides functionality to load/save world in text files at editor and runtime. You can use the same functions to read the chunks (16x16x16) at any position of the world to text.
    3) Same functions that loads the chunk data from the save filename can be used to pass your own text-based model descriptions and reconstruct the chunk.

    Now, as Voxel Play is currently under beta it's receiving lot of new features from the community - so if you need specific API with a given format to convert from/to certain structures (ie. array[][][] with colors or textures) just let me know and I'll add them to the asset.

    Regards.
     
    jGate99 likes this.
  33. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Hi there,

    Just submitted beta 0.6 with tons of refinements, some new APIs and more customization options so you can just leverage the voxel engine or go with all features.

    Also included a new playable demo which resembles a simple voxel model editor. It's designed as a blueprint you can reuse and extend to match your needs. Currently this demo scene allows you to add/remove/color voxels and also load/save the entire thing in a "string" variable so you can store it where you wish (also it's possible to save to file but that's more "closed" solution as it's aimed for the full-features mode).

    The idea is to support MagicaVoxel format and possibly others so you could even build a voxel/pixel editor with Voxel Play.

    Here's the playable demo page:
    http://kronnect.me/taptapgo/index.php?topic=2779.msg6667#msg6667

    I'll detail the changes included in 0.6 when it's approved.

    Cheers
     
    jGate99 likes this.
  34. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    So beta 0.6 is now available!

    Firstly, the change log:

    New demo scene: supercube
    A simple blueprint that you can use to create a voxel editor or simple coloring game.
    The scene helps showcasing the following features:
    - Navigation (orbit mode + free camera move with automatic switch based on distance to model)
    - Adding voxels on top of others (right mouse button)
    - Coloring or destroying voxels (left mouse button, press X to toggle between draw & erase mode)
    - Simple color palette on the left
    - Save/Load to memory string (so you have more freedom to decide where to physically store your creation)
    - Load a model from file (in this case a deer imported from Qubicle)



    - Qubicle import tool
    Added support for importing models created with Qubicle (binary format only at this moment). The tool is currently located at the bottom of Voxel Play Environment inspector:



    Classic deer example:


    - Constructor: added instructions panel on top/right corner
    - Constructor: added new options: pressing Control + AWSDQE displaces model


    The constructor is an Editor-only tool that is accessed during playmode. This tool allows you to create models inside the Editor and stores them in scriptable objects - this tool has been used to create the trees included in the biomes of the sample world.

    - Voxels now support tint color (new Enable Tinting option in inspector)
    No need to create individual voxel definitions to add simple colored voxels. Now you can call VoxelPlace or ModelPlace with a color or a 3D array of colors and that's it!

    - FPS Controller: added orbit mode
    Call VoxelPlayFPSController.instance.SetOrbitMode() to switch between orbit mode and normal navigation mode. You can specify the lookAt and min/max distance to the target.

    - Ability to disable build mode (EnableBuildMode property)
    - Ability to disable console UI (EnableConsole property)
    - Ability to disable inventory UI (EnableInventory property)

    More flexibility if you just want to use the voxel engine and not the extra features.

    New APIs and events
    Please check the online documentation for an up-to-date listing of available methods, properties and events:
    https://kronnect.freshdesk.com/support/solutions/folders/42000013145

    - Models are no longer limited to 16x16x16 in size and can include an optional center offset
    Model Definitions now expose size and center offset properties, so you can create models of any size.

    - More internal changes and optimizations
    Yep, even more refinements!

    Please, check out the Roadmap for the current wish-list:
    https://kronnect.freshdesk.com/supp...000004943-wish-list-experimental-features-wip
     
  35. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,944
    Oh Man, You are just amazing,
    I just bought your package, gonna give it a try and let you know
    Thanks :)
     
    Kronnect likes this.
  36. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Thanks, loving it so far!
    Working on new import tools. Next beta will allow you to create prefabs from Qubicle or Voxel Play Model Definitions so you will be able to use normal game objects with voxelized shape over the world.
     
  37. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Beta 0.7 submitted with a bunch of new features and improvements:

    - Import tools: option to create prefab
    Not only you can import from Qubicle in Voxel Play Model Definition format but you can now directly create a prefab from the qubicle file - the prefab will hold the optimized mesh (reduced vertex/face count) with per vertex colors, a custom material (more below), a collider, etc. ready to drag & drop and use:



    - New shaders for in-game models supporting fog and smooth lighting
    New shaders are now included in the package. These shaders are designed to be used on imported models - they are optimized vertexlit and textured versions that support self-shadows, fog with skybox blending and more.



    - Improved demo scene Earth - press 1,2,3 to create ball, deer, brick



    (If you have rigged and animated voxelized characters, contact me to check how they work with the new shaders)

    - Improved performance of water style with no shadows
    All shaders have been reviewed for performance and alternate versions are included according to your performance preference (in any case the overall system is really fast!).
     
  38. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Hey there,

    Beta 0.8 now available on our support forum. This update adds:

    - Support for standard Unity colliders. Either if you use geometry shader option or standard vertex/fragment shaders, terrain now receives a standard Unity collider so it can now fully work with any other asset (pathfinding, etc.)

    - Multi-threading chunk generation at runtime. A dedicated thread will now take care of chunk population.

    Regards.
     
  39. SweatyChair

    SweatyChair

    Joined:
    Feb 15, 2016
    Posts:
    140
    Wanted to make a new open-world multiplayer Minecraft game, where players can buy their own land, came across this plugin and it's pretty amazing! It has the function to save and load the land so we just have to tweak a bit.

    Some cons currently it has:
    - With default setting, it can go up to 1000 draw calls, which is not mobile friendly, may need to manually tweak for that and would be good if there's a doc for it. (an old Samsung s3 clashed at launch, may or may not related to this)
    - Scripts using 4 tabs as indent, instead of the standard 1 tab we use, making it little bit hard to read.
     
    Last edited: May 14, 2018
    Kronnect likes this.
  40. Auger

    Auger

    Joined:
    Jun 30, 2014
    Posts:
    9
    You can reset the tabs if you're using VS it's Edit>Advanced>Format Document or Ctrl K, Ctrl D
     
    Kronnect likes this.
  41. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    There’re some optimisations down the road for mobile still pending to implement - since geometry shaders are not supported on mobile, Voxel Play defaults to naive shaders in which the vertex count and data goes beyond the limit for Dynamic Batching - for now you may need to reduce the visible distance on mobile for those mobile devices.
     
  42. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Using MonoDevelop, it may have reseted the tab/indent Settings will check it out. As other user has pointed out, in VS you can apply format to doc using that shortcut.
     
  43. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    This doesn't appear to be in the May madness sale, will it be?
     
  44. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Hi! Assets published after Nov 1st are excluded from this May Madness Sale. Sorry!
     
    Last edited: May 7, 2018
  45. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    oh ok
     
  46. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    Bought the asset but haven't really had time to get into checking it out, just first test on 2018.2 and noticed that shaders were all purple.. probably because I was using the LW renderpipeline.. will you have support for that? unless it was just unity's dodgy package importing crap that broken the demo scenes and that's why I had purple shaders?.. can't be sure.
     
  47. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    LWRP is in preview and won’t be supported until it’s finished and battle tested. It will be eventually supported but not yet.
     
  48. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Very early work on village/building spawners:


     
  49. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    A nice lake with some shores:

     
  50. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Flying through the clouds: