User Tag List

Page 1 of 3 123 LastLast
Results 1 to 40 of 106

Thread: Cubiquity for UE4 - Voxel Terrain Plugin

  1. #1
    1

    Lightbulb Cubiquity for UE4 - Voxel Terrain Plugin

    Hi all,

    I'm Matt from Volumes of Fun, a hobbyist software studio based in Europe. We're probably best known for the open-source C++ voxel management library, PolyVox which is available for commercial use by all for free.

    On top of PolyVox, we also develop and sell Cubiquity, a 3D engine integration layer. So far, most of our work has been focused on Cubiquity for Unity 3D but we've been fans of Unreal Engine for a long time (since the first game) and so we are now actively working towards getting Cubiquity for UE4 off the ground. For the Unity3D version we provide a completely free version for non-commercial use and a $200 license for use in commercial products. I imagine we will have similar terms for the UE4 version but this is not set in stone yet.

    The UE4 plugin is still in early development but can already import Cubiquity VDB files, render smooth terrain with blended tri-planar texturing and create correct physics meshes. Here's a few screenshots of what's running at the moment:


    Terrain as it appears in the editor


    The wireframe generated by Cubiquity


    Showing it in game mode with a 3rd-person actor

    Next, I'm planning on getting live editing of the terrain working (both in edit mode and play mode) which will all be exposed through blueprints.

    By the first release we plan to have feature parity with the Unity3D version and so Cubiquity will provide:

    • Support for both smooth terrain and colored cubes type environments (video examples from Unity3D).
    • Support for multiple volumes which can exist in transform hierarchies.
    • Unique material blending algorithm on smooth terrain.
    • Direct voxel access for implementing procedural generation.


    Update September 2014



    Update January 2015

    First demonstration of large coloured cubes data being loaded into Cubiquity. Voxel data from Ki11aWi11.


    A view showing a chunk of the map from the top of one of the buildings.


    Raining down destruction on the ground below.


    Everything in the map can be destroyed and interacts properly with the physics engine.

    Update February 2015



    If you want to follow our progress, I will be posting updates in this thread as well as at our usual places:



    If anyone has any questions, I'd be happy to answer them.
    Last edited by milliams; 02-23-2015 at 09:11 AM.

  2. #2
    0
    Samaritan
    Join Date
    May 2014
    Posts
    126
    Looks awesome. I've been a big fan of voxel terrain since about 2003, and although you can achieve somewhat similar effects using static meshes these days, you can't beat how intuitive voxel editing can be.

    Would be interesting to see that example with texture blending (based on an alpha) and tesselation - I think that could avoid the typical problem of 'smoothness'. Does the plugin import a completed mesh ingame, or does it have dynamic LOD?

  3. #3
    0
    Yeah, we've been working with voxels for a long time. The earliest parts of PolyVox date back to around 2006. I agree that editing voxel terrain can be nicely intuitive as I think we show in this video. We've got some interesting plans for the future for using Dual Contouring with some custom tweaks to get the best compromise between smooth and sharp features.

    The plugin breaks the volume down into chunks in an octree and creates a mesh for each chunk. Cubiquity includes the ability to load dynamic LOD versions of octree nodes as shown in this video using Gameplay3D. LOD isn't working yet in UE4 but it's on the list.

  4. #4
    0
    Luminary
    Join Date
    Mar 2014
    Posts
    1,561
    Quote Originally Posted by milliams View Post
    Yeah, we've been working with voxels for a long time. The earliest parts of PolyVox date back to around 2006. I agree that editing voxel terrain can be nicely intuitive as I think we show in this video. We've got some interesting plans for the future for using Dual Contouring with some custom tweaks to get the best compromise between smooth and sharp features.

    The plugin breaks the volume down into chunks in an octree and creates a mesh for each chunk. Cubiquity includes the ability to load dynamic LOD versions of octree nodes as shown in this video using Gameplay3D. LOD isn't working yet in UE4 but it's on the list.
    So got a few questions about Cubiquity as well as a few suggestions.

    Questions -
    1. Does Cubiquity allow for infinite terrain?
    2. What are the file size of individual .VDB files?
    3. What platforms are supported with this plugin so far?
    4. Is Cubiquity network ready?
    5. Are the block and smooth terrain going to be toggle able via a bool or will it be a shader option?

    Suggestions -
    1. Can we import real world terrain data (Heightmap) into Cubiquity for making real life game worlds? If not would this be possible?
    2. Would it be possible to hook this up to the World Browser Tools? This would allow us to arrange out voxel terrain to fit our worlds needs as well as layout.
    3. Support Biome Generation at runtime both via blueprint and C++.
    4. Support AI navigation with cubiquity.
    5. Support network replication via blueprint and C++.
    6. Support for Optional Destruction of terrain at runtime.

    Thank you for your time,
    - HeadClot
    Last edited by HeadClot; 08-16-2014 at 04:16 PM.

  5. #5
    0
    Please let us know when you need testers. You are one of only 3 people I follow on twitter. And Cubiquity in UE4 was exactly what I was hoping for.

  6. #6
    0
    Quote Originally Posted by HeadClot View Post
    So got a few questions about Cubiquity as well as a few suggestions.

    Questions -
    1. Does Cubiquity allow for infinite terrain?
    2. What are the file size of individual .VDB files?
    3. What platforms are supported with this plugin so far?
    4. Is Cubiquity network ready?
    5. Are the block and smooth terrain going to be toggle able via a bool or will it be a shader option?
    1. At present, no. There's support in PolyVox for infinite terrain but it is not yet exposed to Cubiquity. This is because different engines support this sort of thing in different ways. This is something we may look into in the future but I'd have to defer to David for any more idea about priority.
    2. The VDB for the volume shown in the screenshots above is ~300kb. The VDB file is essentially a SQLite database containing the information so there is some generic compression going on there as well. The VDB for an equal-sized cubic terrain volume is about 10% of that size.
    3. At present Cubiquity for UE4 is only being tested on Windows since the UE4 Linux support is only basic at present. Cubiquity itself works on Windows, OS X and Linux and the UE4 plugin will follow this once it starts to get stable.
    4. Cubiquity itself has no built-in network support. However, within UE4, it should be simple enough to integrate it with the standard network replication to work as expected for a multiplayer-type game.
    5. The blocky and smooth terrain meshes are created by different function calls and the geometry is distinct. We have some interesting long-term plans for combining the two modes using a Dual Contouring variant which would allow per voxel sharpness to be set to have the two styles in one volumes.


    Quote Originally Posted by HeadClot View Post
    Suggestions -
    1. Can we import real world terrain data (Heightmap) into Cubiquity for making real life game worlds? If not would this be possible?
    2. Would it be possible to hook this up to the World Browser Tools? This would allow us to arrange out voxel terrain to fit our worlds needs as well as layout.
    3. Support Biome Generation at runtime both via blueprint and C++.
    4. Support AI navigation with cubiquity.
    5. Support network replication via blueprint and C++.
    6. Support for Optional Destruction of terrain at runtime.

    Thank you for your time,
    - HeadClot
    1. Absolutely. This is relatively trivial to support. There's no in-editor tooling for this yet in UE4 though. The only slight complication would be texturing; usually with heightmaps you have a set of texture masks for the surface material but with voxel terrain you need to set the material in the bulk if you want any destructibility.
    2. I haven't really looked into WorldBrowser much yet but I think it would definitely be in our plans. It's exactly this sort of engine integration which we're aiming for with Cubiquity. We want to make sure people's workflows with traditional terrain can carry across to Cubiquity.
    3. This is a layer above what we're currently planning with Cubiquity. For the first release at least we will be providing only simple authoring/importing tools. However, since users will have full access to the underlying volume data, anyone could write their own in the meantime.
    4. In PolyVox we have an implementation of A* through a volume with customisable logic. It's not exposed in Cubiquity yet though. Once it is, we would want to make sure it's integrated well with the expected UE4 tools. Otherwise, since Cubiquity creates standard Unreal meshes, and 'magic' path-finding tools which automatically locate flat surfaces would work anyway. In the medium term we would recommend using an existing solution for this.
    5. Certainly planning on this. It will be waiting until we have feature parity with the Unity3D version though.
    6. This is going to be one of the next things I get working. PolyVox and Cubiquity have excellent support for this as shown in this video.

  7. #7
    0
    Quote Originally Posted by JohnnyBeans78 View Post
    Please let us know when you need testers. You are one of only 3 people I follow on twitter. And Cubiquity in UE4 was exactly what I was hoping for.
    Will do. As son as I've got the base functionality working and have packaged it up as a proper plugin, I'll advertise on this thread for some initial testing.

  8. #8
    0
    Samaritan
    Join Date
    Mar 2014
    Posts
    96
    Are there plans for in-editor creation/sculpting?
    Or will it be a separated voxel editor from which you can only import your finished meshes?

  9. #9
    0
    Quote Originally Posted by jbjhjm View Post
    Are there plans for in-editor creation/sculpting?
    Or will it be a separated voxel editor from which you can only import your finished meshes?
    We have plans to have full sculpting + texturing support inside the editor. You can see what we have in Unity3D in this video. Alongside this we have support for importing volumes from external editing tools (such as MagicaVoxel as seen in the docs) and it's very simple to extend this to cover new tools too.

  10. #10
    0
    Samaritan
    Join Date
    Mar 2014
    Posts
    96
    Quote Originally Posted by milliams View Post
    We have plans to have full sculpting + texturing support inside the editor. You can see what we have in Unity3D in this video. Alongside this we have support for importing volumes from external editing tools (such as MagicaVoxel as seen in the docs) and it's very simple to extend this to cover new tools too.
    Sweet! Looking forward to the first release

  11. #11
    0
    Quote Originally Posted by milliams View Post
    We have plans to have full sculpting + texturing support inside the editor. You can see what we have in Unity3D in this video. Alongside this we have support for importing volumes from external editing tools (such as MagicaVoxel as seen in the docs) and it's very simple to extend this to cover new tools too.
    One thing that would be really awesome is if you could take the mesh extracted from the voxel data and bake it into a static mesh along with UVs. That would allow you to use it as a level design tool ala BSP, but with the awesome quality and organic shapes that the smooth voxels give you.

  12. #12
    0
    Looking great so far guys! Really looking forward to it because i will definitely use this plugin, if not for personal hobby projects... then for sure something more serious. What does the general roadmap look like for coming close to feature parity? I don't like release dates what so ever (cause i know what it entails) but what would be a safe guess? 1-2 months or close to 6-9? (just gauging time frame )

    Thanks guys!
    Last edited by KRushin; 08-23-2014 at 01:14 PM.

  13. #13
    0
    Samaritan
    Join Date
    Mar 2014
    Posts
    96
    Quote Originally Posted by n00854180t View Post
    One thing that would be really awesome is if you could take the mesh extracted from the voxel data and bake it into a static mesh along with UVs. That would allow you to use it as a level design tool ala BSP, but with the awesome quality and organic shapes that the smooth voxels give you.
    OMG yes please
    You could even use it as a perfect sketching tool then.
    Build the voxel thingie you need in that exact position.
    Bake it into a mesh and export it.
    Use your favourite 3D app to add details and custom textures.
    Import the new mesh fitting perfectly.

    Hell yeah. That would be fantastic.

  14. #14
    0
    Quote Originally Posted by n00854180t View Post
    One thing that would be really awesome is if you could take the mesh extracted from the voxel data and bake it into a static mesh along with UVs. That would allow you to use it as a level design tool ala BSP, but with the awesome quality and organic shapes that the smooth voxels give you.
    This would be technically possible and could make sense for very static terrains. The problem with UVs is that voxel terrains are difficult to unwrap to a 2-dimensional map. Instead of this, Cubiquity uses tri-planar texturing which is much more robust for our needs. Of course, you could still do the texturing yourself using the Cubiquity example.

    Since implementing this feature would take time away from getting the primary features working, it would have to be something we defer until the future but do remind us of it and if there's enough demand, things might be moved around in priority.

  15. #15
    0
    Quote Originally Posted by KRushin View Post
    Looking great so far guys! Really looking forward to it because i will definitely use this plugin, if not for personal hobby projects... then for sure something more serious. What does the general roadmap look like for coming close to feature parity? I don't like release dates what so ever (cause i know what it entails) but what would be a safe guess? 1-2 months or close to 6-9? (just gauging time frame )

    Thanks guys!
    It's very difficult to say. I would estimate, based on the timings for the Unity3D version, that it will be several months until I have a testable beta version working and perhaps 6-9 months after that until a first release. Of course, it could easily end up being longer than that as all the development work is done in our spare time.

    I will be making updates here though so it should all become clearer as we get closer to the time.

  16. #16
    0
    Update

    Over the last few days I've been reworking the internals of the plugin to make it fit better with the UE4 way of doing things in order to try to bring it out of the prototype stage. As of today, I've got live-updating of the mesh based on the volume data meaning that you can edit the volume live in-game and have it immediately visible.

    The interface to this is clunky at the moment but I'm designing it to be easily usable with Blueprints or C++.


    Extruded terrain created live in-game

    My next plans are to get the interface to this working more nicely, implement voxel painting and then work on tidying up the code in order to try to get a preview release out to you all.

  17. #17
    0
    I wrote a Polyvox plugin for UE4 awhile back for fun that I have been playing around with. However it is really nice to see you guys pull your excellent work with cubiquity into this engine. Looking forward to seeing it completed, and will love to see what your shader implementation looks like as I'm still not happy with how complicated I ended up making mine

  18. #18
    0
    Quote Originally Posted by milliams View Post
    This would be technically possible and could make sense for very static terrains. The problem with UVs is that voxel terrains are difficult to unwrap to a 2-dimensional map. Instead of this, Cubiquity uses tri-planar texturing which is much more robust for our needs. Of course, you could still do the texturing yourself using the Cubiquity example.

    Since implementing this feature would take time away from getting the primary features working, it would have to be something we defer until the future but do remind us of it and if there's enough demand, things might be moved around in priority.
    I think triplanar materials would still be fine in that case. The idea is more to get something that will let us make simple organic shapes and stuff (vs. BSP's very rigid shapes) during the level block-out process, so they don't actually need to have really good UVs or anything, and even just having a triplanar material there would be perfectly acceptable.

    Anyway, I figured it would be low priority, but I'm happy you guys are considering it I think such a feature would put the kit's usefulness ahead quite a bit for UE4 devs, since there isn't currently a way to block out organic shapes like that, without just having an artist on team to do standard static meshes.

  19. #19
    0
    Quote Originally Posted by mordentral View Post
    I wrote a Polyvox plugin for UE4 awhile back for fun that I have been playing around with. However it is really nice to see you guys pull your excellent work with cubiquity into this engine. Looking forward to seeing it completed, and will love to see what your shader implementation looks like as I'm still not happy with how complicated I ended up making mine
    Yes, I remember you from the PolyVox forums. I'm definitely having fun playing with UE4 and the integration with Cubiquity is going really well.

    The shader implementation is very simple at the moment and not at all efficient (basically 4-way blended tri-planar based on vertex colours) since it's all implemented in the Blueprint editor. I'm looking into how to do 'proper' shaders in UE4 so that I can make the whole thing a lot more efficient. In the meantime it works, but it's not there yet.

  20. #20
    0
    Quote Originally Posted by n00854180t View Post
    I think triplanar materials would still be fine in that case. The idea is more to get something that will let us make simple organic shapes and stuff (vs. BSP's very rigid shapes) during the level block-out process, so they don't actually need to have really good UVs or anything, and even just having a triplanar material there would be perfectly acceptable.

    Anyway, I figured it would be low priority, but I'm happy you guys are considering it I think such a feature would put the kit's usefulness ahead quite a bit for UE4 devs, since there isn't currently a way to block out organic shapes like that, without just having an artist on team to do standard static meshes.
    For this use case, you probably wouldn't even need to do 'mesh exporting'. Cubiquity is able to be used simply to edit (in the editor) and render the extracted smooth mesh. You could use the standard Cubiquity system to create a volume (as many as you need theoretically) and carve/paint each one individually. Within UE4, it should be possible to add functionality to convert a Cubiquity mesh into a static mesh.

    After the first preview release I'll be starting an issue tracker/TODO list so remind me to put it on there.

  21. #21
    0
    Update video

    I've posted an update on our blog to show off a video I've put together to demonstrate the current status. It shows off using the asset in the editor and linking it up with the Blueprint system.


  22. #22
    0
    Luminary
    Join Date
    Mar 2014
    Posts
    1,561
    Any Update?

  23. #23
    0
    Veteran
    Join Date
    Mar 2014
    Posts
    370
    Quote Originally Posted by n00854180t View Post
    One thing that would be really awesome is if you could take the mesh extracted from the voxel data and bake it into a static mesh along with UVs. That would allow you to use it as a level design tool ala BSP, but with the awesome quality and organic shapes that the smooth voxels give you.
    +1 to this.

  24. #24
    0
    Supporter
    Join Date
    Dec 2014
    Posts
    1
    Looks awesome already. I'll gladly test it and provide feedback should you need to.

  25. #25
    0
    Will it stay fully dynamic in-game so that players can make their own levels without the UE4 editor? This is an important legal issue for me.

  26. #26
    0
    I've been working on this over the last week or two and have managed to fully integrate all the functionality of Cubiquity into the plugin. The work now comes from making the plugin itself provide easy access to the functionality to you, the end-user. I'm currently working towards a pre-alpha which will allow rudimentary in-game editing abilities.

    Longer-term I am working towards an 1.0 release which will focus on in-game editing rather then within UnrealEd since editor integration is a harder problem to solve. I also expect the 1.0 release will have comprehensive Blueprint integration for flexibility. Before the 1.0 release, there are however a number of things which need to be changed or added to UE4 itself so to a certain extent it will have to wait on those.

  27. #27
    0
    Quote Originally Posted by xXxFishAndChipsxXx View Post
    Will it stay fully dynamic in-game so that players can make their own levels without the UE4 editor? This is an important legal issue for me.
    There will absolutely be functionality available for you to allow in-game editing of any of the volumes. However, as the game creator it is very simple to disallow any editing entirely if you wish. How much control you give is entirely in your hands.

  28. #28
    0
    Luminary
    Join Date
    Mar 2014
    Posts
    1,561
    Hey Milliams -

    Thanks for the update really excited for Cubiquity.



    EDIT: Would it be possible to Post a video of the Colored Cubes demo in Unreal 4?

    Just Curious

    HeadClot

  29. #29
    0
    Quote Originally Posted by HeadClot View Post
    Would it be possible to Post a video of the Colored Cubes demo in Unreal 4?
    I do plan to do so. I'll need to implement a simple in-game editing interface (add/remove blocks and choose colour) but I'll probably try to show how that would be written using Blueprints as part of the video. It's something that I'll need to create for the first release anyway. I'm not sure when I'll get round to the video, it depends on time but I'll put it on my list

  30. #30
    0
    Samaritan
    Join Date
    May 2014
    Posts
    126
    Quote Originally Posted by milliams View Post
    Before the 1.0 release, there are however a number of things which need to be changed or added to UE4 itself so to a certain extent it will have to wait on those.
    What sort of things are we talking about here? Are the on the official roadmap i.e. do you know they're going to be added?

    I'm looking forward to trying this out, could definitely see it being useful for cave systems with copious amounts of static meshes to roughen it up.

  31. #31
    0
    Quote Originally Posted by DaveFace View Post
    I'm looking forward to trying this out, could definitely see it being useful for cave systems with copious amounts of static meshes to roughen it up.
    One of the things that's been discussed here on the forums is improvements to the plugin system. At the moment, support on the marketplace for code plugins is poor (I don't believe that they allow them at all yet). As one example I need to be able to bundle along a shader file (.usf) with Cubiquity but under the current system this will have to be copied by hand into the engine's shader directory by the user. Since UE4's underlying C++ API is evolving quite rapidly (which is a good thing) I'm trying to not tie myself to early implementations of systems when better ones will be coming down the line. Instead I will focus on the more stable parts of the system first.

    Once the first preview of Cubiquity is out, I will try to put my work items somewhere public so that people know what's planned in what order and there I will document any specific requirements from UE4's side.

  32. #32
    0
    You sir, are a genius. I'm already changing the direction of my game based on this being a possibility in the future, AWESOME!

  33. #33
    0
    Promoter
    Join Date
    Mar 2014
    Posts
    202
    was literally just pondering about finding a voxel plugin exactly like this for ue4 as my current project will greatly benefit from it in the future luckily i dont need it anytime soon but i will definitely be keeping my eyes on this
    Self-Learning to program, Open to advice!

  34. #34
    0
    @milliams,
    I am so stoked about your port of Cubiquity. I am in the process of migrating from another engine partly due to your porting efforts. Thanks.

  35. #35
    0

    Coloured cubes preview

    Hi everyone! I realised that I hadn't posted anything here about what I've been working on with the coloured cubes-style terrain. If you're following me on Twitter then you may have seen this already but here's some screenshots I took of a large example map being processed by Cubiquity. The voxel data for the map shown here comes from a custom map for the game Ace of Spades created by a member of the Build and Shoot community forums member Ki11aWi11. The voxel data has been converted to our custom storage format (VDB) and so can be read natively within Cubiquity.

    For now I will just leave you with these screenshots but I'm planning on a video showing the coloured cubes terrain in game as well as some details of the Blueprint API for Cubiquity.


    A view showing a chunk of the map from the top of one of the buildings.


    Raining down destruction on the ground below.


    Everything in the map can be destroyed and interacts properly with the physics engine.

  36. #36
    0
    Luminary
    Join Date
    Mar 2014
    Posts
    1,561
    Awesome!

    Is there an ETA for the Colored Cubes Demo?

    Or at very least a video?

    EDIT: Also I have a bit of a concern. How would you prevent players falling through the bottom of the world?
    Last edited by HeadClot; 01-13-2015 at 06:08 PM.

  37. #37
    0
    Quote Originally Posted by HeadClot View Post
    Awesome!

    Is there an ETA for the Colored Cubes Demo?

    Or at very least a video?

    EDIT: Also I have a bit of a concern. How would you prevent players falling through the bottom of the world?
    No ETA but it will be ready as soon as it can be

    As for stopping players falling through the world: Cubiquity offers nothing to do this automatically. All editing of the volume is completely under the control of the game author (i.e. you) and so it would be very easy to add an explicit check to make sure, e.g., that the bottom layer of voxels is never destroyed.

  38. #38
    0
    Luminary
    Join Date
    Mar 2014
    Posts
    1,561
    Quote Originally Posted by milliams View Post
    No ETA but it will be ready as soon as it can be

    As for stopping players falling through the world: Cubiquity offers nothing to do this automatically. All editing of the volume is completely under the control of the game author (i.e. you) and so it would be very easy to add an explicit check to make sure, e.g., that the bottom layer of voxels is never destroyed.
    Alright thanks for the info

    Still got a few more questions -

    Is the .VDB an custom Import option via Unreal importer? (Similar to how we import FBX files)

    As for the blueprint side of things - What are you guys planning to do in a general sense?

    Will the .VDB be exposed so that end users can import there own levels into an completed unreal game?
    Last edited by HeadClot; 01-13-2015 at 06:22 PM.

  39. #39
    0
    Quote Originally Posted by HeadClot View Post
    Is the .VDB an custom Import option via Unreal importer? (Similar to how we import FBX files)
    VDB is a small database file which sites on disk and is the primary backing store for Cubiquity. It's not just an interchange format but also is updated in real-time to store edits etc. We have a program which converts from a number of standard formats (heightmap, image slices, MagicaVoxel etc.) into VDBs which can the be read at runtime by Cubiquity.

    Quote Originally Posted by HeadClot View Post
    As for the blueprint side of things - What are you guys planning to do in a general sense?
    For the first release it will be just the basics. For the coloured cubes you will be able to get and set on an individual voxel level. The smooth terrain editing is a little more complex and so functions to paint and carve will be provided too. More advanced functionality will probably not be part of Cubiquity per se but will be provided as examples of how to use the API. People's use-cases are so varied that we don' want to provide too much specific functionality.

    Quote Originally Posted by HeadClot View Post
    Will the .VDB be exposed so that end users can import there own levels into an completed unreal game?
    This will be up to the game author as to how available they want to make this functionality but it would certainly be possible to expose this ability if you wished to.
    Last edited by milliams; 01-15-2015 at 05:36 PM.

  40. #40
    0
    This is THE feature I want in my UE4 game. Well besides some others...

    Thanks for updating your progress on here. Very inspiring to see how it is coming along.

    Edit:
    I do have one question though:
    Will this be usable with the level streaming capabilities of the UE4 engine? ie infinite terrain?

Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •