Using the Material Editor

Discussion in 'Track Modding' started by OoperDuper, Nov 3, 2021.

  1. OoperDuper

    OoperDuper Registered

    Joined:
    Sep 25, 2021
    Messages:
    11
    Likes Received:
    1
    I am fairly new to rFactor 2 modding and I am having trouble trying to use the material editor when texturing my road. I am attempting to use the IBLRoad shader but when ever I try to apply a file to one of the textures at the bottom of the material editor, it seems to have no effect. When I do select a file, the preview image does not pop up as if there is some error happening. The only texture that has really worked in this shader is albedo but others seem to have no visible effect. Any help for understanding the material editor or understanding texturing in general would be greatly appreciated.
     
  2. Jka

    Jka Member Staff Member

    Joined:
    Jan 31, 2011
    Messages:
    954
    Likes Received:
    213
    Road shader uses several mapping channels (A to D in mat editor, 1 to 4 in 3ds max) for different type of textures, like albedo, overlay, groove, marbles etc. (please refer the documentation for more details). Road mesh must contain mapping coords in corresponding channels for all these. You also have to setup basic road material in max mat editor and apply this material to the road mesh. After that you can export the road mesh to the game using 3ds max GMT exporter.

    When that is done, then you can load the track in scene viewer, launch material editor and start configuring and adjusting the road shader.

    If you are trying to edit in (game) material road mesh, which contains mapping coords only in single channel, then editing alternative textures or settings does not have any effect in game.
     
  3. OoperDuper

    OoperDuper Registered

    Joined:
    Sep 25, 2021
    Messages:
    11
    Likes Received:
    1
    I guess I should also note I have been creating all my GMT assets in Blender and using the GMT exporter created by @Traveller (https://forum.studio-397.com/index.php?threads/rfactor2-export-scripts-for-blender-2-80.68007/).

    My work flow has been to export a specially formatted object to a GMT for rF2 (which looks like it is setup to have a material with the L2DIFFUSET0 shader). Then, my plan was to use the material editor to create a new material json which uses a new shader and textures.

    It sounds like maybe the issue is with the blender exporter only being able to map coords for a single channel or maybe to issue is with the way I am creating a material in blender.
     
  4. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    935
    Likes Received:
    6,342
    Make sure you have added following line at beginning of SCN file (without it, assigning texture in material editor has no effect, and could not save changes):
    MaterialPath=Yourtrack\ASSETS\Materials

    Also make sure your texture is located inside the texture folder you have defined in SCN file, otherwise it would not work either.

    Then you can assign & edit, then save material setting(inside the folder you have defined above).

    For UV channel, if there is no specific UV map(all textures use same area & position), you just need to select channel A for all textures.

    You can also try export with FBX format in blender, which preserves all specific UV channels you made in blender, and use gJED or 3dsimed to do FBX > gmt exporting.
     

Share This Page