we’d like to develop a special material for our project ( maya+vray ). After reading the SDK, we decided to use the material plugin. The question is we got nothing in final image, here is how we did the work:
1. Compile a maya material plugin like the Blinn project in samples.
2. Compile a vray material plugin (material, not BRDF)
3. Add description in desc.txt
4. Set all environnement variables for desc.txt and plugin PATH.
we still got nothing, the we said maybe the maya scene has not been properly translated to vray. We exported a material.vrscene to see if our plugin maya is translated as we hoped, in fact, NO! we got :
in fact, we just need to write a single “Shader”( like a shader in renderman, or a fragement shader in GLSL) in vray, and we thought that the Class Material may be a good option to do that, what do you think about that? any advice please?
Before, we tried compiling vray plugin in XCode4, apparently the .so has not been loaded, cuz we got an error message from the maya terminal. However when we compiled with .mak, no error messages, so we assumed that the vray plugin is loaded.
May be the plugins is not properly coded?
we copy the vray_mtldiffuse.cpp in samples and instead of doing
SIMPLE_PLUGIN_LIBRARY(MtlDiffuse_PluginID, EXT_MATERIAL, "MtlDiffuse", "Diffuse Material plugin for VRay", MtlDiffuse, MtlDiffuseParams);
we did
PLUGIN_DESC(VRayMyDiffuse_PluginID, EXT_MATERIAL, "VRayMyDiffuse", VRayMyDiffuse, VRayMyDiffuseParams);
PLUGIN_LIBRARY("VRayMyDiffuse", "My Diffuse Material plugin for VRay");
the rest of codes is kept exactly the same as vray_mtldiffuse.cpp.
Could that be sufficient to define a Vray-plugin? Is there something missing?
Did you change the VRayMyDiffuse_PluginID number? Also, on Mac OS X you can check if a particular .so file is loaded with the following command (but I’m sure you know this):lsof -p [i]maya_pid[/i] | grep [i]so_file_name[/i]where maya_pid is the Maya process identifier, which you can get with the command ps ax and so_file_name is the name of the .so file for your plugin.
yes, we did change the plugin’s ID, and “lsof” told us the .so is loaded… it doesnt work. We’d like to know if there is a way to check if the desc.txt worked?
Here is what we added in Content/vray/shaders/desc.txt
OH MY GODDDD! That’s it…LOOOL MAYA still crashed after that(that’s our problem), but the maya scene is correctly translated !!! thank you VERY MUCH!!! probably we will come back to you for other questions in material plugin’s development, but you just opened a door for us… thank you again.