Jump to content

Bones prevent multiple material application


Arinthian
 Share

Recommended Posts

In trying to import my model into leadwerks 3.1 steam edition (beta branch), I've noticed the

presence of bones no longer allows me to apply different materials to different sections of my model

in the model editor, but rather applies a single material to the entire model. removing said bones allows

me to once again apply multiple materials.

 

all you should need to do to reproduce this is to import the provided fbx (scattership_anim_fire.fbx) file and try to apply multiple materials to it. I've also provided scattership_nobones.fbx for comparison (has no bones), as well as the blender file.

 

also, exporting from UU3D as a gmf file avoids this issue (thanks to shadmar's help)

 

Models.zip

  • Upvote 1
Link to comment
Share on other sites

Thanks bolt, as soon as I added textures to the model in blender, (UV coords were already there, added image references), it started working. I generally like to just add plain colour materials to my models, so I never bothered with textures.

 

and your right YouGroove, generally they do, it's usually due to using a single texture image with different UV coords on the model for different sections, but I didn't want to fuss about creating a custom texture for a couple of different colours.

 

So I guess in the end I guess it's only a bug if it's not supposed to drop materials without a texture reference.

Link to comment
Share on other sites

How do you mean MDL models only support textured materials? I've been using non-textured MDL files just fine with the default shader in Leadwerks, Of course, other shaders only work with textures, and I've had to modify some (such as the animated shader) for my needs.

 

Or have I misconstrued your meaning?

Link to comment
Share on other sites

The model file finds materials by texture name. If there's no texture name, there's no material to look for. So this is making a case for generating new material files to be generated from the data inside the FBX file, which would be new development and require some planning to make sure it does everything we want.

 

You can create a material in Leadwerks, drag it onto the model in the build-in model editor, and then resave it to save the model with the material applied, FYI.

  • Upvote 2

 

 

Link to comment
Share on other sites

this is making a case for generating new material files to be generated from the data inside the FBX file

Yes!! This would also significantly shorten the model import pipeline if materials could be generated and applied immediately, automatically. No more finding the textures and copying them over yourself. No more converting each one to a material. No more opening the model viewer for each model and dragging the materials to the right places on the model. It would be VERY VALUABLE to drag a model into the editor and have it immediately look exactly the same as it did in the 3D modeling program (to a reasonable extent).

Link to comment
Share on other sites

Bolt - I'm creating new materials and just setting the diffuse colour on them and applying in leadwerks, your right in that they don't come with the MDL file. I don't need to set any custom shaders for that.

 

The model file finds materials by texture name.
that explains why it didn't work until I set different textures on the model that I wanted, I wasn't trying to make a case for it to do so without, I just had no idea it worked that way. Although curiously it works without textures if no bones are present, which is why I thought it was broken when it acted differently.

 

Anyway, thank you all for the help. I apologise if I wasted anyone's time with this report.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...