lfnetwork.com mark read register faq members calendar

Thread: Model viewer for KotOR?
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 02-06-2009, 02:28 PM   #1
Adinos
Rookie
 
Join Date: Feb 2009
Posts: 12
Model viewer for KotOR?

I was wondering if anyone has ever written a model viewer for KotOR, or if not, whether information on the model file format is available, so I could more easily write it myself.

I'd rather not spend my time reverse-engineering the format if someone else has done it already.
_________________

Last edited by Adinos; 02-06-2009 at 03:01 PM.
Adinos is offline   you may: quote & reply,
Old 02-06-2009, 05:53 PM   #2
TriggerGod
Senior Member
 
TriggerGod's Avatar
 
Join Date: Mar 2008
Location: hiding
Posts: 2,415
Helpful! 
Quote:
Originally Posted by Adinos View Post
I was wondering if anyone has ever written a model viewer for KotOR, or if not, whether information on the model file format is available, so I could more easily write it myself.

I'd rather not spend my time reverse-engineering the format if someone else has done it already.
_________________
GMax(Free) and 3dsMax($$$) can open the files if you convert the model files (.mdl and .mdx) you get from KTool into an -ascii.mdl file using MdlOps, and using the NWMax plugin for GMax or 3dsMax, you can bring the models into GMax/3ds. Then you have to select the parts of the body/head/whatever (usually clearly marked as head, hair, body, larm, rarm, etc. In GMax, to select them, the hot key is H and use control to select more then one.) then apply the skin to the body/head/whatever (in gmax, hotkey is M. Select Metal as the Shader, press the gray box next to Ambient/Difuse, and select the texture file) And there you go, you have your texture. Its probably not going to be the best quality or the quality it will have in game, so don't worry. In 3ds, I've heard that to get the best idea of your texture, you can use the rendering feature. But GMax doesn't have that feature standard, so you'll have to surf the net for the rendering plugin download.
TriggerGod is offline   you may: quote & reply,
Old 02-07-2009, 09:06 AM   #3
Adinos
Rookie
 
Join Date: Feb 2009
Posts: 12
A bit too complicated - I was more wondering if something like this http://nwn.bioware.com/downloads/viewer.html existed - just a simple viewer, nothing more.

Thanks for the info, anyhow.

Last edited by Adinos; 02-07-2009 at 09:29 AM.
Adinos is offline   you may: quote & reply,
Old 03-09-2009, 07:43 PM   #4
Adinos
Rookie
 
Join Date: Feb 2009
Posts: 12
Well, as it seems there is no stand-alone model viewer, I just wrote one myself.

Here are a few sample images - just picked some random models from KotOR and KotOR2.



The viewer is not 100% ready - there is a handful of models that do not look right, and there are some things I would like to add, but I need information from BioWare for that.
Adinos is offline   you may: quote & reply,
Old 03-10-2009, 12:40 AM   #5
RedHawke
Shadow Lord Of The Sith™
 
RedHawke's Avatar
 
Status: Moderator
Join Date: Mar 2004
Location: Stormreach CA.
Posts: 9,184
Current Game: DDO, Stormreach
Wow! Adinos, just wow!

That could come in mighty handy.


"Beware the form-fitting black armor-clad Drow hottie with twin Mineral II Greensteel Khopeshes!"
"Liella d'Orien says, '"You're the fool, Devil. -- Witness the power of this fully ARMED and OPERATIONAL Titan!"'"
----------------------------------------------------------------------
RedHawke is offline   you may: quote & reply,
Old 03-10-2009, 10:15 AM   #6
Ferc Kast
Modder
 
Ferc Kast's Avatar
 
Join Date: Jan 2007
Location: Tython
Posts: 1,586
Current Game: SWTOR
Helpful! Forum Veteran Contest winner - Fan Fiction Veteran Modder 
It looks very cool!!

Ferc Kast is offline   you may: quote & reply,
Old 03-12-2009, 04:31 PM   #7
Marius Fett
Frigged if I know!
 
Marius Fett's Avatar
 
Join Date: May 2007
Location: Wales
Posts: 3,379
Uh.. Wow..

People have been wanting something like this for quite a while!

Kudos!




Visit the new JediKnight.net!
Marius Fett is offline   you may: quote & reply,
Old 03-12-2009, 04:37 PM   #8
Quanon
Senior Member
 
Quanon's Avatar
 
Join Date: May 2006
Location: Lost in my own unconsiciousens
Posts: 2,597
Forum Veteran Veteran Modder Helpful! 
Wow, nice, very nice O_O

