[SOLVED] Need help with cloth: Cloth Constraints

How to create models in XSI and other 3D applications and make them work in Battlefront 1 & 2. Post models, tips for application usage and share anything XSI, 3DMax, SketchUp, etc.

Moderator: Moderators

Sporadia
Corporal
Corporal
Posts: 151
Joined: Thu Jan 24, 2019 11:02 pm
Projects :: No Mod project currently
Games I'm Playing :: None
xbox live or psn: No gamertag set

[SOLVED] Need help with cloth: Cloth Constraints

Post by Sporadia »

OUTDATED (or outdated very soon)
This problem is fixed for ZETools 1.3.0036


Edit: Skip to most recent ZEModtools test

Edit (outdated): Skip to sticky post/solution

tldr: How do you set cloth constraints in Softimage Modtool?

Background:
Hidden/Spoiler:
I'm trying to add a cloth skirt to Deviss' Barriss Offee model. I've spent a few days trying to convert her skirt from a regular geometry to a cloth in Softimage ZEModtool. But when I test it ingame, the skirt distorts itself quite badly, and it sometimes clips through part of her legs (depending on what I did to it; I tried a few things). I thought this was a collision problem at first, so I've tried adding new collision primitives, taking colision primitives from other models, and writing the COLL section manually in a hexeditor. When I go ingame and use 'render_cloth_connections' I've been able to see that the primitives are on the model in the right place, moving with the right bones etc. They also seem to be knocking the cloth around, though sometimes the cloth gets pulled into them. I've seen that happen on vanilla models though.

Another thing I've been playing around with is fixed points. I've tried changing the enveloping and fixed points a few times to see if I could keep the cloth away from Barriss' legs using them. Typically I've been fixing the front of the skirt to Barriss' legs like what you see on the stock Darth Sidious skirt (really it's his robe, which I'm using as a reference). I've tried a few different patterns of fixed points at this point. That's certainly been helping with collision, sometimes, but the skirt still seems to distort itself, even where there are fixed points. A third thing I've tried is making the skirt physically bigger. That did stop the skirt clipping into Barriss' legs, but the distortion around fixed points is especially bad. Yet another thing I've tried is increasing the polygon count using polymesh > subdivide polygons > Type: Diamond. This made a cloth that falls more neatly, but distorts in all the same places.

