Search Unity

Planetary Terrain

Discussion in 'Assets and Asset Store' started by HenryV, Dec 4, 2013.

Thread Status:
Not open for further replies.
  1. HenryV

    HenryV

    Joined:
    Apr 25, 2012
    Posts:
    100
    Oh, I used those when I made the webplayers and shouldn't have left them in the package. I will fix that soon if it produces errors.
     
  2. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    Yes, I think this asset needs a robust collision and gravity system to be useful for making a game.
     
  3. HenryV

    HenryV

    Joined:
    Apr 25, 2012
    Posts:
    100
    I agree and I think the current system does pretty well. Of course it depends on the game how you should set it up, for example the optimal setup is probably different if the game is a FPS on the surface versus a RTS from the orbit view.

    The flying camera was not created to demostrate the collisions, it was made just to have a free-look camera in the demo scenes.
     
  4. TheBraxton

    TheBraxton

    Joined:
    Mar 6, 2014
    Posts:
    98
    Woot, I know what i'm doing after work today :)!
     
  5. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    HenryV I noticed you added Pro only features ...any of those features replace non-pro features that were in the previous version of this asset? ...just wondering since this is my first game so I didn't bother with getting the Pro version yet..

    Recently the dev for the Etherea1 asset decided to remove indie support all together and now I cant use the new features and he refuses to re-add the support.. I get concerned when I see any Pro Only stuff in assets..

    I am also asking because normally when I import an updated asset it tells me what is replacing what ...this time it didn't show anything..the list was blank.
     
  6. HenryV

    HenryV

    Joined:
    Apr 25, 2012
    Posts:
    100
    There should be only one thing that requires Pro and that is the tree impostor generator since it needs to render the tree in to a texture. If you want to use the impostors without Pro, you must create a 2D image of the tree and supply that to the FoliageRenderer. I should write a proper instructions about how to use the FoliageRenderer and include how to do that.

    There are some image effects included in the package that I used when building the web-players (and should have removed), but those should not be a problem since you can just remove them.
     
  7. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    Ok.. thanks for the info.
     
  8. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    Yeah I must be doing this wrong ...since I am only getting 1 working texture repeated out of the 5 in the shader ..even if I change the tiling for all of the textures to 1x,1y still only 1 texture is working..

    Well 2 ...if I change the Slope Power ..but then I get an odd purple color on the texture...
     
    Last edited: Mar 27, 2014
  9. GregMeach

    GregMeach

    Joined:
    Dec 5, 2012
    Posts:
    249
    @HenryV - any timeframe for when the manual (yes, I do read them) will be updated to cover all the new "goodness" you've provided us with?

    Thanks
     
  10. TheBraxton

    TheBraxton

    Joined:
    Mar 6, 2014
    Posts:
    98
    https://www.youtube.com/watch?v=IRsPheErBj8
     
  11. DSebJ

    DSebJ

    Joined:
    Mar 30, 2013
    Posts:
    101
    I bought Planetary Terrain and and RTP3 to go with it. I've worked my way through the documentation and got a basic planet setup (very cool lots of fun) using the standard Planetary Terrain shaders but I'm unsure how to configure it to work with RTP3?
     
  12. HenryV

    HenryV

    Joined:
    Apr 25, 2012
    Posts:
    100
    Hey, I'll try to have it available during the coming week!

    Very nice! To setup a custom shader, go to "Shader"-tab in planet inspector, there is a slot for a material so create a material with RTP as a shader and assign it here. It will be automatically assigned to all generated surfaces after that. Also with RTP you should set the "UV1 type" to SPHERICAL so the global maps will be mapped properly.
     
  13. schragnasher

    schragnasher

    Joined:
    Oct 7, 2012
    Posts:
    117
    I cant seem to make gradients work at all...the colors don't change when i change the gradient. The example actually works fine when i load advancedmountains, but even then if i change the gradient nothing happens.
     
  14. HenryV

    HenryV

    Joined:
    Apr 25, 2012
    Posts:
    100
    Hey, thanks for pointing it out. Seems that there has been an error while fixing another problem related to the gradients. I will post a patch for this but in the meanwhile you can do this fix to counter it:

    In NodeWindow.cs, lines 84-92 read as follows:
    Code (csharp):
    1.            
    2. if(colorNode.gradient == null) {
    3.     colorNode.gradient = new Gradient();
    4.     if(colorNode.gradientColorKeys != null) {
    5.         colorNode.gradient.colorKeys = SerializableGradientColorKey.ToGradientColorKeys(colorNode.gradientColorKeys);
    6.         colorNode.gradient.alphaKeys = SerializableGradientAlphaKey.ToGradientColorKeys(colorNode.gradientAlphaKeys);
    7.     }
    8.     gradient = new GradientWrapper();
    9.     gradient.GradientData = colorNode.gradient;
    10. }
    Replace all of that with this:
    Code (csharp):
    1. gradient = new GradientWrapper();
    2. gradient.GradientData = colorNode.gradient;
    That should fix the problem!
     
  15. rockvider83

    rockvider83

    Joined:
    Jul 22, 2013
    Posts:
    10
    I'm using Planetary Terrain in a multiplayer game, so I've to make sure that the collision of the player with the planet is the same on the server and client.

    Basically I'm setting up the client to use lods and the colliders are enabled for higher level lods only, this can be done easily. so what i would like to know is how to setup the server to use no lods while generating only the highest lod mesh of the client, so the player will have the same collision when he is walking on the planet surface.
     
  16. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    No offense HenryV ...but I am starting to like the way the old shader material worked ...was more simple and produced good results..

    everything I try so far with the new shader material gives me results like this: http://www.pasteall.org/pic/show.php?id=69186 .. seems like only a few textures are working..


    Also I keep getting an error about "NullReferenceException: Object reference not set to an instance of an object" when trying to paint..
     
  17. TheBraxton

    TheBraxton

    Joined:
    Mar 6, 2014
    Posts:
    98
    Just some minor bugs/errors consistant with enabling compatibility with a new plugin. RTPv3 is amazing!
     
  18. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
  19. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
  20. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,878
    Wow, i just updated to the new version and played abit.
    The new material system is awesome! Finally the planet scattering also works flawless. This is just so awesome that ultra realistic planets are now possible.

    Attached is the very basic planet itself with the scattering, your consideration for 2 uv channels is also magnificent addition.

    Ive already submitted a triplanar shader pack to the store yesterday to be used in general meshes and unity terrains and specifically for your planets, now i will update the package again with the scattering stuff as well.

    EDIT: I also have a small editor tool to create splat maps of my own, i should put it in the pack so we can paint textures on the planet.
     

    Attached Files:

    Last edited: Apr 2, 2014
  21. FrozenInc

    FrozenInc

    Joined:
    Apr 2, 2014
    Posts:
    1
    Hello! This is my first time posting on this thread.

    So me and my friends are trying to make a game where the planets are randomly generated. I have some questions about this asset before we consider buying it:

    1. Is the terrain voxel based or hightmap based?

    2. Is it possible to change the terrain in real time?

    3. If it's hightmap based is it possible to convert it to voxel based and keep the trees and vegetation?

    Thanks!
     
  22. Marionette

    Marionette

    Joined:
    Feb 3, 2013
    Posts:
    349
    so, no dx11 shaders in the new package?

    EDIT: also, when i uncheck generate at start and just generate the planet in the colormap scene, the planet is black.
     
    Last edited: Apr 2, 2014
  23. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    The problem I am having with the new shader material is this:

    BEFORE the asset update I got results like this: http://www.pasteall.org/pic/show.php?id=68250

    AFTER the asset update I am getting results like this: http://www.pasteall.org/pic/show.php?id=69195

    I admit there are improvements with the new way ...but it looks less realistic...just my opinion..obviously.

    I am wondering if HenryV can add an additional terrain material slot to the Planet script ..to add extra detail..
     
  24. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
  25. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,878
    Well, i dont know what other product you are using. Only considering your webplayer, i personally dont see anything better in there. Or i dont even see what you are comparing in there.
     
  26. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Be my guest, just try to create a world like mine (radius of 18000) without collision trouble then we will discuss the benefits of a product over the other.
    Have you seen the difference between plains and elevations? In most demos, the characters seem like giants walking on a planet.

    I need a 'useful-walking on-planet'. Not a rock floating some where in the Galaxy.

    By the way, works well (very smoothy, without NO jerk) at 720FPS (1920*1080) with a hd7850
     
    Last edited: Apr 2, 2014
  27. rockvider83

    rockvider83

    Joined:
    Jul 22, 2013
    Posts:
    10
    Is there any volumetric cloud solution that works well with Planetary Terrain?
     
  28. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    Yeah I would like to know also ...basically I want a working weather system but at least clouds..

    I tried to use Storm Effects https://www.assetstore.unity3d.com/#/content/5048 ...but that didn't work ..
     
  29. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Which shader is used on the first screenshot ?

    Tom
     
  30. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    I said in a previous post that I think this asset needs a robust collision and gravity system to be useful for making a game and the author answered it is well solved already in the current system...:confused:
     
    Last edited: Apr 3, 2014
  31. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    Sorry I don't remember what shader it was ...since I replaced the whole Planetary Terrain folder when I updated the asset... didn't back it up since I was expecting the same results as the previous asset..
     
  32. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I'm asking just because first sceenshot looks like RTP shader applied (dynamic snow present with its specific hi-freq artifacts at far distance) and global normalmap (maybe also colormap) applied. As I'm not PT2.0 user (HenryV gave me PT1.01 copy for tests only) I want to know what is present as a part of the PT package - which shaders and how good they are comparing to what users can get when they buy RTP as an additional goodie.

    Tom
     
  33. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    In PT demo the character collider is sometimes blocked by an invisible wall.. :rolleyes:
    Pretty sure this will be a good asset, but for the moment and for my project it's no the most appropriate.;)
     
  34. TheBraxton

    TheBraxton

    Joined:
    Mar 6, 2014
    Posts:
    98
    I too am trying to find a Volumetric cloud system for weather. On the surface you either see a volumetric cloud system or a skybox, but when you're flying in the atmosphere you should definitely see volumetric clouds. From orbit you should see a dynamic texture or something?


    To be fair, Henry's Asset is essentially complete aside from the Colliders not working properly at given LODs. Everything else such as dynamic gravity, water, Volumetric Clouds, etc should technically be 3rd party or other assets.

    It'd be nice if Henry could add them, but what we really needed was the procedural generation of planets....which we have now. They're just not complete packages out of the box. Again, it'd be nice to have the Asset do it all for us, but i'm not sure Henry considers this within the scope of his Asset.


    That being said, I hope the community here for PT Asset will continue to work together finding other assets, or making them, that will work for PT.
     
  35. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212

    Nah I never used any RTP stuff in the first planet... It was just the standard shader that came with Planetary Terrain..

    Honestly I am not sure how to add RTPv3 to my current planets ...guessing that might make them better looking..

    Currently the new update has these shaders:

    BumpedPlanet

    BumpedPlanetColorMap

    Colored Planet Unpacked

    TexturedPlanet

    TexturedPlanetColorMap

    The one in this screenshot is using BumpedPlanetColorMap shader the material looks like this:

    http://www.pasteall.org/pic/show.php?id=69275 <-- if I scroll down farther there are matching normal maps for each texture..
     
  36. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Totally agreed.
     
  37. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212

    Yeah I wasn't expecting HenryV to add a weather system....and I agree its pretty much done except a few minor issues..

    There are quite a few weather cycles on the asset store but you would have to ask them if it works with spherical objects ..like a procedural planet..or something along those lines.
     
  38. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,878
    Adding clouds is as easy as adding a few planar objects and adding a cloud texture on them?!
    You can make it fancier if you make a small patch and position it between the planet and the camera and move it around with the camera. Using world space coordinates and a noise texture to perturb the texture so it will look like moving. Aaand some small particle clouds while entering the clouds.
    If you want terragen style clouds, one way is using a gradient on clouds and tinting them using the angle between sun and camera.

    Ive already added a simple cloud layer to the atmospheric scattering shader, you can improve it yourself. Use the base cloud texture as mask and tile smaller and more antialiased cloud patches on it couple times with different speeds and you shall get your fake volumetric clouds.
     
  39. TheBraxton

    TheBraxton

    Joined:
    Mar 6, 2014
    Posts:
    98
    You don't need to have it be compatible specifically with procedural planets. You just need to know the size of your planet that you're generating in order to set the weather layer up correctly. Think of a planet like a giant Onion. Like an ogre, it has different layers at different levels.

    So the outter-most layer is the atmosphere, the layer below that is for clouds/weather/etc, and the layer below that is normal oxygen environment for gameplay, layer below that is a mixture of water/planet layers etc.

    Speaking from a gameplay point of view, dynamically generated planets on-the-fly isn't very persistent in terms of online play so all I needed was a tool to assist me in creating Planetoid-type objects that will save months of modeling by hand. I have that now, but now I need the collision system working properly to move forward.

    Once collision LOD's work properly, or another way is found for both server/client that works well enough, I can start with more advanced game concepts.

    Also, I found a spherical gravitational Asset that can be used dynamically to apply gravity to all objects around a given object-type. I haven't tested it yet but others have told me it's what I want for sure 100%....and at the time it was only like $12.50 sooooo yea. Plus I'm told I can use it for cool game effects like gravity grenades and stuff :D!


    I haven't bought SUIMONO or RTPv3 yet as I'm waiting for RTPv3 to be fleshed out better in PT, or a tutorial setup to show us how to do it properly (am hoping that comes around eventually). SUIMONO is just something i haven't gotten to yet but i'm told it works with PT so....yea :)!

    The last bit of what I need to start tieing stuff together is a Weather system for planetoid types, a good HDR/Atmospheric lighting system, and to find a good shader system that will make it look less cartoony :eek:!
     
  40. GregMeach

    GregMeach

    Joined:
    Dec 5, 2012
    Posts:
    249
    Using the "Massive" scene and getting these errors when I click the "Save to Assets" button.

    1st Error
    Code (csharp):
    1. Couldn't create asset file because the Material 'BumpedPlanet' is already an asset at 'Assets/PlanetaryTerrain/Scenes/Massive/BumpedPlanet.mat'!
    2. UnityEditor.AssetDatabase:CreateAsset(Object, String)
    3. Planetary.PlanetEditor:OnInspectorGUI() (at Assets/PlanetaryTerrain/Scripts/Editor/PlanetEditor.cs:210)
    4. UnityEditor.DockArea:OnGUI()
    5.  
    2nd Error
    Code (csharp):
    1. UnityException: Creating asset at path Assets/_Planets/PlanetSurface0Material.mat failed.
    2. Planetary.PlanetEditor.OnInspectorGUI () (at Assets/PlanetaryTerrain/Scripts/Editor/PlanetEditor.cs:210)
    3. UnityEditor.InspectorWindow.DrawEditors (Boolean isRepaintEvent, UnityEditor.Editor[] editors, Boolean eyeDropperDirty)
    4. UnityEditor.DockArea:OnGUI()
    5.  
    I ended up with PlanetSurface0_0.asset inside my "_Planets" subfolder.

    Tried it a second time with the name Planet1 and didn't get anything saved.

    Help....

    Edit: I just tried the "Save to Assets" in the previous version of PT and it worked fine, saved all the assets and created the prefab; as it should
     
    Last edited: Apr 4, 2014
  41. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    Just found out the surface LOD stages wont work when doing a camera switch from space to the ground ...player ends up standing in water ..
     
  42. BadlyWrapd

    BadlyWrapd

    Joined:
    Feb 24, 2014
    Posts:
    3
    I bought this asset yesterday and have spent the last two days tearing my hair out trying to get it to do what I want so any help would be much appreciated. I should say I am very new to Unity/game development plus my coding skills are severely lacking and extend only to javascript.

    My two main issues are with the colliders (I feel I'm not alone here) and the terrain painting.

    I'm trying to create a planet with a radius of 40000 that you can fly a ship to, land on and walk around on with a first person controller. However no matter how many different LOD arrangements I have the colliders seem to be unreliable so that you can never be sure you're ship or first person controller won't suddenly disappear through the terrain. Has anyone got any pointers on where to start with mesh resolution, subdivisions and LOD to achieve a planet this size that can be used this way?

    With the terrain painting either I'm doing something wrong or this is simply bugged. It seems totally random whether it works or not. Sometimes the brush/cursor circle thing doesn't appear on the terrain so nothing happens when I try to paint. Other times the wrong part of the terrain is affected i.e. not the terrain under the cursor. Am I missing something obvious here?
    Is it possible to make part of the terrain totally flat to make it easier to place buildings etc? I've tried using the set tool with the high and low limits set the same but still end up with some undulation in the terrain.

    Much of what is discussed in this thread has gone way over my head so please forgive a noob for asking some basic questions.
     
  43. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Welcome in my nightmare. The colliders are not reliable. I thinks actually the best option is using the API to get the elevation at a certain XYZ coordinate.




    "...i personally dont see anything better in there...."
    LOL.
     
  44. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,878
    Here is a simple test of collisions.
    http://tamer.co/demos/pt-collision-test

    I see nothing wrong with the collision meshes, you just need a decent script to handle collisions. In this one i use a simple rigidbody and physics to move the body around. Unless you crash to the planet too fast(larger numbers that the physics cant handle), its all okay and very smooth.
    There are 3 lod stages and colliders are generated for all from proper distances.

    Whats funny? There is nothing better in your other demo compared to Planetary Terrain.

    Henry, id like to make a request;
    Could you change the way the noise is applied to heights, i think it ranges -1 to +1, this causes problems. I would prefer it between 0 and +1 while i can define the water level myself between 0.5

    Thanks for this awesome package, im very happy with the asset.
     
  45. stallfish

    stallfish

    Joined:
    Apr 7, 2014
    Posts:
    4
    I have a trouble with planet collider. My space ship has fly trough surface...and i don't understanb why?
    (i've turn collider ON in planet generation menu)
     
  46. GregMeach

    GregMeach

    Joined:
    Dec 5, 2012
    Posts:
    249
    Your spaceship also needs a rigidbody and collider
     
  47. BadlyWrapd

    BadlyWrapd

    Joined:
    Feb 24, 2014
    Posts:
    3
    After doing some more testing it seems its the mesh colliders of my spaceship model that are causing my collision issues. If I disable the mesh colliders and use a box collider around the model things seem to work ok. With the mesh collider enabled and convex enabled I was finding that when the ship was grounded it would "bounce" around. This only happens with the planetary terrain.
     
  48. stallfish

    stallfish

    Joined:
    Apr 7, 2014
    Posts:
    4
    yep...i known, but my spaceship collide with other objects is normally...except the planet terrain

    hm...ok i'll try with box collider
     
  49. stallfish

    stallfish

    Joined:
    Apr 7, 2014
    Posts:
    4
    Nice...a box collider is work. But mesh collider don't :(
     
  50. GregMeach

    GregMeach

    Joined:
    Dec 5, 2012
    Posts:
    249
    Thought I'd triple-check the error to make sure it wasn't something in my existing project; It wasn't!

    New project -> import PT v2 -> Open Crater scene -> Click Generate Now -> Click Save to Assets
    ERROR - FAIL
    Same as before but repeated for convenience.
    Error1
    Code (csharp):
    1. Couldn't create asset file because the Material 'TexturedPlanet' is already an asset at 'Assets/PlanetaryTerrain/Scenes/Crater/TexturedPlanet.mat'!
    2. UnityEditor.AssetDatabase:CreateAsset(Object, String)
    3. Planetary.PlanetEditor:OnInspectorGUI() (at Assets/PlanetaryTerrain/Scripts/Editor/PlanetEditor.cs:210)
    4. UnityEditor.DockArea:OnGUI()
    5.  
    Error2
    Code (csharp):
    1. UnityException: Creating asset at path Assets/_Prefabs/Crater1Surface0Material.mat failed.
    2. Planetary.PlanetEditor.OnInspectorGUI () (at Assets/PlanetaryTerrain/Scripts/Editor/PlanetEditor.cs:210)
    3. UnityEditor.InspectorWindow.DrawEditors (Boolean isRepaintEvent, UnityEditor.Editor[] editors, Boolean eyeDropperDirty)
    4. UnityEditor.DockArea:OnGUI()
    5.  
    I'm running Mac 10.9.2 and Unity 4.3.4f1
    $PT_Save_EpicFail.jpg

    Would appreciate a response - thanks :cool:
     
Thread Status:
Not open for further replies.