Search Unity

Bug Terrain Tools Texture Brush Size is Stuck

Discussion in 'Editor & General Support' started by Nathanieljla, Jan 20, 2021.

  1. Nathanieljla

    Nathanieljla

    Joined:
    Apr 18, 2014
    Posts:
    97
    As the title describes I'm using the latest terrain tools package, and the brush size (when attempting to paint textures) is locked. I can't manually enter any values into the min, max, or current size. Anything I enter is reset. Anyone have any ideas?

    brushSize.PNG

    Thanks in advance!
     
  2. BlackManatee

    BlackManatee

    Joined:
    Jun 13, 2013
    Posts:
    82
    UPDATE - Workaround/Fix:
    • The problem is apparently unrelated to Terrain Toolbox or the 2017 Toolkit; uninstalling them made no difference.

    • Instead, I was able to fix / work-around the problem by opening the "Range" option (by clicking the drop-down arrow), then entering a smaller number for the lower limit. The "Range" had set itself to 500 for both the top and bottom numbers. I couldn't change the top number, but entering a small number for the bottom part of the range caused the "Size" slider/control to function again. I hope this works for you as well. :)

    (Previous/Original Post) . . .
    It's been a couple of months, and I don't see a solution yet. I'm in the same fix, though mine is locked at 500. I just upgraded to Unity 2019.4.21 I have both the Terrain Toolbox (package) installed as well as the Heparo 2017 Terrain Toolkit asset. Gonna try deleting those, one at a time; I'll post an update if that fixes the problem. Meanwhile, please post if you've come across a solution, Nathanieljla -- thanks!​
     
    Last edited: Mar 1, 2021
  3. Nathanieljla

    Nathanieljla

    Joined:
    Apr 18, 2014
    Posts:
    97
    I haven't come across a fix yet, but haven't been working with the terrain since that post.
     
  4. Vict0r3znov

    Vict0r3znov

    Joined:
    Oct 14, 2018
    Posts:
    26
    Well i'm facing the same issue here with unity 2020.1
     
  5. navratilvictori

    navratilvictori

    Joined:
    Feb 21, 2021
    Posts:
    4
    I have the same issue in Unity 2021.1.20f1
    Forgot to mention (tested a bit):
    • the brush size is huge, even left at size 2. The size seems to be of correct size. Reinstalled everything (including Unity), deleted everything in %appdata% (local, locallow, roaming) regarding Unity and Unity Hub, and made new project. Default size seems to be 2 (not 1.94931)
    • reinstalled "com.unity.terrain-tools" then the problems appeared. Brush size could only be set to "1.94931" (instead of 2) and the Brush was huge
    • THE PROBLEM IS THE JITTER! Even with a value of 0.3 it creates a huge brush, like it would be of size 100. Putting the jitter to 0, made possible for the brush to retain it's set size.
     
    Last edited: Sep 13, 2021
  6. B_Campbell

    B_Campbell

    Unity Technologies

    Joined:
    May 21, 2019
    Posts:
    10
    Hi All,
    Thank you for bringing this issue up to our attention. Luckily, this issue has previously been reported and a fix has landed to address it. The fix landed in Terrain Tools 4.0.0-pre.1 and is in the verified version of 4.0.0. Please keep in mind this means you'll need to update your editor to the latest 21.2 beta.

    If updating isn't an option there is still a workaround...

    -To Reset All Parameters-
    1. Copy and paste the example code into a blank script within their project https://docs.unity3d.com/ScriptReference/EditorPrefs.DeleteAll.html
    2. Deselect any terrains that are selected
    3. Click "Examples/EditorPrefs/Clear all Editor Preferences" to run the previously pasted script

    -To Reset a Specific Parameter-
    Instead of calling
    EditorPrefs.DeleteAll();
    in the example script above you'll call
    EditorPrefs.DeleteKey("[ToolName].[ParameterName]")
    .
    This is an example for resetting the Paint Texture Tool's Brush Size as well Min/Max parameters
    EditorPrefs.DeleteKey("PaintTexture.TerrainBrushSize");
    EditorPrefs.DeleteKey("PaintTexture.TerrainBrushSizeMin");
    EditorPrefs.DeleteKey("PaintTexture.TerrainBrushSizeMax");


    -Setting a Parameter From Code-
    You can also set the parameter in a similar way using
    EditorPrefs.SetFloat("PaintTexture.TerrainBrushSize", 100);
    EditorPrefs.SetFloat("PaintTexture.TerrainBrushSizeMin", 1);
    EditorPrefs.SetFloat("PaintTexture.TerrainBrushSizeMax", 200);
     
    TiltedJosh likes this.
  7. KiwiGivi

    KiwiGivi

    Joined:
    Feb 15, 2017
    Posts:
    1
    thanks a lot! this fixed it for me :D
     
  8. rlalancette

    rlalancette

    Joined:
    Sep 20, 2014
    Posts:
    18
    Goddamn! This bug is annoying as hell!!! I can't paint fine details!!!
     
  9. brandon_steinlein

    brandon_steinlein

    Joined:
    Apr 6, 2022
    Posts:
    2
    Happening to me right now in 2023...
     
    lclemens likes this.
  10. lclemens

    lclemens

    Joined:
    Feb 15, 2020
    Posts:
    761
    I have no idea why it got set like that - for me it put the min brush size to 500 and the max brush size to 500. Maybe I was using the mousewheel to zoom or something while it was selected?

    Anyway, to fix it expand the brush size section and type in the min brush size to 1 or something and then hit enter.

    upload_2023-8-29_22-23-17.png
     
  11. Infinit_Play

    Infinit_Play

    Joined:
    Jan 17, 2021
    Posts:
    1
    Same problem here.
     
  12. juustem

    juustem

    Joined:
    Oct 3, 2020
    Posts:
    1
    I had to change the HeightMap resolution in Terrain settings to 2049x2049 to be able to set it to 1 (it was also 3.89105, like in the above comment).