Multiple materials per md3 model

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

Moderators: GZDoom Developers, Raze Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Post Reply
User avatar
Cherno
Posts: 1309
Joined: Tue Dec 06, 2016 11:25 am

Multiple materials per md3 model

Post by Cherno »

For hours I tried to get this to work, no luck.

I have a single model that has multiple materials. A simple cube where the top quad is material 1, two of the sides are material 2, and so on.

The material names are "models/testcube/skins/mat1.png" etc.

I export it as a md3 and put it into my pk3, under models/testcube. The texture files are located in models/testcube/skins.

The MODELDEF doesn't have the SKIN property.

Code: Select all

Model TestCube               // Name of actor in DECORATE
{
   Path "models/testcube"    // Path to model in PK3
   Model 0 "testcube.md3"    // Model index, model file

   FrameIndex BON1 A 0 0         // The sprite lump, sprite frame, model index, frame number

}
So, basically exactly how this post describes the method.

Yet, when I look at the model in GZDoom, the renderer goes apeshit, zomming rapidly in and out, rendering far away parts of the level, and whatnot.

Maybe anyone had any luck with getting multi-material models to work?
User avatar
HAL9000
Posts: 266
Joined: Fri Mar 16, 2018 7:44 am
Contact:

Re: Multiple materials per md3 model

Post by HAL9000 »

Here you go,Multi material weapon model with PBR
You can use this for testing purposes: Summon WeaponSSG
https://www.dropbox.com/s/d73rqwb816bq0 ... E.rar?dl=0

Code: Select all

  Path "Models/Weapons/SSG"   
  Model 0 "SSG.md3"   
  SurfaceSkin 0 3 "barrel.png"
  SurfaceSkin 0 2 "metal.png"
  SurfaceSkin 0 1 "wood.png"
  SurfaceSkin 0 0 "details.png" 
Gif from another discussion (4 Surfaces/materials on the model)
Spoiler:
Warning: Textures are 4K, scale them down if you don't have high end PC
User avatar
Cherno
Posts: 1309
Joined: Tue Dec 06, 2016 11:25 am

Re: Multiple materials per md3 model

Post by Cherno »

Your example model works, it seems like there is a problem with the exporter. 3D Studio Max md3 exporting works but will only show one surface skin, and the blender export doesn't show the model at all no matter if the skind or surfaceskin property is used.
User avatar
HAL9000
Posts: 266
Joined: Fri Mar 16, 2018 7:44 am
Contact:

Re: Multiple materials per md3 model

Post by HAL9000 »

Cherno wrote:Your example model works, it seems like there is a problem with the exporter. 3D Studio Max md3 exporting works but will only show one surface skin, and the blender export doesn't show the model at all no matter if the skind or surfaceskin property is used.
I don't use Direct Md3 exporters. They tend to have problems.
I export my models as OBJ and use Noesis to convert them to MD3. No problems at all, works like a charm.
For animated MD3 I use OBJ sequence export, convert them to MD3 with noesis and merge them with MD3 Tool. also , works like a charm.
User avatar
Cherno
Posts: 1309
Joined: Tue Dec 06, 2016 11:25 am

Re: Multiple materials per md3 model

Post by Cherno »

HAL9000 wrote:
Cherno wrote:Your example model works, it seems like there is a problem with the exporter. 3D Studio Max md3 exporting works but will only show one surface skin, and the blender export doesn't show the model at all no matter if the skind or surfaceskin property is used.
I don't use Direct Md3 exporters. They tend to have problems.
I export my models as OBJ and use Noesis to convert them to MD3. No problems at all, works like a charm.
For animated MD3 I use OBJ sequence export, convert them to MD3 with noesis and merge them with MD3 Tool. also , works like a charm.
Thank you, Noesis works like a charm. I also didn't rely on OBJ but rather use FBX to convert animations directly.
Post Reply

Return to “Assets (and other stuff)”