Multiple materials and skin system

Discussion in 'Content Creation' started by SergentFido, Dec 28, 2015.

  1. SergentFido

    SergentFido
    Expand Collapse

    Joined:
    May 30, 2015
    Messages:
    1,606
    Hi everyone !

    I'm making this topic because i'm about to release a mod in the next few days or weeks, depending on how fast i'll be able to finish it, but i currently have issues with the skin system.
    Also i think that the possible solutions to the problem could interest people that are making mods.

    By mods i mean a new fully modelled and textured car, not a skin of existing content.

    As i don't want to spoil my content by just asking help on a issue, i've reproduced my problem by making a copy, fully renamed, of the Moonhawk.
    If you help me, especially the devs who might have the answer i guess, to get a proper solution, i will post some screenshots very soon of my upcoming mod, as i will be able to finish my different skins and show them.

    So, Ladies and gentlemen, i'm now proud to present you the Bretzel Toonmawk ! Happy Christmas !

    The first image is the expected result, by forcing the OverlayMap to the main textures.

    And the second image is what i actually get when using the skin system.


    Why doesn't it work ? Because i'm using several material with painted parts. This car reproduces my issues, so i'm assuming that my upcoming car has a properly working overlayMap, i can display it by adding the overlaymap as well on each materials.
    I used different colors for the different materials, one for the body, one for the hood and the trunk, and one for the doors, to help you figure out the problem.
    The two others material are just copies of the main moonhawk material.

    Why am i using several materials with painted parts ?
    Because the skin system didn't exist when i started my mod and it would be a pain in the ass to remap all my car in one bigger texture.
    My car has pretty high resolution textures, so i did it that way but would do of course differently now.

    So here you can find a zip containing this awesome Bretzel Toonmawk, if you'd like to test it and help me displaying all the textures.

    The main materials are done like this in the material.cs :

    toonmawk
    toonmawk_nosecone_alt
    toonmawk_hoodandtrunk
    toonmawk_thedoors

    And those are what i would like to see work with the one and only skin called "Bretzel" :

    toonmawk.skin.bretzel (working)
    toonmawk_nosecone_alt.skin.bretzel (working)
    toonmawk_hoodandtrunk.skin.bretzel (not working)
    toonmawk_thedoors.skin.bretzel (not working)

    So basically, my question is :

    The nosecone_alt is a different material and works with the skin system, why don't the two others work as well in the global skin "Bretzel" ?

    My car has only one material working with the skin system, the two others don't, so it's not because of a two material limitations, it seems to be something else.

    Many thanks for reading me, i hope to get some help and light in this issue, because i just can't wait to finish my skins, my car, and release it in a few days !


    Feel free to install this exemple in your mod system, it won't break the moonhawk because all parts and files have been renamed, but only with an helping purpose, this is not a mod and this is a useless car except to try to make several material work.
     

    Attached Files:

    • toonmawk_working_forced.jpg
    • toonmawk_notworking.jpg
    #1 SergentFido, Dec 28, 2015
    Last edited: Dec 29, 2015
    • Like Like x 1
  2. SergentFido

    SergentFido
    Expand Collapse

    Joined:
    May 30, 2015
    Messages:
    1,606
    Problem fixed, thanks a thousand times Gabester !

    The renamed material name have to be written between quotes and have to look like this :

    original material:

    singleton Material(toonmawk)
    {
    mapTo = "toonmawk";


    renamed material :

    singleton Material("toonmawk.skin.bretzel")
    {
    mapTo = "toonmawk.skin.bretzel";



    So basically my mistake was to copy the original material and just had .skin.bretzel and the overlayMap[2] code line, and forgetting the quotes that are necessary for the system to work.

    I spend hours on it looking at what i've done wrong. I think that the introduction to skin system could add the necessity to have those quote to avoid people searching such an issue.


    So here i give you the working material.cs of the toonmawk above, only the painted parts concerned lines, so that you could inspire from it to do your own multiple material skin car.
    It could be usefull for those who made for exemple a sedan car, then would like to had a station wagon and would need to add a new material to integrate the new rear end.


    I have deleted the zip file in the first post because this sample car don't work anymore since the new update 5.0.0.1 and i don't have many time to find the issue nor to rename the new Moonhawk again.
     

    Attached Files:

    #2 SergentFido, Dec 31, 2015
    Last edited: Dec 31, 2015
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice