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. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,406
    Do you have a video example of the kind of camera system you need? I've written a few camera additions for the next build, but more wouldn't hurt.
     
  2. Distant_Temples

    Distant_Temples

    Joined:
    Apr 14, 2012
    Posts:
    131
    Currently I'm trying to incorporate it into ArenMooks Space Game Starter Kit. He has a demo @ http://www.tasharen.com/sg/

    I like this kind but I'm certainly open to others.

    Thanks :)
     
  3. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,406
    I'm confused. If you have both kits then why not just use the 3rd person camera feature of SGSK?

    SGT currently doesn't have any camera components that could be used to make that kind of a 3rd person camera, but once I add more space ship related things I may well add them.
     
  4. Kafar

    Kafar

    Joined:
    Nov 29, 2012
    Posts:
    220
    Hi Distant Temples,

    How is experience to mix the 2 kits? The multiplayer feature is optional? Is possible to use the SGT to design planets and stars and use the SGSK to develop the space game only? Need to buy the NGUI also?
    Thanks

    -Kafar
     
  5. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    Kafar, No you don't need to purchase NGUI. SGSK uses the free version unless you have purchased it and want to get the Full version you would need to send him a pm. SGT works with it just fine. I did it here: http://archaniaworkshop.com/blog/?p=24
     
  6. Distant_Temples

    Distant_Temples

    Joined:
    Apr 14, 2012
    Posts:
    131
    Sorry had I had to step away to cook dinner. I know this may be an odd way to do things but while I'm not that good at programming I do ok at modifying stuff. I do learn more as I go along. It may not be the best way of going about things but I am also reading up on the resources that unity supplies and learning where I can.

    Where SGSK is third person and SGT is first person I'm not seeing much for example on how to implement your camera system into a third person system. It works nicely with the planets. SGSK also has a nice system that offers distance rendering. Trying to combine the two is a challenge which is fine. I'm up for it but it would also be nice to see how you implement your camera system into a third person system. I'm sure there would be stuff in it that would be very helpful.

    When it come to mixing them as you can see I'm still in the middle of that. I have mixed them by placing the SGT planets in the SGSK and using the " Create Collider" and it works good. I'm just in the process of making sure that I utilize all of what both tool sets offer. In my option they are both great and seem to be an awesome fit for each other. SGT picks up right where SGSK stops. They offer the strength of two great programmers.

    SGSK offer a few options when you want to buy it. The base kit uses Unitys Networking and GUI systems. So it is set up for multi player out of the box if you want to use it. ArenMook the author of SGSK also sells NGUI and TNet. NGUI replaces Unitys GUI interface and TNet replaces Unitys networking interface. You can contact ArenMook to get a built that is configured they way you would like.

    Both NGUI and TNet make Unity a whole lot nicer to deal with
     
    Last edited: Jan 8, 2013
  7. WillBellJr

    WillBellJr

    Joined:
    Apr 10, 2009
    Posts:
    394
    DarkCoder, I'm wondering if you can help me with some weirdness I'm getting with some generated normal maps.

    Working with LunarCell, I came up with a decent color map which I wanted to try as my first real attempt at creating my own planet "Obnoss 4".

    Knowing that I need a specular and normal map, I also figured I'd play with Substance Designer since I'm still trying to determine if I want to buy that package.

    So I created a graph that takes the color, does grayscale conversion, and creates the normal and specular map outputs. (I crush the levels on the spec pump up the blue channel in an attempt to make the water more reflective than the land, and mix in some minor noise into the normal. I export with a couple of exposed tweaks for the noise blend and normal strength.)



    If I create a regular material and texture a sphere using that, the Normal channel seems to appear correctly:

    Color:


    Color w/Normal:


    For a first shot, I'll say it looks pretty decent considering...

    Now when I hide that sphere, and redisplay my SGT planet, I removed all the texture channels (along with the clouds and atmosphere) and started over with the textures from the Substance:

    SGT Color:


    SGT Color w/Normal:
    +

    For some reason it seems like the bumps are only showing up on the shadowed edge and it doesn't look right across the rest of the surface? No matter how I rotate the camera around the planet, the bumps only show on the shadowed part of the planet.

    Maybe I need to invert the normals for SGT? Not sure what your planet shader is doing or expects.

    Finally with the atmosphere:


    Here's a link to the SBar if it helps:
    http://www.willbelljr.net/public/unity/Planet_Obnoss.sbsar

    I embedded the source texture so I believe it should work once dropped into Unity.

    Any suggestions appreciated!

    -Will
     
  8. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,406
    It looks like SGSK's camera just smoothly rotates to the ship's rotation. There's no component in SGT that allows you to do that, but I've just written it:

    SmoothMatchRotation.cs
    Code (csharp):
    1. using UnityEngine;
    2.  
    3. public class SmoothMatchRotation : MonoBehaviour
    4. {
    5.     // Inspector tweakables
    6.     public Transform targetTransform;
    7.     public float     dampening = 10.0f;
    8.    
    9.     // Untweakable
    10.     private Quaternion currentRotation;
    11.    
    12.     public void Awake()
    13.     {
    14.         // Store the initial rotation
    15.         currentRotation = transform.rotation;
    16.     }
    17.    
    18.     public void LateUpdate()
    19.     {
    20.         // Only update if there is a target
    21.         if (targetTransform != null)
    22.         {
    23.             // Find the framerate-independant interpolation factor
    24.             var factor = DampenFactor(dampening, Time.deltaTime);
    25.            
    26.             // Smoothly interpolate rotation to target
    27.             currentRotation = Quaternion.Slerp(currentRotation, targetTransform.rotation, factor);
    28.            
    29.             // Copy
    30.             transform.rotation = currentRotation;
    31.         }
    32.     }
    33.    
    34.     public float DampenFactor(float dampening, float elapsed)
    35.     {
    36.         return 1.0f - Mathf.Pow((float)System.Math.E, - dampening * elapsed);
    37.     }
    38. }
    To get this to work:

    1) Make an empty game object, this will be your camera pivot.
    2) Attach the above Smooth Match Rotation component to this camera pivot game object.
    3) Drag and drop your space ship game object onto the Target Transformation inspector field of this new component.
    4) Attach the camera pivot game object to your spaceship game object.
    5) Make sure the camera pivot game object's position is set to 0,0,0 after you attach it.
    6) Attach your main camera game object to the camera pivot game object.
    7) Make sure the main camera game object is positioned behind your space ship. e.g., 0, 10, -100 for 10 up and 100 back.
    8) Tweak the Dampening value in your Smooth Match Rotation component. Values like 2.0 or 3.0 work well.

    When done, it should look something like THIS.


    Thanks, I thought the normal mapping looked a bit funny. I'll check it out!
     
  9. Distant_Temples

    Distant_Temples

    Joined:
    Apr 14, 2012
    Posts:
    131
    Way Cool, Thank you! I will give it a whirl.
     
  10. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @Darkcoder: Your SGTK is simply one of the best things to hit unity.

    @WillBellJr : I've been thinking of using substance for planet surface generation as well. I like your results. I'm going to have to give it a try now. :)
     
  11. WillBellJr

    WillBellJr

    Joined:
    Apr 10, 2009
    Posts:
    394

    Initially I tried using the Bitmap2Material node, but I need the water to be more reflective than the land masses; B2M didn't provide a way to invert the specular channel internally so I decided to roll my own using nodes in Designer - yes, it did come out pretty decent for what was a first attempt.

    Hopefully DarkCoder can figure out what's going on with the normals going into his shaders.

    Here's a snap out of Designer of Obnoss 4 (v2) after tweaking the noises a bit further; blending in an additional image map and noises etc.:


    The water is nicely reflective but I need to tighten it up a bit. Next I'd like to learn how to vector or bitmap mask out the land areas so I can tighten up the specular. After that, derive a night time map so the cities will show up on the dark side.

    I've been studying the Allegorithmic YouTube channel to get a better idea on how to use the nodes. The FXMap and Bitmap nodes are very powerful from what I"ve seen. I still however prefer Genetica's Canvas node over Designer SVG at this point in time.

    Don't forget Unity Pro owners get a percentage off (just ask Jerc for the coupon code) or if you don't need commercial, Designer is currently $99.

    -Will
     
  12. WillBellJr

    WillBellJr

    Joined:
    Apr 10, 2009
    Posts:
    394
    Threw together another one - played a bit further just to pin down the workflow - I guess I'll be buying Designer lol!

    Pytairus:


    I ended up teaching myself how to mask using the SVG tools, wasn't hard at all, just tedious. Then I realized Lunarcell can export an Ocean Map - doh!

    Still needed to wire up some nodes to mix in the snow areas into the specular since snow should be reflective as well.

    LunarCell also exports City maps so I was able to wire that channel in along with a City Density tweak. I may need to add a blur tweak to that channel because I sometimes see a little bit of flickering on the lights depending on the viewing angle. That could be due Unity's Quality settings however, have to check.


    Even though the normals don't display properly, I was still able to get a bit of bump by turning the normal strength way down - she looks good rotating in my scene with the atmosphere - can't wait for version 3!

    -Will
     
    Last edited: Jan 9, 2013
  13. Kafar

    Kafar

    Joined:
    Nov 29, 2012
    Posts:
    220
    Hi all,

    Perhaps I'm wrong something but I would like to reproduce a behaviour of the starfield like in Star Wars saga.
    Moving a camera the starfield scroll down (or up), actually the starfield is fixed and scroll the planets only.
    How can accomplish that?
    Thanks

    -Kafar
     
  14. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,406
    Do you mean the hyperspace effect where the stars become lines? If so, this effect isn't possible to reproduce with SGT yet, but I have plans to include it in Version 3.
     
  15. Kafar

    Kafar

    Joined:
    Nov 29, 2012
    Posts:
    220
    No, but it could be very good.
    No, I mean another thing, but I solved it attaching the Starfield script from Main camera to Skysphere.
    Thanks

    -Kafar
     
  16. WillBellJr

    WillBellJr

    Joined:
    Apr 10, 2009
    Posts:
    394
    Interesting, I'd like to see this effect you're looking for Kafar, I may try what you did just to see what you're trying to achieve. Any YouTube videos you can point to which also shows this effect?



    I'm glad to hear you're adding the whizzing stars for v3 DarkCoder! I think that will make a good amount of the requirements for my game levels complete (well, except for the Hero asteroids)...

    Thanks for your hard work!

    -Will

    PS - Were you able to download and use that Substance I provided? I was wondering if it would work properly after embedding the source image.
     
  17. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,406
    I think he means he wanted a 3D starfield in the scene (i.e., not in the background). But he previously had the starfield component attached to his main camera, thus the stars just followed the camera all the time.



    Yeah, I got the substance just fine. I'm in the middle of upgrading (breaking) some of the internal classes used by the starfields and planets, so I can't test the normal maps just yet. But if you urgently need it then I could test it against an earlier build?
     
  18. WillBellJr

    WillBellJr

    Joined:
    Apr 10, 2009
    Posts:
    394
    No that's fine, I can wait - again I was just curious if the substance would actually work correctly with the embedded bitmap and not give an error saying "missing image" or some such...

    I'm actually starting to like Designer - I really wish I could create a Substance that does what LunarCell does but totally generated algorithmically within the Substance graph; generate the water and land masses, texture them with noises etc., all with a bunch of exposed tweaks and perhaps even a few optional bitmap inputs for added variety.

    Perhaps in time as I learn it more...


    -Will
     
  19. Azaphrael

    Azaphrael

    Joined:
    Nov 17, 2011
    Posts:
    41
    And exactly this is the hair-pulling part. ;)

    But if you manage to get it working, I'm willing to pay you good money for that Substance. :D
     
  20. Mark-Dawson

    Mark-Dawson

    Joined:
    Jan 11, 2013
    Posts:
    1
    Big fan of the kit so far Darkcoder, I'm having a blast playing around with the various tweaks. Two questions though if you have the time.

    Firstly are you going to add in different detail / texture maps for different heights at some point?

    Secondly for bigger planets, I've been wanting to have more customization in how detailed a planet can be, from the ground level. Splat / color maps for objects and blending and such, would this also be an eventual feature?

    Either way, very good so far, and thanks for any help you can give!
     
    Last edited: Jan 12, 2013
  21. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,406
    Right now, the planet shader is almost at the limit in terms of instruction count for shader model 2. I'd like to improve the shaders, but I'd rather not lose mobile support. I could just make it so that it switches to shader model 3 when you enable enough features to break the instruction limit, but every new optional shader feature I add requires me to double the shader count. If I add in options for multiple detail/normal/colour maps then the amount of shader variations would very quickly get out of control.

    Essentially, the planet shader is a never ending can of worms. For now and the next few releases I will focus on nebulas/thrusters/shields/weapon effects etc, because they're probably far more useful to the majority of users.
     
  22. WillBellJr

    WillBellJr

    Joined:
    Apr 10, 2009
    Posts:
    394
    Well I'll add my vote since the target of my game is PC, perhaps web browser and lastly mobile.

    Unity gives those other build options for free (well not considering the cost of the mobile add-ons) but my main target has always been the PC platform.


    So please consider perhaps separating out into a SGT_Mobile_... category of components, or adding a switch to enable more powerful options - I'd definitely appreciate the additional capabilities.

    For me targeting to Android is a nicety and even then it will be way limited cause I only bought in at the Android Basic level and may not care to ever move up to Pro...


    -Will
     
  23. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,406




    I've now written a texture atlas generator into the starfield component, so you can combine any number of star images/tilesheets of varying resolutions into a single starfield. In addition to this, you can change the spawn probability of each individual star type, as well as override the min/max radius values.

    This should be enough to please 99% of users, so now I'll begin work on enhancing some of the other components :)
     
  24. Distant_Temples

    Distant_Temples

    Joined:
    Apr 14, 2012
    Posts:
    131
    Who Da Man? You Da Man! AWESOME!!!
     
  25. WillBellJr

    WillBellJr

    Joined:
    Apr 10, 2009
    Posts:
    394
    Now all we need is a sneak DOWNLOAD! :p

    -Will
     
  26. kulesz

    kulesz

    Joined:
    Jul 1, 2012
    Posts:
    138
    Hi,

    Recently I've bought SGT and I must say I'm impressed with all the possibilities and work you've done. Great job!
    I also have a question and a suggestion, if I may.
    First - it'd be good if clouds layer could be visible not only from above the planet, but also from it's surface. It looks a bit strange when you approach to the surface and suddenly clouds disappear :) It'd be more realistic that way.
    Second - how can I add water plane? Is it supported by SGT, or do I have to make my own solution (some water mesh etc.)?
     
  27. KnuckleCracker

    KnuckleCracker

    Joined:
    Dec 27, 2011
    Posts:
    80
    I'm probably missing something, but I have a world with more than one 'moon'. I just added more SGT_Planet's and made them orbit my main world. I'd like those moons to cast shadows on the world (and each other for bonus points). Is this possible? I can sort of see how to do it with _one_ moon (I get some strange wrap-around effects with the shadow on the planet), but I probably ain't getting it as to if the shadows are extensible to multiple objects.
     
  28. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,406
    These features are both planned for a future release.

    The reason why I didn't make the clouds visible from inside the atmosphere is because they will probably look far too low-resolution on medium to large size worlds. In the future I will add some sort of detail texture option for this, and maybe some form of volume to them as you pass through them.

    There's currently no way to way to add in a good looking water plane, but for now you could try duplicating the planet, removing the atmosphere + cloud mesh and adding some water textures. But this won't look that good because there will be no waves, the shoreline will be very abrupt, the sea will be completely opaque, and you'll probably get some depth fighting issues if you move the camera too far from the planet.


    Indeed, the shader only has support for a single ring or planet/moon shadow, this is purely down to instruction limits and me not wanting to create too many shader files. If you look at the 'SolarEclipse' example scene, it shows you how to setup a planet/moon shadow with the required texture import settings. If you're using the same texture settings and you still have 'strange wrap-around effects' then please let me know with screenshots or an example scene.

    I have no immediate plans to support more shadow casters, but maybe in the future I'll revisit the way I handle all the shader variations.
     
  29. kulesz

    kulesz

    Joined:
    Jul 1, 2012
    Posts:
    138
    Thank you for your fast reply.

    I hope to use this engine not for a typical space simulation (where I think it fits best), but for a game that is placed ON the surface of small planets (like in Populous or Spore) with occasional space scenes. Thus I'm very interested in features that involve surface interaction.
    Some of my comments on this:
    Water - I managed to use geosphere mesh covered with water material. With proper resolution and nice, animated shader it looks quite good - I think it's the path for another experiments. I'll try to post some screenshots in a few days.
    Multiple, low performance-cost shadows on surface - Just a typical shadow "blob" would be good for me. Is there a way to cast object shadows on the planet (with Unity or SGT lights)? I mean objects like trees, vehicles, characters etc., not other celestial bodies. Any kind of shadows interests me, as without shadows it looks very unrealistic.
    Friction - I found it very surprising that when I have put some rigidbodies on the rotating planet, they started to slide and move quite 'chaotic'. Is there a way to implement friction on the surface? I briefly looked on the code, but I cannot find the way to set physics material to tesselator-generated collider.

    Maybe there's a way to achieve some of those goals with the solution I don't know about? I'd be very grateful for any comments and support.

    Generally - as for third day of playing with this product I must say I'm still very impressed. It's a great piece of software, although games heavily focused on "on the surface" style may need some extra work. Nonetheless - keep it up, great job :)
     
  30. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,406
    Great, I'd like to see screenshots of what you've achieved so far!

    For the shadows, you could use the very old method of placing planes under your objects with a shadow blob texture. The planet surface shader (currently) doesn't use unity's surface shader feature you can't take advantage of any built-in mechanisms, but I'll see if that can be some without too many issues. I'm busy with quite a few things now though, so don't expect this to come out any time soon.

    The physics materials is something I completely forgot about, it will be included in the next version. For now, you could try manually setting it in the inspector after you comment out the first line of SGT_Helper.cs (though this won't won't work with the surface tessellator).
     
    Last edited: Jan 24, 2013
  31. kulesz

    kulesz

    Joined:
    Jul 1, 2012
    Posts:
    138
    Thank you, I appreciate your fast response.

    Well, that's probably how it'll end for now. The only thing I'm afraid of is how will it look on slopes, where part of shadow plane can intersect with surface - but I'll see.

    Great! Thanks, that's the thing I miss the most right now. Is there any ETA for the next version?

    Well, that's bad assuming that objects have to move on the tesselated surface :)
     
    Last edited: Jan 24, 2013
  32. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,406
    I've banned myself from giving out ETAs, but hopefully soon.
     
  33. nockieboy

    nockieboy

    Joined:
    Jul 7, 2012
    Posts:
    48
    Just a thought while I'm having breakfast:

    1) To stop shadows intersecting the surface, can you not align the shadow plane with the surface normal beneath it?

    SGT is going from strength to strength! Excellent work. I agree with previous posters re: more planet surface options and features. I've been quiet up til now on this as I'm still developing the space portion of the game, but planet surfaces will be a huge part. Currently I'm considering a Mass Effect style where you have an animated cut scene and load a planet surface diagram scene separate from the space scene, but that will reduce immersion. :-/
     
  34. kulesz

    kulesz

    Joined:
    Jul 1, 2012
    Posts:
    138
    I agree - SGT is a very good piece of work, with a great visual effects that can be achieved fast. However there's still a bit of work on the planet surface features - especially that you can have fluent transition between space and ground scenes (which is cool BTW). Nonetheless I don't regret a single $ spent and I'm looking forward for any news on the development :)
     
  35. WillBellJr

    WillBellJr

    Joined:
    Apr 10, 2009
    Posts:
    394
    Great conversation guys - don't you just love Mass Effect! Every time I play that game I actually feel like I'm in the future - I just LOVE how the cities look etc., when walking around a totally gorgeous game!


    In DarkCoder's defense, I don't believe when he created SGT he expected it to be an all encompassing planetary solution where you could approach, go though reentry and get out and walk around on the ground etc.

    Of course I could be wrong, speaking for him here.


    I know when I bought into SGT, I was just totally happy to get how gorgeous the planets look on approach; the atmosphere glow, clouds, the day/night transition with city light etc.

    Additionally the star fields both static background and (hoping at the time) that animated Star Trek like stars that whiz by during high acceleration would be added (which he is actually working on now for V3) was the other feature that attracted me.

    I'm still looking for a solution for the Hero asteroids that the player will interact with (collisions, breakup when mined, or destroyed etc.,) not sure if he'll tackle that either.


    I would totally be glad if DC can come up with a full planetary solution (again, planet fall, reentry and touchdown) but that certainly wasn't what I expected from this kit.


    That is something that is really hard to implement, especially if it is to look good while being seamless from planet to orbit. I was expecting to use cut scenery for this looking at how other games (and even movies) do the same. (I'm quite interested to see how Star Citizen will handle this - if at all...)


    I looked at some of the other add-ons here for that solution but I just don't like how the planets look at this point in time; texture repeats, chunky looking land masses that have popping detail based on your distance or view angle etc.


    So if DC can accomplish this maintaining the quality he's shown with the rest of his toolkit (I was blown away by the fact I could simply flip a switch and use the star fields as a rotating star map for navigation - awesome!) then MAJOR KUDOS to DarkCoder for sure!

    So I'll add my vote for the planetary improvements but totally without pressure since it would be a wonderful, unexpected addition! (Unless he decides to spin off a secondary product just to handle the planets by themselves...)


    DC (and ArenMook for NGUI) totally have my votes for Unity MVP because their add-ons have made my game look great and they've saved me a huge bunch of coding time!


    -Will
     
  36. kulesz

    kulesz

    Joined:
    Jul 1, 2012
    Posts:
    138
    I didn't say it was created to be such an ultimate solution, but - judging from what I've seen already - it's quite close to this goal.

    I 'm bit opposite, because I was expecting to use it mostly for planet surface scenes, not the space ones (or not often). The videos looked quite promising (tesselation etc.) so I decided to buy it - and I don't regret. I just think that there are some useful features that could be implemented too.

    The same for me - I didn't like most of other planet addons. They also don't have good terrain support (mostly).

    Nobody pressures anyone :) I'll give my vote too :)

    So far - one of the best addons out there :)
     
  37. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,406
    You're correct, most features of this pack were decided because I needed/wanted them for my own projects. I was aware of the massive technical challenges posed by planetary surface travel, so I designed my projects around not requiring it. However, it seems many people do want this feature in their own projects, so I will do my best to expand on it.

    For now, I want to focus on making the package more well-rounded by filling in the missing gaps (nebulas, scrolling starfield/debris, FTL effects, shield effects, weapon effects, etc) and so Version 3 will be dedicated to doing this.

    If I'm pretty happy with the feature set after Version 3, then I will expand on the planetary surface code. I haven't tried the other planetary surface solutions out there, but I'm sure they've encountered similar issues that I have: you cannot specify index buffer draw ranges, so updating meshes is inefficient; changing a mesh collider's mesh is as slow as molasses, so I have to split them across multiple colliders; recreating hundreds of colliders has massive performance impact; unity's core is single-threaded, so I can't just do these things in a separate thread.
     
  38. CornDog

    CornDog

    Joined:
    Nov 17, 2012
    Posts:
    13
    Can you suggest a method for highlighting a planet or gas giant when you mouse over them?
     
  39. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,406
    The easiest way with little FPS hit would be to replace the day/night texture with a highlighted variant.

    If you don't want to do that, then you could change various atmosphere settings and colours to make it look highlighted, and revert them back when it's unselected (make sure the LUT size option is set fairly low if you do this).

    If you don't want to do that, then you could add a second material to the mesh renderers of your planets/gas giants when they're highlighted. This is quite easy to do via code, but requires twice the fillrate (due to rendering the object twice).

    The only other option I can think of is modifying the shader code, but that's quite a chore.

    If you need more info or some example code for any of these methods then please let me know!
     
  40. Wudek

    Wudek

    Joined:
    Aug 10, 2012
    Posts:
    7
    Quick question, what do you suggest if one wanted to fade out some of the SGT objects?

    Since you use a lot of custom shaders, is there any way to set the alpha on a color to 0 on a given property or color?
     
  41. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,406
    This isn't a scenario I considered while developing the pack, so you can't easily fade the objects out. Fading out transparent objects like the gas giant or corona can be done just by changing one property, but I don't think you can do the same for the rest.

    The problem with fading out opaque objects is that it requires a shader change, and if combined with an atmosphere or a ring it will probably look very bad in terms of draw order and such. My advice would be to design around this limitation, perhaps you can get away with shrinking the objects until they vanish?

    Right now I'm very hesitant to add any more shader variants, because there's already quite a bit of overhead from loading this many. That said, I think I've found a solution to the shader count woes, but I still have a lot of code to write before I can think about experimenting with it.
     
  42. Wudek

    Wudek

    Joined:
    Aug 10, 2012
    Posts:
    7
    K sounds good, i'll try to work around it. Good work with SGT though, it's nice/easy/fun to use.
     
  43. WillBellJr

    WillBellJr

    Joined:
    Apr 10, 2009
    Posts:
    394
    Wow, these are some unusual requests?

    I guess for my game (again based loosely around Privateer), selecting my planets and other objects get done in my Navigation Console so with that in mind, I would be overlaying graphics on top of miniature representations, not trying to directly hide or select the planets themselves etc.

    But that's what makes everyone's game unique - different ideas!

    I love the Mineral / planet scanner from Mass Effect though - definitely want similar in my game!


    -Will
     
  44. Marionette

    Marionette

    Joined:
    Feb 3, 2013
    Posts:
    349
    Question: if i buy the toolkit, does it also include new versions? i'm interested in the upcoming version 3 (and future) stuff, but if i buy now i can get started with what's already included.
     
  45. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,406
    Yep, all updates are free. Even if I change the price later.
     
  46. ONX3D

    ONX3D

    Joined:
    Feb 6, 2013
    Posts:
    1
    Thanks a lot for this wonderful tool, that well worth the money i've just spent.

    I've just one question : Is a texture LOD functionality planned in the roadmap ?
     
  47. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,406
    Do you mean something similar to the Surface Tessellator, but for surface textures? If so, then it's not planned, but I do plan to expand on the detail textures you can apply to the surface. Right now you can only apply a single colour detail texture, but this obviously isn't sufficient for large planets, and it doesn't allow you to have different types of terrain.







    Just to let you guys know, I'm still working hard on the next version. The code is pretty much done, but I'm in the process of making a bunch of tutorial videos. This next release contains many internal changes that will make upgrading SGT more painless; I've included many many more state checks so it should be very hard to actually break any of the SGT components. Certain aspects of the code have been improved for performance. I've renamed all the mesh files so it should be a lot easier/intuitive to use. You can now set the physics material for all the colliders generated by SGT components. etc etc.
     
  48. Xsnip3rX

    Xsnip3rX

    Joined:
    Aug 29, 2009
    Posts:
    197
    Hey DC its Xsnip3rX from TGC forums (DBP) I'll be buying this for sure, great work with this


    Edit: it'll be on Sunday though as I'm currently in the hospital with my wife and new baby boy
     
  49. Ahdireyo

    Ahdireyo

    Joined:
    May 5, 2012
    Posts:
    33
    In the demo where you can view the earth I love how you can view the landscape, but the camera is a bit crazy at times when viewing different angles of the planet. If I buy Can this be overlayed with a better camera?
    Im no coder, but can I implement a better camera? if I had a ship in 3rd person can I implement that into the project using free unity version?
     
    Last edited: Feb 9, 2013
  50. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,406
    Thanks! I think I saw on moddb that you're making some kind of bridge commander game, will that be made in Unity?



    The camera controls used in the SGT example scenes are usually just one or two simple scripts that can easily be replaced. But to replace them you'd need a different camera script, if you can't program one you like then then you'll have to find one or get someone to write you one. Can you explain why the current camera system is 'a bit crazy at times'?

    As for the 3rd person camera, of course you can have whatever camera system you like in the free version of Unity. In fact, the next version of SGT will come with an example scene that uses a 3rd person spaceship camera.