Jump to content

Real-Time Body Physics (DirectX 11)


Recommended Posts

Posted
11 hours ago, alexlll said:

Could you please add settings "testAltBreastPhysics", "testAngularPhysics", "testAltButtPhysics" to Settings.ini ?

 I don’t want to launch the RTBP commander every time after starting the game.

 

Sure thing.

Posted
On 2/25/2024 at 6:08 AM, sims4fanfanfan said:


I’ve been having some issues with certain EVE clothes too, so I’m looking forward to seeing the update in the future :) 

I agree with this statement. Clothing (mesh) physics compatibility seems to come and go with every release. Right now I'm using a December 2023 release because the latest disables physics simulation on some of the main tops that I use. This means I sacrifice gshade but I've been living without it for a while now anyway.

Posted (edited)

Another experimental preview release. If you're up for it, give this a shot and let me know what you think.

 

RTBP v0.4-p7-e2 2024-02-28.zip

 

On 2/26/2024 at 5:03 AM, alexlll said:

Could you please add settings "testAltBreastPhysics", "testAngularPhysics", "testAltButtPhysics" to Settings.ini ?

 I don’t want to launch the RTBP commander every time after starting the game.

 

I had to find a new INI file parsing library that was more advanced than the one I was using, but now this is implemented. You can now add a section to your Settings.ini file, "rtbp.debugFlags". Just set the debug flags you want modified at launch and they'll be set at the start. For example, mine looks like this:

 

[rtbp.debugFlags]
testAltBreastPhysics4 = true
testAltButtPhysics2 = true

 

The alternate breast physics modes have been altered slightly. I was using these to test what method I preferred. I'll describe what each one of them is actually supposed to do. Some of them utilize a "head" and a "tail". These are reference points in world space that I thought the physics should revolve around. The "tail" is roughly the tip of the breast and the "head" is the primary location where the breast is attached. I just eyeballed these locations. A pair of these points exists for each breast:

 

* testAltBreastPhysics1: The raw translation of the breast matrix is used as the simulator target. This one is pretty crazy.

 

* testAltBreastPhysics2: The tail is made relative to the position of the spine 2 bone by subtracting the spine 2 position from the tail. The result of this should be the tail in local space relative to spine 2. This is before any animation transformations have been done. The result is transformed into the space of the spine 2 matrix extracted from the Sims 4 and the result of this is the target.

 

* testAltBreastPhysics3: The raw translation of the spine 2 matrix is used as the simulator target.

 

* testAltBreastPhysics4: Like testAltBreastPhysics2, but the tail is made relative to the breast and the result is transformed into breast space.

 

* testAltBreastPhysics5: Like testAltBreastPhysics2, but the tail is made relative to the head reference point. The result is transformed into breast space.

 

* Default: Like testAltBreastPhysics2, but the tail is made relative to the head and the result is transformed into spine 2 space.

 

The simulation produces a transformation offset relative to the input target that is added to the breast matrices before rendering.

 

Note that in the Sims 4 rig, the spine 1 bone is actually the parent bone to the breast bones, but is actually lower on the body than the breasts. It seems like the spine 2 is a much more reasonable bone to use for physics calculations. Here's a screenshot from Blender:

 

RTBPBreastPhysics.png.f10e4c028c9f34441d1e5e2a5abb8c30.png

 

On 2/25/2024 at 5:08 AM, sims4fanfanfan said:


I’ve been having some issues with certain EVE clothes too, so I’m looking forward to seeing the update in the future :) 

 

On 2/27/2024 at 1:51 PM, fanbongo said:

I agree with this statement. Clothing (mesh) physics compatibility seems to come and go with every release. Right now I'm using a December 2023 release because the latest disables physics simulation on some of the main tops that I use. This means I sacrifice gshade but I've been living without it for a while now anyway.

 

I might have made the breast simulator a little too strict in regards to positive matches. The equal bone weights requirement has been removed and it seems like more stuff is working now.

Edited by CPVC
Posted

