Multiple materials per md3 model

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!
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.

Multiple materials per md3 model

Postby Cherno » Sat Sep 08, 2018 3:41 am

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 allExpand view
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
Cherno
 
Joined: 06 Dec 2016

Re: Multiple materials per md3 model

Postby HAL9000 » Sat Sep 08, 2018 6:55 am

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 allExpand view
  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
HAL9000
I'm sorry Dave, I'm afraid I can't do that
 
Joined: 16 Mar 2018
Discord: HAL9000#9378

Re: Multiple materials per md3 model

Postby Cherno » Sat Sep 08, 2018 9:19 am

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
Cherno
 
Joined: 06 Dec 2016

Re: Multiple materials per md3 model

Postby HAL9000 » Sun Sep 09, 2018 3:55 am

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
HAL9000
I'm sorry Dave, I'm afraid I can't do that
 
Joined: 16 Mar 2018
Discord: HAL9000#9378

Re: Multiple materials per md3 model

Postby Cherno » Sun Sep 09, 2018 1:18 pm

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.
User avatar
Cherno
 
Joined: 06 Dec 2016


Return to Assets (and other stuff)

Who is online

Users browsing this forum: No registered users and 1 guest