[SOLVED] VideorecorderAppState don't get the post effect? [3.1]

I added some post-process effects to the gui viewport. Everything fine.
Then I attached a VideoRecorderAppstate and… I see the post effects on the screen, but the recorded video don’t have the post effects…
Why is that?

1 Like

Mmh, the videorecorder is probably recording using the rendered frame as source before the PostProcessor does its work :\ is this an experimental feature?

1 Like

According to the link below, it only adds the scene processor to a single viewport.

1 Like

This means that I should add the VideorecorderAppState after I’ve set up the filterpostprocessor?

EDIT: nope, that doesn’t work :frowning:

1 Like

This means that the scene processor is not added to the GUI viewport.

1 Like

So… I suspect it’s a bug?

Tried to browse the source, still didn’t understand how to fix it. The guiViewPort is added to the postViews, and the processor is added to the “last” viewport… it should contain everything, right?

Hope for a fix?

2 Likes

If i read the code correctly, and i might be wrong, i would just copy the class over, add a recorder to the gui port in addition to the 3D port, and blend both outputs together into one image.

I presume the viewports run one after another, in the order they were added, so you would have to accomodate for that.

1 Like

Tried with this but didn’t help, still no see post effects.

    List<ViewPort> vps = app.getRenderManager().getPostViews();

    for (int i = vps.size() - 1; i >= 0; i-- ) {
        lastViewPort = vps.get(i);
        if (lastViewPort.isEnabled()) {
            break;
        }
    }
    app.getGuiViewPort().addProcessor(processor);
    //lastViewPort.addProcessor(processor);

Any help would be appreciated, thanks!

1 Like

I’ll look into it tonight… I might have broken it with the 3.1 post process changes.

2 Likes

Just to be sure… was it working in 3.0?

1 Like

Ok… was about to post that I don’t reproduce the issue and read back your first post…I didn’t realize it was in GUI viewport…

ok super easy workaround:

   ViewPort vp = renderManager.createPostView("dummy", cam);
   vp.setClearFlags(false, false, false);

Only do that when you record and everything will be fine.

4 Likes