It is now possible to load any OSL shader to 3Delight for Cinema4D plugin, but with a little work from the user side. Currently, the plugin will be looking on $Delight/osl and $Delight/cinema4d/osl folders, so you can load any osl shader found on these two directories.

Notice

Having the same shader name on both folders will only load the one found on $Delight/cinema4d/osl folder.

What needs to be done from users who wants to load a specific OSL shader, is to provide an additional file "shadername.res" with some content inside it. This shall be placed on $Delight/cinema4d/3Delight Shaders/res/description folder, or if you are building the plugin yourself, you should find the same folder but on the plugin's directory that you are building.

E.g if you are building a material (Principled) and the corresponding osl shader is named dlPrincipled.oso, the res file should be named according to osl file -> dlPrincipled.res and have the following content.

dlPrincipled.res
CONTAINER dlPrincipled
{
    INCLUDE Mpreview;
    INCLUDE Mbase;
    GROUP Obaselist
    {
        BOOL MATERIAL_PAGE_PROPERTIES { HIDDEN; PAGE; PARENTMSG ID_MATERIALPROPERTIES; }
    }
    INCLUDE Massign;
}

The same would be for other materials except that file's name and the container's name inside should be changed according to the corresponding material. Currently, all 3Delight osl materials have been added.

As for shaders, it would be almost the same except for some simplifications on the file's content. E.g. if we want to load Texture shader whose corresponding osl shader is named dlTexture.oso, we would only need a resource file named dlTexture.res with the following content.

dlTexture.res
CONTAINER dlTexture
{
}

This way you can load any shader you have on $Delight/osl or $Delight/cinema4d/osl which is not added.





  • No labels