Search Unity

Space Graphics Toolkit & Planets

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

  1. Wawwaa

    Wawwaa

    Joined:
    Sep 30, 2017
    Posts:
    165
    I am working on a galaxy view. I want to give stars names and store them to use later. Similarly I need to store world positions of generated stars. I can write a simple script for this. But, I noticed you already store local positions in SgtStarfieldStar class. And SgtStarfieldCustom has a list of these stars.Is there a way to access this list, or generally the properties of the SgtStarfieldStar class on runtime?
     
  2. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    The SgtStarfieldCustom component has the public Stars field, which you can access. You could modify the SgtStarfieldStar data to include name, etc.
     
  3. Darkcoder

    Darkcoder

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

    Version 3.7.2 of Space Graphics Toolkit is now out!
    • Updated documentation.
    • Added asmdef.
    • Added Universe/Nested Orbits demo scene.
    • Moved SgtDynamicPlanet back to Terrain feature.
    • Fixed SgtStaticPlanet polar UV generation.
    • Removed auto package dependency install (see documentation).
    Nothing too exciting, but this should be a nice change for many people.

    Also,

    Version 3.7.2 of Space Graphics Planets is now out!

    This was previously called "Planet Pack - Space Graphics Toolkit", but I think the name was confusing and perhaps implied that it required SGT, when it was standalone. This has been updated to use the latest SGT components (mostly SRP support), and also includes many new demo scenes and prefabs, here's some pictures:









     
  4. dirkjacobasch

    dirkjacobasch

    Joined:
    Apr 24, 2018
    Posts:
    418
    Awesome. That makes it a lot easier.
     
  5. Pandur1982

    Pandur1982

    Joined:
    Jun 16, 2015
    Posts:
    275
    Hello, i have a question will it possibel to land on a Planet? My Idea is the player will landing on a littel Spacestation on the Planet, at the moment i use for that a loading screen to move the Player to a new szene in Unity.Thx for your answer.
     
  6. dirkjacobasch

    dirkjacobasch

    Joined:
    Apr 24, 2018
    Posts:
    418
    Yes, you can fly from space down to the planets surface.
     
    Darkcoder and JFI66 like this.
  7. Steve2375

    Steve2375

    Joined:
    Mar 28, 2015
    Posts:
    42
    Has anyone else problems with the latest update and the dynamic terrain demos? For me it says that there are missing scripts in f.e. the "Earth Sized Planet" demo project and I don't find any "Terrain" or "SgtDynamicPlanet" script in the project.
     
  8. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    Oops, not sure how I messed that up. I'll submit a new version and send you an early copy of it today.
     
    JFI66 and Steve2375 like this.
  9. Darkcoder

    Darkcoder

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


    50% OFF
    Space Graphics Planets

    >> Check It Out <<


    Also,

    3.7.3 of Space Graphics Toolkit is now out!
    • Fixed SgtStaticPlanet bounds when layering atmosphere and cloudsphere.
    • Moved SgtDynamicPlanet back to Planet feature.
    Just small fixes, though forgetting to include SgtDynamicPlanet was important to fix :D
     
  10. MasonWheeler

    MasonWheeler

    Joined:
    Apr 2, 2016
    Posts:
    219
    When I try async loading a scene with SGT in it, I get a very noticeable pause in the gameplay. Here's what the profiler says:

    upload_2020-6-2_12-11-42.png

    SgtDynamicPlanet and SgtBelt are both taking a significant amount of time to initialize, particularly the former. Any way that could be brought down?
     
  11. MasonWheeler

    MasonWheeler

    Joined:
    Apr 2, 2016
    Posts:
    219
    Looks like the init time for SgtDynamicPlanet is pure number crunching. That can be moved off of the main thread with changes to three methods:
    Code (CSharp):
    1.         protected virtual async void OnEnable()
    2.         {
    3.             node = Instances.AddLast(this);
    4.  
    5.             await BuildHeightmap();
    6.  
    7.             if (Instances.Count == 1)
    8.             {
    9.                 AllocateJobData();
    10.             }
    11.  
    12.             if (rootChunks[0] == null)
    13.             {
    14.                 BuildRootChunks();
    15.             }
    16.  
    17.             SgtHelper.OnCalculateDistance += HandleCalculateDistance;
    18.         }
    19.  
    20.         private async Task BuildHeightmap()
    21.         {
    22. #if UNITY_EDITOR
    23.             SgtHelper.MakeTextureReadable(heightmap);
    24. #endif
    25.             ClearHeightmap();
    26.  
    27.             if (heightmap != null)
    28.             {
    29.                 var pixels = heightmap.GetPixels();
    30.                 var total  = pixels.Length;
    31.  
    32.                 heightmapSize = new int2(heightmap.width, heightmap.height);
    33.  
    34.                 await Task.Run(() =>
    35.                 {
    36.                     var hmd = new NativeArray<float>(total, Allocator.Persistent);
    37.                     for (var i = 0; i < total; i++)
    38.                     {
    39.                         hmd[i] = pixels[i].a;
    40.                     }
    41.  
    42.                     var t = (heightmapSize.y - 1) * heightmapSize.x;
    43.  
    44.                     for (var x = 1; x < heightmapSize.x; x++)
    45.                     {
    46.                         hmd[x] = hmd[0];
    47.                         hmd[x + t] = hmd[t];
    48.                     }
    49.                     heightmapData = hmd;
    50.                 });
    51.             }
    52.         }
    53.  
    54.         private void UpdateLod()
    55.         {
    56.             if (testingQueue.Count == 0)
    57.             {
    58.                 if (pendingQueue.Count == 0)
    59.                 {
    60.                     if (rootChunks[0] != null)
    61.                     {
    62.                         testingQueue.AddRange(rootChunks);
    63.                     }
    64.                 }
    65.                 else
    66.                 {
    67.                     testingQueue.AddRange(pendingQueue); pendingQueue.Clear();
    68.                 }
    69.             }
    70.  
    71. [REST OF METHOD GOES HERE, UNCHANGED]
    72.         }
    (Also, what's the purpose of pendingQueue? There's no point in the class where items are added to it, and it's private so nothing gets added to it from external sources either.)
     
  12. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    pendingQueue is some part of some code I forgot to remove.

    Your change is good, though I try to avoid all 'newer' C# features due to Unity support often lagging behind by many years, especially on non desktop platforms. If async/await works on all platforms now without using alpha versions or something silly then I can consider implementing this.
     
    JFI66 likes this.
  13. MasonWheeler

    MasonWheeler

    Joined:
    Apr 2, 2016
    Posts:
    219
    It's been supported in Unity since version 2017, and the underlying mechanism simply relies on classes that have been in the BCL (and Mono) since 2013. Assuming Unity is using a version of Mono newer than that, it will work on mobile.
     
  14. JFI66

    JFI66

    Joined:
    Aug 25, 2015
    Posts:
    41
    Hi,

    I have this issue with
    Assets\Space Graphics Toolkit\Features\Planet\Scripts\SgtDynamicPlanet.cs(5,13): error CS0234: The type or namespace name 'Mathematics' does not exist in the namespace 'Unity' (are you missing an assembly reference?)

    again; is it just me?
    I'm using unity 2019.3.15

    Thanks in advance
     
  15. MasonWheeler

    MasonWheeler

    Joined:
    Apr 2, 2016
    Posts:
    219
    That means you haven't installed the dependencies in the package manager.
     
    JFI66 likes this.
  16. JFI66

    JFI66

    Joined:
    Aug 25, 2015
    Posts:
    41
    yes, I had to install them manually before importing.
     
  17. dirkjacobasch

    dirkjacobasch

    Joined:
    Apr 24, 2018
    Posts:
    418
    Maybe the wrong version for SGT?
     
  18. JFI66

    JFI66

    Joined:
    Aug 25, 2015
    Posts:
    41
    its working, but you have to manually install Mathematics
     
  19. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    Yes, this is in the second section of the documentation HERE. Making it automatic doesn't work as expected in 2018 so I made it manual.
     
    JFI66 likes this.
  20. splitdev

    splitdev

    Joined:
    Oct 24, 2018
    Posts:
    9
    Hi Carlos,

    I just discovered Space Graphics Toolkit and unfortunately missed it in the big sale a while ago, otherwise I would have bought it :(
    But as your "Space Graphics Planets" are on sale one question: Do the planets there allow for a similar experience like those in SGT? Especially do they have dynamic LOD and allow for seamless transition from space to surface landing + volumetric atmosphere? Or are they meant to be viewed from space only? :)

    Cheers!
    Andy
     
  21. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    I just tried to install the planets pack on 2018 LTS (18.4.)

    Import fails because there is no Collections pack. I did import Burst and Mathematics.

    Any advice appreciated,
    -
    ch
     
  22. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    Space Graphics Planets contains the same planet shader and volumetric atmosphere components from the full SGT, but it doesn't include the dynamic LOD system. While you can still seamlessly fly from space down to the surface of your planets and land, the mesh resolution is based on the sphere mesh you choose (comes with spheres up to 200k tris), and that is then deformed using the heightmap of that planet and your displacement + water level settings. For this reason I didn't include any screenshots on the surface of planets, because it's not high enough detail to match the apparent large scale when viewed from orbit. If your game works on a smaller scale like Spore, then this should be no problem though.


    To manually import collections you must first enable the 'show preview packages' setting, which is under the Advanced dropdown. Strange that it didn't import with Burst though.
     
  23. splitdev

    splitdev

    Joined:
    Oct 24, 2018
    Posts:
    9
    Too bad, that was actually the functionality I was looking for (LOD of the planet for landing).

    But thank you for your quick answer :)
     
  24. mattxreality

    mattxreality

    Joined:
    Dec 11, 2018
    Posts:
    57
    Unity.Mathematics errors on a new project Unity 2019.3.15f1
    The Mathematics Package was not installed, so I manually installed it to try and fix, but this did not fix two scripts that continue to have console errors.
    SgtDynamicPlanet_Job.cs
    SgtDynamicPlanetDetail.cs

    (Second troubleshooting effort)
    It looks like another package was missing, "Burst". Once I added Burst and Mathematics to the Unity project the SGT errors went away. I've never had to do this before on previous projects using SGT.
     

    Attached Files:

    Last edited: Jun 6, 2020
  25. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    In version 3.7.0 the SgtTerrain component was rewritten and replaced with SgtDynamicPlanet, which is implemented using burst+mathematics+collections. Initially I made these packages auto import with SGT, but this causes problems because I develop in 2018 which has the package manager UI which no longer exists in 2019 and thus gives errors, I also develop with LWRP and HDRP installed, which many users may not want, and there's no way to pick which packages get installed, not to mention it will likely install an undesirable version. Therefore, you must now manually install them, as detailed in the documentation HERE, which I will make clearer in the next version.
     
    mattxreality and JFI66 like this.
  26. mattxreality

    mattxreality

    Joined:
    Dec 11, 2018
    Posts:
    57
    Thank you, I appreciate the info. I'm continuing to work with SGT on my VR project and ran into another issue, this time with billboard overlay not working when in play mode. I see the billboard scaling when in the Unity scenes. SGT Depth Scale works fine when editing the project. When I press play, it no longer works. I also have this error message in the console with error, "Assertion failed on expression: 'IsMatrixValid(matrix)' UnityEngine.Camera:Render(): 2020-06-07_21-51-52.png

    I wanted to test a known-good scene, so went straight to one of the demo scenes "02 + Depth" to test. In the editor scaling works, but not in play. Neither the headset nor Scene view show correct billboard scaling during play.
     
  27. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    I just tried the latest version of SGT in Unity 2019.3.7f1 with the "02 + Depth" demo scene on my Rift and notice no issues in both the legacy XR system, and the new XR Manager. However, if I change the rendering mode in the new XR Manager to Single Pass Instanced then it doesn't work properly, as I can only see the asteroid in my right eye, the left eye seems fine though. The warning you got at the top indicates it may be switching to this, so that might be the problem. Can you try experimenting with different settings to see if any work?
     
    JFI66 likes this.
  28. Adam_Benko

    Adam_Benko

    Joined:
    Jun 16, 2018
    Posts:
    105
    Hi. I am trying to add an atmosphere to the planet but I just end up with atmosphere that looks like it is coming from behind the planet. I went step by step, even copied the component info from working atmosphere on your example to the new atmosphere on the same planet but I still failed to recreate it. It looks like this:

    What am I doing wrong ?
     

    Attached Files:

    JFI66 likes this.
  29. dirkjacobasch

    dirkjacobasch

    Joined:
    Apr 24, 2018
    Posts:
    418
    Drag the atmosphere into the Shared Material slot of the planet.
     
    Adam_Benko, Darkcoder and JFI66 like this.
  30. mattxreality

    mattxreality

    Joined:
    Dec 11, 2018
    Posts:
    57
    Hello, Yes, I can try experimenting. As for the Stereo Rendering Mode, I see different requirements for different XR setups. In my case, I'm using the Oculus Integration and URP. The Mode that works for me is Single Pass. Perhaps there is an issue with rendering specific game objects or shaders when in this configuration. I was able to see the billboard scaling in another project where I built my own XR Rig using the new native Unity XR manager.
     
  31. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    Basically what dirkjacobasch said. If your planet surface uses MeshFilter+MeshRenderer then you must drag and drop this GameObject into the SharedMaterial component's Renderers list. If your planet surface uses SgtStaticPlanet/SgtDynamicPlanet, then you must drag and drop the atmosphere GameObject into the SharedMaterial setting.

    I'll try and experiment with this later this week. I only tested SGT with the legacy XR setup due to how easy to is to switch on/off, but it seems like the XR Manager works differently so I'll have to test that too.
     
    Adam_Benko likes this.
  32. michaljabrzyk

    michaljabrzyk

    Joined:
    Apr 15, 2013
    Posts:
    57
    prtsc.png Hi. I need to block x axis in SgtCameraLook and include a Clamp for camera in x and y axis. Any ideas how to do this?
     
    Last edited: Jun 9, 2020
  33. Adam_Benko

    Adam_Benko

    Joined:
    Jun 16, 2018
    Posts:
    105
    Hi. I am making Backdrop right now(starts and clouds in the background) but I have no idea how to make it
    not change the size of the stars/clouds when I am zooming in and out
    (top down view in the game, changing the field of view for the camera). Is
    there a script from you that could prevent the change in size for the
    stars in Backdrop, when changing FOV of the camera ?
    Thanks.
     
  34. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    Inside the SgtCameraLook code you can see the AddToDelta method on line 42, the first line gets the Vector2D 'delta' of the mouse/finger movement across the screen. To block the x axis you can just add a line like: delta.x = 0.0f;

    Clamping the x and y axis is much more difficult, because this component rotates the camera relative to its current rotation, rather than being based on a pitch/yaw as most FPS games do. Here's one approach:

    1 - Create a Transform that will define the frame of reference for your clamping.
    2 - Multiply your camera rotation by the inverse of this transform rotation. This will give you the local camera rotation relative to this Transform.
    3 - Get the forward vector of this local rotation.
    4 - Get the x and y angle of this forward vector. You can get the x (yaw) with Atan2(forward.x, forward.z) and y (pitch) with Asin(forward.y).
    5 - If these values exceed your limits then you can tilt the rotation around the x and/or y axes to put them back.
    6 - Multiply this new clamped rotation by the frame of reference Transform rotation to get back to world space, and apply it to the camera.


    Are you talking about the world size or the screen size? When zooming in the stars should remain at a constant world size, but due to a lower FOV this will mean they take up more space on the screen. If you want to disable this then you can modify "Space Graphics Toolkit\Features\Backdrop\Resources\SgtBackdrop.Shader" line 77 from:

    Code (csharp):
    1. float scale   = saturate(size / sizeMin);
    to:

    Code (csharp):
    1. float scale   = (size / sizeMin);
    As long as you enable ClampSize, this will make every star the same size on the screen regardless of zoom level. It's also possible to make them have variable sizes, but that requires more modification.
     
    Adam_Benko and JFI66 like this.
  35. XyrisKenn

    XyrisKenn

    Joined:
    Dec 8, 2015
    Posts:
    92
    Hello, I just purchased your Space Kit. It's gorgeous clever design.
    I have a basic question: Can a starfield like Infinite have a "hollow" void empty of stars, where my game takes place?
    This is to avoid having stars inside structures and ships. Not like a Skybox, but rather with your generated stars which are a much better effect for depth.

    TL;DR the starfields are volumes but I need an empty space in the center so that stars don't appear inside rooms and ships.

    [Edit] Thinking of it, 'voids' would be a useful option, fx use a collider to remove stars and objects within it. Voids exist in cosmic nature; perhaps there is a practical case for this.
     
    Last edited: Jun 11, 2020
  36. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    There's currently no feature like this for starfields, but it could be added. How it's implemented depends on the size of your scene though. If your scene is huge and your stars relatively small, then it would be easy enough to add by changing the overall scale of the stars or count of the stars in the infinite starfield based on your position. If your scene is small and you need to be able to see an obvious void in the starfield then it would require a different solution that's probably more complex.
     
  37. XyrisKenn

    XyrisKenn

    Joined:
    Dec 8, 2015
    Posts:
    92
    I suppose a distance from a point in my scene to clear stars from the Local playing area could work. Currently my demo scene is using a culling max distance of 16000.
    At the moment I’m using three Belt starfields with different rotation and thickness settings to ‘sort of’ create a hollow spherical shell of stars.

    What do you think of optionally curvIng into a spherical shape star billboards in Belt as distance increases? Currently Thickness moves stars away from the Belt centre in a linear path creating a cylindrical shape. I imagine a ‘Gravity’ or ‘Polar Bias’ slider that could be used to pull stars distant from the elliptical into a spherical shape overall resulting in a sphere with a hollow centre. The central ‘void’ is defined by the existing Belt’s inner setting.

    these tools are extremely flexible. I find myself composing environments in a fluid and productive way. The scripts are well organized and easy to use.
     
  38. Adam_Benko

    Adam_Benko

    Joined:
    Jun 16, 2018
    Posts:
    105
    Hi. I am making parallax effect right now and I thought that instead of painting my own stars in GIMP, I could use yours. I am moving my stars by adjusting the tilling of the shader, that has this star texture.
    This is my code:

    Code (CSharp):
    1. [Range(0.0f, 95.0f)]
    2.     public float parallaxSpeed = 2f;
    3.  
    4.     void Update()
    5.     {
    6.         MeshRenderer mr = GetComponent<MeshRenderer>();
    7.  
    8.         Material mat = mr.material;
    9.         Vector2 offset = mat.GetTextureOffset("_BaseMap");
    10.  
    11.         offset.x = transform.position.x / transform.localScale.x / parallaxSpeed;
    12.         offset.y = transform.position.y / transform.localScale.y / parallaxSpeed;
    13.  
    14.  
    15.         mat.SetTextureOffset("_BaseMap", offset);
    16.  
    17.     }
    Is there a way to modify your backdrop script, so that I could transform the position of your generated stars and move them with camera, like I did with my script ? Thanks.

    Btw. implementing parallax effect into your asset could be cool. I am sure that a lot of people could use it in their space games.
     
  39. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    Is there any demo (not video) showing the Dynamic Planet Mesh LOD and Seamless Planetary Landing features?
     
    Last edited: Jun 16, 2020
    MasonWheeler likes this.
  40. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    Warping the belt into a sphere is easy enough to do. However, the main feature of the belt is its orbital animation, and this would look weird at the poles based on the way the orbit currently works. It would mean stars near the poles would barely move, whereas stars near the equator would move very fast. If you don't need orbital animation then you can use the SgtStarfieldElliptical component instead, which can already do what you describe. You could even make them 'orbit' by making several of these starfields and use the SgtRotate component to spin them.


    The SgtBackdrop component is designed to be a static sphere shell of stars, so this kind of change wouldn't make that much sense. If your game uses a 3D camera that moves along a 2D plane then you can use the SgtStarfieldBox or SgtStarfieldInfinite components, which are placed in 3D and will thus automatically have parallax as you move the camera. If your camera is orthographic then you could make multiple layers of these and shift them at different rates possibly.


    Yes, the "Features/Planet" folder examples 13 - 20 show you how to implement the main dynamic planet features, and the "Basic Pack" folder's "Earth Sized Planet", "Terrestrial Planet", and "Terrestrial Planet + Ring" demo scenes show you a more game ready scenarios. I plan to add some more in the future, especially ones that incorporate more of the origin shifting system.
     
    Last edited: Sep 24, 2022
    JFI66 likes this.
  41. XyrisKenn

    XyrisKenn

    Joined:
    Dec 8, 2015
    Posts:
    92
    "you can use the SgtStarfieldElliptical component instead, which can already do what you describe."

    Exceptional! That looks great, especially with the definable star sizes. Thank you for this advice.
     
    JFI66 and Darkcoder like this.
  42. Beauque

    Beauque

    Joined:
    Mar 7, 2017
    Posts:
    61
    Hi,
    I am currently prototyping a game with asteroid sized planets in URP and I think SGT is going to save my life.
    I customised the SGT planet shader in ShaderGraph to add some vertex displacement on dynamic planets when we come close to the surface. However as soon as the vertex offset is higher than 0, the rendering of the planet atmosphere breaks:
    Vertex offset <= 0 VS vertex offset = 0.15
    upload_2020-6-22_14-5-58.png upload_2020-6-22_14-6-40.png
    I assume the atmosphere rendering is somehow bound to the planet rendering or geometry.

    Any idea why I get this and how to solve it?


    I want to achieve something similar to what the Dynamic Planet Detail component does, but using a tiling texture instead of procedural noise:
    upload_2020-6-22_14-14-58.png
     
    JFI66 likes this.
  43. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    The SgtAtmosphere component adds an atmosphere material layer to your meshes, and the shader used to render this uses its own vertex shader. This shader doesn't have knowledge of your custom vertex displacement, which is why displacement doesn't work with it. To fix this you either have to modify the atmosphere shader to include this, or use a different atmosphere implementation that works in screen space.

    I'm working on a screen space atmosphere shader for this new planet rendering asset that will be released later this year, but since it's so different and has higher system requirements than SgtAtmosphere, it may never appear in the SGT asset itself.
     
    JFI66 likes this.
  44. Beauque

    Beauque

    Joined:
    Mar 7, 2017
    Posts:
    61
    I see, so I will maybe look for other atmosphere implementations for now. Thanks.


    An other question: I would also like to have several rigibodies evolving on the planet surface while the player is away. Since I am using Dynamic Planets with LODs, how would I deal with collisions when the main camera isn't nearby to generate mesh colliders on the surface? For instance is there a way to generate one single mesh collider at a fixed resolution for the whole planet, like it is done on static planets? Thanks
     
    Last edited: Jun 22, 2020
  45. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    You must call the TryGetWorldPoint method, which will give you the nearest surface point in world space relative to the input world point. If your camera is really far away then you will have to use TryGetLocalPoint and handle things in local space.
     
  46. Astaelan1

    Astaelan1

    Joined:
    Sep 29, 2015
    Posts:
    192
    @Darkcoder

    Just ran across this asset, I'm hovering over the buy button, looks really impressive... so first, kudos, well done.

    But before I purchase, I had a few questions I'm hoping can be clarified. Even if the answers are no, I'll probably still purchase but at least I'll know what I'm getting into.

    1a) I've read the last few pages, sounds like grass/details/water are in the works, while the prefab spawner can be used to spawn meshes at close range, this is a sufficient bandaid for details but what are the chances of integrating support for something like Vegetation Studio Pro? Might be worth looking into this before writing your own details shader, or if people are already using it I'd love a little info on any gotchas with it.
    Otherwise, what sort of timeline are you looking at before we will have an optimized system for terrain details? I'd like to have the option to use SpeedTree 8 for high quality PBR, good wind simulation, and consistent availability of additional assets (and I can generate new variants). But of course I need a shader optimized for this that plays nice with the way the planets are generated from deformed sphere meshes.

    1b) Regarding water, I see it's already there, but some reading suggests it's just a flat plane primarily used to create the distance view of planets with oceans. How difficult would it be, when inside the atmosphere/landed to swap out the water plane with something like Crest for the detailed ocean waves?

    2) I read back a bit but only found a couple brief mentions about network syncronization, has everything been distilled down to a seed that can easily be syncronized along with orbital data for interpolation?

    3) Gravity is a factor mostly dealt with in the controller, I saw mention of a "shuttle/thruster" controller, does this include some reference code for working with gravity from different perspectives? Such as planet gravity (pulling player to the surface), vs ship gravity (orienting player to the ground of a ship, regardless of orientation)? I saw brief mention of this but can't find any details about how far the gravity support goes.

    4) Recent posts you suggested a new planet rendering or generating product that may not be part of SGT, could you elaborate more on this and whether it'll be something we can plugin for higher quality planets while still using SGT for all the other bells and whistles?

    5) Probably not supported yet, but are there any plans for generation of caves, mines, and other underground cavity formations? This would be useful in generation of asteroids as well.

    6) Are the procedural asteroids given mesh colliders when getting close to them so that they can be interacted with?

    7) Is there a way to procedurally generate asteroids with removal deltas to remove asteroids that have been destroyed/mined for example? Or more accurately, to remove the procedural version, and replace with a prefab that can be modified (chipped away, split apart, etc). To elaborate a bit further, need to be able to hook into the procedural generation to remove procedural, and add prefab where data overrides... given the nature of this kit, I'd say this is probably already supported in some fashion.

    8a) I didn't see a lot of videos that really gave a clear picture on this, but do the planets spin to simulate daily cycles? Is there a natural day/night cycle based on spinning of planets?

    8b) Can you see stars and other planets at night when "landed", or inside the atmosphere of a planet?

    Thank you kindly for your time and hard work on this asset, I'm sure I'm going to purchase because it will save me many hours regardless.
     
  47. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    1a) Assets like Vegetation Studio Pro work on flat terrains, which are fundamentally different to spherical planets. Therefore, there is likely no way to integrate them, and I don't plan to try. The current object spawning system allows you to specify prefabs, placement splat maps, and additional settings like spawn count and orientation, which should be sufficient for most scenarios. This means it should work with SpeedTree and other assets that allow you to place prefabs.

    1b) Like with VSP, Crest is only designed for flat terrains, so it would not work with spherical worlds. It's very easy to not use the SGT (flat solid) water and replace it with your own sphere with some kind of custom shader/material, but it would have to work using the depth buffer or heightmap to be compatible.

    2) The object spawning is currently random, but I will make it procedural based on the planet seed in a future version.

    3) SGT comes with the SgtGravitySource and SgtGravityReceiver components, which can be combined to create Newtonian gravity. The example spaceship controller orients itself to the camera rotation which can roll in local space, there is no special code that takes the gravity into account, it just falls naturally regardless of orientation.

    4) This new asset will be fully compatible with all existing features of SGT with the exception of the atmosphere & corona systems, because it will likely come with its own.

    5) No, this would require a fundamentally different terrain geometry technique that I don't plan to implement.

    6) The SgtRing asteroid belts cannot be interacted with, they're just very high performance rings with orbital animation. If you need interaction the SgtDebris or origin shifting spawner systems can be used to spawn actual prefabs.

    7) No, this would require some custom code that can store the destruction state and cancel the spawning of asteroids. The current examples for origin shifting spawners and debris will re-spawn all procedural objects when you re-visit the same area.

    8a) You can use the SgtRotate component to rotate any object you like, or SgtSimpleOrbit/SgtFloatingOrbit to create orbits. It's not recommended to use these on dynamic LOD planets though, because it will mess up the physics system rotating something so large. In this scenario you would have to use some visual tricks to halt the rotation and record what rotation it should be when you get far enough away, etc.

    8b) Yes, you can separately control the atmosphere thickness during night time to reveal stars and other objects in space.

    Keep in mind this asset is mainly focused on the rendering of space scenes, not so much the management of an active universe the player (or multi players) can interact with. Those kinds of features are incredibly game specific, so it's left up to you to manage most of it yourself with the hopefully well designed set of components you can tweak based on your game state.
     
    Last edited: Sep 24, 2022
  48. Astaelan1

    Astaelan1

    Joined:
    Sep 29, 2015
    Posts:
    192
    Thank you very much for the quick response, I had a feeling most of those things were not going to work but I just wanted to check. Still a great product, and I'll probably purchase for a starting point, thank you.
     
    Darkcoder likes this.
  49. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    Have you planned to include the Dynamic Lod Planet feature in a new asset more centered on planets and with a more affordable price than Space graphics toolkit?
     
  50. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    No, this feature will only be part of the full SGT asset. However, I do plan to release a new dynamic LOD planet asset that will feature a completely new implementation. The initial versions of this will be at a lower price point than SGT, but it will increase as the features do. I can't say when this will be ready though, because I've been very busy recently.
     
    angel_m and JFI66 like this.