Calling the Filament Renderer in plugin code? [SOLVED]
Hello everyone,
I'm hoping someone has started playing with the Filament renderer from a plugin, or just know the ins and outs of the rendering classes and might spot the obvious for me...
I have a plugin which starts a render with this code:
DzRenderer* myRenderer = myRenderMgr->getActiveRenderer(); DzProgress renderProgressPopup("Rendering with " + myRenderer->getName() + " Renderer..."); bool success = myRenderer->render(myHandler, myCamera, dzApp->getRenderMgr()->getRenderOptions());
The attached picture shows my Rendering Tab, where the Engine selected is '3Delight'. When my plugin runs it correctly says myRenderer's name is 3Delight and the image my plugin outputs in a 3Delight image.
But when I select the Engine as 'Viewport' in order to get it to render with Filament, it gives the name back as 'NVidia Iray' and renders in Iray.
Is the Engine choice in this drop down not what you are selecting with 'getActiveRenderer()'? Or, if yes, is there something else I need to set in order to get Filament to be selected? Also, all my Main Window viewports have 'Filament (PBR)' selected as the user draw style.
thanks in advance for any insight/guidance/help!
Comments
Thanks to Richard Haseltine who answered over in the Daz Scripting forum where I also posted hoping to get info that can translate into plugin code. If you are reading this you can find the scripted sample for what options to select for the renderer and render options here:
http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/rendering/render_drawstyle/start
Here's the basics of my code which worked for me. My Daz Script code handles some items before calling my plugin, like setting the layout and user drawing style to 'Filament (PBR)'. If you are doing everything in plugin you may need to set the layout and user draw styles here also.