Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

3D Rocky Hills Environment Pack - Development Thread

Discussion in 'Art Assets In Progress' started by florianalexandru05, Jan 23, 2016.

  1. SOL3BREAKER

    SOL3BREAKER

    Joined:
    Oct 11, 2021
    Posts:
    39
    I tested urp14 with 2022.9. Some shader works in forward rendering path, but can't work in forward+. They are not pink but they start to flicker. And as for CTI shader, they also flicker. And unity changed GetMeshRenderingLightLayer() to GetMeshRenderingLayer() which makes them not work on forward.
     
    florianalexandru05 likes this.
  2. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    I see, thanks for letting me know, that will depend on amplify shader and CTI if they support it yet. I'll get to it when I have time!
     
  3. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    Looks like someone encountered this problem before and just edited some code. If anyone here is good at codding you could try to comment out the light layers from the "CTI URP Lighting.hlsl".

    upload_2023-3-20_14-29-18.png
    upload_2023-3-20_14-29-28.png

    Posting this! Not sure if it is the same thing.
     
  4. SOL3BREAKER

    SOL3BREAKER

    Joined:
    Oct 11, 2021
    Posts:
    39
    For CTI, I simply modified getmeshrenderinglightlayer to GetMeshRenderingLayer(), and it works. And I also added "#pragma multi_compile _ _FORWARD_PLUS" to its foliage shader, then add (0f,0f) at lightingData.giColor = GlobalIllumination(,,,,,,,,(0f,0f)) in ctiurplighting.hlsl. Now it could work on urp14 forward+.
     
    florianalexandru05 likes this.
  5. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    I just remade my foliage shader and fixed some glaring performance issues. At first, I thought it was just overdraw doing this but turns out the fake translucency was mostly to blame for the unexplained frame rate drop in certain angles. Now all foliage should work at 60fps perfectly with 4M triangles. I simplified everything and came up with a new technique to make translucency without light attenuation nodes in built-in deferred and have it occluded by shadows. I can't believe no one thought about this yet but it seems to work, not perfectly, this is still in alpha. I won't give away the secret just yet but it has something to do with Ao. Before, my shader used to glow in shadows. There are no coding or special nodes, just a funny workaround in Amplify shader. (This will be included in Rocky Hills next time I decide to update it). For now, it will be released in my new Graveyard Catacombs pack when it's going to be ready.

    tRANSLUCENCY.jpg
     

    Attached Files:

    DragonmoN, creat327 and S4G4N like this.
  6. stigmamax

    stigmamax

    Joined:
    Jun 30, 2014
    Posts:
    292
    Good morning,
    I just purchased Rocky Hills Environment Pack.
    I read that the textures were 4096x4096 But I started a project with 2048x2048 textures because I was told that larger textures could affect performance, especially in VR. What about your product? Can I make my new project in 4096?
    PS: I had already used The Light Pack for my project in Unity 5.6.2 and it helped me a lot.
     
  7. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    Hei, yeah you can make your textures any size you want in the editor by changing the texture size of each texture. There are other things that have more of an impact on performance than texture size but if you consider texture size to be something you chose to sacrifice go for it, however, I think I would keep it at 4k. There are instances where I would lower texture size like with expensive lighting effects on shader or foliage. For example, I'm working on a new foliage shader an I realized that using another 4k texture as a translucency combined with light direction affects performance so I only used the lowest mip possible from the linked texture to get only the color.
     
  8. stigmamax

    stigmamax

    Joined:
    Jun 30, 2014
    Posts:
    292
    Good morning,
    I did what is explained in the PDF but I still have these errors.
     
  9. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    Can you be a bit more specific? What pipeline are you using here? Built-in? I see "SRP" errors which are weird. Can you show me the full errors and tell me what pipeline you want to use? Oh, there seems to be some conflict with the wind script. For some reason, you might be having 2 wind scripts in your project.
     
    Last edited: Jun 3, 2023
  10. stigmamax

    stigmamax

    Joined:
    Jun 30, 2014
    Posts:
    292
    I'm using Unity 2022.2.18f1 with basic built-in renderer. I removed the wind in the scene
     
  11. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    There are 2 wind scripts causing this, delete all the "SRP" folders in your project outside "Custom Tree Importer v3"! That should get rid of the error, or find where the duplicate wind script is located.
    This should be your only wind, I'm pretty sure there's a duplicate script somewhere outside that folder for you, find it and delete the script!

    Screenshot_1.jpg
     
    Last edited: Jun 4, 2023
  12. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    Ok, I see there are 2 wind scripts, that's weird, I thought I only left one. Just delete one folder or the other and it should work fine.

    [ Screenshot_3.jpg Screenshot_2.jpg
     
    Last edited: Jun 4, 2023
  13. stigmamax

    stigmamax

    Joined:
    Jun 30, 2014
    Posts:
    292
    I had the Asset Conifers [BOTD] installed (which I had never used) and which had the same script. I deleted it and it works.
    I have another question. What is the difference between Mega Pack and Mega Pack (TFS)?
     
    florianalexandru05 likes this.
  14. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    Glad it works!

    The difference is Mega Pack uses (CTI) shaders, third-party shaders, better wind, shading, and real translucency.
    (TFS) is my own shader I made in Amplify, the tree uses custom normals for shading. If you look at the props example scene you will notice the trees are more blobby-shaded compared to CTI. The custom normals are baked in the 3d modeling app and you can do that yourself with custom models too: https://blender.stackexchange.com/q...lp-fixing-the-normals-for-my-stylized-foliage
    This method works mostly for cartoon-shaded stuff the best, unfortunately, it messes up the tangent normals and the normal maps which are needed for correct specular as well, hence why I gave up on this technique recently.

    I also recommend making a small tweak in all the CTI foliage materials as I noticed It looks too much like harsh planes and I didn't think about it at the time. Set the translucency intensity to 1 and view dependency at 0.2 at least. It makes a huge difference!

    cti settings.jpg

    This will add the same amount of light from the front to back which is actually physically accurate and will remove the ugly plane shading that just looks like a mess. If you want to take it a bit further you can add some blobby Ao in the translucency map with Photoshop and keep the edges birth, this will make the trees look more fuzzy like this:
    RHEX 2.jpg cti2.jpg
    I'm actually using a similar technique for the new version of my shader.
     
    Last edited: Jun 4, 2023
  15. stigmamax

    stigmamax

    Joined:
    Jun 30, 2014
    Posts:
    292
    Thank you for these explanations.
    Another question :
    I did not find any doc for the tessalation. How to avoid texture repetition?
     
  16. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    Are you talking about water or terrain tesselation? If you mean the terrain textures you can't really, unless you do it in shader and have each tile rotate differently which is a pain to do because you need to do that to all your maps. The best way is to have good textures from the get-go and avoid stand-out details in texture. One more thing you can do is in photoshop reduce the shadows and highlights.
     
  17. stigmamax

    stigmamax

    Joined:
    Jun 30, 2014
    Posts:
    292
    Yes I was talking about the terrain. On the examples of your plots it looks perfect. I thought there was a built-in tool.
     
  18. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    Unfortunately no, it's just good textures.
     
  19. stigmamax

    stigmamax

    Joined:
    Jun 30, 2014
    Posts:
    292
  20. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773


    Remaking the wind shader from scratch so I started by breaking the wind into components. First, it's wind rotation, have to admit I'm proud, almost looks like actual physics. (Shading not included yet) Ignore the shading and the trees, that's being worked on in a separate file. Can't wait to show you guys what I'm cooking!
     
    StevenPicard likes this.
  21. stigmamax

    stigmamax

    Joined:
    Jun 30, 2014
    Posts:
    292
    are you going to do an update for rocky hills????
    It's super realistic
     
    florianalexandru05 likes this.
  22. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    If you get this to work on mobile at a fast speed, i'm buying you a ring :)
     
    florianalexandru05 likes this.
  23. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    Yes, this will be my universal foliage shader moving forward and on my old assets too. Get ready for Rocky Hills V5 after this project! ;)
    Lol thanks, you can buy me a drink if you're in Europe! I have a friend that can test it for me on mobile, we shall see how well it performs.
     
    StevenPicard and DragonmoN like this.
  24. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    I'd like to mention that, I'm not using any baked pivots or pivot painter. Everything in my shaders will work internally without much effort on any custom asset. You only need the vertex color green for leaves. Everything from wind to shading will be done internally like magic, including a new technique for translucency without using actual translucency but a clever trick that even works in the "Built-in" pipeline, deferred. My shader will be optimized for deferred rendering and will be accessible with Amplify shader. I'm striving for this to be a new user-friendly tool for creators and artists that want something to look good and work out of the box in all pipelines while at the same time being easy to understand.
     
    StevenPicard likes this.
  25. stigmamax

    stigmamax

    Joined:
    Jun 30, 2014
    Posts:
    292
    Is there hope for a URP version?
     
  26. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    Of course, all pipelines will be supported including URP! :)
     
    StevenPicard likes this.
  27. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    The second motion phase added to the rotation of the wind as well as wind direction based on the pivot. Still a work in progress!

     
    DragonmoN and creat327 like this.
  28. MaxKMadiath

    MaxKMadiath

    Joined:
    Dec 10, 2016
    Posts:
    67
    Hi Your asset Rocky Hills Environment - Mega Pack is not working (HDRP) with the latest unity 2022 LTS. Please help.
     

    Attached Files:

  29. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    First, did you install the right package, this is an older version shown in the image but did you try installing either one of those fixes available in the main root folder?

    upload_2023-6-12_10-33-16.png


    Second, can you please show me the error messages? The pink is possibly the translucency profile breaking, click a foliage material on a tree and you might notice a "fix button pending" in the profile diffusion profile slot, clicking that should fix that issue but as far as the white, it seems some of the amplify shaders broke, it's a simple fix if you own Amplify Shader editor, just re-save the shaders and preferably set them to "shader model 4.5".

    If you're still having issues I could DM you the shader fixes.
     
  30. MaxKMadiath

    MaxKMadiath

    Joined:
    Dec 10, 2016
    Posts:
    67
    I cant find 2020.2 shader fix.Some thing i am missing.
    .2
     

    Attached Files:

    • 1.jpg
      1.jpg
      File size:
      793.8 KB
      Views:
      55
    • 2.jpg
      2.jpg
      File size:
      906.9 KB
      Views:
      53
  31. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    No, you're not missing anything, the screenshot is from an older version. I need to check my pack give me a bit.
    Looks like the shaders may need an update for the newer versions. I'll get back to you with a fix in no time!
     
  32. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    Hei I took a look and it seems that the Amplify shaders broke in 2022. This happens sometimes with new version of Unity, I will need to update my assets again, thanks for letting me know, I wasn't aware yet, aside from that the pack works fine. I'll send you the shaders fix today but it's a bit of a chore so bare with me for a bit!

    In the meantime, you can fix the pink foliage by clicking a tree leaf material and looking at the "diffusion profile slot" there should be a fix button for you", that will get rid of the pink leaves.
    fix.jpg
     
  33. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    Try to apply this fix and let me know if it works!
     

    Attached Files:

  34. MaxKMadiath

    MaxKMadiath

    Joined:
    Dec 10, 2016
    Posts:
    67
    Thanks its better but still tree has the issue. But it's ok I am not in a hurry.
     

    Attached Files:

    • 3.jpg
      3.jpg
      File size:
      751.8 KB
      Views:
      51
  35. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    You have to click on the tree leafe material that's pink and just press the fix button! :)
     

    Attached Files:

  36. MaxKMadiath

    MaxKMadiath

    Joined:
    Dec 10, 2016
    Posts:
    67
    Thanks a lot, it works. Thanks for your quick support.
     

    Attached Files:

    • 4.jpg
      4.jpg
      File size:
      466.6 KB
      Views:
      55
    florianalexandru05 likes this.
  37. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    My pleasure!
    Regarding the leftover errors, unfortunately, the billboard shader is the only thing I can't fix, it's a third-party shader and it's not supported yet in Unity 2022. You could just delete the billboard shader or use a different billboard solution for trees like impostors, otherwise, you won't have any trees at a distance.
     
  38. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    Announcement!

    Since it's broken, I am working on quickly updating Rocky Hills Mega Pack SRP for Unity version 2022 LTS. Update will be live within a day or two at most!!
     
  39. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    Rocky Hills Mega Pack SRP is live and updated to version 2022 LTS!

    As a cherry on top, I edited the texture maps for translucency in "CTI" to make the trees look more fuzzy. No more ugly plane shading!
     

    Attached Files:

    creat327 likes this.
  40. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    Rocky Hills Mega Pack Built-in is live and updated to version 2022 LTS!
     
    StevenPicard and DragonmoN like this.
  41. stigmamax

    stigmamax

    Joined:
    Jun 30, 2014
    Posts:
    292
    I have a small problem, the wind has no action on the trees.
     
  42. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    Are you using built-in or urp there?
    Did you add the "CTI custom wind component" to the wind? Secondly, I would suggest updating if this is built-in especially.
    upload_2023-6-21_12-4-37.png
     
  43. stigmamax

    stigmamax

    Joined:
    Jun 30, 2014
    Posts:
    292
    I am in build-on. Thank you very much for those explanations.
     
    florianalexandru05 likes this.
  44. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    You're welcome, seems like you are using an older version of the pack too since the trees don't look fuzzy there. You could update or give me some time, I could send you something smaller in size quicker.
     
  45. stigmamax

    stigmamax

    Joined:
    Jun 30, 2014
    Posts:
    292
    I just installed version 4.1
    THANKS
     
    florianalexandru05 likes this.
  46. stigmamax

    stigmamax

    Joined:
    Jun 30, 2014
    Posts:
    292
    I tried to put grass but I often have errors according to the mesh that I choose And it is rarely realistic. Did you do a tutorial on how to make great weed with Rocky Hills?

    I can only find grass with LOD but I would like grass that I can apply with the terrain tool.
     
    Last edited: Jun 24, 2023
  47. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    If you're using Built-in without any third-party terrain tools, you can't paint mesh grass "with the terrain details" in Unity currently. You can kind of but I forgot how and it's not very good, I think you have to remove the LODs and only keep it as a mesh. I don't know if it needs a specific shader or not. Usually, people paint grass as trees which is another horrible idea because you'll have an atrocious performance thanks to overdrawing. You can only paint grass details as simple textures. You should use the "Summer scene" as an example. terrain details.jpg

    Unity added the ability to paint mesh details in HDRP from Unity 2021. :)
     
  48. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    Ok just tested it, yes, you can use mesh as detail grass, just make a mesh without the LOD component but it overrides the shader with a built-in unshaded version once you paint it on terrain, not realistic. The wind makes the base of the grass disconnect from the ground and the performance is still bad, not really worth it if you ask me but if you really want to you can. :)

    test.jpg
     
  49. stigmamax

    stigmamax

    Joined:
    Jun 30, 2014
    Posts:
    292
    that works ! THANKS
    Another question. I installed the Post Processing component, but I couldn't find how to use it.
     
  50. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,773
    Did you reload the scene? After you install it, it should work since there's a profile in each scene camera already. Something must have gone wrong but you can do it manually then, just add a post-processing layer to the camera, set it as in the screenshot then apply a volume and add one of those profiles in.
    ppsot.jpg