Jump to content


Photo

MDLedit bug reporting thread


  • Please log in to reply
24 replies to this topic

#1 bead-v

bead-v

    Evil Malachor Overlord

  • Premium Member
  • 374 posts
  • LocationSlovenia

Posted 09 October 2017 - 05:42 AM

This thread is for reporting any bugs you encounter while using MDLedit.

 

If you encounter a bug, then before you do anything else, try to reproduce it. If you manage to reproduce it, describe what you did that caused the bug, in steps. If there was an error message please post a screenshot or copy the text. If the bug didn't crash MDLedit you can also check MDLedit's report for any warning or error messages. Please also include in your post the file(s) that you were processing.



#2 bead-v

bead-v

    Evil Malachor Overlord

  • Premium Member
  • 374 posts
  • LocationSlovenia

Posted 09 October 2017 - 11:25 PM

Lightsabers that go through KotORMax/MDLEdit seem to end up like this:

 

A9yfnJU.png

 

Fortunately this seems to resolve the issue I had with my crossguard lightsabers being extended all the time, just looks like a little UV mixup.

 

This is the unchanged default blue lightsaber, simply brought into ASCII by MDLEdit, into KotORMax, exported back out of KotORMax, and then back into binary by MDLEdit.

Fixed in the new version of MDLedit :)



#3 Sithspecter

Sithspecter

    Sleheyron Architect

  • Administrators
  • 644 posts
  • LocationSleheyron

Posted 09 October 2017 - 11:27 PM

Fixed in the new version of MDLedit :D

 

Amazing news! Now I can fix my crossguard lightsaber bug!



#4 LiliArch

LiliArch

    Jedi Master

  • Members
  • PipPipPipPipPip
  • 418 posts

Posted 13 October 2017 - 11:39 AM

I was running some tests, and it appears that there is still ("still", since it's been haunting me in MDLOps as well) this bizarre issue regarding certain head models (at least in TSL, haven't tested in KotOR - call me lazy if you will) that I wish someone would be able to fix. Now I don't claim to understand what is happening under the hood, but the way the symptoms appear to me is that in certain cases, something in bonemapping goes horribly wrong when decompiling and/or recompiling (can't tell which one, since I still don't understand weighting in 3D programs, ahem) - based on my tests, that happens if the "head" node (I assume it's the same for "tongue" as well, but it's hard to see the tongue when head goes haywire) is not a direct child of the root node (the [modelname]). Take n_dockof (the Peragus dock officer) for example: decompiling and recompiling the head model makes him move his eyebrows instead of lips while speaking, in addition to other weird ticks in facial animations.

 

I can keep experimenting on this if you wish. If you're not interested in the issue the slightest, please let me know, so that I won't bother you with it.

 

As a related note, I was attempting to modify "qbones" values of the recompiled model's "head" node via the "Edit values" feature to see whether that has any effect in the issue or not; trying to save the modified values gave me Visual C++ Runtime Library error "This application has requested the Runtime to terminate it in an unusual way", leading to MDLEdit crashing. Attached in the file, the compiled model and screenshots for what I did and the error message itself.

 

Attached File  mdledit-testing.7z   153.02KB   1 downloads

 

I hope my text makes any sense. It's been a while since I've written on any forum.


BFix0.gif
Lady Arch, the Carrier of Northern Nights, the Harbinger of Iriaz and the Dark Lord of Orth.

#5 bead-v

bead-v

    Evil Malachor Overlord

  • Premium Member
  • 374 posts
  • LocationSlovenia

Posted 13 October 2017 - 11:50 AM

I hope my text makes any sense. It's been a while since I've written on any forum.

It's awesome, tells me exactly what I need to look at :) I'll have time to look at it later today.



#6 DarthParametric

DarthParametric

    Dark Lord of the Sith

  • Members
  • PipPipPipPipPip
  • 1,179 posts
  • LocationOz

Posted 13 October 2017 - 01:30 PM

A problem with vert ID perhaps? Are they changing when recalculating smoothing? MDLEdit says that the head mesh has 501 verts/749 tris in the binary model, but Max says the ASCII model has 502 verts/750 tris.

#7 ndix UR

ndix UR

    Jedi Padawan

  • Members
  • PipPipPip
  • 72 posts
  • Locationca, usa

Posted 17 October 2017 - 05:27 AM

I was running some tests, and it appears that there is still ("still", since it's been haunting me in MDLOps as well) this bizarre issue regarding certain head models (at least in TSL, haven't tested in KotOR - call me lazy if you will) that I wish someone would be able to fix.

 

 

TLDR: the problem is understood and a fix is in the works.

 

Thanks for the report, this was a fun problem. Skin mesh has a few structures that are equal in size to the number of nodes. Q & TBones for example. Past implementations have assumed that those nodes would be in 'name array order', the order you get by following the 'node number' read straight out of the node header. It turns out though, that those structures are in 'actual node order', which is the order you get via depth-first traversal. Most of the time, those two orderings are the same, but not always apparently. For whatever reason (my guess is something reordered the nodes in the presence of transparencyhint nodes), the models like N_DockOf have name orders that are very different from node order. The mismatch causes all the weights to to be decoded into the ASCII file with very wrong node names. The recompile operation actually works fine if you have a valid weights list (it just reorders the names list to match node order in the compiled output model).



#8 LiliArch

LiliArch

    Jedi Master

  • Members
  • PipPipPipPipPip
  • 418 posts

Posted 19 October 2017 - 12:50 PM

Sounds like fun to isolate, indeed.
 

The recompile operation actually works fine if you have a valid weights list (it just reorders the names list to match node order in the compiled output model).

So it's in decompiling, then. Thanks for clarifying that. I was unable to verify which one it was - granted, I didn't run my full scale of tests either, the results of those tests when I run them last time (with mdlops 0.6 I guess?) were so horrifying that I almost started to believe the whole model was haunted.

 

