Search Unity

Space Graphics Toolkit & Planets

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

  1. Krooq

    Krooq

    Joined:
    Jan 30, 2013
    Posts:
    196
    None of the planet materials seem to be rendering in Unity 2022 beta, (HDRP 14.something) anyone else getting that?
    I don't expect support for beta versions, would just like to know if its a known issue.
     
  2. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    I don't test beta versions so I have no idea. All features of SGT (and my other assets) are rendered using the Better Shaders backend/compiler, which generates shader code for specific URP/HDRP versions. If something has broken in 2022 beta (HDRP 14) then Unity must have changed something. If so, you'll have to wait until it exits beta and Better Shaders updates to support it, and then I can update SGT.

    If I make an HDRP build in Unity 2022.1.20f1 of the Gravitational Waves + Water Level demo scenes combined, then you can see everything works as expected without any modifications:

    upload_2022-10-13_9-31-14.png
     
    Krooq likes this.
  3. Krooq

    Krooq

    Joined:
    Jan 30, 2013
    Posts:
    196
    Thanks for the info!
     
  4. lsgheero

    lsgheero

    Joined:
    Mar 24, 2013
    Posts:
    60
    @Darkcoder Is there a specific way I should change to a new scene if I am using SGT terrains, etc. Asking as when I go back to the main menu in my game and then attempt to join a new server (or start one) to play with others in a new match which will eventually reload the scene with the planet(s), etc again there are issues the level...

    Below are the errors I get from unity when I change scenes back to the main menu..


    Code (CSharp):
    1. InvalidOperationException: The previously scheduled job SgtTerrainSimplex:HeightsJob reads from the Unity.Collections.NativeArray`1[System.Single] HeightsJob.AreaWeights. You must call JobHandle.Complete() on the job SgtTerrainSimplex:HeightsJob, before you can deallocate the Unity.Collections.NativeArray`1[System.Single] safely.
    2. Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckDeallocateAndThrow (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle) (at <edb09cd490414b2684a18fe60d255a59>:0)
    3. Unity.Collections.LowLevel.Unsafe.DisposeSentinel.Dispose (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle& safety, Unity.Collections.LowLevel.Unsafe.DisposeSentinel& sentinel) (at <edb09cd490414b2684a18fe60d255a59>:0)
    4. Unity.Collections.NativeArray`1[T].Dispose () (at <edb09cd490414b2684a18fe60d255a59>:0)
    5. SpaceGraphicsToolkit.SgtTerrain.ScheduleDispose (System.IDisposable disposable) (at Assets/Plugins/CW/SpaceGraphicsToolkit/Features/Terrain/Required/Scripts/SgtTerrain.cs:110)
    6. SpaceGraphicsToolkit.SgtTerrainSimplex.OnDisable () (at Assets/Plugins/CW/SpaceGraphicsToolkit/Features/Terrain/Required/Scripts/SgtTerrainSimplex.cs:59)
    AND


    Code (CSharp):
    1. A Native Collection has not been disposed, resulting in a memory leak. Enable Full StackTraces to get more details.
    2.  
    ^^ which I assume is just related to the first error... My guess is that I need to be invoking some dispose(s) but I thought I would check with you before just going at it willy nilly in case you had other suggestions, etc.
     
  5. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    Could you prepare a demo scene with a terrain and a simple scene switching script that reliably demonstrates this issue?
     
  6. PolarEclipse

    PolarEclipse

    Joined:
    Oct 11, 2021
    Posts:
    17
    Hi @Darkcoder, I noticed a strange clipping issue with Jovian planets. I'm working on a VR project where you can "grab" planets with your virtual hands.
    I noticed a clipping issue where the fingers are visible through a Jovian planet, which doesn't happen with Rocky planets, as you can see in the screenshot below:

    upload_2022-10-13_15-50-18.png

    Any idea how I could fix the issue? My knowledge of shaders is almost null, I just tried to change the Render Queue but that didn't change anything.

    Thanks in advance!
     
  7. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    The jovian is rendered inside out, and your fingers are going inside the sphere so they appear to clip through like this. You can fix this by adding a sphere on top of the jovian with the "Depth" material that comes with SGT. This is shown in the Basic Pack/Jovian demo scene.
     
  8. harpingseal

    harpingseal

    Joined:
    Sep 3, 2020
    Posts:
    57
    Can terrain recieve shadows?
     
  9. harpingseal

    harpingseal

    Joined:
    Sep 3, 2020
    Posts:
    57
    And also , Why would't terrain area work, It just made my trees unspawnable and did not seem like its working, heres the diffuse, and splatmap
     

    Attached Files:

  10. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    Yes, it's just a normal MeshFilter & Renderer. Above a certain camera draw distance shadows can disappear though, at least in BiRP.


    No idea, try modifying the example terrain areas demo scene one step at a time with your settings until it breaks so you know what went wrong.
     
  11. lsgheero

    lsgheero

    Joined:
    Mar 24, 2013
    Posts:
    60
    @Darkcoder Sorry for the delay in getting back with you, The issue I posted about the other day was caused by something else had nothing todo with your stuff.. That said I did have another question if you or anyone else would be able to provide an example of how this would be accomplished (or if there is a script already for it that I missed)...

    Your system has rotations, orbits, etc. I am not sure how I would go about making sure that a player who is on a planet surface that rotates itself would be able to move about but at the same time still keep with the rotation of the planet so the planet is not moving under them as they are on it/in its atmosphere. Again any examples peeps can provide would be greatly appreciated.
     
  12. harpingseal

    harpingseal

    Joined:
    Sep 3, 2020
    Posts:
    57
    Ive fixed the issue butas you can see in my seccond reply, I have problems with splat mat
     
  13. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    You can either parent your player to the planet so it auto moves/rotates with the surface, or make/find a custom script that does the same thing without parenting.


    What am I supposed to do with two random splat images? As I said, take a look at the example splat map demo scene, and gradually modify it one step at a time to match your current setup. The second it breaks, you know what the problem is. I can't guess what is wrong with your scene.
     
  14. KingCeryn

    KingCeryn

    Joined:
    Feb 8, 2018
    Posts:
    158

    Question, im starting to convert some scripts to Mirror-compatible with this asset, and was wondering if you could point me in the right direction, in terms of which and how many modifications you had to make to the default SGTK scripts
     
  15. Darkcoder

    Darkcoder

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

    I'm proud to announce the release of a new asset:



    a.png

    b.png


    This is a pack of modular spaceship parts, spaceships, and a visual destruction system. Each part is highly detailed using state of the art mesh and shader techniques similar to those seen in Star Citizen. There is also a color and decal system that allows you to easily swap colors or materials for different in-game teams/factions. The spaceships are compiled into an optimized format for maximum in-game performance.

    This asset was made in collaboration with long time SGT supporter @dirkjacobasch (Store Page), thank you so much and I hope to partner on more assets in the future!

    The asset is currently 30% off for two weeks.

    Thanks for reading!

    >> GET SPACESHIPS HERE <<
     
    dirkjacobasch and blacksun666 like this.
  16. blacksun666

    blacksun666

    Joined:
    Dec 17, 2015
    Posts:
    214
    Do your products that use the better shaders work on 2021.3LTS? If not, how long till you upgrade to the 2021 Better Shaders product? If we have better shaders ourselves already how difficult is it to upgrade your products?
     
  17. foxyspace

    foxyspace

    Joined:
    Oct 16, 2021
    Posts:
    71
    Why is the Gravitaional Lensing even lensing at the front, it should be only the back.
     

    Attached Files:

    Last edited: Nov 5, 2022
  18. TheGonzoGamer

    TheGonzoGamer

    Joined:
    Apr 24, 2019
    Posts:
    35
    @Darkcoder
    Is there a way to have an effect halfway between FloatingScaler and Floating LOD?
    What I mean is...
    I have an object that is ring so adding FloatingScaler works BUT the billboard is visible up close instead of obscured like it would be if used with a planet.
    FloatingLOD would let me spawn a billboard when I get far away and remove it when I get close (which is the desired behavior) but it can't be scaled since FloatingScaler doesn't know about it.

    I could write up the script to combine the two but figured I would ask first if there is a built-in way to do this.

    ****EDIT****
    Looks like simpleScaler is what I need. unless there is something else.
     
    Last edited: Nov 4, 2022
  19. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    The latest version of SGT should be using Better Shaders 2021. If you have Better Shaders installed then you can select one of the SGT shader bundles, and click the button called Recompile All or similar.


    The lensing effect uses a full screen snapshot of the scene (Grab Pass in BiRP or Opaque Texture in URP/HDRP). Therefore, to make it only render things behind it, you would need to use Grab Pass in BiRP, and the object around the lens must be split into foreground/background halves, and they + the lens must have the same RenderQueue.


    You would have to make a custom script to do this. FloatingScaler works reasonably well with planets as you notice, but ideally this feature would be combined with some shader/material fading as well so it can work with non-opaque objects, and so it can also transition smoothly.
     
  20. foxyspace

    foxyspace

    Joined:
    Oct 16, 2021
    Posts:
    71
    In HDRP it uses Grab Pass BiRP and in URP its using Opaque Texture. I have switched back to URP and what do I need to do?
     
  21. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    HDRP and URP both use Opaque Texture. Only BiRP uses Grab Pass.
     
  22. AlexSokolov

    AlexSokolov

    Joined:
    Aug 22, 2015
    Posts:
    4
    Bug? Adding post-process layer to camera and enabling Temporal Anti-aliasing (TAA) mode causes permanent atmospere flickering (examples "02 Atmospere", etc.).

    Unity 2020.3.38, Built-in Render Pipeline, SGT 4.0.9.

     
    Last edited: Nov 8, 2022
  23. foxyspace

    foxyspace

    Joined:
    Oct 16, 2021
    Posts:
    71
    BiRP means Built-in Renderer Pipeline?
     
  24. dirkjacobasch

    dirkjacobasch

    Joined:
    Apr 24, 2018
    Posts:
    418
    Yes
     
  25. TheGonzoGamer

    TheGonzoGamer

    Joined:
    Apr 24, 2019
    Posts:
    35
    Error: Screen position out of view frustum.

    Not sure what I did wrong. Just testing some of the warping features.

    FloatingWarpSmoothstep.Point is set to ship

    Ship uses FloatingRigidbody at root.
    Using Space Combat Kit in conjunction with SGT.

    Video here
    youtube.com/watch?v=30D-bq61fTs
     
  26. ethaneditsbusiness

    ethaneditsbusiness

    Joined:
    Feb 6, 2020
    Posts:
    31
    Probably a float precision thing, what position is your camera at when you get these errors?
     
  27. TheGonzoGamer

    TheGonzoGamer

    Joined:
    Apr 24, 2019
    Posts:
    35

    FOR ANYONE USING SCK

    This was not a floating point issue. I had placed the SGT Camera component on the SCK Vehicle Camera object.
    I placed the FloatingRigidbody component on the ship.

    FIX
    Place the SGT FloatingCamera component on the ship.
    The SCK Vehicle Camera object is already set to follow the ship and doesn't need any additional scripts.

    All distortion is cleared away. And the universe uses the ship to orientate to.
     
    Darkcoder likes this.
  28. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    The atmosphere effect works by adding the transparent atmosphere material on top of the base opaque planet material. TAA works by jittering/shaking the camera around when rendering opaque objects, and then applying magic. Therefore, when rendering a planet with TAA there is a positional discrepancy between the two materials because it's opaque & transparent, and this causes the flickering because of the random jitter.

    To fix this you can change the atmosphere's base material's RenderQueue setting to be Geometry or AlphaTest or something like this so Unity applies the same jitter to it. Or, you can change the planet material to Transparency-1 or something so it doesn't have TAA. These will make sure both materials maintain their alignment, but I'm not sure what the visual implications of these changes will be.
     
    AlexSokolov likes this.
  29. raydekk

    raydekk

    Joined:
    Mar 14, 2013
    Posts:
    100
    Hey Darkcoder,

    Is there any way to make dark nebulae (black) with SGT Starfield Elliptical/Spiral/etc ?
    Like in the image below
    upload_2022-11-10_21-1-13.png
    Thanks
     
  30. TheGonzoGamer

    TheGonzoGamer

    Joined:
    Apr 24, 2019
    Posts:
    35
    Is there a way to randomize the angle a spawned object is in its orbit?
    I've noticed every time I spawn an object using the FloaterSpawnerOrbit component.
    The first object is always at 149degrees
    The second Object is always at 258 degrees
    and the Third object is always at 248 degrees.

    The Radius of the Orbit also seems to be a bit of a toss up if I set it to a range like 10000 - 20000. I attempted to use three FloaterSpawnerOrbit components each with one prefab and the Min/Max set to the tight ranges I am looking for (ie 10-11, 16-17, 20-21) but then each FloaterSpawnerOrbit spawned its prefab at 149Degrees so the planets were in a straight line to each other.
     
  31. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    You can set the starfield's Brightness to negative to get something like this. Making an alternative multiplicative blending starfield shader would give better results though.


    You can change the spawner's SgtFloatingObject commponent's Seed setting to get different values.
     
  32. raydekk

    raydekk

    Joined:
    Mar 14, 2013
    Posts:
    100
    Negative brightness doesn't do anything for me, it just makes it invisible, not black.
     
    Last edited: Nov 12, 2022
  33. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    In the next version I'll add the new Starfield_Multiply shader, which can look something like this in a quick test:

    Editor Screenshot 37.png

    It's not perfect though, because multiplicative blending isn't commutative with additive blending, so any draw order changes cause the effect to break. In some scenarios like background elements where you can control the draw order then it may be useful.
     

    Attached Files:

  34. raydekk

    raydekk

    Joined:
    Mar 14, 2013
    Posts:
    100
    Looks great, thanks!
     
  35. TheGonzoGamer

    TheGonzoGamer

    Joined:
    Apr 24, 2019
    Posts:
    35
    @Darkcoder
    Thank you again for your quick responses. I think I have an easy (basic?) one here.

    What do devs do for clipping plane issues?
    For reference, I am 9,000KM from a 4,000KM Star. So about 5,000KM away from its surface.
    Camera:
    Clipping Plane Near: 2
    Clipping Plane Far: 1e+15

    Changing near plane to a large number like 20 brings the entire star (or planet, or any large spherical object) into complete view, but culls out the player ship.

    Thank you in advance!


    EDIT:
    So it seems from this post
    https://forum.unity.com/posts/7687783/

    It is connected to skyboxes.
    Well that puts a damper on things. Hopefully someone has a creative solution.
     
    Last edited: Nov 13, 2022
  36. dirkjacobasch

    dirkjacobasch

    Joined:
    Apr 24, 2018
    Posts:
    418
    The solution is a setup with two cameras.
    Read this article, especially Camera issues on large scales and The solution; Multiple cameras.
    http://davenewson.com/posts/2013/unity-coordinates-and-scales.html
     
  37. TheGonzoGamer

    TheGonzoGamer

    Joined:
    Apr 24, 2019
    Posts:
    35
    I used a two camera setup to get it working but there is another way.

    I did not discover this but you can turn off the skybox and it will work too. Then using the backdrop component from SGT simply set the material's render queue of planets and stars to something like 2999 and they will render in front of the backdrop while keeping the backdrop's radius small.
    So you can create your own pseudo skybox
     
    Darkcoder and dirkjacobasch like this.
  38. Eltharis

    Eltharis

    Joined:
    Aug 30, 2018
    Posts:
    17
    Hello. Has anyone managed to stack cameras in HDRP without issues or made shadows work with SGT with one camera? Long distance view is needed for SGT which essentially disables all scene shadows.
     
  39. blacksun666

    blacksun666

    Joined:
    Dec 17, 2015
    Posts:
    214
    I'm having problems in VR on a pico 4 device with the SGTLens and Blackhole features. The Blackhole seems to blank the whole screen as soon as the black hole enters the periphery of the viewport, the black circle of the black hole does show with a light grey area around it but any of the refraction effects arent visible.
    The SGTLens shows up and doesnt turn the screen black but again the refraction effects arent visible. This is on 2021LTS, standard render pipeline, tried forcing to vulcan but that made no difference.
    Anyone else had this working on a similar platform and have any tips?
     
  40. Richard_Roth

    Richard_Roth

    Joined:
    Dec 29, 2014
    Posts:
    64
    Updated to 4.0.9 today and getting a lot of errors. These aren't to do with my project and are all internal to the package.

    Assets\Packages\Space Graphics Toolkit\Features\Ring\Scripts\SgtRing.cs(198,28): error CS7036: There is no argument given that corresponds to the required formal parameter 'center' of 'SgtLight.Find(bool, int, Vector3)'

    Assets\Packages\Space Graphics Toolkit\Features\Ring\Scripts\SgtRing.cs(206,41): error CS1503: Argument 2: cannot convert from 'float' to 'UnityEngine.Transform'

    Assets\Packages\Space Graphics Toolkit\Features\Ring\Scripts\SgtRing.cs(206,106): error CS1503: Argument 4: cannot convert from '<null>' to 'float'

    Assets\Packages\Space Graphics Toolkit\Features\Atmosphere\Scripts\SgtAtmosphere.cs(239,28): error CS7036: There is no argument given that corresponds to the required formal parameter 'center' of 'SgtLight.Find(bool, int, Vector3)'

    Assets\Packages\Space Graphics Toolkit\Features\Atmosphere\Scripts\SgtAtmosphere.cs(247,41): error CS1503: Argument 2: cannot convert from 'float' to 'UnityEngine.Transform'

    Assets\Packages\Space Graphics Toolkit\Features\Atmosphere\Scripts\SgtAtmosphere.cs(247,117): error CS1503: Argument 4: cannot convert from '<null>' to 'float'

    Assets\Packages\Space Graphics Toolkit\Features\Atmosphere\Scripts\SgtAtmosphere.cs(472,27): error CS7036: There is no argument given that corresponds to the required formal parameter 'center' of 'SgtLight.Find(bool, int, Vector3)'

    Assets\Packages\Space Graphics Toolkit\Features\Atmosphere\Scripts\SgtAtmosphere.cs(485,15): error CS1501: No overload for method 'Calculate' takes 9 arguments

    Assets\Packages\Space Graphics Toolkit\Features\Belt\Scripts\SgtBelt.cs(283,28): error CS7036: There is no argument given that corresponds to the required formal parameter 'center' of 'SgtLight.Find(bool, int, Vector3)'

    Assets\Packages\Space Graphics Toolkit\Features\Belt\Scripts\SgtBelt.cs(291,41): error CS1503: Argument 2: cannot convert from 'float' to 'UnityEngine.Transform'

    Assets\Packages\Space Graphics Toolkit\Features\Belt\Scripts\SgtBelt.cs(291,111): error CS1503: Argument 4: cannot convert from '<null>' to 'float'

    Assets\Packages\Space Graphics Toolkit\Features\Cloudsphere\Scripts\SgtCloudsphere.cs(195,28): error CS7036: There is no argument given that corresponds to the required formal parameter 'center' of 'SgtLight.Find(bool, int, Vector3)'

    Assets\Packages\Space Graphics Toolkit\Features\Cloudsphere\Scripts\SgtCloudsphere.cs(203,41): error CS1503: Argument 2: cannot convert from 'float' to 'UnityEngine.Transform'

    Assets\Packages\Space Graphics Toolkit\Features\Cloudsphere\Scripts\SgtCloudsphere.cs(203,101): error CS1503: Argument 4: cannot convert from '<null>' to 'float'

    Assets\Packages\Space Graphics Toolkit\Features\Flare\Scripts\SgtFlareMaterial.cs(203,4): error CS0200: Property or indexer 'SgtFlare.Material' cannot be assigned to -- it is read only

    Assets\Packages\Space Graphics Toolkit\Features\Flare\Scripts\SgtFlareMaterial.cs(211,5): error CS0200: Property or indexer 'SgtFlare.Material' cannot be assigned to -- it is read only

    Assets\Packages\Space Graphics Toolkit\Features\Corona\Scripts\SgtCorona.cs(324,47): error CS1620: Argument 1 must be passed with the 'ref' keyword

    Assets\Packages\Space Graphics Toolkit\Features\Corona\Scripts\SgtCorona.cs(324,82): error CS1615: Argument 3 may not be passed with the 'ref' keyword

    Assets\Packages\Space Graphics Toolkit\Features\Ring\Scripts\SgtRingMesh.cs(82,15): error CS1061: 'SgtRing' does not contain a definition for 'Mesh' and no accessible extension method 'Mesh' accepting a first argument of type 'SgtRing' could be found (are you missing a using directive or an assembly reference?)

    Assets\Packages\Space Graphics Toolkit\Features\Ring\Scripts\SgtRingMesh.cs(88,19): error CS1061: 'SgtRing' does not contain a definition for 'Mesh' and no accessible extension method 'Mesh' accepting a first argument of type 'SgtRing' could be found (are you missing a using directive or an assembly reference?)

    Assets\Packages\Space Graphics Toolkit\Features\Ring\Scripts\SgtRingMesh.cs(90,16): error CS1061: 'SgtRing' does not contain a definition for 'Mesh' and no accessible extension method 'Mesh' accepting a first argument of type 'SgtRing' could be found (are you missing a using directive or an assembly reference?)

    Assets\Packages\Space Graphics Toolkit\Features\Jovian\Scripts\SgtJovian.cs(181,28): error CS7036: There is no argument given that corresponds to the required formal parameter 'center' of 'SgtLight.Find(bool, int, Vector3)'

    Assets\Packages\Space Graphics Toolkit\Features\Jovian\Scripts\SgtJovian.cs(189,41): error CS1503: Argument 2: cannot convert from 'float' to 'UnityEngine.Transform'

    Assets\Packages\Space Graphics Toolkit\Features\Jovian\Scripts\SgtJovian.cs(189,106): error CS1503: Argument 4: cannot convert from '<null>' to 'float'

    Assets\Packages\Space Graphics Toolkit\Features\Planet\Scripts\SgtPlanet.cs(310,28): error CS7036: There is no argument given that corresponds to the required formal parameter 'center' of 'SgtLight.Find(bool, int, Vector3)'

    Assets\Packages\Space Graphics Toolkit\Features\Planet\Scripts\SgtPlanet.cs(321,16): error CS1501: No overload for method 'Calculate' takes 9 arguments

    Assets\Packages\Space Graphics Toolkit\Features\Shared\Scripts\SgtShadowLayer.cs(113,27): error CS7036: There is no argument given that corresponds to the required formal parameter 'center' of 'SgtLight.Find(bool, int, Vector3)'

    Assets\Packages\Space Graphics Toolkit\Features\Starfield\Scripts\SgtStarfieldInfiniteFarTex.cs(87,28): error CS1061: 'SgtStarfieldInfinite' does not contain a definition for 'FarTex' and no accessible extension method 'FarTex' accepting a first argument of type 'SgtStarfieldInfinite' could be found (are you missing a using directive or an assembly reference?)

    Assets\Packages\Space Graphics Toolkit\Features\Starfield\Scripts\SgtStarfieldInfiniteFarTex.cs(93,32): error CS1061: 'SgtStarfieldInfinite' does not contain a definition for 'FarTex' and no accessible extension method 'FarTex' accepting a first argument of type 'SgtStarfieldInfinite' could be found (are you missing a using directive or an assembly reference?)

    Assets\Packages\Space Graphics Toolkit\Features\Starfield\Scripts\SgtStarfieldInfiniteFarTex.cs(95,29): error CS1061: 'SgtStarfieldInfinite' does not contain a definition for 'FarTex' and no accessible extension method 'FarTex' accepting a first argument of type 'SgtStarfieldInfinite' could be found (are you missing a using directive or an assembly reference?)

    Assets\Packages\Space Graphics Toolkit\Features\Shared\Scripts\SgtHelper_Editor.cs(33,18): error CS0117: 'SgtCamera' does not contain a definition for 'InstanceCount'
     
  41. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    Based on your description it sounds like the secondary camera rendering isn't working. SgtBlackHole is based on the OpaqueTexture/GrabPass texture that is auto generated by Unity, and SgtLens is based on a CubeMap texture that gets rendered by SgtLens via the Camera component alongside it. However, the rendering of these textures is pretty much entirely handled by Unity, so I'm not sure what would cause it what could be done.

    To debug this, I would begin with SgtLens and try to display the 'cubemap' field (it's currently private only, so you would need to modify the code to expose it). If I'm right then this should display nothing, or black, or similar. I would then try to modify the sibling Camera settings such as the near/far range to see if I can get it to even render anything in the scene.


    It sounds like you're updating from a very old version of SGT, and there are likely many script changes between the two. To update so much you would have to delete the old SGT folder and then install the new one. Just make sure you back up your project before doing any of these things.
     
  42. Richard_Roth

    Richard_Roth

    Joined:
    Dec 29, 2014
    Posts:
    64
    Did as you suggested. Deleted the old SGT and installed it again. It's working, but all my settings and materials are reset. Please refrain from messing with the file structure in the future, it was fine the way it was before.
     
    Last edited: Nov 21, 2022
  43. foxyspace

    foxyspace

    Joined:
    Oct 16, 2021
    Posts:
    71
    Is there a way to fix this Error? I cant get it really.

    Assets\RingProperties.cs(30,9): error CS0200: Property or indexer 'SgtFloatingSpawner.Prefabs' cannot be assigned to -- it is read only Screenshot_20221120_152441.png
     
  44. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    RingProperties.cs is your code so you would have to fix it.

    Based on this error it sounds like you're trying to replace the Prefabs list with your own, which you cannot do because this list (and most in SGT) are read only. To modify the list you can read the Prefabs property, and directly call Add/Remove/etc on it.
     
  45. TheGonzoGamer

    TheGonzoGamer

    Joined:
    Apr 24, 2019
    Posts:
    35
    Has anyone experienced the following?

    Using the SGT Light Pointer and SGT Light component on a directional light.

    I get a sort of sparkle/glittering effect.
    This effect is ever so slightly present when using a default directional light. Somewhere on the order of 5% of what we see here.

    Best as I can tell, it might be some interaction between the lights and the post processing bloom effect.
    Bloom intensity is 2 and Light intensity is 2. I've tried adjusting values but they only make the effect stronger or weaker. So far only way to eliminate it entirely is too disable bloom, which isn't much of a solution.
    Thank you in advance.
     
    Last edited: Nov 25, 2022
  46. dirkjacobasch

    dirkjacobasch

    Joined:
    Apr 24, 2018
    Posts:
    418
    That looks like some bloom / antialiasing effect. I could eleminate this with the CTAA asset but it is deprecated.
     
  47. TheGonzoGamer

    TheGonzoGamer

    Joined:
    Apr 24, 2019
    Posts:
    35
    Interestingly, switching from MSAA to TAA vastly improves the situation. If only TAA didn't introduce it's own major issues.
    Wow CTAA looked amazing. Wonder why it wasnt kept up to date
     
    Last edited: Nov 25, 2022
  48. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,414
    In computer graphics these are called Fireflies. They're caused by the lighting (e.g. specular reflection) being very high for one pixel, but not for the adjacent pixels, and when you rotate or move the camera/light/etc then this bright pixel can change or even disappear momentarily.
     
  49. Darkcoder

    Darkcoder

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

    upload_2022-11-26_11-44-14.png

    Here's a new feature I've been working on for SGT. It allows you to render a spherical nebula from a single seamless texture. The goal for this feature is to render a nebula that looks pretty good from all angles while being very high performance, and it seems to work quite well. It's not volumetric, but you can combine it with a normal starfield to make the overall illusion pretty good.

    Here's an animation of it:



    I've also been working on a galaxy version of it, but that still needs some work.

    Stay tuned :)
     
    raydekk, nighty2 and dirkjacobasch like this.
  50. foxyspace

    foxyspace

    Joined:
    Oct 16, 2021
    Posts:
    71
    Holly thats awesome! Can´t wait for 4.1.0!!
     
    Darkcoder likes this.