Building mod... but some questions!

Please post here for questions and discussion about unit modeling and general game modding. You can also post your new units and modifications here.

Moderator: EagleMountainDK

User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: Building mod... but some questions!

Post by Stridor »

SAF,

At this stage, unless we can get help from Kevin, PCK is totally dependent on how "bones" are exported by polytrans.

Here is the issue.

Direct X meshes and materials are well defined.
There is no concept of "dummy bones" like max has, so PT does some trick with DirectX frames and subframes that PCK was tested with. The other exporters don't do this so PCK doesn't get the data in the way it expects. 3DSMAX also works with hierarchies of objects (which is really helpful for animation) and the other simpler 3D software doesn't (although MS3D does support a joint heirarchy)

So unfortunately at this stage once you have finished your work please send it to me (pref in max format) and I will add the bones.
User avatar
koiosworks
Posts: 813
Joined: Sun Jun 20, 2004 8:14 pm

RE: Building mod... but some questions!

Post by koiosworks »

ORIGINAL: Mobius
ORIGINAL: koiosworks
As a note. to add a low detail model to the game (so that at long distance views a low poly model is used to greatly improve rendering performance) simply create a low poly model of your building or whatever and name it the exact same name but add _LOD

for example:

house_russian.x would be the full poly model that the game uses if the camera is near object

house_russian_LOD.x would be the low poly model that the game would use if the camera is far away from the object
Kevin, does that apply for tanks too?


Yes, but make sure you have the _LOD for each tank part. it really helps performance to create LOD models. very low poly models....

there are many .x files for LOD in the game for examples.

look at the KV-1 Model 1942 for example

Body_LOD etc....


User avatar
Biffa
Posts: 119
Joined: Tue Apr 15, 2008 9:49 pm
Location: Wiltshire
Contact:

RE: Building mod... but some questions!

Post by Biffa »

K Stridor, thanks for looking into it, it's a shame but there's no way I can justify buying something like Polytrans.
 
Sadly it also means that many other people who will want to mod buildings will have the same issue, would be good if somebody could come up with a viable fix.
 
On a positive note, I think we have got the start of a nice little mod community here with many others no doubt waiting to add their own great ideas and time to take this game and it's appeal to new heights (and ofc great support from the matrix/koios team as already mentioned).
 
In the next day or two I'll start sending you some of the files thanks in advance.
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: Building mod... but some questions!

Post by Stridor »

Thanks SAF. I fully understand and support your position re: Polytrans. The issue is being looked into right now. Hopefully something can be sorted out one way or the other.

Regards

S.
User avatar
koiosworks
Posts: 813
Joined: Sun Jun 20, 2004 8:14 pm

RE: Building mod... but some questions!

Post by koiosworks »

ORIGINAL: Stridor

Thanks SAF. I fully understand and support your position re: Polytrans. The issue is being looked into right now. Hopefully something can be sorted out one way or the other.

Regards

S.


yea, unfortunately we used expensive 'professional' tools - polytrans and 3D studio max - to do our stuff. there are a lot of nice substitutes for 3d max but not really many for polytrans.
User avatar
Mobius
Posts: 10339
Joined: Thu Jun 29, 2006 10:13 pm
Location: California
Contact:

RE: Building mod... but some questions!

Post by Mobius »

ORIGINAL: koiosworks
ORIGINAL: Mobius
ORIGINAL: koiosworks
As a note. to add a low detail model to the game (so that at long distance views a low poly model is used to greatly improve rendering performance) simply create a low poly model of your building or whatever and name it the exact same name but add _LOD
for example:
Kevin, does that apply for tanks too?
Yes, but make sure you have the _LOD for each tank part. it really helps performance to create LOD models. very low poly models....
there are many .x files for LOD in the game for examples.
look at the KV-1 Model 1942 for example
Body_LOD etc....
This works really slick. I have a 1300 poly tank body model that looks good close up but the LOD body is only 450 polys. You can't tell that the tow cables and tow hooks and various other hardware bits are missing from a distance.

I assume if I have a 1024x1024 mesh for the close up model I could have a 512x512 mesh for the LOD model with no problems?
All your Tanks are Belong to us!
panzer
Mraah
Posts: 1085
Joined: Wed Feb 20, 2008 6:11 am

RE: Building mod... but some questions!

Post by Mraah »

ORIGINAL: Stridor

Thanks SAF. I fully understand and support your position re: Polytrans. The issue is being looked into right now. Hopefully something can be sorted out one way or the other.

Regards

S.

Stridor,

