Jump to content

Hi There

Welcome to Klub Exile. If you happened to make your way to the site either from Lovers Lab or a Search on Google, we are glad you found us.  To unlock the entire site you will need to have a account registered.  Don't worry it is free but in the mean time you can read up on why we made the site and other little tidbits.  Feel free to join or Discord Server also if you have any more questions.  Thanks for stopping by and See You on the other side.

admin admin

Hairworks collisions and limitations


pervokpetr

Recommended Posts

Original Post: August 11, 2017

I found solution for collisions, it almost similar to body collision markers, but have some difference. Collisions not perfect and has a lot of limitations. I'll explaint it a bit later (too tired right now, need some sleep)

video with collisions:


 

Difference between Physx and Hairworks
Physx use some scene layer and all collision objects that placed into this physx scene will interact with each other. Physx has opportunity dynamically insert/remove collision objects into scene, it also allow use several shapes for collision objects - box, capsule, sphere, hemisphere, convex. The collision objects mostly independed from each other, but can be stiched together with special objects - "joint", it also has several types. All of this gives wide control on collison usage. Hairworks has no such layer like scene, it works with assets - asset is a closed set of objects based on sceleton hierarchy with assigned growthmesh, hairgudes and collision objects joined to particular sceleton bone. Hairworks have not opportunity to insert or remove collison object not related to bones. Hairworks allow use only sphere shape for collision object and additional shape can be created with connecting two spheres. Hairworks calculate collisions only between objects in asset and do not take into account another asset (looks so, but I'm not sure for 100%). So, with all above I assume:

Collision will not be perfect #1
High probability that hairworks will ignore collision objects from other character and there is no opportunity create collision objects for static objects in room

Collision will not be perfect #2
Vertices of character mesh assigned to bones with different wegths (skinning), but collision objects joined to bones with 100% weight, when some bone will be rotated some vertices of mesh will be rotated only with weight amount (0...1), but collision shape will be rotated on full amount, so there is always will be some mismatch between body surface and collision object. The same thing for scaling - huge bodyparts size adjustments will create difference between bodymesh and collision objects

Collision will not be perfect #3
Hairworks calculate collisions only for hairgudeis and not for hair that generated between sibling hairgudes, so sometimes, when sibling hairgudes will flow around different sides of collision objects some hairstrands will be generated through the collision object.

Hairworks performance will depend from amount of collision objects, theoretically it should calculate:
itterations_count = hairgudes_count * controlpoints_count * collisionobjects_count

Further
For now I have enough info for first attempt of implementation hairworks, some of experimental code should be cleanup, some should be rewrited, also some code of hook related to render need to redone to optimize setups and make it identical to hairworks render setups. I HOPE that I will make new update not longer than next weekend, at least I will try it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

WARNING! Adult Only Content You must be 18 years of age or older to enter. By accepting you agree to Klub Exile's Terms of Use and Guidelines upon creating an account.