Settings "testAltButtPhysics" and "testAltBreastPhysics" saved and applied well, but flag "disableAngularPhysics" saved but not applied. I have to turn on the RTBP commander again and turn on the angularphysics there.

I added all the settings manually, because the command to save current settings does not always work.

Posted
17 hours ago, alexlll said:

Settings "testAltButtPhysics" and "testAltBreastPhysics" saved and applied well, but flag "disableAngularPhysics" saved but not applied. I have to turn on the RTBP commander again and turn on the angularphysics there.

I added all the settings manually, because the command to save current settings does not always work.

 

Oh, I see what's happening here. Angular physics is disabled by default because it's still super experimental. When RTBP starts it sets the flag to "false" after the settings are loaded, thereby overwriting the user's settings.

 

I've fixed this by changing "disableAngularPhysics" to "enableAngularPhysics" and inverted its meaning, changing it from opt-out to opt-in. So, now angular physics is disabled by default without having to set a flag. You can now choose to opt-in with a flag and RTBP won't override your settings.

 

Just add "enableAngularPhysics" to "true" in your settings file.

 

Here's the fixed DLL:
 

RTBP v0.4-p7-e2 2024-02-29.zip

Posted

Apparently uninstalling RTBP with the latest installer version will nuke your entire Sims 4 folder in My Documents, including mods, saves, screenshots, everything that's in there. You'll probably want to either tell people not to do that, or take down the latest version and replace it with an older one. Fortunately I keep backups of my stuff, but I thought I should let you know so that somebody without backups doesn't lose all their stuff to that.

Posted
6 hours ago, TheAsdNoob said:

Apparently uninstalling RTBP with the latest installer version will nuke your entire Sims 4 folder in My Documents, including mods, saves, screenshots, everything that's in there. You'll probably want to either tell people not to do that, or take down the latest version and replace it with an older one. Fortunately I keep backups of my stuff, but I thought I should let you know so that somebody without backups doesn't lose all their stuff to that.

 

Damn, I must have packaged that release of the GUI Tools with the older build of the Installer. This should be fixed now. Very sorry about that. Thanks for bringing this to my attention.

Posted
On 2/7/2024 at 5:37 PM, HerbHoover said:

Feedback:

 

So I tested the newest version (RTBP v0.4-p7-e1 2024-02-06).  Here's what I noticed.

 

