Jump to content


Photo

Wiki Update - Skins


  • Please log in to reply
11 replies to this topic

#1 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1608 posts

Posted 13 October 2018 - 09:20 AM

*
POPULAR

Hi all,

 

Skaruts requested that the Wiki entry on skins is not that easy to understad, so I tried to update it. This would be the (unformatted) updated version. I am thinking about adding a specific example later on, but for now it is not included. I would appreciate any constructive criticism before I actually replace the olde version!

 

 

The skins functionality in D3 allows a single model to have a number of textures ("skins") which can be selected from a dialog in the editor. This provides ease-of-use for mappers and (possibly) reduced memory usage as the model only needs to be loaded once.

A skin file has the following basic structure:
skin [name]
{
model    [complete path of the model]
[material path of texture to be replaced]    [complete path of replacement texture]
}

The title has the format
skin    [your_skin_name]
Your skin name has to be unique and like all definitions in TDM should not contain any hyphens (-).

In the inner part of the brackets, you first define for which model the skin can be applied. If you do not define this, the skin will not show in the model menu in DR. At this place you can define several models at once, if they share any textures you want to replace. Make sure to use the complete path of the model. The easiest way to do this (and to avoid any spelling errors) is by inserting the model into DR and copying the "path" spawnarg to your skin file.

In order to replace textures, you first need to know which textures are present in a given model. One easy way to do that is to open the model preview window in DR. On the left side, right beneath the models list, there is a list of all materials used in this model. To replace a texture, you insert the whole path of the texture you want to replace and, seperated with a space (or for better readability a tab), directly write the path of the material you want as a replacement. Each texture that does not get listed here, is not replaced. If you want any part of the model to not appear at all you can use the nodraw material ("textures/common/nodraw").

Errors:
If the model should appear completely black in game, this means that TDM cannot find your definition for the skin. Check for spelling errors! Similarly, if any part of your model appears black, the defined texture cannot be found. Keep in mind, that any custom texture you want to use has to have a material definition!


  • Judith, HMart, RPGista and 2 others like this

#2 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1727 posts

Posted 13 October 2018 - 10:14 AM

This provides ease-of-use for mappers and (possibly) reduced memory usage as the model only needs to be loaded once.

 

Convenience, yes, memory savings, not so much. LWOs are dozens, hudreds of kbytes at best, even with more complex ASEs you get like 2-3 megs per model. While textures can be anything from 1,5 mb to 16 megs each.

 

[material path of texture to be replaced]    [complete path of replacement texture]

 

I see this quite often on the forums, and I wonder why so many members still confuse textures with materials? Times when you used diffuse textures without any material definitions are long gone. Everything you see in game engines is a surface. Its behavior is dictated by materials, and those consist of textures and instructions for the engine how to use them. Material names and paths often mimic folder structure and placement of textures, but materials are not textures. In skins you replace material paths, not texture paths, as textures don't work by themselves.

 

About skins not working, some 3d modelling software, like 3dsmax, exports .ase models as .ASE. You have to rename that to lowercase and use lowercase extention in skin file as well, otherwise it won't work.


Edited by Judith, 13 October 2018 - 10:16 AM.


#3 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37450 posts

Posted 13 October 2018 - 10:28 AM

[material path of texture to be replaced]    [complete path of replacement texture]

 
Judith covered the difference between a texture and a material, but it's also not accurate to refer to it as a "material path".  A material has a name, not a path (although some names duplicate the path of the textures referenced in the material shader, that is not a requirement).
 
I would suggest:
 
[name of material definition to be replaced]  [name of replacement material definition]
 
Also, this part is confusing:
 

The title has the format

 
What do you mean by title?


You may also want to make it clear that the file type (.lwo or .ase) must be specified in the model line. (actually, now that I say that, I'm not 100% sure that's still true...it used to be, but we added something a while back so that the engine looks for the other format if it can't find the first one...don't know if that works for skins or not).

 

It might also be worth mentioning that you can replace more than one material in a skin.  And the model line is not actually necessary for the skin to work, it's just necessary for it to show up in the model selection window in DR.


  • Judith likes this
TDM Missions:   A Score to Settle   *   A Reputation to Uphold   *   A New Job   *    A Matter of Hours
 
Video Series:   Springheel's Modules   *   Speedbuild Challenge   *   New Mappers Workshop  *   Building Traps

