Jump to content
Sign in to follow this  
CRIONYK

how to convert HL2 mdl files to p3d

Recommended Posts

Hi all

anyone can explain me the differents stages to convert a *.mdl (counter strike file ) to O2's p3d ? (what is required, what program...)

Share this post


Link to post
Share on other sites

hi

if you want to i can try some things out

if you can pm me a link to them

required is the mdl file and its textures

Share this post


Link to post
Share on other sites

Hmm, I seem to recall doing this.. Yep

CombineSuperSoldier.jpg

Though the date creted for that screenshot is "09 May 2005, 17:34:30"..

I still have the steps for converting HL1 models to OFP somewhere, it's basicly the same..

Basicly, find out where the game stores the models, HL2, it's Program Files/Valve/Steam/SteamApps/*.gcf

Use google to find out how to extract files from gcf files (Theres a bunch about, I honestly cant remeber what I used)

Then, what ever the format of model you get, say, .mdl, google to find something to convert that to (preferably) .3ds, or .max (Their the normal files most stuff can convert to), I think I used an old version of LithUnWrap (before it became paid-for confused_o.gif )

Then, since most programs screw up exporting, use Anim8or, load the model (They often are facing the wrong direction, ignore that for now), find "Dummy KFDATA" or something, then export the model as .3ds

Then, load up O2, goto File > Import > 3D Studio,load your file..

To get textures.. as you can tell by the picture, I never got that far, though I did for CSS

Basicly, you convert the texture files to 32bit .TGA files (Best quality you can import into O2), some weren't 256x256, or 512x512 etc, so you strech them up to be 2^2 dimensions (Strecthing them down will be worse for quality), then convert the TGA files to .pac (O2 will do this if set up properly).. Theen, you simply change the texture paths as usual to the new PAC/PAA file

It's totaly possible, not just for HL2/CSS, I managed the following..

Quote[/b] ]List of imported stuff :

Doom 3 -

Pinkey - Textured - Ingame Static

Hellnight - Textured - Ingame Static (And a semi-working version in game)

Bernie - Textured - In game static

Caco Demon - Textured - Ingame Static

Cherub - Textures need redone - Ingame Static

Boney - Textured - In game static

Far Cry -

G11 - Texured - Ingame, half-configed, half LODed

(G11 "AT version" by DaveP)

Buggy - Need textures to map - In game, selections half done, with driver Proxy

Counter Strike Source -

SAS - Textured

Scout Rifle - Textured

It's all realativly simple, the hardest bit is finding the files to extract, and the problem I had with importing .3ds files (THe KDATA, which is solved by Anim8or)

The rest, while slightly repetetive, is simple enough

If you need any help, contact me via MSN or PM

- Ben

Share this post


Link to post
Share on other sites

I think the program you are looking for is GCF scape to take stuff out of css and hl2 gcf files. Its pretty easy to do once you get the hang of it. And if you try to import the regular valve models from css they will have all faces missing from 1 side

I got the m249, CT, and awp out of css

m249

awp

CT

Share this post


Link to post
Share on other sites

thank you guys notworthy.gif

Quote[/b] ]...I think I used an old version of LithUnWrap (before it became paid-for  )

is it possible to download older version ? where plz

about textures, is photoshop able to read them ?

edit: wow looks great in ofp smile_o.gif

Share this post


Link to post
Share on other sites

thanks for link

are you using LithUnWrap ?

Share this post


Link to post
Share on other sites

I used the free version of 3ds max and downloaded smd importer, then I exported to .3ds. Then straight into oxygen

free version of 3ds max is called gmax

Share this post


Link to post
Share on other sites

I dont think so, it just doesnt have the same features as regular 3ds

Share this post


Link to post
Share on other sites

Oh, just a wardning : DONT RELEASE ANY WEAPONS FROM COUNTER STRIKE tounge2.gif (Theres no need, and lots of people get.. offended tounge2.gif )

