Author Topic: Help: VTA import  (Read 4279 times)

shin5751

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
  • Acolyte
    • View Profile
Help: VTA import
« on: April 27, 2016, 01:21:39 AM »
I got some mesh with vta file for facial animation in 3ds Max(2016Ver) and WWMT newest version.

Using VTA importer, I applied morph in mesh, but morph modeling is broken (check image).

is vta file wrong one? or should I change some option?

First one is basic and second one is kind of surprise face





Left is import vta file single and right is use "Apply VTA Morph to Current Selection"

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3561
  • Karma: 98
  • Behind me?
    • View Profile
Re: Help: VTA import
« Reply #1 on: April 27, 2016, 09:47:32 AM »
What is the source of the VTA file? Was it decompiled?

Send me the original VTA, SMD and QC for your head and I will see what is wrong.

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3561
  • Karma: 98
  • Behind me?
    • View Profile
Re: Help: VTA import
« Reply #2 on: April 27, 2016, 11:25:42 AM »
When I tested the files you sent to me, I got the same results.

But I don't think there is much I can do. I ran some import tests of qc/smd/vta files and the importer is working as expected on the players with morphs and other flex files I imported as a test.

My best guess is that the decompiler did not keep the face vertex ordering between the SMD and the VTA file.

shin5751

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
  • Acolyte
    • View Profile
Re: Help: VTA import
« Reply #3 on: April 27, 2016, 11:34:59 AM »
Okay, I got it! I'll try to decompile other way.

By the way, can I find some vertex files that work properly?

Actually this is my first time using vta file, so everything is confusing @.@


Thanks for testing!


wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3561
  • Karma: 98
  • Behind me?
    • View Profile
Re: Help: VTA import
« Reply #4 on: April 28, 2016, 09:22:47 PM »
I just updated WW to address some VTA issues I discovered while digging into your files. So you should update WW if doing a lot of VTA importing.

But they don't affect the issue in your model.

The best way to import VTA files is to import a QC that references them. The QC will generate all the morphs and hook it all up with minimal effort. As for a working file, I'll create a sample when I've got time. But generally, if you import directly from original assets (not decompiled), you should have good VTAs.

Eves

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
  • Acolyte
    • View Profile
Re: Help: VTA import
« Reply #5 on: August 08, 2016, 02:14:48 PM »
Hi, sorry for the bump. I'm having this exact same problem.
I thought it'd be better to append this thread instead of making a new one.

Basically, I want to edit the face models in Vindictus (aka Mabinogi Heroes), for private use.
If I import the VTAs using Wall Worm, I always get the imploded vertex issue as seen in the initial post.
I noticed that I can vaguely make out the facial animations inside the imploded mesh, (eg. mouth opening, eyes blinking, etc).
I tried importing into different versions of Max and importing via QC, or applying VTA to the reference SMD. Same results.

After finding and reading this thread, I thought the issue was the decompiler. I tried different methods, but it didn't make a difference.
I then realized that if I recompile the model as-is, the game reads the recompiled model with facial animation, no problems.
If I try to compile whatever I export from Wall Worm, I get the imploded facial animations in-game.
This leads me to believe that it's not an issue with the decompiler.

I hope this isn't too much to ask, but would you be willing to take another look into fixing this problem?
If not, I understand. It's kind of a niche request, after all.
I tried to attach the decompiled files, but they're too large. I can upload them elsewhere if you want them.
« Last Edit: August 08, 2016, 02:24:13 PM by Eves »

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3561
  • Karma: 98
  • Behind me?
    • View Profile
Re: Help: VTA import
« Reply #6 on: August 08, 2016, 02:27:46 PM »
The issue in the above image happens when a VTA file doesn't keep the face vertex ordering between the SMD and the VTA file. I've only seen this in decompiled models people have sent to me. If studiomdl.exe is able to compile the mismatch, then there is theoretically a way for WW to be able to re-align the order... but it's not likely something I can address soon. But I'll put it on the wishlist.

Eves

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
  • Acolyte
    • View Profile
Re: Help: VTA import
« Reply #7 on: August 08, 2016, 05:01:00 PM »
Thanks!!

shin5751

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
  • Acolyte
    • View Profile
Re: Help: VTA import
« Reply #8 on: August 16, 2016, 09:00:34 AM »
Long time no see :)
I tried a few way to fix it, and I found a solution.

As "wallworm" said, this was problem that vta doesn't match with smd files.
I think Vindictus may use encoding for vta file, and this isn't identical way with max or wallworm import tool.

First of all, vta's shape key match with smd, respectively.
for example in vta.file, vertexanimation will be following:
"vertexanimation
  time 0 # basis shape key
    0 1.735584 -2.241488 68.261688 0.099003 -0.698313 -0.708913
    1 0.681584 -2.461288 68.164986 0.430097 -0.867392 -0.250297
....."
the first tab int(::ID) is match with SMD's triangle following :
"triangles
pc_evy_skin_face01
  7 3.085782 1.611312 67.936386 -0.089801 0.995005 0.043600 0.921700 0.668000 1 7 1.000000         <----- vta ID 0
  7 2.915783 1.370412 67.140587 -0.226897 0.853888 -0.468394 0.933900 0.606900 1 7 1.000000       <------ vta ID 1
  7 2.452383 0.876512 67.067986 0.142599 0.664792 -0.733292 0.946600 0.620600 1 7 1.000000        <------ vta ID 2
pc_evy_skin_face01
...."

My idea is fix vta file to select proper ID of smd file. I used some java programming to handle over thousands triangle. (I attached here, but this isn't good coding. Just for idea)
vta file's 0 frame(time 0) is normal basic shape, so it is possible to match with smd file.
I found every proper ID to match vta 0 frame and smd's triangle, then give new ID.
Here are also .vta files before modify and after modify; Focus file size and number of IDs at time 0.

Finally, vta file works well in Wallworm and Max.


Please forgive my terrible English skill, I'll try to reply my best if you have any question.

attach by dropbox link :: https://www.dropbox.com/sh/9d4dk8yy0ipw0cs/AACOhx4Cly5TTBKcBPK0JdNda?dl=0

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3561
  • Karma: 98
  • Behind me?
    • View Profile
Re: Help: VTA import
« Reply #9 on: August 16, 2016, 10:42:31 AM »
THanks for investigating and putting together some code for it. I'll look at adding an option for this in WW when my time frees up some.

Lizard

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
  • Acolyte
    • View Profile
Re: Help: VTA import
« Reply #10 on: September 27, 2017, 07:55:36 AM »
Hello!

I have the same problem with a model from SFM too! I can import it in 3ds max with Wallworm, but when I want to apply the .vta file for the facial expressions, it „explodes” the model, just like in the picture above. I wanted to try your java program to align the .vta file, but I can't make it run (mostly because of my lack of knowledge in java). Can you please do a runnable version of you code, (of course if you have time) or tell me how I can make the alignment? 

Thanking you in advance!

P.S.: Sorry for the bad grammar.

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3561
  • Karma: 98
  • Behind me?
    • View Profile
Re: Help: VTA import
« Reply #11 on: September 27, 2017, 10:34:07 AM »
Welcome to WW Lizard.

Although I downloaded the Java app by @shin5751 when this was first posted, I never found occasion to test/use it. You'll have to get support from him on this.

I probably won't have time to update the VTA import code anytime soon. However, I do have intentions of adding flex imports directly from MDL files after animation support is added to the MDL Loader. At that point, the need for smd/vta importing in Max will be obsolete--in fact it's already obsolete for static props because of the MDL loader.