Search Unity

Introducing Voxelform - voxel terrain (Marching Cubes) with real-time deformation.

Discussion in 'Assets and Asset Store' started by Mark-Davis, Jun 24, 2011.

  1. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    Just submitted Voxelform 2.0. Can't guarantee when it'll go live, but perhaps tomorrow if the good folks at Unity review it, and it passes. Just so that everyone is aware, it's a complete overhaul. There are breaking changes, but hopefully it won't be too much trouble to adapt old code if required. The code is more complex this time, and I'd have to recommend at least an intermediate skill level with C#. The built-in editor was supposed to be a big feature in this version, but is still very much in beta, and likely to be completely rewritten when Unity's new GUI arrives... and let's hope it's event driven.

    The big new features are:

    Full multi-material support (up to 65536 unique materials theoretically possible using material palettes.)
    15 built-in volumetric shaders including triplanar with diffuse, normal, and specular mapping (with plenty of control over the details.)
    Meshes are tuned up to be as tight as possible at welds between materials, probably as good as it gets for the technique.
    Hidden surfaces within the welds are automatically culled before Marching Cubes analyzes them, cutting down poly count.
    Voxel data source can be completely customized by implementing an interface.
    Voxel terrain is visible within the Scene View.

    Some intended features didn't make it in due to time constraints, or did, but were pulled for various reasons. One feature that didn't make it due to performance issues was "infinite" terrain. While the current terrain is fine for many uses, I'm going to continue to look into this. If this were a straight up Minecraft clone, I don't think it'd be much of an issue, but there's a lot more processing going on here. That said, there's nothing stopping you from grabbing the code and figuring it out for yourself.
     
  2. sagron6015

    sagron6015

    Joined:
    Apr 19, 2010
    Posts:
    32
    Thanks for all the hard work! Look forward to playing with the new version.
     
  3. AntonioT

    AntonioT

    Joined:
    Feb 3, 2010
    Posts:
    17
    I must say this piece of work has come a long way since the first version and quite quickly too. I was very excited that someone had finally made a Voxel implementation for unity but felt that the initial release was still very far off. So far off in fact that I wasn't prepared to spend the cash yet.

    The fact that you've brought it up to the point where it's now even implementing nice to have features is a clear indication of a quality product. If anything I will be buying v2.0 now just to support you getting this to full fruition, editor integration et al.

    I'm one of the people who voted for voxels to be added to unity and if v2.0 lives up to what we're seeing here, then I really hope that Unity seriously consider putting this into the engine natively. The same way as they've taken in other community projects with success.

    If this implementation is quick enough and solid enough via scripting, then a fully integrated version would be fantastic. Certainly if the performance is good enough in c# then native c / c++ would be even better.

    I'm dropping that suggestion because hopefully the others who have voted for Voxel implementations also see the potential here to make a similar suggestion to unity. The commitment to getting this done right and finished is exactly the kind of thing that drives an engine forward.

    So to re-iterate what a lot of people have already told you, this is really good work dude. Solid commitment.
     
  4. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    @sagron, AntonioT - Thanks so much! It's been quite the fun project to put together this year in my spare time, and I'm looking forward to taking it as far as I can within the constraints of C#, partial Shader Model 3 support (if only we had 3D textures), and the Unity environment.

    @Antonio - Of course Unity could do a better job if it were native! :) Suppose I'd have to go find another side project too.

    @All - Voxelform 2.0 is live on the Asset Store!
    More info at: voxelform.com

    Also - I'm going to be unavailable Friday forward, anywhere from a few days to a couple weeks. So if you e-mail me and don't get a response, I will get back to you... just might take a little longer than usual.
     
  5. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    Very nice update, sadly it still runs quite slow on my computer. Is there any possbility that you could provide some low-end demo scene with basic shaders?
     
  6. ttank7

    ttank7

    Joined:
    Apr 18, 2011
    Posts:
    42
    Wow, I can't wait to play with it this weekend! The new demo runs much faster than the old one on my computer, and the optimizations look great, things are very solid.

    Thanks so much for your hard work Mark, and I hope your Christas is great! :)
     
  7. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    @janpec - From the online demos, the "Simple Sandbox Editor Demo" should work fairly well on a minimum spec machine. From the package itself, just swap out the material palette, or create your own. You can use a Voxelform menu command to create the palette, and then add some of the simpler materials to that palette via it's material array in the Inspector. Be sure to set the voxel terrain's material palette (in the Inspector) to the one you just created. If you want to create your own materials, just consult Unity's documentation for creating a material, and use Voxelform's shaders. I've included a huge number of textures with diffuse, normal, and specular maps, so that you won't have to go searching for texture packs when you just want to get started and quickly try things out. To determine which shaders or materials are "simple" and should work well with your machine, look for shaders or materials with a "D" in the name, and skip "DN" or "DNS". DNS stands for Diffuse, Normal, Specular. Also, you'll see Triplanar 1, 2, and 3. That number determines the number of diffuse textures used. If normal or specular maps are used, then it indicates the number of those as well. So the simplest triplanar shader will use 1 texture, where the most complex will use 9. More details on all this in the Readme.pdf.

    @wsworin - Thanks!! Merry Christmas to you too! :)

    @All - More demos are live up on the website!

    http://www.voxelform.com/demos.html
     
  8. unity_sg

    unity_sg

    Joined:
    Sep 14, 2010
    Posts:
    95
    Hi Mark, thanks for this new version.
    Only one thing is missing for me, I think there is not enough demo scenes in the project.
    In the first version there was about 10 scenes or more, now only two.
    With more demo we can have more ideas about what we can do.
     
  9. Samsson

    Samsson

    Joined:
    Oct 12, 2010
    Posts:
    165
    Hi Mark,


    Huge Realise !!

    Can you show us more about this feature : Editor menu items for saving, loading, creating, and editing voxel terrain

    This one was the most asked from us if my memory is good !
     
  10. bandingyue

    bandingyue

    Joined:
    Nov 25, 2011
    Posts:
    131
    棒极了
     
  11. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,085
  12. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    @seb7000 -

    I completely agree with that assessment. I wanted to get v2.0 out the door so that everyone could enjoy it before I was out for a few weeks. But now that I'm back, I'll touch things up a bit.

    @xoart -

    I'll get some more info up on this. It's very basic stuff really. Saving and loading are just menu items that save or load a voxel terrain located in your scene. There are other menus items for quickly creating voxel terrain or material palette objects. None of these are core features, and you may want to reimplement saving/loading for the specifics of your game. Lastly, there's a menu item for editing voxel terrain. This is the only feature that requires Unity Pro. It's also very much in beta, and while it works fine for what it is, the code needs a complete overhaul. The main reason why the editor is in beta is that I didn't find Unity's API for building editor extensions to work very well with the needs of a voxel terrain editor. An object oriented, event driven GUI would have worked quite a bit better, and in general there were just too many hacks.

    @BanDingyue -

    谢谢

    @ina -

    It doesn't support mobile yet.

    The mouse cursor is intentionally hidden for that demo. Just press escape to bring it back.
     
  13. Samsson

    Samsson

    Joined:
    Oct 12, 2010
    Posts:
    165
    Thank for answer mark,


    So if we can save and load voxels chunks, in what kind of object ? Prefab ?
     
  14. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    @xoart - It's the voxel data, plus a few voxel terrain properties being saved, so it's just a binary file. With full source though, you're not really locked into anything... you could easily just create your own file format, and use that instead.
     
  15. Samsson

    Samsson

    Joined:
    Oct 12, 2010
    Posts:
    165
    Ok, so the voxel part is generate at runtime and you can't see it inside the editor ?

    The main goal is to know f i can use this : http://www.unifycommunity.com/wiki/index.php?title=ObjExporter


    This could be fantastic to create voxels inside Unity and then export them as 3D object.
    Whit this system we could use the triplanar texture but also make "classical" texturing, also use umbra, lightmapping, etc etc ....
     
  16. Broken-Toy

    Broken-Toy

    Joined:
    Jan 16, 2010
    Posts:
    455
    Hi,

    I noticed a big difference between 1.x and 2.0:

    In 1.x, as soon as all the chunks were computed, it didn't change framerates significantly whether 1 or 10000 of them were active, except for rendering purposes. In 2.0, a large number of active chunks produces a massive framerate drop even after they should be computed. Any idea why this is happening?
     
    Last edited: Jan 9, 2012
  17. VortiganX

    VortiganX

    Joined:
    Jan 10, 2012
    Posts:
    6
    this is good stuff. we just bought it and look forward to implementing this into our game idea.

    cant wait for infinite terrain :)
     
  18. Dragoworks

    Dragoworks

    Joined:
    Jan 12, 2012
    Posts:
    16
    I really love this Asset!

    Well, i have some problems as Unitybeginner, but that doesnt change a thing^^

    But i recommend you all to NOT create a terrain with x 512 y 58 z 512.

    that will crash unity, and probably the whole system^^ my 16 gb ram system just barely made it :D

    But it was worth it ;)


    Anyways a little question: Is it somehow possible to make the terrain bigger than 144x 32y 144z?
    Because thats a fairly small world i think.

    Sorry, im a nooby :p
     
  19. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    The meshes are generated at runtime, but also (as of v2.0) within the scene view as well.

    It's worth noting that a voxel terrain will rebuild it's mesh at runtime (when you hit the play button), and then again when you're finished testing. Depending on the type of voxel terrain you use, it could rebuild from a fractal terrain generator or just load from a proprietary file. There are examples of both included in the package.

    In theory, there isn't any reason why you couldn't export the chunks' meshes to an .OBJ file, or anything else for that matter. The ObjExporter link is broken, and I'd have to revisit it to determine if you could use it now. So I'd have to say maybe as you now have access to meshes within the scene view. As far as texturing is concerned, I think you'd need to stick with something along the lines of triplanar shaders or some other (x,y,z) position/normal based shader as opposed to (u,v) texturing. It would just be too difficult otherwise.
     
  20. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    Hmm... I'm not aware of any major difference, but perhaps I'm not completely understanding the problem... could you e-mail me with additional details?
     
  21. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    Thanks so much for your support! I'll continue to look into getting infinite terrain workable within the system... might take a little while though.
     
  22. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    Thanks! As you noticed, the main limitation is memory... so if Unity goes 64-bit within the editor, then perhaps that will solve a few problems. If infinite terrain gets implemented, then the issue will be solved in a better way.

    Currently, the best way to create a much larger world is to just increase the voxel terrain's scale, and depending on your requirements, it may work.
     
  23. Samsson

    Samsson

    Joined:
    Oct 12, 2010
    Posts:
    165
    Ok, so when the unify communiyt will be restored could you please test it ?

    Personnaly, this is why voxel interest me.
     
  24. Samsson

    Samsson

    Joined:
    Oct 12, 2010
    Posts:
    165
  25. Broken-Toy

    Broken-Toy

    Joined:
    Jan 16, 2010
    Posts:
    455
    Sent detailed PM. :)
     
  26. b3y0nd3r

    b3y0nd3r

    Joined:
    Oct 5, 2010
    Posts:
    27
    First I have to congratulate you on the amazing work you've done with this Asset. It really looks a good piece work to consider.

    But before making the purchase, I shall make you some questions, if you don't mind.

    Voxel terrains, along with Marching Cubes approach, are relatively new to me, I've just been reading about these topics in the last few weeks. But I think they would fit into my project extremely well.

    I would like to know if I may be able to achieve similar results like those in the following video, in the sense of getting a less "smooth" terrain, with much simpler slopes. I guess that this is just a matter of tweaking some settings of the algorithm, right?




    Also, I may want to get your asset so as to see directly an implementation of this kind of procedural terrain, because I've only found theoretical dissertations rather than applications. So I guess your code is well commented, as it would provide a real entry point to worlds procedural generation.

    Anyway, I'm looking forward to getting into it ;)
     
  27. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    Good news - it works! Guess that means Voxelform can now be used as a complex terrain mesh generator now too.

    To make this work for you:

    • Follow the ObjExporter instructions to bring the script into your project.
    • Create/Load a voxel terrain into your scene.
    • Make sure you've set the Observer Viewing Distance sufficiently far out so that no terrain chunks are clipped.
    • Select the Voxel Terrain object (not the individual chunks) in the Hiearchy.
    • Use ObjExporter to export the whole selection to a single .OBJ file.
    • Import the .OBJ into Blender (or your favorite modeling software) and join all submeshes.
    • If you don't join the submeshes, you'll wind up with an equal number of materials when you import the .OBJ into Unity. That's a pain.
    • Export the resulting mesh as an .OBJ or in whatever format you'd like.
    • Add the new .OBJ to your Unity project.
    • Drag it into your scene.
    • You'll still need a position/normal based shader of some sort... most likely triplanar or volumetric.
    • No prob... just replace the default shader with your shader of choice.
    Viola! You should now have a voxel terrain mesh that doesn't require any Voxelform scripts.

    Of course it's not deformable either, but that's not the point here.

    Also - don't expect unlimited multi-material to work here... perhaps there's a way... but not that I'm aware of at the moment. You can still use a Voxelform triplanar shader to provide several different textures for the terrain... ceiling, floor, and wall.

    Lastly - Unity will export just about any voxel terrain you can generate. Blender on the other hand, may choke on an .OBJ that is too large.



     
  28. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    Yup - and it's very straight forward. Say you have a noise generator that generates noise for some (x,y,z) coordinate. Once the noise is generated, the following filter will force it to produce sharp edges:

    Code (csharp):
    1. ... generate noise here ...
    2.  
    3. // note: .5 is the default isolevel.
    4. noise = (noise >= .5f) ? 1f : 0f;
    5. var v = new VFVoxel(noise);
    BTW - There are a number of noise generating functions that ship with Voxelform.

    Yeah - I was pretty surprised to see the lack of any tutorials on the subject when I started this project... and most of the dissertations, etc. only provided small nuggets of information... certainly nothing real-world. Almost nobody in academia with the exception of guy behind the C4 engine was working on deformable voxel terrain. So some of what's in Voxelform is gleaned from what I could find and the rest is the result of many hours of R&D.

    The code is well commented and should contain the information you need. There are external docs too in the form of a PDF, but the real information is in the comments. If there is anything lacking, just let me know. Thanks!
     
  29. Samsson

    Samsson

    Joined:
    Oct 12, 2010
    Posts:
    165
    Yeah !

    You can't imagine what it means, this is the first visual editor for voxel witch allow to make complex terrain in this workflow.

    This means also that we can modify it, texture it in another 3D/2D soft, optimise it and make huge reallistic terrains !

    And it would work fine with Beast, Umbra, navmesh !
     
    Last edited: Jan 25, 2012
  30. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    Thank you so much xoart for suggesting this. I really appreciate it and I'm sure others will as well. Perhaps someday when I have far more time on my hands than I do now, I may have to look into creating a binary export option and just build it in.

    For clarity, so as not to confuse anyone... Voxelform already includes saving/loading routines for terrain persistence. What we're talking about here is the ability to export the terrain as an .OBJ file, import it into Blender (or your app of choice), modify it, and then bring it back into Unity as a regular model without specific voxel terrain capabilities.
     
  31. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    951
    Check your PM's.
     
  32. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    I want to say thank you to everyone who's taken the time to rate Voxelform. Since the release of Voxelform 2.0 a few weeks ago, it's been rated up to 5 stars. I'm so grateful for your support, and I'd like you to know that I'll do my best to keep the updates coming.
     
  33. b3y0nd3r

    b3y0nd3r

    Joined:
    Oct 5, 2010
    Posts:
    27
    As I already said, keep up the good work Mark ;)
     
  34. houndie

    houndie

    Joined:
    Nov 25, 2010
    Posts:
    146
    Hey Mark,

    As I've said before fantastic product and I am very happy I purchased it. That being said I have not had much time up until now to really play with it and so I have been going through the code and am able to kick off some basic stuff but now I want to start digging into the more detailed voxel terrain creations.

    You're documentation in the code is decent for determining what each item does and I thank you for that, but what I get confused on is how to merge scripts and functions together to get more than just a flat piece of terrain, size excluded. I want to start creating terrain with mountains, rivers etc and I figured ok well lets start implementing noise features, or adding multiple terrain voxels but I've not been able to yet accomplish this feat.

    When I implement a second voxel terrain the system starts to lag up really bad graphic lag. Is this expected or should I be able to have multiple voxel terrains in one scene?

    As to the merging of the noise scripts I tried simply attaching a noise script to the terrain object but it complained about the file name not matching the class name even though I validated that it did. And I am not sure on how to take the pieces out of the noise scripts and implement them into the terrain creation scripts.

    Added to that so far no matter what palette I choose it only uses one of the textures for the entire land.

    So is your plan to come out with more detailed documentation on actually using your product or can you guide me on where I should go to read up and learn how to use your system better?

    Thanks!
     
  35. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    Hi Houndie - Thanks so much for your detailed feedback on this. I assume you've read through the Readme.pdf manual, but since this is a public forum, I'll try to word my answers for everyone including folks that may have just skimmed it. The best way to approach Voxelform would be to quickly read the manual once over, play around with the demos for fun, and then return to the "A Deeper Look:" section of the manual that starts a code tutorial.

    In the tutorial you'll encounter a slightly different way of going about things for Voxelform 2.x. The code base has been significantly refactored with more abstraction for greater flexibility. Also, it assumes familiarity with OOP concepts such as subclasses and interfaces.

    Snippet from that section of the manual:
    Contents of VFVoxelTerrainExampleGenerateVoxels.cs:
    Code (csharp):
    1.  
    2. /* Author: Mark Davis
    3.  *
    4.  * This is an example script to attach to a voxel terrain object in your scene.
    5.  * This class subclasses VFVoxelTerrain via VFVoxelTerrainBaseExample.
    6.  *
    7.  */
    8.  
    9. using UnityEngine;
    10. using Voxelform2.Noise;
    11. using Voxelform2.VoxelData;
    12.  
    13. /// <summary>
    14. /// This is an example script to attach to a voxel terrain object in your scene.
    15. /// It generates voxels via a VFVoxelNoise function.
    16. /// This class subclasses VFVoxelTerrain via VFVoxelTerrainBaseExample.
    17. /// </summary>
    18. public class VFVoxelTerrainExampleGenerateVoxels : VFVoxelTerrainBaseExample
    19. {
    20.     // Use this for initialization.
    21.     public override void Start ()
    22.     {
    23.         // Call this first!
    24.         base.Start();
    25.  
    26.         // This algorithm can be modified or replaced to suite your needs.
    27.         GenerateVoxels(VFVoxelNoise.EmptySpace, 4, 0);
    28.  
    29.         // Note: All voxels need to be generated before any chunks are generated.
    30.         // The reason for this is that the chunks require information from their neighbors.
    31.  
    32.         // Start the world.
    33.         InitChunks();
    34.  
    35.     }
    36.  
    37.     // Not required, but here to demonstrate that you can override this if required.
    38.     protected override void Update ()
    39.     {
    40.         // Call this first!
    41.         base.Update();
    42.     }
    43.  
    44.     // Not required, but here to demonstrate that you can override this if required.
    45.     // Override this method to return a custom voxel data source... only if you feel like it.
    46.     protected override IVFVoxelDataSource CreateDataSource(int width, int height, int depth, float isolevel)
    47.     {
    48.         // base.CreateDataSource(...) would do the same thing.
    49.         return new VFSimpleVoxelDataSource(width, height, depth, isolevel);
    50.     }
    51. }
    52.  
    Feel free to either create a copy of this example or if you don't care, just play around with it and save over the old code.

    Notice the line where GenerateVoxels is called. The first parameter is of type: System.Func<Vector3, VFVoxel>

    If you want to play around with different noise a bit, try plugging in another noise function such as: VFVoxelNoise.SimplexFractalTerraced2
    You could also create your own. Take a look at VFVoxelNoise.cs to get an idea of what a noise function might look like. Or take a look at this example:

    Code (csharp):
    1.  
    2. public static VFVoxel EmptySpace (Vector3 p)
    3. {
    4.     float noise = 0f;
    5.     ushort materialIndex = 0;
    6.     return new VFVoxel (noise, materialIndex);
    7. }
    8.  
    Your IDE will explain GenerateVoxels' last 2 parameters, but for clarity, they are: groundPlaneHeight and groundType (aka materialIndex)

    By altering this one line of code, you can generate just about any type of terrain that you can dream up. Just make sure that if you create your own script, as is expected, that you create your terrain using that script and not the default one.

    Despite the long winded explanation here, in actual practice, you should be able to change your voxel terrain generator in just a few seconds or create a completely new one in a couple minutes.

    This shouldn't happen unless the voxel terrain sizes are quite large. Try playing around a bit with the size of voxel terrain. Refer to the Chunks section on page 3 of the manual to understand how that works.

    Hopefully this was answered above in the explanation of the tutorial. VFVoxelNoise's static methods can be used to generate noise in your own subclassing of either VFVoxelTerrainBaseExample or VFVoxelTerrain... and if you look at VFVoxelTerrainExampleLoadFromFile, you'll see that you don't need to call the noise generator at all... its just a matter of populating the voxel data in some way before viewing the terrain. Alternatively, if you implemented a custom voxel data source, you could even generate voxels from within the data source, provided there was a good reason for doing it.

    If I understand this correctly, this is done by default. If you want a noise generator to create terrain with multiple materials, take a look at the EmptySpace function demonstrated above. In your own function, just set materialIndex to whatever material you'd like for a particular (x,y,z) position. Be careful to not go out of the bounds of your material palette though or you'll wind up with unexpected results.

    The documentation stands as is for now, but as questions such as these arise, I'll try to improve the docs. I'm also planning on putting full code docs online sometime soon. Neither Visual Studio nor MonoDevelop include a way to generate HTML code docs without significant hassle, but it looks like Doxygen will do the trick. So expect this soon, and expect improvements in the next release (no timetable yet.)

    Also - about the other scripts... in particular, the ones in the Input folder. These are optional and really just examples of what you might want to do. They're a great way to get things going until you decide you want to do things differently. Just be sure to read the code docs for each script. It's somewhat important.

    Thanks again, and hope that helped... if not, I'll try to clarify further.
     
  36. houndie

    houndie

    Joined:
    Nov 25, 2010
    Posts:
    146
    Mark the info above is exactly what I was looking for. I had read the readme and looked through the deeper stuff but wasnt exactly getting it. Your information above has helped tremendously in bringing it all together for me so thank you once again!!!
     
  37. unity_sg

    unity_sg

    Joined:
    Sep 14, 2010
    Posts:
    95
    Hi Mark, have you planed to develop new demo scene for the 2.0 version ?
    What should be the new features in the 2.1 (if a 2.1 is planned yet :))
     
  38. runonthespot

    runonthespot

    Joined:
    Sep 29, 2010
    Posts:
    305
    Very interesting regarding exporting to OBJ.

    Can I recommend that people playing with this get their hands on MeshLab when working on the resulting OBJ file:

    In meshlab, you can easily stitch together multiple disparate bits using the Poisson surface reconstruction algorithm, and then take the result and run it through operations like Quadratic Edge Collapse Decimation to significantly reduce the vert / polycount. (There are a tonne of other mesh optimization options there that are worth experimenting with.)

    I'd say meshlab, rather than blender is the missing tool to create reasonably optimized voxel-originated terrains in this way :)
     
  39. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    I do have a few things planned in the way of demo scenes. In particular, I'd like to demonstrate how and why one would customize the voxel data source. Also, despite the fact that physics just works, I'd like to provide a physics demo too.

    A feature that I'm working on right now is supporting cubical voxels. This is working great when the whole world looks like Minecraft, but there are some z-fighting issues in hybrid mode, where you can mix organic terrain with cubical terrain. So, once those have either been resolved or minimized, I'll kick out the next update.

    After that, the next area of investigation is paging the terrain in an efficient manner. I've been down this route once, but didn't investigate all possibilities. The only way I'll release with this feature though is if the performance is reasonable.

    Something else that I may add in a future release is spring physics based water simulation. This wouldn't work like the water in Minecraft, but would be useful for pools of water. For those not familiar, it's a quick and easy way to get realistic, unlimited waves that bounce correctly off walls and each other for no additional cost per wave. It's essentially cellular automation with springs if you want to look at it that way. This wouldn't be worked into the chunks though... that'd be too expensive. Each pool would stand alone and could be placed at any point in the world. Both chunks and pools could share the same voxel data source. This would allow pools to know where the walls were located and adapt in real-time to voxel changes. Possible uses would include wakes behind your character or NPCs, or for vehicles... or perhaps waves would be cause by the debris from an explosion... whatever you'd like really.
     
  40. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    Cool - will have to give it a try!
     
  41. winterkewl

    winterkewl

    Joined:
    Oct 28, 2011
    Posts:
    53
    Hi Mark,
    When you are in Edit mode in the voxel editor, how do you actually sculpt anything?

    I'm using it in Unity 3.5 RC1 and while i can change the brush properties , and fly around the terrain in navigation mode, I can't seem to sculpt anything. . .

    I looked in the VFVoxelEditorInput.cs hoping to glean some info on what keys do what but so far can't seem to get it working.
     
  42. unity_sg

    unity_sg

    Joined:
    Sep 14, 2010
    Posts:
    95

    Very very nice features Mark !
    I am very interested about all things you've talking about and even more about "physics based water simulation" !
    I stay tuned ;)
     
  43. runonthespot

    runonthespot

    Joined:
    Sep 29, 2010
    Posts:
    305
    Oh, Mark, one thing I've been meaning to suggest: A lot of Unity devs are on Mac, and for those with magic mouse or using a macbook track pad, RMB isn't a great choice for a user interface control- in most demos I'm not able to sculpt the terrain. Same applies for changing material with the scroll-wheel.

    Thanks!
    Mike
     
  44. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    Thanks winterkewl - Very good point. I missed the control docs on the beta editor extension and will get those into the next point release ASAP. For the clarification of anyone reading this... the editor extension isn't advertised on the Asset Store because it's still in beta, and it's separate from the rest of the scripting code in this package. It's sort of an extra at the moment, but unfortunately, it's an extra that's not properly documented.

    Here are some of the missing docs... the bits that may be too hard to figure out just by playing around:

    The editor is completely mouse controlled due to Unity's editor extension restrictions. Keyboard support just isn't an option.

    Mouse Controls:

    LMB Drag - Move X, Z Axes
    MMB Drag - Move Y Axis
    RMB Drag - Mouse look
    Wheel - Toggle Edit/Navigation Mode (Mode status is displayed top left.)
    Double Click Drag - Build/Erase (Hold the button down on the 2nd click.)

    Note that in Navigation mode, the mouse controls the camera, but in Edit mode, the mouse controls the cursor.

    To make it a little easier to see what editing really looks like, I just posted a video on Youtube:



    Hope that helps!
     
    Last edited: Feb 6, 2012
  45. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    For anyone who would like to watch some Voxelform video demonstrations, I've started putting a few together. They're available both at voxelform.com under the Videos section and on YouTube. Expect more to follow, including some "getting started" videos.

    The latest:



     
  46. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    Good point on the RMB and the Wheel. For the Game/Landscape demos, there's currently no alternative. For the Editor demo, there are undocumented alternatives: Dig - SPACE, Build - CTRL-SPACE, Decrease Power - LEFT BRACE, Increase Power - RIGHT BRACE.

    As for the scroll wheel, it's purpose in the demos is to change the size of the affected area (aka power.) E R to navigate the materials. I'll add and document some alternatives for a future release.

    Thanks!
     
  47. winterkewl

    winterkewl

    Joined:
    Oct 28, 2011
    Posts:
    53
    Great thanks for the tips Mark, that makes a lot more sense now. :)
    Out of curiosity, are you planing on implementing some more sculpting tools in later releases?

    Having similar tools as the Unity Terrain would be a great start.

    It's a little hard right now to build anything that requires too much precision,
    I say hard but not impossible, so for now I'm super impressed with this tech,
    just curious what the plans for the future are as you see it.

    Thanks for an awesome product and quick answers/videos to my question. :)

    Oh and one last thing, can the brush shape be changed when you move from sphere to cube?
    that would make it easier right away to sculpt with.

    thanks. :)
     
  48. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    Thanks! My current plan for further editor development is to wait and see what's happening with Unity's new GUI. From what I understand, it should extend to editor extensions. I agree that the brush ought to reflect the shape as well. I'll make that change along with plenty of others when I pick work back up on the editor. So yes, there will be more development on the editor and more sculpting tools, but for the time being, I'm focusing on improving the core tech that is used in-game.
     
  49. winterkewl

    winterkewl

    Joined:
    Oct 28, 2011
    Posts:
    53
    Sounds good, thanks man. :)
     
  50. theprojectabot

    theprojectabot

    Joined:
    Nov 11, 2011
    Posts:
    38
    do you have a timeframe for iOS compatibility?