GTA5: Cloth-simulated meshes

Post a reply

Smilies
:D :) :( :o :shock: :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Topic review
   

Expand view Topic review: GTA5: Cloth-simulated meshes

Re: GTA5: Cloth-simulated meshes

Post by Oleg » Thu Apr 05, 2018 9:42 am

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).

Re: GTA5: Cloth-simulated meshes

Post by pnwparksfan » Tue Mar 20, 2018 2:50 pm

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.

Re: GTA5: Cloth-simulated meshes

Post by pnwparksfan » Mon Mar 19, 2018 5:52 am

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.

Re: GTA5: Cloth-simulated meshes

Post by Oleg » Sun Mar 18, 2018 11:09 pm

if i'm not mistaken, the first parameter (elasticity?) should be very small value like 0.0005 to prevent excessive stretch.

Re: GTA5: Cloth-simulated meshes

Post by pnwparksfan » Sun Mar 18, 2018 7:16 pm

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?

Re: GTA5: Cloth-simulated meshes

Post by pnwparksfan » Thu Mar 15, 2018 1:27 pm

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.

Re: GTA5: Cloth-simulated meshes

Post by pnwparksfan » Mon Mar 12, 2018 11:49 pm

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.

Re: GTA5: Cloth-simulated meshes

Post by Oleg » Mon Mar 12, 2018 11:08 pm

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?

Re: GTA5: Cloth-simulated meshes

Post by pnwparksfan » Mon Mar 12, 2018 9:50 pm

It looks like the problem with exporting cloth props may be related specifically to exporting materials which adapt cloth_spec_cutout. I'm still experimenting, but I imported a mesh from a cloth-only model and replaced the .cloth object on a model with non-cloth and cloth parts. It would spawn in game but the cloth was not visible. After much messing around, I found that if I changed the material of the cloth to adapt cloth_normal_spec instead of cloth_cutout, it does show in game. It just so happens that all of the cloth-only props I've inspected so far are made with cloth_spec_cutout, which may be why none of them were working. I haven't yet tried exporting a new cloth-only prop using this info though.

Re: GTA5: Cloth-simulated meshes

Post by Oleg » Sat Mar 10, 2018 2:19 am

cloth-only models are currently under research.

Re: GTA5: Cloth-simulated meshes

Post by pnwparksfan » Fri Mar 09, 2018 8:04 pm

Oleg wrote:@carloxfranco,
I've checked flag_us models, they contain LODs for geometry and LODs for cloths too. These are importable now, but can't be exported, as lods transition (additional cloth-specific data) requires extra research. You can remove lods from .mesh and from .cloth objects to make it exportable. also, can you specify me a location on map of any of flag_us.yft model?


When I import any models that are only cloth, there is no .mesh object, only a .cloth object, and it isn't assigned to any LOD. Is there a way I can make that sort of object exportable?

By the way, Codewalker has a world model search tool. Open the tools sidebar, then click the Tools menu button and choose World Search. There you can type a model (or part of a model) name and it will list every location in the world where it exists. You can then double-click on an entry to go to that position and see it.

Re: GTA5: Cloth-simulated meshes

Post by Oleg » Fri Mar 09, 2018 11:11 am

thanks, i'll take a look then.

Re: GTA5: Cloth-simulated meshes

Post by _Vlad_ » Fri Mar 09, 2018 10:50 am

Oleg wrote:@carloxfranco,
I've checked flag_us models, they contain LODs for geometry and LODs for cloths too. These are importable now, but can't be exported, as lods transition (additional cloth-specific data) requires extra research. You can remove lods from .mesh and from .cloth objects to make it exportable. also, can you specify me a location on map of any of flag_us.yft model?

I can specify a location, for example at VInewood PD station. Just go to Vinewood and get arrested if u cant find it. In red circle https://pp.userapi.com/c840521/v840521987/637dc/4CHAclrBBb4.jpg
https://pp.userapi.com/c831309/v831309987/9ddc3/mtodwq8rFHA.jpg

Re: GTA5: Cloth-simulated meshes

Post by Oleg » Wed Mar 07, 2018 1:08 am

@carloxfranco,
I've checked flag_us models, they contain LODs for geometry and LODs for cloths too. These are importable now, but can't be exported, as lods transition (additional cloth-specific data) requires extra research. You can remove lods from .mesh and from .cloth objects to make it exportable. also, can you specify me a location on map of any of flag_us.yft model?

Re: GTA5: Cloth-simulated meshes

Post by Yoha » Mon Feb 26, 2018 4:23 am

amazing!!!
the result of cloth on the ped is very nice~~ :shock: :lol:
look forward to the zm3's updated~ :D

Re: GTA5: Cloth-simulated meshes

Post by Oleg » Thu Feb 22, 2018 2:36 pm

