renjianfeng Posted January 2, 2018 Share Posted January 2, 2018 HI,I have a scene where I need to create a lot of environment maps, so I used Reflection Probes, and after the mesh and material are ready, do the following: probe.refreshRate = BABYLON.RenderTargetTexture.REFRESHRATE_RENDER_ONCE; This works especially well. My question is, I have much more special mesh in the scene, if every time I go to use reflection probes, will extend its load time, so, I want to keep reflected probe the face of the six cubes into images. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 2, 2018 Share Posted January 2, 2018 Hello! You can add this code to the probe texture: probe.cubeTexture.onAfterRenderObservable.add(() => { BABYLON.Tools.DumpFramebuffer(width, height, engine, null, "image/png", fileName); }); Instead of null (4th parameter), you can specify a function which takes a string as parameter. The string is the content of the image capture (png in this case) NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.