Search Unity

TerrainEdge 3 (need testers, feedback, ideas, etc)

Discussion in 'Works In Progress - Archive' started by Syanyde, Jan 10, 2012.

  1. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    Ok...weird. I'll double check my version info...sorry for that.

    Looking forward to 2.67 then! And...the overhangs look great! You really are doing great work on this.

    I've sorta worked around the seam issue, by starting with a very large terrain that I plan on splitting.
     
  2. Syanyde

    Syanyde

    Joined:
    Jan 4, 2011
    Posts:
    57
    Thanks for the head's up... I figured that might be the case - even on the PC the shaders seem to glitch out occasionally. Will check out allegorithmic's shaders and try to adopt the technique they're using (either to replace existing shaders or as a new option).
     
    Last edited: Feb 22, 2012
  3. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    951
    One of our designers is completely obsessed with overhangs. If I show him this he'll probably break more builds.
     
  4. aixaix

    aixaix

    Joined:
    May 7, 2010
    Posts:
    523
    Seems to be a goood tool, gonna try it in my fps project
     
  5. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    I've been experimenting with various terrains this week (and using the LATEST version hah), and TE is working great.
    One big thing that is killing me...it keeps losing my noise settings. I'll get a terrain how I want...and blam, noise generators and funcs are gone.

    Seems you may have mentioned this already, but the ability to save noise values per terrain as a noise file would be super!
     
  6. Syanyde

    Syanyde

    Joined:
    Jan 4, 2011
    Posts:
    57
    I'll try to get that fixed for the weekend's release - it's a major annoyance to me too as it happens whenever code is recompiled.

    EDIT: Okay, I've reimplemented the auto-save function. So, if TE is disabled (by a code recompile or by switching from edit mode to play mode) it will save settings to "autosave.te3" in your assets folder. On (re)enabling TE will automatically load the auto-saved config. - Hopefully this will mean the only time you lose your settings is if Unity crashes.
     
    Last edited: Feb 24, 2012
  7. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Using release 2.66, I have split my terrain using the tools into 4 terrains. The terrain settings have been synchronized.

    When using TE:Textures to apply textures to my terrains, I can only seem to change things on the last terrain (Terrain_split3). Selecting any of the other terrains and using the splatmap generator has no effect. When using the "full scene" button, again, only the last terrain (Terrain_split3) is affected by any of the parameters.

    Also, something else is kindof off on the Texture application. I have the elevation ranges setup 0,0.25,0.50,0.75,1.0 (all the elevations are set at 90, so they aren't affecting the scene). But applying the textures seems to set everything to a uniform mix, instead of giving me bands of textures.
     
    Last edited: Feb 25, 2012
  8. Syanyde

    Syanyde

    Joined:
    Jan 4, 2011
    Posts:
    57
    Thanks Jaimi, wasn't aware of this issue with the split blocks of terrain - am looking into it now and will try to get that sorted out before I release 2.67.

    For banding textures and to reduce blending, you would need to stagger them using pairs, this will be more flexible in 2.67.

    $elevband.png
    $elevblend.png

    EDIT: I've just tested in 2.67 but I had no problem (procedurally) applying textures to all maps in the scene. However, I can see that the original source terrain does not get automatically removed from your scene after the 4 smaller terrains are created. - I suspect this may be part of the issue. Please check and let me know Thanks. :)

    EDIT2: v2.67 is now available to download.
     
    Last edited: Feb 25, 2012
  9. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    A lot of my problems went away after I got rid of my 4096x4096 heightmap, and went down to 2048x2048. I didn't try splittling the terrain again, but I'll try it all again with the new version, and validate that it wasn't just some memory issue.
     
  10. houndie

    houndie

    Joined:
    Nov 25, 2010
    Posts:
    146
    Heyas Syanyde,

    Just picked up 2.67 and was looking around for the WM2 import functions but not able to find them, did they get missed for this release?

    Thanks
     
  11. houndie

    houndie

    Joined:
    Nov 25, 2010
    Posts:
    146
    Actually I found where you hid it under the TE MapInspector however it doesn't seem to work. Is it incomplete or am I doing something wrong?
     
  12. Syanyde

    Syanyde

    Joined:
    Jan 4, 2011
    Posts:
    57
    @Houndie.. it wasn't fully tested so I suspect it's the code rather than you. (probably related to image import formats)

    I'll do some testing specifically with WM2 during this week and research how others have handled the imports, etc. in their extensions, etc. too.

    ---

    @All...

    I've just noticed 3 glitches:

    1) Allegorithmic shader clone - not working. (will address soon)
    2) Texturing calculates remaining alpha layers slowly.
    3) Tree generation was about 1/20th of the speed it should be.

    Issues #2 and #3 are addressed in a "hotfix" release of the main TE script (see the OP of this thread), Issue #1 will be addressed in next update.
     
    Last edited: Feb 28, 2012
  13. aixaix

    aixaix

    Joined:
    May 7, 2010
    Posts:
    523
    Is this for pro only, cause i was unable to get mine work...
     
  14. Syanyde

    Syanyde

    Joined:
    Jan 4, 2011
    Posts:
    57
    It should be fine for indie version. What were you unable to do? (If you're just looking to launch TE, it's in the "Window" menu of Unity Edtior)
     
  15. aixaix

    aixaix

    Joined:
    May 7, 2010
    Posts:
    523
    Oh, ok. i didn't saw it there... thx.
    Gonna try it out later.
     
  16. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    There are some scripts that have the same names as in the Playmaker Plugin, Perhaps you could change some of the names that are conflicting?

    Displace.cs
    Rotate.cs
    Translate.cs
     
  17. Syanyde

    Syanyde

    Joined:
    Jan 4, 2011
    Posts:
    57
    Hi Lars,

    The files you mention are part of libNoise.

    I'm not sure the license lets me distribute modified versions of the files alone - so I may need to figure out a workaround to that issue.

    Good news is you can probably just delete those files from the libnoise operators folder after you import the TE package - I don't think I made use of them within TerrainEdge anyway. (I just renamed them now and didn't notice any adverse effects).
     
  18. aixaix

    aixaix

    Joined:
    May 7, 2010
    Posts:
    523
  19. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    951
    Well, after about 2 months of work (on this scene specifically), I will present what TerrainEdge has enabled me to do:

    Couldn't have done it without you!

    Any work on those mesh cliffs yet? They could make my job so much easier.
     
    Last edited: Mar 13, 2012
  20. Syanyde

    Syanyde

    Joined:
    Jan 4, 2011
    Posts:
    57
    Hi Wolfos,

    I've almost finished the prefab-scattering, prefab-painting and the new erosion features for 2.68 so I'll be looking at the procedural mesh generation stuff again very soon. Will post a status-update at the weekend with more info.

    (I think to start off, I'll probably make it so you can create the meshes with a set of rules and just place them manually - and then evolve it from there so that it can lock the cliff mesh's verticles to heightmap points automatically and automatically generate meshes based on rules (such as generating a cliff where slope is above a certain steepness, etc.) as I move towards v2.70.
     
  21. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    Awesome progress!!
     
  22. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    I'm using 267 with the fix, and get the following error:

    Assets/Resources/LibNoise.Unity/Operator/Turbulence.cs(127,49): error CS1061: Type `Perlin' does not contain a definition for `Seed' and no extension method `Seed' of type `Perlin' could be found (are you missing a using directive or an assembly reference?)

    I'm on a mac with unity 3.5

    Any ideas how I can fix this? thanks
     

    Attached Files:

  23. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    951
    It appears that the latest version doesn't tile the terrains very well, I get largely noticeable seams between the terrains, but that's not a problem with my current project which uses 2.66 (could be that I generated the terrains with an even earlier version, though.

    Unity can easily handle 64 square kilometers of terrain (twice as large as Skyrim) with 250k trees in total if you just tile them using TerrainEdge.
     
  24. Syanyde

    Syanyde

    Joined:
    Jan 4, 2011
    Posts:
    57
    @Wolfos... Do you mean with texturing??.. - if so, it's something I'm working on.

    EDIT: Was this with the new generators (fBM/HeteroMultiFract/HybridMultiFract) or the existing ones?

    @Lars... Do you have "Perlin" defined anywhere else in your project besides the one within LibNoise? (Just ruling out possible conflicts!)
     
    Last edited: Mar 19, 2012
  25. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    951
    No, the actual terrains have seams.
     
  26. TerraSame1

    TerraSame1

    Joined:
    Nov 12, 2010
    Posts:
    151
    TE Guys...
    I have a question or rather... maybe a suggestion....
    Is it possable while using the terrain division tool where the user can "Choose" the number of rows and columns???

    I have tried the tool but only find where a chosen terrain can be divided into four equal terrains....
    If choosing the number of rows and columns is not possable then I suggest adding this possability as an option....

    I am in need of this option where I need to divide a terrain into 12 rows and 24 columns....
    If you add this option I of course will donate even more than I am planning...
    Thanks
    :)
     
  27. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    951
    There is a donate button? I'll be sure to donate once I get some money. Unless you'll release TE on the Asset Store for what it's actually worth (because I wouldn't be able to afford that).
     
  28. Syanyde

    Syanyde

    Joined:
    Jan 4, 2011
    Posts:
    57
    @TerraSame... While I can certainly make TE split a terrain up into a grid, we'd need to mitigate the issue of dividing the heightmap by an incompatible number.

    What I mean is, if you take a heightmap resolution of 1024(+1) and divide by 24 you will end up with 42.6 - not only is it not a power of 2, it's not even an integer... and so this will be difficult to do just based on the numbers involved.

    So it's not an easy solution to build. - That said, I'll add it to my to-do list anyway, as I like the idea of being able to split a terrain up with more flexibility than just splitting/merging quarters. So hopefully I'll build something to help with this soon. (Just the most obvious approach won't work with the numbers you want to work with.. so I'll have to figure out a different way to achieve it.)

    @Wolfos.. I still put it's value at $0.00. Ultimately I started this to learn and experiment and I've always insisted it'll stay free so I'd have to be an epic a-hole to go back on that, especially considering the feedback and help I've received on the basis that the project is free and intended for everyone to share, learn from, play with, etc. So I'll stick with the donations-only policy. It's all cool :)

    Now I've started to play with meshes a bit and am making a modifier stack thingy for the procedural mesh work I'm doing (for cliffs and stuff) - I think I might be able to make a separate extension in the near future for meshes generation and mesh modifiers. :)
     
  29. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    could you also build a terrain to mesh converter? ( I'm not sure if it there already? )
    So i can use the terrains on mobile devices with good performance. :)
     
  30. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    951
    There's one on the wiki. Search for "terrain to obj".
    I'll donate something next month.
     
  31. Syanyde

    Syanyde

    Joined:
    Jan 4, 2011
    Posts:
    57
    Export as .OBJ - already planned (based on the example Wolfos mentioned).

    But I'll add Terrain -> Mesh in 2.68 anyway and possibly look at other things for mobile terrain once I've got 2.70 released.
     
  32. TerraSame1

    TerraSame1

    Joined:
    Nov 12, 2010
    Posts:
    151
    Syanyde...
    Thank you for your response... Your help and responses in the past... And, all your most excellent efforts with TE....
    As I have said in the past... Although I am not new to game design... I am quite new to Unity....
    My research and experimentation is progressing rapidly thanks to Unity users like you....
    Thanks to you all those Unity users who share.... :)

    At present I have my entire project consisting of 288 terrains (3ds) meshes layed out in perrfect order and skinned. I have found a great deal of helpful terrrain addons and Max scripts... But... in the end... even though not using Unity terrains allows to publish to Flash... I really miss the ability of painting high detail textures and trees/bushes etc....

    One point... I have not experimented much with your add on asset, as there is so much to learn from so many... but I plan yet to do so...
    My desire and need to break up "Unity Terrains" is strong... The fact that the skin sizes would be lousy.... for me, would be no problem as I intend to re-skin with 2048 square satilite image files after the break-up....

    I realize that my request/suggestion may not help many others, so if I may, I would like to help you in whatever way that I can as my main interest is in working with terrains and creating a template to be reused to recreate many accurate real places....

    Again...Thanks for you help and please call on me to help in any way you think I could be of assistance.....
    Paul
    :)
     
  33. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    Would this Terrain -> Mesh function keep the textures and add this to a shader on the mesh?
    that would be great!
     
  34. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    951
    Without a specialized splatmap mesh shader, that would be impossible because the texture resolution is too low. Unless you're going to do virtual texturing.
     
  35. Sir Mate

    Sir Mate

    Joined:
    Jan 23, 2012
    Posts:
    10
    Okay ,maybe im stupid again ,but really how exactly do you use this? I imported the package ,so there is an Editor folder in the root, and i still cant see a TerrainEdge option in the "Window" menu, nor anywhere else.(restarted unity and everything)
    I cant really tell if its good or not yet, but judging by the screenshots i can praise it already ! :)
     
  36. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    951
    Should be there, under layouts. You can't do anything wrong while installing either.
     
  37. Sir Mate

    Sir Mate

    Joined:
    Jan 23, 2012
    Posts:
    10
    I even reinstalled unity ,still nothing :\
    Oh well, back to sculpting by hand -.-
     
  38. jbufo

    jbufo

    Joined:
    Aug 16, 2010
    Posts:
    52
    Make a terrain, add some textures, trees, mesh in the normal terrain controls. Then try using this. I missed the post with that in it too.
     
  39. Sir Mate

    Sir Mate

    Joined:
    Jan 23, 2012
    Posts:
    10
    Okay , i made a terrain (again ,i made one on my first tries too) , but still nothing.
    Added a minimum of 3 of each type (texture, tree, detail) ,even placed them on it, set the texture resolutions to maximum, after nothing happened i made some hills, no results.
    It is supposed to be between "Scene" and "Project" and "Animation" ,right?
     
  40. jbufo

    jbufo

    Joined:
    Aug 16, 2010
    Posts:
    52
    Oh I see. I guess I read it wrong. Did the Resources folder get copied in? I know the first time I tried to import the package somehow I had to go back and figure out why nothing worked. That folder had been missed even though I didn't touch anything on the screen with the checkboxes.
     
  41. Sir Mate

    Sir Mate

    Joined:
    Jan 23, 2012
    Posts:
    10
    Yes, i have the Resources ,with 2 sub-folders, and an Editor with one script in it.
    BTW, i too have theese errors which Lars Steenhoff reported, but im on Win7 ,with 3.5.
     
  42. Syanyde

    Syanyde

    Joined:
    Jan 4, 2011
    Posts:
    57
    Some bad news...

    1. Seems I managed to fry my laptop's HD - and with it, the only copy of v2.68's code... not the biggest problem though...
    2. I'm extremely busy working on some relatively high-profile paid-for web-app dev projects at the moment, so I'm not going to have time to redo the work or make progress with v2.68 for about a month.

    This means I'm effectively suspending updates for a month.

    Apologies for this - will resume development on TE as soon as my current contract is signed off.
     
  43. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    951
    No need to apologize. The project remains free of charge, every update is a blessing.
     
  44. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    Too bad what happened!! I use dropbox for automatic syncing of my most important files, this may work well for you too.
     
  45. ls2011

    ls2011

    Joined:
    Apr 6, 2012
    Posts:
    1
    Hey can anyone tell me how to apply hotfix? Ima noob at this.
     
  46. pspdude

    pspdude

    Joined:
    Dec 17, 2011
    Posts:
    43
    No clue on how to use this..
     
  47. aixaix

    aixaix

    Joined:
    May 7, 2010
    Posts:
    523
    its not very hard to use if you get the hang of it.
     
  48. jbufo

    jbufo

    Joined:
    Aug 16, 2010
    Posts:
    52
    For the hotfix, unzip it and put that file in your project over the old one. I think it's the one in Editor, not sure off the top of my head.

    pspdude where are you losing the trail?
     
  49. Westmark

    Westmark

    Joined:
    Nov 1, 2009
    Posts:
    187
    I get a problem when i apply the hotfix.

    Assets/Editor/TerrainEdge.cs(76,25): error CS0103: The name `teMesh' does not exist in the current context

    I've searched the entire code base for teMesh and as far as I can tell it's only referenced that one time.

    Code (csharp):
    1. // === TE:Cliffs ===============================================================================
    2.  
    3. public class TECliffs : TEGroup
    4. {
    5.  
    6.     public TECliffs() : base("TE:Cliffs", "Generate planes and apply noise to form cliffs.") { }
    7.     protected override void OnInit(){}
    8.     public override void Generate(GameObject go){}
    9.     public override void sceneEvents(SceneView sceneview){}
    10.     public override void OnGUI()
    11.     {
    12.         if(GUILayout.Button("Create A Plane Mesh")){
    13.             teMesh.Generate("testPlane",200f,200f,32,32,true); 
    14.         }
    15.         if(GUILayout.Button("Fit to heighmap")){
    16.            
    17.         }
    18.     }
    19.  
    20. }
    Edit:

    Also there is a problem with shadows on terrain when using triplanar shaders. It's like the ambient light doesn't get used in the shader, so shadows become completely black.

    Double Edit:

    There also seems to be a problem with the shaders in general, as soon as you hit play, it "forgets" whatever you put in the normalmap slot, haven't testet with the specmap slot but I assume it does the same for that.
     
    Last edited: Apr 20, 2012
  50. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822


    Could you guys help me in getting to use this tool?
    No matter what I do nothing seems to affect the terrain.

    I did the steps above, yet whenever I click on a button or apply something my terrain is not changed whatsoever.
    Can somebody give me some tips.

    Thanks