Set the SubD Level in Headless Mode? [Solved]

Hi All,

So, I've got a scene loading in headless mode and the program correctly exports geometry. The problem is that the old code that successfully set the SubD level to base res when it ran in a DLL doesn't seem to work at all when it runs as a headless .exe and the geometry is exported at subd level 2, because that's what it is set to in the scene file... not what I want.

Does anyone know how to set the subd level of a node when running headless? There is something different going on... setting the "SubDIAlevel" and "lodlevel" shape properties does not work in headless mode, for some reason.

Any help is appreciated.

Post edited by TheMysteryIsThePoint on

Comments

  • TheMysteryIsThePointTheMysteryIsThePoint Posts: 2,892
    edited July 2023

    OK, I figured it out and am posting my results for others who might run into the same problem.

    What I think was going on was this (massive speculation ahead): in the way that the headless app SDK sample is written, it never starts the main app's event loop. It is in this event loop that the geometry pipeline is evaluated. So even if you successfully set the subd level, the geometry pipeline is never evaluated to actually change the geometry.

    The solution is to simply call

    node->update();

    and

    node->finalize();

    explicitly after changing the subd level. This would normally be called in the app's event loop, but since that's not running, we need to call it manually.

     

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