Not a member yet? Why not Sign up today
Create an account  

  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 
[Guide] Compiled Apex Clothing Tool Tips

#1
Information 
Hello! I compiled some important tips of the Nvidia APEX Clothing Tool made by members of the forum since there isn't an easy way to access the information.
This is not a tutorial, but there is lots of useful information. You would have to copy and paste some of the hyperlinks into your browser, as they are kind of glitchy.
 
Tips originally from this thread: http://modderbase.com/showthread.php?tid=26
 


APEX Tool Download [You have to register with Nvidia for free first]:

Sleepy_Scrub: 
 
"You download it, [and] it comes with a folder with a bunch of stuff, ClothingToolCHECKED is in there [...] APEX 1.3.1 which has worked for me along with 1.3.0. Do NOT download 1.3.2, it's bugged and files you export from it cause Unreal Engine 4.7 to crash".



Standalone Tool (1.32) [If you REALLY want to use it]
 
Windows: https://developer.nvidia.com/rdp/assets/...32-windows
Android:   https://developer.nvidia.com/rdp/assets/...32-android
Linux 32:  https://developer.nvidia.com/rdp/assets/...32-Linux32
Linux 64:  https://developer.nvidia.com/rdp/assets/...32-Linux64
 
Standalone Tool (1.31)
 
Windows: https://developer.nvidia.com/rdp/assets/...c10-binzip
Android: https://developer.nvidia.com/rdp/assets/...oid-binzip
 
3DS Max APEX Plug-ins [Brutal Ace recommends 'PhysX: 3D Studio Max DCC plug-in for PhysX 3-3-0']
https://developer.nvidia.com/gameworksdo...d%20studio

BrutalAce: 

"Nvidia card is not required for this type of PhysX, it's only needed for GPU based PhysX animations which are used in some big games like Batman Arkham series. Street Fighter only use CPU based PhysX which is also a product of Nvidia but it's platform independent".


APEX Tool Official Guide:

https://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/APEXsdk/APEX_Clothing/ClothingTool.html 
https://developer.nvidia.com/APEX-clothing-3dsmax-tutorials

Provided by Moddah - APEX Basics Tutorials from Unreal Engine and UE Wiki websites:
https://wiki.unrealengine.com/APEX_Cloth...29_-_Video
https://docs.unrealengine.com/en-us/Engine/Physics/APEX
https://docs.unrealengine.com/en-us/Reso...h#clothmap


Ecchi Gamer: "What is APEX Clothing?"
 
"[F]rom what I've seen, it's a cloth that has animation, but [can't this] purpose be achieved through physics too? So, what's the advantage or difference in using APEX Clothing?"
 
BrutalAce:
 
"I suggest you stay away from APEX right now, not trying to confine you but you can do a lot with regular physics right now, APEX has complex workflow and it will require you learn a new tool which is either Nvidia's own cloth authoring tool or 3DS Max with APEX plugin and both are difficult in their own ways. The benefit of APEX only appears when you're animating a long cloth or something like skirt, everything else can be done pretty nicely in regular physics, even long clothes can be done in regular physics if you're good with handling lots of bones and know how to rig them properly. 
 
The main difference between APEX physics and regular physics is that APEX allow you to make each vertex move individually while regular physics make a set of vertex follow the bone they are rigged on so when working with clothes APEX give you more soft looking cloth while regular physics give you more stiff cloth, also collisions are more accurate in APEX due to all vertices having individual movement but they are hard to setup properly, in some cases more hard than regular physics. To answer few of your questions. 
 
1) You make APEX cloth as I mentioned above (either using Nvidia's tool or 3DS Max with APEX plugin). 
2) It's merged with main character FBX when you cook your project and once compiled, it cannot be extracted. 
3) Yes APEX asset is a separate file using *.apx extension, that's the file that you import in UE. It has nothing to do with your main physics asset
4) Yes one character can use multiple APEX assets, that's how I made my Laura Mileena mod. It's using two assets, one to animate her long back cloth and other to animate her belt and veil. 
5) I mentioned the advantages above".
 
