Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

New MDLOps

Page: 3 of 3
 JdNoa
05-22-2007, 8:01 PM
#101
If you like I could help package this into an EXE...?

Edit: what is the mdlops.tws?

That'd be awesome, thanks. All the perl-to-exe programs I found were commercial. :)

Uh... oh, oops. mdlops.tws would be a textpad configuration file. That doesn't need to be in there. :)
 Kha
06-18-2007, 12:23 PM
#102
OH!!! Thank you very very very... very much for this release JdNoa and tk102!! :D

I've managed to change the pause1 animation from the s_male2 file, it compiles without errors and worked into the game! :cowdance

But now since I'm completely new at modding I have a few questions:

When I make a new animations in the s_male2 file, what else do I need to change to allow me import those animation into the game? Just adding a new line in the animation.2da file and call it using a script works?

And can I use any one of the animations file or just s_male2 file?

Thanks very much!!
Kha
 Dashus
06-18-2007, 12:33 PM
#103
I believe (and someone correct me if I'm wrong - which is likely, given I have zero direct experience with this) this will not allow you to "create" animations. By "create" I mean actually add animations to the model. You have to replace existing ones. Then you can save the model off with a different name and specify the model to use in the utc (or ut*).
 JdNoa
06-18-2007, 5:20 PM
#104
When I make a new animations in the s_male2 file, what else do I need to change to allow me import those animation into the game? Just adding a new line in the animation.2da file and call it using a script works?

And can I use any one of the animations file or just s_male2 file?

Thanks very much!!
Kha

What we ended up doing to add new animations to s_male02 was using an animation name that wasn't really used much.

The two looping animations I found that were mostly unused (only present on the Darth Malak model) were kdtlkangry and kdtlksad. If those don't show up in the NWMax animation name list - which I'm pretty sure they don't - call your animation something distinctive, like custom1start, and then edit the ascii model file and do a find-and-replace from custom1start to kdtlkangry.

You can call those two animations from scripting using the ANIMATION_LOOPING_KNEEL_TALK_ANGRY and ANIMATION_LOOPING_KNEEL_TALK_SAD constants.

As for whether you can use other model files... all I can say is try it and see. I had issues with some character files because when I tried to make animations I moved skin nodes, which just messes everything up.
 Kha
06-19-2007, 7:33 PM
#105
I was thinking about the s_male1 file since it is much smaller and faster to compile, but as you said let's try and see what happens. Thank you for the info!
 magnusll
07-02-2007, 9:00 AM
#106
Is it just me being stupid, or does mdlops have trouble exporting emitters? I'm trying to work with m36aa_01 (Valley of the Dark Lords), but when GMax/NWMax (v 0.7) tries to import the emitters objects, it complains about not being able to convert "undefined" to float.

Just double checking if this is the case or if I'm doing something wrong...

On a tangential note... JdNoa, would you mind if I duplicate the mdlops functionality in my walkmesh utility? I think having the ability to import/export both the area model and its walkmesh would be invaluable to area modelers, to avoid progressive misalignment due to successive roundings if nothing else. Note that I wouldn't reuse the actual code (rather pointless since mdlops is Perl and my utility is C#), but I could certainly use the info about the .mdl and .mdx structure which can be gained by reading the source.
 Pavlos
07-16-2007, 4:49 PM
#107
Is it just me being stupid, or does mdlops have trouble exporting emitters? I'm trying to work with m36aa_01 (Valley of the Dark Lords), but when GMax/NWMax (v 0.7) tries to import the emitters objects, it complains about not being able to convert "undefined" to float.

Yes, emitters are yet another thing that we don't understand, so MDLOps doesn't have that sort of functionality :).
 JdNoa
07-16-2007, 5:34 PM
#108
Well.... emitters are actually partially implemented but not very well tested. The specific problem you're describing is because I never tested the emitter code using K1 models and it's doing something wrong there.
 Darkkender
08-03-2007, 6:50 PM
#109
Hey JDnoa, one of the things in the past I had been working on was trying to make changes to mdlops so that it will support the larger model structures when converting to ascii and back. If I can find my notes on what I was changing I'll pass them on to you so that we can see if can't start make full fledged area models.
 Darth Xander
09-09-2007, 3:22 PM
#110
what exacaly does mdlops do?
 stoffe
09-09-2007, 3:46 PM
#111
what exacaly does mdlops do?

It's a converter tool that converts the MDL/MDX files used by the KOTOR games to hold 3d model data into an ASCII format the NWMax importer/exporter plugin for gmax/3dsmax can read.