This will come handy to find things quickly without to start Gmax or Max up.


TIQUILAAAAAAAA
Quanon is offline   you may: quote & reply,
Old 03-12-2009, 07:56 PM   #9
Canderis
Mercenary
 
Canderis's Avatar
 
Join Date: Jun 2008
Location: Unknown
Posts: 2,503
Current Game: Skyrim
Veteran Modder Helpful! 
Wow cool! Will this support custom skins and models?




Canderis is offline   you may: quote & reply,
Old 03-13-2009, 12:39 AM   #10
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,765
Current Game: Watch_Dogs
Forum Veteran Helpful! Notable contributor 
Those screenshots are pretty inspiring Adinos, nice job so far! It's been a long time since since we've seen new mod tools around here. Make me nostalgic.


tk102 is offline   you may: quote & reply,
Old 03-13-2009, 10:48 AM   #11
glovemaster
Now-a-days GroovyCarrot
 
Join Date: Jan 2007
Location: Liverpool, UK
Posts: 697
Current Game: No time for games, sadly
Helpful! 
The release of all tools "model related" are always exciting

I look forward to seeing this complete.


If you're looking for any of the junk I did a few years ago; you can probably still find it all on filefront
glovemaster is offline   you may: quote & reply,
Old 03-13-2009, 12:49 PM   #12
Darth InSidious
A handful of dust.
 
Darth InSidious's Avatar
 
Join Date: Feb 2005
Location: The Eleven-Day Empire
Posts: 5,763
Current Game: KotOR II
Wow, that's great!



Works-In-Progress
~
Mods Released
~
Quid existis in desertum videre?
Darth InSidious is offline   you may: quote & reply,
Old 03-13-2009, 07:40 PM   #13
Adinos
Rookie
 
Join Date: Feb 2009
Posts: 12
Well, I have to fix a couple of things before I am comfortable with releasing this. There are three models that don't look right - something wrong with the textures, and a few more models where the lighing doesn't look right, as if the normals are reversed or something. I should get this finished next week, though.
Adinos is offline   you may: quote & reply,
Old 03-16-2009, 05:37 PM   #14
Quanon
Senior Member
 
Quanon's Avatar
 
Join Date: May 2006
Location: Lost in my own unconsiciousens
Posts: 2,597
Forum Veteran Veteran Modder Helpful! 
Quote:
Originally Posted by Adinos View Post
Well, I have to fix a couple of things before I am comfortable with releasing this. There are three models that don't look right - something wrong with the textures, and a few more models where the lighing doesn't look right, as if the normals are reversed or something. I should get this finished next week, though.
Just out of interest: Do you need to compile the models with MDLops first or do you use something you wrote for yourself to read the Binary models.

If you use MDLops, well you're bound to run into some troublesome models.
Its a good program, but it looks like it can't do certain models without faults in them.


TIQUILAAAAAAAA
Quanon is offline   you may: quote & reply,
Old 03-21-2009, 09:05 AM   #15
Adinos
Rookie
 
Join Date: Feb 2009
Posts: 12
I read the binary MDL/MDX files. Easy enough for KotOR and KotOR2, but I wanted to handle Jade Empire too, as that file format is quite similar, but I am having some trouble there. If I cannot solve it, I'll just release the viewer as it is.
Adinos is offline   you may: quote & reply,
Old 03-21-2009, 04:01 PM   #16
Quanon
Senior Member
 
Quanon's Avatar
 
Join Date: May 2006
Location: Lost in my own unconsiciousens
Posts: 2,597
Forum Veteran Veteran Modder Helpful! 
Quote:
Originally Posted by Adinos View Post
I read the binary MDL/MDX files. Easy enough for KotOR and KotOR2, but I wanted to handle Jade Empire too, as that file format is quite similar, but I am having some trouble there. If I cannot solve it, I'll just release the viewer as it is.
Wow, so you know whats in there and what all the fields thingies, etc of the meshes ?

See my friend GloveMaster is trying his best to figure it all out and he has plans to spend his summer on getting MDLops finished.

The little program can do a lot already, but certain fields in the mdl and mdx are unknown what they do, what they are and so on...

Where thinking about lightmaps, we need find a way to get things in the second channel of a 3D mesh for that... well and theres the animation bit aswell

Anyway, to cut my jibberish short, perhaps you could help GloveMaster out on develloping a good little tool that can handle everything 3D modelwize for the kotor games... that would be such blast !


TIQUILAAAAAAAA
Quanon is offline   you may: quote & reply,
Old 03-21-2009, 06:45 PM   #17
Sithspecter
Big things are coming...
 
