Scripted Filament Renderering? [SOLVED]

bigD3dbigD3d Posts: 75

Hello all,

I posted the message below to the SDK forum yesterday, but not as many people appear to post and read there. This morning I thought maybe somebody may have a solution using Daz Script and I could replicate that in my plugin code:

https://www.daz3d.com/forums/discussion/466336/calling-the-filament-renderer-in-plugin-code#latest

I understand when in the app to set the viewport draw style to 'Filament (PBR)' and then in the Render Tab to select 'Viewport' and then I can render the active viewport correctly. 

But, in my posted code (see the link above) I am assuming the render manager's getActiveRenderer() method cooresponds to the 'Engine' selection on the Render Tab. If that is not correct, or if you know what options and render choices via script to kick off a Filament render I can port it over to my plugin code.

thanks in advance!

Post edited by bigD3d on

Comments

  • I'm going to quote the official word rather than risk confusing the issue with a paraphrase:

    Filament is implemented as a DrawStyle ("real-time" renderer), not an offline renderer.
    ---http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/rendering/render_drawstyle/start

  • bigD3dbigD3d Posts: 75
    edited January 2021

    Richard Haseltine said:

    I'm going to quote the official word rather than risk confusing the issue with a paraphrase:

    Filament is implemented as a DrawStyle ("real-time" renderer), not an offline renderer.
    ---http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/rendering/render_drawstyle/start

    thanks Richard, I think I found that same sample page about 1/2 hr ago. I changed the 'Hidden Line' drawstyle to 'Filament (PBR)' and it appears to have worked. The only other thing i've tried so far is to change the code to try to render a different non-active viewport (which has a different camera associated) and it still rendered the active one. I'm not sure if that is normal for this type of real-time rendering as I haven't done these kind before. My 'offline' rendering script can select whichever camera I want to render from. If you are forced to render from the active viewport that is kind of limiting and I hope they update that in the future. 

    Edit: by rendering to a non-active viewport I should explain better. I set the layout to FOUR_PANE and have each of the four viewports assocaited to different cameras. In the sample code I change this line:

     //var oViewport = oViewportMgr.getActiveViewport();

    to:

    var oViewport = oViewportMgr.getViewport(2); // bottom left viewport

     

    so the top left viewport (numbered 0) is still active. I was hoping that forcing the code to the non-active viewport would allow me to only select the viewport via script to render, not making it the active viewport.

    Post edited by bigD3d on
Sign In or Register to comment.