As for the old version of LithUnWrap, I was sure I uploaded it to my hosting, but it seems not sad_o.gif

Aha.. wait, a friend sent me it ages ago, still had it in my MSN received files folder biggrin_o.gif

LithUnwrap Version 1.3

GMax is totaly free, it's basicly a cut-down version of 3D Studio Max, intended for game-modeling (About all I know, I've not really used it)

Using LithUnwrap, and Anim8or (to sort that error with .3ds files), you should be able to convert models from a lot of games (Assuming there are modding tools for that game), but the hardest part is getting them to be functional in OFP (I.e LODs).. Anything that LithUnwrap wont convert, google the file extension with "plugin" or "convert" after, and you'll almost certainly find a program to convert it to something more standardized, then it should be easy to change it to .3ds

- Ben

{Edit : Just tried to open a HL2 .mdl file in that version of Lithunwrap and it doesn't support that version of "HAL"..}

Share this post


Link to post
Share on other sites

i've used lithunwrap and i've too HAL error.

i've installed gmax but he refused my key.  sad_o.gif

anyone can convert mdl files for me ? (i've links and i will pm them to anyone wants) (i give credits for CS:S addon makers and the man who convert files for me  wink_o.gif  )

Share this post


Link to post
Share on other sites

@DBR_ONIX :

i see in your first post it's an HL2 soldier model smile_o.gif but what program have you used to convert it (if lithUnWrap don't work mad_o.gif )

Share this post


Link to post
Share on other sites

Right, today I got bored and worked it out smile_o.gif

Stuff needed..

Steam, HL2, the SDK (installed via Steam)

VTFEdit - To convert the textures to TGA or something more standard

GFCScape - To extract the files from the archives

MDL Decompiler

3D Studio Max (I used v7), or GMax

SMD Importer

O2 - Shockinly

TexView - Or you can use O2's convertion stuff, but TexView is easier IMO

I used Paint Shop Pro to convert the TGA to uncompressed to it loads in O2, but you could just export to BMP inplace of TGA

First, I extracted all the C:\Program Files\Valve\Steam\SteamApps\source models.gcf and source materials.gcf using GCFScape.. (You could find the files in GCFScape, and export htem induvidualy, but I had trouble finding the files, so extracted them all and used windows search to find them)

Basicly, to get the Combine Prison Guard, you need..

Quote[/b] ]Combine_Soldier_PrisonGuard.dx80.vtx - needed to export the smd file

Combine_Soldier_PrisonGuard.dx90.vtx - not really needed I don't think

Combine_Soldier_PrisonGuard.mdl - the model

Combine_Soldier_PrisonGuard.phy - ragdoll details again, not sure if this is needed either

Combine_Soldier_PrisonGuard.sw.vtx - needed to export I think

Combine_Soldier_PrisonGuard.vvd - needed to export

combinesoldiersheet_prisonguard.vtf - texture

Then, you install MDL Decompiler (put the .exe in the SteamApps\your_username\sourcesdk\bin), and run it..

Navigate to where you extracted that .mdl file you want to convert, and make a folder (I used the desktop), and set it as your export path..

Uncheck the thing about using steam to extract directly from gcf, as I found it crashed..

Then, you should have a folder on your desktop, with .smd files

Install the SMD importer into gmax as described in the readme, and load it (as described, the MAXscript toolbar is in the right hand coloum, most right-hand icon btw.. Took me a while to find it icon_rolleyes.gif ), and click the import button, select lod1_somethingsomething.smd (It has lower lods too, which you might want to convert as well), and wait a few seconds..

Then, ignoring any errors about missing texture paths (close them), go to file > export, select 3D Studio (.3ds), put in a file name, and click export, click yes on the preserve textre-paths..

Then, isntall VTFEdit, and find and double-click your combinesoldiersheet_prisonguard.vtf file

Then, goto File > Export, I chose TGA (Then loaded it Paint Shop Pro, and went to File > Save As, selected TGA, clicked options, selected Uncompressed, and 24bit).. If you don't have Photoshop or PSP, select JPEG, and save it somewhere (idealy next to your .3ds file)

