Help! The site looks different!

Wonder what's going on? We've migrated the site to a new codebase. Please read the following letter: SFMLab Migration 2020

Note: SFMLab now uses Open3DLab Network accounts. (SmutBase and Open3DLab accounts) If you do not already have a SmutBase or Open3DLab account, please sign up through this link. Once your new Open3DLab Network account has been created, please log in and take a moment to link your old SFMLab account to your newly created account.

O rida - Materials override helper script

 Large preview image for O rida - Materials override helper script

Show more
 Large preview image for O rida - Materials override helper script

 Large preview image for O rida - Materials override helper script


This script will greatly reduce the time you spend on applying override materials, especially for those of you who want to re-use the same materials override setup across multiple projects. This script will allow you to load/save override materials configurations as json-files.

If you don't know about override materials, there's a good tutorial here:

Once added to SFM, the script can be accessed from the animation set rig menu.

Basic usage:

  1. Right click on the animation set you want to apply override materals to.
  2. Select the "Add override materials" option
  3. Right click the animation set again
  4. Choose Rig->Orida
  5. Select what you want to do from the O rida dialog.

For more information on loading/saving override configurations, please refer to the "Help" option.

Included templates:

Four template files are included. These can be used to apply the same common attribute to all materials. The main idea behind these is to remove the time it takes to manually apply these attributes using the clunky GUI provided by the element viewer.

  • template_all_alpha.json: Adds the attribute $alpha as a float and sets it to 0 for all materials. This will probably render the animation set (or at least the majority of it) invisible. This can come in handy when you want to hide materials but don't know which one, since deleting attributes using the element viewer is way quicker than adding new ones. This philosophy applies to the other templates as well.

  • template_all_empty_basetexture.json: Adds the attribute $basetexture as a string and sets it to "" for all materials. This will render the animation set as untextured. override texture files can be set from the element viewer.

  • template_all_color_black.json Adds the attribute $color as a color and sets it to RGBA(0,0,0,255) for all materials. This will make the animation set all black. You can specify colors for all materials in the element viewer.

  • template_all_phong.json Adds the attributes $phongboost and $phongexponent as floats and sets them to 0 for all materials. You can add/remove/edit the values for each individual material from the element viewer.

Filename Downloads Created Filesize
🇳🇱 EU Download
🇨🇦 NA Download
59 2018-01-07 3.56 KB
🇳🇱 EU Download
🇨🇦 NA Download
112 2018-02-22 3.9 KB
🇳🇱 EU Download
🇨🇦 NA Download
46 2020-03-01 7.86 KB
🇳🇱 EU Download
🇨🇦 NA Download
45 2020-03-01 7.86 KB
🇳🇱 EU Download
🇨🇦 NA Download
39 2020-03-11 53.45 KB
Thumbnail image for O rida - Materials override helper script