Sometimes while I was doing all that, I would try moving Darth Sidious' stock skirt over and see if I could make it work any better. It has the exact same problems as Barriss' original skirt when I use softimage though. I was hexediting Darth Sidious' cape onto Barriss' msh first, before taking it into softimage (because I already know how to do it with hexediting, and haven't learned how to merge different models in softimage yet). When I test the hexedited model ingame, it's totally fine (the skirt's naturally too big and in the wrong place, but it moves with the legs correctly and doesn't distort weirdly). But after making changes in softimage, Darth Sidious' skirt would always go wrong. So then I eventually thought to try importing the working msh with Sidious' skirt, and exporting it straight away without making any changes. I did this to test the softimage export (I kept changing my mind about whether ZETools were exporting correctly). I saw that the exported test msh had the distortion and clipping problems, even though the imported msh was fine and I hadn't changed anything. So then I did the test again with the stock Darth Sidious msh.


I'm having a problem with cloth in Softimage. As a test, I've tried importing the stock Darth Sidious msh, branch selecting the DummyRoot then exporting with ZETools, without changing anything. The cloth on the exported msh always seems screwed up. This was a test of a problem I'd been dealing with on another model. So I've done a quick comparison between the stock Sidious msh, and the Sidious msh after export. Just looking at the cloth, these chunks appear to be the same before and after the export (at a glance, I haven't checked them thoroughly):
Hidden/Spoiler:
MTYP
NAME
PRNT
TRAN
CTEX
CPOS
CUV0
FIDX
FWGT
CMSH
COLL


So the chunks above are all fine. Also ENVL and MNDX are correct (they're just remapped sometimes). I'm not looking at MODL, GEOM or CLTH either, since they're just groups of smaller chunks.


But the constraint data looks significantly different before and after the import, export:
SPRS
CPRS
(completely empty after export)
BPRS

Also note that the export adds an unnecessary FLGS section to cloth MODLs. But I don't think that's a problem.

I think this constraint data is causing my cloth to distort/artefact, and stopping it from functioning as a skirt (After playing with the fixed points/enveloping, different collision primitives and the COLL section, it looks like the constraints are the real issue).

Is there a correct way to set cloth constraints in softimage?

EDIT: Oh and the BBOX! I completely forgot when I was writing this, but the BBOX is different too. I don't completely understand what a boundary box is, but it could be the problem. Can anyone tell me more about the BBOX and softimage?

EDIT2: I've ruled out the possibility of this being a collision problem (even though it looks like one). I made 2 copies of the stock Darth Sidious msh. In the first copy I replaced the collision primitives with the new exported collision primitives (since they do contain different data) and deleted the original collision primatives. In the second copy I replaced the cloth MODL with the new exported cloth MODL, and deleted the original cloth MODL. I did both of these with a hexeditor. Copy 1 (stock cloth MODL with exported collision primitives) works fine ingame. Copy 2 (exported cloth MODL with stock collision primitives) is deformed.

Also confirmed that the COLL, FIDX and FWGT sections of the cloth MODL are exactly the same before and after export. Not sure how to check the big chunks like CPOS for slight differences. But I've basically got this problem pinned down to the cloth constraints, or the boundary box.
Last edited by Sporadia on Sat Sep 26, 2020 4:16 pm, edited 11 times in total.
User avatar
Gogie
Modeling Master
Modeling Master
Posts: 708
Joined: Fri Mar 31, 2006 11:02 pm
Projects :: Tinkering away with LEGO
Location: alberta, canada

Re: Need help with cloth in xsi: BBOX, Cloth Constraints

Post by Gogie »

You can’t port in your collisions and reexport your gunna have to remake your collisions. I assure you the triangle and normal strip information of the primitives does not import or reexport properly
Sporadia
Corporal
Corporal
Posts: 151
Joined: Thu Jan 24, 2019 11:02 pm
Projects :: No Mod project currently
Games I'm Playing :: None
xbox live or psn: No gamertag set

Re: Need help with cloth in xsi: BBOX, Cloth Constraints

Post by Sporadia »

I have tried making new collision primatives twice, once with spheres and once with a mix of spheres and cylinders. Also see EDIT2. I hexedited the exported cloth MODL back into the original Sidious msh (with his original, stock collision primitives untouched) and it still didn't work. There has to be a problem in the cloth MODL.

EDIT: And I've checked with the BF2ModTools command 'render_cloth_connections'. I can see that the primitives are there. They do have different data after they've been exported, so I can imagine them breaking from time to time. But in this case I've tested it without using the exported primitives. Plus the exported primitives on their own didn't seem to cause any issues.
User avatar
Gogie
Modeling Master
Modeling Master
Posts: 708
Joined: Fri Mar 31, 2006 11:02 pm
Projects :: Tinkering away with LEGO
Location: alberta, canada

Re: Need help with cloth in xsi: BBOX, Cloth Constraints

Post by Gogie »

Strange, either way I’ll show you my workflow when I’m home, I believed at one point as well that there was an issue with constraints, however if you modify your collisions using only ppg you can see the influence from those collisions on the cloth.

Edit: also for use in xsi ze tools your cloth should be quads, if your cloth is triangulated that may be cause for some issues
Sporadia
Corporal
Corporal
Posts: 151
Joined: Thu Jan 24, 2019 11:02 pm
Projects :: No Mod project currently
Games I'm Playing :: None
xbox live or psn: No gamertag set

Re: Need help with cloth in xsi: BBOX, Cloth Constraints

Post by Sporadia »

I've not been using the scale on the right hand side (which I assume would change the scale of the primitives under TRAN). I've been changing the radius in the box that comes up when you create the primitives. But still, stock primitives aren't working and the skirt MODL's COLL is exactly the same, at a binary level, to the COLL which was imported. Those are the only parts of the cloth msh that are believed to affect collision. As for enveloping, the FIDX and FWGT are also exactly the same, at a binary level. The ENVL is correct too. Every other part of the MODL looks the same before and after export (but they're too big for me to check completely) except: BBOX, SPRS, CPRS, and BPRS which are very different.

EDIT: It could be a quads thing tbf. Every skirt I've tried, (including how stock Sidious is set up) is arranged in something like a row of rectangles, but with a diagonal edge splitting each square into two triangles. Could that be messing up the export?
User avatar
Gogie
Modeling Master
Modeling Master
Posts: 708
Joined: Fri Mar 31, 2006 11:02 pm
Projects :: Tinkering away with LEGO
Location: alberta, canada

Re: Need help with cloth in xsi: BBOX, Cloth Constraints

Post by Gogie »

And again are you exporting only quads? Do you have additional operators under your geometry prior to export. Either way I’ll do a video on how I do cloth. But collisions definitely work.

Edit just saw your edit, and not being quads can affect the outcome of your cinstraints IIRC.
Sporadia
Corporal
Corporal
Posts: 151
Joined: Thu Jan 24, 2019 11:02 pm
Projects :: No Mod project currently
Games I'm Playing :: None
xbox live or psn: No gamertag set

Re: Need help with cloth in xsi: BBOX, Cloth Constraints

Post by Sporadia »

Thanks. I won't try anymore until tomorrow, but I'll delete all the diagonal edges and see what happens.
User avatar
Gogie
Modeling Master
Modeling Master
Posts: 708
Joined: Fri Mar 31, 2006 11:02 pm
Projects :: Tinkering away with LEGO
Location: alberta, canada

Re: Need help with cloth in xsi: BBOX, Cloth Constraints

Post by Gogie »

If you select your mesh and go model > poly mesh > quadranglulate it could save you some work there
Sporadia
Corporal
Corporal
Posts: 151
Joined: Thu Jan 24, 2019 11:02 pm
Projects :: No Mod project currently
Games I'm Playing :: None
xbox live or psn: No gamertag set

Re: Need help with cloth in xsi: BBOX, Cloth Constraints

Post by Sporadia »

This has half fixed the problem. When I import a model it automatically triangulates the cloth. Quadrangulating the cloth again before exporting has made it a lot better. Also when I check the new file in a hexeditor, it actually has a CPRS this time. The problem I have now is that the skirt is clipping through the back of Sidious' right leg. Every other part of the skirt is fine. The fixed points are fine too. There's no weird distortion anymore. It just looks like the right leg has no collision.

Looking at the new exported file in a hexeditor (the quadrangulated one), it has a different CMSH this time compared the imported stock model (probably as a result of being quadrangulated before being exported). Plus when I import the new model into softimage, it triangulates the cloth in a different way. The stock model imports every qaud with a diagonal line going from the top right corner down to the bottom left corner. The new model imports with the diagonals in random directions. The cloth constraints and BBOX are still different too, but might be fine now anyway as I say.

The actual collision (the COLL section) is still unchanged. Same for the UVs and CPOS. And, I've tested it by hexediting the new MODL into the stock Sidious msh again to rule out broken collision primatives. So I don't know if it's a new CMSH problem or if it's still a constraint problem.

EDIT: Or maybe it looks like the cloth behind the right leg is being pulled to the wrong side of the collision primitives. It might just be that the new cloth isn't stretching the same way as the old one. Going to tweak a few things.
Last edited by Sporadia on Sat Sep 19, 2020 10:10 am, edited 2 times in total.
User avatar
Gogie
Modeling Master
Modeling Master
Posts: 708
Joined: Fri Mar 31, 2006 11:02 pm
Projects :: Tinkering away with LEGO
Location: alberta, canada

Re: Need help with cloth in xsi: BBOX, Cloth Constraints

Post by Gogie »

Out of curiosity what are you using for primitives? I’ve noticed the most effective are spheres but pandemic used cylinders a lot.
Sporadia
Corporal
Corporal
Posts: 151
Joined: Thu Jan 24, 2019 11:02 pm
Projects :: No Mod project currently
Games I'm Playing :: None
xbox live or psn: No gamertag set

Re: Need help with cloth in xsi: BBOX, Cloth Constraints

Post by Sporadia »

Atm spheres

EDIT (moved from post above): Yeah, I've been trying different fixed points and collision primitives again to force the cloth around more of the right leg. If I had to guess, it looks like the cloth on the left leg is pulling the skirt through the right leg. Maybe an easy fix is making the skirt bigger (haven't tried that yet today). Or I think I need to somehow set the cloth constraints to allow stretching across the horizontal edges of the cloth. I'm not sure what the algorithm does for the SPRS normally. I should also point out that I've been using an odf with obi-wan's animations this whole time, so it has quite a wide stance.

EDIT: Bigger skirt was not a solution. But the bigger skirt was clipping through the left leg too sometimes so I don't know what's happening.
User avatar
Gogie
Modeling Master
Modeling Master
Posts: 708
Joined: Fri Mar 31, 2006 11:02 pm
Projects :: Tinkering away with LEGO
Location: alberta, canada

Re: Need help with cloth in xsi: BBOX, Cloth Constraints

Post by Gogie »

one thing that i like to try is instead of adding all my collisions at once, i do it one at a time and test to see the difference, i usually add a lot more collisions than the stock game, but if you know the right leg is the problem right now, try creating a collision on the right leg only first, a few collisions... if they dont work, youve narrowed it out to an issue with the mesh in that area.

edit: its worth noting that i dont port in cloth, so i dont know the effect that will have on geometry.
Sporadia
Corporal
Corporal
Posts: 151
Joined: Thu Jan 24, 2019 11:02 pm
Projects :: No Mod project currently
Games I'm Playing :: None
xbox live or psn: No gamertag set

Re: Need help with cloth in xsi: BBOX, Cloth Constraints

Post by Sporadia »

Thanks. I'll give that a try.

PS. Looks like one effect of importing cloth is definitely triangulation. Might be because CMSH stores data as triangles, so the import tool reads them.
Last edited by Sporadia on Sat Sep 19, 2020 10:25 am, edited 1 time in total.
User avatar
Gogie
Modeling Master
Modeling Master
Posts: 708
Joined: Fri Mar 31, 2006 11:02 pm
Projects :: Tinkering away with LEGO
Location: alberta, canada

Re: Need help with cloth in xsi: BBOX, Cloth Constraints

Post by Gogie »

:) you can stop triangulation in your import settings with XSIZETOOLS
Sporadia
Corporal
Corporal
Posts: 151
Joined: Thu Jan 24, 2019 11:02 pm
Projects :: No Mod project currently
Games I'm Playing :: None
xbox live or psn: No gamertag set

Re: Need help with cloth in xsi: BBOX, Cloth Constraints

Post by Sporadia »

EDIT2: This post is outdated. By all means use this information for research purposes, but the main problem is (soon will be) fixed for ZETools 1.3.0036. Note: You still need to quadrangulate your cloth, remake your collision primitives after import and make sure your fixed points all touch each other

Yep. I have triangulation ticked. That probably doesn't help... Didn't even know those settings were there tbh.

EDIT log:
Hidden/Spoiler:
I just imported the stock Sidious with triangulation unchecked. The cloth is triangulated anyway?

Tested reimporting one of my old test exports aswell (which was quadrangulated before it was exported). It looks like the cloth is actually being triangulated by default. Maybe during the export or something. Still makes sense, because ANDEWEGET's documentation says CMSH contains triangle data, not quad data.

So I've a done a test with no collision primitives down the right leg. And done a test with 1 collision primitive (sphere) on the right thigh. In both cases I had collision primitives on the left leg and the front of the cloth enveloped (with fixed points) to both legs. In both cases the right hand side of the cloth moves with the right leg, which I think is the fixed points working. But I'm not sure if fixed points are actually in the positions they're supposed to be in, or if they're too far to the left. In xsi, it looks like the fixed points should be covering the whole front of the right leg. In practice the cloth barely reaches the leg; it isn't covering the front.

When I had the collision sphere on the thigh, I used 'render_cloth_connections' and 'slowmo 7' to watch how the cloth was interacting with the sphere as Sidious strafed. When his right leg is far out behind, and his left leg is far in front, the cloth sits in front of the sphere, with the sphere outside ofthe skirt. Then, as his right leg moves forward, and his left leg moves back, the cloth sort of jumps through the sphere (there is a notable wobble when the cloth clips past) and the sphere ends up inside the skirt where it's supposed to be. Continuing, as the right leg stretches out in front, and the left leg stretches out behind, the cloth clips past the sphere (another noticable wobble as the cloth jumps) so that the cloth is behind the sphere, and the sphere is outside the skirt again. The opposite happens as the leg moves back in the other direction. So it's definitely interacting with the collision primitives because it wobbles/jerks when it clips through. It really looks like the cloth doesn't want to stretch itself to stay wrapped around the collision primitives when the legs are far apart. That's a constraint problem.

Done another test. This time I removed all fixed points which were enveloped to the left leg, and deleted the collision primitives on the left leg. So the only collision primitive was on the right thigh (and all the enveloping was on the pelvis and right leg). Right leg works fine in this test. The cloth stays on the outside of the collision primitive the whole time.

I also have a hunch that the coloured wireframes that appear across the cloth when I use 'render_cloth_connections' might represent the cloth constraints. The purple wireframe goes across the faces of the polygons like CPRS, and the blue and red wireframes go down the edges. They don't cross every face or every edge. It would help if I could remember whether or not the purple wireframe first appeared when I started quadrangulating, but I have no idea. I'll test a triangulated export to see if it's missing. Taking that into consideration, the stock Sidious skirt would work by having no cloth constraints along the front of the skirt (between the fixed points). All the cloth constraints (coloured wireframes) are in the sides/back where the points aren't fixed (and the pelvis fixed points have the blue wireframe but not the other two). Compare that to my exported Sidious which has all three wireframes covering the whole skirt. I don't think you're supposed to have constraints between four fixed points, which are fixed to two different bones. ie a square where the left side is fixed to the left thigh and the right side is fixed to the right thigh shouldn't have constraint data, because it needs to stretch.

After removing each cloth constraint with a hexeditor: Red wireframe is SPRS, purple wireframe is CPRS and blue wireframe is BPRS when using 'render_cloth_connections'. (Also spherical collision primitives appear as red wireframes, but I'm ignoring those.) So I can see that the stock Sidious skirt has its cloth constraints set up differently to what softimage exports.

Summary
I made quite a lot of updates to this post in a row so I just want to summarise it all, and clarify what stage I'm at currently.
First, I've moved back to working on Deviss' Barriss model rather than testing on Sidious. The stock Darth Sidious has fixed points running down the front of the skirt, and loose cloth in the back/sides. The front of Sidious' skirt is enveloped to the different bones in his legs (this helps the cloth's collision during his walk cycle).

Darth Sidious' Enveloping and Fixed Points as viewed in xsi (image):
Hidden/Spoiler:
Image
This shows the enveloping of every point on Darth Sidious' skirt. In practice, the cloth's fixed points are the only points which use the envelope. See the fixed points image. I did redo the enveloping because it imports with a different colour scheme, but I've enveloped all same points to the same bones here.

Image
This shows the fixed points on Darth Sidious' skirt (white)

So I've rigged Barriss' skirt in the same style (image):
Hidden/Spoiler:
Image
This is how I've done the enveloping for Barriss' skirt

Image
This shows the fixed points I've set up on Barriss' skirt (white). Note that the other (non-fixed) points will lose their enveloping after export.

I've also used spheres to set up all Barriss' collision primitives. And that's as much as I can do in xsi. But, there's something else the stock Darth Sidious' skirt does that makes it work. The stock Sidious skirt has its cloth constraints set up in a very specific way. In the debug console, you can use render_cloth_connections to view all the collision primitives, and all the constrained edges/faces of the cloth. Sphere collision primitives show up as red wireframes, cylinder collision primitives look like big white cuboids (I haven't tried actual cuboids yet). Then every edge with a stretch-constraint (SPRS) shows up as a red wireframe aswell. Every edge with a bend-constraint (BPRS) shows up as a blue wireframe. And every cross-constraint (CPRS) shows up as a purple wireframe. I was looking at this for a long time before I realised what I was looking at.

So looking at the cloth constraints for stock Darth Sidious (image):
Hidden/Spoiler:
Image
Darth Sidious, as viewed from the front, with render_cloth_connections. Don't mind those red lines in the front. Those are his collision primitives sticking through, not SPRS data.

Image
Darth Sidious, as viewed from behind, with render_cloth_connections

You can see that there aren't any cloth constraints on the front of his skirt. All of the loose cloth has constraints set up, but the fixed points don't. And when you think about it, and look at the fixed points in xsi, that makes perfect sense. If one corner of a polygon is fixed to the left thigh, and the next corner is fixed to the right thigh. That polygon needs to bend and stretch when the legs move. If you put a stretch-constraint or a bend-constraint along the edge between those points, you're telling the polygon not to change shape when its corners are moving. It doesn't work; it artefacts. And that's the stage that I'm at right now. ZETools exports cloth with the cloth constraints covering the whole cloth. I'd like to remove the cloth constraints from the front of Barriss' skirt so it works like Darth Sidious' robe. So I've exported my best Barriss (image):
Hidden/Spoiler:
Image
Barriss, as viewed from the front, with render_cloth_connections. There's a skirt and a cape. That artefacting looks awfully like a collision problem, but I'm pretty sure it's happening because of the cloth constraints. Also, her cape has its own collision primitives which are appearing in this photo, so there are quite a few extra red lines that might look out of place.

And now I'm looking for ways to remove the cloth constraints from specifically the front of the skirt. Seems like I'll have to hexedit the SPRS, CPRS and BPRS data.

Other things I've learned:
  • When you import cloth into xsi with ZETools, it is always triangulated, regardless of how you set the triangulation setting.
  • If you don't quadrangulate your cloth before exporting, it will export with no cross-constraint data (CPRS) at all.
  • In Gogie's experience, importing models to xsi can corrupt the collision primitives, so it's best to remake the collision primitives before exporting.
Link to images in this post: https://imgur.com/a/3CbYTyh?
Last edited by Sporadia on Sat Sep 26, 2020 4:30 pm, edited 7 times in total.
User avatar
Gogie
Modeling Master
Modeling Master
Posts: 708
Joined: Fri Mar 31, 2006 11:02 pm
Projects :: Tinkering away with LEGO
Location: alberta, canada

Re: Need help with cloth: Cloth Constraints

Post by Gogie »

very nice, in terms of your research, XSIZETOOLS and the original pandemic exporter are both open source, if you ever feel like trying your hand at making a fix instead of hex editing the change of information. also the difference between the two in their coding may shed some light on your issue. For now ill put a link to your post in the 3D animation FAQ.
Sporadia
Corporal
Corporal
Posts: 151
Joined: Thu Jan 24, 2019 11:02 pm
Projects :: No Mod project currently
Games I'm Playing :: None
xbox live or psn: No gamertag set

Re: Need help with cloth: Cloth Constraints

Post by Sporadia »

Hexediting worked. It's actually more tedious than difficult, because the FIDX lists the fixed points by number (as longints). Then the SPRS, CPRS and BPRS actually use the same numbers (it stores the points either side of each constraint, in the form shortint shortint. eg. a constrained edge between point 46 and point 48 is simply stored as: shortint 46, shortint 48. You can read more in ANDEWEGET's documentation). Just deleted every constraint between 2 fixed points and it fixed the problem. I think I'm going to take your advice and try write a program that fixes this automatically, because I have some further tweaks I want to make I don't want to have to do this by hand every time. Not making any promises at the moment though, because I'm not that familiar with programming outside of what gets used for modding. If I do make it, I'll post it here. Thanks again for your help with xsi.
User avatar
ANDEWEGET
Ancient Force
Ancient Force
Posts: 1266
Joined: Tue Apr 01, 2008 8:42 am
Location: Germany
Contact:

Re: [SOLVED] Need help with cloth: Cloth Constraints

Post by ANDEWEGET »

Quads is a sort of requirement for the current algorithm to figure out cross constraints in cloth. Cloth being imported as tris is probably because only tris are stored in CMSH (not sure though).

To recap your findings on the constraints and fixed points:

1. Constraints between _only_ fixed points should be ignored/removed

2. Constraints between fixed _and_ dynamic points still persists

Are these two correct?
Sporadia
Corporal
Corporal
Posts: 151
Joined: Thu Jan 24, 2019 11:02 pm
Projects :: No Mod project currently
Games I'm Playing :: None
xbox live or psn: No gamertag set

Re: [SOLVED] Need help with cloth: Cloth Constraints

Post by Sporadia »

tldr: Yes.

Stament 1 is definitely correct; statement 2 is possibly correct. I've only done this to one msh so far, and in that case I left in the constraints between fixed and dynamic points, and the end result was a working skirt. So it's only one example to go on, but yes I'd keep the constraints between fixed and dynamic points. Admittedly, it does leave in an issue eg. if you have an edge which goes: 'fixed point (left thigh), dynamic point, fixed point (right thigh)' then I'd expect that to still artefact because the constraints on the dynamic point will force the fixed points to stay together when the bones might want them to move apart.

