STRP, CMSH, Hexediting cloth question

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
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

STRP, CMSH, Hexediting cloth question

Post by Sporadia »

Very specific question.

I have Deviss' Barriss Offee model and I'm trying to convert her skirt to a cloth (since it's not originally a cloth MODL). I don't have XSI or any modelling software so I'm trying to hexedit it.

At the moment I have no idea what to put in the CMSH. Can I use the information that was originally in the STRP to work out what triangles to put in the CMSH? How do STRP and CMSH work exactly? STRP looks like it goes longint, shortint, longint, shortint... and I get from the references on GT that the shortints are indexing the POSL, but what do the longints represent? I don't understand them. The CMSH structure looks simple but it's going over my head too.

I haven't tried to hexedit anything this advanced before. The most hexediting I've done before this is copying over MODL chunks and moving them with TRAN.
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: STRP, CMSH, Hexediting cloth question

Post by Gogie »

your better off just doing it in XSI.

first off, in order to get cloth to work you would have to translate STRP into CMSH

STRP works by going CW > CCW > CW > CCW

First longint is : number of indices into POSL (POSL is your list of vertex coordinates Longint (numberofvertice), float3 (vetexcoordinates xyz))
second shortint is: index into POSL

CMSH on the other hand, need CPOS which is your list of vertex coordinates (xyz) and CMSH is only triangle information CCW.

on top of that, you need your SPRS (sheer constraint) for each edge. your CPRS (cross constraint) for each poly face, and your BPRS (bend constraint) for border points.

You then also need COLL for your cloth collisions, which then need c_ primitives each with their triangle information stored as well...

this takes only two click in XSI... dont try to hex edit it... its a GIANT waste of time.
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: STRP, CMSH, Hexediting cloth question

Post by Sporadia »

The only reason I don't use XSI is because I don't think it's open source, and don't know where to download it from if it is. Otherwise I would. But I know it would be easier.

Though for COLL I was just going to borrow another msh's c_primitives to be fair. The constraints I haven't figured out yet but I haven't attempted them yet either. And the weighting I think is going to be a pain. I've converted the WGHT to FNDX and FWGT already, but atm I've converted every single point to a fixed point, and I'd need to figure out which ones to remove later.

I'm struggling to understand the definition you've given on the STRP longint. I've looked at the msh reference on the sticky and it says the same thing, but when I actually look at the values of the longints in my hexeditor they are all huge numbers. I'm having trouble understanding how they have anything to do with POSL.
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: STRP, CMSH, Hexediting cloth question

Post by Gogie »

viewtopic.php?f=36&t=14467

Link to the FREE softimage 7.5 mod tool, which is compatible with ANDEWEGET's XSIZETOOLS

[EDIT] the longint is just a number that tells you how many entries are in the next value 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: STRP, CMSH, Hexediting cloth question

Post by Sporadia »

Thanks, I'll try it with softimage.

But if you want an example of what this STRP looks like (and why I don't understand it), the STRP looks like this:
1024, 510, -2147385344, 2, -2147385341, 4, -2147254267, 6, -2146992125, 1... where the green numbers are the longints

EDIT: That's how they appeared using XVI32
Post Reply