Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Space Graphics Toolkit & Planets

Discussion in 'Assets and Asset Store' started by Darkcoder, Aug 18, 2012.

  1. dmenefee

    dmenefee

    Joined:
    Oct 14, 2019
    Posts:
    104
    Another issue with latest update:

    When building, I get this compile error:

    'SgtHelper' does not contain a definition for 'MakeTextureReadable'
    line 85 in SgtTerrainFeature

    Looks like the MakeTextureReadable method is defined in the SgtHelper_Editor.cs partial class, which isn't available outside the Editor.
     
  2. Pandur1982

    Pandur1982

    Joined:
    Jun 16, 2015
    Posts:
    275
    Hello i have a question how can i set up a big planet, i will not land off the Planet only what i need is the Planet as a Big GameObj. a other question from my site is the warping a ship to a position, I use for flying the space combat kit from the asset store , i dont now how it will work together with the space graphics asset. And my last question is , give it some Tutorials?
    Thx for answer all :)
     
  3. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,103
    Thanks for pointing this out, it will be fixed in the next version!


    The warnings are harmless and should only appear when you first import the package or change pipelines.

    If I make a new project in Windows 10 with Unity 2021.2.2f1 with the standard pipeline and with only SGT 3.9.9 then it updates the shaders once upon install as expected, and never again. I can reopen the project and enter/exit play mode without any of the shaders reloading. Let me know what steps are required for me to replicate this.

    Oops, I'll fix this now.


    SGT comes with many tutorial demo scenes, and examples that show big planets. The "Universe/15 Third Person" demo scene shows you how to warp a spaceship to stars and planets. I have no idea if its compatoble with Space Combat Kit. If this asset merely modified the Rigidbody veloocity/faces then it should work. If it relies on world space positions then you will probably have to modify the code.
     
    dmenefee, mattxreality and Pandur1982 like this.
  4. Setzor

    Setzor

    Joined:
    Mar 10, 2014
    Posts:
    10
    @Darkcoder is there anywhere I can find a good explanation about how to build a new world texture/heightmap and how to define the areas for spawning or simplex noise mods?
     
  5. Steve2375

    Steve2375

    Joined:
    Mar 28, 2015
    Posts:
    41
    Hey, the terrain component seems to still have bugs with its colliders: on the planet there are stripes where no colliders get generated. At this location the player will fall through the terrain.

    Reproduction steps:
    1. Open test scene Terrain/05 Collider
    2. Configure the SgtTerrain component in this way: Resolution 75, Radius 4, Detail 32, Delay 0
    3. Set the camera position at X = 368 Y = 684 Z = -683
    Then you'll get the gap seen in the screenshot.

    A fix is very appreciated!
     

    Attached Files:

    Last edited: Nov 29, 2021
  6. dmenefee

    dmenefee

    Joined:
    Oct 14, 2019
    Posts:
    104
    I imported your new update after removing the old version completely and the problem is gone. Probably should’ve done that first :/

    Thanks! That fixed it.
     
  7. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,103
    Hey everyone,

    Version 3.9.10 of Space Graphics Toolkit is now out!
    • Fixed Max Sphere Shadows = 0 not working on lit components.
    • Fixed Max Sphere Shadows > 2 not working on lit components.
    • Fixed SgtTerrainFeature build error.
    • Fixed spaceship controls not working with new InputSystem package.
    • Fixed atmosphere coloring in linear color space.
    Just lots of bug fixes, enjoy :)



    The planets in SGT were made using Grand Designer. You can also make them using Photoshop or similar, but it's much more tricky. The areas can be based on colors in the planet textures, or hand painted in Photoshop, etc.



    Thanks, I'll check it out.



    Great!
     
    mattxreality likes this.
  8. Setzor

    Setzor

    Joined:
    Mar 10, 2014
    Posts:
    10
    Thanks. Of course that software is crazy expensive.

    On another note, not sure if you've seen this. I just stumbled upon it. Someone got spherical ocean waves working. I read the paper they based this off of several months ago, but the math is kinda beyond me.

    https://forum.unity.com/threads/seamless-water-waves-simulation-on-a-planetary-sphere.1160663/
     
  9. crackoder

    crackoder

    Joined:
    Jun 11, 2017
    Posts:
    7
    Hi @Darkcoder I've started using this asset very recently and I'm trying to use the floating origin logic, I created a new scene and basically started adding things little by little, so far is working ok but there is one thing that's weird, I added a gas giant in the schene and when I'm looking at it and the camera snaps due to the floating origing, the surface of the planet changes a bit, is like is regenerating the texture every snap or something, maybe I'm missing something...

    Can you help me with this? (I'm using the latest version 3.9.10), Here is a video showing the issue:
     
    Last edited: Nov 30, 2021
  10. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,103
    Making waves wrap around a sphere isn't that difficult. The difficult part is making it work on a planet that can be the same radius as Earth, and to reduce obvious tiling artefacts. Also, the atmosphere is applied using a secondary material, so it's not possible to do any wave deformation in the vertex shader since the atmosphere vertex shader has no knowledge of any waves. If I ever add any advanced wave simulation it will be in a separate asset, because it requires a whole new atmosphere system as well.



    It looks like the light source used to cast those shadows doesn't have the SgtFloatingObject component attached, which causes the shadow to change every time the camera snaps.
     
  11. crackoder

    crackoder

    Joined:
    Jun 11, 2017
    Posts:
    7
    Thanks! you were right!, I checked and forgot to remove a light from the default scene... is working now but I have another questions, Is it ok to have a parent object, lets say "Enviroment" and put Floating Object in it and add a bunch of children (lights and other objects that needs to move when the camera snaps), or is it better to go object by object?, does it make a difference?

    Also in the SgtBillboard class says to use SgtFloatingBillboard instead for floating origin projects, but the SgtFloatingBillboard class doesn't exist, is it a legacy thing?
     
    Last edited: Nov 30, 2021
  12. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,103
    Great!

    You can parent objects, but this only works if those objects are nearby relative to the floating point precision you need. For example, you could make one spaceship floating object with many children objects like hull parts and guns, and it would work fine. However, you wouldn't be able to make a 'sun' GameObject, parent all the planets, and then expect to be able to fly down to each planet with any accuracy, because then you're effectively losing the whole floating point precision feature of using a floating origin system.

    Indeed the SgtFloatingBillboard component no longer exists nor is it required. I'll update this documentation in the next version.
     
  13. hobblygobbly

    hobblygobbly

    Joined:
    Nov 13, 2013
    Posts:
    3
    Hello,

    I receive the following null references when clicking on a game object with the belt components (SgtBeltSimple/SgtBeltCustom). Of course there is no way then to edit the values in the inspector

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. SpaceGraphicsToolkit.SgtEditor.GetPropertyAndSetCustomContent (System.String propertyPath, System.String overrideTooltip, System.String overrideText) (at Assets/Space Graphics Toolkit/Features/Shared/Scripts/SgtEditor.cs:415)
    3. SpaceGraphicsToolkit.SgtEditor.Draw (System.String propertyPath, System.String overrideTooltip, System.String overrideText) (at Assets/Space Graphics Toolkit/Features/Shared/Scripts/SgtEditor.cs:297)
    4. SpaceGraphicsToolkit.SgtEditor.Draw (System.String propertyPath, System.Boolean& dirty, System.String overrideTooltip, System.String overrideText) (at Assets/Space Graphics Toolkit/Features/Shared/Scripts/SgtEditor.cs:308)
    5. SpaceGraphicsToolkit.SgtBelt_Editor.DrawMaterial (System.Boolean& dirtyMaterial) (at Assets/Space Graphics Toolkit/Features/Belt/Scripts/SgtBelt.cs:316)
    6. SpaceGraphicsToolkit.SgtBeltCustom_Editor.OnInspector () (at Assets/Space Graphics Toolkit/Features/Belt/Scripts/SgtBeltCustom.cs:180)
    7. SpaceGraphicsToolkit.SgtEditor.OnInspectorGUI () (at Assets/Space Graphics Toolkit/Features/Shared/Scripts/SgtEditor.cs:41)
    8. UnityEditor.UIElements.InspectorElement+<>c__DisplayClass59_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <4c65b26f0a3a417cae21ba5ceb4b25e2>:0)
    9. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
    10.  
     
  14. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,103
    Hey everyone,

    Version 3.9.11 of Space Graphics Toolkit now out!
    • Fixed SgtTerrainCollider with odd Resolution values.
    • Fixed SgtTerrainPrefabSpawner with odd Resolution values.
    • Fixed possible shader errors in URP.
    • Fixed SgtBelt___ inspectors not appearing.
    Just some important fixes, enjoy :)


    Try the latest version that came out today!
     
    dmenefee and dirkjacobasch like this.
  15. dmenefee

    dmenefee

    Joined:
    Oct 14, 2019
    Posts:
    104
    I just imported it and am seeing a lot of these errors:

    Failed to find shader: Space Graphics Toolkit/Flare
    Failed to find shader: Hidden/SgtRing
    Failed to find shader: Hidden/SgtAtmosphereInner

    etc.

    I removed & reimported the SGT; same issue. However, restarting Unity shows no issues, so I'm guessing this is a side-effect of switching to the built-in pipeline (?).
     
  16. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,103
    I can't replicate this issue in Unity 2020.3.22f1 if I make a new standard pipeline project, and import SGT. I can install URP and switch to it, as well as switch back to standard. In both cases the shaders correctly auto switch and I see no errors.
     
  17. nighty2

    nighty2

    Joined:
    Dec 29, 2020
    Posts:
    21
    Hi Darkcoder & community!

    [TLDR] After I move my spaceship rather great distances, raycasts often dont work anymore, at least on other objects than the ship. [/TLDR]

    In my simple testscene are:
    - a ship (Rigidbody, SgtFloatingObject)
    - a camera (SgtFloatingCamera & SgtFloatingFollow (follows the ship))
    - 1x cube at startposition, 1x cube at target position

    The ship's rigidbody gets moved by applying force.
    Raycasting from camera to the cube at the start (0,0,0,0,0,0) always works.
    After the ship gets moved to it's target SgtPosition, raycasting the second cube at the target position often results in no hit. It doesn't work with a new cube, created into the scene at this point either.

    I have a hard time pinpointing the exact circumstances when the faulty behaviour gets set in place.

    This are some results of moving the ship*:

    Test 1:
    from global_z 0 to global_z 5 => raycasting the cube at target position WORKS
    from global_z 5 to global_z 10 => raycasting the cube at target position WORKS

    Test 2:
    from global_z 0 to global_z 4822, and further to global_z 4827 => raycasting the cube at target position FAILS

    Test 3:
    from global_z 0 to global_z 20 => => raycasting the cube at target position WORKS
    then from global_z 20 to global_z 40 => => raycasting the cube at target position FAILS

    Test 4:
    from global_z 0 to global to global_z 4827 => raycasting the cube at target position FAILS

    Test 5:
    I tried just setting the ship to global_z 4827 by typing the number into the field of the ships sgtFloatingObject.
    The ship seemed to appear there immediately and the cube there was visible but raycasting fails in this case, too.

    *The target positions have been chosen randomly and only on the z-axis. The problem exists in any direction though.


    Does anyone have an Idea on how to solve this? Any help is highly appreciated!
     
    Last edited: Dec 16, 2021
  18. michaljabrzyk

    michaljabrzyk

    Joined:
    Apr 15, 2013
    Posts:
    56
    Hi.
    I wondering how to redesign SgtFloatingSpawner
    to be able to add loading objects from file.
    Object created will be star system whos got orbit(galaxy), size(AU), position, etc...
    I would like to create object from other class for egs. from SgtSystem.
    I have such a code :

    Code (CSharp):
    1.  
    2.  
    3.         protected void LoadFromFile()
    4.         {
    5.             systems.Clear();
    6.  
    7.             if (Application.isPlaying == true)
    8.             {
    9.  
    10.  
    11.                 SgtDataContainer sgtDataContainer = SgtDataContainer.Load(path);
    12.  
    13.                 foreach (SgtDataStruct sgtDataStruct in sgtDataContainer.sgtDataStruct)
    14.                 {
    15.          
    16.                     Vector3 position = new Vector3(sgtDataStruct.X * (float)units, sgtDataStruct.Y * (float)units, sgtDataStruct.Z * (float)units);
    17.                     SgtPosition sgtPosition = new SgtPosition(position);
    18.  
    19.                     systems.Add(new SgtSystem(sgtDataStruct.ID, position, sgtPosition));
    20.  
    21.                 }
    22.  
    23.             }
    24.  
    25.         }
    26.  
    27.  
    In SgtFloatingSpawner I see :

    Code (CSharp):
    1. protected SgtFloatingObject SpawnAt(SgtPosition position, int index)
    2.         {
    3.             if (tempPrefabs.Count > 0)
    4.             {
    5.                 if (randomizeIndex == true)
    6.                 {
    7.                     index = Random.Range(0, tempPrefabs.Count);
    8.                 }
    9.                 else
    10.                 {
    11.                     index %= tempPrefabs.Count;
    12.                 }
    13.  
    14.                 var prefab = tempPrefabs[index];
    15.  
    16.                 if (prefab != null)
    17.                 {
    18.                     var oldSeed        = prefab.Seed;
    19.                     var oldPosition    = prefab.Position;
    20.                     var oldPositionSet = prefab.PositionSet;
    21.                     prefab.Seed        = Random.Range(int.MinValue, int.MaxValue);
    22.                  
    23.                     ///// Changed////////////////////////////////////////////////////////////////////////////////////
    24.                  
    25.                     if(randomPosition == true)                          
    26.                     {
    27.                          prefab.Position    = position;
    28.                          prefab.PositionSet = true;
    29.                     }
    30.                     if(positionFromFile == true)
    31.                     {
    32.                          prefab.Position = positionFromList;
    33.                          prefab.PositionSet = true;
    34.                     }                                                                    
    35.                  
    36.                     //////////////////////////////////////////////////////////////////////////////////////////////////////////
    37.  
    38.                     var instance = Instantiate(prefab, SgtFloatingRoot.Root);
    39.  
    40.                     prefab.Seed        = oldSeed;
    41.                     prefab.Position    = oldPosition;
    42.                     prefab.PositionSet = oldPositionSet;
    43.  
    44.                     instances.Add(instance);
    45.  
    46.                     instance.InvokeOnSpawn();
    47.  
    48.                     return instance;
    49.                 }
    50.             }



    So. I got list of objects loaded from file. How to synhronize "protected SgtFloatingObject SpawnAt(SgtPosition position, int index)" and List<System>.little hint
    RGDS.
     
    Last edited: Dec 16, 2021
  19. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,103
    One global unit is 50,000,000 meters. At these extreme distances the precision of floating point values is very very low, so the raycast is likely missing your ship. I would imagine raycasts fail entirely beyond a certain distance. The only way to fix this is to manually perform a raycast using the SgtFloatingPoint/SgtPosition data.

    In the last version of SGT I modified SgtOcclusionScaler to support extreme distances like this. This was achieved by modifying the raycast end point (e.g. star) to be within a reasonable distance of the start point (e.g. ship). This means the raycast is performed within a smaller scale where floating precision is higher. This solution works well for spaceships and other smaller foreground objects.


    It looks like your system data only stores positions? If so, you should make a new component that implements SgtFloatingSpawner (e.g. like SgtFloatingSpawnerSphere). This component would store your systems, or a reference to a class that does, and then from SpawnAll() you would loop through all systems and call SpawnAt() with the loaded positions.
     
    michaljabrzyk likes this.
  20. nighty2

    nighty2

    Joined:
    Dec 29, 2020
    Posts:
    21
    Hi Darkcoder,

    thank you very much for the fast reply!
    However, I think I was not clear enough and hope the appended picture helps!

    After cleaning up the testscene some more, I ended up with the result that after calling SgtFloatingCamera.SetPosition() the raycasting works like it should. When instead moving the ship with rigidbody, cube B is raycastable only upon slow approach, but not anymore when the ship halted (weird). In this situation, when I call SgtFloatingCamera.SetPosition(), and set the ship to another position with another Cube, then raycasting works again. The latter does not work when I use SetPosition with passing the ships current position.

    So something gets messed up, but can be "repaired" through a method which is called during SetPosition().
    Do you have, by chance, an idea what this could be?
     

    Attached Files:

    Last edited: Dec 17, 2021
  21. nazarre

    nazarre

    Joined:
    Nov 3, 2019
    Posts:
    6
    Hi Darkcoder,

    Just bought the asset pack and love it! I am having one small issue that I haven't seen elsewhere. When I copy a planet into my scene (from the SGT/Features/Planet scenes) it appears perfectly and I have no problems seeing its textures when I run the game in the Unity editor. However, when I create a stand alone Windows built (or a WebGL build), the textures of the object do not appear in game.

    This issue doe not arise when I copy a Gas Giant or Star from other demo scenes (their textures appear just fine in both the in-Unity game and in the stand alone build, and also in a WebGL build).

    Any idea what might be causing this? I'm not getting any errors when I create my build, nor when I run the application inside of Unity.

    Thanks for any insight on this!
     
  22. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,103
    Oh I see, there's two possible issues I can think of:

    1 - Disable Rigidbody interpolation (assuming you have this enabled). Raycasts work using the previous physics frame information, whereas interpolation updates every render frame. This means there can be a difference between where the object is on screen and where the physics system thinks it is. This disparity can cause raycasts to behave unexpectedly, because the raycasts are performed using the visual positions. Fixing this would probably require a very complex scene setup with both physics and visual objects being separate.

    2 - There may be an order of operations issue. Your Rigidbody will be moved before Update in the FixedUpdate loop, and then the SgtFloatingPoint/Rigidbody/Camera component will check this to sync the new position to the SgtPosition data. It's possible your raycast code is executing between these two steps, so it's using the wrong data. You can probably fix this by increasing your script's execution order (e.g. 100).


    Can you let me know the exact version of Unity and render pipeline you're using? As well as any settings you've changed from the standard.
     
  23. nighty2

    nighty2

    Joined:
    Dec 29, 2020
    Posts:
    21
    Hi Darkcoder,

    the raycast problem seems to be rooted somewhere in sgt (or my usage of it?). Maybe it will also cause problems for others. I have created a very simple project to showcase this.

    [tldr] Here is a video ( 1 minute ):
    [/tldr]

    In this project, raycasting is used for two things. Target selection and collision detection.
    There is position A (0,0,0 0,0,0) with target A, and position B (0,0,0 ,0,0,3456) with target B.

    After calling SgtFloatingPoint.SetPosition( [position B]), the issues appear.
    When calling SetPosition again and setting MainCamera back to position A it works like expected.

    I could upload the project somewhere if you are interested (250MB).
    Tested with Unity Version 2020.3.4f1 and 2019.3.12f1
     
  24. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,103
    Sure, maybe you can make a unitypackage of just this scene and the example scripts? Then it should be less than 1mb. You can send it to me via private message or something.
     
  25. eClaroStudios

    eClaroStudios

    Joined:
    Dec 19, 2021
    Posts:
    1
    Hello All!

    Just purchased the toolkit and absolutely love it! I have multiple questions and I'm sure I'll have more than that as I progress in using the toolkit. Is there a discord channel or something of the like in order to bug the community with questions that might not need your specific attention @Darkcoder ?
     
  26. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,103
    Nope, just this forum thread or contacting me directly. Every question helps improve the product and documentation so I don't mind :D
     
  27. LightWeightBtard

    LightWeightBtard

    Joined:
    Jul 5, 2019
    Posts:
    2
    Hi, Has anybody managed to use MeshMaker or MeshBaker to optimise SGT planets for mobile? I cannot get any optimisation from these tools which is frustrating.
     
  28. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,103
    SGT comes with different resolution Geosphere meshes you can use, assuming the vertex/triangle count is the issue. There are no meshes to combine so Mesh Baker wouldn't be useful.
     
  29. LightWeightBtard

    LightWeightBtard

    Joined:
    Jul 5, 2019
    Posts:
    2
    Thanks. My issue seems to be the fill rate. Creating an empty scene with a single light, a standard unity 3D sphere with an SGT planet material (no water, no atmosphere, no effects etc.) reduces the frame rate on an Oculus quest from 72FPS to around 12FPS when zoomed to fill the screen. I tried using tools to bake light, create LODS. atlas textures, but none of the tools work since the planet has a nonstandard 'hidden' way of rendering. My project settings are optimised for mobile, and generating complex planets from another asset renders consistently at 72FPS with no additional optimisation on my part. I understand that the asset is not designed for mobile, but am sad that I cannot use tools built by others to optimise for mobile.
     
  30. HS_Dave

    HS_Dave

    Joined:
    Nov 23, 2013
    Posts:
    2
    Hi, this asset looks great! I see there is a demo which I'll try to play with tonight but my question is: I have an existing space exploration game I started some years ago that procedurally generates a galaxy of systems that you can jump between and travel to the planets etc and what I'm looking to do a up the visual quality and variation of everything - I am wondering if this pack would be a good fit? Eg, would it be as simple as setting up prefabs of the things I like and replacing my existing ones or do all the effects rely on something more complex under the hood that I would have to implement or even have to replace my existing things with? Trying to get an idea of how big of a job switching to your amazing pack would be :)

    thanks for your time!
     
  31. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,103
    The planet is rendered using Graphics.DrawMesh rather than a MeshRenderer. In any case, batching meshes and reducing the vertices will have no impact on the fillrate so it doesn't mater. You can still apply this material to a normal MeshRenderer if you want to test it, though you will be unable to have detail textures around the poles.

    If you've disabled every setting in SGT Planet then the only 'extra' thing it does over a basic shader is the "Albedo Shift" feature, which isn't particularly complex. You can try the "Planet (01)" material, which has everything disabled. You're telling me that this material gives you such a dramatic performance difference compared to say the Standard material with the same albedo + normal textures?

    The only 'extra' thing you have to do is add the SgtLight component to your star/sun lights, because SGT uses a custom lighting system for certain effects like the atmosphere. The rest works more or less the same as any other Unity GameObject. For example, you should be able to copy+paste the example planets into your scene or prefabs, tweak the settings to your liking, and it should work. This would allows you to gradually update your graphics one thing at a time.
     
    HS_Dave likes this.
  32. kamicth

    kamicth

    Joined:
    Sep 30, 2018
    Posts:
    31
    hello @Darkcoder.

    Playing with universe scale project since 3 year i'm still fascinated how much this assetpack is usefull.
    also welcome to SgtFloatingMassive which i had to look for usecase

    i'm currently searching for a more procedural approach for planets generations. already looked at sgt planets and sgt terrain ago and i know they do not opperate without pregenerated complete texture map.
    I know you are working on something dedicated to planets generation in separate assetpack. on the other side there is yet some alternatives. but they mostly fail to handle huge object like real size planets or give poor performances. the exception could be Orbis which promise performances, support flat spherical and cylinder shapes, and capable of infinite terrain size. it would be a good starting point if compatible with sgtfloating system. it make use of an internal origin rebase system for terrain calculation so i have some doubts (i didn't tried yet). did you ever look at this project for your research ? if so what do you think about their approach. would it be compatible with sgt componants ?
     
  33. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,103
    I've never used Orbis so I have no idea about compatibility. Judging by their store page video the planets don't look very large though (maybe 1km radius?). At these scales things are much easier to deal with. Once you get past 100km radius, you encounter many issues that are very difficult to overcome.

    I have some new planet systems in development that I plan to release next year, but there is still a lot of work to do. I don't want to release a new asset that is only marginally better than what I've already made, so I'm waiting until it's substantially better.

    Here's a sneak peak at one of those systems that is nearing completion:

    Rings.png

    This is a new set of components to render planetary rings. This planet is a 1:1 scale Saturn, with a ring thickness of 3 meters, rocks that are 1cm-20cm in radius, and the camera is 140,000 km away. The ring dust is volumetric, so you can seamlessly fly through them, and the rocks will appear anywhere you go. I also want to include some more procedural features, like a component to procedurally generate the ring texture and ring settings entirely. My plan is to release this as a new standalone asset with a reasonable price, similar to Space Graphics Planets. But that's for next year, for now it's time to relax and enjoy the holiday :D
     
  34. harpingseal

    harpingseal

    Joined:
    Sep 3, 2020
    Posts:
    50
    What is auto calulate mass
     
  35. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,103
    You mean SgtGravitySource.AutoSetMass? You can hover your mouse over the inspector setting to view the tooltip.
     
  36. shadm

    shadm

    Joined:
    Oct 11, 2014
    Posts:
    2
    Can't seem to get latest version to render sea correctly. Just newly installed, latest nvidia drivers, running one of the terrain demos.

     
    Last edited: Dec 30, 2021
  37. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,103
    Which Unity version, pipeline, etc?
     
  38. shadm

    shadm

    Joined:
    Oct 11, 2014
    Posts:
    2
    I realize im using an old 2019.4.14f version (out of th e box pipline), so when upgrading to latest and HDR it all works. Sorry I should have checked.
     
  39. ethaneditsbusiness

    ethaneditsbusiness

    Joined:
    Feb 6, 2020
    Posts:
    28
    What are your settings for that planet so that the textures do not look bad up close? I am trying to make a martian planet
     

    Attached Files:

  40. Ingeny

    Ingeny

    Joined:
    Oct 20, 2019
    Posts:
    3
    Hello,

    After opening the Earth-Sized Planet demo scene, I get a warning (please see the image below) that prevents the scripts from loading (another image below). Could you help, please?
     

    Attached Files:

  41. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,103
    SGT is developed in Unity 2019.4.12f1, so that should work. I've noticed before that this flipped refraction can appear if you enable or perhaps disable camera HDR. If it works now then great!


    Take a look at the Earth Sized Planet demo scene. This uses multiple detail layers (see planet material settings, and Planet + Terrain tutorial scenes).


    See HERE.
     
  42. Ingeny

    Ingeny

    Joined:
    Oct 20, 2019
    Posts:
    3
    Thank you, Darkcoder. I should read the documentation more thoughtfully.
     
    Darkcoder likes this.
  43. Ingeny

    Ingeny

    Joined:
    Oct 20, 2019
    Posts:
    3
    Hello Darkcoder,

    When I click on the question mark of an SGT component, for example, an SGT Billboard component, I get redirected to a page on bitbucket.org, for example, https://bitbucket.org/Darkcoder/space-graphics-toolkit/wiki/SgtBillboard, which says:

    "Repository not found. The requested repository either does not exist or you do not have access. If you believe this repository exists and you have access, make sure you're authenticated."

    Is the wiki on bitbucket replaced by carloswilkes.com/Documentation, in this case by
    https://carloswilkes.com/Documentation/SpaceGraphicsToolkit#SgtBillboard
    ?

    Thank you.
     
  44. ethaneditsbusiness

    ethaneditsbusiness

    Joined:
    Feb 6, 2020
    Posts:
    28
    I figured it out, it looks pretty great now (I think it was my graphics settings or something)! I just need to add some rocks to give it more detail. My next question, I think I have asked it before but have you or anyone else managed to get a first person controller working with spherical gravity on these planets? If so, any help is appreciated.
     
  45. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,103
    Thanks for pointing this out, I'll fix it in the next version. I'm surprised nobody noticed this before :D


    No idea about other solutions, but the SgtTerrainObject component will automatically position and rotate the current GameObject to the planet. Yo can then apply Rigidbody forces to it relative to its current orientation, and it will move. This is how the Planet Surfind demo scene works. You may be able to attach an FPS controller as a child of this GameObject and it might work. If not, it would have to support being able to specify a custom 'up' vector to match the planet.
     
  46. ethaneditsbusiness

    ethaneditsbusiness

    Joined:
    Feb 6, 2020
    Posts:
    28
    So i got an FPS controller working on a small planet, using code from here: https://github.com/SebLague/Spherical-Gravity/blob/master/FirstPersonController.cs (image1)

    The issue is, when I try to use it on a planet like the Earth-like one, i get issues like this (image2) because of the size.

    Now if I try to apply a Floating Object to this, my gameobject is literally flung across the planet, and I still have crazy graphical glitches. Has anybody managed to get a character controller or similar working with a large scale planet like in the Earth-like demo?
     

    Attached Files:

  47. ethaneditsbusiness

    ethaneditsbusiness

    Joined:
    Feb 6, 2020
    Posts:
    28
    Okay, so i just copy and pasted the Earth Demo, put in the Script i needed to for the Gravity Attractor (SebLague) and on my player controller I have a floating object, but I still get floating point graphical glitches. Here is a video:
     
  48. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,103
    It's hard to tell if you've configured this scene properly. Before you enter play mode you can see your Player's position is millions of units away from the origin, which will not work. Your camera should be within 100 units of the origin if you use the setup from Earth Sized Planet, and your character should be basically at the same position if it's first person.
     
  49. ethaneditsbusiness

    ethaneditsbusiness

    Joined:
    Feb 6, 2020
    Posts:
    28
    Ill try it out, thanks!
     
    Darkcoder likes this.
  50. Grommax

    Grommax

    Joined:
    Feb 26, 2019
    Posts:
    3
    Greetings!
    I recently bought a Sgt asset to develop a mobile space simulator. I can't solve the performance problem in any way when the ship approaches the planet - when the planet begins to occupy the entire screen, fps decreases very much. I understand that this is due to the shader working. I got the same problem using a standard unity shader on a large sphere. There is no problem if you use the Urp-Lit or Urp-SimpleLit shader.
    For the first test, I used a planet created using Sgt Planet with Planet (01) material with minimal settings, Geosphere 10 mesh. For the second test, I used the same planet, but added the atmosphere from the Water Level scene. Fps drops even with minimal settings, and if you add atmosphere, it's completely unplayable. At the same time, I would like to make as beautiful planets as possible, using both the atmosphere and clouds and the northern lights ...
    Unity 2020.3.25f1 URP. Sgt 3.9.13.
    The description of the asset states that it is optimized for mobile devices, and on the forum you write that Sgt is used in many mobile projects, so most likely the problem is in my misunderstanding of the settings, and not in the asset.
    Could you tell me how to solve the problem with a lower fps when approaching the planet?
    PS I really lack a guide for setting up an asset to optimize work on mobile devices.



    Thank you in advance!
     
unityunity