Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. We're looking for your feedback on the platforms you use and how you use them. Let us know!
    Dismiss Notice
  4. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  6. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  7. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  8. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Voxeland - Voxel Terrain Tool

Discussion in 'Assets and Asset Store' started by Wright, Jun 25, 2013.

  1. Utopien

    Utopien

    Joined:
    Feb 15, 2016
    Posts:
    8
    thanks for your quick respond
     
  2. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,336
    Resizing Voxeland isn't significantly better than changing the resolution of the standard Unity terrain which will just erase all of the data. Voxeland preserves data, and this could be OK for lowering terrain resolution, but isn't good for extending the terrain size - you will have to re-generate it again.

    Can you see the pop-up message "This will remove all your custom changes blah-blah" when pressing "Force re-generate" button?

    np!
     
  3. Utopien

    Utopien

    Joined:
    Feb 15, 2016
    Posts:
    8

    helloooooooooooooooooooooo du have tutorial planet voxel
     
  4. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    490
    @Wright thanks for that data.cs although it seemed to have a bug; I can't seem to be able to sculpt or paint any terrain.. highlighting doesn't show.. I took the data.cs from another project and overwrote it and highlighting/sculpting returned.

    On a side note it seems that I can now use Megasplat's Vertex painter! All is needed I guess is the data.cs file to allow all 256 material land block. I have to double check that data file and should confirm it later today. Update: works but the highlight seems to be off.. is there an easy way to reset this?

    Update: so there is still an issue painting with Megasplat Vertex Painter -it seems as though it's not connecting with the shader settings when used with Voxeland.
    upload_2018-6-25_17-52-37.png
     
    Last edited: Jun 25, 2018
  5. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,336
    That's odd, I can sculpt and see the highlight with new data.cs in both demo scene and the new terrain. Is demo scene working in your case?
     
  6. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    490
    I think when I used the Megasplat Vertex painter in my scene it messed up Voxeland highlighting. Having closed unity then reopened there is difficulty seeing the highlighting.. this might because of tessellation - I've attached a video as a zip.
    Also in your demo by default it looks like the terrain margins aren't tight.

    upload_2018-6-26_12-34-36.png
     

    Attached Files:

  7. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,336
    So, does highlighting and terrain editing work in demo scene? Could you please store the video on youtube, vimeo or at least dropbox?

    The seam you can see in demo scene is the seam between the horizon mesh and the main voxel terrain. It's made so that it should not be visible from the main terrain. Since infinite terrain is turned off in editor here Voxeland does not rebuild terrain based on camera or marker objects position - but in playmode it will not be visible since it will "travel" with a camera.
     
  8. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    490
    I've sent you an email but it wasn't accurate.. it is more likely that depending on the amount a texture displaces will determine how visible the highlighting will be rather than considering my first thought that since your update of the data.cs that the new blocks may not be written to allow highlighting.. I remembered that the highlighting is a raycast type setup and is fairly independent.

    This is the selection issue that keeps happening, not sure what's causing it but when it happens I can't edit the terrain
    upload_2018-6-28_12-55-7.png

    I did have both Voxeland/land block selected before I tried to edit the terrain.This issue is intermittent.
     
    Last edited: Jun 28, 2018
  9. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,336
    Make sure you've got "Lock Selection" checked in Settings
     
  10. Cwlass

    Cwlass

    Joined:
    Jul 5, 2018
    Posts:
    2
    Hey,

    I feel dumb having to ask some of these questions but i can't seem to find the answers i need in the documentation you've released with it or perhaps i'm simply miss understanding the use of the tool but here they are :

    1. How do i simply define the size of a voxeland.
    2. Can I reduce the system size of an already existing voxel system (and is it more performant)?
    3. Can I merge 2 voxel systems into a single big one?
    4. Can I extract a portion of a voxel system as a separate smaller one?
    5. Can I smooth (Relax Strenght/Iteration?) individual voxels, or only globally?
    6. how do I paint in different blocks/materials on a Voxeland?

    I apologies if these have already been asked but i couldn't find the answer on here and thank you in advance for any answers you can give.
     
  11. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,336
    If you are using Static or Limited terrain you can change it's size in Mode/Ranges tab by changing the Terrain Size value. Note that this value is divisible by a chunk size, so it will slightly change after you set it (for instance, it will change to 390 when you set 400).
    In case of the Infinite terrain there's no Terrain Size parameter since it has no sense, but you can change the visible terrain range instead.
    Surely a smaller terrain is calculated and rendered faster.

    You can't have 2 or more Voxeland objects in one scene, and it's not possible to combine them or extract a part into a separate voxel system.

    You can smooth the terrain locally using brush by control-shift by default. I'd like to recommend you using volume brush with this mode.

    In order to place other voxel types they should be added and selected in Land Blocks tab.
     
    P_Jong likes this.
  12. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    747
    I have a version of Voxeland installed that dates back about 4 to 6 months. I can't tell exactly what version I have from the files in my project (which, by the way, you might want to change in the future).

    I've downloaded the latest version from the Asset Store. It appears you moved some source files, so just importing the new Unity package won't work as an upgrade process, since there are duplicate class names if I do that.

    If I delete the old version, then the new one imports correctly but my Voxeland main object has a "missing script" for the Voxeland.cs script, and when I reattach the new version all my data is lost and my voxel terrain vanishes.

    What's the proper upgrade procedure for Voxeland in an existing project? Thanks!
     
  13. Cwlass

    Cwlass

    Joined:
    Jul 5, 2018
    Posts:
    2
    Hi, thanks for you're very quick response but although helpful i believe i may have poorly phrased some of my questions.

    Say i wanted to create to different asteroids that can move individually in one scene would that be possible within one voxeland system? And I don't understand why I cant have multiple voxelands within one scene as I've done it while experimenting to no obvious detriment to the game or performance. Or is there something I'm missing? Because in the event I could, then the multiple asteroids scenario would function fine.

    When using the smoothing tool, it seems to remove and add voxels within the chunk to make it appear more smooth while keeping the same relax strength. The problem with this is if for example i wanted to create a rock Quarry within a cave, would I be able to make a perfectly flat surfaces with hard edges within the smooth rock formations of the cave by locally modifying the relax strength within the chunk with the brush, or is that simply impossible with this system?

    Again thank you for any help you can give.
     
    Last edited: Jul 6, 2018
  14. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    747
    I did some further experimentation and was able to resolve all the compiler errors, although the process took about 2 hours. There were two kinds of errors:
    1. Function calls of the form Foo(bar, baz, name1:value, name2:value) are not accepted in Unity 2018.2. I had to remove the "name1:" and "name2:" syntax and just rely on position of parameters, which fortunately matched the method signatures and worked.
    2. There were a lot of functions that were moved to different subfolders, resulting in name collisions when importing the new Voxeland version.
    I'm still getting the problem described earlier, namely that after importing the new Voxeland, the in-scene object has the Voxeland.cs script missing. Adding the new script version there produces null reference errors in the Editor and the Voxeland object vanishes from the scene. Nothing I tried seems able to overcome this error. Help, please. :)
     
    P_Jong likes this.
  15. TalkieTalkie

    TalkieTalkie

    Joined:
    Jul 5, 2012
    Posts:
    116
    I have never been able to import Voxeland into a scene without some (red) errors. Haven't used it in a project cause of that. Released a game, wanted to use this in that but ended up going with Gaia.

    This is the only asset which gives a new error every time I import it into a empty scene. I just don't get it.
     
    P_Jong likes this.
  16. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    747
    I'm pretty sure this is related to the new Voxeland.cs having a different GUID than the old one. The new one won't accept the Voxeland exported asset that I had created under the old, and the Inspector doesn't even recognize those data files as belonging to Voxeland.
     
    P_Jong likes this.
  17. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    747
    I really like Voxeland, but at the moment it doesn't seem to be compatible with Unity 2018, and even after resolving the compiler problems locally I can't seem to get it to accept the updated version for existing assets.
     
    P_Jong likes this.
  18. TalkieTalkie

    TalkieTalkie

    Joined:
    Jul 5, 2012
    Posts:
    116
    I am not using 2018 though.

    In-fact, I've tried it with every possible 2017 version and only NOW am I switching to 2018 for a new game.

    It's a shame. I really like this asset and had ideas to use it for the last game I released on Steam, but the random errors just scare me. Don't wanna ruin a project when using this asset (and if it somehow works without errors from the start).
     
  19. Alcyone

    Alcyone

    Joined:
    Nov 15, 2013
    Posts:
    10
    Same here, I am working with 2018.1.7 and:

    Assets/Voxeland/Tools/Extensions/Texture2DExtensions.cs(232,16): error CS1061: Type `UnityEngine.Texture2D' does not contain a definition for `imageContentsHash'

    Etc, etc.

    Am I missing something?
     
  20. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,336
    Sorry guys, Voxeland really had problems with build under Unity 2018. I'm submitting the new Voxeland version today with all the fixes, and it is 100% compatible with Unity 2018.1.
     
    JasonCG, syscrusher, Alcyone and 2 others like this.
  21. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    747
    Excellent, and thanks. (By coincidence, less than 5 minutes ago I had requested that very thing in an email.)

    I also want to acknowledge to "the community" here on the forum that Denis reached out to me by email and is working with me to resolve the problems I reported recently on the forum. If you don't see updates here for a few days, don't conclude he's ignoring my issues; we're working the problem offline.
     
  22. Alcyone

    Alcyone

    Joined:
    Nov 15, 2013
    Posts:
    10
    Thanks @Wright !!

    I am using now 2018.2.0f2, the new official release by Unity, and there is still an error that wasn't in the 2018.1, I would like to let you know just in case it is not fixed in the new release you just submitted, it is very easy to replicate, just import voxeland in a fresh 2018.2 project:

    Assets/Voxeland/Tools/Extensions/Texture2DExtensions.cs(49,25): error CS0122: `UnityEngine.Texture2D.Texture2D(int, int, UnityEngine.Experimental.Rendering.GraphicsFormat, UnityEngine.Experimental.Rendering.TextureCreationFlags, System.IntPtr)' is inaccessible due to its protection level

    It seems to be releated with the mipmap:true parameter in the new Texture2D constructor.

    Thanks for your efforts fighting against the brute force updates of Unity!

     
  23. TalkieTalkie

    TalkieTalkie

    Joined:
    Jul 5, 2012
    Posts:
    116
    I switched to 2018 yesterday so I will be on the same version as Alcyone. I am hoping with this new version, the errors will be gone. Fingers crossed. :D
     
  24. JasonCG

    JasonCG

    Joined:
    Oct 6, 2012
    Posts:
    28
    Unity 2018.2 renamed the Texture2D/Texture2DArray constructor variable mipmap to mipChain, so just changing each line like this:

    From:
    Code (csharp):
    1. Texture2D newTex = new Texture2D(newWidth, newHeight, TextureFormat.ARGB32, mipmap:true, linear:tex.IsLinear());
    to:
    Code (csharp):
    1. Texture2D newTex = new Texture2D(newWidth, newHeight, TextureFormat.ARGB32, mipChain:true, linear:tex.IsLinear());
     
    Alcyone and syscrusher like this.
  25. Alcyone

    Alcyone

    Joined:
    Nov 15, 2013
    Posts:
    10
    Thanks!!
     
  26. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    747
    Sort of unfortunate (though not really anyone's "fault") that the way method signatures work, there isn't really a good way for the old and new to coexist. Possible? Yes, but pretty unclean code, at least the only way I can think of to do it. So I guess Unity opted for short-term pain once rather than crufty code they'd have to deprecate later anyway.
     
    JasonCG likes this.
  27. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,336
    That fix is included in the new version too.
     
    JasonCG and syscrusher like this.
  28. crimsonmortis

    crimsonmortis

    Joined:
    Feb 21, 2016
    Posts:
    58
    NullReferenceException: Object reference not set to an instance of an object
    Voxeland5.TextureArrayDecorator.FindAndSetSource (UnityEngine.Texture2D tex, System.String texPath, Boolean isAlpha) (at Assets/Voxeland/TextureArrayInspector/Main/TextureArrayDecorator.cs:53)
    Voxeland5.TextureArrayInspectorPostprocessor.ReassignTexture (UnityEngine.Texture2D tex, System.String assetPath) (at Assets/Voxeland/TextureArrayInspector/Editor/TextureImporter.cs:51)
    Voxeland5.TextureArrayInspectorPostprocessor.OnPostprocessAllAssets (System.String[] importedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromAssetPaths) (at Assets/Voxeland/TextureArrayInspector/Editor/TextureImporter.cs:18)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets) (at C:/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:130)

    Voxeland 5.3.3 unity 2018.20f2 empty project loads and runs fine though.
     
  29. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,336
    New version (5.3.3) is available at the Asset Store. It brings bug fixes related with the block types and shaders, increases the blocks count to 230 (instead of 64) and Unity 2018.1 and 2018.2 compatibility.

    It would be quite helpful if you could provide some information on how to reproduce this error or at least when it occurs. Thanks!
     
    P_Jong and JasonCG like this.
  30. TalkieTalkie

    TalkieTalkie

    Joined:
    Jul 5, 2012
    Posts:
    116
    Imported the asset into an empty project (same version as Unity front page) and got following errors. Attached the scene, if it helps.

     

    Attached Files:

  31. awalton

    awalton

    Joined:
    Mar 25, 2018
    Posts:
    1
    I've been trying to integrate the play-mode terrain editing scripts from the manual and demo files into my first person character for a few days now, but have been running into the same issue.

    NullReferenceException: Object reference not set to an instance of an object
    VoxelEditor.Update () (at Assets/Main Files/Scripts/Player/VoxelEditor.cs:28)

    Unity keeps pointing to "CoordDir aimCoord = voxeland.PointOut(aimRay);" with this error, and the manual doesn't explain this line of code in detail. What am I doing wrong?

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using Voxeland5;
    5.  
    6. public class VoxelEditor : MonoBehaviour
    7. {
    8.     public Voxeland voxeland;
    9.     public CoordDir prevAimCoord;
    10.     public Camera headcam;
    11.  
    12.     void OnEnable()
    13.     {
    14.         Voxeland voxeland = Voxeland.instances.Any();
    15.         voxeland.grassTypes.selected = -1; voxeland.landTypes.selected = 0; voxeland.objectsTypes.selected = -1;
    16.     }
    17.  
    18.     void Update()
    19.     {
    20.         //reading controls
    21.         bool leftMouse = Input.GetMouseButtonDown(0);
    22.         bool shift = Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift);
    23.         bool alt = Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt);
    24.  
    25.         Ray aimRay = headcam.ScreenPointToRay(Input.mousePosition);
    26.         CoordDir aimCoord = voxeland.PointOut(aimRay);
    27.  
    28.             //getting edit mode
    29.             Voxeland.EditMode editMode = Voxeland.EditMode.none;
    30.         if (leftMouse && !shift && !alt) editMode = Voxeland.EditMode.dig;
    31.         else if (leftMouse && alt) editMode = Voxeland.EditMode.add;
    32.         else if (leftMouse && shift) editMode = Voxeland.EditMode.replace;
    33.  
    34.         //highlight
    35.         if (voxeland.highlight != null)
    36.         {
    37.             if (aimCoord.exists) voxeland.Highlight(aimCoord, voxeland.brush, isEditing: editMode != Voxeland.EditMode.none);
    38.             else voxeland.highlight.Clear(); //clearing highlight if nothing aimed or voxeland not selected
    39.         }
    40.  
    41.         string blockTypeName = "None";
    42.         float blockTypeSpecular = 0;
    43.  
    44.         if (aimCoord.exists)  //i.e. id dir==7
    45.         {
    46.             byte blockTypeNum = voxeland.data.GetBlock(aimCoord.x, aimCoord.y, aimCoord.z);
    47.             BlockType blockType = voxeland.landTypes.array[(int)blockTypeNum];
    48.  
    49.             blockTypeName = blockType.name;
    50.             blockTypeSpecular = blockType.specularM;
    51.         }
    52.  
    53.         if (aimCoord.exists) voxeland.Highlight(aimCoord, voxeland.brush);
    54.         else voxeland.highlight.Clear();
    55.  
    56.         //altering
    57.         if (editMode != Voxeland.EditMode.none && aimCoord.exists)
    58.         {
    59.             voxeland.Alter(aimCoord, voxeland.brush, editMode,
    60.                 landType: voxeland.landTypes.selected,
    61.                 objectType: voxeland.objectsTypes.selected,
    62.                 grassType: voxeland.grassTypes.selected);
    63.         }
    64.  
    65.  
    66.     }
    67. }
     
  32. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    747
    Hmm....Line 28 is a comment!

    I just tried to replicate your error. Empty project, Unity 2018.2f2, fresh download of the latest Voxeland from the Asset Store just now.

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. Voxeland5.TextureArrayDecorator.FindAndSetSource (UnityEngine.Texture2D tex, System.String texPath, Boolean isAlpha) (at Assets/Voxeland/TextureArrayInspector/Main/TextureArrayDecorator.cs:53)
    3. Voxeland5.TextureArrayInspectorPostprocessor.ReassignTexture (UnityEngine.Texture2D tex, System.String assetPath) (at Assets/Voxeland/TextureArrayInspector/Editor/TextureImporter.cs:51)
    4. Voxeland5.TextureArrayInspectorPostprocessor.OnPostprocessAllAssets (System.String[] importedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromAssetPaths) (at Assets/Voxeland/TextureArrayInspector/Editor/TextureImporter.cs:18)
    5. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    6. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    7. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    8. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    9. UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets) (at C:/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:130)
    I'm going to analyze this further and will update this post as I am able to deduce more, but wanted to get the error report out quickly.
     
  33. crimsonmortis

    crimsonmortis

    Joined:
    Feb 21, 2016
    Posts:
    58
    I opened a fresh unity project removed main camera and directional light. Imported Voxeland dropped Voxeland demo scene and that is what I got/
     
  34. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    747
    I found some minor landscape tears between chunks in the Demo Linear scene. This is after loading the scene fresh, no changes of my own. I'm attaching a screenshot. The demo still looks amazing, but I thought you should know about these minor issues. I saw at least two of these, from different boundary areas. "Rebuild" doesn't help, nor does entering and exiting play mode. (Low priority to fix, as far as I'm concerned.)

    voxeland-tear.JPG

    One other tiny detail: You may want to shorten the near clipping plane on the Main Camera in the demo scenes from 0.3 to something like 0.1. If one gets too close to the cave walls during the entry part of the demo, the walls clip and you are staring into the blue void. :) Again, no big deal, and any experienced Unity developer will realize it's not a problem with Voxeland per se, but it's easily fixed.
     
  35. JLO

    JLO

    Joined:
    Nov 11, 2012
    Posts:
    26
    Hi @Wright, I found that having Amplify Shader installed in a project causes Voxeland's texture array inspector not to work correctly. This bug also occurs in the standalone Texture Array Inspector package. Removing AS from the project will fix the inspector, but adding it back will only break it again.

    I'm not exactly sure what causes this, but my best guess is it has something to do with AS's ability to create texture arrays. I would love to see this fixed, as Amplify Shader can only create texture arrays and can't be edited with AS afterwards. Thanks.

    texture array.PNG
     
    Last edited: Jul 15, 2018
  36. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    747
    I have a quick workaround for the null reference exception in TextureArrayDecorator.cs:

    Code (csharp):
    1.         public Texture2D GetPreview (int ch)
    2.         {
    3.             if (srcArr == null) return null;    // LOCAL
    4.             #if UNITY_EDITOR
    The line tagged "// LOCAL" is the one I added, as Line 81 in the actual file.

    After this, Voxeland is working for me in Unity 2018.2.0f2, but I still can't import my own data from the previous version. The asset reference field in the Voxeland editor includes the file in its acceptable list, but when I try to select it, the inspector won't populate its name into the field or load its data.

    I did some further testing and found that with a *new* Voxeland static terrain, I am able to save and load asset files. So I think the environment is working, but there is something amiss with the data format from old to new versions.
     
    P_Jong likes this.
  37. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,336
    It's a seam between voxel terrain and the horizon mesh. If you set fixed terrain in editor and infinite one in playmode then it will not build new chunks in a scene view and will "freeze" all the chunks and horizon mesh on their positions. Turn infinite terrain on in editor in Mode and Ranges to make it rebuild the same way it does in a playmode.

    Ah, here is the thing. Thanks, I will check Voxeland and Texture Array Inspector compatibility with AS.

    Checking for null removes the error, but, actually, it should not be null. It will not work properly this way. Could you please email me your texture array so I will try to find the way to load it?
     
    syscrusher and JLO like this.
  38. PeteMichaud

    PeteMichaud

    Joined:
    Jul 11, 2015
    Posts:
    22
    Just imported the latest into a fresh 2018.1 project, MacOS, got the following:

    INFO
    > Finished updating scripts / assemblies

    INFO
    > MapMagic/Voxeland VOXELAND Compatibility Mode Enabled
    > UnityEngine.Debug:Log(Object)
    > WrGlobalDefineSwitcher:EnableKeyword(String)
    > WrGlobalDefineSwitcher:SetScriptingDefineSymbols()
    > SetScriptingDefineSymbolsClass:.cctor()
    > UnityEditor.EditorAssemblies:processInitializeOnLoadAttributes()

    WARN
    > Shader warning in 'AmbientComputeShader.compute': integer divides may be much slower, try using uints if possible. at kernel CalculateAmbient at AmbientComputeShader.compute(39) (on metal)

    WARN
    > Shader warning in 'AmbientComputeShader.compute': integer divides may be much slower, try using uints if possible. at kernel CalculateAmbient at AmbientComputeShader.compute(40) (on metal)

    ERR
    > ArgumentNullException: Argument cannot be null.
    > Parameter name: key
    > System.Collections.Generic.Dictionary`2[UnityEngine.Transform,System.Collections.Generic.List`1[Voxeland5.ObjectPool+Instance]].Add (UnityEngine.Transform key, System.Collections.Generic.List`1 value) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:391)
    Voxeland5.ObjectPool.OnAfterDeserialize () (at Assets/Voxeland/Main/ObjectPool.cs:339)

    INFO
    > The editor layout could not be fully loaded, this can happen when the layout contains EditorWindows not available in this project
    > UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean)

    INFO
    > MapMagic: VOXELAND Compatibility Mode Disabled
    > UnityEngine.Debug:Log(Object)
    > WrGlobalDefineSwitcher:DisableKeyword(String)
    > WrGlobalDefineSwitcher:OnPostprocessAllAssets(String[], String[], String[], String[])
    > UnityEditor.ProjectBrowser:DeleteSelectedAssets(Boolean)

    WARN
    > Assets/Voxeland/Tools/CustomSerialization.cs(261,167): warning CS0618: `UnityEngine.Keyframe.tangentMode' is obsolete: `Use AnimationUtility.SetLeftTangentMode, AnimationUtility.SetRightTangentMode, AnimationUtility.GetLeftTangentMode or AnimationUtility.GetRightTangentMode instead.'

    WARN
    > Assets/Voxeland/Tools/CustomSerialization.cs(476,9): warning CS0618: `UnityEngine.Keyframe.tangentMode' is obsolete: `Use AnimationUtility.SetLeftTangentMode, AnimationUtility.SetRightTangentMode, AnimationUtility.GetLeftTangentMode or AnimationUtility.GetRightTangentMode instead.'

    INFO
    > Texture Array is not an asset: could not get source tex
    > UnityEngine.Debug:Log(Object)
    > Voxeland5.TextureArrayDecorator:LoadSources() (at Assets/Voxeland/TextureArrayInspector/Main/TextureArrayDecorator.cs:233)
    > Voxeland5.TextureArrayDecorator:.ctor(Texture2DArray) (at Assets/Voxeland/TextureArrayInspector/Main/TextureArrayDecorator.cs:28)
    > Voxeland5.TextureArrayInspectorPostprocessor:ReassignTexture(Texture2D, String) (at Assets/Voxeland/TextureArrayInspector/Editor/TextureImporter.cs:47)
    > Voxeland5.TextureArrayInspectorPostprocessor:OnPostprocessAllAssets(String[], String[], String[], String[]) (at Assets/Voxeland/TextureArrayInspector/Editor/TextureImporter.cs:18)
    > UnityEditor.AssetPostprocessingInternal:postprocessAllAssets(String[], String[], String[], String[], String[])

    INFO
    > Refreshing since texture GreenGrass_nrm.tif is used as it's source
    > UnityEngine.Debug:Log(Object, Object)
    > Voxeland5.TextureArrayInspectorPostprocessor:ReassignTexture(Texture2D, String) (at Assets/Voxeland/TextureArrayInspector/Editor/TextureImporter.cs:49)
    > Voxeland5.TextureArrayInspectorPostprocessor:OnPostprocessAllAssets(String[], String[], String[], String[]) (at Assets/Voxeland/TextureArrayInspector/Editor/TextureImporter.cs:18)
    > UnityEditor.AssetPostprocessingInternal:postprocessAllAssets(String[], String[], String[], String[], String[])

    ERR
    > NullReferenceException: Object reference not set to an instance of an object
    > Voxeland5.TextureArrayDecorator.FindAndSetSource (UnityEngine.Texture2D tex, System.String texPath, Boolean isAlpha) (at Assets/Voxeland/TextureArrayInspector/Main/TextureArrayDecorator.cs:53)
    > Voxeland5.TextureArrayInspectorPostprocessor.ReassignTexture (UnityEngine.Texture2D tex, System.String assetPath) (at Assets/Voxeland/TextureArrayInspector/Editor/TextureImporter.cs:51)
    > Voxeland5.TextureArrayInspectorPostprocessor.OnPostprocessAllAssets (System.String[] importedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromAssetPaths) (at Assets/Voxeland/TextureArrayInspector/Editor/TextureImporter.cs:18)
    > System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    > Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    > System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    > System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    > UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets) (at /Users/builduser/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:27)


    I think I can probably fix the issues, but I thought you should know this is what happened in a clean import!
     
  39. PeteMichaud

    PeteMichaud

    Joined:
    Jul 11, 2015
    Posts:
    22
    Also, I'm seeing extremely variable performance. Fresh project, import voxeland, play the linear demo, and in the initial cave it's silky smooth, around 80 FPS. Once I got above ground it fluctuated between 10 and 70 FPS, mostly on the low end. I am not sure but it seemed to tank when a lot of trees are in view?
     
    P_Jong likes this.
  40. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    6
    Im trying to modify the map, with the brush, put in lakes and rivers, but i need to remove trees in a few areas. Which i can do, but then if i leave the area and come back the trees just regenerate..... help
     
  41. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,336
    I have not checked in 2018.1 on MacOS, but in Windows everything seems to be fine when importing in a clear project. I'll check it on Mac, thanks. Will check shaders too, but cannot promise I'll make them compatible with both high and low end devices. Will think about additional shaders set or replacement shaders or something.

    You've got to lock the generated are by changing any block type in it. Just dig one block somewhere in the area that should be persistent. Note that this is editor-only feature, areas are not saved from the playmode.
     
  42. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    490
    @Wright Is Voxeland chunk loading/unloading triggered by a game object that has a camera or specifically a main camera tag on any game object and the position of that object/character? I'd like to use teleportation Portals but if a character is a great distance away and looks through a portal the Voxeland chunk area doesn't render/load because the character isn't in that area.. maybe assigning a main camera tag to a game object in the area that needs to be loaded to be seen through the portal could work? or is there a better way?
     
  43. P_Jong

    P_Jong

    Joined:
    Jun 14, 2017
    Posts:
    22
    My VR game is published and is on Oculus store "Ghostly Summerwind". I don't have any errors with Voxeland and Unity 2017.3. It took some work with Oculus to meet their requirements on the lower end GPU (Nvidia GTX 970). But after a month I did get the game running at 90 FPS with 33% headroom on the GTX 1070. I don't have a Nvidia GTX 970, but once I got the performance up on my system to that level I did manage to pass their tests and get published. I loved working with Voxeland with my first VR game. It allowed me to make one large scene with caves, crevices, and hills.

    I see there is a new version of Voxeland. I'll give it a go with Unity 2018.2. But I really need it to work with the Lightweight Render Pipeline. Not sure if it will but I'll try.
     
  44. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    747
    Ah, thanks for clarifying. Since it's just in the demo scene and not in my project scene, I'll note your response for my future reference in avoiding the problem. Now I know it's not a VL bug. :)

    Will do. Sorry for the delayed response. For some reason the Unity forums didn't notify me of any updates on this thread until today, almost a week later. :/ Not your fault, of course.
     
  45. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    747
    Could the change by Unity's Texture2D/Texture2DArray variable mipmap to mipChain be the reason why my Voxeland asset file won't migrate from the old to the new version? Is there any way I could export just the *geometry* from the old version, maybe to a JSON or other data file, then reimport it? Repainting the textures wouldn't be a big deal for this particular project, as it's almost all one rock texture.
     
  46. TalkieTalkie

    TalkieTalkie

    Joined:
    Jul 5, 2012
    Posts:
    116

    Is there any update on this or should I just stop bothering with this asset completely?
     
  47. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    747
    I'd counsel patience; the developer is actively working on the asset. I think there's going to need to be another update to completely get past the Unity 2018 issue. It's been a good asset for me other than this update issue, so I'm prepared to allow some time for a fix.
     
    P_Jong likes this.
  48. TalkieTalkie

    TalkieTalkie

    Joined:
    Jul 5, 2012
    Posts:
    116
    This asset not working has been constant issue since Unity 2017 for me. Check my other posts here. Always get some error when importing it into an empty project and that is not normal.

    This is the ONLY asset that does that. Not a single other asset I own has this problem. So yeah, patience is fine and all but it's just starting to annoy me since it happens every single time. I didn't buy an asset to sit and not use it in any of my work. I'll just wait for this next update and if it still doesn't fix anything, I'm done with this.
     
  49. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,336
    What's the reason to wait until the next update? Isn't Voxeland working after logging the error? As far as I can say this is not a compile error and everything should work fine. But I have to admit that console error on import isn't nice. I've fixed it and new version is currently pending Unity review.
     
  50. TalkieTalkie

    TalkieTalkie

    Joined:
    Jul 5, 2012
    Posts:
    116
    No one is going to risk using an asset giving errors in a commercial project. I am not making freeware games for a living in the end.

    That's why I'll wait for an update.