Jump to content

Cross-fading between cameras


photo

Recommended Posts

Posted

I wish to cross-fade the engine between two cameras. There does not seem to be an obvious way of doing this.

 

Does anyone have any hints or pointers?

Posted

Angus,

 

Cross-fading between two cameras will require some additional custom shader which will blend image. Also, you will have to deal with performance issues, because you need to render image twice (expect twice fps loss) in that case.

 

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Posted

Thanks, Silent. 

 

I have looked at using a custom post-processing shader to do the work, however I cannot see how to force an update to an addressed texture. I was doing a loop where I run the below.

    Material mat = engine.materials.findMaterial("custom_post_0");
    Player ply1 = node_cast(engine.editor.getNodeByName("cam1"));
    int mat_index = mat.findTexture("tex");
    Image img1 = new Image();


    while(1) {
        engine.render.renderImage2D(cam1, img1, 1);
        mat.setImageTextureImage(mat_index, img1, 1);
        sleep(1);
    }

 

I was imagining that by material.setImageTextureImage() would update the texture but it seems that it only updates a single time. Any hints?

 

×
×
  • Create New...