Giter Club home page Giter Club logo

Comments (3)

fuglsang avatar fuglsang commented on September 26, 2024

Thank you for the report!

For now the limitation set rather conservatively. When boundaries are not specified specifically, this really acts as an active limit, since boundaries by default are being collected within the hair volume per-frame. I have a small TODO to also prioritize the active boundaries by distance, which unfortunately didn't make it into the initial release.

Pending other more pressing issues, we can take a look at lifting the limitation later. From my perspective, there are some important things to consider in this regard:

  • No performance regressions allowed: Increasing the size of the primitive buffer should not negatively impact performance when using only a small amount of primitives.
  • It may be interesting to also consider an option of combining a high number of input primitives to discrete SDF + surface velocity volume, at the cost of surface precision during collision resolve.

from com.unity.demoteam.hair.

methusalah avatar methusalah commented on September 26, 2024

As far as I can tell, the only way you can specify boundaries is in the "Boundaries Priority" list. These boundaries are also affected by the limit of 8 colliders, despite the tooltip stating "Always included boundaries". If I have more than 1 SDF + 7 spheres in this list, some of them will be discarded. I tested it with "Boundaries Collect" on and off with the same result.

Is it the intended result? Is there another way to specify boundaries and have more than 8 of them at the same time?

As a side note, the order of the boundaries in the list does not seem to imply which ones will be discarded. I was expecting the lower elements to be discarded in priority, given the name of the list (but it may be just me ^^).

About the limit itself, I would argue that the game designer is responsible for the number of colliders present in the hair volume simultaneously. Any physics system is expected to be lower and lower the more colliders are involved (or the most complex the colliders' shapes are).

In HairStudio, a trigger sphere collider is spawned around the hair volume and colliders are collected by the physics engine, using the collision matrix only. The game designer only set a layer of the hair to manage collisions. The collider buffer is set to a bigger size every time the maximum number of colliders increases (and is never shrunk). The cost of the primitives is linear (and almost the same for spheres, boxes and capsules), so the game designer can easily predict the performance of the simulation by just checking the maximum number of colliders that are collected in various situations.

In my video game using HairStudio, I often have 300 spheres and it never took more than 15% of the overall simulation time (GPU side). I must add that I don't manage complex friction, bouncing and other, so it may not be comparable.

from com.unity.demoteam.hair.

fuglsang avatar fuglsang commented on September 26, 2024

As far as I can tell, the only way you can specify boundaries is in the "Boundaries Priority" list. These boundaries are also affected by the limit of 8 colliders, despite the tooltip stating "Always included boundaries". If I have more than 1 SDF + 7 spheres in this list, some of them will be discarded. I tested it with "Boundaries Collect" on and off with the same result.

Is it the intended result? Is there another way to specify boundaries and have more than 8 of them at the same time?

Correct. Currently there is no way to have more than 8 active boundaries.

There is a related known issue, however, with boundaries in the priority list not actually taking priority over boundaries automatically gathered via overlap query.

from com.unity.demoteam.hair.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.