Search Unity

TC2 Node Painter - The TC2 extension for painting the world!

Discussion in 'Assets and Asset Store' started by Seneral, Feb 5, 2017.

  1. CoughE

    CoughE

    Joined:
    Oct 26, 2015
    Posts:
    24
    Correct, the maximum height is visual only, it doesnt paint that height onto the node. On refresh the node appears as normal, as if it painted the new height correctly.


    Undo and redo does not appear to work reliably. I can paint some on the node,and when it happens I can undo to remove the maximum height. But clicking undo again selects the terrain I am currently drawing on.

    This is the example I am drawing on, I deleted the textures a while back since unity kept annoyingly creating a terrainupgrade folder in my hiearchy, but it happens with other terrain textures too, so dont think thats a problem.

    Painting directly on the node does not produce the issue.

    Only other asset I have that might affect it is RealtimeCSG (it is turned off though)

    If you need me to make any more gifs of it just let me know!

    Unity version is 2019.1.0f2


    I am getting this error when it paints like that.
    Code (CSharp):
    1. IndexOutOfRangeException: Index was outside the bounds of the array.
    2. TerrainComposer2.TC_Generate.ComputeHeight (UnityEngine.Rect generateRect) (at Assets/Plugins/TerrainComposer2/Scripts/Generate/TC_Generate.cs:1144)
    3. TerrainComposer2.TC_Generate.Compute (TerrainComposer2.TCUnityTerrain tcTerrain, System.Int32 outputId, UnityEngine.Rect generateRect) (at Assets/Plugins/TerrainComposer2/Scripts/Generate/TC_Generate.cs:267)
    4. TerrainComposer2.TC_Generate.GenerateOutput (TerrainComposer2.TCUnityTerrain tcTerrain, System.Int32 outputId, System.Boolean instantGenerate, UnityEngine.Rect generateRect) (at Assets/Plugins/TerrainComposer2/Scripts/Generate/TC_Generate.cs:507)
    5. TerrainComposer2.TC_Generate.GenerateHeight (TerrainComposer2.TCUnityTerrain tcTerrain, System.Boolean instantGenerate, UnityEngine.Rect generateRect, System.Boolean disableTerrain) (at Assets/Plugins/TerrainComposer2/Scripts/Generate/TC_Generate.cs:527)
    6. TerrainComposer2.TC_Generate.Generate (TerrainComposer2.TCUnityTerrain tcTerrain, System.Boolean instantGenerate, UnityEngine.Rect generateRect) (at Assets/Plugins/TerrainComposer2/Scripts/Generate/TC_Generate.cs:449)
    7. TerrainComposer2.TC_Generate.Generate (System.Boolean instantGenerate, UnityEngine.Rect generateRect, System.Int32 outputId) (at Assets/Plugins/TerrainComposer2/Scripts/Generate/TC_Generate.cs:423)
    8. TerrainComposer2.TC_Generate.MyUpdate () (at Assets/Plugins/TerrainComposer2/Scripts/Generate/TC_Generate.cs:186)
    9. UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:200)
    10.  
    11.  
    edit
    I can perform resize or undo modifications but am unable to undo them
     
    Last edited: Jul 16, 2019
  2. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,176
    Ah yes Undo is NOT integrated into the default undo system. So in order to undo, you need to use the buttons, Ctrl-Z does not work unfortunately. Reason being that I'm handling potentially large textures here and I'd rather manage them myself and not have unity crash after 50+ undos because you ran out of memory.
    There would be an alternative way of using custom undo with Ctrl-Z which I might actually integrate. It would add several hundred lines of not-so-nice code though, since it's a bit hacky (see my script UndoPro).
    Anyway, that on the topic of undo, if there's interest I'll try to add Ctrl-Z undo.

    Ok so painting in the scene view causes a scene redraw at unwanted times (generally not a problem as GUI drawing also causes a scene redraw). That in turn causes some unwanted values in the visualization textures. And for some reason, it is way more severe for you than normal.
    I'll try to test and adjust the timing of everything, but even with unfavourable timing it should not interfere. I'm pretty sure I double-checked that all RenderTextures's are handled correctly. Was a while ago though so I guess I'll have to triple-check.
    Thanks for reporting!
     
  3. CoughE

    CoughE

    Joined:
    Oct 26, 2015
    Posts:
    24
    No worries, the undo style makes sense. Now that I know it's no big deal to just use the buttons!

    Thanks for being so fast in your response and willing to help out! If you need me to guinie-pig anything when you have time, just give me a holler!