GTA5: Cloth-simulated meshes

Forum for discussing title-page news and events around ZModeler

Moderator: Oleg

User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: GTA5: Cloth-simulated meshes

Post by Oleg »

i'm exploring the cloth-only yft files currently and can't get them to work. the cloth appears as arbitrary object and does not perform cloth simulation. Is this what you get in your test?
pnwparksfan
Posts: 55
Joined: Wed Feb 14, 2018 7:24 pm

Re: GTA5: Cloth-simulated meshes

Post by pnwparksfan »

I haven't tried making an entirely new cloth-only model yet, only editing existing ones. In testing with the flag props and with vb_28_tape.yft in both cases nothing spawned at all when I just exported it even without changes. I was finally able to get custom cloth working in a prop by using the structure of prop_beach_parasol_06, removing all but one poly from all the non-cloth meshes, replacing the .cloth with a custom one, and setting the .cloth material to adapt cloth_normal_spec. That is working for me now in-game.
pnwparksfan
Posts: 55
Joined: Wed Feb 14, 2018 7:24 pm

Re: GTA5: Cloth-simulated meshes

Post by pnwparksfan »

Did some more testing recently and made a new mesh that I applied cloth settings to. Discovered that some combinations of the values in User Defined Options on a .cloth node result in the cloth being completely invisible in game. When I import cloth-only props, they only appear about half of the options, and don't appear when exported as such.
pnwparksfan
Posts: 55
Joined: Wed Feb 14, 2018 7:24 pm

Re: GTA5: Cloth-simulated meshes

Post by pnwparksfan »

Oleg, do you have any idea which parameter (if any) might control how far the cloth can stretch? I've noticed that with very large cloth pieces, they will bend very far, and it seems to bend the same amount regardless of any options which I apply. Perhaps it's related also to the number of polygons?
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: GTA5: Cloth-simulated meshes

Post by Oleg »

if i'm not mistaken, the first parameter (elasticity?) should be very small value like 0.0005 to prevent excessive stretch.
pnwparksfan
Posts: 55
Joined: Wed Feb 14, 2018 7:24 pm

Re: GTA5: Cloth-simulated meshes

Post by pnwparksfan »

Oleg wrote:if i'm not mistaken, the first parameter (elasticity?) should be very small value like 0.0005 to prevent excessive stretch.
Even at very low elasticity like 0.0001 it still seems to stretch the same amount.
pnwparksfan
Posts: 55
Joined: Wed Feb 14, 2018 7:24 pm

Re: GTA5: Cloth-simulated meshes

Post by pnwparksfan »

Would it be possible for you to check when exporting cloth objects, and if no vertices have a static point, warn the user? On a couple occasions I've accidentally forgotten to set or accidentally deleted all of the static vertices. Then when I got in game I was of course confused why my cloth disappeared! A warning on export would help prevent these sorts of mistakes.
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: GTA5: Cloth-simulated meshes

Post by Oleg »

1. Export warning added on missing static points.
2. The particular issue with cloth shaders mentioned above is solved (only normal-mapped cloths were working, now any cloth shader should work fine).
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: GTA5: Cloth-simulated meshes

Post by Oleg »

I've made a video guide on player/ped cloth models:
Se1M7xfdDfc
oggy
Posts: 4
Joined: Sun Nov 25, 2018 4:30 pm

Re: GTA5: Cloth-simulated meshes

Post by oggy »

I want this flag where can i find it?
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: GTA5: Cloth-simulated meshes

Post by Oleg »

I can't remind and exact location, but it is in "roof tops" RPF file named flag_us.yft
The particular model and cloth model was remodelled (Create/Surface/Grid) with higher poly count for better look, original texture and cloth parameters were used.
oggy
Posts: 4
Joined: Sun Nov 25, 2018 4:30 pm

Re: GTA5: Cloth-simulated meshes

Post by oggy »

Oleg wrote:I can't remind and exact location, but it is in "roof tops" RPF file named flag_us.yft
The particular model and cloth model was remodelled (Create/Surface/Grid) with higher poly count for better look, original texture and cloth parameters were used.
I found the flag but i couldnt find the pole if you could help me with that i'd appreciate it.

Thanks.
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: GTA5: Cloth-simulated meshes

Post by Oleg »

if i'm not mistaken, it comes as a regular mesh in the same file, and the flag goes as .cloth object. toggle L0, L1 buttons, flag pole might be there.
Kwabzmodding