Personally, I more see that as an xsi design problem where people need to make sure that all their fixed points are touching (or separated by a lot of loose cloth). But, I don't know what the consensus is from other modders. It's only going to be a problem if someone wants to envelope a cloth to multiple bones (which is rare enough) and they for some reason need a very small strip of dynamic cloth between the fixed points and can't possibly design around it. Plus I don't know what the consequences are to removing all constraints between the fixed and dynamic points.

I've been looking at c++ tutorials because I wanted to write a program that uses the FIDX to clean up the SPRS, CPRS and BPRS after export but I wasn't expecting this thread to be seen by anyone who worked on ZETools. Are you planning on making an update to the exporter?

EDIT: I've looked at the hex data for the stock Sidious msh to check how it's set up. It does have dynamic points constrained to fixed points. So it's actually a clear yes to both your statements if you want to replicate how Pandemic did it. People in xsi will just have to make sure that all their fixed points touch.

This will still be a broken design (I expect):
X X X X o X X X X
X X X X o X X X X
o o o o o o o o o
X X X X o X X X X
X X X X o X X X X

Key:
X fixed point (different colours fixed to different bones)
o dynamic point

This is the preferred design:
X X X X X X X X X X
X X X X X X X X X X
X X X X X X X X X X
X X X X X X X X X X
X X X X X X X X X X
User avatar
ANDEWEGET
Ancient Force
Ancient Force
Posts: 1266
Joined: Tue Apr 01, 2008 8:42 am
Location: Germany
Contact:

Re: [SOLVED] Need help with cloth: Cloth Constraints

Post by ANDEWEGET »

Thanks for checking the assumptions. The changes aren't that major so I've implemented them. However I don't have XSI installed or a modding env set up. Do you mind downloading the latest version from https://github.com/Schlechtwetterfront/xsizetools (the "Code" button top right) and checking if it now behaves as expected?
Post Reply