-
Re: A start on the .MESH file format
Quote:
The models carry bounding sphere data, x, y, z, and radius, maybe this
would be the collision detection mechanism when two spheres intersect?
Maybe a way to make guys fight from closer distance. ("tigth" ranks battles, a sweet dream and a realistic feature...) if this "sphere" is the collision issue.
Well, waiting for the news...
-
Re: A start on the .MESH file format
Well MTW2 soldiers only score a hit when they actually hit, not when they're somewhere around I think.
So, could the bounding sphere be a preliminary collision detection that checks whether unit1 is near enough to unit2 to attack it and afterwards a more detailed collision detection is activated?
-
Re: A start on the .MESH file format
Yeah, thinking about it more, if per-poly is too complicated
maybe spheres are too simplistic. A pre-trigger for a fight animation
maybe, with a more detailed mechanism for scoring a hit.
Fun experiment: take an infantry model (mounts might complicate
things for this), select all vertices. move upwards only a few
meters, change the z value in the bounding sphere, and put back
in game. Would they float over other units without interacting?:laugh4:
Could modellers change mounts into dragons for a fantasy mod, hmmm...
Well, there goes my Friday night now, got to try this when I get home.
-
Re: A start on the .MESH file format
Quote:
Originally Posted by KnightErrant
Yeah, thinking about it more, if per-poly is too complicated
maybe spheres are too simplistic. A pre-trigger for a fight animation
maybe, with a more detailed mechanism for scoring a hit.
Fun experiment: take an infantry model (mounts might complicate
things for this), select all vertices. move upwards only a few
meters, change the z value in the bounding sphere, and put back
in game. Would they float over other units without interacting?:laugh4:
Could modellers change mounts into dragons for a fantasy mod, hmmm...
Well, there goes my Friday night now, got to try this when I get home.
I'd think that you'd have to do that in the animation files, don't you?
-
Re: A start on the .MESH file format
Hi All
@@@@-KE-@@@@ - Heads up I've just emailed you the final (I hope) alpha code to test. Won't be long now fellas (famous last words?). I haven't put mount support in yet because I had a quick look at the mesh files and all the LOD levels are 'characterlod0', have to look at the files more closely and check normal/tangent/etc blocks and the infamous '4/2' byte.
Quote:
Originally Posted by alpaca
I'd think that you'd have to do that in the animation files, don't you?
You're right Alpaca, the animation files include a component that shows the height above ground level for the bone_pelvis. I haven't had a look yet but you would have to have a different class of model (flighted?) and have a range of different animations depending on action and opponent. I would think that the class of figure type would be hardcoded. You'd also have to have new animations for all the other figures - shooting up (I mean that in the nicest, military sense of course :laugh4: :laugh4: )
Cheers
GrumpyOldMan
-
Re: A start on the .MESH file format
-
Re: A start on the .MESH file format
This is another stupid request because I don't
keep track of threads that have really good infomation
in them: what's the line that you put in your config file
to run in window mode? I'm trying to test GrumpyOldMan's
code for mesh conversion and I want to put multiple
Photoshop screencaptures into a .psd file so I want
to switch out of game mode back to the desktop to paste
printscreens. Can anybody enlighten me?:help:
-
Re: A start on the .MESH file format
Hi KE
The rain clouds came and I'm home again.
Quote:
Originally Posted by KnightErrant
This is another stupid request because I don't
keep track of threads that have really good infomation
in them: what's the line that you put in your config file
to run in window mode? I'm trying to test GrumpyOldMan's
code for mesh conversion and I want to put multiple
Photoshop screencaptures into a .psd file so I want
to switch out of game mode back to the desktop to paste
printscreens. Can anybody enlighten me?:help:
I found this on a search:-
Quote:
Originally Posted by DukeKent
For some reason the default .cfg file provided by CA is overwritten each time. So create a bat file that uses your custom .cfg file instead, or overwrites the default .cfg file provided by CA each time.
Step 1: copy the default M2TW .cfg file to a file named carl.cfg
Step 2: modify carl.cfg as desired -
[video]
windowed = true
Step 3: create a file called carl.bat with the following in it
medieval2.exe @carl.cfg
run carl.bat file from a shortcut, or the windows command line.
This sounds like what you need. Or you could get Fraps which allows you to take screen shots in full screen but in .bmp only format in the lite version.
Cheers
GrumpyOldMan
-
Re: A start on the .MESH file format
I usually use
Code:
[video]
windowed=1
movies=0
This will disable annoying intros, too.
By the way, when you're using windowed mode you can use Alt+F4 to end the game quickly (e.g. leave from a battle without having to go through the menu)
-
Re: A start on the .MESH file format
Hi All
Still testing. Here are some pics of modified Feudal Knights in battle. I've taken the heads off the Mailed Knights and added them to the Feudal Knights.
https://i150.photobucket.com/albums/...tedknight1.jpg https://i150.photobucket.com/albums/...tedknight2.jpg https://i150.photobucket.com/albums/...tedknight3.jpg
Cheers
GrumpyOldMan
-
Re: A start on the .MESH file format
I take my hat off to you guys. Very good job.
Hey, so now to edit models in M2TW all you need is the free Milkshape 3d? AWESOME!!!!
RM3
ps. Don't tell anyone at Milkshape about all the modders who will be rushing there to get it, because they might charge money. Hehe. that would bite.
pps. Very good job.
-
Re: A start on the .MESH file format
GrumpyOldMan. I just wanted to say that you are amazing. I don't understand anything you guys are doing but just keep doing it!
-
Re: A start on the .MESH file format
Thanks for the help on windowed=1. Only got to three units
all lods. Tried out the moving unit upwards and changing bounding
sphere on longbowmen in en_peasant_padded directory.
If spiders bother you the following looks like Shelob the last child
of the Ungoliant had a fling with a drunken archer on leave. You were
warned:
https://img243.imageshack.us/img243/...tartod0.th.jpg
Like alpaca and GrumpyOldMan said, the animation keeps the legs glued
to the ground so they don't hover, just get stretched out. Tried them
against dismounted feudal knights which should be a slaughter. Didn't
let them shoot or skirmish, just stand and take it. Here's the battle:
https://img259.imageshack.us/img259/...ightag8.th.jpg
The captain always gets killed on contact because he doesn't share the
mod. The spider-archers last pretty long against the knights but aren't
impervious, they eventually get chopped to pieces and rout. Null experiment
on the bounding sphere but the distorted bodies definately interfere with
the hit mechanism. Fun but creepy at the same time.
Second unit: ee_peasant_leather dir, cossack_cavalry_lod0, 1, 2
https://img143.imageshack.us/img143/...alryts9.th.jpg
The change is to the caps that are like long toboggans, don't know if
that term translates well, the long caps that are crooked like a wizards hat
on some of the men.
Third unit: es_greek_greek_heavy dir, byzantine_lancers_lod0, 1, 2, 3
https://img248.imageshack.us/img248/...cersby8.th.jpg
Change is the usual broken lances.
The mods were done in this sequence: All the lods were converted to
.ms3d in one go to test the error GOM reported when doing this. Then
each .ms3d imported into Milkshape, and modded and saved. All three
or four lods were then reconverted back to .mesh in one go as well.
Then tested in-game. No problems with the procedure that I can tell. :2thumbsup:
Edit: Hey! Milkshape is sharemare not freeware. Give Mete his 25$, its more than worth
the price for what he's done....
-
Re: A start on the .MESH file format
Hi All (especially Guines pigs and lab rats)
I've found a bug in my merge ms3d function and while I start taking it apart (hopefully won't take long) to find the error, I've done up some new figures for people to try - bear in mind that these are experimental and may not work at all. I've had a look through the files and they look all right, but then again that's what lab rats are for, isn't it :laugh4: :laugh4:
The files are all LOD levels for dismounted Hospitallers at http://www.megaupload.com/?d=77IZS8CK around 400k zipped and dismounted Quakupulu at http://www.megaupload.com/?d=FT5PA19Q around 170k zipped. The zips have only got the mesh files ie there are no entries there to get them in the game, but people seemed interested in these particular files. I might go and read up on how to get new figures into the game, been obsessed with other stuff up to now :laugh4: :laugh4:
Edit:- Forgot to mention info you'll need to get them in, the Hospitallers are armed with primary weapon sword only and the Quakupulu are the same with scimitars. If you get them going I'd like to see some screenies.
Cheers
GrumpyOldMan
-
Re: A start on the .MESH file format
Hi MA
Quote:
Originally Posted by Meghas Alexandros
I take my hat off to you guys. Very good job.
Hey, so now to edit models in M2TW all you need is the free Milkshape 3d? AWESOME!!!!
RM3
ps. Don't tell anyone at Milkshape about all the modders who will be rushing there to get it, because they might charge money. Hehe. that would bite.
pps. Very good job.
Unfortunately Milkshape's not free but it is the next best thing, the last time I looked it was $25US or 25Euros, it's shareware for the first 30days. When you consider that the owner, programmer and chief bottle washer at Milkshape has been active in supporting, improving and expanding the software for a fair time, it's a very reasonable price, especially compared to Max's price. If we can get a large block of owners together then we can reasonably ask Mete (the owner) to make changes to accomodate M2TW's format, like float data storage for vertex weights so we don't have to coarsen it down to two decimal figures, or automatic calculation of normals, tangents, binormals and storage within the format, etc. The vertex weight changes in Milkshape was largely driven by Sims and Half Life 2 modders.
So when the conversion tools become available, don't go Googling for serialz and crackz, buy the software :whip: . Think I'll get off my soapbox now :laugh4:
Cheers
GrumpyOldMan
-
Re: A start on the .MESH file format
Since when Milkshape is free??? Did i miss something?
-
Re: A start on the .MESH file format
Quote:
Originally Posted by GrumpyOldMan
Hi MA
Unfortunately Milkshape's not free but it is the next best thing, the last time I looked it was $25US or 25Euros, it's shareware for the first 30days. When you consider that the owner, programmer and chief bottle washer at Milkshape has been active in supporting, improving and expanding the software for a fair time, it's a very reasonable price, especially compared to Max's price. If we can get a large block of owners together then we can reasonably ask Mete (the owner) to make changes to accomodate M2TW's format, like float data storage for vertex weights so we don't have to coarsen it down to two decimal figures, or automatic calculation of normals, tangents, binormals and storage within the format, etc. The vertex weight changes in Milkshape was largely driven by Sims and Half Life 2 modders.
So when the conversion tools become available, don't go Googling for serialz and crackz, buy the software :whip: . Think I'll get off my soapbox now :laugh4:
Cheers
GrumpyOldMan
Heh I'll need to ask him if I can get a free version for research purposes since I don't actually plan to do any much modelling :P
@KE: lol those spider archers are definitely a "Cool Thing(TM)"... alas only 4 legs
-
Re: A start on the .MESH file format
@GOM,
I downloaded Hospitallers and Quakupulu, and I will give them a try today. Looks like we are almost there.
Now I have to have figure out how to post screenies... I need to go back and read that post again...:laugh4:
The MilkShape I had was a trial, didn't know that it wasn't free... I will have to take care of that!!
Let's see,
3dsMax out of the box: $4000
3dsMax student edition... $600 (I am not a student...)
Milkshape 3D... $25...
Mete's philanthropic effort at offering such a versatile 3D model modification program and GOM's success at producing converters/exporters to mod M2TW models...
PRICELESS.... :yes:
AT
-
Re: A start on the .MESH file format
Thank you kind sir. This model is just what the doctor ordered.
https://i82.photobucket.com/albums/j..._quapukulu.jpg
I would add your dismounted hospitaller and make some screenshots but I cant download it from the megaupload site without installing some toolbar. A friend downloaded and sent me the dismounted quapukulu.
Cheers
-
Re: A start on the .MESH file format
I am foolish. I thought it was free. silly me.:laugh4:
RM3
-
Re: A start on the .MESH file format
Send me or any moderator a PM when you have a release to make, and it's got all the coverage we can muster :bow:
-
Re: A start on the .MESH file format
Hi All
I've also uploaded the files to http://rapidshare.com/files/22802607...ukulu.zip.html and http://rapidshare.com/files/22802608...llers.zip.html .
Thanks for the testing AD1, the screen shot looks good. Did you let them get into battle? How did the bounding sphere behave (I took the values off a dismounted knight), was combat ok? How did you get around the issue of no sprite generator?
Thanks again AD1, maybe you can post the entries required to get the figure in game, that would let other people test them out quickly.
Cheers
GrumpyOldMan
-
Re: A start on the .MESH file format
Grumpy, wish I had the time to test, but have you tried creating an abnormally large bounding sphere, or an extremely tiny one, and then seeing how unit behavior changes? My initial thoughts are that the bounding sphere "briefly" tells other units where this guy is. Otherwise if it were too small, the units would move "into" the soldier to try to hack at him, and if it's too large they'll probably stay too far away and never be able to land a hit at him through more detailed mesh collision detection.
-
Re: A start on the .MESH file format
Hi S1
Quote:
Originally Posted by SigniferOne
Grumpy, wish I had the time to test, but have you tried creating an abnormally large bounding sphere, or an extremely tiny one, and then seeing how unit behavior changes? My initial thoughts are that the bounding sphere "briefly" tells other units where this guy is. Otherwise if it were too small, the units would move "into" the soldier to try to hack at him, and if it's too large they'll probably stay too far away and never be able to land a hit at him through more detailed mesh collision detection.
The bounding sphere does have a bearing on combat but it's more than just a simple collision sphere. The sphere values for a dismounted knight (sword) are:-
-0.00506956
0.305949
0.197468
1.33967
/
for a foot spearman:-
0.484048
0.390661
0.103769
1.71158
/
and for a lance armed mounted knight
0.00446364
0.43254
0.793391
1.68705
/
As we build up a bigger database of what happens with different values we can understand it better.
I'm just dusting off some old code I had to extract CAS files to Milkshape and before I start to rejig it for the new Milkshape file format and the M2TW skeleton, I thought I'd see how hard it would be to extract bits to add on to M2TW base figures. Here's a pic of starting to extract a Roman helmet :- https://i150.photobucket.com/albums/...roman_work.jpg . After I get the initial converters bedded down, I'll try to rework the code to extract CAS to Milkshape with dummy weights and correct bone indices for M2TW.
Cheers
GrumpyOldMan
-
Re: A start on the .MESH file format
GoM,
Quote:
Did you let them get into battle?
Yes I've sent them against a few opponents.
Quote:
How did the bounding sphere behave (I took the values off a dismounted knight), was combat ok?
I didnt notice any abnormalities. Combat seems ok so far. With fairly average heavy swordsmen stats they are killing twice as many spearmen as they are taking losses.
Quote:
How did you get around the issue of no sprite generator?
You can simply tell the game to use another units sprites that have the same colour/armour. Infact not all vanilla units have unique sprites.
Here is the data:
export_descr_unit.txt
Code:
type dismounted quapukulu
dictionary dismounted_quapukulu ; dismounted quapukulu
category infantry
class heavy
voice_type Heavy
banner faction main_cavalry
banner holy crusade_cavalry
soldier dismounted_quapukulu, 48, 0, 0.8
attributes sea_faring, hide_forest, can_withdraw
formation 1.2, 1.2, 2.4, 2.4, 3, square
stat_health 1, 0
stat_pri 14, 4, no, 0, 0, melee, melee_blade, piercing, sword, 25, 1
;stat_pri_ex 0, 0, 0
stat_pri_attr no
stat_sec 0, 0, no, 0, 0, no, melee_simple, blunt, none, 25, 1
;stat_sec_ex 0, 0, 0
stat_sec_attr ap
stat_pri_armour 8, 6, 4, metal
;stat_armour_ex 8, 9, 0, 0, 6, 4, 4, metal
stat_sec_armour 0, 0, flesh
stat_heat 3
stat_ground 0, 1, -6, -1
stat_mental 11, disciplined, highly_trained
stat_charge_dist 45
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 1100, 250, 130, 100, 1100, 4, 270
armour_ug_levels 4
armour_ug_models dismounted_quapukulu
ownership turks
era 2 turks
;unit_info 13, 0, 18
battle_models.modelsdb
Code:
20 dismounted_quapukulu
1 4
74 unit_models/_Units/ME_Mail_Plate_Hvy_Mplate/dismounted_quapukulu_lod0.mesh 121
74 unit_models/_Units/ME_Mail_Plate_Hvy_Mplate/dismounted_quapukulu_lod1.mesh 900
74 unit_models/_Units/ME_Mail_Plate_Hvy_Mplate/dismounted_quapukulu_lod2.mesh 2500
74 unit_models/_Units/ME_Mail_Plate_Hvy_Mplate/dismounted_quapukulu_lod3.mesh 6400
1
5 turks
91 unit_models/_Units/ME_Mail_Plate_Hvy_Mplate/textures/ME_Mail_Plate_Hvy_Mplate_turks.texture
92 unit_models/_Units/ME_Mail_Plate_Hvy_Mplate/textures/ME_Mail_Plate_Hvy_Mplate_normal.texture
59 unit_sprites/turks_Dismounted_Sipahi_Lancers_ug2_sprite.spr
1
5 turks
60 unit_models/AttachmentSets/Final ME Heavy_turks_diff.texture
60 unit_models/AttachmentSets/Final ME Heavy_turks_norm.texture 0
1
4 None
14 MTW2_Swordsman 0
2
18 MTW2_Sword_Primary
14 fs_test_shield 0
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
Cheers
-
Re: A start on the .MESH file format
1. That bounding sphere looks like signifying the maximum distance the unit can reach (if it's x,y,z,radius), so I'd still say it fits the assumption that as soon as another unit enters the bounding sphere, a more detailed collision detection kicks in. Although it depends on the question of which point the coordinates relate to (center of mass)?
2. You can probably still disable sprites altogether by removing the sprites lines altogether
By the way, did anybody figure out by now what these floats in the modelsdb mean (16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002)?
-
Re: A start on the .MESH file format
You guys had the answer months ago. Recheck
this thread:
https://forums.totalwar.org/vb/showthread.php?t=70883
Look at the entries in the border_horse.xml file that
Caliban provided. These numbers are offsetX, Y, Z and
WorldOffset X, Y, Z, whatever that means.
Edit: Not including the 16, the six numbers AFTER the 16
are the offsets.
-
Re: A start on the .MESH file format
Yes those are values for the torch, check Caliban's XML files.
If bounding sphere instead indicates how far a unit can reach, this would be Very Cool, because you can set it to be large for spear units, and hopefully get spears from the second row helping out the front row. Needless to say, every classical modder's dream, right there.
-
Re: A start on the .MESH file format
That info about the torches will be useful for Darth as he's been claiming those numbers do something else.
-
Re: A start on the .MESH file format
Quick check of the modeldb file, the units which don't use those
float values are all the mounts, elephant_crew, elephant_artillery_crew,
elephant_rockett_crew, (yes, I know rocket is spelled with 1 t)
and all the captain, general, and king models. These are terminated
by variations on 0 0 -1 0 0 0 0 0 0 for mounts and 0 -1 0 0 0 0 0 0
for the others.