Anyway, a minor documentation issue if I may, now that I remember. The "Head Link" button could use some explanation in "Help" section. It isn't exactly self-explanatory.


BFix0.gif
Lady Arch, the Carrier of Northern Nights, the Harbinger of Iriaz and the Dark Lord of Orth.

#9 bead-v

bead-v

    Evil Malachor Overlord

  • Premium Member
  • 374 posts
  • LocationSlovenia

Posted 19 October 2017 - 07:11 PM

LiliArch, all the issues you mentioned have been resolved. If anything else comes loose, let me know here. I won't be able to do anything before next thursday, however.



#10 Otaka

Otaka

    Jedi Initiate

  • Registered
  • Pip
  • 5 posts

Posted 20 October 2017 - 06:24 PM

bead-v, can you share with the source code of this excelent application? I am very interested in animation parsing

#11 ndix UR

ndix UR

    Jedi Padawan

  • Members
  • PipPipPip
  • 72 posts
  • Locationca, usa

Posted 20 October 2017 - 08:53 PM

bead-v, can you share with the source code of this excelent application? I am very interested in animation parsing

 

https://bitbucket.org/bead-v/mdledit



#12 bead-v

bead-v

    Evil Malachor Overlord

  • Premium Member
  • 374 posts
  • LocationSlovenia

Posted 20 October 2017 - 08:53 PM

The link to the source is in the Readme.

#13 Otaka

Otaka

    Jedi Initiate

  • Registered
  • Pip
  • 5 posts

Posted 21 October 2017 - 11:06 AM

:blush: did not noticed. Thank you so much



#14 LiliArch

LiliArch

    Jedi Master

  • Members
  • PipPipPipPipPip
  • 418 posts

Posted 24 October 2017 - 12:58 PM

Dear sirs, you are awesome.


BFix0.gif
Lady Arch, the Carrier of Northern Nights, the Harbinger of Iriaz and the Dark Lord of Orth.

#15 Otaka

Otaka

    Jedi Initiate

  • Registered
  • Pip
  • 5 posts

Posted 28 October 2017 - 01:24 PM

I think I have found a bug.

1. Open file "dor_lda01.mdl" (model from KOTOR 1).

2. In settings set Convert Bezier Controllers to Linear.

3. Try to save the model as ASCII.
 
It throws several error messages:
---------------------------
Error!
---------------------------
Missing controller data on animation controller 'position' on node 'Mesh01' in animation 'opening1'.
vector::_M_range_check: __n (which is 41) >= this->size() (which is 30)

In result file I see missing values.

Example:
 node dummy Box04
      parent DOR_LDA01
      positionkey
        0.0 -1.94879 0.0967285 0.0
        1.46667 -0.0419167 0.0967285 0.0400847
        2.0                  <-----------MISSING
      endlist


#16 Otaka

Otaka

    Jedi Initiate

  • Registered
  • Pip
  • 5 posts

Posted 28 October 2017 - 01:51 PM

And can you please explain how do you make conversion from bezier to linear(mathematic expression, or at least point me where in source code you do the conversion)?

 

Example of bezierposition controller:

node dummy Box04
parent DOR_LDA01
positionbezierkey
0.0 -1.94879 0.0967285 0.0 0.0 0.0 0.0 1.23964 0.0 0.0
1.46667 -0.08933 0.0967285 0.0 -1.23964 0.0 0.0 0.0316088 0.0 0.0
2.0 -0.0419167 0.0967285 0.0 0.0400847 0.0 0.0 0.0 0.0 0.0
endlist
endnode

The same controller linearized(with errors):

node dummy Box04
parent DOR_LDA01
positionkey
0.0 -1.94879 0.0967285 0.0
1.46667 -0.0419167 0.0967285 0.0400847
2.0
endlist
endnode


#17 bead-v

bead-v

    Evil Malachor Overlord

  • Premium Member
  • 374 posts
  • LocationSlovenia

Posted 29 October 2017 - 08:02 AM

Thanks for reporting this. The issue has been resolved and I will upload the new version of MDLedit when I find the time.

 

And can you please explain how do you make conversion from bezier to linear(mathematic expression, or at least point me where in source code you do the conversion)?

 

You just keep the point data and throw away the control point data. In the case of position, that means you just keep the first three values.


Edited by bead-v, 29 October 2017 - 08:04 AM.


#18 DarthParametric

DarthParametric

    Dark Lord of the Sith

  • Members
  • PipPipPipPipPip
  • 1,179 posts
  • LocationOz

Posted 29 October 2017 - 04:50 PM

It seems like edited models with differing numbers of verts and texture verts may be causing the game to randomly crash (not 100% certain as yet). On trying the old decompile/recompile trick, skin weights are being assigned random non-bone objects much like the issue with vanilla models above, like so:

MDLEdit_Skin_Weight_Issue_TH.jpg

#19 bead-v

bead-v

    Evil Malachor Overlord

  • Premium Member
  • 374 posts
  • LocationSlovenia

Posted 29 October 2017 - 06:06 PM

It seems like edited models with differing numbers of verts and texture verts may be causing the game to randomly crash (not 100% certain as yet). On trying the old decompile/recompile trick, skin weights are being assigned random non-bone objects much like the issue with vanilla models above, like so:

MDLEdit_Skin_Weight_Issue_TH.jpg

 

What model is that?



#20 DarthParametric

DarthParametric

    Dark Lord of the Sith

  • Members
  • PipPipPipPipPip
  • 1,179 posts
  • LocationOz

Posted 29 October 2017 - 06:21 PM

PMHC04 from TSL, but the vanilla model is fine. The problem is with a modified version of it, as described.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users