Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

【50% OFF】⏱ Space Graphics Toolkit

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

  1. dirkjacobasch

    dirkjacobasch

    Joined:
    Apr 24, 2018
    Posts:
    219
    Hello everyone!

    I've just finished the rework of the second planet in my game with terrain. :)
    I modified the planet shader, so I can use a second albedo texture and a third detail bump map. The albedo textures can be mixed together by the "Texture Mix Factor". I also changed the shader so I can set a detailed tiling for every single detail texture. If you want to try out the shader, I've added the modified shader to this post.
    I hope you like it. :D

    SR_63700561084137_2560X1440.jpg
    SR_63700563049737_2560X1440.jpg
    SR_63700562249213_2560X1440.jpg
    SR_63700562193409_2560X1440.jpg
     

    Attached Files:

    Last edited: Aug 5, 2019
  2. emdzeyek

    emdzeyek

    Joined:
    Apr 15, 2013
    Posts:
    41
    Great job :)
     
    dirkjacobasch likes this.
  3. dirkjacobasch

    dirkjacobasch

    Joined:
    Apr 24, 2018
    Posts:
    219
  4. joshua_42

    joshua_42

    Joined:
    Jun 23, 2016
    Posts:
    78
    Found it, thanks.
    I have added a second distances list to SgtTerrain, one is for an empty game object, the other is for the camera. The empty splits the terrain at a certain point and the camera splits it further. It works very well with one SgtTerrain but adding more SgtTerrains (or more targets to one terrain) slows everything to a crawl.
    Can you recommend a way to stop the distance calculations (and split/unsplit calculations) once the game object target has done it's splitting?
    Cheers.
     
  5. dirkjacobasch

    dirkjacobasch

    Joined:
    Apr 24, 2018
    Posts:
    219
    Hi!
    I've 2 questions.

    1) Is there any limit for the planet size?
    2) What is the best way to place single objects like a space station on a planetary surface.
     
    Last edited: Aug 13, 2019
  6. VikingPingvin

    VikingPingvin

    Joined:
    Jan 22, 2016
    Posts:
    8
    Those are looking fine! THanks for sharing the code too :)
     
    dirkjacobasch likes this.
  7. TRuoss

    TRuoss

    Joined:
    Dec 5, 2012
    Posts:
    82
    Hi guys,

    I tried building the Star Cluster scene in Unity 2019.2.1f1, with 64bit, Mono, .NET 4.x, Linear, only the fantastic quality setting, old Rendering, and now I can´t see or click any of the stars. In the editor, everything is working.

    Do you have the same when you are building the scene?

    Edit: 2018.4.5f1 is also not working when builded
     
    Last edited: Aug 18, 2019
  8. joshua_42

    joshua_42

    Joined:
    Jun 23, 2016
    Posts:
    78
    Hey there, love the improved shader! Is it possible to use albedo textures instead of / as well as normal textures?
     
  9. dirkjacobasch

    dirkjacobasch

    Joined:
    Apr 24, 2018
    Posts:
    219
    I think this is possible. Let me check this out.
     
  10. dirkjacobasch

    dirkjacobasch

    Joined:
    Apr 24, 2018
    Posts:
    219
    After a lot of work the planet rework is done. Many thanks to Darkcoder who made this possible.:)

     
  11. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    1,684
    Looks fantastic! Great work :)


    If these calculations stop then the LOD would no longer work as you leave the planet? If this is what you want then you would have to modify the code such that when the LOD has finished splitting down to the level you want, it signals to its parent that it's finished, and when they all do this you no longer run the code to check the splits. I imagine most users wouldn't want this though. You can also adjust the Budget setting to limit how much time is spent on these calculations.


    1 - Not in terms of code, but in terms of visual issues you may notice problems past 10k units.

    2 - You can get the surface point from a world position using SgtTerrain.GetWorldPoint, so your space station code could use this to snap to the surface.


    Thanks, and great video :)
     
    dirkjacobasch likes this.
  12. dirkjacobasch

    dirkjacobasch

    Joined:
    Apr 24, 2018
    Posts:
    219
    Hi joshua_42,

    here is the new shader. Please let me know if this is what you want. I have not test it on mobile, only on Windows OS.

    Have fun with it and thanks for the idea. :)
     

    Attached Files:

    joshua_42 likes this.
  13. b1gry4n

    b1gry4n

    Joined:
    Sep 11, 2013
    Posts:
    52
    Curious if theres a shader option planned/included for lit sprites that could read the sgtlight component? Example, if I have a planet in a solar system being lit by a sun the planet can read the lighting just fine but the sprite does not match the visual.



    Or, do you think its a better choice to have an extremely low poly sphere to use instead and keep the sprites for extreme distances?
     
    Last edited: Sep 7, 2019
  14. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    1,684
    I think this would be an unnecessary hit to your performance. These billboards are supposed to just let you know that something is there, not to give you any indication of what it actually looks like beyond color. If you only have a few planets and want to show this then you can keep the planet visible with atmosphere, and use the SgtAtmosphereHeight component to make the atmosphere massive so it looks like this.
     
  15. dirkjacobasch

    dirkjacobasch

    Joined:
    Apr 24, 2018
    Posts:
    219
    Hi Darkcoder,

    could you please add more terrain height maps and terrain detail maps for the terrain component so we can create more different looking planets? I've no idea how to make my own. :(
     
  16. joshua_42

    joshua_42

    Joined:
    Jun 23, 2016
    Posts:
    78
    Hi Darkcoder,

    I've just fixed the second detail map on sgtTerrain. It was just a typo in sgtTerrain and sgtTerrainFace. I've been using a shader that takes an rgb mask map to add detail albedo and normal maps. It works great if you have one biome but now we have two - how feasible is it to have the sgt terrain shader take a mask for the biomes (as it does now) and additional masks for the biome details? The first mask could take an albedo and normal texture and the secondary masks could take three normal maps. Is this even possible? Do you (or anyone) know of a shader that does this already?
    Cheers!
     
  17. joshua_42

    joshua_42

    Joined:
    Jun 23, 2016
    Posts:
    78
    Hey Dirk, try this. You should be able to use two displacement maps on your sgt terrain. You'll need an rgb mask map (first displacement reads the red channel, second reads the green)
     

    Attached Files:

    dirkjacobasch likes this.
  18. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    1,684
    You can use any seamless texture for this. For example, the texture available HERE are great. You can even take your own pictures of things and run some kind of seamless filtering on it.


    Good find!

    As for more biomes, the current system just uses the R and G channels of the mask texture, so you could more or less copy+paste the code to support B and A to allow for 4 biomes.
     
    dirkjacobasch and joshua_42 like this.
  19. joshua_42

    joshua_42

    Joined:
    Jun 23, 2016
    Posts:
    78
    I copy+pasted all the code I could find dealing with detail maps and tried to add a third to no avail. Do you mean additional detail maps within the current two?
     
  20. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    1,684
    The current code to blend the two detail maps is just this:

    Code (CSharp):
    1. float3 detailA = UnpackScaleNormal(sample2(_DetailMapA, detailCoord, polar), texMask.r * _DetailScaleA);
    2. o.Normal = BlendNormals(o.Normal, detailA);
    3.  
    4. float3 detailB = UnpackScaleNormal(sample2(_DetailMapB, detailCoord, polar), texMask.g * _DetailScaleB);
    5. o.Normal = BlendNormals(o.Normal, detailB);
    To blend an additional two you just add:

    Code (CSharp):
    1. float3 detailC = UnpackScaleNormal(sample2(_DetailMapC, detailCoord, polar), texMask.b * _DetailScaleC);
    2. o.Normal = BlendNormals(o.Normal, detailC);
    3.  
    4. float3 detailD = UnpackScaleNormal(sample2(_DetailMapD, detailCoord, polar), texMask.a * _DetailScaleD);
    5. o.Normal = BlendNormals(o.Normal, detailD);
    Then you just copy+paste the property & sampler & scale definitions.

    The PlanetMask.png I made doesn't contain suitable mask data for the G and A channels though. For testing purposes you could copy these channels from the R and G, but invert them.
     
    joshua_42 likes this.
  21. OverGast

    OverGast

    Joined:
    Aug 8, 2015
    Posts:
    15
    Hey! really nice asset!
    Just wanted to ask trying to find a solution for the following error, is not performing any issue in-game, however is annoying to see it on debug all time xD. It happens in the cloudsphere because of the cubemap:
    "Error assigning CUBE texture to 2D texture property: Dimensions must match".
    I think is on the cloud shader, so far I'm using the cubemap from the examples and the main texture is the one generated automatically. Any tips on how to fix it? Thanks :D
     
  22. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    1,684
    I believe fixing it requires changing the cloudsphere's texture name from _MainTex to something else. I've added it to the to-do list. For now you can ignore it!
     
    dirkjacobasch and OverGast like this.
  23. dirkjacobasch

    dirkjacobasch

    Joined:
    Apr 24, 2018
    Posts:
    219
    Very nice, finally I could manage to have different tiling for each terrain detail maps. This gives me the possibility to create this nice looking terrain surface details. :)

    @Darkcoder This would be a nice feature for the next update.

    sc1.jpg
    sc2.jpg
     
  24. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    1,684
    Looks great! I'm actually experimenting with a new approach to terrain heightmaps and possibly the planet shader, because the current approach gives visual artifacts at extreme scales/tiling values that I'm not sure can be solved with how it's done right now, not to mention the current approach doesn't support SRP.

    Your results so far look amazing though and give me good visual reference fr any new features :)
     
    hopeful likes this.
  25. dirkjacobasch

    dirkjacobasch

    Joined:
    Apr 24, 2018
    Posts:
    219
    Thanks! I really love to use your amazing asset. I never ever thought that you can do something like this in Unity and your code is so clean that you can easily extend it with new features. Thank you so much. :) Yes there some tiny visual artifacts on my 200-300 Km planets where you can see the atmosphere rendering under the surface.:D

    Keep up the good work. Can't wait for the next update. :)
     
    Darkcoder likes this.
  26. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    1,684
    Hey everyone,

    The game Ironseed was recently released by Robert Morgan.



    You can get it HERE.

    This game was originally released in 1994 on DOS, and was since ported to Unity using Space Graphics Toolkit!

    Two of my all time favourite games are from the DOS era, so it's great to see these old games still receiving some love!

    If anyone else has released a game using SGT then please let me know so I can shout you out. I know quite a lot of games use my assets, but barely anyone tells me!
     
    joshua_42 and dirkjacobasch like this.
  27. joshua_42

    joshua_42

    Joined:
    Jun 23, 2016
    Posts:
    78
    Hey DC,

    The detail normals in the planet shader appear to be 45 degrees out. If the sun light is along the equator, the normals behave as if it's along the polar axis.
     
  28. joshua_42

    joshua_42

    Joined:
    Jun 23, 2016
    Posts:
    78
    Hey Darkcoder, here's a video of what I've been working on with SGT.
     
    dirkjacobasch and Darkcoder like this.
  29. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    1,684
    I will check it out now.


    Looks great! I can see the detail mapping needs more layers, and there are tiny terrain gaps, but the topology looks great. What size planet are you using here?
     
  30. joshua_42

    joshua_42

    Joined:
    Jun 23, 2016
    Posts:
    78
    Not sure of the actual size but it has a radius of five-hundred-thousand. The topology is from World Machine. I managed to extend the planet shader to use three mask maps (for the biomes). Each biome has it's own normal maps and three colours (one for each channel). Then there are three detail normal maps that each biome uses.
    I'm having trouble with the normal maps though; they seem to be creating a shine effect that pans with the camera. You can see a little of it in the video. The effect is most apparent on the left hand side when facing away from the sun; there's a straight line, bright in the middle, fading out to the edges - which makes me think it might have something to do with the normal angle (as they are 45 degrees out).
     
  31. dirkjacobasch

    dirkjacobasch

    Joined:
    Apr 24, 2018
    Posts:
    219
    Hi @joshua_42,
    I've the same problem with the "shine effect", but couldn't find a solution until now.
     
    joshua_42 likes this.
  32. dirkjacobasch

    dirkjacobasch

    Joined:
    Apr 24, 2018
    Posts:
    219
    Looks amazing! :cool:
     
    joshua_42 likes this.
  33. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    1,684
    Hey everyone, here's a small update regarding the terrain feature of SGT.

    The current terrain system works well for smaller planets as you know, but for larger planets there are some issues with seams (due to floating precision), as well as some performance issues. I initially planned to just update the existing system to improve in these areas, but the way the LOD levels are stitched together makes the code quite complex to modify, and there are certain performance limits due to the way each LOD chunk is stored in a separate GameObject. I considered rewriting this system with more or less the same technique, but before that I decided to research different terrain LOD techniques to see if maybe there's a better approach. After a lot of experimenting with them in Unity (Unity's limitations can make this annoying!), I think I've found a really good system that I'm currently working on implementing.

    This system is based on the idea of CDLOD, which basically moves the LOD stitching to the GPU, and frees the CPU up to do more things. This drastically simplifies the implementation, and allows me to change things so much more easily. One of these easy changes that I added with the extra CPU time is manually batching the terrain chunks together. This means when the camera isn't moving so much, the rendering performance is rather good:



    You can see the LOD in action in the wireframe. Doing these LOD calculations on the GPU may sound demanding, but even on my GTX 1060 I can get this incredible framerate with 1.5 million vertices.

    The only downside of course is that with this system you can't just use any terrain shader you like, they must be modified to perform the necessary LOD warping. However, I don't think most terrain shaders are suitable for a full planet to be viewed all the way from space down to the surface, so it shouldn't be too much of an issue for users to be stuck to using the shader I make for this.

    I still need to implement height displacement, floating origin, textures, etc, but what you see here is the most important and difficult part. I'll send test versions out when I have these implemented!
     
  34. dirkjacobasch

    dirkjacobasch

    Joined:
    Apr 24, 2018
    Posts:
    219
    That is awesome!!!
    Is it possible to implement some kind of LOD cross fading? I don't know if this is possible.
     
  35. joshua_42

    joshua_42

    Joined:
    Jun 23, 2016
    Posts:
    78
    Awesome! I've almost finished extending the shader to four biomes and four detail normals. I'll upload a another video tonight, hopefully.
     
    Darkcoder and dirkjacobasch like this.
  36. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    1,684
    This system smoothly transitions between each LOD level by moving the vertices in a clever way. If you look closely at the right side of the wireframe you can see the gradual transition between two levels.


    Look forward to seeing it! I should probably replace all my terrain videos with yours as you're clearly much better at showcasing it :D

    Hopefully the new terrain system will allow you to make even better planets.
     
    hopeful, joshua_42 and dirkjacobasch like this.
  37. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,662
    Ok this has come a long way since last time I checked! I have a few questions:
    - I want to try and target very weak phone, to make space to surface gameplay, does this work with open gles 2.0?
    - is there a tiled coordinate system so I can use that for pcg spawning? Is it the inflated cube with area preservation?
    - how much is customizable so I can adapt, read and write custom data?

    Basically I want to be able to expend it to generate stateless city generation at the surface, I need to read and or change the terrain noise accordingly, and build tunnels and overhangs if possible.
     
  38. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,662
    Also how big planet can actually be ? I have a limit of 400 × 6km as a diameter.
     
  39. dirkjacobasch

    dirkjacobasch

    Joined:
    Apr 24, 2018
    Posts:
    219
    Like Darkcoder said in a post: Not in terms of code, but in terms of visual issues you may notice problems past 10k units.
    In the game I am working on I've planets between 300Km and 500Km.
     
  40. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    1,684
    The current terrain system works with any shader. The provided planet shader uses shader model 3 for the build target, but it doesn't use any advanced features so it should work on GLES 2. It comes with a simple procedural spawning component you can build off of. There is no area preservation built in. The terrain generation is designed to be heightmap + detail, so there's not much ability to read or write custom data unless you modify the code. There is no support for tunnels or overhangs.

    I plan to improve in some of these areas with this new system, but it won't do everything.

    Either way, getting a large procedural planet with cities and other features to work on a "very weak phone" is an unrealistic goal. If you need to support such low end devices you should use a traditional flat terrain with some graphical magic to make it look like a big planet.
     
  41. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    661
    Hi,

    First I do want to say thank you so much for sticking with this asset and not just vanishing like so many other developers, or coming out with a "new" version and charging all over again. I really appreciate that because as a hobbiest I have a tendency to buy a lot of assets that I will use "some day" and most of the time when "that day" comes the asset doesn't even work anymore.

    SGT is still working even in the latest Unity and I very much appreciate that.

    However. Even after all this time the documentation is still really bad and I feel like I'm just floundering along trying to figure things out with no real clue what I'm doing.

    Right now I am trying to figure out the Star shader so I can have dynamically colored stars rather than pretexturing them at design time. I have the basic color working but am having a heck of a time figuring out the noise feature.

    The ONE line documentation for this says:
    "The Star feature includes a star surface shader that renders with procedural animation, giving you full control over its visuals to make any kind of star surface you like."

    Can you please give some more information on how to get this procedural animation working so that I have some "life" to my stars' surfaces?
     
  42. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    1,684
    Thanks for the feedback, I agree that the star feature is rather under-explained.

    Inside the Star/Media folder you can see there are 3 example star materials. This Star shader is what drives the procedural animation, and you can apply these materials to any normal sphere to turn them into animated star surfaces (as seen in the Star and 00 Star Surface demo scenes). The star visual settings can be customized from the material inspector, and most of them should be intuitive enough. Settings like NoiseBias and NoiseSharpen are used inside the noise fbm and are hard to explain, so it's best understood by experimenting with the values yourself and seeing what visual changes result.

    I recommend you not touch the NoiseTex and NoiseStep settings though, as the example values should be suitable for most stars.
     
  43. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    661
    Somehow I missed those samples. I had gone straight to the solar system example pack which was using an actual texture for the sun rather than the Star shader. So I had removed the texture and applied the Star shader manually. Turns out what I was missing was the NoiseTex and more appropriate settings for the various noise values. Working form the pointed examples I have it working now with dynamically colors stars based on stellar classification :D
     
    hopeful and Darkcoder like this.
  44. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,662
    Thanks for the answer.

    Weak phone.
    I have seen sparse planet generation on ps2, I was basically aiming for similar visual density. I should have phrased my question much better, the implicit was, can I choose easily the mesh density to get something workable, at multiple lod didtsnce, just in case you hard coded around dense mesh.

    Can you tell me more about how heightmap data is handled? I mean how it is accessed/stored if I want to manipulate. How much can we manipulate the noise generation?

    Overhang and tunnel, I was basically asking if hole in the mesh can be handled, I guess the answer is similar to above. But with less flexibility mesh tile is probably cached?

    I needed to know what is the spherical mesh strategy to see how much I can salvage it. Pole placement are the main issues when generating for gameplay using metrics. Then area stretches. How does the spawning component work, is it deterministic relative to position?

    In fact I was already making a planet generation designed for weak hardware. I wanted to know how much work I could save by using yours. Basically I could use the work already done to create just a placement layer with the right metric and let your system handle visual stuff.

    Do you plan to mitigate scale issues? Or should we use a stacked camera, is your system deterministic enough so we can used the same planet at two scale but have the same height data at proportional scale? I mean smallest scale would be used for far field camera.
     
  45. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    1,684
    With the current terrain you can easily adjust the LOD level count, split distances, and detail of each chunk. Achieving PS2 level of detail should be possible.

    The heightmap is sampled from a standard cylindrical/equirectangular texture, though it would be easy enough to change this. The code wasn't designed to allow for changes to this underlying data though.

    There is no ability to cut holes in the terrain unless you modify the code. This is likely difficult to do given the seam stitching code which wasn't designed for this scenario.

    The mesh is just a normalized cubed sphere. The spawning is deterministic and is run based on when a chunk spawns.

    Scale issues shouldn't be a concern for PS2 level detail.

    If you need to make such extensive modifications then I recommend you make your own system from scratch. Implementing hole cutting and runtime modification would pretty much require rewriting everything, and since the generation code is in both C# and compute shaders, it would be even more difficult to modify.
     
    neoshaman likes this.
  46. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,662
    Thanks for the answer.

    Hole cutting was basically sugar, I have to ask to be sure I wasn't missing opportunities :D you never know lol.

    Scale is important to fake distance, it's an old trick, render thing smaller moving slower when afar with another camera, which bypass depth precision by having everything in range of that camera. Then render to scale close with higher details, and less depth range for gameplay. I'm doing that since blitz 3d time no problem. Especially good for weak machine because far field can also be at lower resolution and much cheaper shader.

    But I got the answer I really needed when you said you sample from a texture. This mean than any mesh will be consistent since the source isn't correlated to the mesh data like some implementations of noise (3d notably). As long as I can dynamically write to a texture it's fine.

    The only problem is that you probably use texturelod to sample height within vertex, as it's the optimal and simplest thing to do, especially if you use a clod style (the whole thing I for some reason dread to implement) stitching that progressively merge vertex of chunk having different density. It wouldn't be compatible with ogl 2.0. BUT at the same time you said it's compatible with any shader so that's not it, so probably done in CPU as it would mean we don't rewrite the shader.

    I'll make a budget for it and experiment, I can use it to make the proxy planet visual and handle a limited terrain implementations at close range. So I don't have to deal with lod metric.

    Wait you said compute shader :eek: that's not ogl 2.0 friendly :oops: oops.
     
  47. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    1,684
    Keep in mind the CDLOD stuff is part of the new terrain implementation, which hasn't been released yet. The shader for this new terrain currently only requires GLES 2 and doesn't use VTF, but for the final release I may add features that are GLES 3 only, we'll see.

    The current terrain is implemented in both GPU and with CPU fallback, because not all platforms support compute shaders. This implementation does all LOD stitching on the CPU using lots of complex index and vertex buffer modifications with annoying traversal between multiple quadtrees.
     
    neoshaman likes this.
  48. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,662
    That's the part that have me sweat in anticipation indeed lol
     
  49. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    661
    Quick animation showing off SGT stars procedurally generated by stellar classification, including O,B,A,F,G,K, and M type stars. The star's dominant color is determine by calculating an approximate proper RGB based on surface temperature, and then the various SGT components and shaders are set based on variations of that color. For example the core of the star is hotter then the surface and the corona and prominences vary in size and intensity and derive their colors based on the surface temp as well.



    Managed to get this up and running in just a couple hours which was nice.
     
  50. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    661
    EDIT: Actually I think this may be my own bug based on how I'm handling materials. Assuming what I show below is correct then its probably on me.

    What is the proper way to update the Corona from script? I am currently seeing a bug where sometimes when I change a star's properties and the corona colors get changed, I end up with a whole new set of corona materials on the star. Though it isn't consistent so not sure yet.

    This is how I am modifying the corona:

    Code (CSharp):
    1.                    
    2. coronaDepthTex.HorizonColor = ColorFromTemperature(effectiveTemperature);
    3. coronaDepthTex.InnerColor = ColorFromTemperature(effectiveTemperature * 0.75f);
    4. coronaDepthTex.OuterColor = ColorFromTemperature(effectiveTemperature * 10f);
    5.      
    6. coronaDepthTex.UpdateTextures();
    7.  
    .
     
    Last edited: Sep 21, 2019