Sithspecter's Avatar
 
Status: Moderator
Join Date: Jan 2008
Location: Ebon Hawk
Posts: 1,769
Current Game: Mechwarrior II: Mercenaries
Contest winner - Modding Forum Veteran Veteran Modder LFN Staff Member 
This looks great Adinos! Thanks for working on this.



Sithspecter is offline   you may: quote & reply,
Old 03-22-2009, 10:01 PM   #18
Drewton
Rookie
 
Drewton's Avatar
 
Join Date: Dec 2008
Location: Canada
Posts: 129
Current Game: KotOR, TSL
Excellent! This will be a great help with skinning when released.
Drewton is offline   you may: quote & reply,
Old 03-23-2009, 04:55 PM   #19
TriggerGod
Senior Member
 
TriggerGod's Avatar
 
Join Date: Mar 2008
Location: hiding
Posts: 2,415
Helpful! 
A question Adinos; since this viewer can read binary models, will it be able to show edited models? (you add a set of horns to a head, you make the model files, and your viewer will be able to view your edited model just like other models?)
TriggerGod is offline   you may: quote & reply,
Old 04-08-2009, 06:56 PM   #20
Adinos
Rookie
 
Join Date: Feb 2009
Posts: 12
OK, I made a small addition that might be useful - the ability to see how a different texture would look on the model.



This screenshot shows three instances of the viewer running - the first is the original, the second shows the texture replaced with a different one, where the blue has been changed to red, and the third is mostly for fun .. shows the model in wireframe mode.

Now, I'm not quite ready to release this officially yet - there are still a few bugs that remain, but if anyone wants to be a beta tester, drop me a note - PM Me Your Email Please, and I'll send you the current version.

Snipped email address as per our posted rules. It keeps away the spam bots. Please use Private Messages (PM) to exchange this info instead. Thanks. -RH

Last edited by RedHawke; 04-09-2009 at 02:38 AM.
Adinos is offline   you may: quote & reply,
Old 04-11-2009, 08:15 AM   #21
Ghost Down
Senior Member
 
Ghost Down's Avatar
 
Join Date: Sep 2005
Location: The Netherlands
Posts: 1,024
Really looking forward to this!

BTW. Will it also support KotOR 2 models?


Ghost Down is offline   you may: quote & reply,
Old 04-11-2009, 11:05 AM   #22
Ferc Kast
Modder
 
Ferc Kast's Avatar
 
Join Date: Jan 2007
Location: Tython
Posts: 1,586
Current Game: SWTOR
Helpful! Forum Veteran Contest winner - Fan Fiction Veteran Modder 
Sounds like a neat little feature.

Quote:
Originally Posted by Ghost Down View Post
Really looking forward to this!

BTW. Will it also support KotOR 2 models?
I'm just taking a wild guess that it does, per the following:

Quote:
Originally Posted by Adinos View Post
Here are a few sample images - just picked some random models from KotOR and KotOR2.

Ferc Kast is offline   you may: quote & reply,
Old 04-14-2009, 12:24 PM   #23
Quanon
Senior Member
 
Quanon's Avatar
 
Join Date: May 2006
Location: Lost in my own unconsiciousens
Posts: 2,597
Forum Veteran Veteran Modder Helpful! 
Hello, thanks to Marius, who handed over a copy of your little program, I gave it try and its pretty neat.

I've peeked at some creatures and character model, but also tried some of my own area models.

It all seems to work
EDIT: Sometimes though I need to alter the background color, or the rotation speed to get the rendering back.
Often I just get an empty window, showing my desktop.

And now and then I encounter the black models, most of my weapon models are so... though they appear ok in the game.
Its weird

Makes me happy I can check my area models without starting the game all the time.

Though perhaps on that specific topic, area models.

Would it be possible to implement a zoom function, so I can get closer
Or better, a full moveable camera; though that might be to much to ask.

Its seems to run smoothly on my PC, though a bit quircky, if another window or program passes over it, the rendering seems to go faulty a bit.

Anyway great job, I hope you continue to work on this


TIQUILAAAAAAAA

Last edited by Quanon; 04-15-2009 at 04:45 PM.
Quanon is offline   you may: quote & reply,
Old 04-15-2009, 08:05 PM   #24
Adinos
Rookie
 
Join Date: Feb 2009
Posts: 12
Well, this is a beta, so there are still some bugs - and this is the very first DirectX or C# application I have ever written so I am still learning..... I will be trying to fix whatever is broken and to add features. Simple zoom (mouse wheel, maybe) should be relatively simple, for example. I should have an updated version in a week or two. Let me know about any issues you find.
Adinos is offline   you may: quote & reply,
Old 04-15-2009, 08:14 PM   #25
Queen of Night
Forumite
 
