Forum

Using md3's instead of mdl [Help!]

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Postby Karall » Fri Nov 26, 2010 8:57 pm

How do you make a .skin file? It says in the console cant load pbla/bla/bla/map i exported the md3 to/cube.tga

And so on. I tried placing my texture there with the cube name with no effect.
Karall
 
Posts: 128
Joined: Thu Jul 15, 2010 5:23 pm

Postby frag.machine » Sat Nov 27, 2010 2:28 am

Dude, try to focus in one single thing. What exactly do you want to do ? Just replace the .mdl skin with a .tga image ? Or do you want to create a complete replacement (md3 + shader) ? My advice is to start with the easiest option and, if it isn't enough, then try something more complex.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2090
Joined: Sat Nov 25, 2006 1:49 pm

Postby Karall » Fri Dec 03, 2010 8:44 pm

Alright, frag machine your right. Basicly, i just want to have way better texture quality. More colours and details, possibly bump mapping. How would i do that. I do know that Quake uses a pallete of x number of colours, wich is way to little. As i said im using darkplaces, so i could i get around this problem?
Karall
 
Posts: 128
Joined: Thu Jul 15, 2010 5:23 pm

Postby DukeInstinct » Fri Dec 03, 2010 9:50 pm

For .md3's to use textures you need to change the model's material name to the path of the texture file within the 3d modelling program you are using.

It'll be something like this "progs/texturename.tga".

And if you want to use normal maps just name the normal map texture to the same thing as your regular texture but add "_norm" before the file extension.


If you want multiple textures on a single .md3 model and be able to switch between different textures during the game using QC, you will need to use .skin files.

.skin file names should be like this "model.md3_0.skin", "model.md3_1.skin", "model.md3_2.skin", and so on.
Image
User avatar
DukeInstinct
 
Posts: 20
Joined: Sat Jul 10, 2010 11:20 pm
Location: DukeLand

Postby Karall » Fri Dec 03, 2010 10:19 pm

Alright so the the texture i use in my program is called v_shot.tga, so i export to md3, put the md3 inside the progs folder, rename the v_shot.md3 to v_shot.mdl, put my v_shot.tga in the progs folder and then start. Guess what, it doesn't work. WHY!!!
Karall
 
Posts: 128
Joined: Thu Jul 15, 2010 5:23 pm

Postby ceriux » Fri Dec 03, 2010 10:58 pm

recompile the md3 with the texture path set as the one where your /progs/texture.tga is. maybe its looking for the path you used when compiling it rather than that one?
User avatar
ceriux
 
Posts: 2223
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Postby Karall » Fri Dec 03, 2010 11:46 pm

Tried that too. Didnt work.
Karall
 
Posts: 128
Joined: Thu Jul 15, 2010 5:23 pm

Postby jim » Sat Dec 04, 2010 1:40 am

It tries to load the image from... <your-quake-dir>\<your-mod-dir>\

You could open the MD3 with a text editor to see where it tries to load it, and you could even edit the path there, but be sure to press Insert key before editing it.. otherwise you'll screw up the MD3. Also it's not a good idea to use Backspace or Delete to fix typos, better just get it right the first time, or use Ctrl+Z to undo the typo if you make such.
zbang!
User avatar
jim
 
Posts: 599
Joined: Fri Aug 05, 2005 2:35 pm
Location: In The Sun

Postby Karall » Sat Dec 04, 2010 4:47 pm

How would you open an md3 with a text editor correctly? I just get a load of shitty wierds signs and shite.
Karall
 
Posts: 128
Joined: Thu Jul 15, 2010 5:23 pm

Postby jim » Sat Dec 04, 2010 10:32 pm

You don't.. that's how it looks like.. Put on wordwrap in the text editor, so you'll see the contents easier.

Then just find the name of the texture in the file and edit it. The texture paths are twice in the file per texture..

First in the file is IDP3, then name of the mesh, then some bunch of symbols, then comes a list of frames and then you'll see another IDP3 and immediately followed by the texture path, then some symbols and the texture path again.

If the model use more than one texture, the other textures paths are much more down in the file. Search/Find should work in the file to make it easier to find the texture paths.
zbang!
User avatar
jim
 
Posts: 599
Joined: Fri Aug 05, 2005 2:35 pm
Location: In The Sun

Postby Sajt » Sat Dec 04, 2010 10:45 pm

Remote desktop! Just kidding, that would take even longer to figure out. (Also, it's so 90s...)

Karall, you said the console said "can't load lkdfjasdklfhaskdf/asdasjda/dajsd". It's probably telling you the skin path that was given in the md3 file. Did you try putting your image there?

Also when you say "doesn't work", do you mean your model shows up properly, but has just a solid colour or checkerboard pattern for a texture?
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby Karall » Sat Dec 04, 2010 11:43 pm

Yea Sajt i tried putting my image there. Also doesnt work means solid white colour ^^ Whats a wordwrap?
Karall
 
Posts: 128
Joined: Thu Jul 15, 2010 5:23 pm

Postby jim » Sun Dec 05, 2010 12:32 am

You should find word wrap in some menu in notepad (or some other text editor). It wraps long lines that don't fit into the screen/window so that you don't have to scroll horizontally.
zbang!
User avatar
jim
 
Posts: 599
Joined: Fri Aug 05, 2005 2:35 pm
Location: In The Sun

Postby Karall » Sun Dec 05, 2010 3:02 pm

I tried editing the paths in the md3 file, when i select the weapon the console shows up and gives me a load of errors. So i guess i did something wrong.
Karall
 
Posts: 128
Joined: Thu Jul 15, 2010 5:23 pm

Postby Spike » Sun Dec 05, 2010 3:13 pm

if you're using a windows-based text editor, editing an md3 in it will royally fuck it up.
view it by all means, but don't edit it without using proper tools. just use the path it says and put your texture in a place to match it.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

PreviousNext

Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest