[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

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

Post by Sporadia »

Old Post (I've already solved this):
Hidden/Spoiler:
What's the correct way to install this? I have xsizetools 1.3.0035 installed. I tried adding the folder from github along side it, but it kept using the regular 1.3.0035 (with the cloth constraints between fixed points).

Then I tried deleting version 1.3.0035 and only using the github version, but the github version didn't work.

Then I tried extracting the github folder into the 1.3.0035 folder and using that instead. ZETools still didn't work.

Then I tried starting again, with a new copy of 1.3.0035. I extracted the github folder somewhere else, took out the new applications folder, and copied that into the 1.3.0035 folder (1.3.0035 was used as the addon). ZETools still didn't work.

Finally, I started again... again. Took only the file msh.py from the github version and copied that into version 1.3.0035. ZETools still didn't work.

Every attempt (except the first, when xsi seemed to be using 1.3.0035 instead of any github files) has given me the same error. I bring up the import window with ZETools > Import, then at the bottom of xsi a red error appears: 'ascii' codec can't decode byte 0xXX in position 0: ordinal not in range (128)
I don't know what the hex number refers to. It still brings up the import box, (but the import box has C: filled in, so it doesn't remember the path of the last file I imported). It lets me find the imp_inf_darthsidious.msh file, I hit import and nothing happens. It doesn't bring up a loading bar (I'm calling it a loading bar, I guess it's more of an importing bar); it doesn't raise an error; it doesn't appear to do anything at all.

I've returned back to 1.3.0035 for the time being.

EDIT: Whenever I say 1.3.0035, I mean the original version. I needed some way of distinguishing it from the new version.

Problem 1:
This relates to the post above. In your code you have two comments which look like this:

Code: Select all

            #
            # p1   p2     p3
            # ┌─────┬─────┐
            # │     │     │
            # │ p8  │ p9  │ p4
            # ├─────┼─────┤
            # │     │     │
            # │     │     │
            # └─────┴─────┘
            # p7    p6    p5
            #
Delete them. Because xsi's python compiler can't read those characters, and it throws an ascii error which breaks all of ZETools.

Problem 2:
I've fixed problem one. Now this is an error I encountered when trying to export:

Code: Select all

Last 15 log lines:


	INFO (396, get_faces): Processed 8 faces.
	INFO (1158, clear_doubles): Cleared 0 doubles.
	INFO (33, __exit__): Cleared multiverts in 0s 0ms.
	INFO (33, __exit__): Segments in 0s 85000ms.
	INFO (33, __exit__): Model in 0s 91000ms.
	INFO (945, do_export): Finished processing.
	INFO (941, do_export): Processing model "imp_inf_darthsidious_robe".
	INFO (660, convert): Is cloth.
	INFO (563, get_cloth_geo): Retrieved cloth deformers: [u'bone_root', u'bone_pelvis', u'bone_r_thigh', u'bone_r_calf', u'bone_l_thigh', u'bone_l_calf'] (6)
	INFO (587, get_cloth_geo): Processed 153 vertices.
	INFO (33, __exit__): Cloth geometry in 0s 119000ms.
	INFO (33, __exit__): Cloth constraints in 0s 0ms.
	INFO (33, __exit__): Cloth Segment in 0s 121000ms.
	INFO (33, __exit__): Model in 0s 141000ms.
	INFO (33, __exit__): Models in 1s 426000ms.


Traceback:


	Traceback (most recent call last):
	  File "<Script Block >", line 28, in exportbutton_OnClicked
	  File "C:\...\Autodesk\Softimage_Mod_Tool_7.5\Addons\xsizetools-1.3.0035\Application\Core\zetexport.py", line 899, in export
	    self.do_export()
	  File "C:\...\Autodesk\Softimage_Mod_Tool_7.5\Addons\xsizetools-1.3.0035\Application\Core\zetexport.py", line 944, in do_export
	    self.msh.models.add(conv.convert())
	  File "C:\...\Autodesk\Softimage_Mod_Tool_7.5\Addons\xsizetools-1.3.0035\Application\Core\zetexport.py", line 663, in convert
	    self.msh2_model.segments = self.get_cloth()
	  File "C:\...\Autodesk\Softimage_Mod_Tool_7.5\Addons\xsizetools-1.3.0035\Application\Core\zetexport.py", line 632, in get_cloth
	    clothgeo.create_constraints()
	  File "C:\...\Autodesk\Softimage_Mod_Tool_7.5\Addons\xsizetools-1.3.0035\Application\Modules\msh2.py", line 1346, in create_constraints
	    both_fixed = vert.is_fixed and last_vertex.is_fixed
	AttributeError: 'int' object has no attribute 'is_fixed'
	
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 »

Alright, I fixed those issues. The export should run through now, just couldn't test the result in-game. Mind testing again?

The best way to install to is to move the old folder (1.3.0035) out and move the one from Github in. That way there should be no conflicts.

The new version will be 1.3.0036, I just didn't update the version yet so any existing installations should not pick up the current state as a new version yet.
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 »

Done. Gave stock Sidious the import >> quadrangulate cloth >> export treatment. Checked the hex constraint data and it all looks good. Put him ingame with render_cloth_connections and it both looks and works just like stock. I think this is sorted now! Tysm!
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 »

Very cool. Thanks for your help.
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 »

Just want to add a final note on this. With these changes to ZETools, I can test models straight after exporting them and it's obviously made the whole process much faster. I've just noticed that polygons with 5 or more vertices (all fixed) still export with a few constraints where they shouldn't have them. If anyone encounters this, just add some edges to split those polygons up into triangles and quadrilaterals. It should sort everything out. Also, skirts are still a very temperamental thing to try model. I'm wondering if it's a coincidence that there's only one stock character with a full length robe/skirt, and he doesn't move his legs very much.
Post Reply