Jump to content

Models with different materials


jamesmintram
 Share

Recommended Posts

In a current project I am working on I have 1 model file which has a set of materials for each team.

 

In the editor, I can assign materials to a model and save the mdl. There does not appear to be a way to create a shallow copy of the model with different materials applied.

 

This means I have to create a template model, then in code I can fix up the materials manually. This doesn't scale very well as I have to write a load more code for each new set of materials I would like to apply.

 

Is there some way to create a shallow copy in the editor which would identical to the original, except I could assign different materials in the model viewer?

Link to comment
Share on other sites

No, but several people have written shaders that swap skins based on entity color (basically they just act as UV offsets and select part of a big texture). You can also load a unique copy of a model in your program with the optional load flags. See the Asset class for more info.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...