Only way I can think of doing this is adding the bones and such into the X file manually by saving the X as an ASCII frame, and then cutting and pasting the code for the bones in. I noticed PolyTrans can export ASCII so if the code can be tweaked for a specific building, then it might work. We'd have to export our stuff in ASCII and then maybe you can run a tutorial on which parts to change ... sort of like the XML's where we can modify that via NotePad. This, of course, would depend if the game needs the X file reverted back to binary for it to run ... in which case the whole idea won't work.

Just an idea. I really don't know if it's worth the trouble.

Rob
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: Building mod... but some questions!

Post by Stridor »

Rob,

You are one smart cookie [;)] That is exactly what I am doing right now. I am getting close as well, just not quite there yet. If I can crack it, I will write a little tut on it ok.

Regards

S.
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

BREAKTHROUGH!

Post by Stridor »

Ok guys I really burnt the midnight oil on this one, but I am 99.9% sure I have just cracked the "bones" problem! At least as it relates to infantry positioning inside buildings.

It was a bit of a doozy, but the solution turns out to be relatively simple to implement! I will post a tutorial soon.

The really exciting news is that if this means, what I think it means, then *perhaps* animations from MS3D will be possible as well!

Watch this space!

This SS is my demo house I have been using (knocked up in SU in just over 3 minutes [:D]). The infantry inside are purely from direct.X generated from MS3D alone without any post processing required (which is what Rob feared).

I *should* write a SU script to do the same, but MS3D is just so good at what it does (you can't do any animation in SU for example), $35 seems like a steal!

Image
Attachments
ss.jpg
ss.jpg (114.72 KiB) Viewed 113 times
User avatar
Biffa
Posts: 119
Joined: Tue Apr 15, 2008 9:49 pm
Location: Wiltshire
Contact:

RE: BREAKTHROUGH!

Post by Biffa »

Stridor = [8D]

I'll get on with more models and await your findings, great stuff, all this talk is chinese to me ofc but if it works (and it looks like it does!) then brilliant!

User avatar
koiosworks
Posts: 813
Joined: Sun Jun 20, 2004 8:14 pm

RE: Building mod... but some questions!

Post by koiosworks »

ORIGINAL: Mobius
ORIGINAL: koiosworks
ORIGINAL: Mobius

Kevin, does that apply for tanks too?
Yes, but make sure you have the _LOD for each tank part. it really helps performance to create LOD models. very low poly models....
there are many .x files for LOD in the game for examples.
look at the KV-1 Model 1942 for example
Body_LOD etc....
This works really slick. I have a 1300 poly tank body model that looks good close up but the LOD body is only 450 polys. You can't tell that the tow cables and tow hooks and various other hardware bits are missing from a distance.

I assume if I have a 1024x1024 mesh for the close up model I could have a 512x512 mesh for the LOD model with no problems?

Modbius, you mean texture? yea, easily, i think we used 128x128 textures for the distant stuff. it is really not much bigger than a small 'box' at the point we swap out models.
User avatar
Biffa
Posts: 119
Joined: Tue Apr 15, 2008 9:49 pm
Location: Wiltshire
Contact:

RE: Building mod... but some questions!

Post by Biffa »

Damn knew I'd get stuck here.

99% done just this media.xml stuff to do. Followed tutorials, everything fine very clear Stridor.

Weird things and dumb questions part3

There is only one media.xml that I can find and it is in Kharkov_L1A, following the tutorial it implied there was others which ofc I thought there may be one that would be more relevant for dropping a building in on any map thru the edit programme.

Was confused again by this "We do this with a file called media.xml which resides in the map directory" I have no map directory on my install?

Atm I'm using my digital download to run the game rather than the cd so maybe I'm missing something but I've looked and looked for both a Map directory and another media.xml in the install but so far nothing.

building definitions aka root, textures paths editing into an xml document...where? The tut is obviously for map making but I havent touched that part of the game yet, ofc I will have to play with the editor once I've got these buildings installed.

Am I being dumb have I missed something?
User avatar
Erik Rutins
Posts: 39324
Joined: Tue Mar 28, 2000 4:00 pm
Location: Vermont, USA
Contact:

RE: Building mod... but some questions!

Post by Erik Rutins »

The map folders are under the /media folder and they're called names liks "Kharkov_L1A" for the summer maps and "Level1" for the Winterstorm maps. The files relating to each map are within the sub-folder. The scene xml files for the winter maps were left out by accident, those can be found here:

tm.asp?m=1773268
Erik Rutins
CEO, Matrix Games LLC


Image

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.
User avatar
Biffa
Posts: 119
Joined: Tue Apr 15, 2008 9:49 pm
Location: Wiltshire
Contact:

RE: Building mod... but some questions!

Post by Biffa »

Thanks for the quick reply Erik, the question is for a model especially a map/terrain model to be accessible for map makers and scene editing it needs to go somewhere and probably added to an .xml file somewhere so that its dependancies (bmps, dds etc) can be linked and accessed.

This is a bit out of my league so forgive me, as a modder I'm use to using sdk's or following a path already trodden by others rather than being a wobbly pathfinder behind [&o] Stridor.

I'm not making a map (yet) I'm helping people who make maps and edit scenes. I will need to thou to test my buildings but atm I havent, since I'm sure it will work. I wanted to get all the files compiled before testing, creating the .xmls for it is a bit chicken and egg but I'm pretty sure I should have one, I'm gonna test to see after I've popped this question up.

the JSGME Mod enabler from what I've quickly read typically sets up a naming convention that adds new files or adjusted (modded) files that can then be activated or deactivated, each file ofc has a path and a file order, e.g. a mod for a new tank would slot into the Armoured Units folder and inside it would drop it's summer variant into the 'summer' folder contained within the Armoured Units folder.

Same rules apply to infantry, guns, etc, infact anything generic for building a battle or campaign with the editor, now maps are different slightly because they are specific to a battle so they follow different rules regards set up because they create their own unique set where they gather up the various map elements to create a scene so therefore they are their own folder...e.g. folder Kharkov_XXXX or Level2.

So based on these assumptions, how do you set up the file paths/folder order/xml descriptions when making 'map' elements that aren't specific to a particular map but need to be enabled for people to either add them to their edited scenes or include in their maps?

I need to test this and I could be acting dumb but does the scene editor just flick through all of the map folders in the Media folder to gather the elements available, isn't there an xml listing somewhere containing each and every element with it's dependancies? Like every building, tree, bridge etc? If there is, where is it and what is it called?

Now my hunch (and I could be answering my own question) is that a newly Moded building would drop it's mesh (x.file) into Terrian/Meshes folder and it's Texture into the Terrian/Texture folder BUT and this is the bit that confuses me each map folder also contains another set of x.files/meshes and texture files? Also in [&o] Stridors tut is says follow the map tut for editing the xml files? Do I created my own folder aka Biffa's Terrain pack one and then create a new xml folder inside it that lists the elements and then let JGSME enabler drop the various files into the generic Terrain folder? If this is correct then what should this xml folder be called...media.xml?

Now I'm confusing myself just writing this but I think the question/s are fairly clear, also the upside to this is that by asking it'll be here for anybody else who is as easily confused as I am.

All I know is that modding and adding terrain elements that are not specific to any map requires a different set up that I am not sure of or smart enough to figure out, damn I wish I'd started with making a map first! [:@]

Sorry if this post is as long as it is stupid [:o]





User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: Building mod... but some questions!

Post by Stridor »

SAF_Biffa,

Your post was neither long nor stupid as it is a really good question which I knew we would have to get to one day!

How it works is like this:

Maps are stored under their own directory in the Media directory. You will notice that there are some non-map specific meshes in Media/Terrain and Textures in Media/Textures. However What you will find is that there are meshes and textures actually spread throughout the entire Media directory usually stored in their parent map folder.

Any new asset (mesh, texture, mask) in PCK must be defined to the engine first. The cheeky trick here is to realize that this defines file is actually buried in the game ddls where you can not get access to them!

To get around this problem K have put a mechanism in place whereby you can define new assets in a media.xml file which sits in the map folder. Most of the stock levels don't have a media.xml file as they don't need them (all their assets are predefined in the code). Take a look at Kharkov_L1A, that is a map I added stuff too at the very end of development so it has its own media.xml file.

Anyway to answer your question I think the *best* way to do what you want (and for other future building moders) is as follows.

We should as a community agree on a new directory under Media/Terrain. We should get Erik's blessing as well. I suggest Media/Terrain/Mods. Then under Media/Terrain/Mods you would add your own name Like Media/Terrain/Mods/SAF_Biffa and under that you would put your files. I don't think it is worth splitting up textures and meshes into further directories but you could if you wanted.

So far you can do a JSGME mod without problems.

For a map maker to use your stuff then they would have a media.xml defined in their map folder and reference your work like this:

<resource id="SAF_House1" filename="Terrain/Mods/SAF_Biffa/SAF_House1.x" />
<resource id="SAF_House1.dds" filename="Terrain/Mods/SAF_Biffa/SAF_House1.dds" />

Indeed it would be helpful if you added a master "resource.txt" to all your asests and also put that in your Mod directory. Although the game won't be able to read it, any moder could open it and then cut and paste the needed resources into their own media.xml. This "resource.txt" wouldn't be true xml as it won't have the header or footer xml defs (not needed) just each <resource definition line that can be cut and pasted.

Example. I want to use your cool houses in my map. I go into your Mods directory, open resource.txt cut and paste what I want into my own media.xml. Save my media.xml. Now when I run sceneedit and open my map there you go all of your buildings will be available to be placed on my map.

Thanks again for all your hard work, I hope this clears it all up.

Cheers

S.
User avatar
Erik Rutins
Posts: 39324
Joined: Tue Mar 28, 2000 4:00 pm
Location: Vermont, USA
Contact:

RE: Building mod... but some questions!

Post by Erik Rutins »

ORIGINAL: Stridor
We should as a community agree on a new directory under Media/Terrain. We should get Erik's blessing as well. I suggest Media/Terrain/Mods. Then under Media/Terrain/Mods you would add your own name Like Media/Terrain/Mods/SAF_Biffa and under that you would put your files. I don't think it is worth splitting up textures and meshes into further directories but you could if you wanted.

Makes good sense to me.

Regards,

- Erik
Erik Rutins
CEO, Matrix Games LLC


Image

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.
User avatar
Biffa
Posts: 119
Joined: Tue Apr 15, 2008 9:49 pm
Location: Wiltshire
Contact:

RE: Building mod... but some questions!

Post by Biffa »

Phew! One solution could be to create a non playable map just for collecting and viewing the new elements.

K well I promised a few map makers a delivery date, but with these new considerations and a previously promised date with Thomas the Tank Engine this weekend [8|] means hopefully I can get a pack out around the middle of the week-

Planned elements (baring any other issues):

7-8 houses
2-3 outbuildings
2 new fences (similiar to the one shown in top right of the first pic- light livestock)
1 synagogue or church
3 haystacks plus winter versions (aka not harvested)
anything else I get time for

The haystacks and the light livestock fences are intended mainly for decoration to enliven the maps up a bit, so will a few other terrain elements I'm planning on making. They'll be great if u don't use markers/coins in PvP, but not much use for cover or concealment against the ai.

If I get clever I'd love to make some real scenario helpers that'll inspire missions and ideas from the map makers.

Kharkov Tractor works....[;)]
Bunker/Gun emplacements (if only we could mount artillery into buildings?) Could add more squads by using interlocking sections?
POW camp
A whole town of levelled/burnt buildings
Airfield
Road Barricades (overturned wagons/rubbish etc)
A city [8D] (will depend on pathing issues)