Sleepy_Scrub: 
 
"PFunk's tutorial for a starting point: https://www.tapatalk.com/groups/sfxt_mods/sfv-modding-discussion-thread-t1367-s1160.html#p44112 
That's a great starting point, the rest you're going to have to learn from YouTube tutorials and trial/error".
 
Ecchi Gamer:
 
"What is the advantage of using APEX clothing for animation at all?"
 
Sleepy_Scrub:
 
"(START RANT)
 
APEX is specific for animating billowy cloth or things of that nature (capes, sashes, scarves, long coats, etc). Could probably use it for hair as well. Unreal physics collision can be janky in certain situations where you need an object to lie flat on top of another object (IE, hair on shoulders, sash or skirt on top of leg, etc.) as Unreal won't really allow objects to lie flat on top of one another. You'll see it with hair collision especially where the hair will hit the shoulders or another strand of hair and be knocked off violently or jitter". 
 
Example:

[Image: giphy.gif] 
"Actual cut-scene made by paid professionals, everybody"
 
Anyways, APEX is one of the ways to avoid dumb shit like this.
 
(END RANT)
 
In addition, several meshes from SF5 already use APEX and thus you can't get them to work properly without manually recreating the APEX file or totally re-rigging them (Chun Li's sash, Fang's sash, Karin or Ibuki's skirts, etc). 
 
But yeah, I agree with Ace, you need to learn Unreal physics assets first, save APEX as a last resort."
 
 
"Which APEX Tool is Better?"
 
Sleepy_Scrub: 

"You either have to use the APEX standalone app, or a 3DS Max plugin. Standalone app is easier to use, but has some janky issues importing to UE4.
3DS Max one got more updates, but I can't use 3DS at all, so. Pick your poison I guess".
 
 
"APEX Basics?"

PFunk:

"Here comes SuperCammy

[Image: KyrpPNz.gif]

The following is all I know about authoring APEX cloth with the standalone tool (that is to say : not using the Max or Maya plugins) :

- The tool is called "ClothingToolCHECKED.exe", part of the Nvidia Physx tools. I've only used the 32bit version as per a suggestion I saw online - I have no idea if the 64bit version actually works (it probably has bugs?).

