Search Unity

  1. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  2. Dismiss Notice

[Released] Vegetation Studio Pro

Discussion in 'Assets and Asset Store' started by LennartJohansen, Jun 29, 2018.

  1. reigota

    reigota

    Joined:
    Mar 23, 2010
    Posts:
    85
    Hello guys,

    I am using VS Pro and suddently everthing started to get rendered on top of my camera when I hit play. Like that:

    upload_2021-4-9_9-4-40.png


    When in edit mode, it looks like this:
    upload_2021-4-9_9-5-32.png


    I already double checked the Cameras config in VSPRO script and it is exactly the same as when everything was just working fine: yesterday when I turned my computer off.

    Any hints on how to make this work again????
     
  2. reigota

    reigota

    Joined:
    Mar 23, 2010
    Posts:
    85
    Ok, I managed to figure it out.

    InstancedIndirect. This is quite buggy in edit mode.

    The documentation available says:
    upload_2021-4-9_13-20-16.png

    "At release only". But does not explain what is supposed to happens in play mode inside the editor.

    It started working just fine and, suddenly, it is not working anymore.

    What is the supposed workflow to use Instanced Indirect??
     
  3. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    971
    I think when the instanced indirect is not configured correctly in the shader you will see some weird behavior. When I didn't have it configured correctly I didn't see the meshes in my in editor Game View, so while it says release only, I does seem like it tries to use instanced indirect in editor. Are you sure your shader is configured correctly to support Instanced Indirect?
     
  4. Calum

    Calum

    Joined:
    Mar 14, 2015
    Posts:
    39
    Hi there, is anyone able to help me figure out what I'm missing?

    I'm trying to paint on meshes. My meshes have the terrain scripts and mesh colliders on them and they have been added to VSP. I've created a vegetation package/biome and added my prefabs. Mesh and VSP layers are both set to default. When I try to hand paint on the meshes nothing appears. The VSP brush appears and "flows" correctly over the meshes but no prefabs get placed. Any help/ideas would be greatly appreciated. Thanks in advance
     
  5. reigota

    reigota

    Joined:
    Mar 23, 2010
    Posts:
    85

    Well.. they are assets from NatureManufacture, I really hope they are properly set up.. :)
     
  6. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    971
    Does it say on the shader product page that they are configured to work with VSP instanced indirect? Because as I understand it, the shader must include some specific #pragmas/shader lines targeting VSP. Also VSP has changed the requirements for these shader lines, and that is not documented very well (for example, the tutorial on the VSP github page that explains how to add instanced indirect support to shaders is for an older version of VSP).

    If you want to double check to make sure they are properly configured, search your VSP folder structure for a file called VSPro_Indirect.cginc or VSPro_HDIndirect.cginc (or possibly something else but similar).

    This file may also be included in the same folder as your NatureManufacturer shader file.

    Open your shader and look for a #include that references the .cginc file. If it's not there than the shader is not configured for vegetation studio. You can add it yourself. I use the absolute path of the file so that I don't need to make a duplicate of it.

    #include "Assets/AwesomeTechnologies/VegetationStudioPro/Runtime/Shaders/Resources/GrassShader/VSPro_HDIndirect.cginc"

    You also need two #pragma linesl. Here are mine:
    #pragma instancing_options procedural:setupVSPro nolightmap nolightprobe forwardadd renderinglayer assumeuniformscaling

    #pragma multi_compile_instancing


    everything after setupVSPro is optional, do a google search for instancing_options and you will find a list of what these mean. What's really important is that the name after procedural: (in this case setupVSPro) matches the name of the method in the .cginc file you found earlier, because from what I've seen, Lennart has changed the name of this method over time (previously it was just called setup).
     
    buc and reigota like this.
  7. Calum

    Calum

    Joined:
    Mar 14, 2015
    Posts:
    39
    Hello, I have hand-painted all my foliage using VSP on to meshes. I can't seem to be able to get them to occlusion cull.

    All prefabs have Occlusion static enabled and Camera Culling mode is Frustum. Is anyone able to tell me what I may have missed? Cheers

    C
     
  8. reigota

    reigota

    Joined:
    Mar 23, 2010
    Posts:
    85

    Thanks man! I will try that and post the results soon !
     
  9. UnityXizor21

    UnityXizor21

    Joined:
    Jan 14, 2021
    Posts:
    15
    HDRP WIND / INTERACTION PreSales Question
    (Though I'm happy to hear from any experienced VSP user)

    My Desired Use Case:
    I am working in HDRP. I wish to adopt a tool (such as VSP) for implementing wind and touch interaction on custom vegetation meshes.

    • My Question Relating To Working With Custom Meshes:
      • I've read that VSP requires custom meshes to be converted for compatibility with VSP wind & interaction. Is this conversion process built-in to Vegetation Studio Pro or does it require the use of an external DCC?
    • My Question Relating To "Listed Compatible Vegetation Asset Packs"
    • Your website hosts a list of mesh assets which are compatible with Vegetation Studio (Pro). Found here: https://www.awesometech.no/index.php/grass/

      Not all of these assets (i.e. SpeedTree products such as Desktop Ground Cover Package) is wind / interaction compatible within HDRP on their own. My question is this: Would Desktop Ground Cover Package be wind / touch interaction compatible when used within Vegetation Studio Pro?
    Can Developer or any experienced VSP user provide insights into the workflow steps (and any limitations) that are inherent with VSP and HDRP wind / interaction when using custom vegetation meshes?
     
  10. ice2011

    ice2011

    Joined:
    Jan 5, 2015
    Posts:
    8
    Hi,
    I’m having issues with black billboards in Vegetation Studios Pro. I can increase the “Mesh Tree Distance” to get rid of them but it effects performance quite heavily especially on builds. Any solutions you can think of? Thanks!
     
  11. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    622
    I believe this occurs when the billboard generator can't find the image to use on the tree material because it's shader is using a non-standard property name for the main input image.
    I renamed my tree material shader to use "_MainTex" from "_Albedo" for the main image input and now billboards are generated ok, because that's what the Unity standard shader calls the main texture input so VSP knows to look for that.

    However, I think Lennart is adding more commonly used property names to the billboard creator code to get round this issue, but perhaps this hasn't made it into release yet, (or the property name for your shader isn't one of the ones added to the valid list).
     
  12. iowarrior

    iowarrior

    Joined:
    Aug 31, 2014
    Posts:
    3
    Hi, first post here. Totally loving this asset.

    I have a question regarding origin shift and vegetation altitude rules. I have my own origin shifter that is also shifting in the vertical and it seems that the altitude rules dont take that shift into account. Is there a way to get that working? I dont mind hacking away myself if necessary, any pointers where to start looking?

    Update: Managed to get it working by adding a few lines. Happy to share the solution but its probably not ok to share VSP code snippets here?

    Update 2: Actually got it working without any changes in code, just had to get the terrain extents right. If i figured it out right, i have to set the terrain area center to inverse of my origin shift.
     
    Last edited: Apr 29, 2021
    dsilverthorn likes this.
  13. LeeKaigan

    LeeKaigan

    Joined:
    Jan 24, 2019
    Posts:
    4
    upload_2021-5-10_16-35-33.png

    It seem that when I'm using Instanced Rendering, things appear darker. It's the same prefab but one is created from a gameobject. I tried switching to Normal Rendering and it works, does anyone know why this happen? Thanks
     
  14. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    667
    Try turning off instancing for the rock and see if it fixes.
    I know that I can't use instancing on everything, only certain objects that are set up for it. I have weird issues that come up when the object isn't set for instancing.
     
  15. buc

    buc

    Joined:
    Apr 22, 2015
    Posts:
    71
    I've a similar problem to this with Amplify Impostors:
    The trees get drawn, but the shadow is always at camera position and also moving with it.
    When turning Instanced Indirect to Instanced, the impostors are showing as expected.
    I've done the steps as you suggested:
    - copied the VSPro_HDIndirect.cginc to the folder where the shaders are
    - added the 3 lines to every Pass:

    // compile directives
    #include "VSPro_HDIndirect.cginc"
    #pragma instancing_options procedural:setupVSPro
    #pragma multi_compile_instancing

    No errors shown, and Refreshed the prefab, but the shadows are still moving with the camera and get shown or not depending on the camera angle.
    For all who would like testing, I've used the amplify OctahedronImpostor shader.

    I'm thankful for any help.
     
    Last edited: Jun 11, 2021
unityunity