Jump to content

Dynamic HDR Environment Map


Art Vandelay
 Share

Recommended Posts

Hi all,

I have a 3d room I created that changes once in a while. I would like to create an HDR environment map of the room automatically so that PBR materials reflect the actual room. It doesn't need to be in real time, I can update it every couple minutes for example. Is there any way to do this?

Thanks! :)

Link to comment
Share on other sites

Hi Art Vandelay!

You can of course update the property reflectionTexture of the materials you need to update (skybox's material included). 

This will work if your 3D room changes from a static state to an other static state and you have the textureMap.
 https://playground.babylonjs.com/#J3S4Y6

However, if your room is fully dynamic, you might find a way to do what you need using reflectionProbe as reflectionTexture.

Because probes are heavy, I suggest you to use 
probe.refreshRate = BABYLON.RenderTargetTexture.REFRESHRATE_RENDER_ONCE;
to avoid computing the reflection each frame.
Then you could use
probe.resetRefreshCounter
to update your reflectionTexture when you need it.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...