- Since APEX cloth is tied to material slots, there are a few weird things about the system. For instance, the main character FBX (used for the main import in UE) might or might not need to have the cloth polygons in it (I am getting conflicting results on my tests about this - I feel like the cloth bits do not necessarily have be in the main FBX, but the non-cloth bits seem to be required in the sim FBX. It's weird!). However, one thing is certain: you need to make sure that the main model has at least some polygons assigned to the material, eventually linked to the cloth sim file, because if not, the required material slot won't show up in UE on import in the first place.

[Image: bDmRaFt.jpg]

- Steps to generate cloth sim in the standalone tool :

1 - Import the FBX used for sim (not your whole character - only the parts that match the material slot you will dedicate to APEX simulation in UE.)
2 - Painting max distance values (that tells how far each vert can travel, about 1.0 meter max for a cape/trench coat). Right-click erases. Set the max value to 1, scale to 1, and then put the paint slider to the strength you want to paint (here I used 1.0 at the bottom of a cape, and 0.1 at the shoulders). Once done click smooth once to smooth everything nicely.
3 - Painting slave latching. This tells which inner verts are going to be driven by outer verts, thus avoiding interpenetration. Make sure that you paint slave latching all the way to the edge of the fabric, if not it will flip on itself during sim.
4 - Running a first test sim to see if everything is fine, adjusting fabric properties if needed
5 - Save your work-space!
6 - Working on collision volumes. This is tricky, and a bit buggy. I've only been able to generate volumes based on bones initially present in the weighting of the model, meaning that even though a cape is not supposed to be weighted to an arm, I had to make sure that at least some verts were weighted to that bone ; if not, the program seemed to refuse to generate collision from these bones, even though they show up in the armature tree. And in order for collision volumes to show up at a predictable location I had to include thin polygon strips coming from, say, the surface of the arms and legs. Not necessary, but it saves me some time when it comes to positioning collision capsules.
7 - Tweaking fabric properties
8 - Generating a final sim, calculating tangents, generating the cloth mesh, saving the asset. This creates the .apx file for UE.

I am getting an odd UV/material issue on Cammy's leotard here, probably an oversight on my end at some point in the process. It is probably not relevant to sim anyways but that might need to be double-checked.

That's about it !"


"Why Are Collisions Not Showing After Exporting APEX Files Using 3DS Max?"
 
BrutalAce: 

"If [the APX part of the mesh] is colliding fine in 3DS Max then it means you have a kinematic rig with collision hulls, but you might not be exporting them, which is the reason why you [lose] collisions in UE4. [W]hen exporting APX file, make sure you check "Include Collision Hulls" in export options, that will bring [up the] collisions in UE4".

"Is There More Advice for Collisions?"

Sleepy_Scrub:

"Wanted to share some advice when dealing with APEX collision volumes, in hopes of saving people from dealing with the shenanigans I've been going through these last few days. So, I made sort of a basic trenchcoat APEX asset with collision volumes for Dante and Nero that seemed fine, but the jacket was constantly clipping into the legs no matter what I tried.  I couldn't figure out what was happening because the collision volumes in the program seemed fine:

[Image: dante_fucked_collisions.jpg]

Increasing self-collision and thickness values helped a little, but didn't solve my problem. All of the collision overlapped, there's no reason the jacket should be clipping into the mesh.
Then it hit me when watching the animation where Nero's leg always clipped:

[Image: 20180731155115_1.jpg]

What I THINK is happening is that during certain animations (especially kicks) the collision volumes separate for a brief moment and create gaps, And then the APEX cloth gets stuck in the gaps. 
It's especially a problem for games like Street Fighter that skip frames in animation, which causes the collision volumes to warp around every time frames are skipped. 

The work-around I figured out for now then, is to use the bones that don't really move around and use them to create a big collision volume under the legs so the cloth can't slip through. 

[Image: dante_working_collisions.jpg]

The big red circle around the legs is the pelvis bone- because it's at the center of Nero's mesh it almost never moves with an animation. And by making it giant and having it surround his legs it creates a sort of force-field around the groin of the mesh so that APEX cloth can't clip through it during kicks. It's a dumb little trick but it took me days to figure out. Probably explains why a lot of the APEX meshes have an Invisible Material slot, probably to generate a lower body collision volume. Hopefully it helps somebody foolish enough to deal with APEX down the road".


"More Advice Please?"

Sleepy_Scrub:

"I'll help with what I can [...] Ok, we're just talking collision? From the default APEX tab, there's a button on the lower right called "Generate collision volumes", hit that.
[Image: APEX1.jpg]

This will bring up a tab that allows you to select each material group you want to generate collision volumes from (select submesh) along with the ability to alter the size/shape of each collision volume (Bone Selection). The submeshes correspond to the material groups you have setup within the mesh. Selecting one from the collision volume menu will auto-generate a base of collision volumes. Using your example I can see that CNL_01_SSS  (aka Material #7 from the top), is the material that links to Mai's skin/body.

[Image: APEX2.jpg]

So when I click on "Generate Collision Volumes" from the APEX menu, selecting the 7th tab down with give me the body, and auto generate collision boxes for that material group (you should see a series of wire-frame spheres appear as you select each group).
[Image: APEX3.jpg]

And from there you can use the bone selection tab to modify the size/shape of each collision volume. Now if you hit "start simulation" you should see your animated cloth interacting with the collision volumes you generated

[Image: APEX5.jpg]

Also, be sure to hit the "generate tangent space" tab above collision volumes once you're finished, otherwise it won't render properly once you import your APEX file into Unreal [Engine].

[Off]-note, the APEX SDX has a limit for how many collision volumes it will support, so you may want to disable collisions (via the bone selection window) for bones that aren't near the cloth you're trying to animate.

[Image: APEX4.jpg]

In theory, not that hard to deal with. In practice, it's infuriating. Be prepared to increase the size of your collision volumes above what you think you need, and to crank the settings in Deformable Parameters way up to stop your APEX cloth from freaking out. SF5 skips frames within its animations, which will cause collision volumes to warp around and cloth to whip around too fast if you don't have chunky physics parameters setup.

But that's absolute basics for collision for you. Good luck, amigo".
 
 
Sleepy_Scrub: "Anybody Having Problems with APEX Cloth Turning out Really... Shimmer-y When in Game?"

 



"Most of my APEX work has had a shimmer too, it [is] probably most noticeable here. Looking into it, perhaps it's an anti aliasing thing...? (Goes away if anti-aliasing set to medium or lower). I'm wondering if it's some setting I'm missing or if my L2N work is just sloppy or if the APEX SDK just sucks. (Probably all of the above). I've heard newer versions of Unreal have an in-engine clothing tool. Wonder if I could redo the physics and switch back to an older version to cook out".
 
BrutalAce:
 
"I can't see that much Shimmer on the skirt or maybe it's video compression killing all details but anything with a lot of textures (like checker-board texture in your case) does end up shimmering in APEX, if you see Kolin's sporty costume or Chunli's swimsuit that also has shimmering on sleeves and sarong respectively, maybe it's because APEX operates on different frame rate than the game frame rate or there is something else that we don't know yet. I can see the skirt having some internal clipping or sticking when she raise her legs, maybe adjusting the bend/shear resistance and/or friction can fix that and allow the skirt to rest more naturally".

Sleepy_Scrub:
 
"I had the exact same thought about Frame Rate. Tried to make a GIF and shimmer totally went away. Maybe APEX was built around 30 FPS? Or maybe just shitty GIF compression. If that's the case that also might explain why all the APEX objects come in pairs of 2 that overlap- maybe some kind of frame blending...?   Huh  Trying your tips, starting to look a bit better. Damping is helping quite a bit".
 
"Does Editing an Original Mesh File Affect the Embedded APEX?"
 
[Robhal mentions this when swapping characters/costumes with embedded APEX]
 
"According to my test, so far only Chun-Li's C1-C3 all have the "four legs" issue when we swap those costumes to other characters. I haven't tested C7 & C8 yet. The C4, C5, C6 & C9 don't have this issue. We can solve the "four legs" issue by editing the mesh file in Blender (or similar app) and delete the two extra legs, but unfortunately it will cause another issue (the clothing physics which use APEX will stop working)".

Ecchi Gamer: "Why Is There Two Identical Vertex Groups for Some Clothes That Use APEX?"

"I have been trying my luck [with] APEX, and I have noticed that in [BrutalAce]'s Mai Chunli mod [has] two identical vertex groups for the front cloth that uses APEX. What's the purpose of that ? Am I supposed to make two vertex groups for the mesh that uses APEX because i have seen this thing in some official costumes too".

BrutalAce:

"You can delete one vertex group and the associated mesh as it's useless. That happens because we attach APEX animated mesh separately to the main mesh (during the making of mod) so when we extract it, we [lose] all animation information, but the mesh remains, as it is so basically it's just an extra piece of mesh without any rigging. You won't get any APEX related information if you extract one of the mod or official costume as all information is lost during extraction, my suggestion is to watch some APEX tutorial on YouTube, they are not great but they give you some start". 

Ecchi Gamer: "My Textures Get Messed up When I Attach the APEX to the Mesh, Why?"


"I have uploaded a video can you please take a look at it. Here are the issues I am facing. [F]irst of all, the textures get messed up when I attach the APEX file in UE while they are fine when I don't. The jacket is the 11th element in UE and when I attach the APEX file, it becomes darker for some reason. Next, well I tried many different things, but still the animation is far from what I wanted, maybe it will take me a lot of time to get good at it it just feels kind of unnatural and not very smooth, maybe a high subdivided cloth gives a smooth animation I don't know? Perhaps you can point out a more suitable scale that I should have used or have painted".







 Sleepy_Scrub:


"Hmmmm..... it could be a couple of things, not sure. 

1.) APEX doesn't seem to like undefined values (the pink lines on your cloth mesh). Try flooding the mesh with a Max Distance of 0 before you start painting mix distance.

2.) Don't forget to setup L2N, otherwise the outside of the jacket will overlap with the inside if the mesh is double sided. See the tutorial I linked to earlier.