Then, load up texview, File > Open, select your file you just saved, File > Save As, go to the same folder as your .3d file, click save

Finaly, load up O2 (neaarly there! biggrin_o.gif), File > IMport > 3D Studio, find your file, click okay on the import dialouge, close the thing about the texture path (theres a better way of doing it)

Window > Texture Libary, I've got it setup so it's docked to the right of the screen, not sure where the default was..

I made a new selection when the thing first imported, called it skeleton, and pressed Ctrl+I, new selection, body.. It imported the skeleton HL2 uses for animation too, which is unnessiary for OFPs archiac animation method, and this makes it easier to remove later on, you could really just delete the skeleton right away, but meh tounge2.gif

Really-finaly, you ctrl+double click on the texture (3dsmax shortened the texture name, to stay compatible with older versions of 3dsm, which is why that texture path dialouge doesn't work like it should)..

Then, right click (just tap the button, so you don't nudge anything), and press Ctrl+E (Poly properties or something)

Then, you should see at the bottom-right-ish a file box, with a folder icon.. Click it, and navigate to your .paa file you saved from TexView.. Click select, and click okay on the properties box.. If you have buldozer set up (which I don't currently, haven't used O2 in a long time), it should show up biggrin_o.gif

Now you just have to save the p3d, and dance (Dont know why), and if your anything like I am now, close down about 20 windows that have accumliated..

And there it is, your not-as-good-as-HL2 HL2 model, in OFP! smile_o.gif

The reason it'll look worse than in HL2 is the lack of OFP's engine for things like normal-maps, bump maps etc.. ArmA may have support for these (Possibly not though..), but for now, this is as good as your going to get (You could find the Hl2 bump-map and merge it into the texture in Photoshop, which is a bit of a cheap work around, but it looks reasonable)

If you can't follow this, but have everything needed, I could shove together a quick video walk-though, or if your missing something (like 3DSMax, or Photoshop, or Hl2), or are just lazy, I'd be happy to convert a few models for you.. tounge2.gif

I already have the Combine Prison Guard, if you want to see how it looks in Buldozer (Add a static object config and shove them in a PBO to see them in game)

Hope this helps goodnight.gif

- Ben

{Final edit : This reallllly needs pictures or something, bah,the video tutorial will solve that if you want it smile_o.gif }

Share this post


Link to post
Share on other sites

very very very very big thanks smile_o.gifsmile_o.gifsmile_o.gifsmile_o.gifsmile_o.gif

i try this now notworthy.gif

Share this post


Link to post
Share on other sites

Cool biggrin_o.gif No problems smile_o.gif

I wouldn't mind seeing any screenshots of stuff you get working ingame (Espically the Strider.... tounge2.gif)

Glad to help xmas_o.gif

- Ben

Share this post


Link to post
Share on other sites

Striders ? in OFP ? ? ? ? ?  smile_o.gif  it can be cool  whistle.gif  but too many work  banghead.gif  and no time to  mad_o.gif

Share this post


Link to post
Share on other sites

hi all

i have exported an sg-552 to O2 but the ejection window is on the left pistols.gif ...

can anyone help to reverse the model plz ? (on milkshape, 3ds max or O2)

Share this post


Link to post
Share on other sites

ya every valve weapon is like that except the m249 and dual elites I think

Share this post


Link to post
Share on other sites

Almost certain theres a button to mirror the weapon model in O2, dunno if its what you want, but it'll change the direction of the ejection port thingy..

The button looks like..

/|\ I think..

- Ben

Share this post


Link to post
Share on other sites

Wrong, you'd need to mirror that symbol of yours as well wink_o.gif

O2 symbol for mirroring:

O2_Mirror.jpg

3DS MAX symbol for mirroring:

MAX_Mirror.jpg

Note: when mirroring in O2, never forget to press "w" after mirroring to get the faces properly aligned again.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×