well, after some tests with Michael jacket (uppr_000 and uppr_029) I get pretty strange observations. Uppr_000 model has a bit different cloth data, so I tested uppr_029 mostly, as they seem to behave very alike.

Initial spawn gives incorrect model behavior with opposite-direction cloth sway while riding a bike.
However, after a deep crash (later found to be just "get out of bike") the sway becomes correct while riding:
ped_cloth_07.jpg


this is clearly seen on altered (high wind/movement freedom on cloth) model:
ped_cloth_08.jpg


even more, the model gets correct wind response while still riding a bike (stand still)
ped_cloth_09.jpg


but as soon as he gets out of the bike, wind effect changes to incorrect again
ped_cloth_10.jpg


Also, it is clearly seen the game "resets" cloth simulation during "get on the bike" and "get off the bike" animations playback, so I think we have some sort of a bug here (not sure whether the game is the cause or the model or the trainer).

P.S. was still unable to get correct sway on a test model (explicit editing of cloth and an export from ZMod). Making a superhero model with cloak is doubtful to the moment.

Re: GTA5: Cloth-simulated meshes

Post by Oleg » Thu Feb 22, 2018 12:29 pm

Ped cloth getting improved significantly, but I face a problem I can't fight in several days already.
The cloth on a ped model seem to respond into an opposite direction to the wind

ped_cloth_01.jpg


This becomes clearly visible when ped moves (or runs), the cloth intend to sway toward direction of movement. Especially bad effect when riding a bike:

ped_cloth_02.jpg


As expected, reversing on a bike makes cloth sway into back direction too:

ped_cloth_03.jpg


I thought I've messed something badly, but take a look at original model with cloth (minor hex editing to increase cloth freedom, no other changes, no import or export):

ped_cloth_04.jpg


having the same effect while riding a bike:
ped_cloth_05.jpg


So, my question follows: have you ever seen in game a ped model with cloth that has correct sway effect while ridding the bike? may be some accessory with straps, tapes that does act properly?

P.S. Just after posting this I thought of player_zero's jacket fields that do behave properly. will inspect this certainly.

Re: GTA5: Cloth-simulated meshes

Post by Oleg » Sun Feb 18, 2018 11:54 am

Re: GTA5: Cloth-simulated meshes

Post by carloxfranco » Mon Feb 12, 2018 8:25 pm

Oleg wrote:I haven't messed with scene cloth .yft files. Leave them for now, they might have a different format layout or setup inside.


So how do I create banners with movement? I did not realize anything then. Would it be possible to create a video tutorial?

Re: GTA5: Cloth-simulated meshes

Post by Oleg » Mon Feb 12, 2018 11:05 am

I haven't messed with scene cloth .yft files. Leave them for now, they might have a different format layout or setup inside.

Re: GTA5: Cloth-simulated meshes

Post by carloxfranco » Mon Feb 12, 2018 10:55 am

Oleg wrote:ok, i'll check it few later.


prop_flag_us.yft = No shader configuration avail for "cloth_default".

prop_flag_us_r.yft = bust with zmodeler

prop_flag_us_s.yft = bust with zmodeler

prop_flag_usboat.yft = bust with zmodeler

Re: GTA5: Cloth-simulated meshes

Post by Oleg » Mon Feb 12, 2018 10:11 am

ok, i'll check it few later.

Re: GTA5: Cloth-simulated meshes

Post by carloxfranco » Mon Feb 12, 2018 10:06 am

Oleg wrote:what model file gives you this app crash? does it work fine with other files (e.g. non-cloth models are well-importable?)


Yes I can import other things and even yesterday I did the conversion of a car and it went well,

But when I import a flag prop_flag_us.yft it gives this error or else gives ZModeler is ready.
In the shader configuration avail for "cloth_default".

My Zm version:Image

Re: GTA5: Cloth-simulated meshes

Post by Oleg » Sun Feb 11, 2018 9:39 am

ok, i'm currently messing with ped models, will take a look by the chance.

bigger file created by ZModeler is OK, as it saves small thumbnail image into a file.

Re: GTA5: Cloth-simulated meshes

Post by Yoha » Sun Feb 11, 2018 8:38 am

Oleg wrote:@Yoha,
is your issue with ped (modified .yft file export) resolved, or I should take a look at this situation?


Hi Oleg,
Thanks for put this in your mind.

I've just run the test, but the result is not good.
check below image.

I've updated ZM3 to the latest version.

If i only put new ydd into game, and change the texture in ytd, then run game.
The ped can be spawn succesfully.

But if I put new yft into game, it will crash, when I try to spawn that ped.

About yft, I didn't change anything, like bone position, size of bone, etc, nothing been changed.
Just import it into ZM3, and export it.

Here is the image:
Image

Top