Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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

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

  1. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    992
    Should really try to improve performance, LODing would be number 1 priority to get in if it's not already.
     
  2. DisTrash

    DisTrash

    Joined:
    Feb 2, 2009
    Posts:
    166
    I suggest to have shape brush toon, and can customize them or create them like in unity. Between a cave and a corridor it's tottally different.

    What do you think about that ?

    And it needed to might use vegetation, rocks and objects, etc...

    With compatibility with other tools (rivers, roads and paths ) etc...


    Thanks a lot .. !!!

    Best Regards. ;) ;) ;)
     
  3. PrimeDerektive

    PrimeDerektive

    Joined:
    Dec 13, 2009
    Posts:
    3,090
    I don't think it has enough resolution for such definitive shapes in the carvings.
     
  4. DisTrash

    DisTrash

    Joined:
    Feb 2, 2009
    Posts:
    166
    And it is possible use higher resolution and use splitted maps to reduce the loading and avoid lag and latency ?

    By shapes, i would suggest, basic shape, circle, square etc... Not like architectural needs.

    Best Regards.
    ;) ;) ;) ;) ;) ;)
     
  5. Muzzn

    Muzzn

    Joined:
    Jan 23, 2011
    Posts:
    406
    It's marching cubes, so it can't actually make shapes in the carvings (unless they're hundreds of metres wide). Although Mark may have a solution to this!
     
  6. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    Hi all - Just wanna toss a status update out there. One particular feature is holding things up a bit, and I don't want to say any more (so as not to over promise) until it's working correctly in all cases. But as soon as I can get a handle on this, the next build will finally go out.

    @spinaljack - LOD is a ways out on the todo list, as are some other related items that will likely make it into the same build when that happens. LOD will of course incur it's own performance cost, and the trick will be to find the right balance.

    @DisTrashMuzz5 - Right. There's nothing stopping you from cranking up the resolution, but it does incur a performance cost. There's enough resolution for roads, rivers and paths. The online demo is lower in resolution than it needs to be, but I wanted to provide something that would work for nearly everyone. If you need additional structures, of higher resolution, in the landscape, you can create additional VoxelTerrain objects, adjust the settings, and place them where you need them. You're just dealing with standard Unity GameObjects with meshes, so things just work as expected. That said, Voxelform is primarily intended for terrain.

    At this point in time, I think it wouldn't make much sense to build something like Mudbox, ZBrush or Blender into Unity when those products work very well, and provide easy export. The type of tool that would provide that functionality, wouldn't be as well suited to terrain for performance reasons. For that type of need, I'd recommend organic modeling in one of those tools, exporting to Unity, and then using some of the 3rd party polygonal mesh deformation tools where you need them, for individual items. I think you'd get much better performance for that particular situation, by not using voxel tools. Some day, it'll make sense, but not now.
     
  7. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    One additional clarification. Nobody's mentioned it, but I see this as being a common situation that folks may encounter. This is a scripting package, and to create a decent game, some programming is required. Every chunk is it's own GameObject with a mesh. When these objects go out of range, they are disabled, and then re-enabled when they come back into range. The range is adjustable. It's highly likely that in your game, you will have other game objects interacting with those meshes, in the same way that the player does in the demo. The player has a mesh, but you can't see it. Every game is different, and it's up to you how you want to manage your GameObjects. Chances are, you'll want to disable the objects that are interacting with a chunk that has just become disabled. If you don't, and if they're physics based with gravity, they'll fall out of sight. I would recommend simply sending a message to those objects when these event occur. This might be obvious, but just in case, I want it to be clear. Thanks!
     
  8. tomnullpointer

    tomnullpointer

    Joined:
    Sep 20, 2010
    Posts:
    142
    Hi all,

    This project seems cool, and Im glad to see more people using voxel stuff.
    A few months ago i posted a demo of my own work.
    http://forum.unity3d.com/threads/84652-Procedural-terrain-generation-(WebPlayer)

    Since then Ive managed to get teh chunk generation to be multithreaded, Ive written some advanced triplanar shaders, with noise and a mask layer map (allowing you to 'draw' road textures etc). So all of those things are certainly possible with marks project too. You just need to do some coding :)

    LOD is a nightmare :) Ive tried several approaches and none of them were really great.
    A: have 2 resolutions of chunk and at the appropriate range use a shader to alpha crossfade them, works ok but you get a ghostly image where they cross over
    B: try and get range border change chunks to have seamed skirts (like in normal 2d heightmap stuff), this is a pain, 3d makes the calculations so much more annoying (i think the c4 engine uses this approach)
    I ended up with no LOD, i think you can make things seem less chunky with terrain features like grass trees etc

    Also for people asking, the world is basically a 3d cube of density values, so if you can fill those points with values you can make any 3d form you like (within the resolution). Cubes tend to have smoothed edges due to the algorithm, but you can still get some nice linear features if you try.

    The main problem i have with my system is the speed of generation (both the noise algos and the mesh generation just take time. I wish Id found more ways of improving the speed.

    Anyway great job Mark, if i hadnt been doing similar myself already Id have grabbed this quick (would have saved me loads of time!)
     
    Last edited: Jul 2, 2011
  9. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    @tomnullpointer - Great job Tom, and looks good! :) Nice to see other folks working on this. Seems like the voxel revolution is fully underway.

    @all - Finally solved a major problem that I'd hinted at awhile back. There was an edge case with the normal generation that cause perfectly fine triplanar texturing to look a little off in spots... additionally, the same problem manifested as annoying dark areas under certain lighting angles. I think I've found the best solution possible without sacrificing efficiency.

    I had intended to release the build a week ago, but wanted that fixed first. Now that it is, I couldn't resist throwing in real multi-material support. That's working too, but needs a little adjusting. As soon as I'm happy with that, I'll do the release. The way multi-materials are currently implemented, you can use 2 bytes per voxel instead of one. One byte for volume, and another for material type. Of course, you have the code, and it's intended for customization, so in reality, you can structure the voxels, and adjust the shaders in any way you like.

    After this build is released, I'm going to refocus on editor support. Editor support will be a huge plus that makes Voxelform accessible to all. However, I want experienced programmers to know that they will receive a package that is meant to be tweaked, and extended, and that the core will remain separate from the editor component in a modular fashion.
     
  10. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    Packaging everything up for release tonight... hope to have it out ASAP. In the mean time, here are a few new screen shots.

    Try opening these images in a new tab to see them at full resolution.







     
    Last edited: Jul 12, 2011
  11. aninjamonk

    aninjamonk

    Joined:
    Aug 31, 2010
    Posts:
    153
    man!! this is awesome.....blown away!!
     
  12. PrimeDerektive

    PrimeDerektive

    Joined:
    Dec 13, 2009
    Posts:
    3,090
    What happened? Did you significantly icnrease the voxel density or something? those last screens look awesome.
     
  13. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    Wow, thanks guys! :) The density is the same as in the original screen shots, at 2x scale, so what you're probably noticing are the results of a new fractal landscape generator being presented with a new shader/material. More on this below.

    And I have some good news. I just submitted Voxelform 1.1 to the Asset Store this morning, after a very long night... almost 5am here in Seattle. :)

    So here's a partial list of changes (from the Readme.pdf), which I'll propagate out to the head of this thread later today.

    What's New in version v1.1:
    There are a few minor bug fixes, improvements, and additional documentation. Take a look at the code for additional details regarding the following items.

    Shading and normals are improved.

    The Voxel structure now contains “Type” information that can be used for multi-material support.

    The “Voxel Ray” now supports size adjustments via the scroll wheel, and is more consistent.

    The following methods for saving and loading terrains have been added:

    SaveRawVoxels
    LoadVoxels

    Support was added for Simplex Noise as a more efficient alternative to Perlin noise, and it looks great.
    VoxelNoise.cs now contains:

    ModifiedPerlin1
    SimplexFractalBasic
    SimplexFractalTerraced
    SimplexFractalTerraced2

    The biggest new feature in v1.1 is Triplanar texturing. There are three new Triplanar shaders, and corresponding materials:

    TerrainTriplanar.shader
    TerrainTriplanarMultimaterial.shader
    TerrainTriplanarSolidPerlin.shader

    Triplanar texturing allows you to texture objects by their vertex normals, and position, instead of by the usual u,v mapping. Different textures can be applied to different sides of an object.

    TerrainTriplanar is just a basic triplanar shader with three textures.

    [Experimental] TerrainTriplanarMultimaterial uses a texture atlas to map texture “tiles” to individual voxels. I almost left this out, due to some unresolved issues. Mipmapping is problematic in the same way that it usually is with texture atlases, so an alternative technique is being used, and it's better, but not perfect. Aliasing issues are the result. You may find that it works for you, but I consider this to be an experimental feature that needs work.

    TerrainTriplanarSolidPerlin is by far the most striking. It blends a procedural fractal solid texture with triplanar texturing. The triplanar texturing is identical to TerrainTriplanar. The fractal color output is multiplied with the triplanar color output to produce the resulting imagery. A palette texture is used to provide a color palette (aka ramp) for the fractal values. The palettes run left to right. However, a vertical shift (and palette switch) occurs for different terrain elevations. None of the included textures even come close to pushing the palette to it's full potential. This is a very new development, and I'll continue working on it, but feel free to tweak it as much as you like. Chances are very good that you'll produce something much better than the existing screen shots.

    Also, the iMac mipmapping issue is completely resolved with a shader fix. No hack required. I'll update the demos later today.

    The next milestone is full editor support in v1.2.
     
    Last edited: Jul 13, 2011
  14. Jenge

    Jenge

    Joined:
    Jun 28, 2011
    Posts:
    13
    Hi Mark,

    The update looks good, the triplanar shader makes it look considerably less procedural.

    We've been mostly looking forward to the multi-material support, even experimental. It would great to have some docs (or demo scene) on how to set it up. I applied the multi-material to the existing demo seen and modified some Voxel types... and see some atlas stuff going on... but clearly not right :) This feature is very important for mining/resource styled games.

    Also, as noted there are some performance issues with the product. This might have something to do with the lack of LOD support. This is even noticeable on the top-o-the-line Mac Pro (not MacBook) running a 5870 HD video board. Getting 40fps-45fps in the editor with only the demo scene running (and no other game objects/simulation taking place). It can also dip down into the low 30's, even with not moving or any other obvious updates happening. On a 2007 iMac, *very* laggy and the controls/physics suffer accordingly.

    Again, good work. Thanks for the 1.1 update!

    Edit: Kicked out a build and performance is identical to in the editor.

    Edit2: I *think* multi-material is somewhat working! Some of the lower Type settings look a bit like noise, which was confusing. There are some seams but promising!
     
    Last edited: Jul 13, 2011
  15. gordonramp

    gordonramp

    Joined:
    Sep 28, 2010
    Posts:
    53
    This is shaping up nice. Full Editor support is something to look forward to. My only concern is the framerate. My graphics card is no slug (Geforce 9800GT with a gig of ram) and there is lag for quite some time while loading and then mostly between 20-40 when excavating, sometimes below that. Bridges are easier to build now and cave walls more convincing. Keep at it Mark.
     
  16. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    @Jenge/gordonramp - The current featured demo is definitely slower than the previous demo. I use an iMac from around that era as a test machine, and have seen the same results. I ran a series of tests to determine what was causing the performance drop, and think it's the new shader, which also happens to be the one I like the best. :p The reason this shader hits the GPU harder, is due to the noise algorithm. To get the right look, it requires 3 octaves of Perlin noise.

    It might be helpful to compare some other demos that I just added today. I don't have a main page ready, but here are the links to all the demos:

    Grass Demo - (personal favorite) Newer than v1.1 - Features adjustable fractal pattern weighting via the normals
    v1.1 Triplanar + Fractal Demo
    Solid Stone Demo - Should work on an old iMac
    Basic Triplanar Demo - Also should work on an old iMac

    The last two should at least be playable on any computer that can reasonably play WoW. I'll see what I can do about the others. Perhaps switching to a different noise algorithm would help. Also, I'm currently developing on a 6870.

    As far as multi-material is concerned - Glad you got it working part way Jenge. I want it to fully work, in the worst way, so I'll continue to investigate until we have a good solution. If that happens far in advance of the editor release, then I'll do a minor support release to keep everyone in the loop.

    Thanks again for the feedback! It really helps. :)
     
  17. jasonkaler

    jasonkaler

    Joined:
    Feb 14, 2011
    Posts:
    242
    Looking good.

    FYI, I have a Radeon HD 2400 Pro
    The Basic Triplanar demo works very nicely but the v1.1 Triplanar + Fractal demo is very slow.
     
  18. Ryuuguu

    Ryuuguu

    Joined:
    Apr 14, 2007
    Posts:
    391
    Will the code compile foriOs? iPad/iPhone, I am ot worried about performance yet, I can and work on that.
     
  19. BlueRain01

    BlueRain01

    Joined:
    Aug 22, 2010
    Posts:
    86
    Sweet and fun!
     
  20. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    @JasonKaler - Thanks for the report. Good to know! My testing is limited to 3 machines: a core i5-2500K PC w/ 6870, a 2-3 year old iMac that just plays WoW on the lowest of settings, and a 1st gen iPad. Any set of features targeted at the low-end is targeted at that iMac, and I have to guess a bit as to what lies in the middle. Above all, Voxelform is intended to be scalable. Must say, it's hard to resist including a few high-end features. :)

    @ryuuguu - iOS isn't supported yet. In theory, it should work with different shaders, but something is causing other issues at the moment. I really can't say more until I get the time to fully work through the issues. I definitely intend to see that through, but at the moment, the editor functionality is taking priority above everything else. I feel that in order to make this the biggest possible success within the community, nothing is more important than removing the programming barrier. And of course, I know devs like their lives made easier too.

    @okba28mca - Thanks! :)

    The latest news is that I finally found time to crank out a website yesterday. For the moment, it's limited to a "marketing speak" page, the above set of 4 demos, and contact info. I'll continue to update it as things progress. For anyone interested, I'm a first time weebly user, and found the process to be surprisingly nice. I usually build things from scratch, but have tried a few similar "easy" products in the past which didn't live up to expectations. But this was actually fun.

    voxelform.com
     
    Last edited: Jul 16, 2011
  21. Rafes

    Rafes

    Joined:
    Jun 2, 2011
    Posts:
    764
    Hi,

    Can you post a video demonstration please? I'm on Linux at work ;(

    Cheers,
     
  22. AaronG

    AaronG

    Joined:
    Jun 30, 2011
    Posts:
    39
    Played with the demo and I am absolutely floored. I can't wait to see the games that come out of this tech.
     
  23. gordonramp

    gordonramp

    Joined:
    Sep 28, 2010
    Posts:
    53
    Struck a bit of a dilemma. My project relies strongly on coordinates. Unfortunately when I move the Voxel Terrain to a location other than 0,0,0 the excavating and bridge building no longer works. I've been through the documentation and the code, can't see a way to adjust things to another coordinate anywhere. It looks to be hard coded to 0,0,0,.
     
  24. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    Hi Gordon - funny you should mention that. It's a bug, and I just fixed it last night. The fix will go out with v1.1.1. I'll submit it to the asset store tomorrow for availability on Monday.

    If you'd prefer not to wait, just replace the existing AlterVoxel call with this code snippet in the Update function for VoxelTerrain.cs. The omission was: - gameObject.transform.localPosition / _scale

    AlterVoxel((hitInfo.point / _scale) + new Vector3(px, py, pz) - gameObject.transform.localPosition / _scale,
    (Time.smoothDeltaTime + Time.smoothDeltaTime * _isolevel) * (md0 ? -.5f : 2.5f) / _isolevel);

    Thanks!
     
  25. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    @Rafes - I'll post video tutorials when the editor version is released, but for $100, I'd like folks to have a real idea of what they're buying, and how it's going to work on their machines.

    @AaronG - Thanks so much! :)
     
  26. Demostenes

    Demostenes

    Joined:
    Sep 10, 2010
    Posts:
    1,106
    I have i7 2600k with geforce 470 and "grass" demo wasnt that fluent. Can you put there some FPS counter? Btw, I havent seen any grass there, or the grass is only that green texture?
     
  27. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    @Demostenes - Sure thing. The main purpose of that demo is to demonstrate some of what can be done on higher-end systems. I get about 50-60fps with a single 6870 with a large terrain. The fragment shader used for that demo is the bottleneck. I'd like to lower the bar though, and will look into ways to do that. Games targeting a wider range of hardware would benefit from the basic triplanar shader. More built-in shaders and options are on the way.

    The reason to mention the grass in that demo, despite the lack of flowing grass, is that the shader was upgraded (for v1.1.1) to allow weighted blending of the procedural solid fractal texturing with the triplanar texturing. Without weighting, a grass (or sand) texture doesn't look right, but with it, you get a flat grass texture that has unique detail everywhere, providing extra organic realism to help eliminate a tiled look.
     
  28. gordonramp

    gordonramp

    Joined:
    Sep 28, 2010
    Posts:
    53
    Glad to hear the coordinates thing is a bug and not a feature :)
    Every now and then I find the red cross become extremely small, almost a dot. (possible other bug)
    Looking forward to the next release.
    Updated the script with the fix you posted and I can now move the Voxel Terrain and still have excavating etc.
    Great.
     
    Last edited: Jul 17, 2011
  29. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    @gordon - Awesome! Glad to hear that worked for you. The red cross spotlight does get a bit small. Feel free to change it if you want. It's really just an example, and not intended for use in a real game. At some point I'll have to put together some better artwork, and redo it. Just hasn't been on the priority list so far.

    And to all: Voxelform 1.1.1 was just submitted to the Asset Store and is awaiting approval.

    From the docs:

    What's New in version 1.1.1:
    Fixed a bug where terrain locations other than 0,0,0 interfered with the manipulation example code.
    Fixed a bug in FpsDisplay.
    Altered the Voxel data structure, in a way that should should be backwards compatible.
    Altered Voxel noise added in v1.1 to generate normalized values.
    Boosted the performance of the TerrainTriplanarSolidPerlin shader.
    Added new example scenes. There's nothing special there that can't be thrown together in a few seconds, but it may be helpful if you haven't read the documentation yet.
     
  30. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    v1.1.1 is now available on the Asset Store!

    If anyone would like to give this a try... I just released a more efficient version of the TerrainTriplanarSolidPerlin shader, and have a new demo of that shader here: http://cyclopsframework.org/voxelform/test

    I'd love to hear what kind of frame rates you get. It's not a miracle cure for an old iMac, but it should be better. Also worth noting - whatever frame rates you see in the web demo, in many cases, you can get frame rates several times higher (in the hundreds) in a stand-alone build. The web frame rate seems to be limited to around 60-62 regardless of how fast it can actually run.

    Note, as usual, you'll need to let the world finish building, and then give the system a little time to recover before you'll be able to get an accurate fps measurement.

    Thanks!
     
  31. gordonramp

    gordonramp

    Joined:
    Sep 28, 2010
    Posts:
    53
    Am I the only one getting this.. V1.1.1 is showing at the asset store but when I download it v1.1 arrives?

    Edit: solved the problem with a hard-drive image reinstall.
     
    Last edited: Jul 20, 2011
  32. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    @gordonramp - good deal. glad it's resolved now. :)
     
  33. Micha-Stettler

    Micha-Stettler

    Joined:
    Jun 11, 2009
    Posts:
    167
    Is there a way to generate endless random terrain in all directions?
    Should be doable when using a 3d noise function to generate the voxels and generate them on the fly according to the players position, or does this not work with the marching cube algorithm?
     
  34. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    It's not setup for that at the moment, but if you're familiar with how that works, and feel comfortable making some extensive modifications, you could make it work. Despite the popularity of Minecraft, infinite terrain is not that high on my priority list. However, some upcoming changes could actually make it trivial to implement. I'm planning on putting a system in place to allow for much larger terrains. Viewable terrain will stream in from a source, be it disk, network, or a custom class that handles infinite terrain. When it's ready, you'll only have to implement an interface, and it should provide all the flexibility you need for just about any situation.
     
  35. TiG

    TiG

    Joined:
    Feb 28, 2011
    Posts:
    311
    This is a wonderful work Mark, congratulations. Some great games can be made with it.
     
  36. dakka

    dakka

    Joined:
    Jun 25, 2010
    Posts:
    113
    Hey Mark, just checked in after a while... the textures are great... and i really like the scroll wheel action. Nice work.
     
  37. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    @TiG/dakka Thanks guys! :)
     
  38. remix

    remix

    Joined:
    Dec 11, 2009
    Posts:
    61
    Hello Mark. I've tested your demo and it's really impressive !

    I'm also implementing the marching cube algorithm in unity for one of our project (but no volumetric terrain). I just managed to have a simplified version running (no weighted cube edge vertices), but it is not suitable for realtime modification. Do you have some advices for me on how to make all the thing run faster, or some webpages to read, or anything ?

    Thanks!
     
  39. Rush-Rage-Games

    Rush-Rage-Games

    Joined:
    Sep 9, 2010
    Posts:
    1,997
  40. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    I would be very much interested in this, but i am wondering would you be able to optimize terrain for some better gamming use? Right now i have terrible frame rate on my computer and it isnt that bad at all D: .
     
  41. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    @ReMix - I could point you at Marching Cubes material, but actually, I wasn't able to find all the information I needed to create Voxelform, and as such, wound up spending quite a bit of time in R&D. Although perhaps a tad biased, the best advice I can offer, is to save yourself the opportunity cost... perhaps buy a copy of Voxelform, and take it from there. ;-)

    @Rush-Rage-Games - Thanks!

    @janpec - Voxelform is fairly scalable, so it's possible to use different shaders, smaller terrains, or if modification isn't an issue, increase chunk sizes. There are some limitations, but you should be able to get a reasonable frame rate out of the basic triplanar demo, even on a 2-3 year old iMac.

    If you're looking at the high-end demos, and they're too slow, perhaps take a look at this one instead... it's not as fast as the basic triplanar, but you get a lot more, for a lot less. The shader for this is included in the latest version.

    http://cyclopsframework.org/voxelform/test/
     
  42. jasonkaler

    jasonkaler

    Joined:
    Feb 14, 2011
    Posts:
    242
    In that last demo, I'm getting about 2 seconds per frame on my Radeon 2400 pro.
    It's probably the shader that's slow in low end video cards.
     
  43. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    I think when it is said "for better gaming performance", means the Voxel terrain system need to be fast enough to allow all of the rest of components needed in a real game like: buildings, vegetation, enemies, AI, vehicles, GUI, particle effects, etc...running adequately at the same time.
    If the voxel-shader elements (only) are performing already not very well, then it is not possible to make but very simple games.
    Anyway your system is very promising. I am very interested in the upcoming editor :)
     
    Last edited: Aug 1, 2011
  44. jeedee

    jeedee

    Joined:
    May 30, 2011
    Posts:
    15
    Unfortunately it is very laggy on my 2011 Macbook Pro :(
     
  45. Jenge

    Jenge

    Joined:
    Jun 28, 2011
    Posts:
    13
    The solution needs LOD on geometry (and potentially LOD on shaders, based on distance/coverage/etc) for better framerates.
     
  46. remix

    remix

    Joined:
    Dec 11, 2009
    Posts:
    61
    Thanks Mark.
    I've already rewritten my marching cube algorithm, using a source code I converted to JS. Well, it was always slow, even in a chunk version. After a good look in the profiler (the first algorithm cause the profiler to get out of memory), I understood that the thing that was computation heavy was the mesh collider refreshing.

    Now I have something that is working quite smoothly !
     
  47. Jenge

    Jenge

    Joined:
    Jun 28, 2011
    Posts:
    13
  48. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
  49. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    950
    Wow, your demo is running on half a Hertz or something for me. I have never got such framerates on anything with this computer...

    I had to force quit my browser.
     
  50. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    @All - The high-end demos are aimed at mid-range to high-end gaming rigs. The low-end demos should be playable on a 2+ year-old iMac. Rough guess says most laptops won't cut it for the high-end. Another factor to consider... the demos are released as "one size fits all." Everything can be customized, and the shaders are just examples. It's intended that you may want to roll your own, and the existing shaders should provide decent starting points.

    Just to toss it out there again, I'm running a single 6870, which if Tom's Hardware is to be believed, sits about 4 classes down from top of the charts, and strangely lower than a 5870. http://www.tomshardware.com/reviews/best-graphics-card,2964-7.html

    Side Note:

    The current dev build that I'm working on is taking a bit longer than I'd like due to other obligations, but it's progressing, and if there's time, should outperform the previous builds, and use memory more efficiently.

    Pro Feature Issue (heads up):

    One issue that I've run up against, and don't currently see a way around... I want very much to continue supporting Unity Free users, but I've been forced to use RenderTextures (a Pro feature) to get the editor working the way it should in an EditorWindow. (alpha stages) This will likely mean that the package will continue to be useful for Free users, but missing some of the new functionality.

    @Unity - Unless there's a way around this issue, it might make sense to unlock RenderTextures for Editor use w/ the Free version. Otherwise it may be limiting what folks are willing to invest in their editor extensions for the Asset Store.

    Despite the potentially limited market for an Editor requiring Pro features, I'll see it through, and assess things from there.

    @JasonKaler - Yeah the shader on that demo is still expensive. The improvement was to significantly reduce texture look-ups for non-graphical data used in the procedural texture, but I wasn't able to knock them out completely. I originally based the Perlin Noise used in that shader on several sources including the GPU Gems 3's example, but then later realized that classic Perlin Noise wasn't required, and chose to generate much faster noise on the GPU without using look-ups. The gradient part of the algorithm still requires a lot of look-ups.

    @Jenge - LOD on geometry is likely to be problematic, cause it's own performance issues, and chew up a decent bit of R&D time, so I'll have to look into it sometime after the editor is finished. LOD on shaders, maybe per chunk, is a good idea :) I'll fit that into the next build if time allows.

    @Remix - Good deal, and glad to hear it!

    @Jenge - Yeah! Looks cool, and definitely a similar approach.

    @24pfilms - Awesome! You could do something similar with Voxelform, but it wouldn't completely maintain the cubic look. Additionally, depending on the approach, a double buffer for the voxel data might be required (not a big deal.) Assuming that you'd want to use an array with a single voxel point per particle, you'd need to upscale it to 8 points per voxel in order to get visible particles using Marching Cubes based algorithms.
     
    Last edited: Aug 6, 2011