Page 2 of 6
Re: [NOESIS] Titan Quest
Posted: Mon Feb 27, 2012 11:58 pm
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?
Re: [NOESIS] Titan Quest
Posted: Tue Feb 28, 2012 1:27 pm
by Demonsangel
Thanks, I'll have a look at it.
Edit: Win!
Turns out actually putting
Code: Select all
BoneMat = BoneMat.__mul__(BoneMatP)
instead of
helps.
Now to implement textures and animations.
Re: [NOESIS] Titan Quest
Posted: Tue Feb 28, 2012 9:19 pm
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)
Re: [NOESIS] Titan Quest
Posted: Tue Feb 28, 2012 9:45 pm
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!
Re: [NOESIS] Titan Quest
Posted: Tue Feb 28, 2012 10:34 pm
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.
Re: [NOESIS] Titan Quest
Posted: Wed Feb 29, 2012 12:12 am
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.
Re: [NOESIS] Titan Quest
Posted: Wed Feb 29, 2012 3:07 pm
by Demonsangel
Re: [NOESIS] Titan Quest
Posted: Wed Feb 29, 2012 4:35 pm
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>
Re: [NOESIS] Titan Quest
Posted: Wed Feb 29, 2012 7:02 pm
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
Of course you can pursue alternative methods that run external programs if it seems more suitable.
Re: [NOESIS] Titan Quest
Posted: Wed Feb 29, 2012 7:48 pm
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.

Re: [NOESIS] Titan Quest
Posted: Wed Feb 29, 2012 8:30 pm
by chrrox
there are tons of samples to load textures in noesis whats the problem?
there are several .py examples of texture loading.
Re: [NOESIS] Titan Quest
Posted: Wed Feb 29, 2012 10:38 pm
by finale00
All c++ plugins come with source.
Re: [NOESIS] Titan Quest
Posted: Thu Mar 01, 2012 12:50 am
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?
http://www.4shared.com/rar/z9DNyfgf/Extraidos.html
Ironman 2 x360.
Re: [NOESIS] Titan Quest
Posted: Sat Mar 03, 2012 6:30 pm
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.)
Re: [NOESIS] Titan Quest
Posted: Sun Mar 04, 2012 12:09 am
by Demonsangel
Thanks man!
I'm still busy with the textures though, didn't have the time to work on it today.