Dear returning Carmageddon fans Image

These last years, the CWA Board assimilated what was archived from many old Carmageddon forums, including the whole of the Official Carmageddon.com Forums.
If you wish to merge any previous account you might have had with your new or existing CWA account, don't hesitate to reach out to us !

Importing assets from other games

The greatest unfinished sequel ever!
User avatar
Errol
Toxic Ranger
Posts: 1168
Joined: Fri Dec 25, 1998 12:00 pm
Location: Sunny Wales
Contact:

Importing assets from other games

Post by Errol »

Another day, another topic!

A couple of days ago, when I was tidying up all the C2 files I've downloaded recently, I read the readme of Harm's Seaview Dunes Powerslide > C2 map conversion. Crikey! I thought, that is a long winded process and no mistake. It even used an Excel macro! Errol, I thought to myself, surely this process could be automated in some way. So I grabbed Powerslide and set about working out the file formats and now I have an application capable of reading in .de2 and .tex files and exporting a .dat, .mat and a selection of .tifs for import into Plaything 2. (As an aside, expect a map pack at some point in the near future). In theory I can export the maps and cars from any game using RatBag's Difference Engine (some dirttrack stuff, something called Leadfoot, a couple of others I forget).

This got me to thinking and reading about and I notice alot of people are converting maps and cars from various games for use in C2. Again, Harm released an awesome Mario 64 mod; I reverse engineered the NDS rom version of that game a couple of years ago, it wouldn't take too long to export all those maps as dats, ready for C2 setup.

So, my point... I'd like to offer my services as a file converter to the community. You ask for a games maps/cars/other assets, I'll do my damnedest to supply you with raw dat, mat and tif files so you can do all the boring noncar, powerup and ped stuff. All I ask in return is a mention in the readme and absolutely no liability should you get sued :wink:

I'm sad to admit I try to reverse engineer a 3d format from a game around once a month, they're like my version of a crossword or sudoku (another aside, sudokus became far too easy for me once I programmed something to do them for me).

-Errol
:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
User avatar
Razor
Stomping-on-Kittens
Posts: 3427
Joined: Sat Dec 01, 2007 6:38 pm
Location: Beaver City
Contact:

Re: Importing assets from other games

Post by Razor »

Would this be possible with a game off of any platform?
[ Razor @ Carmageddon Webmasters Alliance Network ] [ My Downloads ] [ My Carma Items ] [ Conversion lists ]
To download the BETA Mod and more information on my other work, visit me @ https://razor.cwaboard.co.uk
User avatar
Errol
Toxic Ranger
Posts: 1168
Joined: Fri Dec 25, 1998 12:00 pm
Location: Sunny Wales
Contact:

Re: Importing assets from other games

Post by Errol »

Should be, as long as I can find a copy of the game somewhere, they're all just basically binary after all.

As long as I can find a copy somewhere on the intarwebs I'll be set.

I've managed to do DS roms as well as N64. Pretty sure I did a PSX game years ago but I can't remember what. PC stuff is easiest, especially for fairly established engines.

-Errol
:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
User avatar
Razor
Stomping-on-Kittens
Posts: 3427
Joined: Sat Dec 01, 2007 6:38 pm
Location: Beaver City
Contact:

Re: Importing assets from other games

Post by Razor »

This is awesome news! I'll send you a PM mate.
[ Razor @ Carmageddon Webmasters Alliance Network ] [ My Downloads ] [ My Carma Items ] [ Conversion lists ]
To download the BETA Mod and more information on my other work, visit me @ https://razor.cwaboard.co.uk
User avatar
C2 Scientist
jaywalker
Posts: 2059
Joined: Tue Mar 26, 2002 5:00 pm
Location: Finland
Contact:

Re: Importing assets from other games

Post by C2 Scientist »

Errol, I've got a question (vaguely) related to the topic. Would it be possible to make C2 somehow support higher bitmap/texture resolutions than 128x128 in D3D / 256x256 in Glide? The limitation has grown to be a bit of an annoyance to, not only myself, but also to a few others who have occasionally mentioned how they "had to split this and that texture into two and re-map them" because of it, when they were porting something for C2. Otherwise the end result would have been the converted car/map (partially) looking much blurrier in C2, due to the high bitmap resolutions used in the original game.