3.)  Try switching smoothing data back from "faces" to "normals" when you export out of Blender and start over to run some tests, see if that helps. 

4.) Also, APEX doesn't play nice when the UVs of a mesh overlap. So if you applied a solidify modifier or the APEX cloth part of your mesh overlaps, you will have to remove the modifier or rework it and start over. That's probably the most annoying thing about APEX is learning "oh you didn't set your mesh up right because APEX has hidden rules nobody told you about, lol start over. 

Hopefully some of that helps".
 
 
_________________________________________________________________________________________________________________________________________________
 
[Not complete, so edits will be made and more information will be added]

[Edit: Hyperlink have been fixed]
[Edit 2: Integrated info from Tapatalk]
 
[Image: Sakura-Intro.gif]
                                       « All Mods - Patreon - DeviantArt »
[+] 7 users Like Ouji's post
Reply

#2
I hope someone finds this helpful somehow Smile
Reply

#3
@Ouji
I didn't realize I had spoken that much on APEX, sheesh.

Compiled information is always helpful and will save people a lot of time, nice work. 
There is a LOT of useful information on the old forums that hasn't been fully compiled, hopefully somebody archives them in case they disappear. I will compile what I can if I ever finish my modding tutorial. (I'd love to do a 'common troubleshooting issues' thread too.

