Search Unity

Terrain Composer2 a next generation GPU powered terrain tool.

Discussion in 'Assets and Asset Store' started by eagle555, Sep 16, 2012.

  1. Lecht

    Lecht

    Joined:
    Jul 1, 2014
    Posts:
    24
    Any eta on 2018 support..?
     
  2. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    I suggest emailing the developer, he has been super busy with a game he is making..
     
  3. Lecht

    Lecht

    Joined:
    Jul 1, 2014
    Posts:
    24
    I have emailed him, a few weeks ago with no reply.
     
    Andrey123456789 likes this.
  4. ElliomanGames

    ElliomanGames

    Joined:
    Jul 26, 2016
    Posts:
    14
    Also had this issue yesterday after updating to Unity2018.1.

    In the 2018.1 release notes they mention this change:
    Shaders: ComputeShader.Dispatch now validates if all the properties are valid.
    So Unity will not run compute shaders if there are properties not set before running Dispatch and that's exactly what's happening here. After looking at the code in TerrainComposer I believe I've managed to fix the issue. in TC_Compute.cs find the function SetComputeCurve(...).

    Try changing the function to this:
    Code (CSharp):
    1. void SetComputeCurve(string name, int kernel, Curve curve, ref ComputeBuffer curveCalc, ref ComputeBuffer curveKeys)
    2. {
    3.     if (curve.length == 0)
    4.     {
    5.         curveCalc = new ComputeBuffer(1, 16);
    6.         curveKeys = new ComputeBuffer(1, 4);
    7.     }
    8.     else
    9.     {
    10.         curveCalc = new ComputeBuffer(curve.c.Length, 16);
    11.         curveKeys = new ComputeBuffer(curve.curveKeys.Length, 4);
    12.  
    13.         curveCalc.SetData(curve.c);
    14.         curveKeys.SetData(curve.curveKeys);
    15.     }
    16.  
    17.     shader.SetBuffer(kernel, name + "CurveKeys", curveKeys);
    18.     shader.SetBuffer(kernel, name + "CurveCalc", curveCalc);
    19.     shader.SetInt(name + "CurveKeysLength", curve.length);
    20.     shader.SetVector(name + "CurveRange", new Vector3(curve.range.x, curve.range.y, curve.range.y - curve.range.x));
    21. }
     
    gecko, cym_hellfire, hopeful and 3 others like this.
  5. bgrz

    bgrz

    Joined:
    Mar 22, 2015
    Posts:
    59
    I'm importing height and splat data from existing files, how to lock them together so that moving one also moves the other?
     
  6. SwdPwnzDggr

    SwdPwnzDggr

    Joined:
    Jun 25, 2013
    Posts:
    3
    Works perfectly so far!
     
    hopeful likes this.
  7. SwdPwnzDggr

    SwdPwnzDggr

    Joined:
    Jun 25, 2013
    Posts:
    3

    Working with it more, there are still tons of issues that all start from this change. Every single time Dispatch is now called there is an error, and SetComputeCurve isn't always called. Even if you do set it up to be called there are other issues that are not solved. Like:

    Code (CSharp):
    1. Property (leftSplatmap2) at kernel index (58) is not set
    2. UnityEngine.ComputeShader:Dispatch(Int32, Int32, Int32, Int32)
    3. TerrainComposer2.TC_Compute:RunComputeMultiMethod(TC_ItemBehaviour, Boolean, RenderTexture[]&, ComputeBuffer, RenderTexture) (at Assets/TerrainComposer2/Scripts/Generate/TC_Compute.cs:983)
    4. TerrainComposer2.TC_Layer:ComputeMulti(RenderTexture[]&, ComputeBuffer&, Single, Boolean) (at Assets/TerrainComposer2/Scripts/Nodes/TC_Layer.cs:91)
    5. TerrainComposer2.TC_LayerGroupResult:ComputeMulti(RenderTexture[]&, Single, Boolean, Boolean) (at Assets/TerrainComposer2/Scripts/Nodes/TC_LayerGroupResult.cs:146)
    6. TerrainComposer2.TC_LayerGroup:ComputeMulti(RenderTexture[]&, ComputeBuffer&, Single, Boolean) (at Assets/TerrainComposer2/Scripts/Nodes/TC_LayerGroup.cs:69)
    7. TerrainComposer2.TC_Generate:ComputeSplat(Rect) (at Assets/TerrainComposer2/Scripts/Generate/TC_Generate.cs:1266)
    8. TerrainComposer2.TC_Generate:Compute(TCUnityTerrain, Int32, Rect) (at Assets/TerrainComposer2/Scripts/Generate/TC_Generate.cs:268)
    9. TerrainComposer2.TC_Generate:RunGenerateStack() (at Assets/TerrainComposer2/Scripts/Generate/TC_Generate.cs:250)
    10. TerrainComposer2.TC_Generate:MyUpdate() (at Assets/TerrainComposer2/Scripts/Generate/TC_Generate.cs:208)
    11. UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
     
    Andrey123456789 likes this.
  8. LevonRavel

    LevonRavel

    Joined:
    Feb 26, 2014
    Posts:
    179
    Trying to figure out how to smoothen my terrain, Then add in more detail later.. Here is my height map currently

    upload_2018-5-11_12-3-4.png

    as you can see its bumpy / blockish any ideas on how to fix this? Also I imported the height map over from Map Magic here is how the terrain is suppose to look.

    upload_2018-5-11_12-5-9.png

    also my splats are not working not sure whats going on

    upload_2018-5-11_14-7-22.png
     
    Last edited: May 11, 2018
  9. Bingobuzzard

    Bingobuzzard

    Joined:
    Feb 5, 2017
    Posts:
    9
    I too, am having the same issue as SwdPwnzDggr. I've tried the fix by ElliomanGames, which worked for adding a noise layer, but later broke when trying to add a mask.

    I got the following error:
    Code (CSharp):
    1. Property (worldCurveKeys) at kernel index (51) is not set
    2. UnityEngine.ComputeShader:Dispatch(Int32, Int32, Int32, Int32)
    3. TerrainComposer2.TC_Compute:RunComputeMethod(TC_GroupBehaviour, TC_ItemBehaviour, ComputeBuffer, ComputeBuffer&, Int32, RenderTexture, ComputeBuffer) (at Assets/TerrainComposer2/Scripts/Generate/TC_Compute.cs:1157)
    4. TerrainComposer2.TC_Layer:ComputeHeight(ComputeBuffer&, ComputeBuffer&, Single, Boolean) (at Assets/TerrainComposer2/Scripts/Nodes/TC_Layer.cs:46)
    5. TerrainComposer2.TC_LayerGroupResult:ComputeSingle(Single, Boolean) (at Assets/TerrainComposer2/Scripts/Nodes/TC_LayerGroupResult.cs:57)
    6. TerrainComposer2.TC_LayerGroup:ComputeSingle(ComputeBuffer&, Single, Boolean) (at Assets/TerrainComposer2/Scripts/Nodes/TC_LayerGroup.cs:29)
    7. TerrainComposer2.TC_Generate:ComputeHeight(Rect) (at Assets/TerrainComposer2/Scripts/Generate/TC_Generate.cs:1041)
    8. TerrainComposer2.TC_Generate:Compute(TCUnityTerrain, Int32, Rect) (at Assets/TerrainComposer2/Scripts/Generate/TC_Generate.cs:267)
    9. TerrainComposer2.TC_Generate:GenerateOutput(TCUnityTerrain, Int32, Boolean, Rect) (at Assets/TerrainComposer2/Scripts/Generate/TC_Generate.cs:498)
    10. TerrainComposer2.TC_Generate:GenerateHeight(TCUnityTerrain, Boolean, Rect, Boolean) (at Assets/TerrainComposer2/Scripts/Generate/TC_Generate.cs:518)
    11. TerrainComposer2.TC_Generate:Generate(TCUnityTerrain, Boolean, Rect) (at Assets/TerrainComposer2/Scripts/Generate/TC_Generate.cs:440)
    12. TerrainComposer2.TC_Generate:Generate(Boolean, Rect, Int32) (at Assets/TerrainComposer2/Scripts/Generate/TC_Generate.cs:414)
    13. TerrainComposer2.TC_Generate:MyUpdate() (at Assets/TerrainComposer2/Scripts/Generate/TC_Generate.cs:186)
    14. UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
    15.  

    I thought this my help you diagnosis of the problem further.
     
    Andrey123456789 likes this.
  10. Deleted User

    Deleted User

    Guest

    height map: you need to use/export raw height map files, drag that file into the TerrainComposer/examples/stamps/raw directory[choose one that fits] ....now you are using an image range, and may be low resolution.
    Splat Textures: you need to click on the plus sign, to activate a splat mask (exported ??)

    hope that helps..
    p-
     
    Last edited by a moderator: May 12, 2018
  11. MA-Rob

    MA-Rob

    Joined:
    Sep 10, 2014
    Posts:
    85
    2018.1 Quick Fix - the textures and buffers need to be initialized to an arbitrary value.

    Replace lines from the methods "OnEnable" through "OnDestroy" in TC_Compute.cs with the following:

    Code (CSharp):
    1.  
    2.         ComputeBuffer nullBuffer;
    3.  
    4.         static string[] s_RWTexture2DNames = {
    5.             "resultTex",
    6.             "terrainTex",
    7.             "splatmap0",
    8.             "splatmap1",
    9.             "splatmap2",
    10.             "splatmap3",
    11.             "splatPreviewTexClone",
    12.             "splatPreviewTex",
    13.             "previewTex",
    14.             "previewTex2",
    15.         };
    16.  
    17.         static string[] s_Texture2DNames = {
    18.             "resultTexRead",
    19.             "terrainTexRead",
    20.             "leftPreviewTex",
    21.             "rightPreviewTex",
    22.             "rightSplatmap0",
    23.             "rightSplatmap1",
    24.             "rightSplatmap2",
    25.             "rightSplatmap3",
    26.             "leftSplatmap0",
    27.             "leftSplatmap1",
    28.             "leftSplatmap2",
    29.             "leftSplatmap3",
    30.             "tex1",
    31.             "tex1b",
    32.             "tex2b",
    33.         };
    34.  
    35.         static string[] s_StructuredBufferNames = {
    36.             "resultBuffer",
    37.             "itemMapBuffer",
    38.             "itemColorBuffer",
    39.             "itemIndexBuffer",
    40.             "rightBuffer",
    41.             "maskBuffer",
    42.             "rightItemMapBuffer",
    43.             "splatMixBuffer",
    44.             "colorMixBuffer",
    45.             "localCurveKeys",
    46.             "localCurveCalc",
    47.             "localGroupCurveKeys",
    48.             "localGroupCurveCalc",
    49.             "worldCurveKeys",
    50.             "worldCurveCalc",
    51.         };
    52.  
    53.         // TODO: Only set shader parameters that really need to be set and aren't set already
    54.         void OnEnable()
    55.         {
    56.             instance = this;
    57.  
    58.             methodKernel = new int[9];
    59.             methodTexKernel = new int[9];
    60.             colorMethodTexKernel = new int[9];
    61.             // multiMethodKernel = new int[9];
    62.             multiMethodTexKernel = new int[9];
    63.  
    64.             noisePerlinKernel = new int[12];
    65.             noiseBillowKernel = new int[12];
    66.             noiserRidgedKernel = new int[12];
    67.             noisePerlin2Kernel = new int[3];
    68.             noiseBillow2Kernel = new int[3];
    69.             noiseRidged2Kernel = new int[3];
    70.             noiseIQKernel = new int[3];
    71.             noiseSwissKernel = new int[3];
    72.             noiseJordanKernel = new int[3];
    73.  
    74.             calcSplatKernel = new int[4];
    75.             normalizeSplatKernel = new int[4];
    76.  
    77.             nullBuffer = new ComputeBuffer(1, 4);
    78.  
    79.             TC_Reporter.Log("Init compute");
    80.             TC_Reporter.Log(methodKernel.Length + " - " + methodTexKernel.Length);
    81.          
    82.             string method;
    83.  
    84.             for (int i = 0; i < 9; i++)
    85.             {
    86.                 method = ((Method)i).ToString();
    87.                 methodKernel[i] = InitializeKernel("Method" + method);
    88.                 methodTexKernel[i] = InitializeKernel("MethodTex" + method);
    89.  
    90.                 // multiMethodKernel[i] = shader.FindKernel("MultiMethod" + method);
    91.                 multiMethodTexKernel[i] = InitializeKernel("MultiMethodTex" + method);
    92.                 colorMethodTexKernel[i] = InitializeKernel("ColorMethodTex" + method);
    93.                 // Reporter.Log(methodKernel[i] + ", " + methodTexKernel[i]+ " "+((Method)i).ToString());
    94.                 // TC_Reporter.Log(multiMethodKernel[i] + ", " + multiMethodTexKernel[i] + " " + ((Method)i).ToString());
    95.                 // Debug.Log(colorMethodTexKernel[i]);
    96.             }
    97.  
    98.             // Debug.Log(noiseBillowKernel.Length);
    99.  
    100.             for (int i = 1; i < noisePerlinKernel.Length + 1; i++)
    101.                 noisePerlinKernel[i - 1] = InitializeKernel("NoisePerlin" + i.ToString());
    102.  
    103.             for (int i = 1; i < noiseBillowKernel.Length + 1; i++)
    104.                 noiseBillowKernel[i - 1] = InitializeKernel("NoiseBillow" + i.ToString());
    105.  
    106.             for (int i = 1; i < noiserRidgedKernel.Length + 1; i++)
    107.                 noiserRidgedKernel[i - 1] = InitializeKernel("NoiseMultiFractal" + i.ToString());
    108.  
    109.             for (int i = 0; i < 3; i++)
    110.             {
    111.                 noisePerlin2Kernel[i] = InitializeKernel("NoisePerlin" + Enum.GetName(typeof(NoiseMode), i + 1));
    112.                 noiseBillow2Kernel[i] = InitializeKernel("NoiseBillow" + Enum.GetName(typeof(NoiseMode), i + 1));
    113.                 noiseRidged2Kernel[i] = InitializeKernel("NoiseRidged" + Enum.GetName(typeof(NoiseMode), i + 1));
    114.                 noiseIQKernel[i] = InitializeKernel("NoiseIQ" + Enum.GetName(typeof(NoiseMode), i + 1));
    115.                 noiseSwissKernel[i] = InitializeKernel("NoiseSwiss" + Enum.GetName(typeof(NoiseMode), i + 1));
    116.                 noiseJordanKernel[i] = InitializeKernel("NoiseJordan" + Enum.GetName(typeof(NoiseMode), i + 1));
    117.             }
    118.             for (int i = 0; i < 4; i++)
    119.             {
    120.                 int index = (i + 1) * 4;
    121.                 calcSplatKernel[i] = InitializeKernel(shader.FindKernel("CalcSplat" + index.ToString()));
    122.                 normalizeSplatKernel[i] = InitializeKernel(shader.FindKernel("NormalizeSplat" + index.ToString()));
    123.             }
    124.             noiseCellNormalKernel = InitializeKernel("NoiseCellNormal");
    125.             noiseCellFastKernel = InitializeKernel("NoiseCellFast");
    126.          
    127.             colorMethodTexLerpMaskKernel = InitializeKernel("ColorMethodTexLerpMask");
    128.             // Debug.Log("colorMethodTexLerpMaskKernel " + colorMethodTexLerpMaskKernel);
    129.             colorMethodMultiplyBufferKernel = InitializeKernel("ColorMethodMultiplyBuffer");
    130.             multiMethodMultiplyBufferKernel = InitializeKernel("MultiMethodMultiplyBuffer");
    131.          
    132.             terrainHeightKernel = InitializeKernel("TerrainHeight");
    133.             terrainAngleKernel = InitializeKernel("TerrainAngle");
    134.             terrainConvexityKernel = InitializeKernel("TerrainConvexity");
    135.             terrainSplatmap0Kernel = InitializeKernel("TerrainSplatmap0");
    136.             terrainSplatmap1Kernel = InitializeKernel("TerrainSplatmap1");
    137.  
    138.             #if UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3 || UNITY_5_4
    139.                 terrainCollisionHeightKernel = InitializeKernel("TerrainCollisionHeight");
    140.                 terrainCollisionHeightIncludeKernel = InitializeKernel("TerrainCollisionHeightInclude");
    141.                 terrainCollisionMaskKernel = InitializeKernel("TerrainCollisionMask");
    142.             #else
    143.                 terrainCollisionHeightKernel = InitializeKernel("TerrainCollisionHeightInverted");
    144.                 terrainCollisionHeightIncludeKernel = InitializeKernel("TerrainCollisionHeightIncludeInverted");
    145.                 terrainCollisionMaskKernel = InitializeKernel("TerrainCollisionMaskInverted");
    146.             #endif
    147.  
    148.             noiseRandomKernel = InitializeKernel("NoiseRandom");
    149.  
    150.             #if UNITY_EDITOR_OSX
    151.                 rawImageKernel = InitializeKernel("RawImageOSX");
    152.             #else
    153.                 rawImageKernel = InitializeKernel("RawImage");
    154.             #endif
    155.             imageColorKernel = InitializeKernel("ImageColor");
    156.             imageColorRangeKernel = InitializeKernel("ImageColorRange");
    157.  
    158.             shapeGradientKernel = InitializeKernel("ShapeGradient");
    159.             shapeCircleKernel = InitializeKernel("ShapeCircle");
    160.             shapeSquareKernel = InitializeKernel("ShapeSquare");
    161.             shapeConstantKernel = InitializeKernel("ShapeConstant");
    162.  
    163.             currentBlurNormalKernel = InitializeKernel("CurrentBlurNormal");
    164.             currentBlurOutwardKernel = InitializeKernel("CurrentBlurOutward");
    165.             currentBlurInwardKernel = InitializeKernel("CurrentBlurInward");
    166.             currentExpandKernel = InitializeKernel("CurrentExpand");
    167.             currentShrinkKernel = InitializeKernel("CurrentShrink");
    168.             currentEdgeDetectKernel = InitializeKernel("CurrentEdgeDetect");
    169.             currentDistortionKernel = InitializeKernel("CurrentDistortion");
    170.          
    171.             methodLerpMaskKernel = InitializeKernel("MethodLerpMask");
    172.             methodTexLerpMaskKernel = InitializeKernel("MethodTexLerpMask");
    173.             multiMethodTexLerpMaskKernel = InitializeKernel("MultiMethodTexLerpMask");
    174.  
    175.             calcColorKernel = InitializeKernel("CalcColor");
    176.             calcColorTexKernel = InitializeKernel("CalcColorTex");
    177.             calcObjectKernel = InitializeKernel("CalcObject");
    178.             calcObjectPositionKernel = InitializeKernel("CalcObjectPosition");
    179.             methodItemTexMaskKernel = InitializeKernel("MethodItemTexMask");
    180.             methodItemTex0MaskKernel = InitializeKernel("MethodItemTex0Mask");
    181.             terrainTexKernel = InitializeKernel("TerrainTex");
    182.             resultBufferToTexKernel = InitializeKernel("ResultBufferToTex");
    183.  
    184.             methodItemTexMaxKernel = InitializeKernel("MethodItemTexMax");
    185.             methodItemTexMinKernel = InitializeKernel("MethodItemTexMin");
    186.             methodItemTexLerpKernel = InitializeKernel("MethodItemTexLerp");
    187.             methodItemTexLerpMaskKernel = InitializeKernel("MethodItemTexLerpMask");
    188.  
    189.             portalKernel = InitializeKernel("Portal");
    190.             copyRenderTextureKernel = InitializeKernel("CopyRenderTexture");
    191.             copyComputeBufferToRenderTextureKernel = InitializeKernel("CopyComputeBufferToRenderTexture");
    192.             CopyComputeMaskBufferToRenderTextureKernel = InitializeKernel("CopyComputeMaskBufferToRenderTexture");
    193.  
    194.             // shader.SetTexture(resultBufferToTexKernel, "resultTex", resultTex);
    195.  
    196.             if (TC_Settings.instance == null) return;// Reporter.Log("GM singleton null");
    197.             if (TC_Settings.instance.global == null)
    198.             {
    199.                 TC.GetInstallPath();
    200.                 if (!TC.LoadGlobalSettings()) return;
    201.             }
    202.             if (TC_Settings.instance.global == null) return;
    203.             splatColors = Mathw.ColorsToVector4(TC_Settings.instance.global.previewColors);
    204.  
    205.             TC_Reporter.Log("LerpKernel " + methodLerpMaskKernel + " - " + methodTexLerpMaskKernel);
    206.             TC_Reporter.Log(rawImageKernel + " - " + noisePerlinKernel + " - " + shapeConstantKernel);
    207.         }
    208.  
    209.         int InitializeKernel(string kernel)
    210.         {
    211.             return InitializeKernel(shader.FindKernel(kernel));
    212.         }
    213.  
    214.         int InitializeKernel(int kernel)
    215.         {
    216.             foreach (var name in s_RWTexture2DNames)
    217.             {
    218.                 shader.SetTexture(kernel, name, Texture2D.blackTexture);
    219.             }
    220.  
    221.             foreach (var name in s_Texture2DNames)
    222.             {
    223.                 shader.SetTexture(kernel, name, Texture2D.blackTexture);
    224.             }
    225.  
    226.             foreach (var name in s_StructuredBufferNames)
    227.             {
    228.                 shader.SetBuffer(kernel, name, nullBuffer);
    229.             }
    230.  
    231.             return kernel;
    232.         }
    233.      
    234.         void OnDestroy()
    235.         {
    236.             instance = null;
    237.             nullBuffer.Release();
    238.             DisposeTextures();
    239.         }
    240.  
     
    Last edited: May 15, 2018
    BFW, gecko, cym_hellfire and 4 others like this.
  12. SilentParrotStudio

    SilentParrotStudio

    Joined:
    Aug 13, 2014
    Posts:
    12
    hopeful likes this.
  13. BCrisos

    BCrisos

    Joined:
    Jan 8, 2015
    Posts:
    52
    Hello everyone! I've been trying to contact the creator of this plugin for weeks! I see there's a living forum hooray! (Which I recently found after leaving a review)

    I have some issues i'd like some help with if any of you may know how to fix this.

    I am on unity 2017.3.1f1

    I get these errors after downloading TC2 Node painter, I am no programmer and I have no clue how to fix this.

    TC2 painter errors.JPG

    Also when it comes to doing manual object placement using the collider nodes I get this error after following the exact steps the website said to do my mask is switched to Terrain>Collider>Mask with inverted global and Height node Terrain>Collider>Height with blending mode set to lerp and I get this issue.

    mask inverted.JPG

    When I disable the invert on mask I get this, I move the GO and nothing happens

    mask regular.JPG

    And last I try swapping the height node settings and change the collision mode to mask and for the mask I change it to collision. I get the effect I wanted

    Height node on collision mask.JPG

    but only by moving my GO all the way up here.....

    GO place.JPG

    If anyone may know of a solution I would appreciate your input. I've been going nuts trying to figure this out thanks!
     
  14. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    330
    I'm new to TC2 and bought it a year or so and now just had the time to try this out. I'm trying to follow the tutorials and read the documentation but it's kinda difficult for me to get a grasp on the basics. Is there a list available somewhere for the Shortcut Keys? How do you duplicate a Layer Group?
     
    Last edited: May 18, 2018
  15. BCrisos

    BCrisos

    Joined:
    Jan 8, 2015
    Posts:
    52
    From what Ive read TC2 Node editor is treated as gameobjects hidden from the hierarchy editor so the shortcut for duplicating them is CTRL+D. To delete you can just press DELETE. To duplicate nodes while hovering with the mouse over a node hold ALT+SHIFT and the grey arrow would turn green and you can double click to dupe it.
     
    RendCycle likes this.
  16. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    330
    CTRL+D Worked! Been searching for that in the "Starting from Scratch" video and I could not find out how. Will try the other keys. Thanks for the help! :)

    Just a Note: I'm almost done with the video but got stuck again in 27:41 when masking rocks/grass. There seems to be no "Object" (and "Terrain") Layers as options under the "Collision Mask" field in the Inspector window of the Mask Node. Also, tried creating a new layer named "Objects" and placing "TerrainComposer Objects" and all its child objects under it but still did not work. The new "Objects" layer I've set for the child objects kept going back to "PostProcessing" layer. So I've selected "PostProcessing" layer instead and it seemed to work and the grass vanishes as controlled by Shrinking's Opacity toggle. Still, I found a tree stuck halfway in a rock and trees don't seem to sway with the wind as what's in the final test in the video. I'm using Unity 2018.1.0f2.



     
    Last edited: May 19, 2018
  17. BCrisos

    BCrisos

    Joined:
    Jan 8, 2015
    Posts:
    52
    Okay first make sure you're not in play mode if you're in play mode any changes you make layer-wise will revert once you exit out. Now you shouldnt have a problem with creating new layers if you're adding it like this.

    layer add.jpg

    Also the way the Terrain object placement works is by assigning a prefab or a game object from the hierarchy. (I highly suggest you use prefabs) Now you should be changing the layer name of the actual prefab (or object in hierarchy) and then assign the prefab in the spawn object option.

    Another thing make sure your collision mode option is set to mask not height. I will say I've been having some issues myself with Terrain Collision input. Masking is buggy and does not pick up the objects. I get a black display and dont see the small black and white detail in the editor i'm using unity 2017.3.1f1 so i'm not sure if the dev skipped my version and fixed it for 2018.1.
     
    Last edited: May 19, 2018
  18. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    330
    Yeah, I'm sure I'm not in play mode and also added the "Object" layer properly like in your attached image. I actually have a mostly empty Scene and imported Terrain Composer 2 just to test it and emulate how it is being done in the Youtube video here:
    as done by the developer. Everything runs fine except near the end part where he uses Node Masks for the Rocks so Grasses and Trees won't collide with it. I checked again and the "PostProcessing" layer kept returning after I tried tinkering with the "Shrinking" Opacity toggle of the Shrink Node. But so far, masking for the grasses works at 100% Opacity even if the "Collision Mask" of the Collision Node is set to "Post Processing" (I guess that means no need to change the selected value to "Objects" as in the video).



    Yup, Collision Mode option is set to Mask. Maybe TC2 needs to be updated for Unity version 2017.3.1f1 and higher. The black and white detail in some of the Node cards also does not appear for me sometimes. But I noticed it becomes visible when I press the "Refresh" button while the "Auto" button is green (activated).



    Also, would you know if a created finished terrain will still work even if TC2 is removed from the scene in a project file?
     
    Last edited: May 19, 2018
  19. BCrisos

    BCrisos

    Joined:
    Jan 8, 2015
    Posts:
    52
    Did you assign the layer to the prefab? and hit apply?
     
  20. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    330
    Yes, I did. But is this what you meant? In the Hierarchy column, I converted the "rocks" child assets including its parent GameObject. Then when they are all Prefabs, I changed their layers to "Objects" and clicked "Apply" button. After that I transferred all those Prefabs to the Hierarchy column. I then renamed and deactivated the original non-prefab "rocks" parent and child GameObjects in the Hierarchy while I then used the original name for the new Prefabs.


    That still did not work for the Trees. In the image above, I still have a tree sticking from a rock. The tutorial actually were not able to finish showing how to mask off colliding trees...

    But note that even without doing this process, masking of Grass from Rocks works ok even if they are in the "PostProcessing" layer as long as value for the Collision Mask field for the Node is also set to "PostProcessing" of course.
     
  21. BCrisos

    BCrisos

    Joined:
    Jan 8, 2015
    Posts:
    52
    Oh no, thats not what I meant. You need to find the actual rock prefab that you assigned in the node editor not the game objects spawned. For you to find the prefabs you can search it up. After you'll find a rocks folder click that then click on prefabs.

    here's an example. screen.jpg
    Either way, the solution you have is good. Just keep in mind when it comes to assigning layers the name of the layer can be anything but its always important to separate your layers accordingly since you don't want certain calculations happening where they're not supposed to in terms of physics that's why I'm mentioning how to properly switch the layer of a prefab.

    As for the trees I'm more than sure you'll have to give it the same approach as masking out the grass since you dont want any trees spawning inside rocks only around them.

    My biggest advice for you is to just mess around with TC2 right now there's just tons of work the dev has to do on this plugin in terms of making it newbie friendly but honestly speaking the more you mess around with it the better you'll understand. It's a big dive and you'll have to learn how to swim or drown trying.
     
  22. kepesh

    kepesh

    Joined:
    Dec 29, 2017
    Posts:
    92
    I can't spawn grass or objects on a splatmap that has a higher number than 8. How do I make it work with more splatmaps?

    I use microsplat if that makes any difference.
     
  23. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    330
    Will try to play around with TC2 more. But if I find it too time consuming to get a hang of, I might just use a different tool. My current game project will only use low poly terrains and actually will have less land area. Thus I will still probably need to have a terrain mesh converter later on if I use TC2. Nevertheless, thanks for your valuable assistance and good luck to your project! :)
     
  24. BCrisos

    BCrisos

    Joined:
    Jan 8, 2015
    Posts:
    52
    Micro splat has nothing to do with it. Terrain Composer is only limited to 8 splat maps from what I've read. What do you plan on using the additional maps for?
     
  25. BCrisos

    BCrisos

    Joined:
    Jan 8, 2015
    Posts:
    52
    If that's the case you could always adjust the pixel error option in the terrain settings menu and put it up to 10 or more to make low poly terrains. I would suggest using this tool for the amount of flexibility it gives you is insane! Don't give up just yet. Also if your terrain is less than 1km or is not a vast you could always use a 3d application to just make pieces and stitch them together. Nevertheless, I wish you the best as well!
     
  26. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    385
    I might be mistaken as I haven't created a terrain for a while but I think I can access all 16.
     
  27. kepesh

    kepesh

    Joined:
    Dec 29, 2017
    Posts:
    92
    Oh ok, I was planning on using a lot more as I have a big terrain and want to spawn different grass and objects on each texture.
     
  28. Deleted User

    Deleted User

    Guest

    its limited by the SHADER...get CTS..not Megasplat (only accepts 8 Control/SplatMaps..I tried & have both, you can paint the other 248 with a brush)..CTS = Up to 16 PBR texture sets in 1 pass - fast. TC2 can create unlimited splat layers, but after 8 , the splat maps are not assigned to the terrain, (the standard terrain shader)..thats where a CTS 4X4 splat maps = 16..can be rendered with higher resolution...
     
    Last edited by a moderator: May 22, 2018
  29. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Unity Terrains and MicroSplat supports 32 textures natively, MegaSplat supports 256 (but is a very different system than Unity's and uses it's own format). MicroSplat is also much faster than any other option for high texture counts- only sampling 4 texture sets per pixel regardless of how many textures you use on the terrain. (Other shaders would sample all 16/32 that they support, and therefor run much slower and become memory bound).
     
    RoyS and Seneral like this.
  30. kepesh

    kepesh

    Joined:
    Dec 29, 2017
    Posts:
    92
    So it's not possible to use more than 8 splat textures when using MicroSplat? Or do I have to assign the textures manually somehow?
     
  31. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    You can use 32 with MicroSplat just fine. Not sure how you are assigning them, but if they are on the terrain when you do the conversion it will convert them, or you can add them to the texture array config after the conversion.
     
  32. BCrisos

    BCrisos

    Joined:
    Jan 8, 2015
    Posts:
    52
    Although he'll be able to use 32 texture maps I heard in the tutorial video that Terrain composer only does 8 splats max (not sure if he updated the max). I dont think MicroSplat has anything to do with his problem since TC2 is only using Microsplat's material output. I will try to do some tests to see if I can do more than 8 splats and post results here.
     
  33. BCrisos

    BCrisos

    Joined:
    Jan 8, 2015
    Posts:
    52
    Ok, you can use as many splat textures as you want (example - 12 splat textures ) only to paint the terrain.

    Now TC2 places limitations on the amount of spawning via color index (splat texture's color). You can only do 9 splats that will interact to spawning. Look at the image below:

    (There are 12 splat maps 0-11 only 0-8 responds to spawning objects on index change.)

    Terrain composer gif.gif

    What I would do is assign important textures you'd want to spawn things in index 0-8.

    Other textures such as city roads or mountainy areas I'd just use for objects you can manually place.

    I hope that helped.
     
    Last edited: May 23, 2018
  34. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    330
    TC2 looks quite powerful alright but I just have a difficult time utilizing and recognizing its full capabilities. Tried setting the value for Pixel Error to 10 and even 100 but I don't see any difference when I press play. Maybe its just the mesh's poly count that's reduced and the material is covering the models... I would like to check if it can make the terrain have that low poly or even have a voxel-based look.

    I wish more experts can create a Youtube channel for more in-depth tutorials on TC2. It would really help newbies a lot and increase the popularity of this tool. Anyway, I found this nice Youtube video by someone else showing how to use TC2 to create a terrain for his RPG game.
     
    Last edited: May 23, 2018
    BCrisos likes this.
  35. KarelA

    KarelA

    Joined:
    Dec 30, 2008
    Posts:
    422
    Hi. TC2 has two modes for pixel error. Runtime and in editor. It may have been that you just assigned pixel error only in editor mode and when pressing play it will go back to the default runtime value.
     
  36. BCrisos

    BCrisos

    Joined:
    Jan 8, 2015
    Posts:
    52
    Like KarelA mentioned, theres two modes adjust the runtime mode as well to whatever pixel error value you have in the editor mode.

    And It really is powerful it goes beyond in terms of freedom. One of the best terrain tools imo and I feel your pain I just left the newbie stages. I would've made some terrain composer tutorials if I had the time. One thing I can verify is that TC2's documentation is up to date with unity's 2018 build. I posted some issues I had in 2017.3.1f1 but all of that is fixed in 2018.
     
    hopeful likes this.
  37. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    330
    Thanks for the suggestion KarelA and BCrisos. Tried it and it seems to have a very slight difference from Pixel Error 1 vs. 200. Below is a sample result I got. Am I doing something wrong or maybe the terrain textures should be removed to make the effect more noticeable?

     
    Last edited: May 24, 2018
  38. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    Pixel error is only for distance downsampling so to say, as the name suggests it basically controls how much error in geometry you allow based on pixel density. So a far away part does not need as much density as a near part since it's represented with fewer pixels.
    Also, for low poly style, you would probably want split normals for the edges to pop out, right?
    Anyway, Unity terrain is probably not the way to go here. There are several low-poly mesh terrain converters out there that should do the job.
    Just need to convert once you're happy with your results from TC2:)
    Seneral
     
  39. Deleted User

    Deleted User

    Guest

    You can style the height map itself..I did a quick test.
    I tried a stock Photoshop filter on a couple 4k height stamps..


    The splat textures can be set to enhance the style, I might do it in a tutorial video, if you want.
    p-
     
  40. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    330
    That was what I was originally planning to do. But wondering if TC2 might already have a converter built-in that I might have missed. Any low poly mesh converter you can recommend that you've tried before that can also probably stitch terrains? :)

    Nice! How were you able to do that? A tutorial would be great if you have time. Thanks! :)
     
  41. Deleted User

    Deleted User

    Guest

    Not sure it will help but:
    Stylized Stamps in TC2 pt.1





    p-
     
    Last edited by a moderator: May 26, 2018
  42. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    330
    Whoa! I haven't thought about doing that method in TC2. That's a good way to get that faceted low poly look. I will see if I can achieve a more voxel cube type of look. Maybe there is another filter for that. I appreciate the help and thanks for creating the video tutorial! :)
     
    Last edited: May 25, 2018
  43. kepesh

    kepesh

    Joined:
    Dec 29, 2017
    Posts:
    92

    Thanks. It's unfortunate that I can't spawn objects or grass on the other splatmaps though.
     
  44. Deleted User

    Deleted User

    Guest

    Use the same(any) splat node to create a color 'mask', in the 'color map section..output color map to jpg/png...and use image/color picker input for the grass/tree/bush node map/mask...

    another tutorial?
     
  45. kepesh

    kepesh

    Joined:
    Dec 29, 2017
    Posts:
    92

    All splatmaps above 8 is just black even though they are used on the terrain.
     
  46. Deleted User

    Deleted User

    Guest

    right, sorry hard to explain..don't use terrain splats 8-16 in the color nodes, (unless you have a material that supports it) but you use the same splat nodes(that you used to create splats 8-16) height/angle/noise, etc..alt drag to copy to new color nodes..(your basically recreating the splat node to output a solid color)...I am doing part two of the tutorial and will go over how I use color maps. p-
     
  47. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    330
    hmm... Any clues why I get weird waves when I import 16-bit Greyscale RAW file to use as Stamps in TC2? I tried using Islands/MountainIsland.raw that came with TC2 downloadable stamps. Opened the RAW file in Photoshop and converted it to Mode 8-bit Channel so I can use Filter->Pixelate->Crystallize (value of 16). Then I converted it back to Mode 16-bit Channel and saved it in TC2's RawFile folder so I can use it as Stamp Texture as illustrated below.

     
  48. Deleted User

    Deleted User

    Guest

    Filter->Pixelate->Crystallize does not need converting at all, keep at 16 bit /greyscale..(why I chose it, got tired of converting back and forth :), it was the filter gallery that forced me to convert.
     
  49. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    330
    That's weird. I can't seem to access Filter->Pixelate->Crystallize in PS CS5 if RAW file is 16 bit. Maybe the software I'm using is too old? I can only access that if I convert it to 8 bit.

    I will try to see if there is a similar way to do this in Gimp or other graphics editing software.

     
    Last edited: May 26, 2018
  50. Deleted User

    Deleted User

    Guest

    Sorry, I just double checked..opened the exact same file, seems I can in PS CC 2018...I guess your version is different...
    just convert to 8 bit / rgb -> filter and convert back to Grey scale/16 bit..that should work, I tested it., many, many times..I did get distortion, just like yours..when it was not 16 bit...

    Open it back up..check it, before it gets to unity..if its distorted, when you re-open..then it is the old software re-organizing the bytes in some wacky way...sorry.

    create a blank 4k ,16bit grey scale doc, paint a test height map, send that to a stamp..is that distorted? (is the problem photoshop exporting raw?)
    p-
     
    Last edited by a moderator: May 26, 2018