Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

Space Graphics Toolkit & Planets

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

  1. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    2,836
    What device are you testing this with? Maybe it's just not powerful enough for this.

    The atmosphere shaders in SGT are highly optimized, and the planet surface shader is very simple if you disable everything. However, there is only so much that can be done since they take up so much screen space. If your display is 1024x768 then that's almost 1 million pixels that must be rendered for the ground, and if you have an atmosphere that's 2 more million pixels because the outside/sky and ground are rendered separately.

    If your background clouds are made using SGT's backdrop feature then you may want to disable it, as that's probably another full screen rendering.

    You can enable the Overdraw rendering mode in the editor's Scene view to see how many times each pixel is being rendered.
     
  2. Grommax

    Grommax

    Joined:
    Feb 26, 2019
    Posts:
    3
    Honor 20s, the phone is not weak, but the resolution is large 2312×1080.
    Yes, background clouds are created using Sgt Backdoor. It's a pity that I can't even use them.
    It looks like overdraw mode is disabled in urp. But, apparently, there is no such problem in the editor, it is only on the phone.
    It turns out that there are no options to make an approach to the planets on a mobile phone using Sgt?
     
  3. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    2,836
    The Honor 20 isn't weak, but because of its high resolution its graphical benchmark results are similar to iPhone 7.

    You can use backdrop, but it's not necessary when you land on the planet since you won't be able to see it, so it's a good simple optimization to fade it out and hide it in this scenario. You can also try doing the same with the backdrop stars. You should try and profile everything as much as possible. If you can't see overdraw in URP then try making a built in pipeline project to check it.

    Another optimization for such a high resolution display is to render at a lower resolution and upscale.
     
  4. michaljabrzyk

    michaljabrzyk

    Joined:
    Apr 15, 2013
    Posts:
    53
    Hi Darkcoder i send you a private(conversation) message. I have little problem with spawning and destroying objects.

    When player out of range with code "if(distance < range)" {destroy object} - and that works. But spawns many times in different points. It looks like SgtPosition is other for spawning or calulated position when i add object to spawn list, is diffrent from that what is calculated (PointFromFile * unit). Range = new SgtLenght(range, SgtLenght.Scale.Parsec).
    distance = new SgtPosition.Distance(sgtPostion, cameraposition);
    I know it looks messy :) but it's only a test script.
     
  5. michaljabrzyk

    michaljabrzyk

    Joined:
    Apr 15, 2013
    Posts:
    53
    Fixed :). all works good silly mistake
    systemGameObject.GetComponent<SgtFloatingObject>().Position = systems.PositionSgt;
    systemGameObject.GetComponent<SgtFloatingObject>().DerivePosition(); - changing SgtPosition to transform.position.
    ------ //systemGameObject.transform.position = systems.Position;---- that was wrong.
     
    Darkcoder likes this.
  6. Les-Bird

    Les-Bird

    Joined:
    Apr 22, 2013
    Posts:
    8
    Just an FYI, I made a game called Super Starship out on the App Store now where you can fly down to the planet surfaces and the performance is very good, even on iPhone 7 Plus (several generations old). See video of the game running on iPad here: https://superstarshipgame.com

    I use SgtBackground for stars/clouds, different settings for atmospheres depending on planet type and different types of terrain, again depending on planet type. All of this was based on the Earth Sized planet demo with some minor tweaks. One thing that made a big difference on the lower end devices is setting the detail value of the terrain based on device. For lower end devices I set it to 0.5, for higher end phone devices I set it to 1.0 and for higher end iPads I set it to 2.0.

    This game is 100% powered by Sgt.

    So you can absolutely make a game where you fly down to the planet surface on mobile devices using Sgt.

    I believe the limiter is the device itself. I don't know anything about the Honor phones so can't say how it performs compared to iPhones.

    Les
     
  7. ethaneditsbusiness

    ethaneditsbusiness

    Joined:
    Feb 6, 2020
    Posts:
    25
    Is there any way you could create a demo scene with an earth sized planet, camera+basic mesh with the floating origin system? I can't figure out how to get my scene configured correctly with the floating origin system I just get a bunch of mesh issues.
     
  8. Grommax

    Grommax

    Joined:
    Feb 26, 2019
    Posts:
    3
    Thanks. I'm glad to hear that. So it's still about the settings and I just need to figure them out and experiment.
     
  9. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    2,836
    The Earth Sized Planet demo scene does exactly this, and it implements the floating origin system.
     
  10. Les-Bird

    Les-Bird

    Joined:
    Apr 22, 2013
    Posts:
    8
    I updated my website with a bit of technical info that might help. The one thing that made a huge difference is the “detail” setting on the SGT_PlanetTerrain. For low end mobile you’ll want to set it to 0.5 or less. This setting adjusts how many triangles and vertices are rendered on a planet. I’ve seen as much as 6m tris and 3m verts at a planet surface with a setting of 2 and down to 1.8m tris and 940k verts by dropping it to 0.5. A huge difference in performance and memory usage.

    https://superstarshipgame.com/

    Les
     
    Grommax likes this.
  11. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    2,836
    I don't think he's using the dynamic LOD system. It's likely a fill rate issue with such a high resolution display paired with a relatively lower sped GPU, so the easiest solution is to manually lower the resolution.
     
    Les-Bird likes this.
  12. ethaneditsbusiness

    ethaneditsbusiness

    Joined:
    Feb 6, 2020
    Posts:
    25
    I mean like a player mesh, I have been working off the Earth Sized Planet demo for a while
     
    shadm likes this.
  13. SinDeSiecle

    SinDeSiecle

    Joined:
    Sep 30, 2017
    Posts:
    95
    Hey there! I've got my national government tech support for my game. He is the trailer:


    Thanks to Space Graphics Toolkit!... Here is 3 more links that are up to date:







    Again, thanks to SGT!
     
  14. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    2,836
    There's no player mesh walking on a planet example because SGT doesn't come with a character controller. The closest is the "Planet Surfing" demo scene, which also uses the floating origin system and works if you swap the planet to the Earth Sized Planet. I notice this planet has too many SgtTerrainSimplex Octaves though, so it makes the spaceship movement very bumpy. If you decrease these from 15 & 12 to something like 10 & 9 then it should be smooth.

    Looks great! I think that red ship drastically needs a graphical overhaul to match most of the other media :D
     
  15. SinDeSiecle

    SinDeSiecle

    Joined:
    Sep 30, 2017
    Posts:
    95
    Yep! That is the test ship which waits for an artist's touch.
     
    Darkcoder likes this.
  16. fatbeat

    fatbeat

    Joined:
    Nov 4, 2013
    Posts:
    3
    Hi, have you implemented that walking in a a way that player can go around whole planet?
     
  17. mattxreality

    mattxreality

    Joined:
    Dec 11, 2018
    Posts:
    40
    Hello @Darkcoder , I have a question about the planet ring system and texture aliasing. I am developing a VR app. In one of the scenes the player is on the ring near the edge. From this vantage point, there is a strong aliasing at the far edge of the ring. I know there is a setting in standard textures to configure the "Aniso Level" which creates mip maps for textures at oblique angles. To compensate for the aliasing, I've increased anti-aliasing to 4x, but the edge of the ring has relatively strong aliasing. Is there a setting on the ring script to adjust ring edge aliasing? Thank you
     

    Attached Files:

  18. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    2,836
    It looks like I forgot to enable the Alpha Is Transparency setting. Here's what it looks like with the current settings:

    upload_2022-1-17_12-14-25.png

    And with that enabled:

    upload_2022-1-17_12-15-26.png

    You may also want to set WrapMode = Clamp. To get better results you may want to modify or use a different ring texture. I made this ring texture a veeeery long time ago before I even started using Unity, and it looks like the edges of the texture blend into white. For better results these should go to black, or maintain their edge color. For example, here's a different ring texture:

    upload_2022-1-17_12-18-17.png
     
  19. nighty2

    nighty2

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

    have you been able to replicate the raycast issue?

    I know that time is sparse, but please take a look at it.
    A thorough solution by you would be much more preferable to workarounds I could think of.
     
unityunity