Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Space Graphics Toolkit & Planets

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

  1. Ahdireyo

    Ahdireyo

    Joined:
    May 5, 2012
    Posts:
    33
    thanks. I just purchased it im figureing everything out at the moment. I cant wait for version 3 and the video tutorials , Im more of visual learner eh. But as for the camera when your flying through or orbiting around the planet, zoom into the atmosphere and look around. Its a bit unleveled it you know what im saying.

    But I sent you a pm on here, that video can give you an idea of a space ship cam etc but I asked a few questions in the pm.
     
  2. Uncasid

    Uncasid

    Joined:
    Oct 5, 2012
    Posts:
    193
    pretty sweet man! saved me a crapload of time! one request though, any chance we can get an imposter system for planets / etc that are out of frustum?
     
  3. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,404
    Can you elaborate on what you mean? SGT components are updated even if they're out of the view frustum, this is something I could change. But impostors are a completely different problem; they could probably be achieved without too much trouble using render to texture, but it seems like something better suited to a separate component. Aren't there already impostors systems around that work with arbitrary objects?
     
  4. Xsnip3rX

    Xsnip3rX

    Joined:
    Aug 29, 2009
    Posts:
    197
    Yes, and thanks to your plugin you just saved me countless hours/days of programming my own planetary system, I'll be purchasing this tomorrow, will all of the features and shaders work with unity free?
     
  5. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,404
    Yep, nothing requires Unity Pro.
     
  6. Xsnip3rX

    Xsnip3rX

    Joined:
    Aug 29, 2009
    Posts:
    197
    I guess I should've known better, you've always been awesome with this sort of stuff.
     
  7. WillBellJr

    WillBellJr

    Joined:
    Apr 10, 2009
    Posts:
    394
    Yep he is! And the WAIT is killing me!


    -Will
     
  8. jess3d

    jess3d

    Joined:
    Feb 10, 2013
    Posts:
    10
    Hi

    First of all congratulations for your work, it's amazing (I bought the asset).
    I have a few question; maybe not structured enough for the moment but i'll try to ask simple:

    - What is the best way to increase (a lot) the displace/color/detail textures resolutions on the tesselated planet ?
    I found a way to put some 4k textures (maximum right ?) in the square mapped tesselated planet, but the "detail" texture on the ground doesn't have any other mapping options than... "repeat" (i'd like to be abble to give specific mapping coordinations).
    For an example I need to zoom in to a specific zone of the earth, which means I need more details there... what do you suggest ??
    Do you think I could merge some Proland code in your asset ? (i'd rather not to)

    - How can i add some "detail displacement" or "detail normal map or something that could increase quality (same way of thinking of my first question: to add some detail)

    I'm not the developer on my project but you answer could still help.

    Thanks a lot and again: good job !


    JS
     
  9. Uncasid

    Uncasid

    Joined:
    Oct 5, 2012
    Posts:
    193
    I was thinking for objects that are considered far. Render to texture is what I was thinking. This way you can save frame rate and still display very large objects.
     
  10. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,404
    In short: with great difficulty.

    Allowing the user to specify surface regions with high detail textures adds a lot more complexity to the planet class, especially to the UI, so I didn't really consider it. Another issue is that a 4k texture is already really big, allowing the user to specify multiple 4k textures per side would result in some massive GPU memory usage, so these kinds of features are only feasible with streamed or procedurally generated data, both of which I didn't consider when designing the planet class, because it's a ton of code.

    I don't know what Proland is, but adding this kind of feature will probably require rewriting quite a lot of the existing code, as well as adding a ton more. If you only need a small area of the planet to be detailed (e.g. a rocket launch pad and its surroundings), then perhaps the best method would be to use a separate terrain (e.g. the built-in Unity terrain) and to place it on the planet surface. This would definitely be the easiest method, because the only issues you'd have to deal with are potential depth conflicts with the planetary surface, and seams at the terrain edges.

    As for the additional detail maps for the displacement/normals/etc, these are planned features. The main reason why I haven't implemented them yet is because the planet surface shader is at the Shader Model 2 instruction limit. I plan to rework the shader loading system to allow for Shader Model 3, this will allow me to use Unity's Surface Shaders, and I'll also be free to add in a bunch of extra shader features like you mention as well. But I won't begin working on this at least until I release the next version (before Version 3).

    If time is an issue for you then your best bet is to edit the code yourselves. I do hope to eventually please everyone, but right now planet surface features are low on my list of priorities because I don't think the amount of projects that depend on it outweigh the immense development time required to enhance it.

    Let me know if you have any other questions though, I'd love to see what you come up with.



    Yeah, there's no support for this. I also don't have Unity Pro, so it's not something I can implement and maintain support for very easily, maybe in the future!
     
  11. Ahdireyo

    Ahdireyo

    Joined:
    May 5, 2012
    Posts:
    33
    I cant wait for that, a 3rd person spaceship camera.
     
  12. jess3d

    jess3d

    Joined:
    Feb 10, 2013
    Posts:
    10
    Thanks a lot for your answers.

    I didn't think of creating a separate terrain: i'll try it that way.

    If i have the authorization to tell you about the project in the future, I'll be glad to give you a feedback.
     
  13. Ahdireyo

    Ahdireyo

    Joined:
    May 5, 2012
    Posts:
    33
    When adding a new texture it gives me an error to render correctly this texture must not have mip maps how do I remove mip map on the texture?. I scaled the texture to exact size as other example textures.
     
  14. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,404
    1. Select your texture in the Project window
    2. In the inspector window for your texture, change the Texture Type to Advanced
    3. Uncheck the Generate Mip Maps option
    4. Hit Apply

    Here's a picture of what a gas giant's texture import settings should look like:

     
  15. Xsnip3rX

    Xsnip3rX

    Joined:
    Aug 29, 2009
    Posts:
    197
    Bought it, love it, was wondering when you'll add in prefabs?



    Also i seem to have an issue with the asteroid belt option, the belt rotates very fast, even when "spin" is unchecked.
     
    Last edited: Feb 11, 2013
  16. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,404
    Prefab support was added in Version 2, I just didn't include any in the package.

    The 'Spin' option on asteroid belts refers to the way individual asteroids can spin. If you want to change the orbit speed then try modifying the values in the 'Orbit Rate' group.
     
  17. XSSA

    XSSA

    Joined:
    Jul 19, 2012
    Posts:
    4
    What if you created a script that used a seperate texture that would give an enviroment value. EG a simple black white texture and the script goes in finds the color of the pixel for the location on the planet and matches this up a certain type of enviroment like rolling hills or valley and generates terrain like would be found there. The color then would be generated by looking at the RGB map at the same location and just add a little devation from the exact value. And then if you wanted to get fancy you could use the same enviroment map to determine vegatation generation or a seperate texture for vegatation arangement.

    I'm not entirely sure how this would work but maybe you or someone else would. Also mabye you could glance something from a game called Space Engine.


    Man if only I had the money I'd buy this right now because it looks amazing!
     
  18. Xsnip3rX

    Xsnip3rX

    Joined:
    Aug 29, 2009
    Posts:
    197
    DC, i might be demanding too much of this but i was wondering if you have any issues on your end with loading one planet and it doing tons of micro-lags?

    Also what type of collision does the Tessellation collider use?
     
    Last edited: Feb 11, 2013
  19. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,404
    Yeah, this is almost exactly what I plan to do in a future version. Also, my reference pictures folder contains many screenshots from Space Engine ;)



    The Surface Tessellator Collider uses non-convex mesh colliders, due to the nature of the planet terrain I can't really change this. But in the future I may write a second collider component that creates collision meshes underneath the objects on your terrain. That should speed things up and be more accurate, but the current method is much more versatile as I don't know what kind of features everyone's game requires.

    There are 'tons of micro-lags' because both the Surface Tessellator and the Surface Tessellator Collider are incredibly CPU intensive operations that run on the main thread. I did my best to balance the load across multiple frames, but if you notice the lag then I guess the current settings aren't good enough. However, you do have pretty in-depth access to how much processing occurs in each component. If you look at the inspectors for both components you'll see there are many values you can tweak. If you can find the operations that take much longer than the others then try reducing the amount of them that occur each frame.

    It's hard for me to say which ones are slowest on your machine, but you can experiment with it until it gets smoother. If you have Unity Pro or Unity Pro Trial then you can profile the components and see which parts are the slowest and adjust the settings accordingly. In the future I plan to rewrite how the tessellator works and to put most of the code into a separate thread, but for now you'll have to settle for fiddling about with the settings.
     
  20. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    736
    Hey DarkCoder - I am currently working on my own little project for the OUYA, PC, and Linux.

    I am currently without an OUYA console however that is soon to change :D

    I want to integrate this into my small game. Is there anything that I need to be aware of when using the space Graphics toolkit on Ouya or Tegra 3 device?

    ~ Ben aka HeadClot
     
  21. Ahdireyo

    Ahdireyo

    Joined:
    May 5, 2012
    Posts:
    33
    Is there a way to use any of the planets, half planets to use over the terrain mesh to act as atmospheric scattering or any such

    Also is there a way to make a collider on the camera. It collides with planets which is good. But if I have the camera with a spaceship mesh parented to it just for testing purposes, how can it collide with reguler objects around your space. For example I have a test flying spaceship, just a box parented to the camera. I have a few space stations around my planets to see how distance works etc. I want to not fly through my objects. If this is possible how will I do this?
     
    Last edited: Feb 13, 2013
  22. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,404
    No idea, you'll have to let me know!


    I'm not sure I understand your first question. You want the atmospheric scattering to affect objects other than the planet surface mesh?

    The 'Camera Move' component automatically collides with planets and stars using maths. If you want it to collide with rigidbodies in your scene then you need to add a collider to your camera (e.g. the Sphere Collider), and disable the gravity. After doing this, you either need to mark your camera's rigidbody as kinematic, or freeze the rotation on all axes (if you do this then you should also set the drag value pretty high). The Camera Move component wasn't originally designed with physics in mind which is why you have to use strange settings like this.
     
    Last edited: Feb 13, 2013
  23. XSSA

    XSSA

    Joined:
    Jul 19, 2012
    Posts:
    4
    YESYESYESYESYESYES!!!!! It turns out my dad forget to put my 100 something dollars in my bank account. I am like 98% sure I'm going to get this. Although I'd really like to see video tutorials running through and show all the things it can do. Also when I played around in the Gas Giant demo I noticed that when you get real close you can kind of see through it. I know that's supposed to happen but I think it would appear more solid then that. Although that's probably just a personal preference thing and I'm guessing you can control density? Then there are the rings which are AMAZING!!! But I was wonndering if there was a way to do those faint dust rings like around Saturn and Jupiter that can only be seen well if the sun is behind it.
    http://upload.wikimedia.org/wikipedia/commons/thumb/9/96/Saturn_eclipse_exaggerated.jpg/400px-Saturn_eclipse_exaggerated.jpg
    Also with the dust rings topic if there was a way to make solid ring textures fade out into some sort of particle ring to make it more realistic. Maybe a simple particle field colored by a sample from the ring texture. Also (man I'm addicted to the word also) just to be sure the rocky rings are made of "sprites" right? Also (there it is again XD) are rocky planet clouds volumetric as well? I also (again) think you should look into Proland's code just a bit. I know it would be hard to implement but maybe you can glance something from it.

    Have you thought about implementing a solar system generator? How big can these planets?

    Finally how do you get Space Engine because I really want it but I can't figure out how to get it???

    There. Those are my ideas about what you can add to this.
    Ohh wait I think you should add a configuration to the star field generator that does a volumetric star field so you can fly around the stars. Just an idea.

    Good luck on this!
    How long to v3?
     
  24. XSSA

    XSSA

    Joined:
    Jul 19, 2012
    Posts:
    4
  25. Uncasid

    Uncasid

    Joined:
    Oct 5, 2012
    Posts:
    193
    You won't regret getting this tool! Really well coded, fast, and easy to use.

    And he / she is also very responsive to requests and bug reports, just check the thread.
     
  26. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,404
    Yeah I'm still working on the videos, I'm surprised how long it actually takes to make each one. The videos will cover pretty much every feature of the toolkit, so you'll be able to see most/all of the features from them.

    Yes you have full control over the gas giant density. I chose the current settings for aesthetics, because a higher density value will produce jagged edges unless you use anti-aliasing, and it doesn't show off the ring depth sorting etc.

    You can't create rings that are only visible from the dark side, but you can create very very feint ones that are very visible from the dark side. Here's a very quick modification to the Saturn ring texture I made and you can see the results:

    Notice the very very feint ring around the main ring system

    This is the same ring viewed from behind with the sunlight scattering through it

    In a future version I'll add a separate texture field so you can specify the amount of ring scattering, that will allow you to have a much smoother gradient on feint rings.

    I will also add the ring detail texture as you mention, Space Engine's implementation of this looks incredibly good and I'll surely try and match their quality.

    Yes, the asteroids in the ring around the planet are all billboard sprites. They're mainly designed to give your rings more visual impact rather than actually be anything to interact with.

    No, the planet cloud layer isn't volumetric. In the far future I may write a more advanced cloud component that would replace the current cloud layer, but I won't consider that for quite some time.

    Version 2 includes a very rudimentary 'solar system generator' (I use that term loosely). It's meant to just show the user how they might go about creating planets purely from code. However, this is designed to be a graphics pack, so I don't think I'll be writing any half-decent star system generator.

    The planets can be as big as you like, but because the planets aren't procedurally generated and you have limited texture sizes, there are constraints as to how detailed it can get.

    You can get Space Engine from here: http://en.spaceengine.org/load/core/spaceengine_0_96_full/2-1-0-14

    Just make sure you cool your GPU with liquid nitrogen before running it :p


    Yes, but right now each planet can only receive one shadow at a time. I plan to hopefully remove this limitation eventually.
     
    Last edited: Feb 13, 2013
  27. Ahdireyo

    Ahdireyo

    Joined:
    May 5, 2012
    Posts:
    33
    Understanding that it would take a long time to implement procedural generated planets is understood. But is it possible to implement into unity- a system to where you create your sphere and have the possibility to do - $t_1089.jpg $building18.jpg Images from Infinity
    I know you can custimize the terrain using the tessler thing, and there is no precedural generated system but is there a way you can do this in Unity? Create your world with mountainous detail with Improved L.O.D in the workspace. To make it somewhat closely similar to the images above

    $images.jpeg
     
    Last edited: Feb 13, 2013
  28. WermHat

    WermHat

    Joined:
    Jul 13, 2012
    Posts:
    88
    Infinity has been a 6 (more?) year project built as a custom engine, that's been on the brink of vaporware throughout its entire existence. We all want something like this in Unity, but it's not going to happen any time in the foreseeable future. This sort of thing has been discussed countless times in the Unity forums, and it's a testament to Darkcoders skill that it's even a remotely sane thing to bring up in this thread.

    Darkcoder is a standup guy who takes the time to personally address everyone's questions in great detail, but please remember that he's just one guy with a lot on his plate. Not to say anyone here is guilty of this, but let's be careful not abuse his kindness. The last update was a major engine re-write, and he's promised lots of cool detail work in the next couple updates. It's tempting to all chime in with our own personal requests (I'm guilty of it as well), but we need to allow the guy to catch his breath a little bit every once in a while.
     
    Last edited: Feb 13, 2013
  29. Uncasid

    Uncasid

    Joined:
    Oct 5, 2012
    Posts:
    193
    Infinity was actually purchased recently, which is why there hasn't been any "development" on it.

    And to achieve that planet in the sky look... I suggested adding impostors, and that would do the trick for that!

    The biggest problem you will run into is that unity is based on floating point precision.. infinity was based on double precision. Displaying a full sized planet that far out would cause sooo much z-fighting.. so you need to resort to tricks, things like impostors. You might also be able to implement a log-z buffer into your shaders. I did this in XNA with great effect!
     
  30. WermHat

    WermHat

    Joined:
    Jul 13, 2012
    Posts:
    88
    I used to follow Infinity on a daily basis. It was purchased about 2 years ago I believe, and over the course of the first 4 years there was constant concern from the community that the project was in limbo. But the details are irrelevant, the bottom line is that Inifnity is (and always has been) a gigantic undertaking, so we should adjust our expectations of SGT accordingly :).
     
  31. Uncasid

    Uncasid

    Joined:
    Oct 5, 2012
    Posts:
    193
    Oh, I agree with you completely.. Making a procedural world is a lot lot lot lot lot of work! I appreciate the toolset that he is developing for sure, I think the rest should be up to the users to implement... like roads / cities; for all here that have no idea how, look up something called l-systems.

    I think it is important to understand exactly what it is you are asking for before you ask, so you know that it fits within the authors scope!
     
  32. Xsnip3rX

    Xsnip3rX

    Joined:
    Aug 29, 2009
    Posts:
    197
    So what's planned for the next update, DC?
     
  33. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,404
    Yes, of course you can do anything in Unity you like, provided you have the programming ability.

    But I'm not sure if it's possible to get even half the speed of these completely custom C++ engines written over years with planet rendering being the focus. Unless you had access to Unity's source code and improved the Mesh and MeshCollider classes at least.


    Just general improvements to all the code, spaceship thruster effects, and video tutorials.
     
  34. Xsnip3rX

    Xsnip3rX

    Joined:
    Aug 29, 2009
    Posts:
    197
    Sweet, can't wait, when can we expect to see it?
     
  35. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,404
    If you want an early copy of this then just PM or e-mail me (the same goes for anyone), but I'm still working on the video tutorials so you'll have to do without them.
     
  36. Xsnip3rX

    Xsnip3rX

    Joined:
    Aug 29, 2009
    Posts:
    197
    PM'd, i can do without the video tutorials for now :p
     
  37. Xsnip3rX

    Xsnip3rX

    Joined:
    Aug 29, 2009
    Posts:
    197
    well i guess i should have waited, it seems much of Version 3 is broken, including all the prefabs i made for it.

    Edit: perhaps i should try a fresh install of V3
     
    Last edited: Feb 15, 2013
  38. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,404
    None of it should be broken, but if you're updating then check the cleanup tool found in: Component/Space Graphics Toolkit/Cleanup. You'll probably have to recreate your prefabs though.
     
  39. WillBellJr

    WillBellJr

    Joined:
    Apr 10, 2009
    Posts:
    394
    DC are the "whizzing" star fields included in this build? I noticed the field now moves along with the camera but I didn't notice an additional component for that function?

    Perhaps the effect is related to camera motion speed? (For my testing, I was mostly just rotating the camera in the upper view port using the inspector.)

    The editing features and the support of additional star tile textures are really great - thanks so much for adding that!


    -Will
     
  40. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,404
    Nope, I haven't written the whizzing by stuff component yet. The upcoming release isn't Version 3, but that will be added soon.

    Can you elaborate on what you mean by 'I noticed the field now moves along with the camera'? I don't think I changed the way the starfields move around the camera.

    I'm glad you like the additional starfield features!
     
  41. WillBellJr

    WillBellJr

    Joined:
    Apr 10, 2009
    Posts:
    394
    That could just be me not noticing it before since I was totally focused on planet texturing and achieving memorable star field patterns.


    It was just me looking for any kind of hint for the whizzing stars not realizing they weren't in this build...


    Oh let me at least ask - did you fix the normal mapping issue I mentioned previously for the planet surfaces in this release?

    My preliminary test of a planet textured with your supplied Earth images looked really good so far?


    At least I have something to play with now for the 3-day weekend - thanks!


    -Will
     
  42. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,404
    I checked the code and compared it to the Unity implementation and they match, I even made a test scene with a side-by-side comaprison of a normal mapped sphere and an SGT planet and they look the same. The reason why your normal maps look wrong is because your lighting gradient is nothing like the standard Lambert gradient. You'd need to use a gradient like THIS to get lighting similar to Unity spheres.

    However, using a lighting gradient like that won't produce very nice results without the use of HDRR, the current gradient system basically allows you to fake part of that. I'll play around with the planet stuff and try to come up with something.
     
  43. Xsnip3rX

    Xsnip3rX

    Joined:
    Aug 29, 2009
    Posts:
    197
    Quick question, i copied the exact settings from your 3D Thruster ship scene, i copied 1 "Main Thruster" and one "Thruster" into a prefab each, imported it into my main scene and for some reason it is not working, i checked that my inputs are setup correct and they are... am i missing something?


    Edit: Wow im an idiot, forgot the "3D Spaceship controller"
     
    Last edited: Feb 16, 2013
  44. greenmonster

    greenmonster

    Joined:
    Jan 18, 2013
    Posts:
    26
    After reading this entire thread and playing with this toolkit for a few weeks, I just wanted to say thanks to DarkCoder for an amazing asset. I honestly can't think of money better spent! (And I'm stingy)
     
  45. WillBellJr

    WillBellJr

    Joined:
    Apr 10, 2009
    Posts:
    394

    Okay thanks for the tip - I'll Designer up another planet when I get the chance and make sure I don't screw up the gradient again (assuming that's what I did in the earlier test scene.)

    If I get back into the same state again, I'll let you know.

    -Will
     
  46. Xsnip3rX

    Xsnip3rX

    Joined:
    Aug 29, 2009
    Posts:
    197
    Hey just wondering when you plan on having V3 out by?
     
  47. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,404
    No idea, but I will most likely make many small releases between now and V3. That way everyone can use the new features as I implement them.

    I plan to release the next update in a few days.
     
  48. Xsnip3rX

    Xsnip3rX

    Joined:
    Aug 29, 2009
    Posts:
    197
    Any idea what we can expect in the next release? (sorry, don't want to bother you)
     
  49. Uncasid

    Uncasid

    Joined:
    Oct 5, 2012
    Posts:
    193
    Patience is a virtue.. Quality over quantity!!
     
  50. shwa

    shwa

    Joined:
    Apr 9, 2012
    Posts:
    461
    This package looks quite interesting.

    Can one land on the planets and move around?
    If yes, do any any of the web demos show this?
    If yes, which one?

    Are their fully functioning demo scenes that come with the package that you buy?
    I ask cause i'm not a hardcore coder.

    If yes, here's what i want to do:

    Have a person be able to fly thru space, land on a planet, and view some of my photos/artwork on that planet.

    Is this something possible with one of the demo scenes that are included?

    ( I know how to use my photos as textures and lay them on billboards in a scene.)

    Thanks!

    shwa
     
    Last edited: Feb 21, 2013