I'll add that I did sort of solve that Apex shimmer issue you listed, it has to do with Apex working in conjunction with Mip Maps.
Simplest fix is through Unreal Engine, double click each texture, change Mip Gen settings to "Simple Average" instead of "from texture group" and Unreal Engine will auto generate MipMaps for you, which will noticeably reduce Apex Shimmer. 

[Image: unreal-apex-texture-setting.jpg]
[+] 1 user Likes sleepy_scrub's post
Reply

#4
@sleepy_scrub That's brilliant. Thank you for sharing your solution for the problem Smile

Also, glad it's a helpful thread.
Reply

#5
@Ouji
No prob. Thinking about it, it might also be a good idea to copy-paste PFunk's Apex guide into this thread from the link I listed in case it ever goes down.
Reply

#6
@sleepy_scrub Will do once I'm home Smile
Reply

#7
Just wanted to add because I don't think it was explicitly stated, but make sure that your weight painting is done correctly because it will affect the apex physics in weird ways if it's done poorly.
Support me on patreon!
Catch my work on my deviantart page!
Follow me on Twitter!
Watch me on Twitch!

Join us on the modderbase discord! I'm going to post more WIPs on there as well as talk shop.
https://discord.gg/NNz5fcv
[+] 1 user Likes addysun's post
Reply

#8
what does inertia blend in apex pysics actually do in sfv, i cant figure it out
Support me on patreon!
Catch my work on my deviantart page!
Follow me on Twitter!
Watch me on Twitch!

Join us on the modderbase discord! I'm going to post more WIPs on there as well as talk shop.
https://discord.gg/NNz5fcv
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)