Search Unity

Planetary Terrain: Quadtree Planets for Unity

Discussion in 'Assets and Asset Store' started by simitro, Nov 10, 2017.

  1. Doctor06

    Doctor06

    Joined:
    Nov 1, 2014
    Posts:
    31
    i noticed on the demo, in the earth demo, when you are close to water, the shores are kind of square. Is that a setting to make them look more round? and make it flow more?
     
  2. Baconation4

    Baconation4

    Joined:
    Oct 7, 2016
    Posts:
    27

    Good to hear. Hoping to see transitions between scaled space objects for interplanetary transition soon!

    How well does the floating origin work with say a space station filled with rigidbodies? Would it be okay so long as they were parented to the station? And would the station be best off parented to the planet in a 'geostationary' orbit? Or would there be a possibility of coordinate storage for objects in 'orbit' around things?

    Not looking to do realistic physics, but was curious about the floating origin aspect of this before I loaded up a new project to test.
     
  3. SilentCloud85

    SilentCloud85

    Joined:
    Mar 20, 2018
    Posts:
    1
    How often does the OP usually respond to his email?
     
  4. Baconation4

    Baconation4

    Joined:
    Oct 7, 2016
    Posts:
    27
    So far I haven't had the need to Email the creator directly for any issues, which in itself is a good thing. Anything I've put here seemed to get responded to pretty quickly as well. I purchased this asset and definitely am happy with what it offers, and he seems to take suggestions as well, if you scroll up to a few posts back you will see some minor things I had talked about and his feedback as well.

    Not going to tell you to buy this, as it is not a review section here :p but I will say that for what it is advertised as, it comes ready to go and seems like the creator will be good about updates. It's definitely an asset that will be useful to a lot of people at its price especially.
     
  5. Razmot

    Razmot

    Joined:
    Apr 27, 2013
    Posts:
    346
    I have a suggestion: some sort of 'floating orientation'. It means keeping the player always walking on a Y up 'plane', and so allows the use of character controllers that expect that fixed gravity vector.
     
    Baconation4 likes this.
  6. Baconation4

    Baconation4

    Joined:
    Oct 7, 2016
    Posts:
    27

    I do like this as well if I am visualizing the same thing you are saying.

    Are you talking about something with the spherical gravity script? Or looking for something that can alter gravitational orientation based on location, say...a rotating space station in orbit?

    Any specific controller in mind? I have game kit controller and plan to take it to this asset pretty soon.
     
  7. Razmot

    Razmot

    Joined:
    Apr 27, 2013
    Posts:
    346
    I mean Floating origin keeps the player at 0,0,0 by moving / relocating the planet geometry instead of moving the player character , so "Floating orientation" would rotate the terrain (and the whole universe) to keep the player head always pointing towards Y+ . The standard unity controller and UFPS are stuck on Y down gravity (opsive Tps I think too).

    GKC and ooti have arbitrary gravity, but on a spherical large planet you would still need custom code to orient the character's gravity toward the planet center, because the naive approach of using the terrain normal would let you walk on walls / cliffs / slopes !
     
  8. simitro

    simitro

    Joined:
    Feb 13, 2015
    Posts:
    123
    Add more subdivision levels or make your shores steeper. Adding more subdivision levels obviously means that the scene gets more computationally intensive, you'll have to find your optimum.
     
  9. simitro

    simitro

    Joined:
    Feb 13, 2015
    Posts:
    123
    I think it is far easier to just implement a character controller with a variable gravity vector. Additionally, rotating planets adds to the floating point precision problems, Quaternion * Vector is too imprecise with floats, I might implement double precision Vectors and Quaternions to stop this though.
     
    Last edited: Mar 24, 2018
    Baconation4 likes this.
  10. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    A feature request... could we get some better control over the use and selection of textures and heights? As an example, I would like to provide a bitmap covering the whole planet, where each pixel indicates a choice of biome, such as arctic tundra at the poles, temperate forest, grasslands, desert, etc. Each of these would have its own noise heightmap and array of height-blended textures.

    Hopefully you could use the current procedural node editor for this, setting up different values for both texturing and noise generation per biome. I'd like to have smooth, mostly flat white at my poles, gently rolling hills and deserts, and occasional mountain ranges with bumpy heights and rocky textures. Right now its impossible to achieve this :/

    Just having textures set by height alone, and one noise setup, isn't really enough info to cover a whole planet with diverse surface characteristics. The result becomes samey and obviously procedural.
     
  11. simitro

    simitro

    Joined:
    Feb 13, 2015
    Posts:
    123
    I agree, will implement a biome map. Also fixed the gaps when rotating large planets and working on compute shaders for better performance when using complex noise.
     
    Last edited: Apr 8, 2018
    SONB, Baconation4 and Razmot like this.
  12. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    Awesome. I love this asset :)
     
  13. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    404
    Does this asset create a mesh collider so planets can be used as terrains?
     
  14. simitro

    simitro

    Joined:
    Feb 13, 2015
    Posts:
    123
    Yes. You can enable collider generation for every subdivision level.
     
    LukeDawn likes this.
  15. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    404
    To go with that, can the system generate a planet mesh?
     
  16. simitro

    simitro

    Joined:
    Feb 13, 2015
    Posts:
    123
    The individual quads are just GameObjects you can select in the inspector. You can save one quad or the whole planet with a simple script.
     
    LukeDawn likes this.
  17. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    Can you provide some tips on improving the texturing on a largish (3000000uu diameter) planet? When on the surface, the texture looks fine, but when I take off and fly up a bit the tiling becomes very apparent. If I continue to fly up the repeating texture shrinks below a pixel in size, and everything looks just like a featureless blur, and there's still a long distance still to fly up until the heightmap starts to become visible, and mountains and shadows start to dominate, making it look better again.
     
  18. simitro

    simitro

    Joined:
    Feb 13, 2015
    Posts:
    123
    I'll look into something along the lines of distance-based texture blending or rendering the same texture multiple times at different scales.
     
  19. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    That would be awesome!
     
  20. owen_proto

    owen_proto

    Joined:
    Mar 18, 2018
    Posts:
    118
    Starting with an empty scene and following the 'getting started' instructions in the documentation, I can't get a planet to render. Is there something missing in these steps perhaps? I've tried using a generated heightmap and a noise file for terrain generation. The demo scenes load fine, but nothing seems to change when I try to get them to render with a different heightmap or when I make other modifications. What am I missing?
     
  21. owen_proto

    owen_proto

    Joined:
    Mar 18, 2018
    Posts:
    118
    After moving the height scale under the generation tab it started rendering. It seems like moving it to any arbitrary value will get it working then you can set it back to the default value and it works fine.
     
  22. owen_proto

    owen_proto

    Joined:
    Mar 18, 2018
    Posts:
    118
    A nice feature to have would be the ability to use a texture as a mask for noise-generated terrain. Another feature that may be more complex: the ability to use different types of noise for each biome.

    I realize that this can essentially be achieved with heightmaps and photoshop, but it seems like resolution limitations make for terrain that is very limited in detail if you are walking along the surface.
     
  23. simitro

    simitro

    Joined:
    Feb 13, 2015
    Posts:
    123
    There is a pdf in the asset folder.
     
  24. simitro

    simitro

    Joined:
    Feb 13, 2015
    Posts:
    123
    What do you need help with? I can make a tutorial in the future, but not now. If you ask, I can help you with everything though. Have you checked out the demo scenes yet? They might also make things a bit clearer.
     
  25. simitro

    simitro

    Joined:
    Feb 13, 2015
    Posts:
    123
    Exactly, they are. Quads are never shown when not in play mode, and even then their GameObjects are invisible unless Hide Quads in Hierarchy under the General Tab of the planet is disabled.
     
  26. simitro

    simitro

    Joined:
    Feb 13, 2015
    Posts:
    123
    The scale of the atmosphere is essentially fixed and proportional to the planet size. You can try to play with the settings, there also is a constant in the script you can change (m_outerScaleFactor in Atmosphere.cs) to get it a little larger, but that's it. Be careful not to mess up the effect when doing that. As it's proportional you can also just increase the planet's radius to get a higher atmosphere.
     
    Last edited: Jun 29, 2018
  27. MachoBrizzin

    MachoBrizzin

    Joined:
    Jul 10, 2013
    Posts:
    27
    Could you give any tips on how to use the biome feature? What does a "biome map" consist of? There's no documentation on it.
     
  28. simitro

    simitro

    Joined:
    Feb 13, 2015
    Posts:
    123
    There is a short section in the documentation. Currently the biome map, if used, is just overriding the normal heightmap when selecting textures. So if you want a flat and low area to have the texture of a mountain, you'd just increase the values of the biome map in that place. The height wouldn't be influenced, only the textures. You are still bound to the texture gradient you set.

    I am not happy with this implementation though. I will implement a converter that converts a colored biome map (one color per biome) and corresponding textures to a gradient and an override heightmap.
     
  29. owen_proto

    owen_proto

    Joined:
    Mar 18, 2018
    Posts:
    118
    Would it be much trouble to create a version of the planet script that interprets black on a heightmap as an area not to create any quads (basically leave holes in the planet)? I'd like to try using such a planet mesh along with the rotate script (and the benefit of the terrain chunking system) to generate particle effects for clouds.
     
  30. simitro

    simitro

    Joined:
    Feb 13, 2015
    Posts:
    123
    It wouldn't be easy since the heightmap is read after the quads have already been created. You could still somehow delete them, but to not waste compute time on quads that aren't used, I would use a table with the id's of quads you don't want to be created. Then check in Split() if any child quads are on that list, and if so, don't create them.

    This would also solve the problem of non-existent neighbors. You could just check if the potential neighbor quad is on the list, and if so, just ignore it.

    You could also store an alpha value in the vertex color and render specific vertices transparent. There'd be some unnecessary computation, but you'd have more precision than just not rendering whole quads.
     
  31. simitro

    simitro

    Joined:
    Feb 13, 2015
    Posts:
    123
    Fix for the node editor in Unity 2018.2 (beta) here. Just replace GUIScaleUtility.cs in Planetary Terrain/Scripts/NodeEditor/Node_Editor/Utilities/GUI/.

    Credit for the node editor and fix goes to Seneral on GitHub.
     
    owen_proto likes this.
  32. L-Tyrosine

    L-Tyrosine

    Joined:
    Apr 27, 2011
    Posts:
    305
    Please, quick question.
    Any chance to run it on mobile? (maybe with small planets, fast shaders, etc)

    tks
     
  33. simitro

    simitro

    Joined:
    Feb 13, 2015
    Posts:
    123
    It definitely runs on mobile. Performance is ok, but the battery is drained quickly. I think with the performance optimization you mentioned and using only heightmaps it should work fine for a mobile game.
     
    L-Tyrosine likes this.
  34. JustZht

    JustZht

    Joined:
    Apr 5, 2015
    Posts:
    16
    Hi, thanks for this great asset. I tried to combine this with a triplanar terrain shader and the results are weird. I guess it's due to chunk's pivot is set on the first vertex of the chunk (not the sphere center) and the local rotation vector is always up in world space (not from sphere center to the chunk), is there any documentation on changing this to make triplanar terrain shader (like ReliefTerrain or MagaSplat) fit ? thanks!
     
  35. simitro

    simitro

    Joined:
    Feb 13, 2015
    Posts:
    123
    I don't own any triplanar shader assets, so I'm not sure if there is any way to get them to work with Planetary Terrain. You can try to save a quad, move the pivot and then check if it works. Changing the pivot is easy, changing the rotation is harder though.
     
  36. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    Would this asset work with HDRP?
     
  37. simitro

    simitro

    Joined:
    Feb 13, 2015
    Posts:
    123
    The terrain generator itself does, the shaders don't. I replaced the Planet Material with the HDRP Lit Material and it worked, but only one texture can be used.

    The PT shaders are all fairly simple though, so rewriting them for the HDRP should be doable (with the exception of the atmosphere shader).
     
  38. valentinwinkelmann

    valentinwinkelmann

    Joined:
    Nov 3, 2014
    Posts:
    190
    I think the asset looks very good and seems to be really worth its money, but before I buy it I'd still be interested in a few things. Can objects be spewed over the node system due to heightmaps and noise?
    is the whole thing also suitable for mobile use in a simpler resolution and a smaller size ?
    Interesting would be a video which shows how a planet is created with the system.
     
  39. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    It would be better to not hardcode paths in this asset. If I move the folder in another folder it breaks.
     
  40. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    Also something happend and node canvas doesn't work at all. Clicking new canvas or reinit doesn't help.
    There are a lot of errors in console:

    Code (CSharp):
    1. UnityException: Cannot Load NodeCanvas: The file at the specified path 'Assets\Planetary Terrain\Scripts\NodeEditor\Editor\Node_Editor/LastSession.asset' is no valid save file as it does not contain a NodeCanvas!
    2. NodeEditorFramework.NodeEditorSaveManager.LoadNodeCanvas (System.String path, System.Boolean createWorkingCopy) (at Assets/Planetary Terrain/Scripts/NodeEditor/Node_Editor/Framework/NodeEditorSaveManager.cs:194)
    3. NodeEditorFramework.NodeEditorUserCache.LoadCache () (at Assets/Planetary Terrain/Scripts/NodeEditor/Node_Editor/Framework/NodeEditorUserCache.cs:166)
    4. NodeEditorFramework.NodeEditorUserCache.SetupCacheEvents () (at Assets/Planetary Terrain/Scripts/NodeEditor/Node_Editor/Framework/NodeEditorUserCache.cs:73)
    5. NodeEditorFramework.Standard.NodeEditorWindow.OnEnable () (at Assets/Planetary Terrain/Scripts/NodeEditor/Editor/Node_Editor/NodeEditorWindow.cs:84)
    6.  
    7. NullReferenceException: Object reference not set to an instance of an object
    8. NodeEditorFramework.Standard.NodeEditorWindow.DrawSceneGUI () (at Assets/Planetary Terrain/Scripts/NodeEditor/Editor/Node_Editor/NodeEditorWindow.cs:121)
    9. NodeEditorFramework.Standard.NodeEditorWindow.OnSceneGUI (UnityEditor.SceneView sceneview) (at Assets/Planetary Terrain/Scripts/NodeEditor/Editor/Node_Editor/NodeEditorWindow.cs:115)
    10. UnityEditor.SceneView.CallOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2801)
    11. UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2076)
    12. UnityEditor.SceneView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:1937)
    13. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    14. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    15. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    16. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    17. UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:335)
    18. UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:329)
    19. UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:303)
    20. UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean customBorder, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:360)
    21. UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:319)
    22. UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:244)
    23. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    24.  
    25. GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced.
    26. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    27.  
    28. NullReferenceException: Object reference not set to an instance of an object
    29. NodeEditorFramework.Standard.NodeEditorWindow.DrawSceneGUI () (at Assets/Planetary Terrain/Scripts/NodeEditor/Editor/Node_Editor/NodeEditorWindow.cs:121)
    30. NodeEditorFramework.Standard.NodeEditorWindow.OnSceneGUI (UnityEditor.SceneView sceneview) (at Assets/Planetary Terrain/Scripts/NodeEditor/Editor/Node_Editor/NodeEditorWindow.cs:115)
    31. UnityEditor.SceneView.CallOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2801)
    32. UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2076)
    33. UnityEditor.SceneView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:1937)
    34. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    35. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    36. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    37. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    38. UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:335)
    39. UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:329)
    40. UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:303)
    41. UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean customBorder, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:360)
    42. UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:319)
    43. UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:266)
    44. UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:438)
    45. UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent () (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:412)
    46. UnityEngine.Experimental.UIElements.ImmediateStylePainter.DrawImmediate (System.Action callback) (at C:/buildslave/unity/build/Modules/UIElements/ImmediateStylePainter.cs:113)
    47. UnityEngine.Experimental.UIElements.IMGUIContainer.DoRepaint (UnityEngine.Experimental.UIElements.IStylePainter painter) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:98)
    48. UnityEngine.Experimental.UIElements.VisualElement.Repaint (UnityEngine.Experimental.UIElements.IStylePainter painter) (at C:/buildslave/unity/build/Modules/UIElements/VisualElement.cs:829)
    49. UnityEngine.Experimental.UIElements.VisualTreeRepaintUpdater.PaintSubTree (UnityEngine.Experimental.UIElements.VisualElement root, UnityEngine.Matrix4x4 offset, System.Boolean shouldClip, System.Boolean shouldCache, UnityEngine.Rect currentGlobalClip) (at C:/buildslave/unity/build/Modules/UIElements/VisualTreeRepaintUpdater.cs:310)
    50. UnityEngine.Experimental.UIElements.VisualTreeRepaintUpdater.PaintSubTreeChildren (UnityEngine.Experimental.UIElements.VisualElement root, UnityEngine.Matrix4x4 offset, System.Boolean shouldClip, System.Boolean shouldCache, UnityEngine.Rect textureClip) (at C:/buildslave/unity/build/Modules/UIElements/VisualTreeRepaintUpdater.cs:328)
    51. UnityEngine.Experimental.UIElements.VisualTreeRepaintUpdater.PaintSubTree (UnityEngine.Experimental.UIElements.VisualElement root, UnityEngine.Matrix4x4 offset, System.Boolean shouldClip, System.Boolean shouldCache, UnityEngine.Rect currentGlobalClip) (at C:/buildslave/unity/build/Modules/UIElements/VisualTreeRepaintUpdater.cs:314)
    52. UnityEngine.Experimental.UIElements.VisualTreeRepaintUpdater.Update () (at C:/buildslave/unity/build/Modules/UIElements/VisualTreeRepaintUpdater.cs:35)
    53. UnityEngine.Experimental.UIElements.VisualTreeUpdater.UpdateVisualTree () (at C:/buildslave/unity/build/Modules/UIElements/VisualTreeUpdater.cs:70)
    54. UnityEngine.Experimental.UIElements.Panel.Repaint (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:507)
    55. UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:230)
    56. UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:68)
    57. UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
    58.  
    59. UnityException: Cache system error: Current Canvas is not saved as the temporary cache!
    60. NodeEditorFramework.NodeEditorUserCache.CheckCurrentCache () (at Assets/Planetary Terrain/Scripts/NodeEditor/Node_Editor/Framework/NodeEditorUserCache.cs:186)
    61. NodeEditorFramework.NodeEditorUserCache.SaveCache () (at Assets/Planetary Terrain/Scripts/NodeEditor/Node_Editor/Framework/NodeEditorUserCache.cs:151)
    62. NodeEditorFramework.NodeEditorUserCache.NewNodeCanvas (System.Type canvasType) (at Assets/Planetary Terrain/Scripts/NodeEditor/Node_Editor/Framework/NodeEditorUserCache.cs:301)
    63. NodeEditorFramework.NodeEditorUserCache.AssureCanvas () (at Assets/Planetary Terrain/Scripts/NodeEditor/Node_Editor/Framework/NodeEditorUserCache.cs:16)
    64. NodeEditorFramework.Standard.NodeEditorWindow.OnGUI () (at Assets/Planetary Terrain/Scripts/NodeEditor/Editor/Node_Editor/NodeEditorWindow.cs:141)
    65. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    66. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    67. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    68. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    69. UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:335)
    70. UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:329)
    71. UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:303)
    72. UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean customBorder, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:360)
    73. UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:319)
    74. UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:244)
    75. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    76.  
     
  41. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    Also I get some cracks on the medium size planet (636 000)
     
  42. simitro

    simitro

    Joined:
    Feb 13, 2015
    Posts:
    123
    You can spawn prefabs on the planet using the foliage system or the with InstantiateOnPlanet() of the Planet class. You can certainly use PT on mobile, though I would limit the number of subdivisions and use a heightmap instead of noise to avoid high CPU usage.

    I am working on a video tutorial, should be finished within the next week or two.
     
  43. simitro

    simitro

    Joined:
    Feb 13, 2015
    Posts:
    123
    The cracks are probably caused by decreasing detail distances too fast, try using the calculator with a start value of radius * 5. If the cracks still appear, please send me a close-up wireframe view (use the scene camera).

    The node editor error seems to be caused by a corrupted save file:

    1. UnityException: Cannot Load NodeCanvas: The file at the specified path 'Assets\Planetary Terrain\Scripts\NodeEditor\Editor\Node_Editor/LastSession.asset' [URL='http://www.google.com/search?q=is+msdn.microsoft.com']is[/URL] no valid save file as it does not contain a NodeCanvas!


    Should be fixed by deleting 'Assets\Planetary Terrain\Scripts\NodeEditor\Editor\Node_Editor/LastSession.asset'. Could also be a symptom of moving the Folder. Have you changed
    public static string editorPath in NodeEditor.cs?

    In C# code I could write something to autodetect the path, but I can't think of a way to do that in HLSL. I'll add a section to the documentation which files need to be edited when moving the asset.
     
    Last edited: Sep 26, 2018
  44. valentinwinkelmann

    valentinwinkelmann

    Joined:
    Nov 3, 2014
    Posts:
    190
    Another question I forgot: is it possible to use the supplied shader as low poly shader ? so that the edges of the normals become visible. An example here:
     
  45. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    I moved folder back and reimorted the asset. After removing LastSession I have another error in console on opening the canvas:

    Code (CSharp):
    1. UnityException: Cache system error: Current Canvas is not saved as the temporary cache!
    2. NodeEditorFramework.NodeEditorUserCache.CheckCurrentCache () (at Assets/Planetary Terrain/Scripts/NodeEditor/Node_Editor/Framework/NodeEditorUserCache.cs:186)
    3. NodeEditorFramework.NodeEditorUserCache.SaveCache () (at Assets/Planetary Terrain/Scripts/NodeEditor/Node_Editor/Framework/NodeEditorUserCache.cs:151)
    4. NodeEditorFramework.NodeEditorUserCache.NewNodeCanvas (System.Type canvasType) (at Assets/Planetary Terrain/Scripts/NodeEditor/Node_Editor/Framework/NodeEditorUserCache.cs:301)
    5. NodeEditorFramework.NodeEditorUserCache.LoadCache () (at Assets/Planetary Terrain/Scripts/NodeEditor/Node_Editor/Framework/NodeEditorUserCache.cs:168)
    6. NodeEditorFramework.NodeEditorUserCache.SetupCacheEvents () (at Assets/Planetary Terrain/Scripts/NodeEditor/Node_Editor/Framework/NodeEditorUserCache.cs:73)
    7. NodeEditorFramework.Standard.NodeEditorWindow.OnEnable () (at Assets/Planetary Terrain/Scripts/NodeEditor/Editor/Node_Editor/NodeEditorWindow.cs:84)
    8. UnityEditor.EditorWindow:GetWindow()
    9. NodeEditorFramework.Standard.NodeEditorWindow:OpenNodeEditor() (at Assets/Planetary Terrain/Scripts/NodeEditor/Editor/Node_Editor/NodeEditorWindow.cs:41)
    Also every node is duplicated after adding.

    I am using unity 2018.3b2 for tests.
     
  46. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    Looks like it floating percision issue. (I am using compute shader)



     
    Last edited: Sep 27, 2018
  47. simitro

    simitro

    Joined:
    Feb 13, 2015
    Posts:
    123
    The node editor errors are because you're using the beta, please try again with the release version.

    Can you send me your scene, then I can have a look at what's causing the cracks. Thanks!
     
  48. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    I decreased the Frequency of Simplex FBM noise from 5000 to 4500 and cracks disappeared. I think this is because of the size of the planet (636 000)
     
    simitro likes this.
  49. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    And last question for today. How can I find out, that the generating of quads has finished? (For example to fade out from the loading screen). Is there some callback or something?
     
  50. simitro

    simitro

    Joined:
    Feb 13, 2015
    Posts:
    123
    When Planet.quadSplitQueue.Count is 0. Beware that they are a few frames in the beginning were it is zero too.