Next release

  • Add an option to analyze files to find unconventional names for virtual bodies, which can screw optimization on a vast minority of armors.


Future releases
  • Convert degrees to radians when possible (maybe?).
  • Add a graphical interface for Windows so actual humans can use this app :P


Past releases
  • Add a "verbose" option to output everything the app is doing, so users can know what's actually doing in full detail.
    Will help with error reporting.
  • Add optimization levels (read below).
  • Add options to output to another folder or a zip file (read below).
  • Add a help file stating command line parameters and whatnot for users who know what I'm talking about.


News: 2024/02/07

Meh!
I moved the roadmap goals because once I restructured everything to support logging it turned out to be quite easy to add optimization levels and changing the output to either a zip file or another folder.

Speaking of optimization, turns out the "happy medium" (read way below) will be easier to implement than I thought.

I isolated 3358 different SMP tags from many different mods in my own computer (I consider that number a good enough sample size :P) and I found out most of the things that need to be triangles have names starting with "Virtual".

Since adding medium level optimizations will be quite easy, I'll just add those right away for the next update.


News: 2024/02/05

Optimization

Right now the app just overwrites the files (the option to create new files will be the default in the future) and it uses the most aggressive optimization possible: changing all collisions to on vertex basis.
This is in line with what it is suggested in FPS smashed by HDT SMP.

After reading A Guide to HDT-SMP Users/Modders and listening to your feedback I started experimenting with xml files and found this:

  • Vertex-vertex collisions: too aggressive. Collisions may be too bad, depending on the armor/wig.
    I found that myself with some armors, even though hairdos collide as usual according to my own eyesight (which is definitely flawed).
  • Vertex-triangle collisions: happy medium.
    I tested this using triangles for the body and vertices for everything else (including the floor) and I'm quite happy with that. My CPU fan does no longer run like a jet turbine and collisions are quite good. Using vertices for the body and floor and triangles for everything else may also be worth a shot. Users could really help me reporting their findings using both methods.
  • Triangle-triangle collisions: the most expensive method and the default most armor creators use. Not really necessary most of the time.

I can make the app to apply any of those optimization levels.

The only downside to the best one (vertex-triangle) is that I don't know if there's an standard armor creators are using or if we would need to guess what names they are using for tagging the body.
Right now I've only found tags named VirtualBody, but I haven't made a thorough check and I'm quite sure there are outliers having cute names like PhysicsBody and things like that out there.

Extensive testing (done with your help) needs to be done on that matter.


The radians-degree issue

No matter what I do, most armors clip really bad while running or sprinting.
They always look good for screen archery, but when it comes to actual gameplay, they always clip trough the body.

Have you noticed that's not an issue in ANY game that has cloth physics integrated in its engine? (not even Switch games)

I have always suspected it had something to do with bone constraints (parameters that tell the physics engine how much a physics bone can move) in SMP files, but I didn't know the parameters SMP uses and expect... until now.

Reading The Extensive Guide I also found that SMP expects angles in radians, yet I commonly find armors using degrees.
I mean... I'm quite sure that when a creator wants to add a constraint using the number 20, they expect to limit the movement to 20º, not 20 radians (1145.9º).

I have tried to manually change things from degrees to radians, but I've not noticed any visible changes.

I'm thinking about adding an option to automatically convert all degrees to radians in a future version so we all can check if there's any difference or they look the same only in my imagination.

Still, I'm not sure what to think about all this clipping stuff.
I barely know about SMP and I don't want to look like I'm accusing way more experienced people of doing things wrong, so I don't really know what to do with this issue.

I think it's worth a try to check if this can be mitigated or eliminated, but I need lots and lots of data to really understand what's actually happening here.

Article information

Added on

Edited on

Written by

Papitas

4 comments

  1. 2phazt
    2phazt
    • member
    • 2 kudos
    Thanks for picking up my suggestion to pipe the output to a zip.
    1. Papitas
      Papitas
      • premium
      • 131 kudos
      It was a good suggestion.

      ... less chances for me to screw up other people's stuff
  2. barmeyblonde
    barmeyblonde
    • premium
    • 10 kudos
    I appreciate your exploring this side of modding, especially providing documentation for those who wish to read it. I am not a coder, but I've learned a *ton* just from having to edit .ini files and use xEdit over the years. I love it when modders provide anything I can use to better inform myself. 

    I'm currently building my LO in between surgeries (nothing life threatening, I just broke some things that need mending), so I don't know how effective I can be as a beta tester. But I will track for now, and try it out soon to see how things work with different armors and in different environments. I had no idea about the difference between vertices and triangles, so this all fascinates me.

    I appreciate your efforts, Papitas! Kudos to you!
    1. Papitas
      Papitas
      • premium
      • 131 kudos
      First: good to see you're alright.
      It's a hassle being bed-ridden, but fortunately you have your computer at hand to pass the time.

      Anyway, all help I can get is good.
      I'm not actually a SMP developer, so I don't need precise profiling data. Just people subjective perceptions can give me an idea if things are actually working and if I'm going in the right direction.
      No need to know with precision how good things are running because I can't do anything with that data, anyway.

      I wanted to show you some article that explains triangle collisions and such, but search engines nowadays are useless and couldn't find something REALLY useful and easy to understand.

      This is the best I could find.
      The collision models in the pictures you see there are actually composed by triangles (each rectangle is two triangles).

      The optimization problem with most SMP armor mods is that most armor creators just use the base body (CBBE, UNP, HIMBO...) as the invisible collision model.
      Those bodies have QUITE A LARGE TRIANGLE count for a physics calculation object (which is not really needed; most AAA games make physics calculations based on collision capsules precisely for performance reasons) and to add insult to injury, they use the most expensive collision calculation possible (triangle-triangle).

      Capsule collisions can't be easily used because Skyrim bodies can change in size (by weight), but simplified physics bodies should be used, even though almost no one does.
      I've only seen one armor author (yes, ONLY ONE) using a simplified physics body.

      The aim of this program is to help in the only way I can (by switching simple settings) so SMP mods are less wasteful and more accessible to people like me who have more "modest" setups (yet I wouldn't consider my Ryzen 5 to be modest at all to run a 10 years old game).