Queen of Night's Avatar
 
Join Date: Nov 2007
Location: Germany
Posts: 535
Veteran Modder 
Oh this is very good and a alternativ to Gmax.
Queen of Night is offline   you may: quote & reply,
Old 04-16-2009, 03:30 PM   #26
Blix
Veteran
 
Blix's Avatar
 
Join Date: Feb 2006
Location: Aboard the Ravager
Posts: 866
Current Game: Morrowind & Dark Arisen
Quote:
Originally Posted by Adinos View Post
Well, as it seems there is no stand-alone model viewer, I just wrote one myself.

Here are a few sample images - just picked some random models from KotOR and KotOR2.



The viewer is not 100% ready - there is a handful of models that do not look right, and there are some things I would like to add, but I need information from BioWare for that.
I really wish I had a PC Now Also I couldn't help but notice the two droids in the first row, are they by any chance the concept droids for the Peragus Mining Facility or M4-78?


Blix is offline   you may: quote & reply,
Old 04-16-2009, 04:34 PM   #27
Quanon
Senior Member
 
Quanon's Avatar
 
Join Date: May 2006
Location: Lost in my own unconsiciousens
Posts: 2,597
Forum Veteran Veteran Modder Helpful! 
Quote:
Originally Posted by Adinos View Post
Let me know about any issues you find.
Well, it seems 90% my placeables and items I made and then compiled to the Binary code (mdl&mdx) with MDLops turn out black.

Just a few of them turn out ok.

It might be MDLops though, no idea really.


TIQUILAAAAAAAA
Quanon is offline   you may: quote & reply,
Old 04-30-2009, 07:01 AM   #28
Adinos
Rookie
 
Join Date: Feb 2009
Posts: 12
It seems that a few of the people who requested the beta did not receive it - in some cases because they were blocked from receiving zipped executable files.

Anyhow, I got some useful feedback, and am working on a version with three updated features.

1) The mouse scroll button now allows you to zoom.

2) The "black" model issue was, as suspected, caused by inverted normals (where the normal points "in" instead of "out". It seems the game does not care about those, but my DirectX code does. This problem has now been solved.

3) I am adding a "Save As..." feature to allow saving of retextured models.

I am also improving the documentation, so I should have the full (non-beta) version ready soon. but I am leaving on a small business trip tomorrow, so I will not be able to finish this until after I return next week.
Adinos is offline   you may: quote & reply,
Old 05-04-2009, 10:07 AM   #29
Quanon
Senior Member
 
Quanon's Avatar
 
Join Date: May 2006
Location: Lost in my own unconsiciousens
Posts: 2,597
Forum Veteran Veteran Modder Helpful! 
Ooh, sorry for not replying earlier !

Looking forward to these extra toys added to your program

And thank you for doing this, made a modellers live a bit easier.


TIQUILAAAAAAAA
Quanon is offline   you may: quote & reply,
Old 05-04-2009, 11:17 AM   #30
Nulusi
Lurker
 
Join Date: May 2009
Posts: 1
I have a question: Is one able to show the animations of the models in the viewer also? In other words the animation for speech, for walking, and such?

Edit: Also! Is one able to add weapons to the models? Lightsabers and such?

Last edited by RedHawke; 05-05-2009 at 01:33 AM. Reason: Combining double post...
Nulusi is offline   you may: quote & reply,
Old 05-16-2009, 02:07 AM   #31
shak-otay
Lurker
 
Join Date: May 2009
Posts: 3
Quote:
Originally Posted by Adinos View Post
I was wondering if anyone has ever written a model viewer for KotOR, or if not, whether information on the model file format is available, so I could more easily write it myself.

I'd rather not spend my time reverse-engineering the format if someone else has done it already.
_________________
Hi Adinos,

as it seems that you got the information you were looking for would you be willing to share your knowledge about the mdl file format with us?

greets,
shak-otay

edit: what I found is this but the pages are not easy to survey. Is this is the Kotor binary MDL format?
(The MDL/MDX seeem not to be the same as this!)

Last edited by shak-otay; 05-16-2009 at 07:07 AM.
shak-otay is offline   you may: quote & reply,
Old 05-19-2009, 09:37 AM   #32
Adinos
Rookie
 
Join Date: Feb 2009
Posts: 12
I have now uploaded a new version of the model viewer to NWVault (as I mentioned, it supports NWN2 as well as KotOR and KotOR2) http://nwvault.ign.com/View.php?view...&id=6422&id=79

