Search Unity

[Released!] Custom tree importer

Discussion in 'Assets and Asset Store' started by larsbertram1, Aug 19, 2014.

  1. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    it is a bug in vsp. it is fixed in latest beta - i have been told be lennart. but i haven't been able to test this.
    so just stress lennart :)
     
  2. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,811
    In any case I'll have to do a test myself and see if I get the same thing. It's good to know the cause, thanks. :)
     
  3. Kojote

    Kojote

    Joined:
    May 6, 2017
    Posts:
    200
    At the moment there really seem to be compatibility problems. There is currently a beta for VSPro that probably fixes the problem.
     
    florianalexandru05 likes this.
  4. Kojote

    Kojote

    Joined:
    May 6, 2017
    Posts:
    200
    Problem is unfortunately not fixed in the beta. The billboards are not displayed. :(

    Then I have another problem. I wanted to create a billboard and proceeded according to the documentation. Unfortunately, the result is quite ... bad.

    https://s16.directupload.net/images/210504/fvmhlst7.jpg
     
    Last edited: May 4, 2021
  5. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    ask lennart about it and if there is any action for me.

    why? how does the mesh tree look like?
     
  6. Kojote

    Kojote

    Joined:
    May 6, 2017
    Posts:
    200
    The tree currently looks like this: https://s20.directupload.net/images/210505/p6gcthx2.jpg

    Not particularly beautiful from close up, a large green blob with a brown trunk from afar. At a distance, it bears no resemblance to the trees and is therefore very conspicuous.

    I have already written to Lennart, but no reply yet. For some reason Billboard is not recognised. Only LOD0-2 are used.
     
  7. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    is this just the same image as before?
    btw, you can just uploads images directly in your post using the balck button "upload a file". this makes it faster and easier to watch, compare, ...
     
  8. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Vegetation Studio uses the model and not the billboard for the VS rendered billboard. So it using the last model LOD is correct. I believe you can tell it which LOD to use but only for the LOD models and not the billboard.
     
  9. Kojote

    Kojote

    Joined:
    May 6, 2017
    Posts:
    200
    I see, I thought you could create a billboard with the CTI and VSPro would use that. This is very bad for my game right now. :confused:
     
  10. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Because of VS Billboards not looking as good? Have not been a fan of VS Billboards but think they are working on improving them so we can hopefully have better CTI Tree Billboards in VS soon.
     
  11. Kojote

    Kojote

    Joined:
    May 6, 2017
    Posts:
    200
    Oh yes, the VSPro billboards really don't look very nice. I'm also having problems with my palm trees at the moment. They are simply cut off by the VSPro billboards because they are too wide.:eek:

    I just don't understand the difference. The graphics that VSPro makes are not particularly bad. They are just very poorly reproduced as billboards.
     
  12. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    this sounds like a bug you should report to get it fixed. asymmetric trees need some more love when it comes to setting up the camera that renders the billboards.
     
  13. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,811
    I noticed CTI HDRP HLSL doesn't work anymore from Unity 2020.2? to 2021 so I had to use CTI HDRP 7.2. Everything works fine with that but the billboards don't work with this version of CTI. I know you said in the PDF that it should work with HLSL but HLSL doesn't work for me. Am I missing something with the shader graph version of CTI? Any plans for an update? I think it's possibly just a simple shader re-compile on your part? I just had the same issue with all my amplify shaders in HDRP, they got fixed after I re-saved them in the latest version.

    Screenshot_37.jpg

    Hereare a few more examples, this is happening to other people as well.

    upload_2021-4-5_11-6-44.jpg upload_2021-4-5_14-9-22.png
     
    Last edited: May 12, 2021
  14. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    hdrp 10 broke some stuff, right. on the other hand it fixed some functions regarding shader graph so that at least the leaf and bark shader can use shader graph now. pm sent.
     
    florianalexandru05 likes this.
  15. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,811
    Thanks for the fix, it's working great now. :))
     
  16. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Hi @larsbertram1, Is there a way to change the looked for location of the includes for the HDRP shader graph shaders?
     
  17. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    you mean if you can more around the files? the includes should be referenced by their GUID so moving them would be fine, but i have not tested this.
     
    Baldinoboy likes this.
  18. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Only had this issue once before but am getting it with the HDRP10 shaders. Errors saying the includes can not be found at a specific location and the shaders are broken.
     
  19. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Forgot to reimport the shader folder after moving and that fixed the issue.
     
  20. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Hey @larsbertram1

    Someone reported an issue using the CTI URP 10 shaders in URP 10.5 in 2020.3.13 LTS. Here are the errors that show-

    _upload_2021-7-2_7-12-10.png
     
  21. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    something must be wrong with the import. look at the first error: already contains a definition. so the script seems to be included twice.
     
    Baldinoboy likes this.
  22. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    That is most likely it. Will let them know to delete the CTI folder and reimport.
     
  23. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,811
    Hmm, just a small suggestion but it would be nice if CTI had a way to bake vertex AO in the shader, or at least have another map slot where you could add another AO map on UV2 with an on off toggle, like this.

    upload_2021-8-12_0-7-0.png
     
  24. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    cti supports ao baked into vertex colors.
    another uv channel and an ao texture would be bad i think: even more info per vertex and a another texture fetch.
     
    florianalexandru05 likes this.
  25. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    im having strange reflection behaviour on my water when i use a custom reflection map.
    the tree bark material goes all foggy.
    URP11
    screen.jpg
     
  26. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    more than strange - especially o the bark which uses the regular lighting.
     
  27. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    the leaves seem to render fine , weird
     
  28. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    pretty weird.
    but i can not reproduce it?!
    this is from unity 2021.1.17f1 and urp 11.0 from august 03, 2021 using CTI Runtime Components URP 11.0.
    fog is set to crazy red. and uses a density of 0.5.
    the baked probe looks like below:
    - the cylinder on the lefz uses the cti bark shader from the urp 11 package.
    - the stuff on the right is just the standard sample scene content beiing reflection probe static.

    looks fine for me...



    probecti.PNG
     
  29. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    im not using refletion probes

    it might be the water shader im using
     
  30. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    lol!
     
  31. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    so these are planar reflections?
    this should be a 2nd camera rendering the scene. and i wonder why a 2nd camera should fail to render the bark properly while the main camera does...
     
  32. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    yes, planar reflections.
    ive allready also posted it on the forum for the water shader im using.
     
  33. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    which one is it?
     
  34. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
  35. MightyAnubis

    MightyAnubis

    Joined:
    Jan 29, 2018
    Posts:
    67
    I am sorry, i am not "stupid" in Blender or something, but i can not bring it to work.

    a *LOT* of Things:

    1. - if i group the Objects, how to set the Origins in the Place there it bee ? STRG+A / Location always apply all Origins to 0,0,0 so the Leave and the Bark are setting up to 0 if i import ?

    2. - the "Manual" is - really hard to understand. "Vertex Colors", okay, i give a few to the Leave, should be fine i think, but i am not sure.

    but the most problems on this,

    1. - if i import my Tree, Console says following:

    A :
    First error occured processing: leave_plane
    UnityEngine.Debug:Log(Object)
    AFSTreeMeshPostprocessor:OnPostprocessModel(GameObject) (at Assets/Custom Tree Importer v3/CTI/Scripts/TreeMeshPostprocessor AFS.cs:269)
    UnityEditor.AssetPostprocessingInternal:postprocessMesh(GameObject)
    UnityEditorInternal.InternalEditorUtility:projectWindowDrag(HierarchyProperty, Boolean)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)


    This is - not - a red Error, just a gray information ?? ...


    B :

    Your Model contains too many/too little materials or bark and leaf materials are not named properly.
    UnityEngine.Debug:Log(Object)
    AFSTreeMeshPostprocessor:OnPostprocessModel(GameObject) (at Assets/Custom Tree Importer v3/CTI/Scripts/TreeMeshPostprocessor AFS.cs:268)
    UnityEditor.AssetPostprocessingInternal:postprocessMesh(GameObject)
    UnityEditorInternal.InternalEditorUtility:projectWindowDrag(HierarchyProperty, Boolean)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)



    C:

    first Massages:


    Fixing material names.
    UnityEngine.Debug:Log(Object)
    AFSTreeMeshPostprocessor:OnPreprocessModel() (at Assets/Custom Tree Importer v3/CTI/Scripts/TreeMeshPostprocessor AFS.cs:111)
    UnityEditor.AssetPostprocessingInternal:preprocessMesh(String)
    UnityEditorInternal.InternalEditorUtility:projectWindowDrag(HierarchyProperty, Boolean)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)




    Processing Tree: simple_tree_afsTREE | LOD: 0
    UnityEngine.Debug:Log(Object)
    AFSTreeMeshPostprocessor:OnPostprocessModel(GameObject) (at Assets/Custom Tree Importer v3/CTI/Scripts/TreeMeshPostprocessor AFS.cs:195)
    UnityEditor.AssetPostprocessingInternal:postprocessMesh(GameObject)
    UnityEditorInternal.InternalEditorUtility:projectWindowDrag(HierarchyProperty, Boolean)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)



    Assets/TreeImporterTests/simple_tree_afsTREE.fbx
    UnityEngine.Debug:Log(Object)
    AFSTreeMeshPostprocessor:OnPostprocessModel(GameObject) (at Assets/Custom Tree Importer v3/CTI/Scripts/TreeMeshPostprocessor AFS.cs:196)
    UnityEditor.AssetPostprocessingInternal:postprocessMesh(GameObject)
    UnityEditorInternal.InternalEditorUtility:projectWindowDrag(HierarchyProperty, Boolean)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)



    ************
    Okay so far.
    if i export from Blender, and use "Fix Location and Rotation" i earn a Tree with the Scale 100 100 100 not 1 1 1
    if i use "fix Transforms" all Objects are on Origin 0 0 0
    Branch and Leave are not to see, are very small inside the Tree ( complete clear, because i cant apply the "Transform" in the Position they are, everytime Blender set it to 0 0 0 )

    can any one help with a Blender Toturial or something to do this ?
    *BEST* for Blender 2.79. Only in extreme Ways i go 2.8 or Heighter, because i am absolutly not familiiar with the Usage / Hotkeysystem and the Workflows in Blender 2.8 and heigther, but this should be not the Problem.

    so:
    *PLEASE HELP*
    i build models since 1992, using blender (2.79) since 7 Years, and did a lot of complicatet Things, but i am not familar with Grouping (never needet this) and "Locations" inside Child Objects.
    Also i do not understand that "Material Things" of CTI.

    Ah: The Materials i did create new, and add it to my "Test Tree", the Shader is CTI Bark / CTI Leave.

    *help please*
    Anyone knows a Way out here ? ( discord is possible, skype to ).

    ROFL. Edit: sorry for the "Thunge out" Smilies, they are generatet automaticly from the Unity Erros lol.
     
  36. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    sorry, i am no blender user. maybe @Baldinoboy has some advice for you.
     
  37. MightyAnubis

    MightyAnubis

    Joined:
    Jan 29, 2018
    Posts:
    67
    Yeah i am in Contact with him to, because the Shader is transparent @ my palms, it s a Problem to.

    i also hope he can help me a little, just: i need "bigger" Palm Trees with a much bigger "trunk". ( such for example like Assasains Creed Origin have ). For that i try to learn your Asset, bougth ityesterday.

    but - hm . to bad this with the Export Things. see: 3dS is not a bad program, the only problem is the Price.
    it s totally overpriced. hm :(

    best Greetings.
     
  38. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    i guess it is just a few settings @Baldinoboy can tell you that have to be tweaked.
     
  39. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Hi @MightyAnubis,

    Made a basic CTI tutorial for Blender users-



    Sorry for the small text. Forgot to change monitor resolution for recording. Hopefully it is helpful for the base setup with rotations and export settings.
     
    florianalexandru05 likes this.
  40. MightyAnubis

    MightyAnubis

    Joined:
    Jan 29, 2018
    Posts:
    67
    WOW - very nice, ,i will watch this in a few Minutes.

    @larsbertram1

    follwoing "shader Errors" if i import a new Asset (and all is listet again and new)
    maybe my *TRANSPARENT PALMS* From Tropical pack, depend on this problems:


    Code (CSharp):
    1. Shader error in 'CTI/LOD Bark Tessellation': Did not find shader kernel 'ds_surf' to compile (on d3d11)
    2.  
    3. Compiling Domain program with UNITY_PASS_SHADOWCASTER SHADOWS_DEPTH INSTANCING_ON _METALLICGLOSSMAP GEOM_TYPE_BRANCH _NORMALMAP_TANGENT_SPACE0
    4. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR


    Code (CSharp):
    1. Shader error in 'CTI/LOD Bark Tessellation': Did not find shader kernel 'frag_surf' to compile (on d3d11)
    2.  
    3. Compiling Fragment program with UNITY_PASS_SHADOWCASTER SHADOWS_DEPTH INSTANCING_ON _METALLICGLOSSMAP GEOM_TYPE_BRANCH _NORMALMAP_TANGENT_SPACE0
    4. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR
    5.  


    Code (CSharp):
    1. Shader error in 'CTI/LOD Bark Tessellation': Did not find shader kernel 'hs_surf' to compile (on d3d11)
    2.  
    3. Compiling Hull program with UNITY_PASS_SHADOWCASTER SHADOWS_DEPTH INSTANCING_ON _METALLICGLOSSMAP GEOM_TYPE_BRANCH _NORMALMAP_TANGENT_SPACE0
    4. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR
    5.  

    Code (CSharp):
    1. Shader error in 'CTI/LOD Bark Tessellation': Did not find shader kernel 'tessvert_surf' to compile (on d3d11)
    2.  
    3. Compiling Vertex program with UNITY_PASS_FORWARDBASE DIRECTIONAL _NORMALMAP_TANGENT_SPACE0
    4. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR
    Important on this: i have 0 Sence to using "URP" or "HDRP" so i do not import / use HDRP / URP an my
    project, and delete all dependence on evry "Link" to URP / HDRP" ( it s most senceless, it s same like
    build in, i have a very bad meaning of, cause only thing URP / HDRP doing, is making Things incompatible.
    but away from this.

    The Problem is, that the Palms of TFP are transparent.
    i also ask Baldinoboy he also bring me to your Pack. It s great, but this Error should be fixed, it is annoying.

    *******************
    Error Problem:
    *******************

    inside the Project: Tropical Forest Pack,
    CTI Shader,
    Postprocessing Stack Package Manager, actual Pack)
    Enviro Sky.

    Enviro is - *NOT* inside the Scene (it makes no difference if it s inside or not).

    The Result:



    Error ONLY happens, if i do "Ambient Occlusion" on "ON", if AO is offline in Postprocessing,
    the Error not happens.

    I using:
    linear Colorspace,
    forward Rendering.
     
  41. MightyAnubis

    MightyAnubis

    Joined:
    Jan 29, 2018
    Posts:
    67
  42. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    i just checked latest in unity 2019.4.23f1, built in render pipeline, deferred and forward. no shader errors.
     
  43. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,811
    Bad timing as I was going to use the billboards specifically for my project but I noticed the billboard renderer isn't working correctly. Ever since the latest update of CTI, it's giving me this no matter what version of Unity I use :(

    Billboard fail.png

    It used to work fine before, any idea what might have happened? I tried it on the same project It work before and on the same trees, also I changed a few settings in the camera, and still not good.

    Billboard fail 2.png
     
  44. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    i have no ide what happened. i just checked the "create billboard asset" scene using unity 2019.4.23f1: the generated preview are just fine?!
     
  45. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,811
    Must be something on my end but it's strange, I tried in 2017 and 2020 and the same thing happened. Maybe I'll try an older version of CTI and let you know, I hope I still have it thou.
     
  46. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,811
    I figured it out. Must be something wrong with my GPU drivers updates. Ever since it has been doing this so maybe nothing wrong on your part. I just added a standard material with a regular normal map instead of CTI bark shader and it rendered correctly, weird.
     
  47. Kojote

    Kojote

    Joined:
    May 6, 2017
    Posts:
    200
    Hi! Since the last update all my shaders in the CTI Runtime Components SRP/Shaders folder have errors.

    Error is everywhere:

    Automatically setting target of LOD_FADE_CROSSFADE to 3.0

    Additionally in CTI_LOD_Leaves is this error:

    floating point division by zero

    I don't know if the next problem is one of the errors above.

    As soon as I activate 'Fade out Translucency', the sliders 'Translucency Strength' and 'View Dependency' don't react anymore. The leaves become very dark in some places.
     
  48. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    you have to make sure that you imnstall the proper package.
     
  49. Kojote

    Kojote

    Joined:
    May 6, 2017
    Posts:
    200
    Which package do you mean? I only have HDRP, SRP and URP to choose from. I use SRP actively.
     
  50. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    we
    well, srp (standard rendering pipeline) should not need any package to be intstalled.