1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.36 Bug Reporting thread
    Solutions and more information may already be available.

looking for someone who can create material.cs files

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by schumacher, Oct 28, 2015.

  1. schumacher

    schumacher
    Expand Collapse

    Joined:
    Sep 1, 2013
    Messages:
    1,054
    hi, I have some objects with a object (.dae) and some textures, but that the textures are working in bng, I will need material.cs files, if anyone can do this for me, I will credit you in my map. If you can also put collision on it , it also would be great ;)

    Here are the files:

    http://www.mediafire.com/download/vqum18y38knc9ug/barriere.zip
     

    Attached Files:

  2. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,697
    Material.cs files are easy to make.
    Just open one of them from any of the official objects and copy paste a section into your very own material.cs file and adjust it to match your object's textures.

    Collision are done simply from the editor. You have to select 'Visible Mesh' if you haven't modelled a lower-poly collision mesh (Or select 'Collision Mesh' if you have).
     
    • Like Like x 2
  3. schumacher

    schumacher
    Expand Collapse

    Joined:
    Sep 1, 2013
    Messages:
    1,054
    Ok;) thank you , I will try it
     
  4. schumacher

    schumacher
    Expand Collapse

    Joined:
    Sep 1, 2013
    Messages:
    1,054
    singleton Material(barriere)
    {
    mapTo = "barriere";
    diffuseColor[0] = "0.996078 0.996078 0.996078 1";
    specular[0] = "0.5 0.5 0.5 1";
    specularPower[0] = "50";
    translucentBlendOp = "None";
    diffuseMap[0] = "levels/GhostTown/art/shapes/barriere/textureforbarriere.png";
    };


    IS that right ? In my barriere folder is the barriere.dae, the material.cs file which you can see there, and a texture calles textureforbarriere and it is a .png ??
     
  5. schumacher

    schumacher
    Expand Collapse

    Joined:
    Sep 1, 2013
    Messages:
    1,054
    ok, so I first try if it works, if it doesnt, I will watch some tutorials about "object materials" because Im a big noob with things like Blender :/
     
  6. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,697
    Depends.
    I will take it for granted you have a minimum of knowledge of 3D Modelling/Materials stuff.

    Code:
    singleton Material(barriere)
    {
    mapTo = "barriere";
    diffuseColor[0] = "0.996078 0.996078 0.996078 1";
    specular[0] = "0.5 0.5 0.5 1";
    specularPower[0] = "50";
    translucentBlendOp = "None";
    diffuseMap[0] = "levels/GhostTown/art/shapes/barriere/textureforbarriere.png";
    };
    The part is red need to match the object's material name. I don't know if that's correct since I can't check your model. But you can check that yourself.

    The rest is very simple. There are plenty of options you are not using in your material, so it may happear differently from what you wanted.
    A good way to mess with materials is to have the really basic material working (Like the code you posted), and then edit it further using the 'material editor' in which you can find all the options and fine tune values. Just remember that whenever you save a material with the 'material editor', the material.cs file will be saved in 'Documents/BeamNG.Drive/levels/yourmapname/etcetc'.
    In your case it would be saved in 'Documents/BeamNG.Drive/levels/GhostTown/art/shapes/barriere/


    EDIT - If you don't have any minimum idea on how materials work generally, you should document yourself. You can try to run without knowing how to walk, etc.
     
  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