Important information: this site is currently scheduled to go offline indefinitely by end of the year.

[NOESIS] Titan Quest

Post questions about game models here, or help out others!
GoatSquared
ultra-n00b
Posts: 3
Joined: Mon Aug 29, 2011 3:43 am
Has thanked: 3 times
Been thanked: 1 time

Re: [NOESIS] Titan Quest

Post by GoatSquared »

Hey there, Demonsangel. Are you using Tamschi's Toolbox/Viewer to get that bone data out? If so, you might also want to look at this thread if you haven't already seen it. It's for Blender 2.49b. The importer that Szkaradek123 wrote works almost perfectly...except bones on the character/creature's right hand side get borked. But only on the right hand side. However everything else works well, for the most part. Maybe it could help you out a little?
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: [NOESIS] Titan Quest

Post by Demonsangel »

Thanks, I'll have a look at it.

Edit: Win!
Image

Turns out actually putting

Code: Select all

BoneMat = BoneMat.__mul__(BoneMatP)
instead of

Code: Select all

BoneMat.__mul__(BoneMatP)
helps. (: :roll:

Now to implement textures and animations.
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: [NOESIS] Titan Quest

Post by Demonsangel »

For the textures, they're stored in a .tex file, would it be better to let the user convert these to .tga.jpg/psd or use the commandline option the textureviewer has to autoload the .tex files and auto output to .tga? (For the time being, I haven't researched the .tex format at all)
howfie
double-veteran
double-veteran
Posts: 929
Joined: Fri Jul 08, 2011 12:06 pm
Location: Torrance, CA
Has thanked: 10 times
Been thanked: 274 times

Re: [NOESIS] Titan Quest

Post by howfie »

If there is already an exe to convert the textures, yes, use the createprocess equivalent in python. Show us your mad skillz lol. Anything that makes our lives easier is a plus. There are some people around here who can't even use the command line lol. It's not a big thing for the person who wants a model or two from the game, but for the person who wants everything running cmd or drag and dropping thousands of tex files, ouch!
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: [NOESIS] Titan Quest

Post by Demonsangel »

Mhm, but I'm trying to see what would be the best approach for getting user input. Noesis doesn't have a Tkinter or tkFileDialog module so if Noesis doesn't have a native method for user input I'll have to include those modules or make users edit an ini manually. Or just tell them to put the TExtureViewer.Exe in a plugins\subFolder.
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: [NOESIS] Titan Quest

Post by finale00 »

Upload some of those tex files.
I would just ask users to convert the images and put it in a certain places.

And ya, I don't think many methods modify the original data just like that. Most of them return the desired values.
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: [NOESIS] Titan Quest

Post by Demonsangel »

finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: [NOESIS] Titan Quest

Post by finale00 »

Looks like it just has a regular DDS file, except the DDS header has 0x52 at the end instead of 0x20.

Code: Select all

char[3] "TEX"
dword numTex? 
byte null
dword imageSize
bytes[imageSize] <texture>
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: [NOESIS] Titan Quest

Post by finale00 »

Hmm I was wrong, it also includes all the mipmaps I think.
So you will have to parse the DDS header and get what you want.

Some sample code: http://db.tt/THzrhex8

Compare/contrast

Image

Of course you can pursue alternative methods that run external programs if it seems more suitable.
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: [NOESIS] Titan Quest

Post by Demonsangel »

Was just about to post the same image xD.

http://i.minus.com/ibkFVrL05gSyf4.png

For running the TextureViewer, Noesis doesn't run subprocess.Popen(), but I still have to try other methods.
This is going slow because I'm new at loading textures so even with knowing half the format I can't load them in Noesis yet.

It'd be wayyyyy easier if the plugins were in .py and not .dll. :P
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: [NOESIS] Titan Quest

Post by chrrox »

there are tons of samples to load textures in noesis whats the problem?
there are several .py examples of texture loading.
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: [NOESIS] Titan Quest

Post by finale00 »

All c++ plugins come with source.
User avatar
Rimbros
ultra-veteran
ultra-veteran
Posts: 495
Joined: Fri Jul 09, 2010 12:23 am
Has thanked: 41 times
Been thanked: 16 times

Re: [NOESIS] Titan Quest

Post by Rimbros »

chrrox wrote:there are tons of samples to load textures in noesis whats the problem?
there are several .py examples of texture loading.
Yea? can u extract Textures from here in Noesis? :mrgreen:

http://www.4shared.com/rar/z9DNyfgf/Extraidos.html

Ironman 2 x360.
Renders Art by Rimbros
http://s303.photobucket.com/albums/nn12 ... E/Renders/

Personal Game repository samples, send PM
Tamschi
n00b
Posts: 14
Joined: Sun Sep 25, 2011 9:43 pm
Been thanked: 1 time

Re: [NOESIS] Titan Quest

Post by Tamschi »

Here's some info on the animation frames that's currently not in the TQ.Animation.dll source:

Basically, each frame is an array of 14 32bit floats.

0, 1, 2: Position offset vector. Default: {0, 0, 0}
3, 4, 5: These seem to rotate the bone. The bone changes size if you use more than one. Default: {0, 0, 0}
6: No idea, but it has something to to with the rotation vector. Default: 1
7, 8, 9: Scaling factors for the individual axes. Default: {1, 1, 1}
10, 11, 12: These seem to shear the vertices around the bone's axes. Default: {0, 0, 0}
13: Seems to be a multiplier for the shearing values. Default: 1

The game uses float4x4 matrices in the shaders, so there's some way to calculate one from each frame. The transforms are relative to the parent bones.

There's a lot of correlation between the values. (Each dot is an animation frame from the game.)

No guarantees for correctness, I found these by trial-and-error back when I had no clue about 3D maths.

Also, the coordinate space of the normal maps is the opposite of what is usually used. (You probably have to reverse the winding order too, if you haven't done so already.)
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: [NOESIS] Titan Quest

Post by Demonsangel »

Thanks man!

I'm still busy with the textures though, didn't have the time to work on it today.
Post Reply