Search Unity

[RELEASED] PIDI - XFur Studio. Realistic fur for Unity that you can paint on your models!

Discussion in 'Assets and Asset Store' started by IrrSoft, Apr 11, 2018.

  1. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928
    To celebrate Halloween, XFur Studio will have a 25% off on ItchIO through October 30 and 31. Get it now for only $37.50 USD!
    https://itch.io/s/13768/halloween-special

    And also, version 1.4 should now be available to download in both the Asset Store and ItchIO!
     
    Mark_01 likes this.
  2. alvifarooq

    alvifarooq

    Joined:
    Sep 14, 2015
    Posts:
    19
    Hi, I understand you're working on a mobile version? Had a few questions around that?

    1. When do you think it'll be released?
    2. How many furry animals do you think it can support on the screen at the same time? My game is not particularly complex but I wonder if with the right tweaks, I can get away with about ~20? Each object has <1k triangles mesh.
    3. I'm also curious if the current non-mobile version of the asset can support the use case in (2). Given that I'm only targeting modern devices i.e. iPhone 5s and above (iOS 9.2 and above).

    Thanks!
     
  3. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928

    Hi there, and thank you for your interest in this tool :)

    To answer your questions :

    1. There is indeed a mobile version in the works and since I recently got a few more Android phones to test it on I am making some heavy improvements (especially for higher end devices). There is not a definitive release date but rather a release window. The earliest it will be released will be between the very last days of November and the first half of December. In any case, it should be ready before the holidays season.
    2. This would depend entirely on each device. The less demanding version of the shader has 4 samples of fur meaning that 20k tris (from the characters)*4 and 20 drawcalls (supposing each character has 1 material)*4 means that your game would be making at the very least 80 drawcalls and rendering 80k triangles each frame in the lowest settings. If you can disable fur entirely for the far away objects this could be reduced even more.
    3. The current main version of XFur Studio can run on OpenGLES 3 - Metal level hardware without issues but it is quite heavy in some mid-range GPUs. The mobile version will have some vertex-fragment shaders which are less complex and faster to compute for mobile GPUs but if you are targeting high end devices (especially if they are Metal compatible) you may be able to use the current version as long as you stick to the lowest available settings (4 to 8 samples) and make, on your end, some LOD management where you replace the fur covered models for some without any fur at a certain distance from the camera/center of the screen.
    I hope this helps. Have a good weekend!
     
    gecko likes this.
  4. alvifarooq

    alvifarooq

    Joined:
    Sep 14, 2015
    Posts:
    19
    Thanks so much for the detailed response. I think for now I'll wait for the release of the mobile version. Good Luck!
     
  5. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928


    XFur Mobile stress test #1. Recorded with DU Recorder (so not the best output quality) but here are the details of the experiment :

    Smartphone : a Kirin 659 chipset with 3GB RAM and a 2160x1080 screen. Android 7.0
    Models : 20 animated models with 890 triangles and ~30 bones each
    Material used : XFur Mobile optimized material at 8 samples per character. 21 drawcalls total ( all 20 meshes thanks to batching, without shadows)
    FPS while recording and with all 20 models visible at once (FPS on device) : 15-25
    FPS without recording : 30-40
    FPS without shadows : ~40

    These numbers will change as development continues and may improve considerably by using smart LOD management (or the included LOD module) as well as lower quality materials but it also may work slower when using more complex materials, snow effects, physics or a larger amount of models. High end phones (Galaxy 6, 7 or iPhone equivalents) will show a much better performance.
     
    Mark_01 likes this.
  6. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928
    Here are some links to the basic demos of the fur for mobile devices :

    https://www.dropbox.com/s/xw4lnns8hdqvqml/XFurMobile.apk?dl=0
    https://www.dropbox.com/s/disn66zrm95irjr/XFurMobile_MidRange.apk?dl=0
    https://www.dropbox.com/s/mit7c6jq5pavat6/XFurMobile_MidHighRange.apk?dl=0

    So you can test them on your Android phones. They are all OpenGLES 2 compatible and showcase the basic to low Mid range branch of XFur Studio Mobile (1 per pixel directional light + 4 vertex lights with full shadow casting support). The next batch of demos, coming later next week, will be exclusive for OpenGLES3 mid to high end devices and feature per pixel lighting and weather FX.
     
  7. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,374
    I found a way to fetch parallax information in one hit for parallel shell like layer
     
    IrrSoft and Mark_01 like this.
  8. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928
    upload_2018-11-29_0-19-19.png

    Snow and other weather effects are ready on XFur Mobile now. Over the weekend the asset will be thoroughly tested to be sent for approval to the Asset Store next week and hopefully approved early in December :)

    At this time, XFur Mobile will have two sets of shaders, Basic and Full.

    Basic
    is targeted to OpenGLES 2 and low end devices, with full support for 1 directional light and 4 vertex lights. It is extremely optimized and compatible with drawcall batches for maximum performance. It supports all basic fur rendering features and weather FX and works through forward rendering. Dozens of instances can be rendered with a few drawcalls even on very low end devices

    Full targets OpenGLES 3 devices from mid-to high end. It has support for basic physics and animation based dynamics, full weather effects, triplanar projections, deferred rendering (for advanced shadows) and any number of pixel based lights. It is the most scalable version but also more demanding than the basic one.

    XFur Mobile will be its own product with a (still tentative) price of 50 dollars.

    Hope this is a bit of good news for our Mobile-oriented developers!
     

    Attached Files:

    Mark_01 and gecko like this.
  9. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,024
    Will the mobile version have shadow receiving?
     
  10. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928
    In the release version there is shadow receiving for the Full branch only, but the shadow receiving works 100% accurately on deferred only. Forward rendering still has some issues (the base mesh receives shadows but the fur itself doesn't since it is handled as a semi-transparent object).

    The fully shadowed system present on the desktop version (full shadows for forward) has proven so far to be a bit too heavy for mobile devices (heavy optimizations are being worked on), but I am trying to find a way to add shadows to the Basic branch as well with quite a high priority. This may not be ready on time for the first release however but for version 1.1 in January instead, though we will know over the weekend if they will be ready on time or not for the first release.

    Hope this helps! :)
     
    gecko likes this.
  11. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928
    After some further changes to the shaders regarding shadows, here is a final update :

    • For the time being, Basic shaders will NOT be able to receive shadows, only to cast them. This is done to save instructions and improve performance. These shaders are intended for very low end devices after all. (OpenGLES 2)
    • Full shaders can now receive shadows in both forward and deferred without issues. If your game needs high fidelity graphics and is targeting mid to high end devices, this should be your selection of shaders. Any phone with OpenGLES3 support should work with them.

    upload_2018-11-29_10-59-24.png
     
  12. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,024
    Thanks, that sounds quite reasonable!
     
  13. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928
    XFur Studio for Mobile will be sent later today to be approved as soon as possible. Will update here as soon as it is live on the Asset Store :)

    While this is a first release and some features may need to be ironed out, XFur for Mobile comes at launch with all the features you have come to expect from XFur, including physics, weather and blood effects, triplanar projections, advanced coloration control, ease of use, XFur Painter support, easy to use fur layer textures and much more.

    This will be a brand new product sold separately from the main XFur Studio since its functionality, while very similar from the outside (to help with an easy transition for people who want to use both) is quite different internally. Hope these are good news, more updates will be posted here as soon as the tool is available :)

    Have a great week!
     
    Mark_01, rocket5tim and gecko like this.
  14. jun-x

    jun-x

    Joined:
    Jul 6, 2017
    Posts:
    2
    Hi, you mentioned before that you're looking to get lwrp support for this. I'm very beginner in my understanding of writing shaders and lwrp, so I could be totally off on this. LWRP only supports one pass, right? Is it even possible to create shell fur shaders that are dependent on multiple passes to create the fur shells?
     
  15. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928
    While the planned LWRP port would be using an alternative method to the shells rendering used in the Standard Pipeline (which would be effective though more expensive but also the most feasible way to achieve it since like you say passes are severely limited in LWRP) the LWRP pipeline is not, at the moment, mature enough to port all of XFur features and thus those plans have been put on hold in favor of the release of XFur for mobile.

    I hope this helps! :)
     
    jun-x and Mark_01 like this.
  16. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928
    XFur Studio has been nominated for the Unity Awards 2018 for Best Artistic tool!


    We want to take this moment to thank all of the people who have been using and supporting XFur since its release, because your help has been very valuable to improve and develop XFur into the tool it is today, and to making possible for it to continue growing during 2018 and what comes on 2019 for Xfur Studio and very soon XFur Mobile :)

    This post is also to inform you that, due to the holiday season, we will be taking a short break ( starting later today and to come back on January 7) and to wish you all a very happy holiday's season and an amazing 2019!

    Irreverent Software
     
  17. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,024
    Congrats! Fully deserved!
     
    IrrSoft likes this.
  18. Mark_01

    Mark_01

    Joined:
    Mar 31, 2016
    Posts:
    451
    Yes Congratulations !! & Seasons greetings, a break / rest will do good.
     
    Last edited: Dec 15, 2018
    IrrSoft likes this.
  19. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    827
    Hi! Does this work on iOS?
     
  20. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928
    Xfur studio is on sale on the unity store at 50% off to celebrate the holidays! Pick it up at its lowest price on Unity's Best of 2018 Holiday Sale !
    https://assetstore.unity.com/packages/vfx/shaders/pidi-xfur-studio-113361

    This version of xfur is made for desktop not for mobile since, while it can work on some, the performance won't be very good on mobile devices. Xfur Studio mobile is coming (hopefully, depends on unity's approval times) this week with basically all the same features but adapted for mobile, so that's the one you should look for! :)

    Happy Holidays everyone!
     
    ina and Mark_01 like this.
  21. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    827
    Yay will owners of the full version be able to have access to xfur studio mobile?
     
  22. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928
    Hi there,

    XFur Studio Mobile will be its own separate product since, while most of the features are the same, the architecture of the shaders, how they have been optimized is completely different and during these first months it will receive numerous updates and improvements (and because of this, having both desktop and mobile versions co-existing in the same project may not be the best idea).

    However, during the first month of its launch, all owners of XFur Studio will receive a 20% discount when buying XFur Studio Mobile which, if you pick up XFur during this holiday sale, means you'll get a huge discount on both versions :)

    Hope this helps, and happy holidays!
     
    Mark_01 likes this.
  23. TCROC

    TCROC

    Joined:
    Aug 15, 2015
    Posts:
    119
    I just stumbled across this asset on the asset store and am interested in purchasing it. I have a few questions first though.

    1.) How does this asset stack up against Fur Factory?
    2.) Can cartoony looking fur be achieved with this asset like what is shown in Fur Factory?
    3.) What platforms is this shader compatible with? And what are the requirements?
    4.) What is the performance like with this shader?
     
  24. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928
    A quick notice :
    The release of XFur Studio Mobile is being delayed due to internal issues with the submission/approval process of the Asset Store. The situation is being looked into, but there is no clear date for the approval and release yet. Sorry for the inconvenience, but this is something out of my control. We will need to wait for the issue to be solved and the tool to be approved.


    Hi there and thanks for your interest in our tool,

    While we avoid any direct comparisons since we do not know all the internal workings of other tools well enough, we assume that Fur factory uses polygonal sheets to display the fur so there is no real comparison between Fur Factory and our asset since both methods are completely different in performance, implementation and requirements. XFur is mostly shader based, using the shells method.
    The fur seen on Fur Factory is not really cartoony, it is the character's design that is. XFur is, however, flexible enough to render many kinds of fur. However, the lighting and effects applied to the fur are always realistic.

    Hope this helps and please, this is an important notice for everyone reading this thread :
    There won't be any further replies from us on this forum until after January 7 due to our holiday break, so please be patient if you dont get any response. For support requests, contact us through our support email so your requests are queued for when we come back so we can solve them in the order they arrived.

    Thanks again, and happy holidays!
     
    Last edited: Dec 19, 2018
    Mark_01 likes this.
  25. The-Creature-Queen

    The-Creature-Queen

    Joined:
    Jan 19, 2017
    Posts:
    24
    Happy holidays! I love this asset tremendously. :D Reading the manual cover to cover and playing with all the channels, proof of concepts one feature after another. This is glorious. I've used all of the fur shaders for Unity and even implemented Nvidia hairworks (time consuming..trying to save time and not leave unity..) and you and I both know this is the best one and the features are uncontested.

    I'm working on a fantasy creature breeding and training simulator. Woohoo! And I beg of you, BEG of you to pleeaase implement coat pattern randomization. Currently I have to create heaps of albedo maps in order to include true pattern variation from breeding result to result. For the moment I'm not making any and focusing on the rest of the game, because if that feature of XFur releases-- I wont have to do that! lol

    Really excited for next release.
     
  26. Chris_Payne_QS

    Chris_Payne_QS

    Joined:
    Jul 16, 2016
    Posts:
    44
    Is XFurStudio 1.4 tested on Unity 2018.3.0f2 yet?
    I'm getting this error:
    Could not create a custom UI for the shader 'PIDI Shaders Collection/XFur System/Standard/High Quality/Twenty Four Samples'. The shader has the following: 'CustomEditor = XFur_ShaderEditor'. Does the custom editor specified include its namespace? And does the class either derive from ShaderGUI or MaterialEditor?

    I've tried prefixing it with "XFurStudio." but still get the error...
     
  27. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928
    Has been tested with 2018.3.0f1 without any errors (I just re-downloaded it from the asset store into an empty project), should be able to run without issues on such a small version change. Please try re-downloading and re-importing to the project to ensure maximum compatibility. It may help
     
  28. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928
    XFur Studio Mobile is now released and comes with a 20% discount for all owners of the main XFur Studio asset. Please keep in mind that, being a first version, XFur Studio Mobile will see several updates, improvements and some minor fixes in the upcoming months as it is adapted to better suit the needs of mobile developers and as we get more requests and suggestions from the users :)

    https://forum.unity.com/threads/fir...-fur-solution-for-unity-now-on-mobile.609361/

    I hope this helps and that it will be very useful for many of you!
     
    gecko likes this.
  29. Monorio1

    Monorio1

    Joined:
    Dec 10, 2018
    Posts:
    17
    Hi,
    curious before buying, will this work on PS4 and Xbox one? Does it work with a Deferred rendering pipeline? How manageable are performances for multiple skinned mesh on screen?
    Thanks for the answers

    -Bernard
     
  30. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928
    Hi there

    The shader is fully compatible with Unity's standard deferred pipeline. If there are other deferred pipelines that are compliant with Unity's standard (in the sense that the Gbuffer is managed in a similar enough way such as in Uber or Lux) there should be no issues, however the standard deferred pipeline is the only one officially supported.

    The plugin has been used in a few console projects, but as far as I know they were for PS4. However, since all shaders work with Pixel Shader 3.0 and make no use of any PC exclusive feature ( they can even run on a high end phone ) I have no reasons to think there would be compatibility issues with current gen consoles.

    Regarding performance :

    On a moderately powerful PC ( a budget gaming laptop ) with a GTX1050 (mobile version) you can render around 20-50 characters with 15k polygons each and high quality fur without too much of a performance drop (between 2 and 5 FPS) with dynamic resolutions between 720 and 1080p (which would be close to the standard for the base versions of those consoles as well ). However, this is a shell based shader so the actual performance depends on the target device, the amount of samples ( shells ) of the shader you use and the amount of polygons of your characters that will be covered with fur.

    I do not know exactly the performance equivalency of a PS4 compared to a PC but, if it is close to a mid-high end PC you should have no problems even with dozens of skinned meshes as long as the geometry that uses fur covered materials is well optimized on its polygon counts.

    I hope this helps, please ask any other questions you may have and thank you for your interest in XFur! :)
     
    Mark_01 likes this.
  31. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928
    Coming in late February is version 1.45 of XFur, with some performance improvements in the way that the modules are handled as well as some internal code optimization. Additionally, there will be a few video tutorials coming in March showing how to add fur to a character as a way to improve the ease of use of the tool :)

    Have a great weekend!
     
    Mark_01, Rotary-Heart and gecko like this.
  32. btoderian

    btoderian

    Joined:
    Feb 6, 2019
    Posts:
    1
    Hi! I am considering using Xfur for downy feather plumage for use in a VR app. Is there control for clumping, and can attributes such as stiffness be animated? I am also considering using blendshape animation - will the fur deform with that? And do you have a demo app available?
     
  33. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928
    Hi there,

    Unfortunately, XFur is not designed nor will it be really suitable to simulate feathers nor a feathery look. It uses the shell method of rendering which allows for limited control over clumping and does not lend itself to simulate the higher intricacies and variation found in feathers. Stiffness can be adjusted through the input textures of the shader, thus if you animate these textures or replace them at runtime you can change the stiffness of the fur in a per-pixel basis at runtime.

    The fur does support blendshapes since again it uses the shells method, which re-draws the entire geometry with blendshapes and all. Regarding a demo, the only demo available at the moment is quite outdated but I am in the process of updating tutorials and demos for the tool, so a new one should be available soon enough.

    I hope this helps!
     
  34. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    715
    Hello! I just bought Xfur and I'm starting to give it a spin. So far it really looks like a great asset, congratulations!

    I love the combing of the fur in the editor. Very simple and direct. I have a request though (and please let me know if this is already implemented): a symmetry mode would be extremely useful. So you just need to work on the left side and the right side would update accordingly. Again, since this is a relatively basic function I might have have missed it in the manual...

    Again, great job with that asset! :)
     
  35. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928
    Hi there, and first of all thank you for your purchase and support to this tool :)

    The symmetry mode was considered a good while ago (I have tried and wanted to add something similar to the symmetry mode on Substance Painter for a long time), but unfortunately there are several technical limitations that have made it ( at least so far ) impossible to add. XFur uses a purely shader approach which means that everything it does depends, in one way or another, on data that is already on the mesh itself or in a texture. The fur mask and the fur directions map used to control the grooming depend on a texture that is mapped to the UV0 coordinates of the model thus the only way to achieve symmetry would be to have the UVs themselves mirrored, but this would have the undesired effect of mirroring the directions as well ( forward on the left side becomes backwards on the right side ). The other option that was considered was to generate a completely new UV map on the fly which was symmetric and helped to solve this, but the UV2 and UV3 channels are used for other effects, to optimize them, leaving little to no data left in the model.

    The function has not been discarded altogether however, so there's still a chance it might be added in the future but, even if it seems simple on paper it has presented quite the challenge due to how XFur is made to work as best and as fast as possible in Unity. Thank you for your suggestion and request, they will keep being considered as I try to find the best way to implement it without breaking backwards compatibility for existing projects :)

    I hope this helps and again, thank you for your purchase and for your very kind words! :)
     
    Mark_01 likes this.
  36. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    715
    Thank you for your reply! Now to address your points:

    - Symmetry of UVs: of course, the models that would require symmetrical fur would have to have symmetrical UVs, but again that's a given. No-one would expect a symmetrical behavior on a model that wouldn't be (or its UVs) symmetrical in the first place. :)

    - Performance: I understand totally the need to keep the tool performant. Therefore the symmetry doesn't have to necessarily happen in real-time (while you comb/trim). It could be a button you press and whatever you did on one side would apply to the other. That way it wouldn't incur any performance hit on the real-time operations.

    I don't mean to sound too insistent but the symmetry feature is more or less required with 90% of models and you've already done such a great job with your asset's workflow that it would be a shame not to have this... :)

    Update:
    Something else that's sorely needed: an undo/redo function.
     
    Last edited: Feb 12, 2019
    Mark_01 and IrrSoft like this.
  37. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928
    The undo function is already implemented through the "R" key. Undo is limited to a few spaces since, due to this being inside the Editor, several temporary textures have to be generated as a history and this could quickly eat up too much RAM. XFur Painter has been kept simple to favor improvements and updates to XFur itself ( but all the outputs from Painter are png maps which makes them easily editable on Photoshop and any other software ). A more extensive history management and a proper redo function may come at a later time.

    I hope this helps!
     
    Mark_01 and Seith like this.
  38. Genghis42

    Genghis42

    Joined:
    Feb 14, 2018
    Posts:
    5
    Hi! I purchased XFur back during the holiday sale, and have finally gotten around to testing it out. My ultimate goal is to create "human-animal hybrid" RPG characters (e.g., werewolf PCs or NPCs), but for now I'm just playing with the scalp of a normal human male to see what sorts of effects I can create. I'm impressed -- thank you for creating this asset! However, I'm afraid I have a long list of questions. :p

    1. Transparent base layer in XFur 1.4?
    My "hybrids" will need both fur AND skin, so I've been paying close attention to the dividing line between two materials. To get it to look right in my tests, its been very helpful to add high-frequency noise to the "shave" channel of the mask image, i.e., to randomly select x% of the pixels and zero out the red value (if I add a Gaussian blur at a certain point in my GIMP workflow, I can also get random "splotches" of a desired size). This lets the base layer texture (which uses the same images as my actual skin material) show through the fur, but it doesn't look quite right, since XFur (obviously) isn't a skin shader. (FYI, I'm currently using "Fast Fake Skin", but plan to upgrade in the near future.*) Therefore, I have the same question as Rotock from last spring: https://forum.unity.com/threads/rel...int-on-your-models.526200/page-3#post-3516277

    In one of your replies back then, you said you planned to add a "no-skin" option in future releases, but I haven't seen anything in 1.4. Did that plan fall through? You also gave him a simple hack (commenting out certain lines) to disable the base skin, but the shaders have obviously changed a LOT since then. Is there anything comparable I could do today?

    * - BTW, I'm looking hard at your PBR Skin Shader as a potential purchase. If you have any tips for using it alongside XFur, let me know!

    2. UMA Integration?
    To your knowledge, has anyone attempted to integrate XFur with the Unity Multipurpose Avatar (UMA) system? I'm making progress, but have hit several issues. If you're not familiar, UMA is a system for character customization -- the TL;DR of using it is: you attach a "DynamicCharacterAvatar" component to a root GameObject; at runtime, this adds a "UMARenderer" child object, which contains a Skinned Mesh Renderer component with a dynamically-generated mesh ("UMAMesh", which is created to match all of your many, many customization options). Many of my problems stem from the fact that ***I cannot add XFur_System to each UMARenderer until runtime***, because those objects don't even exist until the game has been running for several frames. Currently, I've been able to get XFur kinda-sorta-halfways working with UMA by attaching the following script to the same root object as the DCA (I'm new to Unity and C# -- sorry if this is newbie stuff):

    Code (CSharp):
    1. public class AttachXFurSystem : MonoBehaviour
    2. {
    3.     public XFur_DatabaseModule xfdb_to_link;
    4.     void Start()
    5.     {
    6.         DynamicCharacterAvatar avatar = GetComponent<DynamicCharacterAvatar>();
    7.         avatar.umaData.OnCharacterCreated += OnCharacterCreated_ExtraStuff; //callback event of type "Action<UMAData>"
    8.     }
    9.     void OnCharacterCreated_ExtraStuff(UMAData avatarData)
    10.     {
    11.         GameObject rendererObj = avatarData.GetRenderer(0).gameObject;
    12.         if (rendererObj != null)
    13.         {
    14.             rendererObj.AddComponent<XFur_System>();
    15.             XFur_System xfs = rendererObj.GetComponent<XFur_System>();
    16.             xfs.database = xfdb_to_link;
    17.         }
    18.     }
    19. }
    ...however, there are still some problems:

    2a. Adding XFur_System (and linking the database) at runtime?
    Is there any way to pass the database module before XFur_Start() is called? As is, it encounters the same error you'd expect when running without any DB (i.e., a NullReferenceException pointing to XFur_CreateVertexData() at XFur_System.cs:1430) *even if* I link the DB in the very next line of code. I have a hunch I could get around this by making my own class that inherits from XFur_System and (1) sets enable=false in Awake(), so that the component is effectively added in the "Disabled" state; then (2) has its own RuntimeConfig() function that takes care of the database and any parameters I want to make per-instance, and only *then* sets enable=true and runs XFur_Start(). Before I go down that rabbithole, though, I wanted to get your opinion. :)

    2b. Patching a dymanically-generated mesh?
    I can't say I know (yet) exactly how UMA generates meshes, but XFur clearly considers each individual UMAMesh to be an entirely new model in need of patching, even when I know they're identical. Is there any way to both (1) disable/defer patching and (2) manually provide XFur_System with a previously-patched mesh that I *know* contains the correct data? If not, any tips on how I might go about it in my inherited class, as mentioned above?

    2c. XFur_DatabaseModule delete mesh bug
    This may or may not be related to the fact that each "UMAMesh" is dynamically-generated, but I'm unable to delete the runtime-patched meshes from the database module. In Unity's Project tab, the DB has a couple dozen children -- each a copy of "UMAMesh_XFMSH_PATCHED" generated when my script runs. When I open the DB in the Inspector, though, the only mesh with a "Delete" button is the one I created directly from FBX file, i.e., without using UMA or doing anything at runtime. When I click on the database, I also get four instances each of the following error and warning in the console:

    (the error)
    (the warning)
    Any thoughts or suggestions? Maybe I'll be able to bypass this problem if I get (2b) working...

    Thanks again for creating the tool, and taking time to answer questions like these. :D
     
  39. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928

    Hi there,

    First of all, thank you for your interest and support to this tool. I really appreciate it :)

    It is indeed a long list of questions so I will try to reply to them as best as possible in an equally long answers list! :D

    • XFur 1.5 is coming soon ( around mid-March ) with a great deal of improvements and features that were put on hold due to multiple changes in the internal way XFur works. A base layer that can be toggled on and off was one of those features. It was easier to achieve in the old system but it is being added to the new shaders now that XFur can be considered "stable" in the sense that there won't be any major changes to the internal functionality of the tool in the foreseeable future. This should allow you to use any skin shader you want ( including out own, thank you for considering it!) as the fur itself would render the strands ONLY. There is a series of steps that you can follow to do this but I encourage you to wait for the March update since it will come in around 2 weeks :)
    • I have no idea if anyone has used XFur alongisde UMA. Third party tools such as those usually patch and generate dynamic meshes on the fly just like XFur does, so there is always the risk of conflict and doing an official version of XFur that supports UMA might take away too much time from actual new features as I would need to catch up with UMA to make sure both tools are still compatible, which is why there is no official implementation for this on my side. I will however study the possibility of adding some new features and tools to allow more compatibility with third party tools. Right now, the unofficial method is to use XFur in what is called "Minimal mode". This means to use the XFur shaders ONLY, without the XFur System component. This makes them compatible with anything ( as they become "just" materials ) but also removes any advanced features such as physics, weather, etc. Grooming, wind and other fur data stays available however so depending on what you are doing it might be an option.
    • XFur has been developed as a "Editor-Setup" kind of tool, which means that it is expected to do all the initial setup at edit time ( mostly for performance and time consumption reasons ) and use the results of this setup at runtime. Because of this, the flexibility to add the XFur component and set it up at runtime is at the moment limited. However, since this can be indeed an issue it will be studied to find some potential fixes for v1.5. I will check it this week as well so if I find some potential solution ( or workaround ) and if it is simple enough to add I will contact you through a PM as soon as possible to explain it to you. I hope this helps :)
    • XFur compares meshes based on their unique ID. If UMA is creating meshes at runtime then these meshes, even if they are identical, will have different IDs and thus will be detected as different meshes. There is not a lot to do about this at the moment but for v1.5 I am adding the option of linking the mesh data by name instead of by ID, so that the users can link XFur manually to a mesh in a database which should also solve some issues when moving assets between projects / Unity versions.
    • Thank you for reporting this bug. I believe it might have to do with the UMA meshes being procedurally generated and XFur database expecting actual assets included in the project instead. I will look into it and issue a patch for it ( which might be ready as soon as this weekend )

    In short, my answer comes down to "please wait for the next update, as most of these issues are being considered / fixed", I apologize if this is not as concrete as you may need. Once the new update is available and the new features in place I will be glad to answer any further questions you have if there are still issues trying to adapt XFur to your project, but hopefully they will make the asset flexible enough to create such integrations with little to no issues. XFur 1 to 1.4 have been mostly about performance and features but now with 1.5 I am aiming to tackle down flexibility issues, documentation depth and ease of use so I hope this is helpful.
    Also please feel free to reply here if you have further questions or I misunderstood any of the ones you already posted.
    Again, thank you very much for your purchase and support to this tool, and have a great day!
     
    Genghis42 likes this.
  40. Mark_01

    Mark_01

    Joined:
    Mar 31, 2016
    Posts:
    451
    I also think they are getting close to releasing UMA 3 and I do not know how much will change.
     
    IrrSoft likes this.
  41. Genghis42

    Genghis42

    Joined:
    Feb 14, 2018
    Posts:
    5
    "XFur 1.5 is coming soon" is a pretty great answer to my questions -- I'm stoked! As I mentioned, it took me two months to go from purchase to actual use of the tool, so a couple more weeks are no big deal. I have plenty of other aspects of my project I can work on in the meantime. Thanks!
     
  42. Genghis42

    Genghis42

    Joined:
    Feb 14, 2018
    Posts:
    5
    I'm back already, but this time with just a quick question: Any chance v1.5 will include support for more than 128 bones? UMA uses more than that; I only got it to work by deleting the face sub-rig. Ideally, I'd like to be able to animate facial expressions...

    (And your point about not tweaking it to work with every rando third-party tool is well-taken -- I'm not expecting heroics. Although I may try to pick your brain about workarounds I can code on my own time.)
     
  43. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928
    Hi there,
    XFur supports only supports 128 bones for the physics simulation. You can safely use it with rigs that go beyond that number as long as physics is disabled ( or the physics simulation will only affect the first 128 bones of the rig, whichever those bones might be). UMA is a very complex system which already does heavy modifications to the meshes so it is unlikely that it will be 100% compatible with XFur (which also relies heavily on mesh patching and is oriented more towards traditional 3D art ) unless you create your own inherited components that specifically address the current version of UMA you are using.

    For example, the limit of 128 bones for the physics system is found both in the physics component and in the shaders and, even though it can be raised, it is not advised since this could severely impact performance. Thus this limit is not likely going away any time soon.

    However, and while it probably won't be available yet on 1.5, there are plans for a future update which will allow users to manually define said 128 bones, which may be helpful in your case. If you need to, you may be able to modify the physics component so that instead of auto-detecting those 128 bones it uses a manually provided list.

    I hope this helps!

    In short ( since re-reading it I see it a bit unclear ) :
    The limit of 128 bones is not likely to be modified as it would greatly affect performance
    BUT a future update (though probably not 1.5) will address this issue by allowing you to manually define which 128 bones are tracked by the physics simulation. No need to have dynamics over the facial rig in most cases so in theory those bones could be ignored in favor of the limbs and other bigger areas of the rig.
    More flexibility will be added to XFur to make it easier to integrate with third party tools, though those integrations will most likely be entirely dependent on each user needs and require some coding ability on the part of each user.

    Hope this makes things clearer!


    Edit :
    If you experienced any issues when using xfur without physics on meshes with more than 128 bones, then this will indeed be addressed in 1.5 as I'm adding more relaxed constraints to it :)
     
    Last edited: Feb 28, 2019
    Genghis42 likes this.
  44. Genghis42

    Genghis42

    Joined:
    Feb 14, 2018
    Posts:
    5
    Haha -- I almost asked "is there a way to custom-define which bones XFur uses", but decided I'd rambled enough. Great minds think alike, or something. Thanks again.
     
    IrrSoft likes this.
  45. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928
    A small list of upcoming changes for XFur 1.5 :

    • Performance improvements and selective component de-activation
    • Improved and more stable support for dynamic and runtime changes
    • Better support for modifying / adding XFur at runtime
    • General fixes on the database module
    • Toggleable skin layer
    • Database flexibility. Several automatic-generators and automatic setups will be exposed so they can be disabled or set to manual, allowing for better and easier configuration for advanced users and complex projects.
    This list is tentative and subject to change, but at the moment it is the best roadmap for v1.5 coming around mid-March. Hope it helps!
     
    Genghis42 and gecko like this.
  46. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928
    Here is a small update on the progress made so far to v1.5 :

    • Solved a few bugs and issues with Undo / Redo operations. Only issue that still persists is a harmless warning to the console from the Unity Editor losing references to the dynamic materials between Undo operations. Again, this warning is completely harmless and occurs only in edit mode.
    • Added more safeguards to the material swapping process to avoid issues for users who change the materials by force instead of by using the tool's UI.
    • Added more safeguards to XFur database to handle missing meshes and other internal reference errors.
    • Skin layer can now be disabled in all shaders through a toggle.
    • Leftover code from Unity 5.4 has been removed
    • Performance improvement to the FX module and the FX Collision / FX Volume components resulting in an up to 800% performance boost (65 FPS on a GTX 1060 during continuous intersection in v1.4 vs 550 FPS on v1.5)
    • LOD Module has more influence over other components, dynamically turning off the physics and weather module or reducing their update frequency when far away which translates in another performance boost
    • In progress : Definition of manual links between XFur system and database elements ( p. eg. link an XFur System to a certain item of the database regardless of changes to the original mesh )
    • In early dev, may be available post 1.5 : New functions and workflow to add XFur System dynamically at runtime
    • In early dev, may be available post 1.5 : Manual definition of bones for the physics system
    • In early dev, may be available post 1.5 : New features for the coating module, including dynamic fur pattern generation through randomized mixing of input textures
    • In progress, no ETA yet : Tutorial series ( text and images ) on Itch.IO
    • In progress, no ETA yet : Mini tutorials ( < 5 minute videos ) for Youtube
     
    gecko likes this.
  47. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928
    Second update :

    It is now entirely possible to add XFur to a dynamically generated mesh at runtime and set it up entirely through code. For better performance, a patched version of said procedural mesh can be stored in a database while developing the game / app and just access it by index at runtime on the final build, preventing the player from experiencing the waiting time while the meshes are patched.

    This explicit "by Index" connection to a mesh in the database can be used to override the automatic mesh generation of XFur, thus giving more control over the process. A simple demo scene that generates a dynamic clone of a mesh, assigns Xfur and sets it up at runtime from scratch will be provided with v 1.5
     
    Genghis42 likes this.
  48. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928
    Last update before sending v1.5 for approval :

    • Full shadows mode is in BETA now since we are using a new model to handle shadow layers. Full shadows mode is the setup in which the fur strands generate and receive full shadowing in Forward mode. Since this method is not widely used, we don't expect it to impact your projects too much. The new algorithm allows, among other things, much faster generation of shadow geometry and dynamic amount of fur samples ( in this first beta, from 6 to 32 ). The performance impact is slightly higher than before for low polygon models but it is kept the same for meshes with around 6.5k tris.
    • Heavy rewriting of internal cycles and processes has been done, generating a performance improvement across the board which ranges between 20% and 200% faster depending on the project / mesh / settings you are using.

    upload_2019-3-11_13-29-38.png

    upload_2019-3-11_13-30-4.png


    upload_2019-3-11_13-30-58.png

    upload_2019-3-11_13-31-51.png


    Again, Full Shadows Mode is in BETA and, as it has always been the case, it is NOT intended for scenes that require high performance or which will use multiple instances. It is intended for close-ups on a couple of high quality models (in, for example, a cutscene ) or for a few main characters in otherwise heavy loaded scenes.

    If you need to use multiple creatures covered in fur or multiple highly detailed models then use the Standard Shadows mode instead.
     
    gecko likes this.
  49. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,024
    The snow FX are fantastic, but if there's much wind, the snow appears only one one side of the character, which looks very weird -- snow only on the left half of the body, or the right. It should always appear on the top, and then more one one side or another based on wind direction. Is that something I can tweak?
     
  50. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    928
    This behavior is right now the default since the snow direction can be modified by the wind strength ( to simulate blizzards ). In an upcoming patch this will be separated to allow for more customization over this effect. However, at this point, this can be easily changed or disabled entirely by changing line 39 of the WeatherSystem script :

    Code (CSharp):
    1. snowDirection = Vector3.Lerp(Vector3.down, windDir, windIntensity/2 );
    into whatever direction you need the snow to follow or, alternatively, by removing this line of code and setting it up dynamically from any other script directly by accessing the static variable XFur_WeatherSystem.snowDirection.

    I hope this helps ! :)