Search Unity

GAIA - AAA terrain generator, procedural texturing, planting and scene creation

Discussion in 'Assets and Asset Store' started by AdamGoodrich, May 21, 2015.

?

Would you pay an upgrade fee for Gaia 2 so that we can hire to accelerate its development?

Poll closed Sep 3, 2018.
  1. Yeah super cool - I would pay a $15 upgrade fee to get it faster!

    83 vote(s)
    80.6%
  2. No way - you promised free and i am happy to wait!

    20 vote(s)
    19.4%
  1. Xrystal

    Xrystal

    Joined:
    Mar 25, 2014
    Posts:
    202
    Sounds like a similar problem reported here but apparently fixed in 5.6

    https://issuetracker.unity3d.com/is...6.1740198808.1500988921-1800257848.1477977061


    Aha, someone reported it in 2017.1 and they are not going to fix it but instead posted work arounds.

    https://issuetracker.unity3d.com/is...d-as-serialized-propertys-animationcurvevalue

    And just in case the link stops working down the line and someone comes across this problem in the future.

    ANIMATIONCURVE VALUE CANNOT BE CHANGED IN CUSTOM INSPECTOR WHEN IT IS ACCESSED AS SERIALIZED PROPERTY'S ANIMATIONCURVEVALUE
    IMGUI

    -

    Jul 12, 2017

    -

    Priority: 2Necessary for shipping a final release

    -

    Severity: 3Workaround is possible

    To reproduce:

    1. Open the project, attached by the tester (curveInspector.zip)
    2. Open the "scene" scene
    3. Select "GameObject" in the Hierarchy
    4. In the Inspector, change the animation curve
    5. (Optional) Review the TestEditor.cs script

    Expected: changes for the animation curve are saved when it is accessed as a serialized property's animationCurveValue and drawn in the Editor via EditorGUILayout.CurveField

    Reproduced in 2017.1.0a6, 2017.1.0f1, 2017.1.0f3, 2017.2.0b3
    Did not reproduce in 5.6.2p3, 2017.1.0a5

    Workaround:
    - draw AnimationCurve serialized property via EditorGUILayout.PropertyField
    - get the script via target property and then change the value directly with EditorGUILayout.CurveField

    Won't fix: This has been introduced by fix for another case and there is no way to fix this unless we revert that
     
    Vondox likes this.
  2. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,666
    Nooooooo!

    Anyways i have a work around underway - but it requires a complete rewrite of a bunch of stuff and I would rather be spending that time on Gaia 2 as it will probably change. Today will see if I can find some sort of shortcut.

    In the meantime you can still edit in the resource manually and switch back and forth between the visualiser and the resource... but its tedious!!
     
  3. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,666
    Ok, so here is a work around that will make it usable:

    Go into ResourceVisualiser.cs in Gaia \ Scripts \ ResourcesSystem and change line 350 from

    Code (CSharp):
    1. void OnDrawGizmosSelected()
    to
    Code (CSharp):
    1. void OnDrawGizmos()
    Position the visualiser wherever you want it, then select your resources file and tweak that resource. It will keep showing the visualiser and changes will be made in real time as before.

    To select other resources to visualise and see it update in real time select them in your spawner and click visualise as before. Then go back to the resources file and repeat.

    You only need to do this if you are changing the curves. Everything else works as it should.
     
  4. Xrystal

    Xrystal

    Joined:
    Mar 25, 2014
    Posts:
    202
    Great work Adam :) I'll give it a test tomorrow if no one beats me to it :)

    Now get back to work on Gaia 2 :) .

    It's not a total killer to not have it working like this in Gaia 1.

    But hopefully you will have this working as you expected in Gaia 2 when it is finally completed ? :)
     
  5. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,666
    Yep - I have learned a lot since Gaia 1, and Gaia 2 will bring all of this learning together. CTS is a great example of the sort of usability I want to bring to Gaia 2.
     
    evilangel89 and Mark_01 like this.
  6. Xrystal

    Xrystal

    Joined:
    Mar 25, 2014
    Posts:
    202
    Yeah I find I end up rewriting a part of my projects because I've learnt something new that will make things better. Like seeing how you use scriptable objects in Gaia and how they can even be created at run time. I was contemplating using them as a saved game file but alas, they are pure text and thus easily editable, so will have to use them with that in mind.
     
  7. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    444
    Hi. I'm new to Gaia and have a basic question. I would like to build a town with about 100 buildings. So, my plan is to have a town square and about 10 streets connected to it. The street layout will be done manually, but I would like the buildings and other objects (such as streetlights) to be placed by Gaia along the street so that the village looks naturally.

    Do you have some type of tutorial for this situation? If not, could you give some general directions on how to do that?
     
  8. Xrystal

    Xrystal

    Joined:
    Mar 25, 2014
    Posts:
    202
    My immediate thought on this is that you would need to set rules up so that the objects are placed beside a set texture (the road) and maybe on a set texture (concrete). Then do any height and slope adjustments and adjust Radial distance so that they line up the way you want.

    That said, hopefully someone that has done something similar can confirm or correct my suggestions.
     
  9. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,666
    Gaia will give you approximations but its not really designed to be a village builder. I suspect that by the time you set up rules to do this it may have been quicker to do it yourself.

    http://www.procedural-worlds.com/gaia/tutorials/spawners-gameobject-poi/

    This tutorial may help you though - it shows you how to set up POI (points of interest) and you could still get benefit from Gaia with this.
     
  10. Wishymashy

    Wishymashy

    Joined:
    Jun 3, 2017
    Posts:
    16
    Hello i recently purchased Gaia, Gena and CTS. I have a question, how do I add more textures? When I try to add in the terrain and I go to paint is all black. Was hoping to have several textures for roads dirt tracks market village ect ect. Thanks again
     
  11. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,666
    I assume this is a CTS question? When you add new texture you need to re-bake your profile.
     
  12. limpbunny

    limpbunny

    Joined:
    Jan 4, 2017
    Posts:
    5
    Works like a charm, Adam. Cheers mate! :)
     
  13. Wishymashy

    Wishymashy

    Joined:
    Jun 3, 2017
    Posts:
    16
    Hello Adam, thanks for quick response. I thought it was a Gaia issue. I posted an image to show what i meant. This is a CTS Issue? I haven't try to rebake in the CTS menu. Trying to add texture manually and not have Gaia or CTS spawn it. Using the Paint Texture option.

     
  14. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    444
    Thanks Adam! Would Gena be more appropriate for this task?
     
    evilangel89 likes this.
  15. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    444
    Thank you. Great advice! I know it will probably take a relatively long time time to set this up, but making changes and rebuilding should take minutes instead of hours :)
     
  16. amonius

    amonius

    Joined:
    Dec 27, 2013
    Posts:
    6
    Hi,

    I just bought Gaia recently and now I'm playing around a little bit. Unfortunately I've got a little problem. I'm trying the random terrain generator. When I'm playing the session and Gaia is applying the first stamp, it seems to hang. But it just takes nearly forever in Stamper.cs LoadImageMask. The two for loops take really long. The other stamps are applied in an acceptable time. Am I doing something wrong?

    Thanks in advance.
     
  17. Xrystal

    Xrystal

    Joined:
    Mar 25, 2014
    Posts:
    202
    What settings are you using as I just played through the random generator session player twice with different settings and it took a few seconds, I didn't notice any stalling at all.

    Do a screenshot of your settings and I will see if I get a similar problem. And what size is your terrain if it isn't the default set up.
     
    AdamGoodrich likes this.
  18. amonius

    amonius

    Joined:
    Dec 27, 2013
    Posts:
    6
    Hi, thanks for your reply. I'm just running through the tutorial. Everything is default. I'm creating the session manager, generate the stamps randomly and play the session. It's just the first stamper. The other stamper only take several seconds as well.
     
  19. Xrystal

    Xrystal

    Joined:
    Mar 25, 2014
    Posts:
    202
    Hmm, is it from the Quick Start Documentation ? I just did the 'Just Do It!' section and it worked fine.

    Try it again by flattening the terrain, resetting the session, adding the stamps and re playing the session and run it a few times. With it being random you may have simply hit a bad combination of values and it had problems.

    However, if you can repeatedly do it there must be something else causing it. In which case, start a new empty project and repeat the steps in the Quick Start Documentation and see if the same problem happens.

    Let us know what happens just in case it is something that can be avoided with some investigation.
     
  20. Xrystal

    Xrystal

    Joined:
    Mar 25, 2014
    Posts:
    202
    Sudden thought, I just had texturing freeze up while I left it running nearly 2 hours ago ... but once I hovered out of the Unity window ( as in onto the mini window at the bottom on Windows 10) and back it kicked in again, see if that identifies or resolves your problem, I use this *trick* when doing the spawner stuff as it seems to speed the process up. I have only noticed this on long processes in Gaia so just put it down to how Unity or Gaia handles the process. I suspect the problem won't exist as much in Gaia 2 with threads.
     
  21. amonius

    amonius

    Joined:
    Dec 27, 2013
    Posts:
    6
    Hi, yes I think I'm able to reproduce the problem, also with new, empty projects. But now I'm stamping manually and the problem seems only to happen by running the Random Terrain Generator.

    For me it's fine, because I need some more controlled terrain anyways.

    If you want me to reproduce the problem for investigation, please let me know.
     
  22. Xrystal

    Xrystal

    Joined:
    Mar 25, 2014
    Posts:
    202
    It might be a good idea to put down the steps that can reliably reproduce it so that Adam has a way to check it doesn't do the same thing in Gaia 2.
     
  23. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    444
    Still learning Gaia and have some newbie questions:

    1) When using Stamper tool for terraforming, is there some type of shortcut to snap the stamp base to sea level? Currently I do that by adding sea level value to the stamp Y coordinate plus about 0.1, but I'm probably missing a smarter way of doing the same.

    2) Are there any plans to improve rulers (Helpers>Show Rulers)? Some kind of 3D grid or contour lines would be great.

    3) Is there any disadvantage to setting sea level to 0?
     
  24. Xrystal

    Xrystal

    Joined:
    Mar 25, 2014
    Posts:
    202
    1. I believe Ground Base is what will keep the stamp level with the terrain which should be based at sea level. And Ground at the bottom of the stamp section will set the stamp back if it has been adjusted with the Ground Base box unticked.

    2. Adam will have to answer that.

    3. If you set the sea level to 0 your water will be placed at that level and you will not be able to have any terrain below it. With it set to 50 for example it would allow 50 metres of underwater landscape. If you want water but not that much you can always use a smaller number. I've just tested this out and it does seem to react this way. If you want to test it make sure you remove the water object and re-add it after sea level changes for them to be placed correctly ( or manually alter water object's y position to 50 or the value you want.
     
  25. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    444
    Sorry, I guess I'm missing something fundamental here:) If I move terrain to Y=50 (the default sea level), I get this warning after pressing the "Stamp" button.
    stamper.PNG
     
  26. Xrystal

    Xrystal

    Joined:
    Mar 25, 2014
    Posts:
    202
    Yes, you're not supposed to move the terrain. By default sea level is 50 so that you can see the water sometimes above the terrain when you tell Gaia to spawn it. There is no reason to move the terrain in the normal use of Gaia. (Edit: Of course Gaia caters for when you choose to move it but as the message says it will simply move the terrain to 0,0,0 so it can do its work )

    The terrain should always have its y value at 0. The sea level (water) is the object that will have a y value of more than 0.

    Have you gone through the tutorials yet to get the basics figured out?

    Also, if you do not want any water whatsoever on your terrain then simply setting the sea level value to 0 as you initially queried about will make a ground only terrain..

    Otherwise, perhaps you can explain what you are trying to do and then hopefully we can give a better response :)
     
    Last edited: Jul 28, 2017
  27. Xrystal

    Xrystal

    Joined:
    Mar 25, 2014
    Posts:
    202
    Just to confirm this work around worked for me too.
     
  28. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    444
    You also said that
    So you seem to be saying that the terrain should be at the sea level (y=50) and at y=0. Which one should it be?

    Yes, I did watch the tutorials, which are excellent. Everything is clear, except for the very basic matter of placing the initial stamp :)
     
  29. Xrystal

    Xrystal

    Joined:
    Mar 25, 2014
    Posts:
    202
    Yes, it sounds weird but if you start off with the default settings that's what you will see.

    I just started up Gaia again to make sure I have worded things right, I may have not. So I will post the images instead.

    The terrain object by default is at zero height:
    TerrainAtZeroHeight.png

    The water object by default is at 50 height.
    WaterAtFiftyHeight.png

    And while you are using stampers it varies the height value.
    StamperAtVariableHeight.png

    And these are the buttons that do explain it's usage. I may have worded my understanding of their functionality wrong, so I apologise.
    SticksStampToBaseOfTerrain.png AlignStampToBaseOfTerrain.png
     
  30. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,666
    Physical terrain should be at y = 0.
    Yes - GeNa gives you a really high degree of control.

    Yep this is fine. CTS needs to know about it as well - so just 'bake' your texture in CTS.

    It should be pretty quickly - did you get the 1.6 release ?

    For things like POI or trees, Gaia parents them to a common ancestor, and this causes a complete re-calculate and draw of everything in the tree when you add something new which is slow when lots is spawned. I cottoned on to why this was happening when I made GeNa and made it massively faster. With Gaia 2 I will take the learning from GeNa and add it into the spawners. In the mean time your work around is what I tend to do as well. It stops the per object redraw.

    No - set it to whatever you want. Its used by the spawners to control what height to treat as sea level. So beaches for example go from 0 to 5 meters above sea level. Its quite a handy abstraction.

    Yep - this allows for a wider range of environments to be created.

    The stamps have an artificial 'zero' point at which the stamp should nicely blend to the terrain to minimize artificial walls sticking out of the terrain when stamping and automating stamping.

    Unclicking ground base will allow you to do whatever you want with them.

    Take a look here at about 3:30 to get a sense of this in action : http://www.procedural-worlds.com/gaia/tutorials/stamper-introduction/
     
  31. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    444
    Thank you Adam and Xrystal! I think I understand what's going on. I was trying to better understand how the base level, sea level and ground interact. So, I tried a very small terrain width (256) and River Valley 1 as the stamp source. In this extreme case, the stamp stays under sea level and you have to move it up manually. My question was if there's some shortcut for doing that with precision, but I guess there's none because there's no need for it in most practical cases :)
    stamper1.PNG

    Thanks again for you super-fast support and for a beautiful asset!

    One more question. In Stamper>Position, Rotate and Scale, what exactly do the Width and Height numerical values represent?
     
  32. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,666
    Width and height ;)

    ROFL - relative to the stamp size :)

    Once upon a time i asked a jet fighter pilot what the oxygen bottle was for in the nose of the fighter trainer we were looking at - he turns around to me and says "breathin" :)
     
  33. JonBanana

    JonBanana

    Joined:
    Feb 5, 2014
    Posts:
    40
    Hi i d like to read all of these 174 pages but unfortunatly dont have time ;)

    I need to create mountain for skiing game ,so i have to choose a terrain engine , does someone have some render made with gaia of snowy moutains with forest.

    And other question , does gaia generate unity terrain or custom mesh ? Cause my physic algorythm use terrain normal.

    Thanks a lots
     
  34. Xrystal

    Xrystal

    Joined:
    Mar 25, 2014
    Posts:
    202
    Gaia allows you to build a terrain up and uses Unity's terrain object. By default you don't have a snowy environment but either via other textures or snow shaders and a bit of work you should be able to do what you want.
     
    AdamGoodrich likes this.
  35. Xrystal

    Xrystal

    Joined:
    Mar 25, 2014
    Posts:
    202
    Ah yes, things go a bit crazy when adjusting the terrain block. The terrain stamps distort to fit the ratio between its large stamp footprint and the small space. Setting the stamp to fit the terrain will make it spiked, so you need to use the width value to slowly bring the stamp into a more compatible value. This will also bring it back into terrain level range. Play about with it and see how that works. I've been creating 64m terrain blocks and I ended up hitting this problem. I haven't tried it thoroughly yet but adjusting the height may help as well but may not be feasible as you may still want a 1000m max height across the landscape just in smaller chunks.
     
    runningbird likes this.
  36. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,666
    Yep. It does its best to keep the original ratios of the stamp, and in general this was set up for the default 2km environments.

    If you are a developer you can look at runtimestamper as a way of perhaps automating this to suit your own usage scenario.
     
    Xrystal likes this.
  37. PineappleParty

    PineappleParty

    Joined:
    Jul 31, 2017
    Posts:
    17
    Hi, I'm really wondering. Is there a better place to ask for help using this product? A forum instead of one thread, skype, something?lol. I'm trying to find out how to start with a clean slate like you do in the videos. Like no terrains spawned in or anything just as if I freshly downloaded Gaia into an empty project. I'm afraid to delete anything as I'm still learning what everything is and does. Thanks :)
     
  38. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,666
    It would be great if Unity would support this, but they don't, and I personally generally prefer to see forums here that are active rather than hidden external ones.

    That said, I am almost done re-vamping my web site and will explore doing this there.

    In mean time here is best for support. I generally will only do a Skype session if we cant work stuff out here first.
     
    Mark_01 likes this.
  39. YHS

    YHS

    Joined:
    Aug 10, 2014
    Posts:
    31
    Hi

    I’d like to know the tips to adjust terrain. Let’s say I use Gaia to generate most of terrain shape. But later on if I want to move one specific mountain to other position, or I want to duplicate that mountain. Is that possible to achieve this kind of flexibility in Gaia? (assume I don’t want to clear that part of land and re-stamp again…) I know I can probably create my own mountain stamp templates at very first. Just want to know if there’s any other solutions. For me this kind of flexibility is attract me the most when compare to other node-base terrain creator.

    Thank you

    Yang
     
  40. evilangel89

    evilangel89

    Joined:
    Feb 8, 2017
    Posts:
    268
    Hi Guys,

    Something that is not at all related to Gaia and something you should all be aware of is asset store fraud, that is fake publishers who copy free code available on the forum and sell it as their own in the asset store.

    I've created this thread below to open up a discussion that is not meant to flame someone, but to educate those of you who are not careful when buying an asset ( like I did this time ). I appreciate if you can take time to go through it.

    https://forum.unity3d.com/threads/f...ied-code-off-of-a-forums-free-project.485914/

    Please don't respond back on the Gaia thread regarding this; please post any and all responses that thread alone. I don't want to hijack the Gaia thread to continue this discussion.

    Regards,
    evilangel89
     
    Last edited: Jul 31, 2017
  41. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,666
    Hey Yang, I responded directly to your email the other day but the response bounced and there was no way I could find you to contact you.

    You can make a new stamp from your existing terrain, and can also make yourself a mask for it to mask everything out but the mountain. You can then scale and stamp the original shape as you want.
     
  42. PineappleParty

    PineappleParty

    Joined:
    Jul 31, 2017
    Posts:
    17
    I tried importing in a new mesh to be used as a stamp but it did not work. I imported my blender terrain mesh as a .fbx. I added a mesh collider like you said to do in an older post. And then I dropped it into the scanner box. It gives me the error:
    Invalid AABB aabb
    UnityEditor.DockArea:OnGUI()
    Are there any videos on doing this? I cannot get it to work. Also I tried making a heightmap.png of my mesh to drop in the box. it works except my mesh is stretched vertically and I could not properly adjust that in the stamper options.

    Edit: I followed exactly how you did in the import real world terrain and made my heightmap a .raw file. when I drop it into the scanner I get an error and nothing shows up. the error is:

    EndOfStreamException: Failed to read past end of stream.
    System.IO.BinaryReader.FillBuffer (Int32 numBytes) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/BinaryReader.cs:119)
    System.IO.BinaryReader.ReadUInt16 () (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/BinaryReader.cs:513)
    Gaia.HeightMap.LoadFromRawFile (System.String fileName) (at Assets/Gaia/Scripts/Utils/HeightMap.cs:811)
    Gaia.Scanner.LoadRawFile (System.String path) (at Assets/Gaia/Scripts/ScanningSystem/Scanner.cs:90)
    Gaia.ScannerEditor.DropAreaGUI () (at Assets/Gaia/Scripts/Editor/ScannerEditor.cs:115)
    Gaia.ScannerEditor.OnInspectorGUI () (at Assets/Gaia/Scripts/Editor/ScannerEditor.cs:51)
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1229)
    UnityEditor.DockArea:OnGUI()
     
    Last edited: Jul 31, 2017
  43. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,666
    This is an esoteric unity error. One of the posts I read about it said that its something to do with the scale of your object. Sorry that I cant be more definitive than that.

    Just change the height in the stamper to a value that works. You can manually enter values as well.
     
    PineappleParty likes this.
  44. PineappleParty

    PineappleParty

    Joined:
    Jul 31, 2017
    Posts:
    17
    Changing the values in the stamper did nothing for me to get anything like my original mesh. I'm starting to wonder if its somehow my heightmap that is the issue. It is a series of island broken up by 3 skinny rivers and one island has a tall volcano. If I increased the height I got my volcano but I also got deep canyons instead of rivers with smooth beaches. Also of course if I lowered it I had the beaches but no mountains.

    Is it possible to edit a gaia made terrain with the unity terrain tools? At the end of the day I need to have the ability to hand sculpt trails, tweak rivers, and things. thanks
     
  45. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    871
    Yes. Gaia still uses a standard Unity terrain, so any terrain tools will work with it. Your manual edits won't be recorded in Gaia's Session Manager though, so you can't regenerate the terrain with those manual edits.
     
    PineappleParty and Xrystal like this.
  46. Xrystal

    Xrystal

    Joined:
    Mar 25, 2014
    Posts:
    202
    Yes, I found this out myself while playing with the height/width slider. I ended up handsculpting to refine the riverside. I haven't mastered that side of it to confirm it would work but in theory you could build a mask from the heightmap by editing it so that the mountain areas stay steep and the river areas flow from the land rather than fall from the land. Alot of it is trial and error.
     
    PineappleParty likes this.
  47. franky_li

    franky_li

    Joined:
    Aug 8, 2016
    Posts:
    135
    Hi Adam,

    I have a big problem with GAIA. If I spawn the terrain textures multiple times, the generated splatmaps are getting more and more distorted with each spawn, only in the upper right corner, no matter what terrain I use.
    This are the exported splatmaps of the grass texture from the first spawn to the third:



    This is from an other terrain, same problem after several spawns.


    This makes GAIA almost unusable for me at the moment. I can't try different texture, to see how they look like or different spawner settings, since the splatmaps getting more and more distorted.
    Is there a way to completely clean the splatmaps before I do a new spawn? This should actually being done when I reset the spawner.

    Unity 5.6.2f1, but was the same with 5.5, Windows 10 64bit, GAIA 1.6

    Regards
    Frank
     
    Last edited: Aug 1, 2017
  48. Xrystal

    Xrystal

    Joined:
    Mar 25, 2014
    Posts:
    202
    Did you reset the textures before reapplying them ? Or is that what you are saying you are doing but it doesn't seem to be resetting them properly? If not, that may help negate the problem you are seeing. I have never physcially seen anything wrong but I haven't looked into the values more directly.
     
  49. franky_li

    franky_li

    Joined:
    Aug 8, 2016
    Posts:
    135
    I do a reset any time before I respawn, so it seems that the splatmaps are not resetted.
    BTW: I'm using 8 textures on the terrain and CTS right now, but with Colormap Ultra Terrain Shader I had the same issues.
     
  50. Theformand

    Theformand

    Joined:
    Jan 2, 2010
    Posts:
    260
    I bought this awesome product and I'm having a lot of fun with it. Now, I'm having an issue because I'm working on my own grass with a geometry shader, but I'd like to still use Gaia to generate the grass (detail) positions (just a list of points).

    I tried spawning a lot of proxy objects via the clustered/coverage GameObject spawner, but it just ended up taking almost an hour. Not feasible. I need the grass spawner output :)

    Is there any way that I can get to the final list of generated WORLDSPACE spawn positions from within Gaia? Ive been having trouble getting it out of the terraindata object. Or, rather, problems with converting the terrainData.GetDetailLayer() positions into world space.
    Also, the positions I get out from the terraindata seems to be in a perfect grid.

    Here is a snippet of code that displays what I'm doing now, and an image which shows you that it sort of looks right, but is off to the side of the island, and seems very uniform to me.

    Any pointers?

    Code (CSharp):
    1.   Terrain t = FindObjectOfType<Terrain>();
    2.      
    3.         // Get all of layer zero.
    4.         var map = t.terrainData.GetDetailLayer(0, 0, t.terrainData.detailWidth, t.terrainData.detailHeight, 0);
    5.         positions = new List<Vector3>();
    6.  
    7.         float xOffset = 0f;// t.transform.position.x;
    8.         float zOffset = 0f; //t.transform.position.z;
    9.         xOffset *= t.terrainData.size.x;
    10.         zOffset *= t.terrainData.size.z;
    11.         xOffset /= t.terrainData.alphamapHeight;
    12.         zOffset /= t.terrainData.alphamapWidth;
    13.  
    14.         //// For each pixel in the detail map...
    15.         for (var y = 0; y < t.terrainData.detailHeight; y++)
    16.         {
    17.             for (var x = 0; x < t.terrainData.detailWidth; x++)
    18.             {
    19.                 if (map[x,y] > 0)
    20.                 {
    21.                     positions.Add(new Vector3(x+xOffset, t.terrainData.GetHeight(x, y), y+zOffset));
    22.                  
    23.                 }
    24.              
    25.             }
    26.         }
     
unityunity