Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

Cubiquity - A fast and powerful voxel plugin for Unity3D

Discussion in 'Assets and Asset Store' started by DavidWilliams, Jun 2, 2013.

  1. DavidWilliams

    DavidWilliams

    Joined:
    Apr 28, 2013
    Posts:
    522
    I'm really pleased you're making good progress with this. I mean, I knew it would work in principle, but there were bound to be some rough edges and you're doing a great job of figuring the system out.

    That's very strange... what about when you click? Do the changes occur where the mouse cursor is or where the brush is? At any rate I'm not sure why this would happen. Perhaps you can print out coordinates as the mouse moves to see what is going on?

    Actually, I didn't imagine ppeople would use the brush marker in game mode (although you are welcome to). I expected people would want their own game-specific marker - e.g. you could just add a sphere to the scene, have it follow the mouse, and apply changes wherever the sphere is. But of course the built in marker is nice because it also shows the falloff.

    Yes, but not with the magic sculpt function. You will need to look at the standard API and set the voxels individually. Look at the 'ClickToCarveTerrainVolume.cs' script for an example of this.
     
  2. saarwii

    saarwii

    Joined:
    Mar 7, 2014
    Posts:
    20
    The change comes where the brush is. Il try some printing but it's not that important, im using it in a different way...

    one thing i have found is that sculpting in runtime is very resource heavy...on my 2,5 old lap top is goes down to 3 fps when sculpting. I moved it over to another computer that has a little more "umpf" (not a power house) and there i get about 15 i guess......so right now it works for prototyping and concept creation but i would not be able to build something to release with it
     
  3. DavidWilliams

    DavidWilliams

    Joined:
    Apr 28, 2013
    Posts:
    522
    In general you are correct, though are you finding it is slower at runtime than in edit mode? I think potentially there could be a difference, as run mode performs automatic and continuous rendering whereas in edit mode we drive the rendering more manually.

    Aside from that, you just need to wait for us to implement a few more optimizations to speed up sculpting overall.
     
  4. Deleted User

    Deleted User

    Guest

    Im really looking forward to better scaleability for coloredCubes since right now 1024*32*1024 seems to be pretty much the limit even with chunk loading/unloading in place. I dont expect infinite terrain but 4096*128*4096 would be pretty nice.
    Maybe Im just doing something wrong with my chunking function. Since I'm not yet saving and loading chunks from disk?
    CPU seems to be the bottleneck for me at least. I think calling setVoxel and getVoxel multiple times at runtime isnt really performance friendly either.
     
  5. DavidWilliams

    DavidWilliams

    Joined:
    Apr 28, 2013
    Posts:
    522
    Yes, I'd like to see the size of the volumes increased as well. It's what I'm planning to work on next, but currently I'm trying to push a bug fix release to the asset store (there were a couple of delays but hopefully it can happen this week).

    I'm not quite sure what you mean by this, as the chunking is internally handled by Cubiquity and is not exposed to the user. Are you trying to implement chunking yourself somehow?

    In what context are you using these? I've found that you can easily modify a few hundred voxels to build structures or create explosion damage. You can also use them to create whole maps but that will indeed be slow - you should do this as an offline operation and save the results to a .vdb file (which will load more quickly). There an example of this in the latest Git repository. It's for TerrainVolumes but the same principles apply to colored cubes volumes.
     
  6. Deleted User

    Deleted User

    Guest

    By chunking I mean that terrain gets loaded and unloaded dynamically. The player moves and only chunks of 16*16*16 in a special radius from the player are actually rendered and calculated. Like minecraft is handling it...
    Currently I create a 1024*32*1024 volume at the start and that volume gets filled with voxels which come from a random terrain function with perlin noise and so on. This volume only consists of data so no renderer or collision. And the chunks that currently get generated on realtime consist of a volume renderer/data/collision. And the data for the chunks comes from the world data. And for that I use setVoxel and getVoxel. Maybe not the best approach but I just wanted to get it to work.
    I think that I can create much bigger terrain if I only create all the chunks, then save them to disk and then they get loaded from disk dynamically when the player is in range.
    I also feel like Unity 5 will allow me to create bigger terrain, since it got 64 bit and multithreading support. But we will see.
     
  7. DavidWilliams

    DavidWilliams

    Joined:
    Apr 28, 2013
    Posts:
    522
    @Kuhmaus - Cubiquity does indeed support chunking but it does not use it to limit the render distance. To be more specific, the volume data is stored on disk as a number of separate chunks, and a number of separate meshes are created to represent them. Cubiquity can load a chunk of voxel data, generate the mesh, and then unload the chunk while still being able to use the mesh data it generated.

    Using these chunks to limit the render distance probably makes sense as well, and maybe I will expose that as an option in the future. However, 1024*32*1024 is not actually that large and I feel that with some optimizations it should be possible to render this whole terrain without having to limit the render distance (Unity can handle this size with standard terrain). So I'd like to get things further optimized before I resort to other approaches.

    I can say that optimization is now my number one priority. The promised bug-fix release of Cubiquity finally landed on the Asset Store yesterday (official renouncement coming soon...) so hopefully I can start to make progress with larger volumes.
     
  8. Deleted User

    Deleted User

    Guest

    @DavidWilliams
    Yes it can handle 1024*32*1024 at once without hiding chunks but If I want to go bigger Im sure that I need to hide chunks. Since rendering 4096*32*4096 for example would be a problem for some graphics cards.
    I will keep you updated on performance when actually loading chunks from disk.
     
  9. DavidWilliams

    DavidWilliams

    Joined:
    Apr 28, 2013
    Posts:
    522
    Hi all,

    I'm pleased to say that we've just uploaded a new version of Cubiquity for Unity3D to the asset store!


    This is mainly bug-fix release though a couple of new features are also included (you can see our blog post for some extra details). Note that this version addresses the 'database is locked' issue which people have reported. It does this partly through better handling of attempts to duplicate volume data, and partly through education - we now have added a section in the user manual explaining why you probably don't want to duplicate volumes anyway.


    With this release out of the way we now want to move forwards and focus on optimizations and tools. Several people have asked for larger volume support and the ability to import data from external sources, so hopefully we can deliver some nice results here. As always, you can stay up to date on our progress with the following links:

     
  10. Mystra007

    Mystra007

    Joined:
    Jun 23, 2014
    Posts:
    1
    cubiquity_setup.jpg
    Is it normal that the Terrain Volume Collider that comes with the package doesn't work and that I have to manually place a box collider just to be able to walk around without falling throught the terrain?
    - I used the volume terrain example
    - I dropped a first person controller, made sure to place it a bit above terrain and looked around while zoomed close to make sure I was above the terrain. I also put a box collider on the controller and adjusted it's size to fit the character mesh
    - I check the Terrain Volume object and the Terrain Volume Collider (Script) component is attached to it.
    I have the free latest version of Cubiquity

    Also, can you mix terrain volume and cubic terrain so that you can let your users drop cubic blocks of terrain for example?
     
    Last edited: Aug 16, 2014
  11. DavidWilliams

    DavidWilliams

    Joined:
    Apr 28, 2013
    Posts:
    522
    @Mystra007 - I apologize for the collision detection bug. Fortunately it is a trivial one-line fix as shown in the Git repository here:
    It occurred because I changed the encoding of the vertex data. I updated the rendering code but missed the collision code. The 'TerrainExampleScene' now includes some rigid bodies to test this in the future, and also demonstrates how to wait for the scene to mesh to load before spawning physics objects. You can use this for your character controller too. See the new 'SpawnPhysicsObjectsOnMeshSync.cs' for details.

    I'll have to push this updated version to the asset store as broken collision detection is pretty serious, but I'll leave it a few days in case any other issues come in. In the mean time you can get the latest version from the Git develop branch (not master).
     
  12. DavidWilliams

    DavidWilliams

    Joined:
    Apr 28, 2013
    Posts:
    522
  13. someunityguy

    someunityguy

    Joined:
    Jun 28, 2011
    Posts:
    35
    These wont compile on the newest build
     

    Attached Files:

  14. DavidWilliams

    DavidWilliams

    Joined:
    Apr 28, 2013
    Posts:
    522
    It looks like these were written against a fairly old version of Cubiquity and will need some updating. Here are a few of the things that I noticed will need to be changed:
    • Add 'using Cubiquity' to the start of each file.
    • The 'IntVector3' class is now called 'Vector3i'
    • The GetVoxel() and SetVoxel() functions are part of the VolumeData rather than the Volume. That is, you need to replace myVolumeName.GetVoxel() with myVolumeName.data.GetVoxel()
    • The ColoredCubesVolume does not operate on Color32 anymore but on QuantizedColor.
    There may be other changes needed as well. It looks like your scripts are a modified version of the old 'ClickToDestroy' script, so you should check the latest version of this script to compare. Or perhaps you are better off starting from the latest 'ClickToDestroy' script, making a copy of it, and then applying your changes.

    Let me know if you have more problems.
     
  15. DavidWilliams

    DavidWilliams

    Joined:
    Apr 28, 2013
    Posts:
    522
    I've updated the files for you so that they compile with the latest version of Cubiquity. However, I don't have an easy way of testing that the behavior is still what you expect. Please give them a test and let me know if they work for you.
     

    Attached Files:

  16. Tobias-Pott

    Tobias-Pott

    Joined:
    Aug 26, 2014
    Posts:
    7
    Hi there,
    I've tested the evaluation version of Cubiquity for a while now and have a few questions.
    Is there a way to import custom voxel models as volume data for a terrain volume?
    I can't get a map from AoS (converted with the ConvertToVDB.exe) to be accepted by a terrain volume getting the following exception:
    Is there an option on the ConvertToVDB tool I'm missing?
    And is there a way to get an insight into the vdb file format specification to create correct vdb files by myself or write a converter for a different voxel format? (It's getting exhausting to first convert my models to vox or vxl files and continue conversion with the cmd-tool).

    Regards
    Tobias
     
  17. DavidWilliams

    DavidWilliams

    Joined:
    Apr 28, 2013
    Posts:
    522
    An AoS file contains 'colored cubes' (each voxel is just a color) and when converted into the Cubiquity format it will be the same. You must attach it to a ColoredCubesVolume and not a TerrainVolume. The two are quite different, in that a ColoredCubesVolume contains a color per voxel (same as AoS) whereas a TerrainVolume contains a material identifier per voxel (and AoS files have no concept of material).

    I'm sorry this wasn't clear from the error - I've made a note to improve it.

    There is no way to import an TerrainVolume at the moment but we will add heightmap import in the future.

    The .vdb file is actually a SQLite database and so has a relatively complex format. You can open it with a tool like SQLiteBrowser but you won't see much useful information (just binary blobs). So there is no easy way to write these. However, we are working towards releasing the Cubiquity SDK separately from Cubiquity for Unity3D, at which point it will be possible to build a volume through the Cubiquity C API.

    Also, we expect to add a menu entry to Unity3D in the future which will call the command line converters from Unity3D.
     
  18. realghetto

    realghetto

    Joined:
    Jan 21, 2014
    Posts:
    112
    Having an error here. Using cubiquity for unity v 1.1.2 and Unity 4.5.3 and windows standalone.

    Upone importing the package to an empty project, I receive the following error when opening up any of the example scenes or with just simply adding the cubiquity gameobjects:

    Code (CSharp):
    1. EntryPointNotFoundException: cuGetVersionNumber
    2. Cubiquity.Impl.CubiquityDLL..cctor () (at Assets/Cubiquity/Scripts/Impl/CubiquityDLL.cs:32)
    3. Rethrow as TypeInitializationException: An exception was thrown by the type initializer for Cubiquity.Impl.CubiquityDLL
    4. Cubiquity.ColoredCubesVolumeData.InitializeEmptyCubiquityVolume (Cubiquity.Region region) (at Assets/Cubiquity/Scripts/ColoredCubesVolumeData.cs:101)
    5. Cubiquity.VolumeData.CreateEmptyVolumeData[ColoredCubesVolumeData] (Cubiquity.Region region, System.String pathToVoxelDatabase) (at Assets/Cubiquity/Scripts/VolumeData.cs:296)
    6. ColoredCubeMazeFromImage.Start () (at Assets/Cubiquity/Examples/MazeFromImage/ColoredCubeMazeFromImage.cs:27)
    I have confirmed the DLL is copied to the root of the project folder however, cubiquity appears to not be able to confirm the version. I have tried multiple projects, all produce the same result.
     
  19. DavidWilliams

    DavidWilliams

    Joined:
    Apr 28, 2013
    Posts:
    522
    Very strange - I don't think anyone has reported this before. Can you clarify whether you got the version from the asset store or the evaluation version? Can you give the actual filename of the download? Also, you refer to 'windows standalone', but you don't mean a 'standalone build' as you presumably can't get that far?

    My understanding of that message is that it has found the DLL (otherwise I think there woulds be a DllNotFoundException) but that it can't find a function called 'cuGetVersionNumber'. I don't know why this would occur, particularly only for you.

    Perhaps I will try to test this on Unity 4.5.3 (I submitted from 4.3) but I'm away from my dev machine so it might not happen for a week or so.
     
  20. KidSicarus

    KidSicarus

    Joined:
    Feb 3, 2014
    Posts:
    35
    Great work, David. A pleasure to work with Cubiquity after striking out with another voxel asset.

    After perusing the information available and trying demos, we are left with a few questions, if you have the time.

    We do not require real-time (play mode) manipulation; can we turn off that process?

    Is there a way to load terrain instantly? After pressing play, the terrain disappears and we must deactivate and then reactive in the inspector before it will show up in game.

    How do you add more than 3 textures to paint?

    Thanks so much for providing a demo.
     
  21. realghetto

    realghetto

    Joined:
    Jan 21, 2014
    Posts:
    112
    I downloaded the demo version from your post above on this page:
    http://www.cubiquity.net/cubiquity-for-unity3d/1.1/cubiquity-for-unity3d-ver1.1.2.unitypackage.zip

    No, I did not get as far as a build, as I can't even try any of the example scenes, it never gets that far as the error occurs. On some example scenes, the error is occurring every second or maybe even every update, not sure, but on other scene the error happens only once and nothing else is working. This is happening in the editor.
     
  22. DavidWilliams

    DavidWilliams

    Joined:
    Apr 28, 2013
    Posts:
    522
    Thanks :)

    You can of course choose not to modify the terrain at runtime - in the demo modification only occurs because the 'ClickToCarve' script is attached to the volume game object. If you remove this then you will have a static terrain unless you modify it through your own code.

    But I guess what you are really asking is if the terrain can be baked into a standard Unity mesh, so that at runtime the voxel data is not needed? Unfortunately there is no option for this at the moment.

    I have noticed that sometimes there is a significant delay (perhaps 10-20 seconds) between pressing play and having the terrain appear - I assume this is what you are referring to? I do not know what causes this and am expecting to investigate in the coming weeks, but it doesn't seem to happen every time and the terrain does appear eventually. Perhaps you are seeing something different? I was not aware of the deactivate/activate trick, I'll have to check that.

    You can select the volume, goto the inspector -> Find the 'Terrain Volume Renderer (Script)' component -> double click the box labeled 'Material'. This will open the material in the inspector and you can assign textures to the slots. There should be eight texture slots available.

    @realghetto - I will get back to you about this after I manage to test on Unity 4.5.3. In the meantime I will release v1.1.3 in the next couple of days so you can try that, but I doubt it will fix your problem. I would also be curious if it works for you on another machine but maybe you cannot test that?
     
  23. designico

    designico

    Joined:
    Apr 2, 2013
    Posts:
    9
    Hey David,
    I'm just playing around with your Cubiquity toolkit. Right now I'm using the non-commercial version, but if it fits to my needs I will buy the asset as soon as my game goes public.

    But first I have a question. Is it somehow possible to give the smooth-voxel-terrain a non smooth lowpoly look? Something like this: http://qt-ent.com/PolyWorld-Woodland/wp-content/uploads/2014/06/screenshot2.png

    Other Question is I want to build a planet - the planet should be as big as possible. Is there some way to make a sphere more performant. May by don't have voxels in the core of the planet.

    You need to know I'm still very new with scripting and stuff.
    cheers!
     
  24. KidSicarus

    KidSicarus

    Joined:
    Feb 3, 2014
    Posts:
    35
    So, it should load instantly?

    Also, I too hold down ALT to move and pan the camera. If you could please program ALT not to sculpt/smooth/paint in the editor, that would help out A LOT.

    Thanks.
     
  25. DavidWilliams

    DavidWilliams

    Joined:
    Apr 28, 2013
    Posts:
    522
    It is possible to attach your own materials to the the VolumeRenderer component, and so if you have some shader programming skills then you can indeed do this.

    But actually I already have a todo-list item to make this a standard feature of the builtin material. I think it makes a lot of sense, because it shouldn't be difficult to do and the visual style goes well with voxel terrain. So if you don't have much programming experience then you might just want to wait for this.

    Optimization is my main focus at the moment and I expect you will see larger planets as a result. There's not much you can do until then though.

    It should start loading instantly, though it is usually a few seconds between the first chunk appearing and the whole terrain being finished. However, I am aware that sometimes it takes 10-20 seconds before even the first chunk appears - I consider this a bug (or at least an issue which needs further investigation).

    Yep, noted. I think someone else has raised something similar in the past. I've added it to the issue tracker.
     
  26. designico

    designico

    Joined:
    Apr 2, 2013
    Posts:
    9
    Thanks David - so I guess I'll wait for new updates :)

    But there two more workflow issues I realized yesterday when I was playing around with your asset. First CTRL-Z dosen't work - may it be possible to fix that? I want to use Cubiquity for Modeling more or the complex planets. Having no possibility to get a step back will be very frustrating.

    And second always when I press the mouse to navigate around I build build new voxel - is there another to navigate and edit the voxel at the same time without pressing so many keys ?
     
  27. perracolabs

    perracolabs

    Joined:
    Apr 3, 2014
    Posts:
    29
    when will it have mobile support (Android/iOS)?
     
  28. DavidWilliams

    DavidWilliams

    Joined:
    Apr 28, 2013
    Posts:
    522
    Hey guys, it's really great to see there is so much interest in Cubiquity for Unity3D. With all these questions I think it would be useful if we could open up our development process a bit more and provide a public roadmap (or at least a list of the features which we are planning).

    We already have the issue tracker of course, but that is more for bug reports. So maybe I'll try setting up a public Trello project or something similar. Give me a few days and I'll see what I can come up with :)

    It's not easy to fix but I do think it's important. Voxel data takes a lot of memory so it needs to be implemented in an efficient way. We'll try to get this sorted.

    I'm away from my dev machine for a few days so I can't test the controls, but other people have expressed frustration with this. When it comes to fixing it I'll try to get community feedback as to how it should behave, because as a programmer I don't attempt fancy things like navigating and editing at the same time ;-) I'll also check the built-in terrain behavior.

    To be honest I don't think this will happen for quite a while. We will want to get the desktop version in quite a polished state before we move to mobile, and there is still lots of work to do!
     
  29. milliams

    milliams

    Joined:
    May 7, 2013
    Posts:
    5
    There's already http://www.bitbucketcards.com/volumesoffun/cubiquity-for-unity3d (select version 'All' in the dropdown on the right) which provides a Kanban-style interface to our Bitbucket issue tracker. If we want to keep it separate, a Trello board could work too.
     
  30. DavidWilliams

    DavidWilliams

    Joined:
    Apr 28, 2013
    Posts:
    522
    Wow, that's so cool, I had no idea that BitBucket provided that view of the issue tracker! I think it's not as nice as Trello though - in my mind I imagined having a number of separate columns (editor, rendering, physics, etc) with the tasks for each, and then loosely prioritize them based on how soon we will work on them. With BitbucketCards you seem to be restricted to the existing categories and can't reorder cards by dragging them around.

    None the less, there's a lot to be said for keeping all the task management in one place. I'll have a play with the options and also see if there's a way to cross-reference between the two, or what the other pros/cons are.
     
  31. DavidWilliams

    DavidWilliams

    Joined:
    Apr 28, 2013
    Posts:
    522
    Just a heads up that another bug fix release has reached the asset store. Version 1.1.3 fixes a problem with collision detection against smooth terrain, and also extends the existing example by spawning rigid bodies in the OnMeshSyncComplete() callback (@Mystra007 - This is the issue which you reported).
     
  32. CliffracerX

    CliffracerX

    Joined:
    Jul 27, 2014
    Posts:
    7
    This looks really nice, but I'm wondering: Can I make my opensource project using Cubiquity available if I'm using the free version of Cubiquity?
     
  33. Ellandar

    Ellandar

    Joined:
    Jan 5, 2013
    Posts:
    207
    Hi David,

    We used Trello in my team at work and we quickly outgrew it due to the fact that the topics are columns and can't really be broken down nicely.

    We've settled on leankit: https://leankit.com and so far it's able to be manipulated to fit all of our kanban workflows that are being improved over time.

    - Ell
     
  34. DavidWilliams

    DavidWilliams

    Joined:
    Apr 28, 2013
    Posts:
    522
    Yes, provided that your open source project is not a commercial project. Most open source projects are not commercial, but some are. The free version of Cubiquity is specifically for non-commercial use.

    The other issue with an open source project is that you may wish to redistrubute the Cubiquity source code and .dll as part of your project. This is ok, as long as it is clear that Cubiquity is not part of your project and is under a different license. Assuming you have other dependencies as well, you might want to put them all in a dependancies folder for simplicity, but it's up to you exactly how you organize it.. See points (2) and (3) of the license.

    Thanks, I mentioned Trello because it's the only one I know of the top of my head. Actually I've never used these kanban boards but I saw that Unreal Engine 4 makes use of them. I've started using Trello for personal stuff, but I'll look around and see how they compare.

    When you moved from Trello to Leankit was there a tool to transfer the data?
     
  35. CliffracerX

    CliffracerX

    Joined:
    Jul 27, 2014
    Posts:
    7
    Sweet!

    On the topic of redistributing it, I would probably remove it from the git repository (it'd be on Github) and have a link in the readme to here for downloading it, with the explanation that you need to open up the project in Unity and then use the unitypackage of Cubiquity to import the Cubiquity assets into the project.
     
  36. DavidWilliams

    DavidWilliams

    Joined:
    Apr 28, 2013
    Posts:
    522
    @CliffracerX - That's also fine of course, you can see what works best for your project.
     
    CliffracerX likes this.
  37. Ellandar

    Ellandar

    Joined:
    Jan 5, 2013
    Posts:
    207
    There is an export option in Trello, and to be honest my migration was very basic because the turnover of jobs on our boards was quite high. All I did was export our backlog from Trello and then imported the file into Leankit; there's a nice mapping option in leankit to map the fields of the file to the corresponding fields in Leankit. https://support.leankit.com/entries/21627922-Importing-and-Exporting-Cards
    Once done, I let the team run the Trello board mostly dry, and then transported the last remaining cards manually into Leankit and started using it.

    Leankit is a lot more flexible but the one thing we do miss is the absolute breakneck speed at which you could create a card in Trello. Leankit is a "right-click, create card" setup, and Trello is a "Click on a field and start typing" setup.
    Apart from that, everything else has been really positive. We do approx 35-40 cards a week and i've gone from having task my staff to them just pulling their own work off the board, I'm very happy with our Kanban experience.

    - Ell
     
  38. DavidWilliams

    DavidWilliams

    Joined:
    Apr 28, 2013
    Posts:
    522
    Ok, I've gone ahead and set up a Trello board for Cubiquity for Unity3D. I went with Trello in the end because it gives unlimited free boards and I'd already started playing with it for my personal task management. Once we've got some kanban experience we'll be able to see if it still meets our requirements.


    I'm not sure exactly how this system will be used long-term, but for now I've grouped the tsks into meaningful columns and assigned colors based on the expected amount of work. I'll move tasks into the 'In Progress' column once I'm actively working on them.
    Note that we still have our issue tracker on Bitbucket. I expect we will use this for tracking bugs in existing features while we use the Trello board for higher-level planning and brainstorming. We may adjust our workflow once we see how it is working out.
     
  39. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    5,598
    btw. getting f-secure virus warning (false positive usually..) from the dll (just download the zip from bitbucket..)
    "Gen: Varian.Kazy.444386" (Assets\StreamingAssets\Cubiquity\SDK\CubiquiteC.dll)
     
  40. milliams

    milliams

    Joined:
    May 7, 2013
    Posts:
    5
    Well it's definitely a false positive :) The Zip file on Bitbucket is just automatically generated from the git branch by Bitbucket so there's no way it can be containing a virus (unless Bitbucket has been compromised).
     
  41. DavidWilliams

    DavidWilliams

    Joined:
    Apr 28, 2013
    Posts:
    522
    @mgear - The virus warning is a false positive, though I'm not quite sure why you are getting it. I uploaded the latest DLL from the develop branch to VirusTotal and none of the 55 virus scanners flagged it as suspicious. You can see the full results here:
    Curiously, this site includes a scan with F-Secure which also returns negative. If you have a moment could you upload your own copy of the DLL to verify the results are the same (and post the link)?

    Also, I notice the path you gave has a type (CubiquiteC.dll instead of CubiquityC.dll). Can you verify this?

    Indeed, but the specified DLL is built on my machine (with a legitimate version of Visual Studio 2013). So the concern would be that my machine was infected and was passing a virus onto compiled executables. But as noted above it appears this is not the case.
     
  42. DavidWilliams

    DavidWilliams

    Joined:
    Apr 28, 2013
    Posts:
    522
    @mgear - I have reproduced your problem. The (presumably) false positive occurs with an older version of the Cubiquity DLL (1.0.0) whereas the latest version of Cubiquity for Unity3D is 1.1.3. However, I now realise it is very easy for users to accidedntely download this old version of Cubiquity as the master branch points here, whereas all development happens in the 'develop' branch.

    I need to tidy this up and probably switch to the 'git-flow' model, to avoid people downloading this old version in the future.
     
  43. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    5,598
    Yeah, I had downloaded the old version from bitbucket downloads page,
    no warnings in the new versions - Thanks!
     
  44. MartinLyne

    MartinLyne

    Joined:
    Apr 25, 2013
    Posts:
    30
    Hi, could anybody (@DavidWilliams ?) help me figure out why the following code does not render anything please? No errors in console. Using Unity Free (4.5.2f1) and the non-commercial version. I'd expect a cube 20x20x20 voxels?

    Using the Examples/ProceduralTerrainGeneration as a guide.

    Code (csharp):
    1.  
    2.         TerrainVolume volume = targetMesh.AddComponent("TerrainVolume") as TerrainVolume;
    3.    
    4.         TerrainVolumeRenderer render = targetMesh.AddComponent("TerrainVolumeRenderer") as TerrainVolumeRenderer;
    5.         targetMesh.AddComponent("TerrainVolumeCollider");
    6.  
    7.         render.material =  Resources.Load("Materials/HullMetal02", typeof(Material)) as Material;
    8.         TerrainVolumeData data = VolumeData.CreateEmptyVolumeData<TerrainVolumeData>(
    9.             new Region(0, 0, 0, 20, 20, 20)
    10.         );
    11.         MaterialSet matSet= new MaterialSet();
    12.         matSet.weights[0] = (byte)1;
    13.         for (int aa = 0; aa <= 19; aa++) {
    14.             for (int bb = 0; bb <= 19; bb++) {
    15.                 for (int cc = 0; cc <= 19; cc++) {
    16.                     data.SetVoxel(aa, bb, cc, matSet);
    17.                 }
    18.             }
    19.         }
    20.         volume.data = data;
    21.  
    Thanks very much,
    Martin

    Edit:
    Also tried setting materialSet value to 0 and 255, but no change.
    Edit 2:
    Because I could, I activated Unity Pro trial to see if that helped, no joy.
    Edit 3:
    I accidentally commented the function call. What a tool! FIXED
     
    Last edited: Sep 13, 2014
  45. DavidWilliams

    DavidWilliams

    Joined:
    Apr 28, 2013
    Posts:
    522
    @MartinLyne - Yes, the mistake was that you needed to set the weight to 255 rather than 1. I think working in the 0-255 range is a little less intuitive than working in the -1.0 to 1.0 range (commonly used by voxel engines), but of course bytes are more compact than floats. Glad you fixed it :)
     
  46. Predominant

    Predominant

    Joined:
    Jul 11, 2012
    Posts:
    5
    I have an issue in the latest: cubiquity-for-unity3d-ver1.1.3.unitypackage

    I'm rendering "floating islands" with cubiquity along with the terrain collider. A player will walk around on the top of these volumes and explore.

    As an additional mechanic, the islands will move with wind currents, and eventually players will be able to build thrusters and pilot these around the sky.

    However, when I move an island in Unity's editor, both the texture in the editor and on the rendered camera are stationary. Its as if the texture is fixed to a position in the world, and cannot move with the volume itself.

    This can be replicated by taking your procedural terrain demo, duplicating the terrain game object in Unity, and then playing the scene, Move both terrains around. You will see that one works, and the other appears to have world-fixed terrain coordinates, or something.

    Any help appreciated!
    Let me know if you need more detail.
     
  47. DavidWilliams

    DavidWilliams

    Joined:
    Apr 28, 2013
    Posts:
    522
    Hi,

    I can reproduce this in the way you describe, but do note that we generally advise against duplicating Cubiquity objects (see here). I just tried creating two separate terrain object through the main menu and then the textures seemed to behave correctly.

    I believe the problem is that each TerrainVolume needs it's own instance of the Triplanar material - these instances should not be shared. The terrain meshes don't actually contain texture coordinates but instead generate them inside the shader, and they need the position of the volume to do this. Hence the Triplanar material has as a (hidden) property the transform of the volume it is applied to, and applying it to multiple volumes will cause issues.

    This might be a slightly non-Unityesque approach, and I'm open to further consideration here (I just added an issue). But for now you should make sure that each volume you create is using a clone of the Triplanar material instead of the original. The TerrainVolumeRenderer does this as follows:

    Code (CSharp):
    1. if(material == null)
    2. {
    3.     // Triplanar textuing seems like a good default material for the terrain volume.
    4.     material = Instantiate(Resources.Load("Materials/Triplanar", typeof(Material))) as Material;
    5. }
    The assigned material then shows up as 'Triplanar (Clone)'. But watch out, if you then duplicate a TerrainGameObject then you end up with two separate volumes using the same instance of 'Triplanar (Clone)', rather than two separate instances, and I think the '(Clone') in the name does not help you here (got that?!).

    Ok, have a look at how/where you are assigning the materials and see if this clears it up. I'm also open to feedback if things should be done differently.
     
  48. Predominant

    Predominant

    Joined:
    Jul 11, 2012
    Posts:
    5
    This is going to be tricky, as the volumes are created procedurally.
     
  49. MartinLyne

    MartinLyne

    Joined:
    Apr 25, 2013
    Posts:
    30
    I have a few questions (loving it so far though!):
    - Is there a way for it to generate tangents for bumpmaps? I noticed before it was mentioned they were used for other purposes but seems that might have changed?
    - Is there a way of detecting if the visible meshes are still being generated?
    - Is it still the case that I cannot develop with free version then pay at later date? (Curious how this will affect prototype work done so far)

    Thanks,
    Martin
     
  50. DavidWilliams

    DavidWilliams

    Joined:
    Apr 28, 2013
    Posts:
    522
    I don't think this really matters. You might be filling the VolumeData procedurally from code, but somewhere you still need to build a GameObject, attach the Renderer and Collider, etc. How are you doing this? Is it already part of your scene (as in the Procedural Example), or more likely you create these structures in code (as is done when making a volume through the main menu - possibly using TerrainVolume.CreateGameObject())?

    The terrain vertex data does not contain per-vertex tangents, but then it doesn't contain texture coordininates either and texturing works just fine :) The trick is triplanar texturing, and this can in principle be extended to bump/normal mapping as well.

    Triplanar textuing works by taking a single textures and sampling it three times - to project it along the X, Y, and Z axes, and then combining the results. I beleive it is possible to do the same with normal maps (or at least bump maps?) though some care may be required when combining the normals. NVidia present this approach in GPU Gems 3:
    If you have some good shader programming skills then it should be possible to extend Cubiquity's Triplanar shader to do this. However, the reason I have not yet done this myself is that the Triplanar shader is already rather heavy in terms of the number of textures used and texture reads, so I was planning to fix this first. But if you can spare the performance then give it a go.

    Yes, you can use Volume.isMeshSyncronized and related functions. The Terrain example uses these to wait until the terrain is loaded before spawning physics objects to bounce around it.

    I would like to avoid the situation where people develop on the free version and then buy a commercial license the day before they release. This is because many games don't make it to release but still require support during the development process.

    The exact cut-off point isn't precisely defined (you can evaluate as long as you like), but if you have decided you game will be commercial, have started promoting it, or just want a 'definitive' license (the standard Unity one) then it's probably time to buy.

    On a related note, although 'non-commercial use' might seem ambiguous, studies have shown that most people agree on what it means and that users tend to err on the side of caution.