In short it allows you to load 3D models from the game in a 3d application, and export back into a format the game can use (with some limitations since the MDL/MDX format is not fully understood).


-----------------------
--<< What is this? >>--
-----------------------

This is a Perl script for converting
Star Wars Knights of the Old Republic (kotor 1 for short)
AND Star Wars Knights of the Old Republic, The Sith Lords (kotor 2 for short)
binary models to ascii and back again.

Binary models are converted to an ascii format compatible
with NeverWinter Nights.

It can also do some other operations on models,
like renaming textures and replacing meshes.

------------------
--<< Features >>--
------------------
-Automatic detection of binary model version
-Automatic detection of model type
-works with trimesh models
-works with dangly mesh models
-has limited support for skin mesh models (see below for more details)
-model properties supported:
-diffuse
-ambient
-shadow
-render
-alpha
-self illumination
-when reading in a binary model a text file is created
that lists all the textures the model uses.
-replacer function lets you replace 1 tri-mesh in a binary
model with another tri-mesh from an ascii model
-renamer function lets you rename textures in a binary
model


:)
 Weiser_Cain
09-09-2007, 7:06 PM
#112
Has this been idiot proofed for guys like me?
 Darkkender
09-12-2007, 8:33 AM
#113
Has this been idiot proofed for guys like me?

Likely it hasn't if your asking now. Nothing is ever free from bad things happening from people making mistakes, especially with computers. (AKA Vista)
 Kha
02-24-2008, 2:02 PM
#114
Is someone still working in Mdlops? Could it be possible to make it able to recognize Max smooth groups?
 Inyri
02-24-2008, 2:23 PM
#115
I cheat it by exporting my files to another format (in this case GLM, which is a Jedi Academy model format, because it automatically cleaves the model by smoothing group) then I reimport it.

You might want to get on magnusll's case and see if he can implement something similar in KAurora.
 magnusll
02-26-2008, 5:43 AM
#116
I cheat it by exporting my files to another format (in this case GLM, which is a Jedi Academy model format, because it automatically cleaves the model by smoothing group) then I reimport it.

You might want to get on magnusll's case and see if he can implement something similar in KAurora.

The idea is that KAurora will be able to import/export any model when I'm finished. I'm completing work on emitters to release the 0.3; after that, I'll tackle animations and the "missing" node types (like skinmeshes and danglymeshes). So in the end KAurora will work a bit like MDLops on steroids. I wouldn't hold my breath though; progress will be slow.

As for the specific question, I'm not sure I understand it fully. NWMax does export smooth group info (it's one of the values of the face array), but as far as I know there's no place within the Kotor face structure in which to put this info. I don't have the code at hand right now, but IIRC I decoded enough of the fields stored within Kotor faces to realize there was simply no place in which to put smooth group values. So unless you're proposing some built-in model preprocessing that results in... whatever it is that Max does with its smooth groups, there's no way of using that info with the Kotor engine.

OTOH, if you *are* proprosing model preprocessing, I could certainly do it, but I need to understand what to do first...
 Darkkender
02-26-2008, 10:08 AM
#117
Hey Magnusll, Have you considered adapting NWMax's script code for converting models to convert the Kotor model's directly to a max format?
 Inyri
02-26-2008, 1:46 PM
#118
I'm not sure I understand it fully.I'm not sure I do either, to be honest. :p All I really know is how the model is made and how it ends up.

