Access reflection cubemap(s) in material

Hey, does anyone know if it’s possible to access the cubemaps that are used to make surfaces appear reflective in a material?

I’m also comfortable changing the engine a bit to expose this, as long as it doesn’t require major changes.

Thanks!

Hello ehahnda,

I am not sure what you are trying to do but there is a SceneCaptureCube Actor which you can create a CubeRenderTarget texture for, and you can place that into your Post Process Volume to have your own custom Cubemap.

There is some helpful documentation on Ambient Cubemaps that might provide you with the exact answer you are looking for as well.

Ambient Cubemaps

If you need more information or assistance let me know.

Cheers,

Thanks! I might be able to use this for my needs, but this seems like it would be wasteful, since the engine will already be capturing cubemaps for its reflections.

I managed to expose select reflection cubemaps to the material by adding them to the view uniform buffer in this function: FViewInfo::CreateUniformBuffer (in SceneRendering.cpp)

I’m able to access the value using a custom hlsl node (similar to the way AmbientCubemapTint is done)

Things seem to be working good with this so far, but if you can think of any problems with me doing this (like thread safety, resources being deleted, etc) please let me know.

Hey ehahnda,

Your approach seems sound especially if it is a similar approach to how the AmbientCubeMapTint is being accessed. Let me know if you come across something that seems questionable.

Cheers,