Announcement

Collapse
No announcement yet.

Distributed rendering of GeomStaticMesh

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Distributed rendering of GeomStaticMesh

    Hi,
    Based on your provided geomMeshLoader sample , I am using a Maya MPxNode that is calling a geomMeshLoader in which there is a GeomStaticMesh-called plugin. However I can't get it to be distributed rendered:
    HTML Code:
    static struct GeomDesc: VR::VRayPluginDesc
    {
        GeomDesc(void):VR::VRayPluginDesc(&geommeshloader_params) {}
        PluginID getPluginID(void) { return PluginID(LARGE_CONST(0x2010090301)); }
        Plugin *newPlugin(PluginHost *host) { return new GeomMeshLoader(this); }
        void deletePlugin(Plugin *obj) { delete (GeomMeshLoader*) obj; }
        bool supportsInterface(InterfaceID id) { return (id==EXT_STATIC_GEOM_SOURCE) || (id==EXT_VRAY_PLUGIN); }
        tchar *getName(void) { return "geomMeshLoader"; }
        const tchar *getCopyright(void) { return "Copyright (C) 2015, Chaos Software Ltd"; }
    } geomDesc;
    
    void myMpxNode::createVRayPlugin(VR::VRayGeomInfo *geomInfo)
    {
        if (!geomInfo) return;
        
        plugman=geomInfo->getPluginManager();
        if (!plugman) return;
        
        bool existing=false;
        
        // Check to see if our class is already registered in the plugin manager
        // and register it if necessary
        PluginDesc *geomPluginDesc=plugman->getPluginDesc("geomMeshLoader");
        if (!geomPluginDesc)
        {
            plugman->registerPlugin(&geomDesc);
            pluginRegistered=true;
        }
        GeomMeshLoader *geom=static_cast<GeomMeshLoader*>(geomInfo->newPlugin("geomMeshLoader", existing));
        geom->parentEmitterNode=this;
        
        if (!existing)
        {
            // The plugin did not exist before - we can do additional set up here, if necessary
        }
    }
    However, when I perform a distributed rendering, the slave indicates that "geomMeshLoader" cannot be found (indeed I don't have a specific .so file for that).
    As my geomMeshLoader is only about loading geometry in GeomStaticMesh and doing some memory/factory cleanup, what should I do to get my geometry being distributed ?
    1. Compile my own .so ?
    2. Call GeomStaticMesh plugin directly from my MPxNode ?
    3. Other ?

    Thanks.

  • #2
    Yes, in that case you will need to compile a separate .so file with the V-Ray plugin rather than registering it dynamically.

    Best regards,
    Vlado
    I only act like I know everything, Rogers.

    Comment


    • #3
      Thanks. So I can't directly create a GeomStaticMesh plugin from my MPxNode and feed it with geometry parameters, right ?

      Comment


      • #4
        You can create GeomStaticMesh plugins, but not a GeomMeshLoader since the other machine doesn't know what this is.
        V-Ray/PhoenixFD for Maya developer

        Comment


        • #5
          Thanks, and for my understanding on Distributed rendering: The master machine will generate the plugin parameters and send the parameters to the slave renderers for rendering ?
          In such a case how can I know in the MPxNode when to update the plugin parameters ?

          With a custom Plugin (like geomMeshLoader), I know it because of the frameBegin function, but if I directly create a GeomStaticMesh plugin from the MpxNode, how can I intercept/override the frameBegin function ?

          Comment

          Working...
          X