I guess the basics of smoothing groups is that if you have four polygons in a square, and the two on the left are smoothing group 1 and the two on the right are smoothing group 2, it will 'cleave' the vertices between them (so instead of three vertices connecting them you'll get six -- three on the left and three on the right). This creates the 'seam' between the two smoothing groups. This is all fine and dandy, but somewhere along the way in the modeling process the vertices are not actually cleaved, so once the model gets into KotOR the smoothing groups are rendered basically as useless information, as the game doesn't seem to use them in any way. I was just wondering if KAurora could potentially step in and correct this issue somehow (the most straightforward way seems to be to break up the model by smoothing group, but knowing what's 'best' is more you department).

I don't know if the original issue is with the exporter or what, but this just seems like a prime opportunity to take care of it to avoid folks having to manually cut their models apart to get them looking right.
 Kha
02-26-2008, 8:03 PM
#119
What I would like is the other way around... when I get a body model and pass through mdlops it creates seams where there were none in the game, in the model the vertices are separated but before mdlops the game engine render the seam as they were conected you see no seam, after mdlops the seam appears.

Once Cchargin told he would look the smooth group thing to see how to render the normal here: http://www.lucasforums.com/showthread.php?t=157286)
 magnusll
02-27-2008, 10:05 AM
#120
I guess the basics of smoothing groups is that if you have four polygons in a square, and the two on the left are smoothing group 1 and the two on the right are smoothing group 2, it will 'cleave' the vertices between them (so instead of three vertices connecting them you'll get six -- three on the left and three on the right). This creates the 'seam' between the two smoothing groups.

Ah... vertex duplication according to smoothing groups. Well it's certainly doable... in fact KAurora already does it, except it duplicates vertices according to the needs of the tvert structure. I could add the code needed to also manipulate the vertices due to smooth group info, though it probably doesn't make much sense to do it until I've completed the handling of all the Kotor node types.
 Kemosavi
02-29-2008, 3:03 AM
#121
I'm really new to the whole "modding scene", but I've been working with Max for a while. Anyway, I've followed the Readme from the older one, and with both versions when I try to convert the .mdl it says "does not exist!" Any kind of help would be much appreciated! :P
 Sithspecter
02-29-2008, 5:07 PM
#122
If you haven't extracted BOTH the .mdl and the .mdx, it won't work.
 Kemosavi
02-29-2008, 5:28 PM
#123
If you haven't extracted BOTH the .mdl and the .mdx, it won't work.


I have both the w_blstrrfl_001.mdl and w_blstrrfl_001.mdx on my desktop, and it still won't work. :(


http://img210.imageshack.us/my.php?image=wotvb0.jpg)

Edit:: It appears that the program could not read the space after my windows name. I put the files in my d: drive and it worked :)
 settoken
03-05-2008, 12:07 PM
#124
Edit:: It appears that the program could not read the space after my windows name. I put the files in my d: drive and it worked :)

Man !!! if you're right it's the best day of my life !!!! ok it isn't but I'm really happy
That f*cking problem is turning me mad since 2 months
Nobody able to answer me
I'll test it and...man, thx a lot if it works
 Darkkender
03-05-2008, 1:51 PM
#125
What OS are you using Kemosavi? If it is Vista it could be because of changes in Vista.
 settoken
03-05-2008, 2:39 PM
#126
take a look at the screenshot...
 Mono_Giganto
03-05-2008, 8:50 PM
#127
Well, to someone who hasn't had the opportunity to use Vista, it may not be apparent from the screenshot that someone is or isn't using Vista. And in any case, the screenshot can only be so informative when anyone can download one of hundreds of Vista skins for XP.
 Darkkender
03-05-2008, 10:06 PM
#128
take a look at the screenshot...

Also not everybody can look at screenshots in there place of business due to bandwidth restrictions. My employer locks out certain sites altogether and any webpage url link that starts with "img" is blocked. So with the time it takes to say look at a screenshot you could say yes it is or no it is not Vista. Also too note Vista has a classic view option that allows it too look like older versions of windows, not too mention that screenie doesn't show the task bar.
 settoken
03-06-2008, 2:51 AM
#129
you both are right, It was just a silly answer, didn't meant to be annoying

sorry again :)
 Princess Artemis
03-30-2008, 3:39 PM
#130
I'm having a bizarre problem with mdlops...

I installed the newest version yesterday, and when I attempt to read/write a model for TSL, mdlops hangs at "reading binary model".

Unfortunately, for whatever reason, now I can't use mdlops 0.5, which I had working fine yesterday but now throws this error when I try to read/write a binary:
reading binary file
Tk::Error: can't open MDX file
Tk callback for .button2
Tk::__ANON__ at /PerlApp/Tk.pm line 247
Tk::Button::butUp at /PerlApp/Tk/Button.pm line 111
<ButtonRelease-1>
(command bound to event)

Anyone know what I can do about this? It's a terribly inconvenient time for mdlops to stop working just as I was about to make an attempt to learn how to make models and remodel some things.

ETA: And if anyone could direct me to where in the blazes mdlops is keeping its history file, I'd be much obliged--it doesn't seem right that I can try every which way but up to try to get mdlops to forget it ever existed on my machine but it can still find the last folder I opened anything with it.

Son of ETA: Never mind on the first part, I figured out the problem was mostly EBCAK, but with a side of TSL having mismatched lists of .mdl and .mdx files. In other words, I thought I had the .mdx files but I didn't (because TSL didn't HAVE .mdx files for the .mdls I'd extracted...). ::headdesk:: I would like to know where mdlops hides its history though. ::slinks off to the land of dumb computer users::
 Shaggoth
03-07-2012, 5:13 PM
#131
so if i want to convert models from k2 to k1, i should just read it, click on k1 option and write?
Page: 3 of 3