4) I tested CC: Noir's HQ EA Body Meshes for Females [2023-11-27], which is one of the best high polygon very smooth female top nude meshes (very good breast mesh mod), and it no longer has breast physics.  It used to with pre-p7 version.  This is very unfortunate, though maybe it's unavoidable due to other higher priority improvements that were implemented (I don't know - you might?).  I also tested some other CC clothing meshes.  Some used to have glitchy clothing parts that moved very oddly with RTBP v0.4-p6, but now look good with RTBP v0.4-p7-e1.  Some other ones (unfortunately possibly including my favorite sexy CC top) now don't have breast physics (used to with RTBP v0.4-p6).

 

 

I previously gave feedback about this ^.  I wanted to let you know that I just tried out "RTBP v0.4-p7-e2 2024-02-29" and Noir's HQ EA Body Meshes for Females [2023-11-27] female top mesh and the other CC clothing that lost their breast physics with the previous version have their breast physics back again.  I am not talking about the Maxis clothes that I had mentioned before.  I am talking about the CC clothing - nice.

Posted
4 hours ago, chelzmcnamara said:

is g shade compatibility with RTBP still work in progress?

 

Nope. According to multiple reports, ReShade and GShade are working again. Just put your GShade DLL in the bin directory, i.e. "...\The Sims 4\Game\Bin\". Name it "GShade64.dll" or "reshade.dll". Doesn't really matter. RTBP should pick up on it and load it when starting.

Posted (edited)

When you say settings file, the hell is that? The Commander?

 

The newest dll you gave doesn't work when I click "Enable Angular whatever" in the debug flag section of the commander and also choose "Test Alt Butt 2"

 

Edit nvm - Found it in Documents > Electronics arts folder

Edited by wewfap04
Posted (edited)
22 hours ago, wewfap04 said:

When you say settings file, the hell is that? The Commander?

 

The newest dll you gave doesn't work when I click "Enable Angular whatever" in the debug flag section of the commander and also choose "Test Alt Butt 2"

 

Edit nvm - Found it in Documents > Electronics arts folder

 

The newest zip archive file he posted is just an update (one .dll file), not the whole thing (a bunch of files).  You need to get the zip archive file he posted just prior to that and install that first, then install the newest one on top of that.  He didn't mention that, but that's what your issue is.  The newest one he posted is not the whole mod, just an update of only one file in it...

 

And also, Commander is, from what I recall, in a separate download.  But you don't need Commander to make changes to the settings.ini file if you quit out of the game and edit the settings file yourself.  You might only need Commander if you want to make changes to the settings real-time while the game is already loaded - that's nice when you want to see quick changes and fine-tune tweak settings.

Edited by HerbHoover
more detailed response
Posted

Hello.

 

I might be doing something wrong, but would it be possible to make this compatible with a non-default Mods folder location?

In order to save room I used this process to move my Mods folder into my second SSD and allow it to be detected by the game.

I was able to run the game and my mods are detected, but once I installed RTBP through the GUI installer or manually, the game immediately closes to EA Desktop when I try to run it.

I'm thinking the culprit is that the 'linked' folder isn't compatible with it, unless I did something wrong.

I'm wondering if there's a possible workaround I could do while maintaining the new folder location of my mods folder?

 

Thank you,

Marie

Posted
1 hour ago, DaBorglarsDreeb said:

Hello.

 

I might be doing something wrong, but would it be possible to make this compatible with a non-default Mods folder location?

In order to save room I used this process to move my Mods folder into my second SSD and allow it to be detected by the game.

I was able to run the game and my mods are detected, but once I installed RTBP through the GUI installer or manually, the game immediately closes to EA Desktop when I try to run it.

I'm thinking the culprit is that the 'linked' folder isn't compatible with it, unless I did something wrong.

I'm wondering if there's a possible workaround I could do while maintaining the new folder location of my mods folder?

 

Thank you,

Marie

 

If your game is crashing, it's most likely a problem with RTBP. The part of RTBP that goes in your Mods folder shouldn't cause any problems. It's basically optional, really. The fact that your Mods folder is stored on another drive and symbolically liked to your Sims 4 documents folder shouldn't be an issue. Symbolic linking is very common in the Unix world. I use it all the time for stuff like this and it works seamlessly.

 

The main culprit is likely the RTBP d3d9.dll file. Do you get an error message before it quits? Is there anything in your log file?

Posted
6 hours ago, CPVC said:

 

If your game is crashing, it's most likely a problem with RTBP. The part of RTBP that goes in your Mods folder shouldn't cause any problems. It's basically optional, really. The fact that your Mods folder is stored on another drive and symbolically liked to your Sims 4 documents folder shouldn't be an issue. Symbolic linking is very common in the Unix world. I use it all the time for stuff like this and it works seamlessly.

 

The main culprit is likely the RTBP d3d9.dll file. Do you get an error message before it quits? Is there anything in your log file?

 

Ok. I figured out what was wrong.

I had EADesktop.exe set for compatibility mode for WIndows 8.

I had annoying issues with trying to install Sims 3 expansion packs, and this method was the only one left that worked.
I forgot to switch it it back.
Everything is working fine now!

 

Thank you for your time.

 

Posted

image.png.2ea6f3afdb0e5525b3a27a9f2598ae14.png

hello! I saw someone posted a screenshot of an error like this before which I got the same one they did 2 days ago. but today, I got this as I was placing a 50x50 lot in build mode, not in live mode. then it freezes and immediately crashes afterwards. I've upgraded to the v.0.4-p7-e2. I also installed a new windows 10 update 02/29 update-kb5034843 if that helps.  please let me know what's going on 

Log.txt

Posted (edited)
On 3/6/2024 at 5:29 PM, yokozii said:

image.png.2ea6f3afdb0e5525b3a27a9f2598ae14.png

hello! I saw someone posted a screenshot of an error like this before which I got the same one they did 2 days ago. but today, I got this as I was placing a 50x50 lot in build mode, not in live mode. then it freezes and immediately crashes afterwards. I've upgraded to the v.0.4-p7-e2. I also installed a new windows 10 update 02/29 update-kb5034843 if that helps.  please let me know what's going on 

Log.txt 76.21 kB · 0 downloads

 

Uh, oh. I could be wrong, but I think this might be originating from the Sims 4 itself. The only RTBP related functions I see in this stack trace are the ones that catch the error and print the trace. The function that seems to be throwing this exception appears to be "PyInit_Tuning", which is related to the Sims 4's simulation service which uses the Python programming language, hence the "Py" prefix to the function name.

 

I'd suggest trying this again without RTBP installed. If the game crashes, Maxis is to blame. Wait for an update. I've heard that the last update broke a lot of stuff. I know I've been having problems with script mods. If not, attached to this post is a build of RTBP with unhandled exception handling disabled. Maybe Maxis has their own way of handling unhandled exceptions and my way is interfering with it. This might work for you.

 

Edit: Removed attachment. This build should not be used.

 

Edited by CPVC
Removed attachment.
Posted (edited)
13 hours ago, CPVC said:

 

Uh, oh. I could be wrong, but I think this might be originating from the Sims 4 itself. The only RTBP related functions I see in this stack trace are the ones that catch the error and print the trace. The function that seems to be throwing this exception appears to be "PyInit_Tuning", which is related to the Sims 4's simulation service which uses the Python programming language, hence the "Py" prefix to the function name.

 

I'd suggest trying this again without RTBP installed. If the game crashes, Maxis is to blame. Wait for an update. I've heard that the last update broke a lot of stuff. I know I've been having problems with script mods. If not, attached to this post is a build of RTBP with unhandled exception handling disabled. Maybe Maxis has their own way of handling unhandled exceptions and my way is interfering with it. This might work for you.

RTBP v0.4-p7-eX (Unhandled Exception Handler Disabled) 2024-04-06.zip 5.54 MB · 0 downloads

oh okay that makes sense. and TBH I talked with some people when trouble shooting why my pc's fans start running hard & overheating from needing so much memory with sims open on a windows 10 forum , thinking I needed to upgrade to windows 11 and they even said that alot of unreal engine games are requiring more POWER with each update and patch , which includes sims 4 ..and it's causing me to kick into UEFI and i think I tried to update my BIOS and it didn't help anything. I agree this more than likely a Maxis issue. (besides Chrome wanting to yank up the RAM and CPU also)

but thank you for this fix ! I'll give it a try and report back on my findings.

 

edit: do you think this conflicts with better exceptions script mod? 

Edited by yokozii
Posted
6 hours ago, yokozii said:

oh okay that makes sense. and TBH I talked with some people when trouble shooting why my pc's fans start running hard & overheating from needing so much memory with sims open on a windows 10 forum , thinking I needed to upgrade to windows 11 and they even said that alot of unreal engine games are requiring more POWER with each update and patch , which includes sims 4 ..and it's causing me to kick into UEFI and i think I tried to update my BIOS and it didn't help anything. I agree this more than likely a Maxis issue. (besides Chrome wanting to yank up the RAM and CPU also)

but thank you for this fix ! I'll give it a try and report back on my findings.

 

edit: do you think this conflicts with better exceptions script mod? 

 

I don't think it should conflict with anything like that. Exceptions thrown in a Python script shouldn't escape the Python environment. RTBP's unhandled exception handler catches unhandled C++ exceptions in RTBP and The Sims 4.

Posted (edited)

I got a reply back asking the EVE dev about the Physics Issue with the clothing types. "I believe it has something to do with the way the Real-Time-Body-Physics uses weighted areas for breast bones. From my understanding, augmentation to this area of default EA meshes make them less likely to be compatible."

Another possible reason is that some of the older Eve clothing types pre-2021 were never updated to have the settings of clothing/gender restrictions that Sims 4 released in a patch/update earlier on. That being that this is suppose to target and only provide physics to female only clothing ? So when presented with older EVE clothing that could be also equipped on males regardless of masculine/feminine setting it doesn't apply the physics properly as most eve clothing designs were intended to be used in junction with a female body due to the chest mesh along with it, meaning it could be confused if it's a outfit that wasn't properly tagged for female only settings.

I'll try the new experimental release you posted earlier and see if that fixes some of the current outfit issues. If nothing has changed I'll also experiment with using Sims4Studio to try and manually update some of the older EVE clothing in my mod folder to see if applying updated tags will fix it, enabling the physics to work on them.

 

[Update] Tried the experimental and it has fixed the physics on some eve outfits, there a still a few that don't work but I'll wait till another version is ready for testing.
Untitled1.jpg.4f01dfe904f2ce681d6386c1931ded70.jpg

Edited by ReconUnitZero
Posted (edited)
On 3/11/2024 at 8:39 AM, ReconUnitZero said:

I got a reply back asking the EVE dev about the Physics Issue with the clothing types. "I believe it has something to do with the way the Real-Time-Body-Physics uses weighted areas for breast bones. From my understanding, augmentation to this area of default EA meshes make them less likely to be compatible."

Another possible reason is that some of the older Eve clothing types pre-2021 were never updated to have the settings of clothing/gender restrictions that Sims 4 released in a patch/update earlier on. That being that this is suppose to target and only provide physics to female only clothing ? So when presented with older EVE clothing that could be also equipped on males regardless of masculine/feminine setting it doesn't apply the physics properly as most eve clothing designs were intended to be used in junction with a female body due to the chest mesh along with it, meaning it could be confused if it's a outfit that wasn't properly tagged for female only settings.

I'll try the new experimental release you posted earlier and see if that fixes some of the current outfit issues. If nothing has changed I'll also experiment with using Sims4Studio to try and manually update some of the older EVE clothing in my mod folder to see if applying updated tags will fix it, enabling the physics to work on them.

 

[Update] Tried the experimental and it has fixed the physics on some eve outfits, there a still a few that don't work but I'll wait till another version is ready for testing.
Untitled1.jpg.4f01dfe904f2ce681d6386c1931ded70.jpg

 

The method I was using to determine the breast bones was a little too strict. The last official preview release mandated that the left and right breast bones had matching weights. This seems to be the standard for all default meshes, but Eve meshes don't seem to conform to this all the time. I've removed this restriction in the experimental releases and that's probably why a lot of Eve meshes that didn't work before are now working.

 

Could you find me an Eve top that doesn't work and share your log file? Don't select another outfit or anything. Just Alt+Tab out of the game after you find a non-working top, find your log file and post it here. RTBP logs a bunch of useful info when creating breasts simulators, even if it fails. That info could be helpful.

 

Thanks so much for sharing your info with me and helping me improve this mod.

Edited by CPVC
Posted

Would it be feasible to change how the damping works? Right now it seems like damping is linear. As physics movement hits the set limit it just stops abruptly. This mostly effects test physics 3 and 5 as the other test physic settings as well as the default, are too subtle and movement would never hit the limit with any sim animation.

 

Could damping be simulated with a curve? ie; the damping gets strong as movement approaches the set limit.

Posted
18 hours ago, alexlll said:

Could you add more settings for angular physics? Mass, power, gravity, minimum and maximum X Y and Z.

 

Linear mass, power, gravity, and distance limits apply to angular physics as well.

 

5 hours ago, fanbongo said:

Would it be feasible to change how the damping works? Right now it seems like damping is linear. As physics movement hits the set limit it just stops abruptly. This mostly effects test physics 3 and 5 as the other test physic settings as well as the default, are too subtle and movement would never hit the limit with any sim animation.

 

Could damping be simulated with a curve? ie; the damping gets strong as movement approaches the set limit.

 

Hmmm... Yeah, that actually might be a good idea. It would make the approach to the min/max distances look a bit more natural. Maybe after a certain threshold has been reached, like 80 or 90 percent of the limit, some variable interpolation could kick in. I'll look into this.

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...