Also, I think the horizon images would benefit tremendously of this upgrade. (as a side-note to this, I can create full, seamless 360° panoramas from my DSLR-images, and I also happen to live near a high enough vantage point for a great 360° horizon without buildings/trees/stuff obstructing the sky)

Now, since I know a bit less than nothing about programming, I'm not much of help with this - but I'm curious. (and know exactly how I would put it into good use) :wink:
User avatar
Razor
Stomping-on-Kittens
Posts: 3427
Joined: Sat Dec 01, 2007 6:38 pm
Location: Beaver City
Contact:

Re: Importing assets from other games

Post by Razor »

Quote from C2S - Also, I think the horizon images would benefit tremendously of this upgrade.

I completely agree with this, after just creating a brand new horizon image for my map.

It looked great at 1000x1000 but after resizing it to 256x256 it's just one huge blur.

The only pix allowed to be bigger than 128x128 or 256x256 is the map image.
[ Razor @ Carmageddon Webmasters Alliance Network ] [ My Downloads ] [ My Carma Items ] [ Conversion lists ]
To download the BETA Mod and more information on my other work, visit me @ https://razor.cwaboard.co.uk
User avatar
Harmalarm
road raged psycho
Posts: 1302
Joined: Tue May 13, 2008 3:56 am
Location: Den Haag, Holland
Contact:

Re: Importing assets from other games

Post by Harmalarm »

Oh man, I just thought of a great game to rip models from to Carmageddon 2

Carmageddon TDR 2000 off course!

The tracks have never been accessible, apart from the collision files which don't have UV information. And since these baby's are rather big, re texturing them is not an option. But I would love to get my hands on those models, fuck yeah!
User avatar
Errol
Toxic Ranger
Posts: 1168
Joined: Fri Dec 25, 1998 12:00 pm
Location: Sunny Wales
Contact:

Re: Importing assets from other games

Post by Errol »

I one word. No.

In far too many words... maybe:

First we'll ignore that the pix file format is theoretically capable of insanely large images, technically it will likely support up to 65535 x 65535 with 2 bytes per pixel (C2 is R5G6B5, only 16bit).

Second, we'll assume there are three memory pools, 1 shared, 2 not...

The shared pool is used for vehicle textures, loaded and referenced by a name, this much I think is correct as it would go towards explaining why cars need unique texture names to avoid that "your wheels are on my car" scenario.

We'll assume map textures have their own pool as I've never heard reports of cars getting wall textures and visa versa, this could just be because no-one has named a car tex "cityad01" and driven around Beaver City, for example.

The final pool is interface textures, as Razor mentioned the minimap file is large, so are the interface backgrounds. I tested the main menu image by resizing to 1280x960, it loaded and rendered fine, just they don't resize it to fit so 3/4s of the image is offscreen. Going smaller 320x240 results in it being drawn in the top left corner with graphical artifacts should you move your cursor outside of this area.

Some more guesswork now, I'm assuming the shared pool is infinite in size. While I think there is a per "object" limit of around 512 I'm fairly certain this limit doesn't apply across multiple entities. If this were the case having 16 opponents with a texture count of 32 each would hit the limit, again, I've not heard of this happening.

I tested creating a 512x512 tif, letting the game generate the pix, exiting, hex editing the .pix and changing 3 values in the header; 04 00 to 02 00 and both 02 00 to 01 00 (02 00 = 512, 01 00 = 256. 04 00 = 1024 (512 + 512)). The texture rendered but was all messed up, content from the top left quarter of the image was interlaced with content from the top right, couldn't see any content from the bottom portion.

This all leads me to believe that the content loading portion of C2 reads the header (not the actual filesize) to determine whether or not the image should be loaded. This would be a tiny fix if the source were available, as it is not someone would need to disassemble the exe and putz around somehow. As the pdb file isn't available, this disassembling would result in a virtually unreadable mess.

So... no.

-Errol
:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
User avatar
C2 Scientist
jaywalker
Posts: 2059
Joined: Tue Mar 26, 2002 5:00 pm
Location: Finland
Contact:

Re: Importing assets from other games

Post by C2 Scientist »

Bummer...

Thanks for the insight, though.
User avatar
Errol
Toxic Ranger
Posts: 1168
Joined: Fri Dec 25, 1998 12:00 pm
Location: Sunny Wales
Contact:

Re: Importing assets from other games

Post by Errol »

I grabbed something called REC (http://www.backerstreet.com/rec/rec.htm) and slapped my C2 exe through it, in addition to finding lots of awesome new error messages it spat out a C-like code.

With time, effort and determination it should be possible to get it to compile.

Maybe.

-Errol
:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
User avatar
Razor
Stomping-on-Kittens
Posts: 3427
Joined: Sat Dec 01, 2007 6:38 pm
Location: Beaver City
Contact:

Re: Importing assets from other games

Post by Razor »

Forever the bringer of good news, Errol. Well done.

How do you find all of this stuff? Is it just extensive Google searches?
[ Razor @ Carmageddon Webmasters Alliance Network ] [ My Downloads ] [ My Carma Items ] [ Conversion lists ]
To download the BETA Mod and more information on my other work, visit me @ https://razor.cwaboard.co.uk
User avatar
Errol
Toxic Ranger
Posts: 1168
Joined: Fri Dec 25, 1998 12:00 pm
Location: Sunny Wales
Contact:

Re: Importing assets from other games

Post by Errol »

Googling, googling and more googling.

I can't even type "good" first time anymore, damn muscle memory.
:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
User avatar
Errol
Toxic Ranger
Posts: 1168
Joined: Fri Dec 25, 1998 12:00 pm
Location: Sunny Wales
Contact:

Re: Importing assets from other games

Post by Errol »

This is probably the wrong forum to ask in but it seems like the right thread. Does anyone know why TDR2k maps were not an option? Surely the mesh format is known because new cars can be created. Anyone able to fill me in?
:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
User avatar
Harmalarm
road raged psycho
Posts: 1302
Joined: Tue May 13, 2008 3:56 am
Location: Den Haag, Holland
Contact:

Re: Importing assets from other games

Post by Harmalarm »

Actually Errol, I have no Idea. I have never modded TDR2000, so I have no Idea how cars compare to tracks, but I think tracks are just built up in a different way?
User avatar
coffeycup
Genesis
Posts: 4848
Joined: Sun Sep 27, 1998 6:00 pm
Contact:

Re: Importing assets from other games

Post by coffeycup »

I believe Tosh knows the reason. He was up on what versions and/or plugins for 3DMax were needed for all sorts of stuff.

Personally, I never owned TDR so know nothing at all about editing or creating new content. I guess there were

some new TDR cars made but never any maps??
User avatar
Errol
Toxic Ranger
Posts: 1168
Joined: Fri Dec 25, 1998 12:00 pm
Location: Sunny Wales
Contact:

Re: Importing assets from other games

Post by Errol »

Oh well. I found some of Berocs old posts about the scol files and such, I'll see if they help. In theory I won't need to know much about the TDR2k map files to export them to C2.
:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
User avatar
Errol
Toxic Ranger
Posts: 1168
Joined: Fri Dec 25, 1998 12:00 pm
Location: Sunny Wales
Contact:

Re: Importing assets from other games

Post by Errol »

Image

Boosh! It may not look like much but that's an untextured haybale converted from the TDR 2000 .msh file. What is it with Australian game developers and fracked up file formats?!

Image

Speed edit: UVs :smile:

Image

Third edit: Now supports meshes with a combination of quads and tris.

-Errol
:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
User avatar
Harmalarm
road raged psycho
Posts: 1302
Joined: Tue May 13, 2008 3:56 am
Location: Den Haag, Holland
Contact:

Re: Importing assets from other games

Post by Harmalarm »

:lol: Geez, you are fast! Haha. Yes I knew about the SCOL importer, but those files don't have any UVW info if I recon.
User avatar
Errol
Toxic Ranger
Posts: 1168
Joined: Fri Dec 25, 1998 12:00 pm
Location: Sunny Wales
Contact:

Re: Importing assets from other games

Post by Errol »

Yeah, I didn't bother going down that route in the end, just poked around in the .msh files.

I'm going to knock together a batch processor and I should be able to spit out C2 ready noncars of every "dingable" in TDR2000. Maybe drones too.

The track mshs file seems to have a different layout though :| Damn those Australians! DAMN THEM!
:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
User avatar
Harmalarm
road raged psycho
Posts: 1302
Joined: Tue May 13, 2008 3:56 am
Location: Den Haag, Holland
Contact:

Re: Importing assets from other games

Post by Harmalarm »

Are these tracks MSH files not possible to read then? Or would it need a different tool to open?
User avatar
Errol
Toxic Ranger
Posts: 1168
Joined: Fri Dec 25, 1998 12:00 pm
Location: Sunny Wales
Contact:

Re: Importing assets from other games

Post by Errol »

I'll work it out, it's just quite odd to have 2 files with the same extensions and yet completely different internal structures.

Edit, pretty sure I've worked out the structure of the map msh files but I'm going to have problems with C2s max tex count. I'll have to work something out there and then I'll do some screenshots.
:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
User avatar
autopilot
Travelling Scrap Heap
Posts: 2290
Joined: Mon May 20, 2002 4:00 pm

Re: Importing assets from other games

Post by autopilot »

Awesome awesome.. keep digging. I really need to find another computer soon and have a carma Renaissance.
User avatar
Errol
Toxic Ranger
Posts: 1168
Joined: Fri Dec 25, 1998 12:00 pm
Location: Sunny Wales
Contact:

Re: Importing assets from other games

Post by Errol »

Image

If I got my UBBCode right the image should link to a larger version.

Welp... just textures to go now I guess.

-Errol
:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
User avatar
The_Devils_Avocado
motorised death
Posts: 1091
Joined: Sun Aug 25, 2002 4:00 pm

Re: Importing assets from other games

Post by The_Devils_Avocado »

Autopilot - Inedeed you do! Need to get you pumping out cars again, my favourites list comprises of just about all your cars.

Errol, you fight like a dairy farmer.
User avatar
Harmalarm
road raged psycho
Posts: 1302
Joined: Tue May 13, 2008 3:56 am
Location: Den Haag, Holland
Contact:

Re: Importing assets from other games

Post by Harmalarm »

Hehe, I know you will pull this off with textures and all! Is this a .msh imported file? Btw, while you are on it. Does the .msh file also contain the smoothing groups? They seem to be missing, but it might also be the material that causes this.
User avatar
Errol
Toxic Ranger
Posts: 1168
Joined: Fri Dec 25, 1998 12:00 pm
Location: Sunny Wales
Contact:

Re: Importing assets from other games

Post by Errol »

Hi Harm,

Yeah, this is a converted msh file. Currently the default material has smoothing turned off, the mesh looks far nicer with it enabled. I have all the UVs pulled correctly, I just need to knock together a parser for the .hie file and then one to read each .tx file and finally an on-the-fly converter from .tga to .tif! So, a couple of hours.

-Errol

Editastic:

I was hoping I could stay away from node list section of the .hie file but it seems to dictate which texture is applied to which mesh. If you use the logic "mesh 1 uses tex 1, mesh 2 uses tex 2" you get...

Image

But still, I can parse .tx files now, and convert .tga to .tif on the fly. Not long now :smile:

-Errol
:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
User avatar
Errol
Toxic Ranger
Posts: 1168
Joined: Fri Dec 25, 1998 12:00 pm
Location: Sunny Wales
Contact:

Re: Importing assets from other games

Post by Errol »

Hollowood C2 (Alpha 1.0 edition) 13.1meg

No noncars, no peds, no powerups, no drones, no checkpoints, no water, no opponent paths, no double-sided textures, no smashables, no minimap... uh, I think that's everything. Oh, no mapstockalypse file. Manual editing the races.txt ahoy!

There seems to be a small section of the map missing, the bounding wall to one side, but other than that the mesh seems to be fine.

Consider this a proof of concept, TDR2k maps can be imported into C2 :smile:

-Errol
:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
User avatar
Razor
Stomping-on-Kittens
Posts: 3427
Joined: Sat Dec 01, 2007 6:38 pm
Location: Beaver City
Contact:

Re: Importing assets from other games

Post by Razor »

Awesome work! Haven't tried it yet, will soon.

Well done once again, Errol.
[ Razor @ Carmageddon Webmasters Alliance Network ] [ My Downloads ] [ My Carma Items ] [ Conversion lists ]
To download the BETA Mod and more information on my other work, visit me @ https://razor.cwaboard.co.uk
User avatar
coffeycup
Genesis
Posts: 4848
Joined: Sun Sep 27, 1998 6:00 pm
Contact:

Re: Importing assets from other games

Post by coffeycup »

Hey, this is cool.

Image

I preprocessed my copy so I could have peds to keep the timer running.

Image

I fiddled with the horiz settings and fog colour a little too. Fun stuff!
User avatar
Errol
Toxic Ranger
Posts: 1168
Joined: Fri Dec 25, 1998 12:00 pm
Location: Sunny Wales
Contact:

Re: Importing assets from other games

Post by Errol »

Those be nice horizon settings you have there, any chance you could tell me them, I could use them in future releases.

Speaking of which, Alpha 2 should be out this evening (maybe 12 or so hours from now). Not a major revision but I'll get the double-sided texture problem fixed and the hodge-podge of items stacked at 0,0,0 into their proper locations. Depending on how things go I might try to get all the smashables in too; fences, windows, things like that.

I'll also pre-process and slap some peds about. I have my timer set to 50 minutes so I forget you actually need to have peds otherwise.

-Errol
:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
User avatar
Harmalarm
road raged psycho
Posts: 1302
Joined: Tue May 13, 2008 3:56 am
Location: Den Haag, Holland
Contact:

Re: Importing assets from other games

Post by Harmalarm »

This is incredible news Errol, Epic work here! I have been waiting for this for a long time you know. I always loved the TDR tracks, though Unfortunately the TDR game play never appealed to me.

It would definitely be cool if you could pull it off to get those non-cars in place. I was thinking that all of these would need bounding boxes, and that got me thinking about the pt2.5 topic, and the idea of automated bbox creation. Doing this for noncars might be a better aim, if you are still thinking in that direction that is.

Are you also planning on porting the powerup models?

Did you need to re-scale the map, or was it in correct scale to begin with?

User avatar
Errol
Toxic Ranger
Posts: 1168
Joined: Fri Dec 25, 1998 12:00 pm
Location: Sunny Wales
Contact:

Re: Importing assets from other games

Post by Errol »

Same here, I don't know what it was about TDR but I never made it beyond the demo. Actually, I think I left the whole Carma scene not long after it was released.

Fortunately (unfortunately?) bounding boxes will be easy as pie in this instance; I just need to parse the .dcol file associated with each dingable. In theory I can use some of the techniques from SmashMap to duplicate effects from TDR2k, things like trash cans exploding with litter particles.

The powerup models were the files that helped me work out the .msh file format. Each powerup has a corona.msh, basically a square that the glow is mapped to. Can't get easier than 2 triangles :wink:

I had to scale the map down to 0.25 (this is just a guesstimate) so I'll have to remember to scale everything else the same amount.

I just tested my code with another map and one-click converted Necropolis. I love it when shit just happens :smile:

-Errol
:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
User avatar
Harmalarm
road raged psycho
Posts: 1302
Joined: Tue May 13, 2008 3:56 am
Location: Den Haag, Holland
Contact:

Re: Importing assets from other games

Post by Harmalarm »

:cool: yes that is exactly the way these conversions need to be approached. I think only by automating this process you find the best way to make sure all stuff can be ported. If this had to be done by hand, you would probably lose interest in the project after 2 or three tracks, right? I know I would... :smile:

User avatar
Errol
Toxic Ranger
Posts: 1168
Joined: Fri Dec 25, 1998 12:00 pm
Location: Sunny Wales
Contact:

Re: Importing assets from other games

Post by Errol »

Damn right. Manually porting every Carma 1 and Splat Pack map with X-Ray all those years ago put me off doing manual work forever.

If I can't automate it, I'm not doing it :wink:
:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
User avatar
Harmalarm
road raged psycho
Posts: 1302
Joined: Tue May 13, 2008 3:56 am
Location: Den Haag, Holland
Contact:

Re: Importing assets from other games

Post by Harmalarm »

:smile:

That part in the map that is missing is actually the piece of wall that gets destructed in the mission with the big robot ape. So it will probably be a dynamic object of some kind, or a separate .msh file that gets replaced after destruction. Probably the same with all the doors/gates/windows?

Post Reply

Check who’s online

Users browsing this forum: No registered users and 237 guests