Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
hardcore_gamer

A question about MD3 models and textures

Recommended Posts

So here is an example of a modeldef code:

 

//==========Gore==========

Model    OHangingLegless
{
    Model 0 "Models\fusebox1\fusebox1.md3"
    Skin 0 "Models\fusebox1\fusebox1front.png"
    Scale 1.0 1.0 1.0

    FrameIndex POSS A 0 0 //Spawn

    //Frame POSS A 0 "HANG6000"  //you could use this instead if you like
}

 

But notice that there is only a single line for the texture. This works fine if my model only uses 1 texture, but what am I suppose to do if my model uses more than 1 texture? In Misfit model 3D I used 2 textures for my model (a simple fusebox) and yet it doesn't seem to be possible to just add a second skin/texture line or else either the whole model just has 1 texture or it just doesn't work. What am I missing here? I tried this but it did not work:

 

//==========Gore==========

Model    OHangingLegless
{
    Model 0 "Models\fusebox1\fusebox1.md3"
    Skin 0 "Models\fusebox1\fusebox1front.png"

    Skin 0 "Models\fusebox1\fuseboxsides.png"
    Scale 1.0 1.0 1.0

    FrameIndex POSS A 0 0 //Spawn

    //Frame POSS A 0 "HANG6000"  //you could use this instead if you like
}

 

When I did the above my whole model just ended up with 1 texture :/

 

How do I use more than one texture for a model?

Share this post


Link to post

I sent you a reply over at the ZDoom forums, but I'll post it here too.

 

Here's what I do:

-Import the object in Blender.
-Make sure the materials for the object follow the .pk3 path names.
-Use Nash's MD3 exporter to make an .md3 file.

 

Then, in my .pk3:

-Setup the general structure: 
Rosgwct.png

 

Notice that I have a Models folder. Inside that folder are all the folders for each model I have in my mod. For example, I have a model of a flashlight. So in my Models folder, there is a FLight folder. Inside the FLight folder is the .md3 file for the model, and a Skins folder where all the .pngs are for the model. So that means my .pk3 folder structure is Models/FLight/Skins.

 

That means in Blender, the material that the object uses has to be named the same, so if my flashlight model in blender is only 1 object, the material for that object needs to be named Models/FLight/Skins/whatevertexture.png. So if you have a model that has 3 objects for example (a pistol 3d model), with 3 different materials using 3 different textures, you should name them as so:

 

Models/Pistol/Skins/Texture1.png
Models/Pistol/Skins/Texture2.png
Models/Pistol/Skins/Texture3.png

 

Then you make sure your .pk3 file has the same folder structure. So your textures should be in Models/Pistol/Skins.

 

Next, in your MODELDEF lump, instead of using the Skin property, you just specify Frame Index. If you have named your material's paths correctly on your model, GZDoom will find the textures in the Skins folder automatically:
VSJ9Ykj.png

 

Make sure you give the frame a lump name. Notice mine is FSH1A0. So in DECORATE, you need to define the model now with the same lump name:
RT31G5Z.png

 

Last but not least, you need to define a patch in your TEXTURES lump:
hm575lk.png

 

If you've done correctly, you can have many models in your map:
eCyvrIF.png

Share this post


Link to post

I thought the zdoom thread was dead since days passed with no replies :/

 

I will try out what you just said to see if it works!

 

EDIT: About this part: "Last but not least, you need to define a patch in your TEXTURES lump"

 

Not sure how to do this. Any source of info to get me started? Or is this just really simple to do? Don't have much experience with texture lumps.

Share this post


Link to post
On 1/25/2018 at 2:39 PM, R4L said:

Make sure you give the frame a lump name. Notice mine is FSH1A0.

 

I'm sorry for replying to this so late but I just suddenly realized I have a question about this. This lump name, are there any rules regarding what it can be called? Yours is FSH1AO, why is it called exactly? Can you not name your lumps whatever you want to?

Share this post


Link to post
46 minutes ago, hardcore_gamer said:

 

I'm sorry for replying to this so late but I just suddenly realized I have a question about this. This lump name, are there any rules regarding what it can be called? Yours is FSH1AO, why is it called exactly? Can you not name your lumps whatever you want to?

Of course you can. I named mine FSH1A0 because the model in question is a flashlight. FSH1 because it's the best way I could think of to name it similar enough to know what it is. The default Doom shotgun for example is SHTG, because obviously "Shotgun" does not fit into the 4 letter scheme for sprites...

 

I'm happy to help, but so many questions of yours can be answered by reading the ZDoom Wiki. Please read it.

Share this post


Link to post

I tried fallowing your instructions but the textures still don't appear in the editor. I am using Misfit by the way and not blender. I created a test model to try out what you described above. It uses 3 textures called (both in the actual file names, and in misfit, and in slade) texture1, texture2, and texture3. Yet things still don't work. The model itself appears in Gzdoom builder but the textures don't. Here is the actual file:

 

https://ufile.io/7n2fr

 

I have no idea what I am doing wrong. Did I miss a step?

Share this post


Link to post
18 hours ago, hardcore_gamer said:

I tried fallowing your instructions but the textures still don't appear in the editor. I am using Misfit by the way and not blender. I created a test model to try out what you described above. It uses 3 textures called (both in the actual file names, and in misfit, and in slade) texture1, texture2, and texture3. Yet things still don't work. The model itself appears in Gzdoom builder but the textures don't. Here is the actual file:

 

https://ufile.io/7n2fr

 

I have no idea what I am doing wrong. Did I miss a step?

Are you apply 3 seperate textures for a single model? because i dont think that will work.

If it were 3 seprate models with 3 seprate textures then i think it would work fine and would look sometihng like this...

 

PATH "PATH/PATH"

 

SKIN 0 "NAME.PNG"
MODEL 0 "NAME.MD3"

 

SKIN 1 "NAME_2.PNG"
MODEL 1 "NAME_2.MD3"

 

SKIN 2 "NAME_3.PNG"
MODEL 2 "NAME_3.MD3"

 

 

FRAMEINDEX NAME A 0 0
FRAMEINDEX NAME A 1 0
FRAMEINDEX NAME A 2 0

 

my advise to you would be make 1 big texture file with all the necessary textures for that particular model.

 

Share this post


Link to post
1 hour ago, Ermi said:

Are you apply 3 seperate textures for a single model?

 

But isn't that what R4L was saying above? Or is this whole thing a giant misunderstanding?

Share this post


Link to post

It sounds like you aren't structuring your files correctly.

 

Try to load your .pk3 with the models into GZDoomBuilder and see if it spits out any errors. Most likely, it will say it can't find an image file for your model. If it does not list a path, then you need to re-name your materials in whatever editor you're using to the paths your using in your .pk3. If it shows a path, make sure you have your image files where it says. You can have as many textures as you want this way, BUT you have to make sure whatever materials your 3D model uses are named correctly.

 

It's much easier this way than using SurfaceSkin...

Share this post


Link to post

Ah, I think I understand now. I misunderstood your earlier. Basically inside the testobject folder (which itself is inside the models folder) I created a new folder called skins and put the textures into that. But then I put the textures into the same folder as the md3 file and now the model appears with all it's textures inside Gzdoom builder! But now I have a new problem. While the model appears just fine inside gzdoom builder when I start the game the model doesn't appear for some reason. Not sure what is causing this :(

 

Is the model simply too complicated? I hear there are limits to how complex models can be for them to work. The above file I uploaded is still there if anybody wants to check it out. Most of the model isn't too complex but it contains a tube which has a fairly large number of polygons. Perhaps this is just making the model not work in gzdoom even if it appears in the editor?

 

EDIT: I just did a test to see if this issue happens even before I figured out how to to make the textures work and it does. The model just simply doesn't show up in the game for some reason :(

 

EDIT: I did an experiment where I did the exact same thing but with a more simple model and now it works. I think Gzdoom simply could not handle the complexity of the original test model. How can I know if a model is too complex to work?

Edited by hardcore_gamer

Share this post


Link to post
1 hour ago, hardcore_gamer said:

 

EDIT: I did an experiment where I did the exact same thing but with a more simple model and now it works. I think Gzdoom simply could not handle the complexity of the original test model. How can I know if a model is too complex to work?

you said your using misfit editor right?
I think the model can be a total of 4000 polys/tris. If its anything higher then misfit will spit out a export error saying the model is too large for the md3.

best thing to do for highres models, is break it down into multiple parts of 4k poly each. thats 4 models per actor, with that many parts a model can be as large as 16,000 polys. Thats the method i use.
In just one of my scenes for my project i have roughly 500,000 polys on screen at once, works just fine.

Share this post


Link to post
53 minutes ago, Ermi said:

you said your using misfit editor right?

 

Well actually I use Modo for the modeling. I just use Misfit for texturing and for converting the model into md3 format.

Share this post


Link to post

Glad to see it's working.

 

Try to keep the poly count low! Definitely helps with file sizes and helps with lag too. 👍

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×