Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

YL2 - Soft bodies part 2

odesodes Administrator
Hi all!

Last month, we showed off experimental work on a custom soft body physics engine. While the results were interesting and fun, we couldn't find a way to make this tech work for our specific purposes. Having poured so much effort and energy into the pursuit of achieving soft bodies in YL2, we didn't want to give up just yet. This month have been exploring other ways to implement soft bodies. We are happy to say we now have a feasible method.

Previous tech addendum

Before we jump into our new method, we want to share some research we made regarding the other one.

In our previous post, we mentioned the challenge of combining soft body physics with animated characters. After doing some more experimentation, we have discovered a method that works to mitigate undesirable behaviour on a skinned soft body character.

Here's an example showing the difference.

Old method:

https://gyazo.com/fb62507bdc08732a9adc810c116ae779


New method:

https://gyazo.com/807fbedfeba313025c51a7a64571f28c

The way this mitigation tech works is by disregarding any movement and rotation that occurred outside of the simulation, which does make it much more stable. Unfortunately, this also means swinging motion that you'd expect from said movement is also lost:

(Despite moving the character around, the belly and tits don't swing in the way you'd expect.)

https://gyazo.com/bcd3773226fb32ef6b94e35112a43c49

It seems that when you solve one thing, another thing is taken away.

With the mitigation tech shown above, we'd essentially limit the soft body tech to only interact with colliders. Swinging motion for belly, asses and tits would have to be implemented elsewhere. Perhaps this tech could be combined with regular jiggle bones. However, even if that's the case (and that would also require much more experimentation), there are many other challenges, especially in the performance and stability areas. While we are happy we invested time into exploring this tech, we feel more confidence in taking another approach for now.

New tech

Our new tech isn't really new. Rather, it is an expansion on our "fake" method described in our previous post. I.e., rather than actually simulating soft bodies, we "fake" the deformation using a simple algorithm and shader tricks. While the method is completely bogus from a scientific point of view, the results are quite appealing and the benefits to our previous method are many. For starters, this technique works completely independently of frames and animation. I.e., it is stateless and simply acts more as a post processing step on skinned vertex buffers. This makes its behaviour very predictable and comparatively stable. Furthermore, what would take several hundreds of gpu compute invocations to achieve in our older method, can be achieved using just single digit invocations in our new one. This makes it much more performant, as in an order of magnitude. With our previous method, we feared we'd have to limit characters to 2 per scene, but with our new one, we can have a full 8 characters and still render at plus 500 frames on modern systems.

While we do think "real" soft bodies is the future, perhaps this "fake" method can act as a migratory step towards it. Then, in the future when hardware is more powerful, soft bodies will become more feasible to do in realtime in scenarios such as ours. Hopefully, 3rd party libraries will have evolved more by then too. Because while we do love getting our hands dirty exploring these technologies ourselves, it's inevitable that any soft body engine we'd make would eventually never be able to keep up with the thousands of not millions of man hours put into 3rd party libraries. So maybe a simpler library that's more performant and easier to maintain (new tech) is the way to go for now?

Adapting this new technology from working solely on simple objects to working on fully rigged characters has been a huge challenge. While the idea behind the tech is at its core the same, everything around it has been completely re-imagined and reworked beyond recognition to its original implementation. We use many more steps and advanced techniques to achieve the results below. It is with great pleasure we are sharing them with you!

Results

PLEASE NOTE!

In all examples below, characters are missing drivers for chest. This means the tech that handles this issue is not active. We are happy to say that our soft body tech works regardless of what deformation stack has been applied before it, so it will be compatible with drivers. We simply haven't gotten to implementing them into YL2 yet. Keep that in mind when looking at the images below. Drivers will be implemented eventually.

We will go through each example here in the same order as we implemented them.

We started with simple spheres, as that is the most simple form of collision. As with our previous method, we use a mirroring script to apply the collision on both sides simultaneously.

(Applying sphere collision on both sides of the ass.)

https://gyazo.com/8132df7d0121df0ab8286bc8a1967bce


(Another view while applying sphere collision on ass.)

https://gyazo.com/549e751a524400a4cc02e69a7109a56b


(And a third view, applying the same collision.)

https://gyazo.com/1584becd6a28b7909dfcf462c8c1b8c4


Next up was collision against planes.

(Plane collision against ass.)

https://gyazo.com/24b6018abb30844e1b10bb38d3c66e8f


(Another view.)

https://gyazo.com/da3ae929c6ac1508e29305de6e392f4a


This tech was designed with inflation in mind from scratch, so of course it works with that too. From the techs point of view, it makes no difference what deformation stack has been applied before this effect. It solely acts as a post processing filter on the vertex buffers.

(Belly inflation being applied while obstacle is in the way.)

https://gyazo.com/7b68db410112c88fe3b1b7de165dd268


(Moving collider to influence belly and tits.)

https://gyazo.com/91deed9f70ea167ffbc2accb3f668ad3


(Inflating titties while obstacle is in the way.)

https://gyazo.com/c8903ac9e7f0c230dadebc757d592a52


You might have noticed that the belly was slightly affected as the titties were inflated. Let's have a closer look at that without any obstacles.

(Inflated parts react to eachother.)

https://gyazo.com/9e84f893b7477be409be413bd72a0c63


(Jiggling boobs affect belly.)

https://gyazo.com/ad62c40c568446c570b89f9c557061ed


(Strongly jiggling boobs against eachother in slow motion. Belly is affected as well.)

https://gyazo.com/4e3f9e07e51e4bf50b5bf50cfab7fe4c


(Older iteration but thought I'd include anyway. Jiggling boobs against eachother in slow motion. Note that all this is just jiggle bones, and soft bodies are applied as a post processing step to skinning.)

https://gyazo.com/2fe66671a01c90f92aae1b6e09a9f663


(For comparison - here's what the deformation would look like using solely skinning (no soft bodies)).

https://gyazo.com/354e35a4839cc87e0d2d6acfb4cfa3f8


(For comparison - here's what it would look like using rigid body collision instead of soft bodies.)

https://gyazo.com/bd4597aac7c6467b49413d1cf4f2d862


This tech works on soft bodies intersecting with eachother too. It was challenging, but we made it.

(Inflated bellies of two separate bodies reacting to eachother.)

https://gyazo.com/30cf00e82e8417fdd4cf67ac9fae2e73


(Inflating boobs of two separate bodies reacting to eachother.)

https://gyazo.com/73f4197b93c36b79a5c86adccdbef455


(Moving 1 body to examine soft body vs soft body collision response.)

https://gyazo.com/b0ff1e66e691152d80362b2597140b53


Note that all of this is completely fake. Since the algorithm has no concept of intersecting surfaces, we had to fake friction between them.

Of course this tech works between asses being pressed against eachother as well.

(Asses being pressed together.)

https://gyazo.com/3b3a3f2e3ed11859cd3f73f2f9b3459a


(Examining ass collision response from different angles.)

https://gyazo.com/525bf775e9bad6fa9716627145b2d324


(Ass collision response from side.)

https://gyazo.com/507ba47ab680daab553a8f917955d5f6


(Ass collision from side when facing the same direction.)

https://gyazo.com/282ec07a88d5541ae4d9117fd0d11f6f

None of these results are necessarily perfect, but given the flexibility and performance of the tech, I'd say we're pretty happy with it!

Limitations

Right now, this tech only works on spherical shapes. By that I don't necessarily mean we use proxies, but rather that the actual algorithm itself operates on a reference point in space and on a radius. These points and radii can of course be fed into the algorithm using "live" data rather than proxies, but acquiring this live data is only performant to do on spherical shapes. For tits and bellies this isn't a huge issue, as they can be considered spheres. Neither is it a problem for asses. However, the thighs are problematic, because they're elongated shapes. We did try to come up with tech to handle this in a performant fashion, but so far have been unsuccessful in achieving something satisfactory. The solutions we managed to produce would indeed make the thighs deform in desired ways, but at the cost of making the ass deformation look worse. While we think thighs are important, we think asses are even more important, so for now we have prioritized asses over thighs. There is currently no deformation on thighs other than the ass affecting thigh when being deformed. This isn't necessarily a big problem as long as authors are aware of it and can work around this limitation when setting up interactions.

Also, again - this tech is solely a post processing filter on the vertex buffers. It doesn't affect environment, and it isn't physically realistic. It only works on environment -> soft body, or soft body -> soft body.

What's next

I must admit I feel a little bit guilty, having spent these two months doing something else than working on the character creator.  After the crunch, I just felt I needed some time off and do something different for a while. We all have our indulgences, and exploring new technology is mine.

When we missed the 2018 mark for a release of YL2, it actually took me harder than I've been letting on. I felt quite depressed and disappointed in myself. I think working on these soft body technologies has been a way for me to cope, just to get my mind off things and do something different.

When looking back at all the effort we've put into YL2, I realize now that this missed mark doesn't have so much to do with lack of work or engagement, but more about just having misjudged the amount of work required to get where we want. That isn't necessarily a bad thing - it just means we are ambitious... and suck at predicting dates LOL.

With all this tech explored and implemented, I finally feel ready to start working on the character editor again. While this little journey may have delayed the character editor a bit, I don't regret for a moment having invested this time into it. With this tech in our bag, it feels like we have something truly amazing that will greatly set us apart from other projects.

Let's wrap this up and get a release out there!

Summary

After much hard work and experimentation, we believe we finally have a feasible method for doing soft bodies in YL2. The tech is hardly perfect, but it is very performant and flexible, and the results are fun and appealing - much more so than not having the tech!

After having taken this journey of exploring soft bodies, we feel ready to work on the character editor again.

Comments

  • edited May 2019
    Can't wait for this to release!!!
    Just a thought, regarding other body parts. What about using Torous (donut shape) shapes to determine collisions? It's a fairly simple shape, that does not require many spatial points to compute.
  • Glad to see you're making progress, though it's always a bummer when having to compromise because of technological limitations. The result looks very promising though, even if I still hope that thigh deformation will be somehow implemented.
    Two things I am wondering: Will one be able to define the softness/firmness of the soft body areas? And any preview/tests of how hands holding a butt would look like (e.g. does every finger of a spread hand make its own "groove" on a luscious booty, that'd be awesome)?

    As always, good work, keep it up!
  • I wish we could see this tech in a manly/muscular body and how it reacts to. I imagine that will not work as fine as in fat bodies but arouses my curiosity
  • Great work, btw
  • Wow, that is some great work!
  • OHHH, finally you guys are gonna work for the creator. That took a while.

    Maaaan, hope things goes well. Im sick of YL1 as of now. Ive felt like i reached YL1's peak.

    Hope it wont take too long for a release at least
  • odesodes Administrator
    What about using Torous (donut shape) shapes to determine collisions?
    Not sure how a torus would help. Spheres and ellipsoids seem more fitting in describing a character.

    Two things I am wondering: Will one be able to define the softness/firmness of the soft body areas?
    Currently no.
    And any preview/tests of how hands holding a butt would look like (e.g. does every finger of a spread hand make its own "groove" on a luscious booty, that'd be awesome)?
    When viewing tech like this, only assume what we're showing is what it can do. If it was able to groove in the manner you describe, we would have shown it.

    Grooving is a very tough problem. I don't think we'll be able to do that for many years still. However, hands pressing the butt together as shown in the first soft body picture is something we want to make possible to achieve in the interaction system.

    I wish we could see this tech in a manly/muscular body and how it reacts to. I imagine that will not work as fine as in fat bodies but arouses my curiosity
    For now, only the areas shown in the pictures are the ones using soft body tech. I.e., belly, breasts and ass. Muscles may be added at some point. At the moment, no test for muscles exist. Other things have priority atm, but it is definitely something we are interested in investigating, when time allows it.

    --

    Thanks for the praise and kind words. :)
  • edited May 2019
    Impressive work, all those things that were lacking in YF will now become real))
    But i have offtop question:
    ILLUSION studio (authors those project like Honey Select, Koikatu! and etc.) use 3D liquid simulation for semen, is it worth expecting something like that? (They also work with Unity)
  • Mmm, liking the possibilities, like balls slapping together during male on male lovin.
  • As the biggest fan of Charlotte, I love what you’ve done with her, especially the collisions against planes. Super hard to recreate a sexy “ass on glass” shot when her tushy doesn’t collide with glass!
  • hi! again) what what u use man soft body physics engine?
    is it someone’s development or did you do it completely from scratch?
  • odesodes Administrator
    @immeasurability
    We did it completely from scratch.
  • real good work!
  • Will the arms of the characters affect the breasts? Or will they still clip into one another?
  • odesodes Administrator
    @DrunkDragon
    It's not currently implemented, but we should be able to make the arms affect the breasts eventually.

    Note that the soft body system wont arrive until interaction systems are implemented. So the character editor will not ship with it.
  • @odes That sounds awesome :) It is one of the things that really annoys me with YL1. God's speed to you all!
  • @odes

    Just accidentally stumbling on this post of yours and i gotta say damn, technically this looks rather really well done.

    Im exploring soft bodies in blender and what i can do (god its slow and tedious and no GPU acceleration) and looking at the work you did its quite stunning whats possible.

    If i may ask, would it be possible to write a Addon for blender that behaves like the soft bodies you did in this post, cpu+gpu soft body ?
  • odesodes Administrator
    @Dragosh
    This solution could be implemented in Blender (or any other engine). It's just math. It doesn't matter what language or tools you use. However, I don't think using it in Blender would make much sense. The whole point of this method is its speed and real time application. For Blender and other 3D authoring apps, you can use technologies that offer far better results while still being far faster than Blender's default soft body implementation.

    I'm not sure why, but soft bodies in Blender haven't received any love for ages. Their implementation is ancient and outdated. It's bound to happen that someone implements a new soft body dynamics system in Blender using XPBD or other modern algorithms.
  • edited November 2019
    @odes sadly i'm not a developer/programmer so im not qualified to even try implementing any method to make a new soft body addon.

    Seeing as blender 2.8x versions are getting more updates etc. (and more capability like the grease pencil) i guess at some point there's going to be a update on the default soft body simulation.

    Sadly as of right now i cant find any soft body simulation addons for blender (dunno if there are any at all in the industry that wont cost a arm and a leg to buy)

    I've only seen a "Modeling Cloth" addon that tries to do almost everything that Marvelous designer does, and its free/35$ donation which is great and im really thankful to these people who do these addons.

    One last thing i would like to ask, what's your thought about the idea of making a Blender addon and selling it on the blender market ?
  • odesodes Administrator
    I don't have the time or the will for that unfortunately. I want to spend all my creative time and energy on YL2. If I don't owe it to myself, then I definitely owe it to the patrons. Starting work on an addon for Blender to make money while YL2 release has been pushed back so many times already is a recipe for disaster.
  • edited November 2019
    @odes ;
    Thank you for your time and opinion :blush:
    I look forward to your finished YL2 work, ill be sure to follow your posts :smile:
Sign In or Register to comment.