• Hi Guest!

    We have recently posted a VaM2 2024 Progress Update on Patreon!
    Check out the details here: https://www.patreon.com/posts/vam2-august-2024-111164439
  • Hi Guest!

    We are excited to announce a new feature on the Hub: Favorites!
    You can now add resources to your favorites, and organize your favorites into collections! You can check out the details in our official announcement!

  • Happy Holidays Guest!

    We want to announce that we will be working at reduced staffing for the holidays. Specifically Monday the 23rd until Jan 2nd.

    This will affect approval queue times and responses to support tickets. Please adjust your plans accordingly and enjoy yourselves this holiday season!
WindControl++

Plugins WindControl++

wgsoup

Well-known member
Featured Contributor
Messages
47
Reactions
464
Points
53
wgsoup submitted a new resource:

WindControl++ - Plugin to add wind to scenes

New version of my WindControl+ plugin, rewritten from scratch.

The logic was changed in order to apply the wind force to any rigidbody, cloth or hair element in the scene (in theory also clothes on CUA).
For this reason I decided to treat is as a separate plugin.

The drop down lists all the Atoms that have Rigidbodies on them, selecting an Atom makes all the sub elements show on the right side of the menu.
The plugin allows to enable the wind on multiple Atoms at the same time, switching...

Read more about this resource...
 
Hi, great job with the update :)

I recall the old one having an issue with high continuous memory usage, and went ahead an tested WindControl++ as well. It looks like the issue is still there. It consumes about 10 MB/s of heap at 60 fps as soon as the plugin is added to the scene. The higher the fps, the more memory is consumed (indicating the problem is in your Update loop). This results in garbage collection occurring much more often during scene playback and animation, which interrupts the game for a short duration every time it occurs.

I took a quick look and it's entirely due to the expensive FindObjectsOfType<Rigidbody>(); call in your ApplyForceToPenis method. This is not only bad for memory use but performance as well. (I gained about 2-3 fps from commenting out ApplyForceToPenis in an empty scene with 1 person atom.) A much better way to implement this would be to add OnAtomAdded/OnAtomRemoved handlers that update a penis rigidbodies list on demand rather than doing that every frame. Looks like you're already using OnAtomRemoved in the plugin, you can probably figure it out pretty easily, but let me know / DM me if you need help with it. Thanks
 
Hi, great job with the update :)

I recall the old one having an issue with high continuous memory usage, and went ahead an tested WindControl++ as well. It looks like the issue is still there. It consumes about 10 MB/s of heap at 60 fps as soon as the plugin is added to the scene. The higher the fps, the more memory is consumed (indicating the problem is in your Update loop). This results in garbage collection occurring much more often during scene playback and animation, which interrupts the game for a short duration every time it occurs.

I took a quick look and it's entirely due to the expensive FindObjectsOfType<Rigidbody>(); call in your ApplyForceToPenis method. This is not only bad for memory use but performance as well. (I gained about 2-3 fps from commenting out ApplyForceToPenis in an empty scene with 1 person atom.) A much better way to implement this would be to add OnAtomAdded/OnAtomRemoved handlers that update a penis rigidbodies list on demand rather than doing that every frame. Looks like you're already using OnAtomRemoved in the plugin, you can probably figure it out pretty easily, but let me know / DM me if you need help with it. Thanks
I added the penis rigidbodies to the list of the rest of the rigidbodies, had some issues because those do not have a forcereceiver associated and I was only considering those. Now they all get cached only when necessary and there's additional toggles and sliders. I'll test it more and then publish it. Thank you again for the feedback, I'm no dev but I'm trying to get better and learn :)
 
I see what you mean about the heap usage, my rigidbody update function is really using too much. I've been optimizing the whole script. Hopefully the next update will behave a lot better.
 
wgsoup updated WindControl++ with a new update entry:

Version 1.2

  • - Implements Further performance improvements and memory usage improvements
  • - Fixes bugs preventing proper handling of rigidbodies when an atom is removed or added
  • - Adds wind oscillation function:
    • if enabled currentWindMagnitude oscillates between a random value in the range minWindMagnitude-midWindMagnitude and a random value in the range midWindMagnitude and Wind Strength (maxWindMagnitude)
    • Works only with "randomize currentWindMagnitude" enabled
    • "Wind...

Read the rest of this update entry...
 
wgsoup updated WindControl++ with a new update entry:

Version 1.2

  • Implements Further performance improvements and memory usage improvements
  • Fixes bugs preventing proper handling of rigidbodies when an atom is removed or added
  • Adds wind oscillation function:
    • if enabled currentWindMagnitude oscillates between a random value in the range minWindMagnitude-midWindMagnitude and a random value in the range midWindMagnitude and Wind Strength (maxWindMagnitude)
    • Works only with "randomize currentWindMagnitude" enabled
    • "Wind...

Read the rest of this update entry...
 

Similar threads

Back
Top Bottom