#4 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1608 posts

Posted 13 October 2018 - 11:37 AM

Thanks for the quick reply! You are both correct regarding the material vs texture. I will be careful not to mix them up in the future and correct it in the entry.

 

Convenience, yes, memory savings, not so much. LWOs are dozens, hudreds of kbytes at best, even with more complex ASEs you get like 2-3 megs per model. While textures can be anything from 1,5 mb to 16 megs each.

The first sentence was taken from the current entry. I myself don't know much about this topic. I will leave it out, if you say that it is not correct.

Regarding the upper and lower case, I will add it to the sentence of not using hyphens. I did not know that this actually matters.

 

 What do you mean by title?

With title I meant the first line outside the bracketts. Maybe I should call it "header"? If it is more confusing than helpful, I will just leave it out.

 

 You may also want to make it clear that the file type (.lwo or .ase) must be specified in the model line. (actually, now that I say that, I'm not 100% sure that's still true...it used to be, but we added something a while back so that the engine looks for the other format if it can't find the first one...don't know if that works for skins or not).

I have just tested this and you are right, the file extension needs to be included. If the method of copy/pasting from the model path is followed, the extension will automatically be there, but I will make sure to add this as a note.

 

 It might also be worth mentioning that you can replace more than one material in a skin.  And the model line is not actually necessary for the skin to work, it's just necessary for it to show up in the model selection window in DR.

I thought I made both of these points clear. I had added an example that was more confusing than helping, which I deleted for this reason. It might be that I had this information in there somewhere. I will check again and add the information / make it clearer.


  • Judith likes this

#5 Skaruts

Skaruts

    Member

  • Member
  • PipPip
  • 279 posts

Posted 13 October 2018 - 11:55 AM

Thanks for doing this. The wiki needs a little bit of work in some places.

 

The easiest way to do this (and to avoid any spelling errors) is by inserting the model into DR and copying the "path" spawnarg to your skin file.

I suppose you mean the "model" spawnarg?

 

EDIT: or the "Model Name" in the Choose Model window? (That's an even quicker way, I guess.)


Edited by Skaruts, 13 October 2018 - 12:12 PM.


#6 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1608 posts

Posted 13 October 2018 - 01:01 PM

Good catch. I meant the model spawnarg. As far as I know, it is not possible to directly copy the "Model Name" in the Shoose Model window.



#7 Skaruts

Skaruts

    Member

  • Member
  • PipPip
  • 279 posts

Posted 13 October 2018 - 01:53 PM

Ah indeed, you can't copy it from there. I just assumed you could...



#8 stumpy

stumpy

    Advanced Member

  • Member
  • PipPipPip
  • 1870 posts

Posted 13 October 2018 - 03:30 PM

if you want them grouped in the skin directory then its

 

skin skins/<skin name>

 

eg

skin skins/ghostie_wench_head
{
      model models/md5/chars/townsfolk/wench/tdm_ai_wench_head.md5mesh

      tail textures/darkmod/ghosties/barmaid_ghostie
      tdm_pageboy_light textures/darkmod/ghosties/barmaid_ghostie
      models/md5/chars/townsfolk/wench/wench_skin textures/darkmod/ghosties/barmaid_ghostie
      textures/common/shadow textures/common/nodraw
      tdm_ponytail textures/darkmod/ghosties/barmaid_ghostie
      tdm_teeth textures/common/nodraw
      tdm_character_tongue textures/common/nodraw
}


Edited by stumpy, 13 October 2018 - 03:38 PM.


#9 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1608 posts

Posted 14 October 2018 - 02:42 AM

I am not sure, what you mean. Do you need to use "skin skin/[name]" for the skin to show up in the "All Skins" folder in the Skin Selection window?



#10 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1608 posts

Posted 28 October 2018 - 04:05 AM

Finally, I got to updating the Wiki page. Please check, if anything is missing / wrong / could be written better.



#11 VanishedOne

VanishedOne

    Advanced Member

  • Member
  • PipPipPip
  • 868 posts

Posted 28 October 2018 - 04:19 PM

The section on wildcard skins seems to be gone entirely.


Some things I'm repeatedly thinking about...

- louder scream when you're dying


#12 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1608 posts

Posted 28 October 2018 - 05:53 PM

You are right. I have re-added it.


  • VanishedOne likes this




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users