Pages: [1]
  Print  
Author Topic: Skinning md3 with blender  (Read 15718 times)
thorium
Nub


Cakes 0
Posts: 8

Member


« on: October 13, 2006, 11:37:49 PM »

I'm just messing around with trying to make weapon models using Blender.  I got the md3exporter from xreal's svn.  The model display's fine in game but the texture just shows up grey and a little bit of white.  I uv mapped in Blender trying with a tga and also tired a jpg, same deal.  Should I be using a different exporter?  Or is there a special way to uvmap for md3s?  Can anyone give me the basic steps?

Thanks Smiley
Logged
fromhell
Administrator
GET A LIFE!
**********

Cakes 35
Posts: 14520



WWW
« Reply #1 on: October 14, 2006, 12:41:30 AM »

Basically what you see in game is actually the internal null texture, which is gray and white. What you want to do is correct the material on the exported md3 somehow. A hex editor will work with some trial and error (basically finding the long string in the file and typing a pathname in it i.e. models/weapons2/machinegun/skin.tga and have a bunch of 00's to make valid spaces without crashing anything). Tr3b told me a way how it should be used with the exporter but I unfortunately forgot how and never used his way Sad
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
thorium
Nub


Cakes 0
Posts: 8

Member


« Reply #2 on: October 15, 2006, 01:15:16 AM »

I tried editing the md3 with ghex2, setting the path correctly.  The model just ended up big and really distorted.  I know I probably did something wrong, but  ghex2 is acting strange and not letting me delete what I have highlighted, so its hard to test things quickly.  What editor are you using?  I'm having trouble finding a simpe one with an x11 gui.
Logged
fromhell
Administrator
GET A LIFE!
**********

Cakes 35
Posts: 14520



WWW
« Reply #3 on: October 15, 2006, 09:10:04 AM »

I use windows (atm my linux installation is broken) so frhed is what I use.
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
Czestmyr
Half-Nub


Cakes 0
Posts: 87


Member, Player, Mapper


« Reply #4 on: January 18, 2007, 10:25:56 AM »

I need help on this topic, too. I created this nice lamp mapobject with blender and exported it to .md3, but can't get textures working. I managed to load it into gtkradiant, but it had the 'shader not found' texture on it. Radiant just shouted this error at me:
Texture load failed: "textures/"
So how do you create/texture your mapobjects? Thanks

EDIT: Yeah! I managed to texture my mapobjects. You have to use the md3 exporter from the xreal svn. Then open the md3 file in a hex editor and overwrite the strings in there. Hex editor for KDE is KHexEdit.
To enable md3 exporting in Blender, download ALL of the scripts on this page into your /scripts directory: http://svn.sourceforge.net/viewvc/xreal/trunk/xreal/blender/?sortdir=down
« Last Edit: January 19, 2007, 06:29:02 AM by Czestmyr » Logged

Jabber ID: Czestmyr (rolled-herring-sign) jabber.cz
erachude
Nub


Cakes 0
Posts: 29


« Reply #5 on: January 19, 2007, 09:49:50 AM »

thanks czestmyr,

i've downloaded the scripts and i know what to do with them, but i'm not so sure about the hex editing part. what strings do i have to overwrite and what do i overwrite them with? any chance you could paste some examples of what you see in the hex editor before and after?

thanks.
Logged
Czestmyr
Half-Nub


Cakes 0
Posts: 87


Member, Player, Mapper


« Reply #6 on: January 19, 2007, 10:51:22 AM »

First, make sure, you have an identifier for every material on your model. (In my case, that was "lamphang.tga" - see fig. I) Then you can export the model to md3 and open it in the hex editor. Look at fig. II - The material can be easily identified by a string in the .md3 file. So you just have to overwrite this string to whatever texture you intend to use instead of this material. Do this for all materials in the model and youre done!

EDIT: Dont forget to add NULL (ASCII - 00) characters after the texture name. You mustnt change the data offsets by leaving some bytes out.
« Last Edit: January 19, 2007, 10:53:09 AM by Czestmyr » Logged

Jabber ID: Czestmyr (rolled-herring-sign) jabber.cz
erachude
Nub


Cakes 0
Posts: 29


« Reply #7 on: January 20, 2007, 09:22:03 AM »

i think i've got it, you have to replace the filename the tga has on your pc...

/home/czestmyr/desktop/models/mapobject/czest2ctf/lamphang.tga

...with the filename it will have in the openarena...

models/mapobject/czest2ctf/lamphang

brilliant, that makes sense. explains why i haven't been able to get my md3s to work in game. how come the second example doesn't have tga at the end?
Logged
fromhell
Administrator
GET A LIFE!
**********

Cakes 35
Posts: 14520



WWW
« Reply #8 on: January 20, 2007, 12:17:53 PM »

because the engine can seek if there's a .tga or .jpg by itself
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
erachude
Nub


Cakes 0
Posts: 29


« Reply #9 on: January 20, 2007, 02:49:46 PM »

makes sense. can you use other image formats?
Logged
fromhell
Administrator
GET A LIFE!
**********

Cakes 35
Posts: 14520



WWW
« Reply #10 on: January 20, 2007, 02:58:13 PM »

there's a PNG patch, but I wouldn't recommend using other image formats as that would break vanilla compatibility.

Oh and another thing, JPEGs should not be progressive encoded, or the game will crash.
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
erachude
Nub


Cakes 0
Posts: 29


« Reply #11 on: January 20, 2007, 03:27:38 PM »

thanks for the info.
Logged
Pages: [1]
  Print  
 
Jump to: