Search Unity

[RELEASED] SPACE UNITY - Space Scene Construction Kit

Discussion in 'Assets and Asset Store' started by imphenzia, Feb 19, 2013.

  1. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    What I was referring to was baking an environment to a cubemap like this:
    http://docs.unity3d.com/ScriptReference/Camera.RenderToCubemap.html

    And to save the cubemap as separate PNG's, you can do this:
    http://answers.unity3d.com/questions/9189/how-can-i-extract-the-individual-faces-from-a-gene.html

    As far as optimizing draw calls, you could instead author your skybox cube model to use six separate materials/UV's and use the Mesh Baker asset to automate the new UV's and new texture. I don't know if that would work very well or not, but it could be easier than trying to manually line things up.
     
  2. Binary42

    Binary42

    Joined:
    Aug 15, 2013
    Posts:
    207
    Uhh nice to learn about RenderToCubemap. I'll check out how this works out with a spherical cube for the SSCK background. Or, does anybody got a hint how to get from a cubemap to properly distorted spherical map?
     
  3. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    I know you have been busy but we would like to know about saving the seed in xml to a MYSQL. We have the mysql system set up for our housing ect set up. We just need to know about saving and loading with this kit.
     
  4. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    runningbird likes this.
  5. Kiori

    Kiori

    Joined:
    Jun 25, 2014
    Posts:
    161
    Hi there I'm thinking about using this for mobile, on a 2D-ish game. I thought about getting the star textures and using it as BG, then adding the nebula textures and rotating them around etc, will that work? any ideas?

    I thought originally about using this to create skyboxes, but as i dont have Pro, I read its out of the question.
    I also saw your mobile skybox pack, maybe ill consider that one. the downside is i lose the ability to custom make scenes.

    Also, on that pack, how did you make 1 drawcall skyboxes?

    Thanks for anything.
     
  6. imphenzia

    imphenzia

    Joined:
    Jun 28, 2011
    Posts:
    413
    Hi! You can use the textures as you mentioned, as layers of stars, nebulas and galaxies and then you could use planet textures on spheres if you wish to have them in your 2D environment too. For a nice (but fake) effect you can use a parallax effect to pan layers at different speeds - not very realistic since they would be so far away but it looks nice.

    My mobile skybox pack uses a layout of all 6 sides of a cube onto a single texture which is used as a single material on a custom mesh. I have just released 6 new packs of 8 skyboxes that come as full 6x4096x4096 skyboxes and also as a brand new optimized single 4096x4096 texture versions. If you look at 2:15 in this video
    you will see how the texture and UV-map is for the new single drawcall spacebox.
     
  7. Kiori

    Kiori

    Joined:
    Jun 25, 2014
    Posts:
    161
    Hi thanks i just bought it(the space unity+exp pack), i've actually had my eye on it for a while. Would you mind helping me with ideas on the parallax later on? thats actually what i had in mind. I'm still at the design stage, but soon enough I'll want to deal with the back grounds so I'd be glad if you could assist in the better usage of your asset.

    Thanks again, great work btw. ;)
     
  8. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,191
    This package is great, and I'm planning on using it on multiple games!

    For one of those games, I'm using the space scene purely as a background. This game will consist of randomly generated levels, and as such, I found the need for randomly generated space objects.

    I spent yesterday and today creating an in game random space generator, and I think it works great. Hopefully others find it useful! The generation is done in a single frame, and when you create a new space object, the old one is destroyed. Both of these operations would be better off in a coroutine, spread out over multiple frames, but this should serve as a nice base.

    All files are found in SpaceUnity/Scripts. There are a couple of minor hoops you'll have to jump through, so make sure you read the included instructions.

    I've only tested it a little, so there may be bugs, but it appears to do the job. Enjoy!

    Edit: Uploaded new file: You can now pass in a seed value or have the script generate one from the computer's current time. If the latter method is chosen, the seed is returned via an out paramater, so you can save it and reuse it later.
     

    Attached Files:

    Last edited: Nov 8, 2014
    imphenzia likes this.
  9. imphenzia

    imphenzia

    Joined:
    Jun 28, 2011
    Posts:
    413
    Thanks! Well I had my mind set on creating SPACE for Unity 2D - but troubles in developing the update postponed that but I'd be happy to try to assist with any questions you have.

    Great - thanks! I haven't been able to check it out yet but I really appreciate sharing your work!
     
  10. imphenzia

    imphenzia

    Joined:
    Jun 28, 2011
    Posts:
    413
    I know some of you have been waiting for ages but I'm back spending days and nights developing on the update. I know that it's not Unity5 compatible or Oculus DK2 compatible yet but I've got both the Unity 5 Beta and the DK2 kit now so it's about to happen. I'm pushing hard trying to get the floating origin system (probably on the THIRD re-write by now!) to work and I'm hoping to get the update and Unity 5 compatibility to work in the same update to avoid redoing work for the current release to make it Unity5 compatible.

    Here is a video I'd like to share.This is a new animated local star to replace the current particle system local stars:



    You create the new stars and specify the size as "x times Sun radius". The one in the video is exactly the size of the sun. The floating origin is in effect in the video and as the ship enters warp speed (set to x2 speed of light in the video) you travel as you expect in terms of speed and all objects are rendered as their actual size.

    The new stars also have auto exposure / blending to be enabled/disabled as you wish. As seen in the video the star turns into a bright flare at a distance and as you approach it "unrealistically" blends the camera so you see the star surface similar to how stars appear in Elite Dangerous for example.
     
    OnePxl likes this.
  11. Kiori

    Kiori

    Joined:
    Jun 25, 2014
    Posts:
    161
    Be sure to include the particle system also, if its more performance effective than the new method. If the new system is better, scrap that.
    Btw loved the warp speed, best solution i've seen so far. Really cool how everything distorts around it. awesome.
     
  12. imphenzia

    imphenzia

    Joined:
    Jun 28, 2011
    Posts:
    413
    Yeah - at a distance it'll only render the flare which is also animated and you can optionally keep only the flare upclose so it should be the best performance of all.
     
  13. Kiori

    Kiori

    Joined:
    Jun 25, 2014
    Posts:
    161
    on a side note, doing some beginning tests for my project, i rendered a basic space scene with minor stuff and minor details, but all the usual props(no asteroids) and it gave me 14-16 drawcalls, that's good right? also its interesting i thought you could touch, planets but it turns out they are backgrounds. or maybe its something i tweaked in the options. i havent figured everything out yet, so i'm learning the asset.
    Also, is it possible to make a permanent, 1drawcall skybox, from the generated context? Kind of liek the ones you have on the mobile asset pack.
    I'm asking because it would be cool to be able to reduce 16-20-maybe up to 40 - > to 1. I'm worried about mobile performance. I don't mind using image editors or whatnot, if you have an Idea on how pm me.
     
  14. imphenzia

    imphenzia

    Joined:
    Jun 28, 2011
    Posts:
    413
    It's possible to render the entire scene to a a skybox which would be 6 drawcalls if you use the Unity skybox component. You would require to have Unity Pro for that since RenderTexture must be used. The downside when rendering to texture for mobile is that Unity doesn't support texture compression for runtime generated textures on mobile so although you get a less draw calls you would instead use a large amount of VRAM.

    In my development version I combine all nebula textures to a single atlas to reduce draw calls, but same issue for mobile which is a bit of a pain with the VRAM usage.

    The best use of a single draw call layout that I've managed to achieve with 4096 textures is the "SpaceBox ST" spaceboxes I've released at www.spacebox4096.com. It would be tricky to get the layout of the textures during runtime since the textures are stretched and also padded with 8 pixels around all the borders.

    Finally, you could change the planets layers so they are in the Default layer instead of DeepSpace (layer 20). This way you could fly around the planets but you would still be limited to the size of a Unity scene which effectively is 10-100km from the center of the scene depending on precision needed.
     
  15. Kiori

    Kiori

    Joined:
    Jun 25, 2014
    Posts:
    161
    Thanks for the hint, and I don't intend to buy PRO atm, but yeah I'm testing things, and maybe the whole 'omg you like 20 drawcalls max for mobile', is a bit overrated.
    All my testing points out that i don't have to worry too much about the drawcalls, more about textures, and effects.

    Also one thing, in the space for unity textures folder, it seems your textures are actually 4k, but they are imported as 1k(for me at least), is that correct?
    I mean i prefer that since i wanna keep the texture size small, but does unity auto-do-that?
    What if i wanted to change the size of all the textures at once?

    Btw I never congratulated you, this is a wonderful asset, great job!

    Edit: oh and thanks for the planet hint, i'll toy with it later on.
     
  16. imphenzia

    imphenzia

    Joined:
    Jun 28, 2011
    Posts:
    413
    Yes, reducing from 6 to 1 drawcall for skyboxes has no measurable performance increase from what I've been able to test so I think drawcall hunting is a bit overrated too. Still it makes perfect sense to use atlas and same texture when you have multiple objects. Aim is always to reduce drawcalls and I'll implement a render skybox on runtime feature for Pro users because all nebulas, stars, and noise would combined perform much better in a single (or up to 6) unlit texture(s) compared to 10-20 additive textures as it is today. Maybe texture compression for runtime generated textures is coming to mobile one day too which would be great.

    Many of the textures are 4096x4096 but they are set to maxsize 1024x1024 to improve import speed when you purchase the asset. Compressing all textures, especially for mobile projects, take a long time and import time would be 16 times longer. The manual mentions this, so best is to increase the resolutions for the textures you plan to use.

    You can shift-select multiple textures and change max resolutions of all of them, but unity 3.x and 4.x may crash if you do so on too many at once as it runs out of memory. I've reported that as a bug because I can't see why it wouldn't release the memory after altering each texture.

    And thanks - glad you like it!
     
    OnePxl likes this.
  17. YX_Iain

    YX_Iain

    Joined:
    May 4, 2014
    Posts:
    31
    I've noticed that if I set my FOV to more than 60 then planets visually distort (looking stretched) at the left and right of the camera if 16:9 or 16:10 display ratio is used. Is there a way to minimise this effect by changing the projection radius for the planets and nebulae?

    Edit: Fixed it using a Fish Eye lens (not the one which comes with Unity though). Shame the potential problems when the FOV is raised is not mentioned anywhere in the asset's readme files nor on the asset page itself.

    Edit 2: Turns out that did not fix it at all, as the background does not scroll at the same speed as the foreground depending upon the area of the screen you are looking at. Real shame this question has seemingly been ignored.
     
    Last edited: Feb 28, 2015
  18. saucer78

    saucer78

    Joined:
    Jul 6, 2014
    Posts:
    66
    I'm glad I looked into this thread, as I'm trying to use the kit with Unity 5 FOR a DK2 project :cool:

    Out of curiosity, what limits its compatibility with the DK2? Will the planets and other objects simply not appear 3D?

    Any updates on progress? This is going to be an AMAZING tool to use with space sims :D
     
  19. Bradamante

    Bradamante

    Joined:
    Sep 27, 2012
    Posts:
    300
    I've got problems using this kit with an orthographic camera. The corona/halo effect of the planets just isn't there. Is there anything I can do or did I buy this for naught?
     
  20. Magikos

    Magikos

    Joined:
    Oct 16, 2013
    Posts:
    11
    Is there a way to generate a random galaxy? X number of solar systems, each system has random planets?
     
  21. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    Hi, just to let you know that if you use your planet shaders in a Unity5 project targeting Android you get a 50% reduction in frame rate. I have one planet in view with a simple space scene, 60+fps on U4.6, 20fps on U5.0P3.
    Turning off the planet 20fps goes to 40fps, turning off the skybox on the camera gets me back to 60fps.

    So in a nutshell there is something wrong with the planetStandard shader and the skybox on U5 Android.
     
  22. YX_Iain

    YX_Iain

    Joined:
    May 4, 2014
    Posts:
    31
    The author has not replied since November 2014, and there are still not features implemented which he outlined would be implemented on a roadmap for development approximately two years ago. Ladies and gents, I think we have ourselves a dead asset here.
     
  23. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    I tried contacting him though his website with no luck so i think you are right, it's a dead asset. SO is there any shader gurus or Unity shader staff on here can have a look at the PlanetShader and see why it's so slow on Unity5?
     
  24. OnePxl

    OnePxl

    Joined:
    Aug 6, 2012
    Posts:
    307
    I've been reading lots complaints of slow down on Android with Unity 5, is the slowdown only on Android, or also on the other platform builds?
     
  25. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    My android test device is a nexus 7 so shows up all the performance flaws. My iOS test device is an iPad air2 so blistering fast and so I can't tell if it's all platforms. But it does seem to be things like the ngui unlit shaders and space for unity shaders that U5 doesn't like on android.
     
  26. OnePxl

    OnePxl

    Joined:
    Aug 6, 2012
    Posts:
    307
    There's definitely something fishy going on with Android deployments with 5.
     
  27. imphenzia

    imphenzia

    Joined:
    Jun 28, 2011
    Posts:
    413
    Hello, just a heads up from comments above - the asset is still supported and I have just returned (yesterday) from a two week vacation abroad so I've been a bit behind on my e-mail.

    I've just seen (and responded to) the e-mail about Android performance and I will investigate the shader. As mentioned I believe other assets have the same performance issues so it may be something Unity5 related that I am unaware of.

    The great thing about Unity 5 is that all the past pro-features are now in Unity free and most importantly "render to texture". Render to texture will allow me to add the option to pre-render the entire scene when it is loading to a static skybox. It won't allow for any movement within the skybox though so in order to travel around planets those would still need to be rendered separately.
     
    OnePxl and hopeful like this.
  28. AgentFoxtrot

    AgentFoxtrot

    Joined:
    Apr 6, 2015
    Posts:
    7
    Hey, imphy. Novice Unity developer here and I just downloaded Space for Unity. I'm finding a lot of the prefabs are showing up bright solid pink instead of their normal beautiful meshes. Is this due to a conflict with Unity 5 or am I missing something? Thanks for a great product.
     
  29. imphenzia

    imphenzia

    Joined:
    Jun 28, 2011
    Posts:
    413
    Hi!

    What platform are you compiling for? My tests on Unity 5 show all art assets but back in the Unity 5 beta I did have an issue once but that appeared to be because the asset didn't import properly in the first place.

    Try to reboot the computer and create a new project in Unity. Delete the SPACE for Unity folder in "AppData\Roaming\Unity\Asset Store-5.x\Imphenzia\Editor ExtensionsDesign" under your Users\Profile folder (usually C:\Users\NAME on PC). Then create a new project and download the asset again.

    Please let me know if the problem remains. I will upload a Unity5-version of the project that has already gone through conversion tonight.
     
  30. YX_Iain

    YX_Iain

    Joined:
    May 4, 2014
    Posts:
    31
    Is that why you ignored my question about the FOV from over a month ago?
     
  31. imphenzia

    imphenzia

    Joined:
    Jun 28, 2011
    Posts:
    413
    Did you send that via mail? I didn't see that, however, switching over to Office365 with multiple domains has proved very problematic. Please resend the mail and I will be glad to answer!

    I am also aware that there has been a long time since I released SPACE and when time allows I am still developing the update. The problem, as it turns out, is that trying to get a floating point origin to allow seamless flight in a universe with multiple galaxies is far from simple. If I were to release that update as it is now it would take this asset from being a one-click space scene generator to something that would be a complex asset requiring a lot of experience to use. My solution so far is very similar to the one used in the Kerbal Space Program for floating origin and looking at this video may give an indication of what that entails:
    (starting around the 4:20 mark.) I have since the release of SPACE learned that I should be cautions making "promises" and releasing "work in progress", but I wasn't aware of the complicated path ahead unfortunately.

    Still - the SPACE for Unity works as it was originally designed to do - generating unique space scenes and I am uploading a Unity 5 package that should hopefully provide a better import experience for Unity 5 users.
     
  32. imphenzia

    imphenzia

    Joined:
    Jun 28, 2011
    Posts:
    413
    I've uploaded the Unity 5 package now which fixes transparency for planet rings. It's currently pending approval.
     
  33. AgentFoxtrot

    AgentFoxtrot

    Joined:
    Apr 6, 2015
    Posts:
    7
    Thanks for your quick response! I am sorry I wasn't able to respond sooner in kind.

    I am using Mac OSX 10.9. Does that make a difference in your recommendation?
     
  34. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    KSP is a fun game ...its 64bit now ..they really improved it ....took those devs a long time to get KSP working right in Unity and a lot of it was because of the 32bit restriction of the engine....that restriction is gone now with Unity 5.

    The stuff mentioned here http://www.spaceunity.com/2013/11/work-in-progress/ (and in the video that was associated with it,but seems to be missing now..) is all I was expecting :)

    I wasn't expecting miracles ....unless those things are turning into miracles now since they are so hard to implement :D

    But thanks for trying and keeping the asset working and up to date.
     
  35. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    While the Unity 5 editor is now 64 bit this applies mostly to memory addressing per my understanding. Allowing Unity to access more than 3gb RAM. Unfortunately the transform components are still 32 bit. This means that if KSP is using 64 bit .position data that they are either using a custom method of positioning objects ignoring Unitys API or more likely they are storing accurate 64 bit position data into a Vector3Double (community provided) or a custom class of doubles. However this 64 bit data gets converted back into 32 bit when applied to an objects transform.position component.

    Again unless they are using some magic sauce, this means they are probably using a floating origin.

    Let's take our player who will start fresh at world 0,0,0 with a floating origin distance of 10000. As the player moves the distance and vector that they have moved is stored into a Vector3Double this lets us keep track of where the player is in the world. As the player excedes the 10000 distance limit they are snapped back to world 0,0,0 and all the objects in the game are shifted in the world with the player. Now the player is back to word 0,0,0 but our Vector3Double still holds our exact position in the world.
     
  36. imphenzia

    imphenzia

    Joined:
    Jun 28, 2011
    Posts:
    413
    I don't know anything about Mac unfortunately - although I suspect I will learn as I'll be getting a Mac in addition to my PC soon, I need it to compile to iOS devices and also for audio work.

    Did you manage re-import the asset and get it to work? There should be a version 1.05 now which was uploaded from Unity 5.
     
  37. AgentFoxtrot

    AgentFoxtrot

    Joined:
    Apr 6, 2015
    Posts:
    7
    I can try that. Will reimporting undo the work I've done so far using your prefabs?
     
  38. imphenzia

    imphenzia

    Joined:
    Jun 28, 2011
    Posts:
    413
    I totally understand. I was really happy with my new planet engine initially until I ran into a snag with that one too. I was using Allegorithmic Substances to generate the planets and it allows totally removing all but the cloud texture maps to create unique planets and although the planets look good from a bit of a distance it didn't allow high enough detail when getting close. The substances had artifacts and also used compression that I could not avoid leaving raster lines and other problems. For some reason the maps only generated to 2048 instead of 4096 and substances don't allow spherical mapping so I had workarounds for that too - still, I wasn't pleased with the quality. I have another path for that though - the fact that pro features are now enabled for everyone in Unity 5 allows me to create unique planets on runtime mixing 3D noise maps with painted textures and I'm really excited about that method.

    As for the nebulas, they can probably still be substance based but they also suffer from the quality and artifacts. I spoke to Allegorithmic during GDC last year and I've also filed bug (for artifacts) and feature request (for increased resolution and cube/sphere maps) but nothing happened back then so I think I have to check if any changes have been made lately.

    As I mentioned with SPACE, it was originally designed to do exactly what it does and then feature requests and own ideas turned into "promises" before I fully considered how it would suit to be implemented in SPACE. The substance planets and nebulas, for example, would require only a few KB of data so why should that be in the same release as a half a gigabyte asset that assembles bitmaps? Also, the asset is really easy to use now, and with a complicated floating point origin solution to tackle the precision problem - it would turn a very easy asset into a very difficult one to use. I am still not sure on the best path forward, but my thoughts now are to keep developing the new stars and flares, the new unique planet generator that mixes procedural planets with bitmaps, and implementing a floating point origin to travel between planetary systems with "limited support" - I won't be able to educate everyone though support how to design a game and understand floating point origin, but I should be able to offer the framework to allow for such a game to be made - if that makes sense.
     
    hopeful likes this.
  39. imphenzia

    imphenzia

    Joined:
    Jun 28, 2011
    Posts:
    413
    Yes, they are using floating origin. I do the same, before I knew their solution, I snap back the player object when reaching 10000 and move everything back with me. In contrast, I use 2 Vector3Doubles though, one V3D to represent the position of a player within a planetary system and one V3D on top of that to represent the position of the planetary system in the universe.
     
  40. imphenzia

    imphenzia

    Joined:
    Jun 28, 2011
    Posts:
    413
    Could you try importing the asset into a new blank project to see if everything works as it should first? Not sure how the prefabs act if you reimport to your existing project - always back up first :)
     
  41. AgentFoxtrot

    AgentFoxtrot

    Joined:
    Apr 6, 2015
    Posts:
    7
    So I managed to re-import with no problems, but my pink ring issue is still there. I'm willing to bet there's a step I skipped somewhere. Here's a screenshot:



    I must thank you for being so patient with a novice! You've created a great asset and are very responsive to all issues.
     
  42. imphenzia

    imphenzia

    Joined:
    Jun 28, 2011
    Posts:
    413
    No problem =) Maybe there is an issue with the ring material. Try to go into the Materials/Rings folder and drag a new ring material onto the pink rings. Try a few different ones just to be sure.
     
  43. Assets-Reporter

    Assets-Reporter

    Joined:
    Jul 4, 2015
    Posts:
    79
    Last edited: Jul 18, 2015
  44. Ahnuld

    Ahnuld

    Joined:
    Oct 20, 2012
    Posts:
    15
    Thanks Assets Reporter, I cannot wait to try this new version, it is exactly what I'm looking for!
     
    Assets-Reporter likes this.
  45. digiross

    digiross

    Joined:
    Jun 29, 2012
    Posts:
    323
    Can't wait for the new update, looks good. Any eta?
     
  46. digiross

    digiross

    Joined:
    Jun 29, 2012
    Posts:
    323
    Any ETA on the new update?
     
  47. Litauen

    Litauen

    Joined:
    Aug 17, 2015
    Posts:
    3
    Hello, great package!

    I have problem with flares. When I add a flare on some object, it is duplicated on the skybox:



    I think this is because of 2 cameras in the scene: Main Camera and SpaceCamera which both have Flare Layer's. I tried to play with Ignore Layers setting - does not change anything. Please advice how to use Flares on scene objects without duplicates on the skybox?
     
  48. Bradamante

    Bradamante

    Joined:
    Sep 27, 2012
    Posts:
    300
    Bit of a bug report: SU_SpaceParticlesEditor.cs is spamming the console with Error messages from line 88 + blocks the Inspector GUI if the scene has no camera. Commenting out lines 88-90 gets rid of it.

    Maybe something a future update could fix?
     
  49. digiross

    digiross

    Joined:
    Jun 29, 2012
    Posts:
    323
    I don't believe the developer is getting the forum notifications. I emailed him the other day and he said he is working on a proper Unity 5 update expected Oct/Nov timeframe that should fix any issues.
     
    hopeful likes this.
  50. wrench_nz

    wrench_nz

    Joined:
    May 13, 2014
    Posts:
    11
    I already own this but am very keep to implement procedural planets (at distance). Please keep up the good work. I check back every day.