Search Unity

Voxeland - Voxel Terrain Tool

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

  1. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    Probably we can modify it? That sounds to me pretty realistic to apply extra shading after all in that shader (like your ambient feature a lot, don`t want to lose it only because of one line of code). Also maybe you have some recommendations what other shaders we can use to make terrain look even more cool?
     
    Last edited: Jan 12, 2016
  2. Reiika

    Reiika

    Joined:
    Jul 18, 2015
    Posts:
    43
    I think we are misunderstanding each other, I don't know where you got the 94gb quote from. What I am trying to achieve isn't hard at all and shouldn't take much space, using height maps from raw images would be like 250mbs at most. What I am working on I've created before just not with voxelland.

    The only thing I really need access to, to do this is the ability to use an infinite terrain and control manually through code what data is fed into each area and let voxelland handle the rest, so I guess a form of setArea (areaX,areaY) where the areaX areaY points to a single area in voxelland that can be saved or loaded from disk. This should take up a very small amount of data per area and not several gbs from what I understand, NOTE, I am not showing the entire terrain at once just a slice at a time, the concept was the overall map where the colored ares was a small visible section

    Short and simple version
    How do I manually set individual areas on an infinite terrain in voxelland to dynamically create a large world?
     
    Last edited: Jan 12, 2016
  3. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    mm_ASH, I don't know if there are any that can make terrain look cool - personally I'm using modified Voxeland shader in a project I'm working on, and I'm satisfied with it so far. I had requests for implementing RTP, and so I've made it. If you discover some other asset that worth implementing compatibility - feel free to make a request. I cannot promise that I'll make it, but at least I'll see what I can do :)

    Reiika, so you need to save and load individual areas:
    I knew that I've already heard this question recently :)
    Take a closer look at Data file line 1222 and below. You can try something like this to convert area to byte list:
    Code (CSharp):
    1.             public List<byte> SaveAreaToByteList (int areaX, int areaZ)
    2.             {
    3.                 int a = areaZ*100 + areaX; //area num
    4.                 int c = 0; //column num
    5.                 int emptyNum = 0;
    6.              
    7.                 List<byte> byteList = new List<byte>();
    8.  
    9.                 while (c<areas[a].columns.Length)
    10.                 {
    11.                     if (areas[a].columns[c].list.Count == 0)
    12.                     {
    13.                         byteList.Add(252); //empty column, then 2 number of empty columns
    14.                          
    15.                         emptyNum = 0;
    16.                         while (c < areas[a].columns.Length && areas[a].columns[c].list.Count == 0 && emptyNum < 60000)
    17.                             { emptyNum++; c++; }
    18.                          
    19.                         byteList.Add( (byte)(emptyNum / 245) );
    20.                         byteList.Add( (byte)(emptyNum % 245) );
    21.                     }
    22.                     else
    23.                     {
    24.                         //if (a==4950 && c==262191) Debug.Log("Test: " + areas[a].columns[c].list[0] + " " + areas[a].columns[c].list[1] + " " + areas[a].columns[c].list[2] + " " + areas[a].columns[c].list[3]);
    25.                         byteList.Add(251); //ordinary column
    26.                         byteList.AddRange( areas[a].columns[c].list );
    27.                         c++;
    28.                     }
    29.                 }
    30.  
    31.                 return byteList;
    32.             }
    Note that areaX and areaZ are area coordinates (0-15), not terrain columns.
    LoadFromByteList could be modified the same way to load area from list of bytes. And note that area is a struct, so either use it in array like "areas[a]" or do not forget to save it when all parameters are set: "areas[a] = myArea".
    And one more tip: enable 'initialized' attribute after area load, and disable it to turn area off.
     
  4. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    BTW.. half of the year ago (in this forum) you told me:
    "Regarding smoothness: adding one relax iteration maybe will make block structure almost smooth, but I haven't played with it yet."
    Did you have enough time to play with that ? ;););)
     
  5. Varthlokkur

    Varthlokkur

    Joined:
    Aug 9, 2015
    Posts:
    5
    Edits are not taking effect and nothing is saving. Recently ran into this issue tying to save to .asset. Been a while and a few updates of Voxeland since I did any editing/saving so not sure when this may ave started. I cant overwite the current .asset file or make a new .asset file no matter the name I give the .asset or directory I save to.

    I recieve the following errors when using either of the save buttons. The Settings button next to the .asset you drag in to the inspector and the save data asset button at the bottom of the settings rollout.

    Making a change in the editor and then rebuilding is not saving to the .asset.
    Saves persist as long as I am in the same project.
    NEw project or close and reopen Unity and it reverts back the unedited terrain.

    Saving and loading to .txt works saving any edits I make.

    Im using Voxeland 4.32


    Couldn't add object to asset file because the MonoBehaviour 'VoxelandData-World - Copy' is already an asset at 'Assets/Prefabs/Voxeland/MapData/VoxelandData-World - Copy.asset'!
    UnityEditor.AssetDatabase:CreateAsset(Object, String)
    Voxeland.VoxelandEditor:SaveData() (at Assets/Voxeland/Scripts/Editor/VoxelandEditor.cs:913)
    Voxeland.VoxelandEditor:OnInspectorGUI() (at Assets/Voxeland/Scripts/Editor/VoxelandEditor.cs:572)
    UnityEditor.DockArea:OnGUI()

    UnityException: Creating asset at path Assets/Prefabs/Voxeland/MapData/VoxelandData.asset failed.
    Voxeland.VoxelandEditor.SaveData () (at Assets/Voxeland/Scripts/Editor/VoxelandEditor.cs:913)
    Voxeland.VoxelandEditor.OnInspectorGUI () (at Assets/Voxeland/Scripts/Editor/VoxelandEditor.cs:572)
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1231)
    UnityEditor.DockArea:OnGUI()
     
  6. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Varthlokkur, try these scripts (just replace already existing ones). Note that since you are saving your data to asset file it is saved when you click "File -> Save Project", it is not necessary to overwrite it.

    mm_ASH, one more smoothness iteration will really make terrain smoother. But it will make holes on chunk borders, so margins setting should be increased.
     
    jovino likes this.
  7. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    Well personally I can live with such trade off. So what is your decision?
     
  8. Varthlokkur

    Varthlokkur

    Joined:
    Aug 9, 2015
    Posts:
    5
    Thanks I forgot that part.

    I was just rebuilding using CTRL-S and saving the scene not the project. So it was not saving. I know I knew that last year when I was making and editing terrain.
     
  9. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    mm_ASH, I think I'll bind relax iterations as a setting in next version. If anybody want it right now he can modify Chunk script
     
  10. AdanGrotesco

    AdanGrotesco

    Joined:
    Sep 26, 2015
    Posts:
    33
    I can find the correct way to ad smooth iterations on the chunk script. Can you be more specific?
     
  11. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    It will be nice, thank you
     
  12. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    AdanGrotesco, mm_ASH, you can try adding iterative relax to see if it worth it. 10 iteration looks very smooth for sure, but mind the performance and the terrain grid regularity.

    Replace all the Relax2 region in Chunk.cs with this one:
    Code (CSharp):
    1.             #region Relax 2
    2.             if (land.profile) Profiler.BeginSample ("Relax 2");
    3.  
    4.             for (int r=0; r<10; r++)
    5.             {
    6.                 Vector3[] relaxed = new Vector3[verts.Length];
    7.                 processed = new bool[verts.Length];
    8.  
    9.                 //corners - smoothing on base level
    10.                 for (int f=0; f<faces.Length; f++)
    11.                 {
    12.                     for (int c=0; c<4; c++)
    13.                     {
    14.                         int cornerNum = faces[f].cornerNums[c];
    15.                         if (processed[cornerNum]) continue;
    16.                         if (boundary[cornerNum]) { relaxed[cornerNum] = verts[cornerNum]; processed[cornerNum] = true; continue; }
    17.                  
    18.                         relaxed[cornerNum] = GetSmoothedCorner(f,c,verts); //smoothing as usual
    19.  
    20.                         processed[cornerNum] = true;
    21.                     }
    22.                 }
    23.          
    24.                 for (int f=0; f<faces.Length; f++)
    25.                 {
    26.                     //sides - setting average value between corners
    27.                     for (int s=0; s<4; s++)
    28.                     {
    29.                         int sideNum = faces[f].sideNums[s];
    30.                         if (processed[sideNum]) continue;
    31.                         if (boundary[sideNum]) { relaxed[sideNum] = verts[sideNum]; processed[sideNum] = true; continue; }
    32.                  
    33.                         else relaxed[sideNum] = (verts[ faces[f].cornerNums[s] ] + verts[ faces[f].cornerNums[s+1] ] +
    34.                                 verts[ faces[f].centerNum ] + verts[ faces[faces[f].neigFaceNums[s] ].centerNum]) / 4f;
    35.                  
    36.                         processed[sideNum] = true;
    37.                     }
    38.              
    39.                     //center - between four sides
    40.                     relaxed[ faces[f].centerNum ] = (verts[ faces[f].sideNums.a ] + verts[ faces[f].sideNums.c ] +
    41.                                                      verts[ faces[f].sideNums.b ] + verts[ faces[f].sideNums.d ]) / 4f;
    42.                 }
    43.      
    44.                 verts = relaxed;
    45.             }
    46.          
    47.             if (land.profile) Profiler.EndSample ();
    48.             #endregion
    where r = the additional relax counter (Relax 1 is the base relax, it is slightly different).

    I will keep this code and expose the maximum r value in the settings in new version anyways - just in case.
     
    doublegumbo likes this.
  13. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    It`s looks just perfect!
    Maybe in future you will implement kind of smart filtering to preserve sharp details and blur wide flat areas ... but any way such smoothed surface is just a dream =)

    PS: to implement context-dependent applying of smoothing we can use amout of voxels around current voxel or use voxel type smoothing e.g. for grass r=10 and for cliffs r=5
     
    Last edited: Feb 1, 2016
  14. bobobaribu

    bobobaribu

    Joined:
    Mar 6, 2015
    Posts:
    4
    Hi there,

    I found a bug, you use aimRay instead of ray in your PointOut method (so it always uses the mouse instead of a ray)
    Hope this helps ;)

    B[o
     
  15. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    I'm having an issue trying to integrate RTP 3.3 following the instructions - there is no material labeled "ReliefTerrianPMTriplanarStandalone" in RTP 3.3 the shader with the name exists. Instead of the material name described in the instructions there is still the shader to edit "ReliefTerrainVertexBlendTriplanar". It seems that with the latest RTP there is more code and line # 326 to comment out is now found at line# 506
    326: #define
    WNORMAL_COVERAGE_X_Z_Ypos_Yneg . To comment the line add // int the
    beginning: //#define WNORMAL_COVERAGE_X_Z_Ypos_Yneg

    I don't know if I'm setting this up properly or if there is another Voxeland update coming to resolve this.. even though the line to comment out seems to be at 506, but after commenting it out I still get the error message stating that line 326 has to be commented.
     
    Last edited: Feb 3, 2016
  16. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    bobobaribu, ups... thanks for your bug report.

    mm_ASH, that's the way it was made in early versions, but I had to abandon it because of performance reason.

    Ascensi, I was not aware what's going on in new rtp versions since I don't use it in my project, but I'll update it and have a look. If the compatibility is still available it will be fixed in new version.
     
  17. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    yep, I remember that times ) From my point it is worth to wait for better results in baked scenes (any way most of developers will bake lightning + occlusion + navmesh).
     
    Last edited: Feb 4, 2016
  18. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @Write thanks for looking into a fix for use with the new RTP! Also just wondering if Voxeland is currently compatible with MP Tessellation? Lastly can Voxeland be made to support Substance materials? or is it automatically handled through RTP?

    Update: so I discovered that the new Voxel Terrain does work with Substance Textures and it seems as though it does work with RTP PM Tessellation although the compatibility might need to be fixed to work better. I don't know if it's possible but it would be cool if displacement maps with fine tuning could also be used for every channel so that if you have rock, sand bar, forest ground textures that are raised from the otherwise flat surface.
     
    Last edited: Feb 6, 2016
  19. Mayvis_games

    Mayvis_games

    Joined:
    Jan 9, 2016
    Posts:
    2
    Hello, Wright. Was wondering what is the best way to get in contact with you in regards to your terrain engine. We are looking at it with great hopes and have a few questions that we would like to run by you before you make a final decision.

    Thanks in advance,
    Sincerely, all of us at Mayvis Games.
     
  20. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    You can email me at mail@denispahunov.ru or ask questions here on forum, I'll gladly answer them anyway. And I usually provide an interested buyer with a fully functional demo version, so you can test it and find out if it suits your needs before a purchase.
     
  21. Mayvis_games

    Mayvis_games

    Joined:
    Jan 9, 2016
    Posts:
    2
    Mr. Wright, we had attempted an email roughly a week ago. We will try to forward the email again, and again we are extremely interested in your terrain engine keep up the amazing work. We hope to hear back from you soon.

    Thank you again,
    Sincerely, All of us here at Mayvis Games.
     
  22. doublegumbo

    doublegumbo

    Joined:
    Oct 24, 2013
    Posts:
    53
    Alas! I can't get the voxeland terrain to recognize my texture fields when I replace the code as instructed above for smoothing - it only uses the top texture for that terrain. Is there a workaround here? Otherwise LOVING the smoother terrain.

    -g

    BEFORE (block-ier, but uses all terrain)
    (ps... the item in the bottom right is a rock mesh, please disregard that!)



    AFTER (smoother but reverts only to top slot of terrain :( :( :( :( )




     
  23. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    Hi! Any estimations about next update? Really waiting for this smoothing / relaxing per block type feature:)

    Also seems I found some problem with Voxeland\Nature shader. Does it use Light Probes at all? Any ideas how can I fix that?
     
    Last edited: Feb 19, 2016
    doublegumbo likes this.
  24. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @Wright working with the new RTP and the error of line 26 in ReliefTerrainPMTriplanarStandalone shader (#define_WNORMAL_COVERAGE_X_Z_Ypos_Yneg) I've discovered I can still work with RTP on some level but I can no longer paint the textures, I can only deform -add/subtract in the terrain.
     
    doublegumbo likes this.
  25. atmosfearteam

    atmosfearteam

    Joined:
    Nov 10, 2015
    Posts:
    42
    Are there any plans to include more complex things in the terrain generation, like caves and overhangs and such?

    Or if not, is there any sort of guides or documentation for adding such things to the generator's code ourselves?

    Thanks!
     
  26. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    I`ve extended code of generator a little bit to support external plugins (to get shader-like framework). Use it now for generating floating islands.
    If you are interested in details I can share this code.
     
  27. AdanGrotesco

    AdanGrotesco

    Joined:
    Sep 26, 2015
    Posts:
    33
    +1.

    A shot documentation about the correct way to implement other noise or functions will be so helpfull.
     
  28. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I would be interested in this
     
  29. atmosfearteam

    atmosfearteam

    Joined:
    Nov 10, 2015
    Posts:
    42
    I might be interested in this as well. :)
     
  30. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358




     
    Last edited: Feb 20, 2016
  31. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    Sources could be downloaded here
    0. Voxeland sources must be modified a bit (instructions in a text file in archive)
    1. Create Under your Voxeland root game object some Plugins holder GameObject (In my demo Island4 has Voxeland component on it)
    2. Attach plugins you like (I made 2 - Foating islands & Cutting Volume)
    3. Under this game object you can create many gameobjects which will contain information about helper points for this plugins (list of cutting volumes to remove geometry inside or list of floating island points for conic cutting from botton)
    4. Just for convinience each plugin has ReGenerate button wich clear all chunk information and generate it again with new settings (pretty much the same of what does button "Generate Selected area" in Voxeland component)
    5. After that some manual polishment could be done to remove alone-floating voxels =)
     
  32. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    Interface of plugins is pretty simple. It`s kind of post processing for each generated chunk.
    Code (CSharp):
    1. public abstract class VoxelandGeneratorPlugin : MonoBehaviour
    2. {
    3. ...
    4.     protected abstract void ApplyToColumn(VoxelandTerrain voxeland, Matrix2<float> heightmap, Data data, int x, int z);
    5.  
    6.     protected abstract void SetupData(VoxelandTerrain voxeland, Matrix2<float> heightmap, Data data);
    7. ...
    8.  
     
    Last edited: Feb 21, 2016
  33. atmosfearteam

    atmosfearteam

    Joined:
    Nov 10, 2015
    Posts:
    42
    That looks pretty cool! I will give it a try and see what I can do with it. Thanks so much! :)

    I had another unrelated issue... Why is it so laggy when modifying terrain at runtime? It's laggy both in the editor and the built client. And this is the demo scene even! However the official web demo doesn't seem to have this issue. Is there a setting I'm missing somewhere or something? Just moving around the terrain and such is fine, but when I try to modify it (either add or remove blocks) it is really laggy. Like it goes down to just a couple fps until I stop modifying things.

    EDIT: I'm also having an issue when trying to customize things in a custom scene. I basically copied the code from the demo scene. I changed it so I have a custom Ray that I am passing to the PointOut() function, but it is not properly making the block at the collision point of that ray the block that is edited. Instead the block that is edited is always under the mouse wherever it is on the screen. Is there a way to fix that?
     
    Last edited: Feb 21, 2016
  34. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    Added also very simple cave generator plugin.
    You need to setup list of control points, using scale as radius of cutting sphere.
     
  35. 10074405

    10074405

    Joined:
    Apr 29, 2014
    Posts:
    5
    @Wright Quick Q, is there a way to modify the height of the grass?
    I noticed in VoxelandTerrain.cs there's a class "VoxelandGrassType" that contains height and width yet from all accounts Width/Height are never accessed anywhere? I wondered if I could make adjustments anywhere i.e have it random heights to get a more organic feel.
     
  36. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    I have a specific use case was curious if there would be any issues with this.

    So I don't want to use voxels for the terrain itself. I currently have an underground building system where I use cubes. Where they meet the terrain I deform them to the heightmap, cut hole in the terrain. As you dig down it builds out a cube structure around you.

    I'd like to just replace the digging system itself with a real voxel system. My thought was use the same approach really, but was wondering if the Voxeland api gives me the hooks to do this. For example I need to make the voxels mold to the terrain. So if you start to dig at a spot, I would create a rectangular area filled with voxels that molds to the terrain height.

    Any obvious issues that might be a problem here?
     
  37. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    mm_ASH, Great job! I fully support your endeavor, and will try to help wherever its possible. I'll start with applying required changes in the original Voxeland source files to make your editor installation seamless for the next Voxeland version. If you have any further requests for the changes - feel free to email me at mail@denispahunov (or contact me via skype: akawraith).

    10074405, you can use a custom grass mesh which has a desired height (as well as topology, uvs, etc).

    atmosfearteam, tell me if I've got this straight. You've got lags in a demo scene that shipped with Voxeland (right after you open it and do not change any settings), but web demo has no such a lags. What is your Unity version?

    There's been a bug report for that:
    It will be fixed in next version, for now you can fix PointOut function manually.

    snacktime, Voxeland was not designed to use with the standard terrains. You either use Voxeland, or use the standard terrain. There were users here on forums who were going to blend two terrains, but I don't know if they succeeded.
     
    Last edited: Feb 23, 2016
    10074405 likes this.
  38. 10074405

    10074405

    Joined:
    Apr 29, 2014
    Posts:
    5
    @Wright I meant if we have "Height" and "Width" variables are they used or are they redundant? If they're used somewhere (not that I can see?) can you point me in the direction of where they are used? if not, where about is the grass mesh sized?
     
  39. atmosfearteam

    atmosfearteam

    Joined:
    Nov 10, 2015
    Posts:
    42
    Yes, that is correct. I was testing the vanilla demo scene with no changes at all. My Unity version is 5.3.2p3. I guess I didn't consider that it could be that I am using a patch release. Just everything else is smooth with no errors so I guess that's why I assumed it to be a Voxeland issue.

    Oh alright, I wasn't aware of that. But that's great to hear. Thanks!
     
  40. atmosfearteam

    atmosfearteam

    Joined:
    Nov 10, 2015
    Posts:
    42
    @Wright I had another question too. What layer is the Voxeland terrain on? And, can I set what layer it goes on? I tried setting the layer for the Voxeland GameObject but that doesn't seem to affect the actual terrain. I want to be able to set what can and cannot collide with the actual terrain collider. Thanks!
     
  41. doublegumbo

    doublegumbo

    Joined:
    Oct 24, 2013
    Posts:
    53
    edit: In my last build log I noticed this error:

    Shader error in 'Voxeland/Standard': Program 'frag_surf', error X4510: maximum number of samplers exceeded. ps_3_0 target can have a maximum of 16 samplers (on d3d9)

    Has this ever happened to your voxeland object during a build?: The textures revert to the first texture and it completely glitch out on the Voxeland game object shader.

    Things I've tried:

    Getting rid of unnecessary shaders
    Re-importing the Voxeland asset.
    Making new Voxeland objects.
    Deleting items in the voxeland texture map.
    Baking the Voxeland into an asset in the Voxeland settings.

    No luck on all counts.

    to demonstrate what I'm talking about, check this image comparison:

    The Voxeland graphics in-editor:



    The Voxeland graphics in the standalone build:



    Any ideas? I'd post error logs but I'd need to know what to look for. thanks!

    -g
     
    Last edited: Feb 25, 2016
  42. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    10074405, what is you Voxeland version? I cannot find grass "Width" and "Height" values in the last one, but I do remember that they existed in the past.

    gumbomasta, how many block types you are using? Try DX11 shader. Don't know if it will help, but at least it's something to start with.
    The wierd thing that it works in editor, that is using the same shader. Maybe there is some build parameter that I don't know. Are you using the standalone build for windows x86_64?

    atmosfearteam, could you please turn on editor profile and note UpdateSceneIfNeeded -> BehaviourUpdate -> VoxelandTerrain.Update time and the number of calls?
    I could reproduce the layer bug, I'll fix it.
     
  43. atmosfearteam

    atmosfearteam

    Joined:
    Nov 10, 2015
    Posts:
    42
    I didn't find UpdateSceneIfNeeded (maybe I missed it), but I did grab a screenshot of the profiler with one of the spikes highlighted. Each spike is when I clicked in-game to modify the terrain.

    profiler.png

    Thanks for all the help!
     
  44. 10074405

    10074405

    Joined:
    Apr 29, 2014
    Posts:
    5
    @Wright Latest version straight from the asset store as far as I am aware, Code as shown here Untitled-1.png

    Inside VoxelandTerrain.cs - Basically I wanted to just randomize the height/width of the grass being generated so you get variation as shown below (Acheived by using 3 meshes at 3 different sizes, hand placed) which individually looks OK but in a cluster it appears to have a very organic and unique effect as shown in below also.
    Untitled-2.png Untitled-1.png
     
  45. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    atmosfearteam, It seems like everything works as it should. You can speed up a build process by reducing chunk size and turning off ambient occlusion.

    10074405, there really was a hard-coded grass mesh in previous versions, but I decided that a custom mesh is preferable. These values were left in code for some compatibility reasons (but can't say certainly without examining the code).
    You are using Unity 5, aren't you?
     
    10074405 likes this.
  46. 10074405

    10074405

    Joined:
    Apr 29, 2014
    Posts:
    5
    Yep I'm using U5.3.2 - If that's the case I'll see if I can write a plug in or modify the original code somewhere to randomize through the Grass List
     
  47. atmosfearteam

    atmosfearteam

    Joined:
    Nov 10, 2015
    Posts:
    42
    @Wright I reduced the chunk size from 30 to 16 but that didn't seem to help at all. Does the demo scene have ambient occlusion enabled? Because the demo scene is what I'm using. I haven't modified anything until just now by changing the chunk size.

    UPDATE: It turns out me setting the chunk size didn't actually take effect because the values were not saved in the component for some reason. I had to set the values I wanted, copy the component, delete the existing one, and then paste the copy as a new component. Then I saved the scene and it actually kept the values I set. So it seems maybe there is an bug/issue with saving the Voxeland component settings? Is this an known issue already? But anyway, changing the chunk size to 16 and turning off the AO did seem to help a little. It still has some lag spikes but it's a bit better.
     
    Last edited: Mar 3, 2016
  48. atmosfearteam

    atmosfearteam

    Joined:
    Nov 10, 2015
    Posts:
    42
    @Wright Another question... Is it possible to change the shape of the terrain that is removed or added? Like now it kinda seems spherical. Would it be possible to make it a cube? So like it digs out a perfect cube shape and places a cube shape? I tried unchecking Spherify in the Voxeland settings, but I don't think it worked how I was thinking.
     
  49. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @Wright is it possible to keep a block area (transfer old terrain data) that's been generated but allow the import of a much larger heightmap to exist with the old terrain data? I have a nice area created but want to import a heightmap of a different terrain to appear out side the old/original... is this currently possible or would it overwrite the whole terrain? It would be an amazing feature to have to keep locked areas(old terrain data sections) then import heightmaps between them. This if it works would seem like it would make Voxeland a step closer to having its own stamping system.
     
    Last edited: Mar 9, 2016
  50. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Glad to inform that since Map Magic plugin was released I started implementing it's support in Voxeland. Thought it will not be available in the next version (the upcoming release will just fix all the bugs accumulated), it will implemented in a version after it.

    atmosfearteam, currently there is no way to determine smoothing of each block type separately. Either all of the terrain is smooth, or - after commenting out a some lines in code - all the terrain is made of blocks like in Minecraft.

    Ascensi, I was thinking about a stamping system. It is more convenient in use than loading heightmaps in some areas without changing the others. But I plan to do it in a form of stamp brush, so copy areas should not be too big - lesser than a hundred of units or so.
     
    Ascensi likes this.