Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

Fantasy Adventure Environment - A stylized asset pack (Built-in/URP)

Discussion in 'Assets and Asset Store' started by StaggartCreations, Aug 1, 2017.

  1. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,613
    The "All compiler errors should be fixed" is a generic error, but it means there's a scripting error somewhere in your project. This is probably somewhere higher up in your console window if you scroll.

    So it's an error about an error, but isn't actually what's blocking you from entering play mode.
     
  2. JoshWB

    JoshWB

    Joined:
    Aug 4, 2019
    Posts:
    20
    Having an issue with a combination of assets. Specifically, when the FAE Grass meets Stylized Water with Edge Detection (SC Post Effects), I get this:

    Scene View:



    Game View:



    Any ideas on how to go about resolving this?

    Additional info:
    - Unity 2019.4.9 Built-in Pipeline
    - This only seems to happen with the combination of Stylized Water, Grass & Edge Detection (any option, sobel, cross depth, etc)

    Thanks!
     
    Last edited: Sep 4, 2020
  3. kameha808

    kameha808

    Joined:
    Aug 31, 2020
    Posts:
    12
    Ok i managed to get the water texture out an replace it with the grass texture however I do not know who to create the terrain Screen Shot 2020-09-03 at 5.18.40 PM.png

    I'm trying to create something like this. I
    I
    V

    ZJjSWfh.jpg
     
  4. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,613
    This is unfortunately a limitation of using an edge detection post effect with Forward rendering and custom shaders. Edge detection uses the "depth normals" texture generated internally by the render pipeline, this is composed by (re)rendering all objects using a specific shader into the texture. This is a fixed built-in shader, and doesn't know anything about what a custom shader may be doing. So the result is that the grass's alpha cutout and vertex animations aren't applied to the object when the depth normals texture is created, which in turn the edge detection effect uses. Hope that clarifies it! You can also see this happening first hand in the Frame Debugger.

    The only solution is to use Deferred rendering, because the depth normals texture is actually "deferred" from an object, as is, instead of using a built-in replacement shader.

    The Unity documentation covers all the subjects related to creating/editing terrains: https://docs.unity3d.com/Manual/terrain-UsingTerrains.html. The FAE package contains several terrain textures that can be used with this, as they were for the example scene.

    Though, this only goes so far, creating believable terrain shapes usually requires other tools like MapMagic, Gaia, World Creator, etc. I've attached a package with a test terrain I always use as a base to get going quickly.
     

    Attached Files:

    kameha808 likes this.
  5. kameha808

    kameha808

    Joined:
    Aug 31, 2020
    Posts:
    12
    OK so are there any other videos i can see that can help me create my own world & I'm still having trouble with the Terrain and finding the Terrain package I downloaded from you. all I really need help with is how to create the floof of the game and add trees, bushes, streams, plants and more. Could you maybe create a tutorial video on how to start and make a forest?

    It would help a bunch.
     

    Attached Files:

  6. lolaswift

    lolaswift

    Joined:
    Jan 10, 2019
    Posts:
    142
    "Foliage bends away from the player (not available in URP)"
    Will you make it available in URP?
     
  7. kameha808

    kameha808

    Joined:
    Aug 31, 2020
    Posts:
    12
    My name is kameha I'm a bit new to unity but i'm currently working on level designing & was curious if you new a faster way to put grass on the terrain than using the "Paint tree" section in unity. Screen Shot 2020-10-05 at 10.56.16 PM.png
     
  8. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,613
    There are tools like Map Magic or Gaia that can procedurally spawn vegetation on the terrain. I released a free vegetation spawning tool a short while ago here: http://u3d.as/20f3
     
    kameha808 likes this.
  9. kameha808

    kameha808

    Joined:
    Aug 31, 2020
    Posts:
    12
    I'm having an issue here, I've downloaded vegetation spawner and watched a tutorial on how to put the grass on the terrain but every time I try to put it on the terrain nothing appears at all, and nothing happens in to the map. As you can see in the screenshot I provided I'm currently using prefab grass & nothing appears in the terrain when I hit the reload button. Has anyone run into this issue before because I don't know what to do. Please check the video for example Screen Shot 2020-10-08 at 10.31.16 PM.png
     
  10. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,613
    The terrain vegetation system unfortunately doesn't support grass meshes with LODs and custom shaders, nobody understands why this hasn't already been addressed in the last 10 years :rolleyes: The grass is there, but it's just not being rendered. Instead, you have to add the grass as a "tree", which does support this.
     
    kameha808 likes this.
  11. Krytecks

    Krytecks

    Joined:
    Sep 2, 2017
    Posts:
    25
    Hello, i have a little question about pigmentgenerator, it seems to create a good pigment map for me but it does not seems to use it well ...
    My map ( good axis X / Z going positive in the terrain object array like asked by the script ) :

    But on my terrains ...
    I have multiple terrains, the auto center seems to work well too :
    I have 6x6 1000m terrains, resolution of pigment map is 4096 maybe something to do with that ?


    Thanks for your help !
     
  12. Krytecks

    Krytecks

    Joined:
    Sep 2, 2017
    Posts:
    25
    Oh i found out why, it seems if there is some terrain on negatives X/Z, when it goes in positive it seems to bug some positions, i moved my terrain on positive X and Z only, and now it works
     
  13. kameha808

    kameha808

    Joined:
    Aug 31, 2020
    Posts:
    12
    I have tried the Vegetation Spawner and I tried what you said about how you Instead, have to add the grass as a "tree."

    However after trying to put the grass on the terrain using the Vegetation Spawner I'm afraid to say that it does not work at all & nothing happens when you try to put grass in as a tree. it makes me wonder if the Vegetation Spawner needs to updated or is glitched in some way because it's not working at all, if anyone sees this message please tell me if their is a problem or if it's just me I took the time to create a small video to show others what I'm dealing with when I try to use the Vegetation Spawner.

    please take a look at my video.

     
  14. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,613
    I can actually see grass being spawned in your video, but you increase the distance to 44, so each piece is spread apart to the point where they're hard to see. Worth noting that the built-in vegetation system can't handle thousands of trees (or "grass") close to each without tanking performance, that's unfortunately still the state of vegetation in Unity today...

    PS: The asset has a dedicated thread here: https://forum.unity.com/threads/955242
     
    kameha808 likes this.
  15. kameha808

    kameha808

    Joined:
    Aug 31, 2020
    Posts:
    12
    I recently downloaded the Vegetation Studio pack & every time I go to Package manager then push download then import nothing happens at all and their is no package in the project folder at all which makes me wonder if the Vegetation Studio needs to be updated or just don't work anymore. This has been an issue for 3 months and I still can't find the problem.

    Again if anyone sees this message please don't hesitate to help.

    Thank You
     
  16. Krytecks

    Krytecks

    Joined:
    Sep 2, 2017
    Posts:
    25
    Hello, i have another question about PigmentMapGenerator, it seems i have to manually Regenerate it every time i launch my game if i want it to be fully applied ( this tweak only work in editor because in build the "generate" function use a lot of editor code )
    PS : I use CTS for my terrain ( maybe something can be tweaked in it ? )

    Before regenerate it :

    After :


    Some ideas ?

    Thanks
     
    Last edited: Oct 20, 2020
  17. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,613
    The PigmentMapGenerator script has to be active and present in the scene for the texture to be applied to the grass shader. Is this the case?
     
  18. Krytecks

    Krytecks

    Joined:
    Sep 2, 2017
    Posts:
    25
    Yes and it's on the parent GameObject of all my terrains, if i disable it the effect is clearly different from when it's on and i don't regenerate, so i think it's something else like lightning or ambient occlusion or something like that ? The script seems to disable/enable things when it generate the pigment map so maybe there is something that is not enabled when we dont use the generate function ?
     
    Last edited: Oct 21, 2020
  19. Krytecks

    Krytecks

    Joined:
    Sep 2, 2017
    Posts:
    25
    I think i found a workaround, i created a little function that do almost everything like the generate function except functions that use editor code ( like rendertotexture ) and it seems to work.
     
    Last edited: Oct 24, 2020
  20. kameha808

    kameha808

    Joined:
    Aug 31, 2020
    Posts:
    12
    Hello it's me kameha, I wanted to take the time to show everyone in this forum the issues i'm still having with 2020 Vegetation Studio, I have downloaded Vegetation Studio & tried multiple times to get it to work in my game i'm currently making but every time I get an error and try to work around it fixing the issues but no one knows what's going on.

    Every time I click to upload the Vegetation studio I get an error that saids

    "Failed to import package with error: Couldn't decompress package UnityEngine.GUIUtility:rocessEvent(lnt32, InPtr, Boolean&)"

    Again I have uploaded a video to show you all what I'm dealing with & why It is frustrating to try and find a solution to fix this issue. I'd really appreciate any kind of feedback I can get because I've emailed Unity, I've emailed the creator of the Vegetation Studio & they don't know why this is happening.

     
  21. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,613
    Submitted version 1.5.3:

    Minimum supported version is now Unity 2018.4.0. URP now requires v7.4.1 (available since Unity 2019.3.7f1)

    Added:
    - Added terrain layers (part of auto upgrade in 2018.3)
    - (URP) LOD crossfading support for vegetation shaders (already enabled by default on all prefabs)
    - (URP) Foliage bending functionality to Foliage shader

    Changed:
    - Assuming Linear color space by default, colors have been adjusted to fit
    - (URP) Greatly improved translucency for Foliage shader
    - Particle effects now use the Standard particle shader (this also supports camera fading)
    - Normal map inputs on cliff shaders are now correctly marked as such
    - (URP) Vegetation shaders now use the same material UI as in the built-in RP
    - URP material conversion now forces shaders to re-import after completion, as a workaround for Shader Graphs import issues.

    Fixed:
    - Foliage bender now pushes grass/foliage away in the correct direction, regardless of the rotation of a mesh.
     
  22. Enverex

    Enverex

    Joined:
    Jul 6, 2019
    Posts:
    23
    I'm trying to use some of the assets in an environment that doesn't allow for custom scripts. That means I can't put a WindController anywhere in the hierarchy. That in turn means none of the grass or trees move at all. Is there any way to make them move with some sort of default/static wind value without the WindController? e.g. is there any way to make them fall back to some sort of generic default, or hard code values somewhere?

    Thanks.
     
  23. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,613
    The WindController script sets several global shader parameters, used by the shaders. It's unfortunately not possible to have default values for them so they're required to be set by script, at least once.

    But it's possible to modify the shaders to use some hard coded values. If you're using the built-in RP you can open up the related shader files and replace uniform float _WindSpeed; with #define _WindSpeed 1 and repeat this for any other wind related parameters.

    For the URP, you can open up the Fantasy Adventure Environment\Shaders\URP\FAE.hlsl file and replace the parameters with a fixed value in the GetGlobalParams_float, GetLocalParams_float,
    WindDirection and WindSpeed functions (all at the top). At which point you may have to open up the Shader Graphs and save them once, for it to take effect.
     
  24. kameha808

    kameha808

    Joined:
    Aug 31, 2020
    Posts:
    12
    Where did you find the Breath of the wild Link model in unity?
     
  25. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,613
    In what context?
     
  26. kameha808

    kameha808

    Joined:
    Aug 31, 2020
    Posts:
    12
    Thank you. :D
     
  27. FrozenEmpire

    FrozenEmpire

    Joined:
    Sep 10, 2016
    Posts:
    86
    Hi,

    For some reason I can't get the FAE Grass shader to play TouchReact with Vegetation Studio Pro. I've updated FAE to the latest version 1.5.3. Is there any way you could please verify that this integration is still working.

    For info:
    Changing to a VSP grass prefab gets the TouchReact working fine. Just not with the FAE GrassPatch prefab

    Running on 2019.4.4f1 / Windows
     
  28. FrozenEmpire

    FrozenEmpire

    Joined:
    Sep 10, 2016
    Posts:
    86
    Oh solved it ! I had missed to add the FoliageBender component on the collider object. Working nicely now :)
     
  29. j0hnbane

    j0hnbane

    Joined:
    Jul 2, 2014
    Posts:
    20
    Hey there! I a question.

    If I were to make custom models that use the shaders included in this package (for myself), do you have any information I can read/watch on the process needed to utilize the full use of the shaders.

    I've done some testing with a a custom mesh for grass, but the entire mesh moves. I assume this is with vertex coloring, but just want to verify this.

    Also tried this with the tree trunk, and the entire object moved as well.

    Edit: Figured out the answer to the first question I had.
     
    Last edited: Jan 8, 2021
  30. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,613
    Yes, vertex colors are used, there's a section in the documentation that delves into this topic here: http://staggart.xyz/unity/fantasy-a...?section=using-the-shaders-with-custom-assets
     
  31. Enverex

    Enverex

    Joined:
    Jul 6, 2019
    Posts:
    23
    Thanks, I'll try that.
     
  32. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    616
    @StaggartCreations As a heads up, I think the converter might be broken in 2020.2 / URP 10:

    After conversion the materials are set to an error:

    upload_2021-1-18_8-38-53.png

    But if you manually change it to the URP / FAE shader, it renders fine:

    upload_2021-1-18_8-39-45.png

    Notably, this only happened on the Rocks. The grass, trees, and everything else converted fine.
     
  33. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,613
    Thanks for the headsup! Is this on the latest version? There was an inconsistent error caused by the CliffAppearance script trying to set the URP shaders, which weren't yet imported. In v1.5.3 I've added a delay, so the asset database could refresh first.
     
  34. skyrick

    skyrick

    Joined:
    Feb 2, 2013
    Posts:
    21
    I'm trying to make work the trees of the pack with Vegetation Studio Pro, but while the billboards of your shader grass work perfectly with Vegetation Studio Pro / URP, impossible to see the billboards of your trees ... Help me.
     

    Attached Files:

    Last edited: Jan 19, 2021
  35. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,613
    I'm not 100% sure, but it may be that VS doesn't support more than 3 LODS, while tree billboards are LOD4. In the built-in RP this isn't an issue, since VS generates its own billboards, but doesn't support this in URP.

    If they do render when you set the vegetation item's render mode to "Normal", then it's because the billboard shading is missing VS's "Instanced Indirect" implementation. I noticed I hadn't added this, while it should have been.

    You could open up the FAE_TreeBillboard shader graph and add this SubGraph to the Vertex Position output to add this:
    upload_2021-1-19_11-24-23.png
     
  36. skyrick

    skyrick

    Joined:
    Feb 2, 2013
    Posts:
    21
    Yes, I'm in URP

    I tried :
    • Remove LOD0, and replace it by LOD1 + rename it, same for the rest.
    • set the vegetation item's render mode to "Normal"
    • Add the fix in the billboard shader

    Same issue :(
    I don't understand why your grass shader works great with VSP & URP
     

    Attached Files:

  37. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,613
    I checked the VSP code, and it skips a vegetation item's LOD if it uses a billboard shader, since it's suppose to render its own. So that's intended, but unwanted behaviour.

    You can modify "FAETreeShaderController" script and change the MatchBillboardShader function to read
    Code (CSharp):
    1. public bool MatchBillboardShader(Material[] materials)
    2.         {
    3.             if (GraphicsSettings.renderPipelineAsset != null) return false;
    4.  
    5.             for (int i = 0; i <= materials.Length - 1; i++)
    6.             {
    7.                 if (materials[i].shader.name == "FAE/Tree Billboard" || materials[i].shader.name == "Universal Render Pipeline/FAE/FAE_TreeBillboard") return true;
    8.             }
    9.             return false;
    10.         }
    This way anything using the billboard shader is still going to be rendered. I'll be sure to include this change (and the node) through an update, at least until VS supports its own billboards in URP.

    Note that you'll have to refresh the vegetation item for this to take effect.
     
    Last edited: Jan 19, 2021
  38. skyrick

    skyrick

    Joined:
    Feb 2, 2013
    Posts:
    21
    Are you test it ?

    Because everything is the same here after change the script :(
    ( maybe I need to restart Unity ? )

    Need I to be in "Normal" or "Instanced Indirect" ?
    Because when I refresh the asset, It directly reset to "Instanced Indirect" ...

    Edit : Error in attached screen capture
     

    Attached Files:

    Last edited: Jan 19, 2021
  39. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,613
    Whoops, Rider automatically adds the "using" directive at the top, which you are likely missing. You can change it to if (UnityEngine.Rendering.GraphicsSettings.renderPipelineAsset != null) return false; to resolve the specific error.

    You can use Instanced Indirect, VSP picks up on the FAE shaders, so automatically configures this. It'll be more performance efficient than the other options.
     
  40. skyrick

    skyrick

    Joined:
    Feb 2, 2013
    Posts:
    21
    YES! Works !
    Thanks a lot ! 5 stars to your support service :)
     
    StaggartCreations likes this.
  41. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    616
    Yes, it was with 1.5.3 (tried clearing and re-downloading as well).
     
  42. skyrick

    skyrick

    Joined:
    Feb 2, 2013
    Posts:
    21
    but some questions yet ;)
    1. A way to have the same great billboards of your shader grass ? ( I mean just a plane, no visible at all on wireframe mode, and follow the camera )
    2. The Cross Fade Mode ( animated ) seems broken inside VSP, any ideas ?
    3. The color of the branches change between LODs and billboards any ideas ?
     
    Last edited: Jan 20, 2021
  43. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,613
    For proper billboards I'd suggest to look at Amplify Impostors, which can create SpeedTree-like billboards. Rotating the mesh towards the camera would only really work if the object is uniform in width.

    VSP unfortunately doesn't support LOD crossfading, so popping is unavoidable.

    Trees have ambient occlusion baked into their vertices, which shades some parts darker. The next LOD has fewer vertices, so the AO shading will be slightly different.
     
  44. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,613
    Bummer, I've tried it in a few empty projects and panned out well for me. It seems to be timing related, but reloading the scene will in any case nudge things back into place
     
  45. Pescu

    Pescu

    Joined:
    Jun 7, 2014
    Posts:
    17
    Hello, I have noticed that the animation of the shader is not the same (which was very nice in Build in render) in URP the way was before. Is this correct or Its nor working correctly in my project? I also have another question. I tried to use the same shader for other trees but its not working correctly, I have noticed that you are using the alpha channel of the vertex painting. May you share the way we should create the vertex paining for other trees to use the shader.
    Thanks,
    Mihai
     
  46. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,613
    I think the animation speed may differ slightly, I slowed everything down in URP 10x to closely match the built-in RP.

    As I recall, someone used the VertexDirt asset to bake ambient occlusion in the vertex RGB channels, and a gradient into the Alpha channel.
     
  47. Metirof

    Metirof

    Joined:
    Feb 5, 2018
    Posts:
    21
    Hello @StaggartCreations ,

    I just started using your asset and its very usful and easy to use i really like it, but one thing i noticed that for some reason the grass appearance changes after build, is that a bug or im just missing somthing ?
    ( Im using built in render / Using pigment map for grass color / Not using height map )
    Check appearance difference between engine and build in video below

    here is my material setting
    upload_2021-2-11_23-14-58.png
     
  48. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,613
    Thanks for the video, I can immediately tell the grass is missing it's vertex colors in the build. This is also why the base of the grass is also moving, while it should be still. Vertex colors are also used for the pigment map height parameter. This is related to the "Optimize Mesh Data" setting:
    upload_2021-2-12_10-44-38.png

    This should generally be left enabled, but right now Unity thinks the grass mesh isn't being used by any shaders that uses its vertex colors, so strips them. You can probably get around this by placing one grass prefab somewhere in the scene to force it. I'm assuming the prefab painter you're using isn't using GameObjects, otherwise this wouldn't happen.
     
    Metirof likes this.
  49. Metirof

    Metirof

    Joined:
    Feb 5, 2018
    Posts:
    21
    thanks for quick response, manually placing one grass prefab on scene fixed all the others :)
     
  50. LordIceBreaker

    LordIceBreaker

    Joined:
    Aug 29, 2020
    Posts:
    9
    Please help me. I am using Unity 2020.1.17f1 and all of my stuff are white or pink.

    upload_2021-2-18_18-33-57.png
     
unityunity