angus Posted July 3, 2017 Posted July 3, 2017 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?
silent Posted July 3, 2017 Posted July 3, 2017 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: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
angus Posted July 3, 2017 Author Posted July 3, 2017 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?
Recommended Posts