\ ( ' - ' ) /
Reply • Jan. 8, 2018, 9:14 a.m. -  gwamp
Looks good on testing. Testing the save is going to be interesting to see what I can Automate the multy tasks
Reply • Jan. 8, 2018, 10:01 a.m. -  pbowde02
Annd because SFMLab comments don't seem to have formatting here's the error message in a more readable form:
Reply • Jan. 8, 2018, 8:17 p.m. -  BraveDownpour
Just so people know. When exporting, make sure you include .json at the end of your file name. The script does not automatically save the file as a json file, so if you leave out the extension, it will become a generic file. So for instance, if you save a file called "all_alpha" make sure you type it out like "all_alpha.json"
Reply • Jan. 9, 2018, 2:29 a.m. -  Legoguy9875
Any chance you could make a preset that gives every material a $phongboost and $phongexponent?
Reply • Jan. 8, 2018, 4:52 p.m. -  Aliassfm
Getting a strange error in the console when applying the script as a rig: Traceback (most recent call last): File "<string>", line 3, in <module> File "d:\steam\steamapps\common\sourcefilmmaker\game\sdktools\python\global\Scripts\", line 2, in <module> from filesystem.misc import BreakException, GoodException File "d:\steam\steamapps\common\sourcefilmmaker\game\sdktools\python\global\lib\site-packages\filesystem\", line 4, in <module> from valve import DEFAULT_AUTHOR File "d:\steam\steamapps\common\sourcefilmmaker\game\sdktools\python\global\lib\site-packages\filesystem\", line 1178, in <module> gameInfo = GameInfoFile() File "d:\steam\steamapps\common\sourcefilmmaker\game\sdktools\python\global\lib\site-packages\filesystem\", line 1025, in __init__ KeyValueFile.__init__(self, filepath, parseLine, chunkClass, readCallback, True) File "d:\steam\steamapps\common\sourcefilmmaker\game\sdktools\python\global\lib\site-packages\filesystem\", line 805, in __init__ File "d:\steam\steamapps\common\sourcefilmmaker\game\sdktools\python\global\lib\site-packages\filesystem\", line 821, in read self.parseLines( ) File "d:\steam\steamapps\common\sourcefilmmaker\game\sdktools\python\global\lib\site-packages\filesystem\", line 860, in parseLines raise TypeError( 'Malformed keyvalue found in file near line {0} in {1}. Check for misplaced quotes'.format( n+1, self.filepath ) ) TypeError: Malformed keyvalue found in file near line 50 in D:/Steam/steamapps/common/SourceFilmmaker/game/usermod/gameinfo.txt. Check for misplaced quotes That particular line of my gameinfo.txt reads as: Game !Maps\dear_esther It's quite strange that the script seems to try reading the gameinfo.txt file. Other rigs (like IK rigs) attach to models fine and without error.
Reply • Jan. 8, 2018, 8:11 p.m. -  BraveDownpour
|!!! THANK YOU!!!
Reply • Feb. 22, 2018, 11:08 p.m. -  KombatantChampion
could you post a video on how you use it ?
Reply • Feb. 23, 2018, 4:41 a.m. -  kespr
looks cool. as of now its not possible i think to overwrite the vmt file atributes, would it be possible to make a scrit that enables the texture to read another vmt file without having to re-wright the original one?
Reply • Feb. 23, 2018, 10:37 a.m. -  apekatt1234
Thnx for the feedback everyone. @Aliassfm: I've added a template like this in the new version. @BraveDownpour: The line you mention from the gameinfo.txt looks messed up. Even though it works for rigs it may cause problems for the python interpreter. My script doesn't read gameinfo.txt but SFM probably reads it to load resources or something, I'm not really sure. I was able to reproduce the error by messing up my paths as well so just make sure they're all valid and you'll not get the error. @Legoguy9875: I did not realize that since I always specify extensions manually anyways. I've fixed so the .json extension is added automatically in 1.1 @Dracekcz: Thnx man :)
Reply • Feb. 22, 2018, 7:41 p.m. -  kjkj
It's a really nice idea but I'd suggest renaming this thing to something more recognizable. Nice work tho, was waiting for something like this! :)
Reply • March 8, 2018, 10:31 a.m. -  EpicLPer
cool thing, helped me much !
Reply • March 5, 2018, 6:03 p.m. -  Uthizarr
I'm Commander Shepard, and this is my favorite tool on SFMLab.
Reply • Nov. 21, 2018, 7:18 a.m. -  Commander Shepard
This script saved me tons of time. Thank you so much!
Reply • Aug. 12, 2019, 9:44 a.m. -  DesireSFM
Downloaded the 1.1 version. When using it, it says I have the 1.0 version.
Reply • April 20, 2020, 1:49 a.m. -  cilenomon
Usually I post silly jokes, but this is honestly such a holy quality of life improvement that I'm at a loss for words
Reply • April 30, 2020, 3:16 p.m. -  lewdmon

Leave a comment

You need to log in if you want to leave a comment.