It would be easy to grab the Octane material definition from the linked file in this situation.1. If you say that 'materials stored in the linked file will be ignored' (the 2nd method), how will those (ID-less) materials be displayed?
I think that if you load a MAIN.RVT file which contains a link to LINKED.RVT, whist MAIN.RVT is open, there is no way to save changes to LINKED.RVT, so if it were possible to edit the Octane materials from LINKED.RVT whilst MAIN.RVT was open, the changes would need to be saved to MAIN.RVT. This introduces a further problem. LINKED.RVT is actually referenced as the full path name (ie. c:\myfolder\LINKED.RVT). So if you move MAIN.RVT and LINKED.RVT to another folder (say c:\myfolder2), all the Octane materials saved in MAIN.RVT for LINKED.RVT would be lost (because the filename of the linked file would be different from that saved in the MAIN.RVT file). So I am doubtful that I could make Octane materials in linked files editable.1, Ideally the materials from links should be manipulate (to apply octane material and to change) within the main.rvt.
As stated above - I think this makes a major assumption that the .RVT filename is unique (so that all LINKED.RVT files present in your file system are the same). You may have MAIN.RVT contain c:\myfolder\LINKED.RVT and c:\myfolder2\LINKED.RVT - and they are separate and different linked files with the same name.Such as "Material A" in rvt1.rvt in a shape like rvt1-Material_A, means just adding the link's name work together with the material name, so no matter what the origin name (or ID) is, they will never conflict with any other material (from the main or other link, sub link etc) I guess vray and even revit internal render engine are doing similar things, If we are looking into vray for revit's material, we can see from which link they are coming from.
Ideally a .RVT file would have a unique reference number which the plugin could use to uniquely identify materials - but it doesn't have this. Using the filename is going to cause problems, due to the folder name being part of the filename, and it will therefore change when you move the .RVT file.
Based on the above, I feel option 2 is the better option. But I understand this may not be perfect, so is it worth doing at all?
Paul