Re: GTA5: Cloth-simulated meshes

Post by Kwabzmodding »

The error coming up is "Inconsitent setup in cloth data on component "uppr_000_u". Cloth simulation is not applied.
"
do you have any suggestions as how to resolve this issue
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: GTA5: Cloth-simulated meshes

Post by Oleg »

is this an import error or an export error? do you get this on your own model or on original model?

This error appears when cloth geometry is inconsistent - has no vertices or polygons or not bound to a skeleton. Ensure your .cloth is bind to .skel and has influence painted on cloth vertices. You can paint influence of bones that affect "static" points only, as the rest can be cloth-simulated with no skeleton/bones affection.
Kwabzmodding

Re: GTA5: Cloth-simulated meshes

Post by Kwabzmodding »

@Oleg
this is an import error, that seems to come from my cloth not exporting properly, when i try to paint the verts i want to be static, it says .cloth node has no color in vertex format
Kwabzmodding

Re: GTA5: Cloth-simulated meshes

Post by Kwabzmodding »

Oleg wrote:is this an import error or an export error? do you get this on your own model or on original model?

This error appears when cloth geometry is inconsistent - has no vertices or polygons or not bound to a skeleton. Ensure your .cloth is bind to .skel and has influence painted on cloth vertices. You can paint influence of bones that affect "static" points only, as the rest can be cloth-simulated with no skeleton/bones affection.
was experimenting by moving the skelton around turns out its not binded or conncted to the skelton but whenever i try to bing the cloth mesh to the skelton is shows me this

"(null)" is already bind to marked skeleton. Hide old skeleton, mark new skeleton to rebind with automatic weight remapping.
Binded ".cloth" and ".skel".
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: GTA5: Cloth-simulated meshes

Post by Oleg »

Binded ".cloth" and ".skel".
is a correct message.
Make sure .cloth object is located in .global branch.
Kwabzmodding

Re: GTA5: Cloth-simulated meshes

Post by Kwabzmodding »

Oleg wrote:Binded ".cloth" and ".skel".
is a correct message.
Make sure .cloth object is located in .global branch.
Thanks and turns out it was the properties in the mesh i was trying to bind and copy weights to, looks like i didnt turn on rigging or assign the amount of bones it could be rigged to.
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: GTA5: Cloth-simulated meshes

Post by Oleg »

well, yes, this could be the cause too.

Just in case anyone else needs a solution:
any object you want to be rigged should have Rigging and Max bones = 4 on properties->mesh->vertices->format.
Kwabzmodding

Re: GTA5: Cloth-simulated meshes

Post by Kwabzmodding »

Oleg wrote:well, yes, this could be the cause too.

Just in case anyone else needs a solution:
any object you want to be rigged should have Rigging and Max bones = 4 on properties->mesh->vertices->format.
i figured out how to apply cloth physics to addon peds, but for some reason when i export and import the some of the numbers for the user defined properties like freedom and response have been removed, make the cloth react less to the wind in certain directions,

for example on export i would have the properties for freedom at "0, 0.20, 0.35, 0.50, 0.75, 1" and on import when i want to check them it is "0, 0.75, 1", response could also be "0.0010, 0.0009" but on import it would turn into just " 0.001" could you please help me with why some of the values are being removed.
Kwabzmodding

Re: GTA5: Cloth-simulated meshes

Post by Kwabzmodding »

managed to figure out that the numbers weren't showing on import because i didnt assign all the levels to the verts, but even though now they are showing on import they are not responding to the wind in game the cloth still remains stationary and when i do increase the response it just flys directly upwards
Kwabzmodding

Re: GTA5: Cloth-simulated meshes

Post by Kwabzmodding »

[img]<blockquote%20class="imgur-embed-pub"%20lang="en"%20data-id="a/CWunSz3"><a%20href="//imgur.com/a/CWunSz3"></a></blockquote><script%20async%20src="//s.imgur.com/min/embed.js"%20charset="utf-8"></script>[/img]

any reason why my cloth comes out flat and unresponsive to the wind?
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: GTA5: Cloth-simulated meshes

Post by Oleg »

when you toggle wind on/off via trainer, do you see any effect on a cloth?
also, you should import any original model with cloth to check default values, start from default values in user-defined options, as these are well-configured; then you can change them slightly. I could be wrong, your "response" value looks not OK to me.
Post Reply