Hi,
I was wondering if someone could offer any suggestions to a problem I am encountering.
We currently have a very simple plug-in that derives from Mtl. I'm currently attempting to update it so it utilizes the IHLSLMaterialTranslator in order to run some of our own generated .fx files.
The plug-in loads and I can assign the material to an object but it isn't calling the UpdateHLSLMaterial or GetHLSLMaterialHandle functions. My GetInterface function only returns the IHLSLMaterialTranslator interface if it asks for IHLSL_MATERIAL_TRANSLATOR_INTERFACE_ID, otherwise I return Mtl::GetInterface.
This is a material I'm attempting to use in the Nitrous Viewport. I'm assuming this is possible? I'm not quite sure what information to provide to give enough of an overview of my current situation.
Any help would be greatly appreciated.
Thanks,
Nick
I've got one working, in 3ds 2015 SP2.
Try this in your material constructor:
SetMtlFlag( MTL_HW_MAT_ENABLED | MTL_HW_TEX_ENABLED | MTL_DISPLAY_ENABLE_FLAGS );
I'm having a similar issue. Has anyone had any luck with implementing a IHLSLMaterialTranslator based material plugin in Max 2016?
In 2016 (sp1) my material plugin just renders black, and it doesn't seem like the "GetInterface" ever asks for an IHLSLMaterialTranslator. I tried compiling for and running in 2015 (sp2), and it seems to work fine. It's worth noting that the "HLSLMaterial" plugin in the how-to also just renders black in viewport.
I noticed in the what's new page that they mention "MetaSL is no longer supported in 3ds Max 2016. This affects IShaderManager and IHLSLMaterialTranslator. To customize the viewport display in realistic mode, use HLSL directly." Any idea what "use HLSL directly" is referring to?
Can't find what you're looking for? Ask the community or share your knowledge.