Well fingers crossed.




User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: Building mod... but some questions!

Post by Stridor »

SAF,

Boy that sounds like a lot of work. Great though!
Bunker/Gun emplacements (if only we could mount artillery into buildings?)

Actually field guns can be put inside buildings (at the start of a scenario by design or by the RBG) they just can't mount them, so if you move them out you can't put them back in!

Maybe something Erik/Kevin can look into.
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: Building mod... but some questions!

Post by Stridor »

Also good idea about a demo map.

I think what I might do for those map modders who want to start doing their own maps is to release a plain flat map for them to learn with / get their feet wet with map modding and sceneedit, before moving up to the more difficult stuff.
User avatar
Biffa
Posts: 119
Joined: Tue Apr 15, 2008 9:49 pm
Location: Wiltshire
Contact:

RE: Building mod... but some questions!

Post by Biffa »

Using your map which is a great help but...seem to be having problems putting it into your plain map via notebook.

Firstly I'm not using the mod enabler, I'm dropping everything straight into the demo map folder, once this works I will make it a mod and set up the paths properly, but atm I'm just trying to view this test building ( it and make sure it works.

Files to clarify are:

bifsloho.x
slopehou.bmp
slopehou.dds

This is them added to the map media.xml

Image

In the screen shot you can even see them on the right sitting in the folder.

but....this is how it appears in the scene editor. No texture shown etc. I'm sure I can move it but atm I haven't messed with the editor at all.

Image

Now for people to use them I would create a resource.txt but ofc we are trying to get them into the demo map so they can viewed, it seems adding them to the media.xml hasnt worked (probably a silly mistake of mine somewhere)but should I also add them to the Demo_MapScene.xml?

Also interestingly:

Image

It seems I need somewhere to spec the building characteristics.

Again I could be just being dumb and need my hand held at every stage...it seems [:(] or maybe I've missed something in one of the tuts or I need to now spend some time learning the scene editor properly...not sure.
Post Reply

Return to “Maps, Models and Mods”