The issues found during the beta test should have been fixed (thanks for the help and suggestions, guys) and I added the "zoom" feature, using the mouse wheel, as suggested.
Adinos is offline   you may: quote & reply,
Old 05-19-2009, 12:22 PM   #33
Miltiades
Death... by Exile
 
Miltiades's Avatar
 
Join Date: Dec 2005
Location: Bruges, Belgium
Posts: 2,827
Imperialist Meatbags Guild Member The Walking Carpets Guild Member Forum Veteran Folder extraordinaire 
Whoah, this'll be very useful. Amazing job, Adinos.


PSN id: BE_Miltiades

Miltiades is offline   you may: quote & reply,
Old 05-19-2009, 12:40 PM   #34
Trench
Guy with Monocle
 
Trench's Avatar
 
Join Date: Apr 2009
Location: Under a rock.
Posts: 1,638
Current Game: DX:HR, iKotOR
LF Jester 
I noticed on the site you stated that you could switch skins. Can you also save these changes? It would be a lot easier than replacing the parts of the .TGA one by one. This is a definite download for me.

Trench is offline   you may: quote & reply,
Old 05-19-2009, 02:06 PM   #35
DarthParametric
I bent my Wookiee
 
DarthParametric's Avatar
 
Join Date: Apr 2004
Location: Oz
Posts: 2,640
Forum Veteran Helpful! 
Interesting. Just tried it out with some weapon models of mine that have been compiled as game meshes. The blasters displayed fine, but I got an error when trying a lightsaber. It asked for the blade texture, so I browsed to a different directory than the mesh for it and got the following:

Show spoiler

I gather that the error is related to the mesh itself rather than the act of loading an external texture. It wouldn't surprise me, as MDLOps seems to do some screwy things to sabers.

As far as suggestions go, manual control of rotation/manipulation would be the most logical thing to request in a model viewer.

Last edited by DarthParametric; 05-19-2009 at 02:11 PM.
DarthParametric is offline   you may: quote & reply,
Old 05-19-2009, 03:14 PM   #36
Queen of Night
Forumite
 
Queen of Night's Avatar
 
Join Date: Nov 2007
Location: Germany
Posts: 535
Veteran Modder 
I have a Problem with this, it give´s an error by me before he unpacked.
Queen of Night is offline   you may: quote & reply,
Old 05-19-2009, 04:00 PM   #37
Quanon
Senior Member
 
Quanon's Avatar
 
Join Date: May 2006
Location: Lost in my own unconsiciousens
Posts: 2,597
Forum Veteran Veteran Modder Helpful! 
Quote:
Originally Posted by Queen of Night View Post
I have a Problem with this, it give´s an error by me before he unpacked.
Hmm, perhaps something went wrong while it downloaded?

The program works great on my PC, though what DP suggested would be handy

To be able to "fly" around with the camera, perhaps assign a key to move forward and then use the mouse to direct the heading... euh course.


TIQUILAAAAAAAA
Quanon is offline   you may: quote & reply,
Old 05-19-2009, 05:06 PM   #38
shak-otay
Lurker
 
Join Date: May 2009
Posts: 3
Red face

Nice program!

The ASCII dump feature even nicer.

Two questions do I have: when dumping the C_Goblin_CL_BODY01.MDB
the ASCII dump ends like this:
Code:
1209: 974 975 969
Unable to handle block..
Can this be ignored when using your ASCII dump for ex-/importing?

2nd q.: Is there any 3D program that can import this ASCII format directly?

It seems to be very similar to the Wavefront obj format; exp.:

Show spoiler
shak-otay is offline   you may: quote & reply,
Old 05-19-2009, 05:10 PM   #39
Queen of Night
Forumite
 
Queen of Night's Avatar
 
Join Date: Nov 2007
Location: Germany
Posts: 535
Veteran Modder 
My Problem is it give not a Icon and an Error when I unpacked the ModelViewer.
Queen of Night is offline   you may: quote & reply,
Old 05-20-2009, 04:44 AM   #40
Adinos
Rookie
 
Join Date: Feb 2009
Posts: 12
Quote:
Originally Posted by shak-otay View Post
Hi Adinos,

as it seems that you got the information you were looking for would you be willing to share your knowledge about the mdl file format with us?
The format is actually documented pretty well already. See:

http://home.comcast.net/~cchargin/kotor/mdl_info.html

The KotOR and KotOR2 formats are not identical, but very similar.
Adinos is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > T3-M4's Astromech Droid Center > Model viewer for KotOR?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:22 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.