IBL/PBR Car Shader Assistance

Discussion in 'Car Modding' started by Chris Lesperance, Sep 5, 2019.

  1. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,839
    Likes Received:
    2,327
    Everything that is related to a team should be packed in the team mas file. So veh file, jsons, skins, regions, AO.
     
  2. Brent

    Brent Registered

    Joined:
    Nov 5, 2015
    Messages:
    238
    Likes Received:
    113
  3. Brent

    Brent Registered

    Joined:
    Nov 5, 2015
    Messages:
    238
    Likes Received:
    113
    I'm trying to apply the shader to another mod and I'm running into an issue, maybe.

    In devmode with the material editor webpage up, I select the Mapper pull down and nothing shows up in the pull down. I should be able to select REFMAP0 here. I did before, now I'm not getting that. I'm not sure if I need to do the 3DSMax steps in the dev guide. I'd need help on what steps I need to do that, it's vague. The crazy thing is I can apply the region texturing with the car paint editor in the showroom.
     
    Last edited: Sep 23, 2019
  4. DaREALMastaD

    DaREALMastaD Registered

    Joined:
    Sep 27, 2015
    Messages:
    90
    Likes Received:
    34
    @Brent, the drop down in the material editor has the display (Label) value as blank but the value is referencing the REFMAP0. I don't think this was intentional but if you look at the html code, it does actually reference the REFMAP0 value. So even though it doesn't look like the REFMAP0 is being referenced in the material editor, the blank label has the value for REFMAP0.
     
  5. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,839
    Likes Received:
    2,327
    If you're in the spinner, they won't show, you'll need to be on track.
     
  6. Brent

    Brent Registered

    Joined:
    Nov 5, 2015
    Messages:
    238
    Likes Received:
    113
    @DaREALMastaD / @Coutie you know what, I was in the spinner. If the spinner doesn't use REFMAP0 then that explains why it would be blank.

    I'm still getting this error when I click on the Save To / ModDev button:

    Error, Couldn't save material because:
    MaterialPath was not set in the scn file, please set this value before saving materials

    Is this another case where I need to be on track? So far I've been updating .json files with a text editor. It's been working but it's been a workaround.
     
  7. Tommy78

    Tommy78 Registered

    Joined:
    Apr 3, 2012
    Messages:
    630
    Likes Received:
    725
    Just start a practice session without AI, and you can see real time on track. You can pause the game while changing the values of the materials.
     
  8. McFlex

    McFlex Registered

    Joined:
    Feb 23, 2012
    Messages:
    1,033
    Likes Received:
    325
    I have the same issue and i don't know how to solve it. I used the ISI/S397 Clio as a test and couldn't get it to work.
     
  9. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,839
    Likes Received:
    2,327
    Same, I was trying to help someone this past week, and I was getting this issue. I don't remember how I did it with the indycar, but I had no issues at all.
     
  10. Chris Lesperance

    Chris Lesperance Registered

    Joined:
    Nov 29, 2012
    Messages:
    1,323
    Likes Received:
    2,133
    Post #10 on here :) I can't remember specifically what I did, I'm away from my modding PC, and I only worked on that one car.
    https://forum.studio-397.com/index.php?threads/ibl-pbr-car-shader-assistance.64024/#post-998971
     
  11. McFlex

    McFlex Registered

    Joined:
    Feb 23, 2012
    Messages:
    1,033
    Likes Received:
    325
    @Chris Lesperance I tried exactly that and 100 other things but still got the same error
     
  12. Arnaud Plume

    Arnaud Plume Registered

    Joined:
    Jul 5, 2019
    Messages:
    178
    Likes Received:
    1,100
    Same problem for me. What are we doing wrong?

    "Error, Couldn't save material because:
    MaterialPath was not set in the scn file, please set this value before saving materials"
     
  13. Tommy78

    Tommy78 Registered

    Joined:
    Apr 3, 2012
    Messages:
    630
    Likes Received:
    725
    Try to write in both gen file, the MaterialPath=here write your teams folder location, so your name of the car folder /teams, like
    MaterialPath=Corvette/teams
     
  14. Arnaud Plume

    Arnaud Plume Registered

    Joined:
    Jul 5, 2019
    Messages:
    178
    Likes Received:
    1,100
    It's not coming from there... I think I'll follow the notepad way.
     
  15. Feralarri

    Feralarri Registered

    Joined:
    Sep 21, 2014
    Messages:
    116
    Likes Received:
    40
    Hoping someone can help me here. We are trying with our mod to use the new shader. I can create the json file and go into game and select WCCARBODY_000 and edit materials and save to MODDEV. This all works fine but when I go to Tuning screen and load the car and use the car paint editor to set shaders to regions it works on screen while I am in the tuning screen but it will not save to the json file. Am I doing something wrong here? What am I missing. Thanks in advance
     
  16. Chris Lesperance

    Chris Lesperance Registered

    Joined:
    Nov 29, 2012
    Messages:
    1,323
    Likes Received:
    2,133
    I remember I did come across that. It has been awhile since I've done it. I'm not sure if this was my fix, but I remember at least trying this at one point. Try packaging up the mod, and and install it in the main game. Then use that to create the .json. Then take those files from the userdata/settings and copy that into your mod dev install.
     
  17. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,839
    Likes Received:
    2,327
    What I do is finish doing the settings, then open up the web material editor, open carbody material, then just press save, all while in the tuning screen. It should save, sometimes it doesn't, but it's easy to do it over if it doesn't.
     
  18. Feralarri

    Feralarri Registered

    Joined:
    Sep 21, 2014
    Messages:
    116
    Likes Received:
    40
    Thanks guys I will try these methods
     
  19. FlashQld

    FlashQld Registered

    Joined:
    Feb 21, 2012
    Messages:
    221
    Likes Received:
    214
    Yes that's the way we are doing it and it seems to work well. Our cars are individual folders as per their team names - I have put the material path in the gen file for each folder, so in the case of one model of vehicle there are 10 material paths. Seems to work well. The whole process is a bit tedious when you have a lot of vehicles to set up though - oh well..
     
  20. Chris Lesperance

    Chris Lesperance Registered

    Joined:
    Nov 29, 2012
    Messages:
    1,323
    Likes Received:
    2,133
    So a while ago, I typed out a short procedure outline of the way that I was applying new shaders. I provided it to someone making a very popular mod on the forum and he was able to get it through it and apply it to the mod. So I'm hoping that this might help others. There might be an easier way, but this is what works for me.

    So here's how I go about it.
    - Get car working in Mod Dev
    - Change the WCCARBODY to T1 shader. I'm not sure if the alpha/secondary textures affects the material system
    - I copy a basemat.json from an existing car that uses it. Using one fromTatuus worked for me.
    - Insert 'MaterialOverride="[basemate.json]"' JSON reference in car .VEH
    - Insert "MaterialPath=<yourmod>\maps" into the search paths in the .GEN files
    - Open Mod Dev - navigate to car showroom. Load site
    http://localhost:5397/materialeditor/index.html#/
    - Apply the new textures:
    - albedoSpec - WCCARBODY (Generic)
    - damage
    - Region - 32x32black.dds (Generic -Region)
    - aoSpecMask
    - Damage Bump
    - MetallicFlakes - MetallicNoise.dds
    - Once complete, click "Download" to download .json - I've had mixed results with the Apply
    - Copy that .json back ingame, and change the basemat name if desired
    - Create veh_ripple_map.png veh_ripple_map_video.png - https://docs.studio-397.com/develop...reenShadersforCars-1.2-CreatingtheBodyRainMap
    - Create Car _region.dds
    - Package car up and load to main game
    - Create new standalone car, using the same process for creating addon skins.
    - Once you set the materials and save the car, I copy that skin .json as the base for all the skins in the team.mas.

    From there, repackage everything and you should be all set. I hope that helps. Let me know if this works for you

    EDIT: Added line "Insert "MaterialPath=<yourmod>\maps" into the search paths in the .GEN files"
     
    Last edited: Mar 12, 2020
    Ft5fTL, Timallen, MaD_King and 3 others like this.

Share This Page